summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-12-21 07:49:49 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-12-21 07:49:49 +0000
commita276d0972cb99f7faeef8ae18e43f772da85cdc0 (patch)
treee28dac432266043f30e2ccbffe0c0eb9556230fc /llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp
parent4720d4d9ef16462822e1f7af62cdd483c1a607c9 (diff)
downloadbcm5719-llvm-a276d0972cb99f7faeef8ae18e43f772da85cdc0.tar.gz
bcm5719-llvm-a276d0972cb99f7faeef8ae18e43f772da85cdc0.zip
Remove isSigned calls via foreknowledge of main's argument types.
llvm-svn: 32730
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp')
-rw-r--r--llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp b/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp
index 4adf09e0999..40683928840 100644
--- a/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp
+++ b/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp
@@ -62,8 +62,8 @@ void llvm::InsertProfilingInitCall(Function *MainFn, const char *FnName,
case 2:
AI = MainFn->arg_begin(); ++AI;
if (AI->getType() != ArgVTy) {
- Instruction::CastOps opcode = CastInst::getCastOpcode(AI,
- AI->getType()->isSigned(), ArgVTy, ArgVTy->isSigned());
+ Instruction::CastOps opcode = CastInst::getCastOpcode(AI, false, ArgVTy,
+ false);
InitCall->setOperand(2,
CastInst::create(opcode, AI, ArgVTy, "argv.cast", InitCall));
} else {
@@ -78,14 +78,11 @@ void llvm::InsertProfilingInitCall(Function *MainFn, const char *FnName,
if (AI->getType() != Type::IntTy) {
Instruction::CastOps opcode;
if (!AI->use_empty()) {
- opcode = CastInst::getCastOpcode(InitCall,
- InitCall->getType()->isSigned(), AI->getType(),
- AI->getType()->isSigned());
+ opcode = CastInst::getCastOpcode(InitCall, true, AI->getType(), true);
AI->replaceAllUsesWith(
CastInst::create(opcode, InitCall, AI->getType(), "", InsertPos));
}
- opcode = CastInst::getCastOpcode(AI, AI->getType()->isSigned(),
- Type::IntTy, true);
+ opcode = CastInst::getCastOpcode(AI, true, Type::IntTy, true);
InitCall->setOperand(1,
CastInst::create(opcode, AI, Type::IntTy, "argc.cast", InitCall));
} else {
OpenPOWER on IntegriCloud