[PATCH] D19338: New code hoisting pass based on GVN (optimistic approach)

Brendon Cahoon via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 08:38:22 PDT 2016


bcahoon added a subscriber: bcahoon.
bcahoon added a comment.

I tried this patch on our Hexagon compiler to see what impact the pass had on some of our performance benchmarks (mostly embedded programs). The biggest improvement was 1.5% and the biggest degradation was -1.8% (in spec2K/twolf). Most differences were under 1%.  Many benchmarks were unchanged.  I didn't look at code size though.

Also, I did see one test failure due to infinite recursion caused by some odd looking IR as input to the pass.   The odd IR is generated by the jump threading pass.

  for.cond:                                         ; preds = %for.cond
    %inc113 = add nsw i32 %inc113, 1
    br label %for.cond



> opt -gvn-hoist -S < gvn-bug.ll


F1841067: gvn-bug.ll <http://reviews.llvm.org/F1841067>


================
Comment at: llvm/lib/Transforms/Scalar/GVNHoist.cpp:66
@@ +65,3 @@
+  LoopInfo *LI;
+  static char ID;
+
----------------
ID isn't used anywhere.


http://reviews.llvm.org/D19338





More information about the llvm-commits mailing list