[PATCH] D34963: [AArch64][Falkor] Avoid HW prefetcher tag collisions (step 1)
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 16 10:35:09 PDT 2017
MatzeB added inline comments.
================
Comment at: llvm/trunk/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp:9-13
+// For Falkor, we want to avoid HW prefetcher instruction tag collisions that
+// may inhibit the HW prefetching. This is done in two steps. Before ISel, we
+// mark strided loads (i.e. those that will likely benefit from prefetching)
+// with metadata. Then, after opcodes have been finalized, we insert MOVs and
+// re-write loads to prevent unintnentional tag collisions.
----------------
Start with `/// \file` to have doxygen pick it up.
================
Comment at: llvm/trunk/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp:67-69
+ // FIXME: For some reason, preserving SE here breaks LSR (even if
+ // this pass changes nothing).
+ // AU.addPreserved<ScalarEvolutionWrapperPass>();
----------------
how strange...
================
Comment at: llvm/trunk/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp:110
+ for (Loop *I : LI)
+ for (auto L = df_begin(I), LE = df_end(I); L != LE; ++L)
+ MadeChange |= runOnLoop(*L);
----------------
no need for `auto`
================
Comment at: llvm/trunk/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp:116
+
+bool FalkorMarkStridedAccesses::runOnLoop(Loop *L) {
+ // Only mark strided loads in the inner-most loop
----------------
Could use a reference parameter as it cannot be nullptr.
================
Comment at: llvm/trunk/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp:123-124
+
+ for (const auto BB : L->blocks()) {
+ for (auto &I : *BB) {
+ LoadInst *LoadI = dyn_cast<LoadInst>(&I);
----------------
Would be nicer without `auto`.
Repository:
rL LLVM
https://reviews.llvm.org/D34963
More information about the llvm-commits
mailing list