[PATCH] D12886: Clean up: Refactoring the hardcoded value of 6 for FindAvailableLoadedValue()'s parameter MaxInstsToScan.

Larisse Voufo via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 15 17:12:23 PDT 2015


lvoufo added inline comments.

================
Comment at: include/llvm/Analysis/Loads.h:41-43
@@ +40,5 @@
+/// value of '6'.
+#ifndef DEF_MAX_INSTS_TO_SCAN
+#define DEF_MAX_INSTS_TO_SCAN 6
+#endif
+
----------------
Okay. Will do.

================
Comment at: include/llvm/Analysis/Loads.h:64
@@ -50,3 +63,3 @@
                                 BasicBlock::iterator &ScanFrom,
-                                unsigned MaxInstsToScan = 6,
+                                unsigned MaxInstsToScan = DEF_MAX_INSTS_TO_SCAN,
                                 AliasAnalysis *AA = nullptr,
----------------
Not sure. DEF_MAX_INSTS_TO_SCAN was simply meant to highlight the very fact that the same value is reused everywhere anyway.


http://reviews.llvm.org/D12886





More information about the llvm-commits mailing list