[PATCH] D20307: Follow-up patch of http://reviews.llvm.org/D19948 to handle missing profiles when simplifying CFG.

David Li via llvm-commits llvm-commits at lists.llvm.org
Wed May 18 11:23:21 PDT 2016


davidxl added inline comments.

================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:2256
@@ -2255,3 +2255,3 @@
       uint64_t PredTrueWeight, PredFalseWeight, SuccTrueWeight, SuccFalseWeight;
       bool PredHasWeights =
           PBI->extractProfMetadata(PredTrueWeight, PredFalseWeight);
----------------
Can you refactor the code into a helper function:

extractPredSuccWeights that returns true if either Pred or Succ has weights?


http://reviews.llvm.org/D20307





More information about the llvm-commits mailing list