mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-09 01:38:03 +00:00
[IRCE] Add a -irce-print-range-checks option.
-irce-print-range-checks prints out the set of range checks recognized by IRCE. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232451 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ed1d6bdfbd
commit
71bd86378b
@ -82,6 +82,9 @@ static cl::opt<unsigned> LoopSizeCutoff("irce-loop-size-cutoff", cl::Hidden,
|
||||
static cl::opt<bool> PrintChangedLoops("irce-print-changed-loops", cl::Hidden,
|
||||
cl::init(false));
|
||||
|
||||
static cl::opt<bool> PrintRangeChecks("irce-print-range-checks", cl::Hidden,
|
||||
cl::init(false));
|
||||
|
||||
static cl::opt<int> MaxExitProbReciprocal("irce-max-exit-prob-reciprocal",
|
||||
cl::Hidden, cl::init(10));
|
||||
|
||||
@ -1392,12 +1395,18 @@ bool InductiveRangeCheckElimination::runOnLoop(Loop *L, LPPassManager &LPM) {
|
||||
if (RangeChecks.empty())
|
||||
return false;
|
||||
|
||||
DEBUG(dbgs() << "irce: looking at loop "; L->print(dbgs());
|
||||
dbgs() << "irce: loop has " << RangeChecks.size()
|
||||
<< " inductive range checks: \n";
|
||||
for (InductiveRangeCheck *IRC : RangeChecks)
|
||||
IRC->print(dbgs());
|
||||
);
|
||||
auto PrintRecognizedRangeChecks = [&](raw_ostream &OS) {
|
||||
OS << "irce: looking at loop "; L->print(OS);
|
||||
OS << "irce: loop has " << RangeChecks.size()
|
||||
<< " inductive range checks: \n";
|
||||
for (InductiveRangeCheck *IRC : RangeChecks)
|
||||
IRC->print(OS);
|
||||
};
|
||||
|
||||
DEBUG(PrintRecognizedRangeChecks(dbgs()));
|
||||
|
||||
if (PrintRangeChecks)
|
||||
PrintRecognizedRangeChecks(errs());
|
||||
|
||||
const char *FailureReason = nullptr;
|
||||
Optional<LoopStructure> MaybeLoopStructure =
|
||||
|
Loading…
x
Reference in New Issue
Block a user