diff options
author | Geoff Berry <gberry@codeaurora.org> | 2017-07-17 20:19:05 +0000 |
---|---|---|
committer | Geoff Berry <gberry@codeaurora.org> | 2017-07-17 20:19:05 +0000 |
commit | 0cf9e702bf813a571b54d5c35b793b14a66006fc (patch) | |
tree | 446464d0af8b4b96bf4c790590c01ab0ff885f2f /llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp | |
parent | 455ba3fd796e5c1c4ba845d459259a59d8b573e8 (diff) | |
download | bcm5719-llvm-0cf9e702bf813a571b54d5c35b793b14a66006fc.tar.gz bcm5719-llvm-0cf9e702bf813a571b54d5c35b793b14a66006fc.zip |
[AArch64][Falkor] Address some stylistic review comments. NFC.
llvm-svn: 308211
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp')
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp b/llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp index f0bdc0292ac..eadd490a293 100644 --- a/llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp +++ b/llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp @@ -6,12 +6,12 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// -// 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. -// ===----------------------------------------------------------------------===// +/// \file 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. +// ===---------------------------------------------------------------------===// #include "AArch64.h" #include "AArch64InstrInfo.h" @@ -44,7 +44,7 @@ public: bool run(); private: - bool runOnLoop(Loop *L); + bool runOnLoop(Loop &L); LoopInfo &LI; ScalarEvolution &SE; @@ -106,28 +106,28 @@ bool FalkorMarkStridedAccessesLegacy::runOnFunction(Function &F) { bool FalkorMarkStridedAccesses::run() { bool MadeChange = false; - for (Loop *I : LI) - for (auto L = df_begin(I), LE = df_end(I); L != LE; ++L) - MadeChange |= runOnLoop(*L); + for (Loop *L : LI) + for (auto LIt = df_begin(L), LE = df_end(L); LIt != LE; ++LIt) + MadeChange |= runOnLoop(**LIt); return MadeChange; } -bool FalkorMarkStridedAccesses::runOnLoop(Loop *L) { +bool FalkorMarkStridedAccesses::runOnLoop(Loop &L) { // Only mark strided loads in the inner-most loop - if (!L->empty()) + if (!L.empty()) return false; bool MadeChange = false; - for (const auto BB : L->blocks()) { - for (auto &I : *BB) { + for (BasicBlock *BB : L.blocks()) { + for (Instruction &I : *BB) { LoadInst *LoadI = dyn_cast<LoadInst>(&I); if (!LoadI) continue; Value *PtrValue = LoadI->getPointerOperand(); - if (L->isLoopInvariant(PtrValue)) + if (L.isLoopInvariant(PtrValue)) continue; const SCEV *LSCEV = SE.getSCEV(PtrValue); |