mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-26 02:22:29 +00:00
Loop exit sets are no longer explicitly held, they are dynamically computed on demand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13046 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -436,7 +436,8 @@ bool LICM::isLoopInvariantInst(Instruction &I) {
|
|||||||
void LICM::sink(Instruction &I) {
|
void LICM::sink(Instruction &I) {
|
||||||
DEBUG(std::cerr << "LICM sinking instruction: " << I);
|
DEBUG(std::cerr << "LICM sinking instruction: " << I);
|
||||||
|
|
||||||
const std::vector<BasicBlock*> &ExitBlocks = CurLoop->getExitBlocks();
|
std::vector<BasicBlock*> ExitBlocks;
|
||||||
|
CurLoop->getExitBlocks(ExitBlocks);
|
||||||
|
|
||||||
if (isa<LoadInst>(I)) ++NumMovedLoads;
|
if (isa<LoadInst>(I)) ++NumMovedLoads;
|
||||||
else if (isa<CallInst>(I)) ++NumMovedCalls;
|
else if (isa<CallInst>(I)) ++NumMovedCalls;
|
||||||
@@ -593,7 +594,8 @@ bool LICM::isSafeToExecuteUnconditionally(Instruction &Inst) {
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Get the exit blocks for the current loop.
|
// Get the exit blocks for the current loop.
|
||||||
const std::vector<BasicBlock*> &ExitBlocks = CurLoop->getExitBlocks();
|
std::vector<BasicBlock*> ExitBlocks;
|
||||||
|
CurLoop->getExitBlocks(ExitBlocks);
|
||||||
|
|
||||||
// For each exit block, get the DT node and walk up the DT until the
|
// For each exit block, get the DT node and walk up the DT until the
|
||||||
// instruction's basic block is found or we exit the loop.
|
// instruction's basic block is found or we exit the loop.
|
||||||
@@ -667,7 +669,8 @@ void LICM::PromoteValuesInLoop() {
|
|||||||
//
|
//
|
||||||
std::set<BasicBlock*> ProcessedBlocks;
|
std::set<BasicBlock*> ProcessedBlocks;
|
||||||
|
|
||||||
const std::vector<BasicBlock*> &ExitBlocks = CurLoop->getExitBlocks();
|
std::vector<BasicBlock*> ExitBlocks;
|
||||||
|
CurLoop->getExitBlocks(ExitBlocks);
|
||||||
for (unsigned i = 0, e = ExitBlocks.size(); i != e; ++i)
|
for (unsigned i = 0, e = ExitBlocks.size(); i != e; ++i)
|
||||||
if (ProcessedBlocks.insert(ExitBlocks[i]).second) {
|
if (ProcessedBlocks.insert(ExitBlocks[i]).second) {
|
||||||
// Copy all of the allocas into their memory locations...
|
// Copy all of the allocas into their memory locations...
|
||||||
|
|||||||
Reference in New Issue
Block a user