llvm-6502/lib
JF Bastien 9994b911f4 Targets: commonize some stack realignment code
This patch does the following:
* Fix FIXME on `needsStackRealignment`: it is now shared between multiple targets, implemented in `TargetRegisterInfo`, and isn't `virtual` anymore. This will break out-of-tree targets, silently if they used `virtual` and with a build error if they used `override`.
* Factor out `canRealignStack` as a `virtual` function on `TargetRegisterInfo`, by default only looks for the `no-realign-stack` function attribute.

Multiple targets duplicated the same `needsStackRealignment` code:
 - Aarch64.
 - ARM.
 - Mips almost: had extra `DEBUG` diagnostic, which the default implementation now has.
 - PowerPC.
 - WebAssembly.
 - x86 almost: has an extra `-force-align-stack` option, which the default implementation now has.

The default implementation of `needsStackRealignment` used to just return `false`. My current patch changes the behavior by simply using the above shared behavior. This affects:
 - AMDGPU
 - BPF
 - CppBackend
 - MSP430
 - NVPTX
 - Sparc
 - SystemZ
 - XCore
 - Out-of-tree targets
This is a breaking change! `make check` passes.

The only implementation of the `virtual` function (besides the slight different in x86) was Hexagon (which did `MF.getFrameInfo()->getMaxAlignment() > 8`), and potentially some out-of-tree targets. Hexagon now uses the default implementation.

`needsStackRealignment` was being overwritten in `<Target>GenRegisterInfo.inc`, to return `false` as the default also did. That was odd and is now gone.

Reviewers: sunfish

Subscribers: aemerson, llvm-commits, jfb

Differential Revision: http://reviews.llvm.org/D11160

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242727 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-20 22:51:32 +00:00
..
Analysis [PM/AA] Remove the addEscapingUse update API that won't be easy to 2015-07-18 03:26:46 +00:00
AsmParser AsmParser: Add a function to parse a standalone constant value. 2015-07-17 22:07:03 +00:00
Bitcode Add argmemonly attribute. 2015-07-11 10:30:36 +00:00
CodeGen Targets: commonize some stack realignment code 2015-07-20 22:51:32 +00:00
DebugInfo Return ErrorOr from getSymbolAddress. 2015-07-03 18:19:00 +00:00
ExecutionEngine Fix ffiInvoke() use of DataLayout, broken in 242414 2015-07-16 22:23:09 +00:00
Fuzzer [libFuzzer] require the files and directories passed to the fuzzer to exist 2015-07-18 00:03:37 +00:00
IR Revert "Update LLVM bindings after r239940. ..." 2015-07-16 01:16:39 +00:00
IRReader Return a unique_ptr from getLazyBitcodeModule and parseBitcodeFile. NFC. 2015-06-16 22:27:55 +00:00
LibDriver Add support for producing thin archives in llvm-lib. 2015-07-17 16:01:11 +00:00
LineEditor
Linker Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
LTO LTO: expose LTO_SYMBOL_ALIAS, which indicates that the symbol is an alias. 2015-07-04 03:42:35 +00:00
MC [MC] Correctly escape .safeseh's symbol 2015-07-13 18:51:15 +00:00
Object Fix handling of relative paths in thin archives. 2015-07-16 00:14:49 +00:00
Option [Option] Plug a leak when move-assigning an InputArgList. 2015-06-23 15:28:10 +00:00
Passes [PM] Fixup for r231556 where I missed a dependency on intrinsics 2015-03-07 09:08:20 +00:00
ProfileData Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
Support Edited the CPUNames table of TargetParser 2015-07-17 15:49:32 +00:00
TableGen [TableGen] Change a couple methods to return an ArrayRef instead of a const std::vector reference. NFC 2015-07-06 06:23:01 +00:00
Target Targets: commonize some stack realignment code 2015-07-20 22:51:32 +00:00
Transforms Don't try to instrument allocas used by outlined SEH funclets 2015-07-20 22:49:44 +00:00
CMakeLists.txt LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00
LLVMBuild.txt Wrap some long lines in LLVMBuild files. NFC 2015-06-12 18:44:57 +00:00
Makefile LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00