[PATCH] D76066: [ARM][MachineOutliner] Add Machine Outliner support for ARM

Yvan Roux via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 9 04:50:46 PDT 2020


yroux added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMTargetMachine.cpp:553
   addPass(createARMConstantIslandPass());
-  addPass(createARMLowOverheadLoopsPass());
+  if (!MachineOutlinerEnabled)
+    addPass(createARMLowOverheadLoopsPass());
----------------
samparker wrote:
> yroux wrote:
> > samparker wrote:
> > > We'll need the LowOverheadLoops pass to run for correctness, so we should instead only add the MachineOutliner if the subtarget doesn't support LOB.
> > What do you mean by "for correctness" ?
> > 
> > I think that it makes more sense that until MachineOutliner and LowOverheadLoops can work together, we have loloops enabled on targets which have LOB support unless it is explicitly disabled by -disable-arm-loloops flag or if the user wants machine outlining with the flag -moutline.   If we do that in the opposite way it means that passing the flag -moutline will have no impact on such targets unless the -disable-arm-loloops flag is used
> > 
> Ok. Well, the HardwareLoops pass inserts intrinsics, which are lowered to pseudos and then finalised by ARMLowOverheadLoops so the compiler could crash with this logic. TTI controls whether we generate a low-overhead loop and it also controls whether the vectorizer tries to optimise for those loops too... So, I think TTI will need to understand when we're trying to use the outliner too.
Ah Ok thanks, I'll try to find how to add that info into TTI


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76066





More information about the cfe-commits mailing list