[PATCH] D20276: [MBP] Reduce code size by running tail merging in MBP

Haicheng Wu via llvm-commits llvm-commits at lists.llvm.org
Mon May 23 14:09:55 PDT 2016


haicheng added a comment.

Post Escha's comment.


================
Comment at: lib/CodeGen/MachineBlockPlacement.cpp:1479
@@ +1478,3 @@
+  // TailMerge can create jump into if branches that make CFG irreducible for
+  // HW that requires structurized CFG.
+  bool EnableTailMerge = !F.getTarget().requiresStructuredCFG() &&
----------------
sunfish wrote:
> haicheng wrote:
> > majnemer wrote:
> > > deadalnix wrote:
> > > > Out of curiosity, do you have example of hardware doing this ?
> > > WebAssembly IIRC.
> > I know old AMD GPU had this requirement.  Its IL has instructions like "if_xxx" and "endif".
> WebAssembly has flexible control flow and is ok with tail merging and most other optimizations, so we're no longer using the requiresStructuredCFG() hook.
Ours has that requirement. We don’t generally allow any CFG modification after structurization, which takes place in the pre-ISel phase. Generic block placement is fine though.

—escha



Repository:
  rL LLVM

http://reviews.llvm.org/D20276





More information about the llvm-commits mailing list