[PATCH] D54189: [HotColdSplitting] Ensure PHIs have unique incoming values

Aditya Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 6 17:03:37 PST 2018


hiraditya added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/HotColdSplitting.cpp:401
+    // dominated by the sink block.
+    auto updatePHIFrontier = [&](BasicBlock &BB) -> bool {
+      // Make sure that each successor of BB in the frontier has a unique
----------------
Can we outline this function to have better readability?


================
Comment at: llvm/lib/Transforms/IPO/HotColdSplitting.cpp:411
+          // Ignore successor PHIs without an incoming value from BB.
+          int BBIndex = SuccPhi.getBasicBlockIndex(&BB);
+          if (BBIndex == -1)
----------------
When can we have a case where PHI does not have incoming value from immediate predecessor?


https://reviews.llvm.org/D54189





More information about the llvm-commits mailing list