diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2012-05-22 15:25:31 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2012-05-22 15:25:31 +0000 |
commit | 23e75da7e0622528be3c3908b5fe3ae8857cdf65 (patch) | |
tree | 953e680c141920c0bb5b29a2edfcbcf084614ddd /lib/VMCore/AutoUpgrade.cpp | |
parent | 76ff7418361c1c80ce9d018bce63511a70bd7390 (diff) | |
download | llvm-23e75da7e0622528be3c3908b5fe3ae8857cdf65.tar.gz llvm-23e75da7e0622528be3c3908b5fe3ae8857cdf65.tar.bz2 llvm-23e75da7e0622528be3c3908b5fe3ae8857cdf65.tar.xz |
revert my previous patches that introduced an additional parameter to the objectsize intrinsic.
After a lot of discussion, we realized it's not the best option for run-time bounds checking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157255 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/AutoUpgrade.cpp')
-rw-r--r-- | lib/VMCore/AutoUpgrade.cpp | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/lib/VMCore/AutoUpgrade.cpp b/lib/VMCore/AutoUpgrade.cpp index 1b259d7f07..522b07e454 100644 --- a/lib/VMCore/AutoUpgrade.cpp +++ b/lib/VMCore/AutoUpgrade.cpp @@ -52,20 +52,6 @@ static bool UpgradeIntrinsicFunction1(Function *F, Function *&NewFn) { } break; } - case 'o': { - // FIXME: remove in LLVM 3.3 - if (Name.startswith("objectsize.") && F->arg_size() == 2) { - Type *Tys[] = {F->getReturnType(), - F->arg_begin()->getType(), - Type::getInt1Ty(F->getContext()), - Type::getInt32Ty(F->getContext())}; - NewFn = Intrinsic::getDeclaration(F->getParent(), Intrinsic::objectsize, - Tys); - NewFn->takeName(F); - return true; - } - break; - } case 'x': { if (Name.startswith("x86.sse2.pcmpeq.") || Name.startswith("x86.sse2.pcmpgt.") || @@ -209,7 +195,7 @@ void llvm::UpgradeIntrinsicCall(CallInst *CI, Function *NewFn) { llvm_unreachable("Unknown function for CallInst upgrade."); case Intrinsic::ctlz: - case Intrinsic::cttz: { + case Intrinsic::cttz: assert(CI->getNumArgOperands() == 1 && "Mismatch between function args and call args"); StringRef Name = CI->getName(); @@ -219,16 +205,6 @@ void llvm::UpgradeIntrinsicCall(CallInst *CI, Function *NewFn) { CI->eraseFromParent(); return; } - case Intrinsic::objectsize: { - StringRef Name = CI->getName(); - CI->setName(Name + ".old"); - CI->replaceAllUsesWith(Builder.CreateCall3(NewFn, CI->getArgOperand(0), - CI->getArgOperand(1), - Builder.getInt32(0), Name)); - CI->eraseFromParent(); - return; - } - } } // This tests each Function to determine if it needs upgrading. When we find |