From dcf2a9f2ee3a730d603d69f9fbc96fdd64a744ca Mon Sep 17 00:00:00 2001 From: Kirill Naumov Date: Wed, 17 Jun 2020 14:02:29 +0000 Subject: [PATCH] Revert "[InlineCost] PrinterPass prints constants to which instructions are simplified" This reverts commit 52b0db22f8cfb594c32389224570681d2d2c2f21. --- llvm/lib/Analysis/InlineCost.cpp | 13 +------------ llvm/test/Transforms/Inline/simplified_to.ll | 15 --------------- 2 files changed, 1 insertion(+), 27 deletions(-) delete mode 100644 llvm/test/Transforms/Inline/simplified_to.ll diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp index 0afc88d71863..fd4e7c765e51 100644 --- a/llvm/lib/Analysis/InlineCost.cpp +++ b/llvm/lib/Analysis/InlineCost.cpp @@ -402,12 +402,6 @@ public: InlineResult analyze(); - Optional 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(I)); - if (C) { - OS << ", simplified to "; - C.getValue()->print(OS, true); - } OS << "\n"; } @@ -2556,4 +2545,4 @@ InlineCostAnnotationPrinterPass::run(Function &F, } } return PreservedAnalyses::all(); -} +} \ No newline at end of file diff --git a/llvm/test/Transforms/Inline/simplified_to.ll b/llvm/test/Transforms/Inline/simplified_to.ll deleted file mode 100644 index 92c84b586800..000000000000 --- a/llvm/test/Transforms/Inline/simplified_to.ll +++ /dev/null @@ -1,15 +0,0 @@ -; RUN: opt < %s -passes="print" 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 -}