[PATCH] D29153: [BranchFolding] Tail common all identical unreachable blocks

Kyle Butt via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 30 15:39:12 PST 2017


iteratee added inline comments.


================
Comment at: lib/CodeGen/BranchFolding.cpp:521
+static bool blockEndsInUnreachable(const MachineBasicBlock *MBB) {
+  return MBB->succ_empty() && !MBB->isReturnBlock();
+}
----------------
rnk wrote:
> iteratee wrote:
> > Unforturnately there are platforms where this isn't sufficient. I believe ARM is one of them.
> For all the ARM examples I constructed, isReturnBlock appeared to be accurate.
OK, I have data.

isReturnBlock is currently insufficient for Thumb (That's why I thought ARM), Hexagon, Mips and XCore.
Arguably, this should go in anyway and those platforms should be fixed.

Funnily enough, this could cause switching away from Thumb to reduce code size.


https://reviews.llvm.org/D29153





More information about the llvm-commits mailing list