[PATCH] D130278: [LAA] Handle forked pointers with add/sub instructions

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 14 03:34:59 PDT 2022


fhahn accepted this revision.
fhahn added a comment.

LGTM, thanks! Please format the diff with clang-format before committing.

It would probably be also good to add at least one test where the pointer bounds are expanded (e.g. with LV) and the ops require freezing.



================
Comment at: llvm/lib/Analysis/LoopAccessAnalysis.cpp:827
 
+  auto GetBinOpExpr = [&SE](unsigned Opcode, const SCEV* L, const SCEV* R) {
+    switch (Opcode) {
----------------
Are you planning to support additional bin-ops in the future here? Or could this be moved to the scope in the corresponding switch case?


================
Comment at: llvm/lib/Analysis/LoopAccessAnalysis.cpp:927
+      ScevList.push_back(std::make_pair(Scev, NeedsFreeze));
+      break;
+    }
----------------
Not directly related to this patch, but given that we return after the switch it might be simpler to follow if we would just return instead of break in the switch?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130278/new/

https://reviews.llvm.org/D130278



More information about the llvm-commits mailing list