[llvm-commits] [llvm-gcc-4.2] r55184 - in /llvm-gcc-4.2/trunk/gcc: passes.c tree-ssa-ccp.c
Rafael Espindola
rafael.espindola at gmail.com
Fri Aug 22 10:07:32 PDT 2008
Author: rafael
Date: Fri Aug 22 12:07:31 2008
New Revision: 55184
URL: http://llvm.org/viewvc/llvm-project?rev=55184&view=rev
Log:
enable a restricted version of fold builtin to fix
void prefetch(const char *x, int hint) {
if (__builtin_constant_p(hint)) {
__builtin_prefetch(x, 0, hint);
}
}
Modified:
llvm-gcc-4.2/trunk/gcc/passes.c
llvm-gcc-4.2/trunk/gcc/tree-ssa-ccp.c
Modified: llvm-gcc-4.2/trunk/gcc/passes.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/passes.c?rev=55184&r1=55183&r2=55184&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/passes.c (original)
+++ llvm-gcc-4.2/trunk/gcc/passes.c Fri Aug 22 12:07:31 2008
@@ -612,7 +612,13 @@
NEXT_PASS (pass_object_sizes);
NEXT_PASS (pass_store_ccp);
NEXT_PASS (pass_store_copy_prop);
+
+#endif
+ /* LLVM LOCAL end */
NEXT_PASS (pass_fold_builtins);
+ /* LLVM LOCAL begin */
+#ifndef ENABLE_LLVM
+
/* FIXME: May alias should a TODO but for 4.0.0,
we add may_alias right after fold builtins
which can create arbitrary GIMPLE. */
Modified: llvm-gcc-4.2/trunk/gcc/tree-ssa-ccp.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/tree-ssa-ccp.c?rev=55184&r1=55183&r2=55184&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/tree-ssa-ccp.c (original)
+++ llvm-gcc-4.2/trunk/gcc/tree-ssa-ccp.c Fri Aug 22 12:07:31 2008
@@ -2544,6 +2544,11 @@
continue;
}
fcode = DECL_FUNCTION_CODE (callee);
+ if (fcode != BUILT_IN_CONSTANT_P)
+ {
+ bsi_next (&i);
+ continue;
+ }
result = ccp_fold_builtin (*stmtp, call);
if (!result)
@@ -2621,12 +2626,10 @@
NULL, /* next */
0, /* static_pass_number */
0, /* tv_id */
- PROP_cfg | PROP_ssa | PROP_alias, /* properties_required */
+ PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- TODO_dump_func
- | TODO_verify_ssa
- | TODO_update_ssa, /* todo_flags_finish */
+ TODO_dump_func, /* todo_flags_finish */
0 /* letter */
};
More information about the llvm-commits
mailing list