diff options
author | Chris Lattner <sabre@nondot.org> | 2003-07-21 19:56:49 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-07-21 19:56:49 +0000 |
commit | 43234493ded1abf9cdfa4071589f7a7a82dd368a (patch) | |
tree | 2452bde1a72b023831de963f69813d009c419c21 /lib | |
parent | 067947380c5d7b1bc867f71bab6f672a1b109405 (diff) | |
download | llvm-43234493ded1abf9cdfa4071589f7a7a82dd368a.tar.gz llvm-43234493ded1abf9cdfa4071589f7a7a82dd368a.tar.bz2 llvm-43234493ded1abf9cdfa4071589f7a7a82dd368a.tar.xz |
Simplify code a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7217 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/SparcV9/SparcV9RegInfo.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Target/SparcV9/SparcV9RegInfo.cpp b/lib/Target/SparcV9/SparcV9RegInfo.cpp index 42b9d10b59..d936fa03e4 100644 --- a/lib/Target/SparcV9/SparcV9RegInfo.cpp +++ b/lib/Target/SparcV9/SparcV9RegInfo.cpp @@ -1174,7 +1174,7 @@ UltraSparcRegInfo::insertCallerSavingCode const BasicBlock *BB, PhyRegAlloc &PRA) const { - assert ( (target.getInstrInfo()).isCall(CallMI->getOpCode()) ); + assert(target.getInstrInfo().isCall(CallMI->getOpCode())); // has set to record which registers were saved/restored // @@ -1182,14 +1182,14 @@ UltraSparcRegInfo::insertCallerSavingCode CallArgsDescriptor* argDesc = CallArgsDescriptor::get(CallMI); - //if the call is to a instrumentation function, do not - //insert save and restore instructions - //the instrumentation function takes care of - //save restore for volatile regs - bool isLLVMFirstTrigger = false; - const Function *calledFunction = argDesc->getCallInst()->getCalledFunction(); - if(calledFunction && calledFunction->getName() == "llvm_first_trigger") - isLLVMFirstTrigger = true; + // if the call is to a instrumentation function, do not insert save and + // restore instructions the instrumentation function takes care of save + // restore for volatile regs. + // + // FIXME: this should be made general, not specific to the reoptimizer! + // + const Function *Callee = argDesc->getCallInst()->getCalledFunction(); + bool isLLVMFirstTrigger = Callee && Callee->getName() == "llvm_first_trigger"; // Now check if the call has a return value (using argDesc) and if so, // find the LR of the TmpInstruction representing the return value register. |