summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-01-20 22:35:55 +0000
committerChris Lattner <sabre@nondot.org>2007-01-20 22:35:55 +0000
commit50ee0e40e553cbf2ce4eb920d7e2cb264f927438 (patch)
tree66423d72e856a6b3c463e21c0bb7241e7183c60e /llvm/lib/CodeGen/MachineFunction.cpp
parent7476fa445672333a766866debf2fed569dd408d9 (diff)
downloadbcm5719-llvm-50ee0e40e553cbf2ce4eb920d7e2cb264f927438.tar.gz
bcm5719-llvm-50ee0e40e553cbf2ce4eb920d7e2cb264f927438.zip
Teach TargetData to handle 'preferred' alignment for each target, and use
these alignment amounts to align scalars when we can. Patch by Scott Michel! llvm-svn: 33409
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineFunction.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index d26b3258fe8..0cba1567e18 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/lib/CodeGen/MachineFunction.cpp
@@ -123,7 +123,8 @@ MachineFunction::MachineFunction(const Function *F,
const TargetData &TD = *TM.getTargetData();
bool IsPic = TM.getRelocationModel() == Reloc::PIC_;
unsigned EntrySize = IsPic ? 4 : TD.getPointerSize();
- unsigned Alignment = IsPic ? TD.getIntAlignment() : TD.getPointerAlignment();
+ unsigned Alignment = IsPic ? TD.getIntABIAlignment()
+ : TD.getPointerABIAlignment();
JumpTableInfo = new MachineJumpTableInfo(EntrySize, Alignment);
BasicBlocks.Parent = this;
OpenPOWER on IntegriCloud