[PATCH] D138333: [CHR] Add a threshold for the code duplication

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 18 15:24:21 PST 2022


davidxl added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp:358
+                            IRBuilder<> &IRB, Value *&MergedCondition);
+  unsigned getRegionDuplicationCount(const Region *R) {
+    unsigned Count = 0;
----------------
add comment


================
Comment at: llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp:389
   DenseSet<CHRScope *> Scopes;
+  DenseMap<const Region *, unsigned> DuplicationCount;
 };
----------------
add comment to the member.


================
Comment at: llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp:1681
+
+  for (RegInfo &RI : Scope->RegInfos) {
+    const Region *R = RI.R;
----------------
 is there a need to track all regions in the scope? They seem to have the same dup factor ?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138333/new/

https://reviews.llvm.org/D138333



More information about the llvm-commits mailing list