[PATCH] D27830: Preserve loop metadata when folding branches to a common destination

Dehao Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 15 16:20:16 PST 2016


danielcdh added a comment.

Thanks for the clarification and Thanks Florian for the pointer to the doc.

The patch LGTM, but I think Hal would be more qualified than I do to approve this.

Optional: while you are at it, it'll be very useful to handle the MD_prof here for branch probability. (e.g. when PBI has no MD_prof while BI has, or like the case described in TODO comment).

Thanks,
Dehao



================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:2795
 
+    // If BI was a loop latch, PBI is the new latch. If we have
+    // loop metadata, copy it over.
----------------
Maybe make it explicit in the comment that "BI was a loop latch" means "BI has MD_loop" Metadata.


https://reviews.llvm.org/D27830





More information about the llvm-commits mailing list