Re-materialize all loads from fixed stack slots.
[oota-llvm.git] / lib / CodeGen / MachineFunction.cpp
index d26b3258fe8fe6c0c7fc490605c01bb06caf4835..5ae73ca40a017598267cd3c362fd2d6dba05e4f6 100644 (file)
@@ -13,6 +13,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "llvm/DerivedTypes.h"
 #include "llvm/CodeGen/MachineFunctionPass.h"
 #include "llvm/CodeGen/MachineInstr.h"
 #include "llvm/CodeGen/SSARegMap.h"
@@ -123,7 +124,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.getABITypeAlignment(Type::Int32Ty)
+                             : TD.getPointerABIAlignment();
   JumpTableInfo = new MachineJumpTableInfo(EntrySize, Alignment);
   
   BasicBlocks.Parent = this;