mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
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:
@ -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,
|
||||
|
Reference in New Issue
Block a user