[PATCH] D34533: [AArch64][Falkor] Try to avoid exhausting HW prefetcher resources when unrolling.

Chad Rosier via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 23 14:13:22 PDT 2017


mcrosier added a comment.

LGTM, with minor nits.  Feel free to wait for additional feedback on the coding style, if you prefer.



================
Comment at: lib/Target/AArch64/AArch64TargetTransformInfo.cpp:24
+static cl::opt<bool>
+    DisableFalkorHWPFUnrollFix("disable-falkor-hwpf-unroll-fix",
+                               cl::init(false), cl::Hidden);
----------------
grumble:  I wish the coding guidelines would choose a preference for either Disable/cl::init(false) or Enable/cl::init(true) for features controlled by command line options.  I feel like the latter is more readable and occurs more frequently in the code base, but that might just be my opinion.  Change if you agree, but don't feel obligated.


================
Comment at: lib/Target/AArch64/AArch64TargetTransformInfo.cpp:658
+      !DisableFalkorHWPFUnrollFix) {
+    const int MaxStridedLoads = 7;
+    auto countStridedLoads = [](Loop *L, ScalarEvolution &SE) {
----------------
I suggest we refactor this into a helper function, so it's easier to delineate the Falkor specific logic.


https://reviews.llvm.org/D34533





More information about the llvm-commits mailing list