Skip to content

Commit 6ad2989

Browse files
authored
Merge pull request rust-lang#112 from ptersilie/remove_intrinsic_annotation
Remove intrinsic annotation.
2 parents 62c9338 + 67fd190 commit 6ad2989

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

llvm/lib/Target/X86/X86FastISel.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2574,19 +2574,6 @@ bool X86FastISel::TryEmitSmallMemcpy(X86AddressMode DestAM,
25742574
return true;
25752575
}
25762576

2577-
// Add an annotation to an intrinsic instruction, specifying whether the
2578-
// intrinsic has been inlined or not.
2579-
//
2580-
// This is only necessary for intrinsics which may emit machine code.
2581-
void annotateIntrinsic(const IntrinsicInst *II, bool Inlined) {
2582-
IntrinsicInst *CI = const_cast<IntrinsicInst *>(II);
2583-
LLVMContext &C = CI->getContext();
2584-
ConstantInt *CInt;
2585-
CInt = ConstantInt::get(C, APInt(1, Inlined ? 1 : 0));
2586-
MDNode *N = MDNode::get(C, ConstantAsMetadata::get(CInt));
2587-
CI->setMetadata("yk.intrinsic.inlined", N);
2588-
}
2589-
25902577
bool X86FastISel::fastLowerIntrinsicCall(const IntrinsicInst *II) {
25912578
// FIXME: Handle more intrinsics.
25922579
switch (II->getIntrinsicID()) {
@@ -2724,7 +2711,6 @@ bool X86FastISel::fastLowerIntrinsicCall(const IntrinsicInst *II) {
27242711
// without a call if possible.
27252712
uint64_t Len = cast<ConstantInt>(MCI->getLength())->getZExtValue();
27262713
if (IsMemcpySmall(Len)) {
2727-
annotateIntrinsic(II, true);
27282714
X86AddressMode DestAM, SrcAM;
27292715
if (!X86SelectAddress(MCI->getRawDest(), DestAM) ||
27302716
!X86SelectAddress(MCI->getRawSource(), SrcAM))
@@ -2741,7 +2727,6 @@ bool X86FastISel::fastLowerIntrinsicCall(const IntrinsicInst *II) {
27412727
if (MCI->getSourceAddressSpace() > 255 || MCI->getDestAddressSpace() > 255)
27422728
return false;
27432729

2744-
annotateIntrinsic(II, false);
27452730
return lowerCallTo(II, "memcpy", II->arg_size() - 1);
27462731
}
27472732
case Intrinsic::memset: {

0 commit comments

Comments
 (0)