On 09/15/14 09:57, Ilya Enkovich wrote:
On 15 Sep 09:20, Jeff Law wrote:
On 09/15/14 01:20, Ilya Enkovich wrote:


2014-06-05  Ilya Enkovich  <ilya.enkov...@intel.com>

         * tree-ssa-ccp.c: Include tree-chkp.h.
         (insert_clobber_before_stack_restore): Handle
         BUILT_IN_CHKP_BNDRET calls.


diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index eeefeaf..e99bcf5 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -144,6 +144,7 @@ along with GCC; see the file COPYING3.  If not see
  #include "diagnostic-core.h"
  #include "dbgcnt.h"
  #include "params.h"
+#include "tree-chkp.h"


  /* Possible lattice values.  */
@@ -1880,6 +1881,9 @@ insert_clobber_before_stack_restore (tree saved_val, tree 
var,
      else if (gimple_assign_ssa_name_copy_p (stmt))
        insert_clobber_before_stack_restore (gimple_assign_lhs (stmt), var,
                                            visited);
+    else if (gimple_code (stmt) == GIMPLE_CALL
+            && chkp_gimple_call_builtin_p (stmt, BUILT_IN_CHKP_BNDRET))
+      continue;
      else
        gcc_assert (is_gimple_debug (stmt));
I think Richi also wanted the

gimple_code (stmt) == GIMPLE_CALL

Turned into:

is_gimple_call (stmt)


Presumably using chkp_gimple_call_builtin_p rather than
gimple_call_builtin_p is related to using different codes for the
instrumented builtin calls?  Otherwise why use
chkp_gimple_call_builtin_p rather than gimple_call_builtin_p?


jeff


The reason is that target may provide own version of builtin (and currently 
does it) for instrumentation.  Therefore we should obtain fndecl from target 
and then compare.  That is what chkp_gimple_call_builtin_p does.  I just moved 
gimple code check into chkp_gimple_call_builtin_p to make similar to 
gimple_call_builtin_p.

Thanks,
Ilya
--
2014-09-15  Ilya Enkovich  <ilya.enkov...@intel.com>

        * tree-ssa-ccp.c: Include tree-chkp.h.
        (insert_clobber_before_stack_restore): Handle
        BUILT_IN_CHKP_BNDRET calls.
OK.
Jeff

Reply via email to