mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-03 13:31:05 +00:00
Use an AssemblyAnnotatorWriter to clean up IVUsers' debug output.
The "uses=" comments are just clutter in this context. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95799 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7a5666e7f3
commit
4207d6af5e
@ -21,6 +21,7 @@
|
|||||||
#include "llvm/Analysis/Dominators.h"
|
#include "llvm/Analysis/Dominators.h"
|
||||||
#include "llvm/Analysis/LoopPass.h"
|
#include "llvm/Analysis/LoopPass.h"
|
||||||
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
|
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
|
||||||
|
#include "llvm/Assembly/AsmAnnotationWriter.h"
|
||||||
#include "llvm/ADT/STLExtras.h"
|
#include "llvm/ADT/STLExtras.h"
|
||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
@ -340,6 +341,13 @@ const SCEV *IVUsers::getCanonicalExpr(const IVStrideUse &U) const {
|
|||||||
return RetVal;
|
return RetVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
// Suppress extraneous comments.
|
||||||
|
class IVUsersAsmAnnotator : public AssemblyAnnotationWriter {};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void IVUsers::print(raw_ostream &OS, const Module *M) const {
|
void IVUsers::print(raw_ostream &OS, const Module *M) const {
|
||||||
OS << "IV Users for loop ";
|
OS << "IV Users for loop ";
|
||||||
WriteAsOperand(OS, L->getHeader(), false);
|
WriteAsOperand(OS, L->getHeader(), false);
|
||||||
@ -349,6 +357,7 @@ void IVUsers::print(raw_ostream &OS, const Module *M) const {
|
|||||||
}
|
}
|
||||||
OS << ":\n";
|
OS << ":\n";
|
||||||
|
|
||||||
|
IVUsersAsmAnnotator Annotator;
|
||||||
for (unsigned Stride = 0, e = StrideOrder.size(); Stride != e; ++Stride) {
|
for (unsigned Stride = 0, e = StrideOrder.size(); Stride != e; ++Stride) {
|
||||||
std::map<const SCEV *, IVUsersOfOneStride*>::const_iterator SI =
|
std::map<const SCEV *, IVUsersOfOneStride*>::const_iterator SI =
|
||||||
IVUsesByStride.find(StrideOrder[Stride]);
|
IVUsesByStride.find(StrideOrder[Stride]);
|
||||||
@ -364,7 +373,7 @@ void IVUsers::print(raw_ostream &OS, const Module *M) const {
|
|||||||
if (UI->isUseOfPostIncrementedValue())
|
if (UI->isUseOfPostIncrementedValue())
|
||||||
OS << " (post-inc)";
|
OS << " (post-inc)";
|
||||||
OS << " in ";
|
OS << " in ";
|
||||||
UI->getUser()->print(OS);
|
UI->getUser()->print(OS, &Annotator);
|
||||||
OS << '\n';
|
OS << '\n';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user