[PATCH] D92385: [ARM] Add a pass that re-arranges blocks when there is a backwards WLS branch

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 15 00:52:15 PST 2020


dmgreen added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARM.h:63
 
 void initializeARMParallelDSPPass(PassRegistry &);
 void initializeARMLoadStoreOptPass(PassRegistry &);
----------------
samtebbs wrote:
> dmgreen wrote:
> > Add one of these for the new pass, and call it in LLVMInitializeARMTarget.
> What is this needed for? It works as-is.
It's for when the pass has dependencies upon other passes. My understanding is that If this pass needs to know about things like MachineLoop or dominator trees (which is likely in the long run), it will need to have an initialize method that gets called in the right places.


================
Comment at: llvm/lib/Target/ARM/ARMBlockPlacement.cpp:36
+
+static RegisterPass<ARMBlockPlacement> X(DEBUG_TYPE, "ARM block placement",
+                                         false, false);
----------------
samtebbs wrote:
> dmgreen wrote:
> > I've not seen many things use RegisterPass before. Can this use the `INITIALIZE_PASS` like most other passes do?
> The skeleton I followed is for the new pass manager.
RegisterPass doesn't seem to be the new pass manager (and the backend does not support the new pass manager yet). It seems very old and isn't used in a lot of other places.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92385



More information about the llvm-commits mailing list