change judgment

This commit is contained in:
fanfuqiang 2018-09-04 07:15:27 +08:00
parent f7916b3a44
commit eaf16a6ebc
3 changed files with 10 additions and 5 deletions

@ -1,7 +1,7 @@
#ifndef RAP_H_INCLUDED
#define RAP_H_INCLUDED
#include "gcc-common.h"
#include "../gcc-common.h"
#include "rap_opt.h"
typedef struct {

@ -200,14 +200,19 @@ is_rap_function_may_be_aliased (tree f)
}
/* Entry point of the oracle, look up current function weather or not beed
gathered into our target function set. If NOT return 1 otherwise return 0 */
gathered into our target function set. If YES return 1 otherwise return 0 */
int
is_rap_function_maybe_roped (tree f)
{
if (! is_rap_function_may_be_aliased (f))
return 0;
/* Ask the oracle for help */
if (0 == gcc_optimize_level)
return ! is_rap_function_may_be_aliased (f);
/* Function is_rap_function_may_be_aliased() must be failed we arive here,
but our oracle dependent the GCC optimizations. */
return 1;
else
return ! bitmap_bit_p (DECL_UID (f))
return bitmap_bit_p (DECL_UID (f))
}
/* Write some statistics for our algorithm */

@ -748,7 +748,7 @@ __visible int plugin_init(struct plugin_name_args *plugin_info, struct plugin_gc
register_callback(plugin_name, PLUGIN_INFO, NULL, &rap_plugin_info);
/* register the rap optimization*/
register_callback("rap_optimization", PLUGIN_OVERRIDE_GATE, rap_make_sure_ipa_pta, NULL);
register_callback("rap_optimization", PLUGIN_OVERRIDE_GATE, rap_try, NULL);
if (enable_type_ret) {
flag_crossjumping = 0;