diff options
author | Tim Northover <tnorthover@apple.com> | 2015-03-11 18:54:22 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2015-03-11 18:54:22 +0000 |
commit | 8cda34f5e7e6af23910e62ab3edb430dab07799f (patch) | |
tree | 002826d4d7e36b2ef7249808f0cc0161174e65d8 /llvm/lib/Target/ARM/ARMMachineFunctionInfo.h | |
parent | 1b9be2c9e488c2852986b9d7d926b67a602bc893 (diff) | |
download | bcm5719-llvm-8cda34f5e7e6af23910e62ab3edb430dab07799f.tar.gz bcm5719-llvm-8cda34f5e7e6af23910e62ab3edb430dab07799f.zip |
ARM: simplify and extend byval handling
The main issue being fixed here is that APCS targets handling a "byval align N"
parameter with N > 4 were miscounting what objects were where on the stack,
leading to FrameLowering setting the frame pointer incorrectly and clobbering
the stack.
But byval handling had grown over many years, and had multiple layers of cruft
trying to compensate for each other and calculate padding correctly. This only
really needs to be done once, in the HandleByVal function. Elsewhere should
just do what it's told by that call.
I also stripped out unnecessary APCS/AAPCS distinctions (now that Clang emits
byvals with the correct C ABI alignment), which simplified HandleByVal.
rdar://20095672
llvm-svn: 231959
Diffstat (limited to 'llvm/lib/Target/ARM/ARMMachineFunctionInfo.h')
-rw-r--r-- | llvm/lib/Target/ARM/ARMMachineFunctionInfo.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/Target/ARM/ARMMachineFunctionInfo.h b/llvm/lib/Target/ARM/ARMMachineFunctionInfo.h index ddfdb5240c2..a68ab1ba912 100644 --- a/llvm/lib/Target/ARM/ARMMachineFunctionInfo.h +++ b/llvm/lib/Target/ARM/ARMMachineFunctionInfo.h @@ -149,11 +149,7 @@ public: unsigned getStoredByValParamsPadding() const { return StByValParamsPadding; } void setStoredByValParamsPadding(unsigned p) { StByValParamsPadding = p; } - unsigned getArgRegsSaveSize(unsigned Align = 0) const { - if (!Align) - return ArgRegsSaveSize; - return (ArgRegsSaveSize + Align - 1) & ~(Align - 1); - } + unsigned getArgRegsSaveSize() const { return ArgRegsSaveSize; } void setArgRegsSaveSize(unsigned s) { ArgRegsSaveSize = s; } unsigned getReturnRegsCount() const { return ReturnRegsCount; } |