[PATCH] D12494: New IR pass: LoopExitValues

Michael Zolotukhin via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 19:20:28 PDT 2015


mzolotukhin added a comment.

Hi Steve,

I wonder if it might be related to PR24920 (and http://reviews.llvm.org/D12765). Out of curiosity, could you check what happens in your testcase with the patch from there applied?
Also, some comments inline:

Thanks,
Michael


================
Comment at: lib/Transforms/Scalar/LoopExitValues.cpp:32
@@ +31,3 @@
+
+/// If any of the instructions is the specified set are trivially dead, delete
+/// them and see if this makes any of their operands subsequently dead.
----------------
s/is/in/

================
Comment at: lib/Transforms/Scalar/LoopExitValues.cpp:135
@@ +134,3 @@
+
+  // Find similar values
+  bool Changed = false;
----------------
This resembles what SCEVExpander does (particularly, `findExistingExpansion` function). Would it be possible/beneficial to just reuse it here somehow?

================
Comment at: test/Transforms/LoopExitValues/matrix_mul.ll:1-2
@@ +1,3 @@
+; RUN: llc %s -print-lsr-output -print-loop-exit-values-output -o /dev/null 2>&1 | FileCheck %s
+
+target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
----------------
It probably needs `; REQUIRES: Asserts`


Repository:
  rL LLVM

http://reviews.llvm.org/D12494





More information about the llvm-commits mailing list