[PATCH] D11160: Targets: commonize some stack realignment code

JF Bastien jfb at chromium.org
Tue Jul 14 18:32:26 PDT 2015


jfb updated this revision to Diff 29741.
jfb added a comment.
Herald added a subscriber: ted.

This update should address all comments:

- Add warning to the default needsStackRealignment implementation.
- Move -force-align-stack out of x86, and make it work for all targets as suggested by hfinkel.
- Remove x86 override of needsStackRealignment, and make the default one check for -force-align-stack (as the x86 version used to).
- Remove the Hexagon override of needsStackRealignment: comments on Phabricator seem to agree that the code was wrong, and the default implementation is probably right. All tests still pass.
- needsStackRealignment is now non-virtual. Out-of-tree targets need to update their code and instead implement canRealignStack. This will be a silent breaking change if code used 'virtual', but will not be silent if they used 'override'.


http://reviews.llvm.org/D11160

Files:
  include/llvm/Target/TargetRegisterInfo.h
  lib/CodeGen/TargetRegisterInfo.cpp
  lib/Target/AArch64/AArch64RegisterInfo.cpp
  lib/Target/AArch64/AArch64RegisterInfo.h
  lib/Target/ARM/ARMBaseRegisterInfo.cpp
  lib/Target/ARM/ARMBaseRegisterInfo.h
  lib/Target/Hexagon/HexagonRegisterInfo.cpp
  lib/Target/Hexagon/HexagonRegisterInfo.h
  lib/Target/Mips/MipsRegisterInfo.cpp
  lib/Target/Mips/MipsRegisterInfo.h
  lib/Target/PowerPC/PPCRegisterInfo.cpp
  lib/Target/PowerPC/PPCRegisterInfo.h
  lib/Target/WebAssembly/WebAssemblyRegisterInfo.cpp
  lib/Target/WebAssembly/WebAssemblyRegisterInfo.h
  lib/Target/X86/X86FrameLowering.cpp
  lib/Target/X86/X86RegisterInfo.cpp
  lib/Target/X86/X86RegisterInfo.h
  test/CodeGen/Generic/ForceStackAlign.ll
  utils/TableGen/RegisterInfoEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11160.29741.patch
Type: text/x-patch
Size: 19752 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150715/f36688f0/attachment.bin>


More information about the llvm-commits mailing list