ipa-inline-analysis.c (compute_inline_parameters): Disable inlinig into instrumentati...
authorJan Hubicka <hubicka@ucw.cz>
Mon, 16 May 2016 19:33:02 +0000 (21:33 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Mon, 16 May 2016 19:33:02 +0000 (19:33 +0000)
* ipa-inline-analysis.c (compute_inline_parameters): Disable inlinig
into instrumentation thunks.
* cif-code.def (CIF_CHKP): New.

From-SVN: r236299

gcc/ChangeLog
gcc/cif-code.def
gcc/ipa-inline-analysis.c

index db88e2864f02781cfb58c55e18a89626cd64ee74..170333157c00a6981f30af63a35cdab383f3e961 100644 (file)
@@ -1,3 +1,9 @@
+2016-05-16  Jan Hubicka  <hubicka@ucw.cz>
+
+       * ipa-inline-analysis.c (compute_inline_parameters): Disable inlinig
+       into instrumentation thunks.
+       * cif-code.def (CIF_CHKP): New.
+
 2016-05-16  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/xopintrin.h: Correct "unsinged" typo in the comments.
index 196151fe8d222f376909c8460f884b06f18971d6..b5e019ffb7b4987b87f67844f1b63f8b9c47aec8 100644 (file)
@@ -135,3 +135,7 @@ DEFCIFCODE(CILK_SPAWN, CIF_FINAL_ERROR,
 /* We proved that the call is unreachable.  */
 DEFCIFCODE(UNREACHABLE, CIF_FINAL_ERROR,
           N_("unreachable"))
+
+/* We can't inline because of instrumentation thunk.  */
+DEFCIFCODE(CHKP, CIF_FINAL_ERROR,
+          N_("caller is instrumetnation thunk"))
index 82d1774abcb4f7cae1096c8199a17f04b77042a7..8b5ca86c0d66d6322980ab5a62ca62621caa34a2 100644 (file)
@@ -2943,7 +2943,13 @@ compute_inline_parameters (struct cgraph_node *node, bool early)
       info->self_size = info->size;
       info->self_time = info->time;
       /* We can not inline instrumetnation clones.  */
-      info->inlinable = !node->thunk.add_pointer_bounds_args;
+      if (node->thunk.add_pointer_bounds_args)
+       {
+          info->inlinable = false;
+          node->callees->inline_failed = CIF_CHKP;
+       }
+      else
+        info->inlinable = true;
     }
   else
     {