mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 19:56:06 +00:00
[LSR] Tweak debug output to always print initial cost
This commit is contained in:
parent
fb8f492a1c
commit
baca93fc83
@ -5251,8 +5251,6 @@ void LSRInstance::Solve(SmallVectorImpl<const Formula *> &Solution) const {
|
||||
assert(Solution.size() == Uses.size() && "Malformed solution!");
|
||||
|
||||
if (BaselineCost.isLess(SolutionCost)) {
|
||||
LLVM_DEBUG(dbgs() << "The baseline solution requires ";
|
||||
BaselineCost.print(dbgs()); dbgs() << "\n");
|
||||
if (!AllowDropSolutionIfLessProfitable)
|
||||
LLVM_DEBUG(
|
||||
dbgs() << "Baseline is more profitable than chosen solution, "
|
||||
@ -5931,6 +5929,8 @@ LSRInstance::LSRInstance(Loop *L, IVUsers &IU, ScalarEvolution &SE,
|
||||
|
||||
LLVM_DEBUG(dbgs() << "LSR found " << Uses.size() << " uses:\n";
|
||||
print_uses(dbgs()));
|
||||
LLVM_DEBUG(dbgs() << "The baseline solution requires ";
|
||||
BaselineCost.print(dbgs()); dbgs() << "\n");
|
||||
|
||||
// Now use the reuse data to generate a bunch of interesting ways
|
||||
// to formulate the values needed for the uses.
|
||||
|
@ -6,8 +6,8 @@ target datalayout = "e-m:e-p:64:64-i64:64-i128:128-n64-S128"
|
||||
target triple = "riscv64-unknown-linux-gnu"
|
||||
|
||||
define ptr @foo(ptr %a0, ptr %a1, i64 %a2) {
|
||||
;DEBUG: The chosen solution requires 3 instructions 6 regs, with addrec cost 1, plus 2 base adds, plus 5 setup cost
|
||||
;DEBUG: The baseline solution requires 2 instructions 4 regs, with addrec cost 2, plus 3 setup cost
|
||||
;DEBUG: The chosen solution requires 3 instructions 6 regs, with addrec cost 1, plus 2 base adds, plus 5 setup cost
|
||||
;DEBUG: Baseline is more profitable than chosen solution, dropping LSR solution.
|
||||
|
||||
;DEBUG2: Baseline is more profitable than chosen solution, add option 'lsr-drop-solution' to drop LSR solution.
|
||||
|
Loading…
x
Reference in New Issue
Block a user