[PATCH] D82293: [CodeMoverUtils][WIP] Move code motion related checks from LICM to CodeMoverUtils

rithik sharma via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 22 06:25:06 PDT 2020


RithikSharma created this revision.
RithikSharma added reviewers: Whitney, etiotto, bmahjour.
RithikSharma added a project: LLVM.
Herald added subscribers: llvm-commits, asbirlea, jfb, hiraditya.
RithikSharma updated this revision to Diff 272400.
RithikSharma added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LICM.cpp:263
   LoopInvariantCodeMotion LICM(LicmMssaOptCap, LicmMssaNoAccForPromotionCap);
   if (!LICM.runOnLoop(&L, &AR.AA, &AR.LI, &AR.DT, &AR.TLI, &AR.TTI, &AR.SE,
+                      AR.MSSA, &ORE, &AR.PDT, &AR.DI))
----------------
@Whitney I'm not sure is it okay to do all these deep changes but they all exist because this LICM invocation requires analysis from AnalysisResult. I request your comment on this. 


This patch is a part of attempt to standardize code motion checks into one place. LoopFuse already uses CodeMoverUtils. This is a work in progress until we move all generic code motion checks into CodeMoverUtils. We started with moving less aggressive checks from LICM to CodeMoverUtils which can also be used by other code motion clients. Presently it is not apt for landing, the aim is to get more reviews and exhibit transparency.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D82293

Files:
  llvm/include/llvm/Analysis/LoopAnalysisManager.h
  llvm/include/llvm/Transforms/Scalar/LoopPassManager.h
  llvm/include/llvm/Transforms/Utils/CodeMoverUtils.h
  llvm/include/llvm/Transforms/Utils/LoopUtils.h
  llvm/lib/Transforms/Scalar/LICM.cpp
  llvm/lib/Transforms/Scalar/LoopDistribute.cpp
  llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp
  llvm/lib/Transforms/Utils/CodeMoverUtils.cpp
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82293.272400.patch
Type: text/x-patch
Size: 37078 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200622/44da4dcd/attachment-0001.bin>


More information about the llvm-commits mailing list