Simplify code a bit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7217 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-07-21 19:56:49 +00:00
parent 067947380c
commit 43234493de

View File

@ -1174,7 +1174,7 @@ UltraSparcRegInfo::insertCallerSavingCode
const BasicBlock *BB, const BasicBlock *BB,
PhyRegAlloc &PRA) const PhyRegAlloc &PRA) const
{ {
assert ( (target.getInstrInfo()).isCall(CallMI->getOpCode()) ); assert(target.getInstrInfo().isCall(CallMI->getOpCode()));
// has set to record which registers were saved/restored // has set to record which registers were saved/restored
// //
@ -1182,14 +1182,14 @@ UltraSparcRegInfo::insertCallerSavingCode
CallArgsDescriptor* argDesc = CallArgsDescriptor::get(CallMI); CallArgsDescriptor* argDesc = CallArgsDescriptor::get(CallMI);
//if the call is to a instrumentation function, do not // if the call is to a instrumentation function, do not insert save and
//insert save and restore instructions // restore instructions the instrumentation function takes care of save
//the instrumentation function takes care of // restore for volatile regs.
//save restore for volatile regs //
bool isLLVMFirstTrigger = false; // FIXME: this should be made general, not specific to the reoptimizer!
const Function *calledFunction = argDesc->getCallInst()->getCalledFunction(); //
if(calledFunction && calledFunction->getName() == "llvm_first_trigger") const Function *Callee = argDesc->getCallInst()->getCalledFunction();
isLLVMFirstTrigger = true; bool isLLVMFirstTrigger = Callee && Callee->getName() == "llvm_first_trigger";
// Now check if the call has a return value (using argDesc) and if so, // 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. // find the LR of the TmpInstruction representing the return value register.