summaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation
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
commit06e3f4ee7eaf84538d2a3eaaf335e360bdf90122 (patch)
treeebc7ce5482dfdaf44c3648145a2ffa984d4846d9 /lib/Transforms/Instrumentation
parenta2913eea9d7530f8cad652b984cb642ee12c0d6d (diff)
downloadllvm-06e3f4ee7eaf84538d2a3eaaf335e360bdf90122.tar.gz
llvm-06e3f4ee7eaf84538d2a3eaaf335e360bdf90122.tar.bz2
llvm-06e3f4ee7eaf84538d2a3eaaf335e360bdf90122.tar.xz
Remove isSigned calls via foreknowledge of main's argument types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32730 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation')
-rw-r--r--lib/Transforms/Instrumentation/ProfilingUtils.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/Transforms/Instrumentation/ProfilingUtils.cpp b/lib/Transforms/Instrumentation/ProfilingUtils.cpp
index 4adf09e099..4068392884 100644
--- a/lib/Transforms/Instrumentation/ProfilingUtils.cpp
+++ b/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 {