mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-10 14:12:11 +00:00
X86: remove a dead store (NFC)
The SP was always unconditionally assigned to later, but initialised early. This delays the initialisation, and avoids the dead store. Identified by clang static analysis. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244423 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
15a7a33742
commit
964343c299
@ -304,7 +304,6 @@ void X86CallFrameOptimization::collectCallInfo(MachineFunction &MF,
|
||||
// transformation.
|
||||
const X86RegisterInfo &RegInfo = *static_cast<const X86RegisterInfo *>(
|
||||
MF.getSubtarget().getRegisterInfo());
|
||||
unsigned StackPtr = RegInfo.getStackRegister();
|
||||
unsigned FrameDestroyOpcode = TII->getCallFrameDestroyOpcode();
|
||||
|
||||
// We expect to enter this at the beginning of a call sequence
|
||||
@ -334,7 +333,8 @@ void X86CallFrameOptimization::collectCallInfo(MachineFunction &MF,
|
||||
if (!I->isCopy() || !I->getOperand(0).isReg())
|
||||
return;
|
||||
Context.SPCopy = I++;
|
||||
StackPtr = Context.SPCopy->getOperand(0).getReg();
|
||||
|
||||
unsigned StackPtr = Context.SPCopy->getOperand(0).getReg();
|
||||
|
||||
// Scan the call setup sequence for the pattern we're looking for.
|
||||
// We only handle a simple case - a sequence of MOV32mi or MOV32mr
|
||||
|
Loading…
Reference in New Issue
Block a user