mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-23 22:23:00 +00:00
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! ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@182417 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -453,6 +453,12 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {
|
||||
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
|
||||
|
||||
|
||||
@@ -5034,6 +5034,11 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user