mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
LDA analysis output scaffolding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74400 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -43,5 +43,23 @@ bool LoopDependenceAnalysis::runOnLoop(Loop *L, LPPassManager &) {
|
||||
|
||||
void LoopDependenceAnalysis::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesAll();
|
||||
AU.addRequired<ScalarEvolution>();
|
||||
AU.addRequiredTransitive<ScalarEvolution>();
|
||||
}
|
||||
|
||||
static void PrintLoopInfo(
|
||||
raw_ostream &OS, const LoopDependenceAnalysis *LDA, const Loop *L) {
|
||||
if (!L->empty()) return; // ignore non-innermost loops
|
||||
|
||||
OS << "Loop at depth " << L->getLoopDepth() << ", header block: ";
|
||||
WriteAsOperand(OS, L->getHeader(), false);
|
||||
OS << "\n";
|
||||
}
|
||||
|
||||
void LoopDependenceAnalysis::print(raw_ostream &OS, const Module*) const {
|
||||
PrintLoopInfo(OS, this, this->L);
|
||||
}
|
||||
|
||||
void LoopDependenceAnalysis::print(std::ostream &OS, const Module *M) const {
|
||||
raw_os_ostream os(OS);
|
||||
print(os, M);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user