Revert "[InlineCost] PrinterPass prints constants to which instructions are simplified"

This reverts commit 52b0db22f8.
This commit is contained in:
Kirill Naumov
2020-06-17 14:02:29 +00:00
parent 39a4505e34
commit dcf2a9f2ee
2 changed files with 1 additions and 27 deletions
+1 -12
View File
@@ -402,12 +402,6 @@ public:
InlineResult analyze();
Optional<Constant*> getSimplifiedValue(Instruction *I) {
if (SimplifiedValues.find(I) != SimplifiedValues.end())
return SimplifiedValues[I];
return None;
}
// Keep a bunch of stats about the cost savings found so we can print them
// out when debugging.
unsigned NumConstantArgs = 0;
@@ -772,11 +766,6 @@ void InlineCostAnnotationWriter::emitInstructionAnnot(const Instruction *I,
if (Record->hasThresholdChanged())
OS << ", threshold delta = " << Record->getThresholdDelta();
}
auto C = ICCA->getSimplifiedValue(const_cast<Instruction *>(I));
if (C) {
OS << ", simplified to ";
C.getValue()->print(OS, true);
}
OS << "\n";
}
@@ -2556,4 +2545,4 @@ InlineCostAnnotationPrinterPass::run(Function &F,
}
}
return PreservedAnalyses::all();
}
}
@@ -1,15 +0,0 @@
; RUN: opt < %s -passes="print<inline-cost>" 2>&1 | FileCheck %s
; CHECK-LABEL: @test()
; CHECK: cost before = {{.*}}, cost after = {{.*}}, threshold before = {{.*}}, threshold after = {{.*}}, cost delta = {{.*}}, simplified to i1 false
; CHECK: %1 = icmp eq i32 4, 5
define i32 @test() {
%1 = icmp eq i32 4, 5
ret i32 0
}
define void @main() {
%1 = call i32 @test()
ret void
}