From: Eric Christopher Date: Tue, 27 Jan 2015 07:16:37 +0000 (+0000) Subject: Migrate SeparateConstOffsetFromGEP to use a Function with X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=c2601d2f12b76221c79d4744cd03a5c5fd2c4672;p=oota-llvm.git Migrate SeparateConstOffsetFromGEP to use a Function with getSubtarget. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227172 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp b/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp index 6157746af48..0c70d0faaa1 100644 --- a/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp +++ b/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp @@ -910,7 +910,7 @@ bool SeparateConstOffsetFromGEP::splitGEP(GetElementPtrInst *GEP) { if (LowerGEP) { // As currently BasicAA does not analyze ptrtoint/inttoptr, do not lower to // arithmetic operations if the target uses alias analysis in codegen. - if (TM && TM->getSubtarget().useAA()) + if (TM && TM->getSubtargetImpl(*GEP->getParent()->getParent())->useAA()) lowerToSingleIndexGEPs(GEP, AccumulativeByteOffset); else lowerToArithmetics(GEP, AccumulativeByteOffset);