[PATCH] D12345: [Reassociate]: Add intermediate subtract instructions created while negating to be redone later for more reassociate opportunities

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 29 07:53:02 PST 2015


mcrosier accepted this revision.
mcrosier added a reviewer: mcrosier.
mcrosier added a comment.
This revision is now accepted and ready to land.

LGTM once the minor nits have been fixed.


================
Comment at: lib/Transforms/Scalar/Reassociate.cpp:186
@@ -185,1 +185,3 @@
     void EraseInst(Instruction *I);
+    void RecursivelyEraseDeadInsts(Instruction *,
+                                   SetVector<AssertingVH<Instruction>> &);
----------------
To conform to the surrounding coding style, would you mind adding argument names?

================
Comment at: test/Transforms/Reassociate/factorize-again.ll:2
@@ +1,3 @@
+; RUN: opt -S -reassociate < %s | FileCheck %s
+; ModuleID = 'bugpoint-reduced-simplified.bc'
+
----------------
You can probably drop this comment.

================
Comment at: test/Transforms/Reassociate/factorize-again.ll:4
@@ +3,3 @@
+
+; CHECK: main
+; CHECK: %2 = fsub
----------------
Please use a CHECK-LABEL directive.

================
Comment at: test/Transforms/Reassociate/factorize-again.ll:27
@@ +26,3 @@
+
+; Function Attrs: argmemonly nounwind
+declare void @foo1(i32, float) #0
----------------
Drop comment

================
Comment at: test/Transforms/Reassociate/factorize-again.ll:28
@@ +27,3 @@
+; Function Attrs: argmemonly nounwind
+declare void @foo1(i32, float) #0
+
----------------
Remove dead "#0"


http://reviews.llvm.org/D12345





More information about the llvm-commits mailing list