]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-pretty-print.c (percent_K_format): Implement special case for LTO and its stripp...
authorRichard Biener <rguenther@suse.de>
Wed, 26 Mar 2014 09:47:36 +0000 (09:47 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 26 Mar 2014 09:47:36 +0000 (09:47 +0000)
2014-03-26  Richard Biener  <rguenther@suse.de>

* tree-pretty-print.c (percent_K_format): Implement special
case for LTO and its stripped down BLOCK tree.

From-SVN: r208843

gcc/ChangeLog
gcc/tree-pretty-print.c

index 7faec434e05595696758cdd0acbbdf4f4bc633c3..53d58b38d70facde62c5fb3b31cc6fad02fb3faf 100644 (file)
@@ -1,3 +1,8 @@
+2014-03-26  Richard Biener  <rguenther@suse.de>
+
+       * tree-pretty-print.c (percent_K_format): Implement special
+       case for LTO and its stripped down BLOCK tree.
+
 2014-03-26  Jakub Jelinek  <jakub@redhat.com>
 
        PR sanitizer/60636
index 7ec4223d9e1923519e1b2968e63750c3e53ffe69..77446c5dd640f7b28a9362841ce431fec667d0e4 100644 (file)
@@ -3365,6 +3365,25 @@ percent_K_format (text_info *text)
   gcc_assert (pp_ti_abstract_origin (text) != NULL);
   block = TREE_BLOCK (t);
   *pp_ti_abstract_origin (text) = NULL;
+
+  if (in_lto_p)
+    {
+      /* ???  LTO drops all BLOCK_ABSTRACT_ORIGINs apart from those
+         representing the outermost block of an inlined function.
+        So walk the BLOCK tree until we hit such a scope.  */
+      while (block
+            && TREE_CODE (block) == BLOCK)
+       {
+         if (inlined_function_outer_scope_p (block))
+           {
+             *pp_ti_abstract_origin (text) = block;
+             break;
+           }
+         block = BLOCK_SUPERCONTEXT (block);
+       }
+      return;
+    }
+
   while (block
         && TREE_CODE (block) == BLOCK
         && BLOCK_ABSTRACT_ORIGIN (block))