[PATCH] D13297: [CGP] transform select instructions into branches and sink expensive operands

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 8 09:37:52 PDT 2015


spatel marked 6 inline comments as done.

================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:3973
@@ +3972,3 @@
+
+  // If we did not create a new block for one of the 'true' or 'false' paths
+  // of the condition, it means that path actually originates from the start
----------------
reames wrote:
> I think that if you start the true and false blocks as being StartBlock you can simplify away this code entirely?
We can't do that because we want to use these as the labels for the branch, so they have to start off pointing to the EndBlock. This is more confusing that it needs to be. I'll just init these to nullptr instead, and then we'll change them as needed and create the branch at the same time. It's a couple of extra lines of code, but easier to follow IMO.


http://reviews.llvm.org/D13297





More information about the llvm-commits mailing list