[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcRegInfo.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Jul 21 14:57:02 PDT 2003
Changes in directory llvm/lib/Target/Sparc:
SparcRegInfo.cpp updated: 1.103 -> 1.104
---
Log message:
Simplify code a bit
---
Diffs of the changes:
Index: llvm/lib/Target/Sparc/SparcRegInfo.cpp
diff -u llvm/lib/Target/Sparc/SparcRegInfo.cpp:1.103 llvm/lib/Target/Sparc/SparcRegInfo.cpp:1.104
--- llvm/lib/Target/Sparc/SparcRegInfo.cpp:1.103 Sun Jul 20 10:38:14 2003
+++ llvm/lib/Target/Sparc/SparcRegInfo.cpp Mon Jul 21 14:56:49 2003
@@ -1174,7 +1174,7 @@
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 @@
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.
More information about the llvm-commits
mailing list