mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-18 13:34:04 +00:00
Have isel visit blocks in reverse postorder rather than an undefined order. This
allows for the information propagated across basic blocks to be merged at phis. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126375 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
afbf48363a
commit
2dbe2850d0
@ -49,6 +49,7 @@
|
|||||||
#include "llvm/Support/ErrorHandling.h"
|
#include "llvm/Support/ErrorHandling.h"
|
||||||
#include "llvm/Support/Timer.h"
|
#include "llvm/Support/Timer.h"
|
||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
|
#include "llvm/ADT/PostOrderIterator.h"
|
||||||
#include "llvm/ADT/Statistic.h"
|
#include "llvm/ADT/Statistic.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
@ -832,8 +833,10 @@ void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) {
|
|||||||
FastIS = TLI.createFastISel(*FuncInfo);
|
FastIS = TLI.createFastISel(*FuncInfo);
|
||||||
|
|
||||||
// Iterate over all basic blocks in the function.
|
// Iterate over all basic blocks in the function.
|
||||||
for (Function::const_iterator I = Fn.begin(), E = Fn.end(); I != E; ++I) {
|
ReversePostOrderTraversal<const Function*> RPOT(&Fn);
|
||||||
const BasicBlock *LLVMBB = &*I;
|
for (ReversePostOrderTraversal<const Function*>::rpo_iterator
|
||||||
|
I = RPOT.begin(), E = RPOT.end(); I != E; ++I) {
|
||||||
|
const BasicBlock *LLVMBB = *I;
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
CheckLineNumbers(LLVMBB);
|
CheckLineNumbers(LLVMBB);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user