diff options
author | Owen Anderson <resistor@mac.com> | 2009-08-13 21:58:54 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-08-13 21:58:54 +0000 |
commit | 1d0be15f89cb5056e20e2d24faa8d6afb1573bca (patch) | |
tree | 2cdabe223bfce83bd12e10dd557147a2f68c9bf8 /lib/Target/ARM/ARMLoadStoreOptimizer.cpp | |
parent | d163e8b14c8aa5bbbb129e3f0dffdbe7213a3c72 (diff) |
Push LLVMContexts through the IntegerType APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMLoadStoreOptimizer.cpp')
-rw-r--r-- | lib/Target/ARM/ARMLoadStoreOptimizer.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMLoadStoreOptimizer.cpp b/lib/Target/ARM/ARMLoadStoreOptimizer.cpp index 11d4887e25..3c6778fe8c 100644 --- a/lib/Target/ARM/ARMLoadStoreOptimizer.cpp +++ b/lib/Target/ARM/ARMLoadStoreOptimizer.cpp @@ -19,6 +19,7 @@ #include "ARMMachineFunctionInfo.h" #include "ARMRegisterInfo.h" #include "llvm/DerivedTypes.h" +#include "llvm/Function.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstr.h" @@ -1183,7 +1184,9 @@ ARMPreAllocLoadStoreOpt::CanFormLdStDWord(MachineInstr *Op0, MachineInstr *Op1, unsigned Align = Op0->memoperands_begin()->getAlignment(); unsigned ReqAlign = STI->hasV6Ops() - ? TD->getPrefTypeAlignment(Type::Int64Ty) : 8; // Pre-v6 need 8-byte align + ? TD->getPrefTypeAlignment( + Type::getInt64Ty(Op0->getParent()->getParent()->getFunction()->getContext())) + : 8; // Pre-v6 need 8-byte align if (Align < ReqAlign) return false; |