[PATCH] D21449: Target independent codesize heuristics for Loop Idiom Recognition

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 20 07:54:54 PDT 2016


mcrosier added inline comments.

================
Comment at: test/Transforms/LoopIdiom/lir-heurs-multi-block-loop.ll:1
@@ +1,2 @@
+; RUN: opt -Os -basicaa -loop-idiom -use-lir-code-size-heurs=true < %s -S | FileCheck %s
+
----------------
You shouldn't pass '-Os' (or an -O option for that matter) on the command line of a lit test.  That invokes the entire pass pipeline, but we only want to tests your LIR changes.

If you start from a C input you might consider dumping the IR just before the LIR pass is run by either 1) using the -mllvm -print-after-all option or 2) hack a call to dump the module in the runOnLoop function in LIR.  The important part is that the IR be in a state similar to what would be seen in the full pipeline and that it has been reduced enough to show exactly what LIR is trying to optimize.

================
Comment at: test/Transforms/LoopIdiom/lir-heurs-multi-block-loop.ll:15
@@ +14,3 @@
+; CHECK: memset
+;
+define void @LoopMemset([2048 x i8]* noalias nocapture %D, i32 %N) optsize {
----------------
I applied you patch, ran this lit test and it fails.  The input IR and the output IR after running the command line was unchanged.


https://reviews.llvm.org/D21449





More information about the llvm-commits mailing list