[PATCH] D17518: [ifcnv] Don't duplicate blocks that contain convergent instructions.

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 14 12:16:14 PDT 2016


hfinkel added inline comments.

================
Comment at: lib/CodeGen/IfConversion.cpp:691
@@ +690,3 @@
+    // it's safe if the set of control flows that leads us to the convergent
+    // instr does not get smaller after the transformation.
+    //
----------------
instr -> instruction

================
Comment at: lib/CodeGen/IfConversion.cpp:693
@@ +692,3 @@
+    //
+    // Assuming BB1 switches on "cond", originally we got to TBB if
+    //
----------------
I understand (I think) what you're saying here, but everything from here down seems confusing. I think this is because 'cond' is not in the diagram. I think you can either:

 1. Put 'cond' in the diagram, and then say that you've gone from having no control dependencies on the convergent instruction to have a control dependency on 'cond' or '!cond' depending on into which block the instruction is duplicated.

 2. If I'm reading this correctly and BB1 and BB2 below indicate the control dependencies of their respective blocks, then you can do the same as above, but say that you've gone from having no relevant control dependencies to have a dependency 'BB1' or 'BB2'.

Feel free to tell me I'm missing something ;)



http://reviews.llvm.org/D17518





More information about the llvm-commits mailing list