mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-02 10:32:56 +00:00
Minor tweak to MDA
Two minor tweaks I noticed when reading through the code: - No need to recompute begin() on every iteration. We're not modifying the instructions in this loop. - We can ignore PHINodes and Dbg intrinsics. The current code does this anyways, but it will spend slightly more time doing so and will count towards the limit of instructions in the block. It seems really silly to give up due the presence of PHIs... Differential Revision: http://reviews.llvm.org/D7624 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229175 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
845c00e2e6
commit
8c6097d490
@ -423,7 +423,9 @@ getPointerDependencyFrom(const AliasAnalysis::Location &MemLoc, bool isLoad,
|
||||
}
|
||||
|
||||
// Walk backwards through the basic block, looking for dependencies.
|
||||
while (ScanIt != BB->begin()) {
|
||||
// We can stop before processing PHIs or dbg intrinsics.
|
||||
const BasicBlock::iterator Begin(BB->getFirstNonPHIOrDbg());
|
||||
while (ScanIt != Begin) {
|
||||
Instruction *Inst = --ScanIt;
|
||||
|
||||
if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(Inst))
|
||||
|
Loading…
x
Reference in New Issue
Block a user