Add some cleanup to the DataLayout changes requested by Chandler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166607 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Micah Villmow
2012-10-24 18:36:13 +00:00
parent 199063ea37
commit b52fb87617
11 changed files with 38 additions and 27 deletions

View File

@ -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;