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

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 21 14:14:51 PST 2022


davidxl added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp:1681
+
+  for (RegInfo &RI : Scope->RegInfos) {
+    const Region *R = RI.R;
----------------
xur wrote:
> davidxl wrote:
> >  is there a need to track all regions in the scope? They seem to have the same dup factor ?
> The regions in the scope do have the same dup factor. The reason we need a dup factor for each region is that we will accumulate the dup factor for the nested regions (in new function of getRegionDuplicationCount). In addition, most of the scopes has a single region. 
Can we just count the number of nested regions and multiply it with the 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