diff options
author | Bill Wendling <isanbard@gmail.com> | 2009-06-30 22:38:32 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2009-06-30 22:38:32 +0000 |
commit | 25a8ae3f10965b47ecaa9eda5e997f16fe1d9414 (patch) | |
tree | 5542e5d0c5b1b7e34d9e5edf1f6ba4a2ce853dca /lib/Target/X86/X86ISelLowering.cpp | |
parent | bab5da1290d6e8f19a4a291acff93c58ff5966a4 (diff) | |
download | external_llvm-25a8ae3f10965b47ecaa9eda5e997f16fe1d9414.tar.gz external_llvm-25a8ae3f10965b47ecaa9eda5e997f16fe1d9414.tar.bz2 external_llvm-25a8ae3f10965b47ecaa9eda5e997f16fe1d9414.zip |
Add an "alignment" field to the MachineFunction object. It makes more sense to
have the alignment be calculated up front, and have the back-ends obey whatever
alignment is decided upon.
This allows for future work that would allow for precise no-op placement and the
like.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74564 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86ISelLowering.cpp')
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 0adb10dd03..64ba5b66c6 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -1027,6 +1027,11 @@ SDValue X86TargetLowering::getPICJumpTableRelocBase(SDValue Table, return Table; } +/// getFunctionAlignment - Return the alignment of this function. +unsigned X86TargetLowering::getFunctionAlignment(const Function *F) const { + return F->hasFnAttr(Attribute::OptimizeForSize) ? 1 : 4; +} + //===----------------------------------------------------------------------===// // Return Value Calling Convention Implementation //===----------------------------------------------------------------------===// |