Reapply r116831 and r116839, converting AliasAnalysis to use

uint64_t, plus fixes for places I missed before.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116875 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2010-10-19 22:54:46 +00:00
parent 5ee568ac27
commit 3da848bbda
13 changed files with 93 additions and 89 deletions

View File

@ -190,7 +190,7 @@ namespace {
/// pointerInvalidatedByLoop - Return true if the body of this loop may
/// store into the memory location pointed to by V.
///
bool pointerInvalidatedByLoop(Value *V, unsigned Size,
bool pointerInvalidatedByLoop(Value *V, uint64_t Size,
const MDNode *TBAAInfo) {
// Check to see if any of the basic blocks in CurLoop invalidate *V.
return CurAST->getAliasSetForPointer(V, Size, TBAAInfo).isMod();
@ -402,7 +402,7 @@ bool LICM::canSinkOrHoistInst(Instruction &I) {
return true;
// Don't hoist loads which have may-aliased stores in loop.
unsigned Size = 0;
uint64_t Size = 0;
if (LI->getType()->isSized())
Size = AA->getTypeStoreSize(LI->getType());
return !pointerInvalidatedByLoop(LI->getOperand(0), Size,