[llvm-branch-commits] [llvm-branch] r182417 - Merging r182387:

Bill Wendling isanbard at gmail.com
Tue May 21 13:23:13 PDT 2013


Author: void
Date: Tue May 21 15:23:13 2013
New Revision: 182417

URL: http://llvm.org/viewvc/llvm-project?rev=182417&view=rev
Log:
Merging r182387:
------------------------------------------------------------------------
r182387 | jholewinski | 2013-05-21 07:37:16 -0700 (Tue, 21 May 2013) | 7 lines

Drop @llvm.annotation and @llvm.ptr.annotation intrinsics during codegen.

The intrinsic calls are dropped, but the annotated value is propagated.

Fixes PR 15253

Original patch by Zeng Bin!
------------------------------------------------------------------------

Added:
    llvm/branches/release_33/test/CodeGen/Generic/annotate.ll
      - copied unchanged from r182387, llvm/trunk/test/CodeGen/Generic/annotate.ll
    llvm/branches/release_33/test/CodeGen/Generic/ptr-annotate.ll
      - copied unchanged from r182387, llvm/trunk/test/CodeGen/Generic/ptr-annotate.ll
Modified:
    llvm/branches/release_33/   (props changed)
    llvm/branches/release_33/lib/CodeGen/IntrinsicLowering.cpp
    llvm/branches/release_33/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Propchange: llvm/branches/release_33/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue May 21 15:23:13 2013
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,181286,181296,181313,181397,181423,181450,181524,181529,181540,181576-181580,181586,181600,181678,181706,181792,181800,181842,181864,182072,182112-182113,182344,182364
+/llvm/trunk:155241,181286,181296,181313,181397,181423,181450,181524,181529,181540,181576-181580,181586,181600,181678,181706,181792,181800,181842,181864,182072,182112-182113,182344,182364,182387

Modified: llvm/branches/release_33/lib/CodeGen/IntrinsicLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_33/lib/CodeGen/IntrinsicLowering.cpp?rev=182417&r1=182416&r2=182417&view=diff
==============================================================================
--- llvm/branches/release_33/lib/CodeGen/IntrinsicLowering.cpp (original)
+++ llvm/branches/release_33/lib/CodeGen/IntrinsicLowering.cpp Tue May 21 15:23:13 2013
@@ -453,6 +453,12 @@ void IntrinsicLowering::LowerIntrinsicCa
     CI->replaceAllUsesWith(ConstantInt::get(CI->getType(), 1));
     break;
 
+  case Intrinsic::annotation:
+  case Intrinsic::ptr_annotation:
+    // Just drop the annotation, but forward the value
+    CI->replaceAllUsesWith(CI->getOperand(0));
+    break;
+
   case Intrinsic::var_annotation:
     break;   // Strip out annotate intrinsic
     

Modified: llvm/branches/release_33/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_33/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=182417&r1=182416&r2=182417&view=diff
==============================================================================
--- llvm/branches/release_33/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (original)
+++ llvm/branches/release_33/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Tue May 21 15:23:13 2013
@@ -5034,6 +5034,11 @@ SelectionDAGBuilder::visitIntrinsicCall(
     setValue(&I, Res);
     return 0;
   }
+  case Intrinsic::annotation:
+  case Intrinsic::ptr_annotation:
+    // Drop the intrinsic, but forward the value
+    setValue(&I, getValue(I.getOperand(0)));
+    return 0;
   case Intrinsic::var_annotation:
     // Discard annotate attributes
     return 0;





More information about the llvm-branch-commits mailing list