aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/InlineCost.cpp
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@chromium.org>2012-10-25 11:26:14 -0700
committerDerek Schuff <dschuff@chromium.org>2012-10-25 11:26:14 -0700
commit5c897cf45a7b9df227e0c562c27454f56ba86c20 (patch)
treeae3a9ea4d11bfb20379639dd9ca0951ce411e73a /lib/Analysis/InlineCost.cpp
parent89758b0545198f9a3876f0deb747146cbd84ce61 (diff)
parenta8a0a155de16830b8fcab539ba2ec21de3145532 (diff)
Merge commit 'a8a0a155de16830b8fcab539ba2ec21de3145532'
Conflicts: lib/Target/X86/X86FrameLowering.cpp lib/Target/X86/X86ISelLowering.cpp The Intel folks switched some of the FrameLowering code to use X86RegisterInfo::getSlotSize isntead of pointer size, thus reducing our localmods in that file.
Diffstat (limited to 'lib/Analysis/InlineCost.cpp')
-rw-r--r--lib/Analysis/InlineCost.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Analysis/InlineCost.cpp b/lib/Analysis/InlineCost.cpp
index 95e58022ca..64e183d60c 100644
--- a/lib/Analysis/InlineCost.cpp
+++ b/lib/Analysis/InlineCost.cpp
@@ -788,7 +788,7 @@ ConstantInt *CallAnalyzer::stripAndComputeInBoundsConstantOffsets(Value *&V) {
assert(V->getType()->isPointerTy() && "Unexpected operand type!");
} while (Visited.insert(V));
- Type *IntPtrTy = TD->getIntPtrType(V->getContext());
+ Type *IntPtrTy = TD->getIntPtrType(V->getType());
return cast<ConstantInt>(ConstantInt::get(IntPtrTy, Offset));
}
@@ -828,8 +828,7 @@ bool CallAnalyzer::analyzeCall(CallSite CS) {
// size of the byval type by the target's pointer size.
PointerType *PTy = cast<PointerType>(CS.getArgument(I)->getType());
unsigned TypeSize = TD->getTypeSizeInBits(PTy->getElementType());
- unsigned AS = PTy->getAddressSpace();
- unsigned PointerSize = TD->getPointerSizeInBits(AS);
+ unsigned PointerSize = TD->getTypeSizeInBits(PTy);
// Ceiling division.
unsigned NumStores = (TypeSize + PointerSize - 1) / PointerSize;