diff options
| author | Hans Wennborg <hans@hanshq.net> | 2016-05-17 20:13:29 +0000 |
|---|---|---|
| committer | Hans Wennborg <hans@hanshq.net> | 2016-05-17 20:13:29 +0000 |
| commit | c3fb51171e90b47d714c569e0548552d4ea46a93 (patch) | |
| tree | e847d8403e77285712a6d1104fe971f8d9d56017 /llvm/lib/Target/X86/X86MachineFunctionInfo.h | |
| parent | f0a41089ff2a580ad6665f62e8198b5efaa1ede2 (diff) | |
| download | bcm5719-llvm-c3fb51171e90b47d714c569e0548552d4ea46a93.tar.gz bcm5719-llvm-c3fb51171e90b47d714c569e0548552d4ea46a93.zip | |
X86: Avoid using _chkstk when lowering WIN_ALLOCA instructions
This patch moves the expansion of WIN_ALLOCA pseudo-instructions
into a separate pass that walks the CFG and lowers the instructions
based on a conservative estimate of the offset between the stack
pointer and the lowest accessed stack address.
The goal is to reduce binary size and run-time costs by removing
calls to _chkstk. While it doesn't fix all the code quality problems
with inalloca calls, it's an incremental improvement for PR27076.
Differential Revision: http://reviews.llvm.org/D20263
llvm-svn: 269828
Diffstat (limited to 'llvm/lib/Target/X86/X86MachineFunctionInfo.h')
| -rw-r--r-- | llvm/lib/Target/X86/X86MachineFunctionInfo.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86MachineFunctionInfo.h b/llvm/lib/Target/X86/X86MachineFunctionInfo.h index 4632adaf1e7..d517d82537a 100644 --- a/llvm/lib/Target/X86/X86MachineFunctionInfo.h +++ b/llvm/lib/Target/X86/X86MachineFunctionInfo.h @@ -98,6 +98,9 @@ class X86MachineFunctionInfo : public MachineFunctionInfo { /// True if this function uses the red zone. bool UsesRedZone = false; + /// True if this function has WIN_ALLOCA instructions. + bool HasWinAlloca = false; + private: /// ForwardedMustTailRegParms - A list of virtual and physical registers /// that must be forwarded to every musttail call. @@ -172,6 +175,9 @@ public: bool getUsesRedZone() const { return UsesRedZone; } void setUsesRedZone(bool V) { UsesRedZone = V; } + + bool hasWinAlloca() const { return HasWinAlloca; } + void setHasWinAlloca(bool v) { HasWinAlloca = v; } }; } // End llvm namespace |

