diff options
author | David Majnemer <david.majnemer@gmail.com> | 2016-01-04 04:49:41 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2016-01-04 04:49:41 +0000 |
commit | ca1c9f074fe37b7fb37573ae92bdc1c6aa63c369 (patch) | |
tree | eefae738026644848e0d54e656db1c1f36e54af4 /llvm/lib/CodeGen/SelectionDAG | |
parent | 67ac709e4c9fe22058f564aab8c23920fc62c158 (diff) | |
download | bcm5719-llvm-ca1c9f074fe37b7fb37573ae92bdc1c6aa63c369.tar.gz bcm5719-llvm-ca1c9f074fe37b7fb37573ae92bdc1c6aa63c369.zip |
[X86] Make hasFP constant time
We need a frame pointer if there is a push/pop sequence after the
prologue in order to unwind the stack. Scanning the instructions to
figure out if this happened made hasFP not constant-time which is a
violation of expectations. Let's compute this up-front and reuse that
computation when we need it.
llvm-svn: 256730
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 853a21a15eb..9f8759df0ba 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -633,6 +633,9 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) { MRI.replaceRegWith(From, To); } + if (TLI->hasCopyImplyingStackAdjustment(MF)) + MFI->setHasOpaqueSPAdjustment(true); + // Freeze the set of reserved registers now that MachineFrameInfo has been // set up. All the information required by getReservedRegs() should be // available now. |