[PATCH] D32742: [CodeGen] JumpMaps switch statement optimization (stub)

Witold Waligora via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 22 04:12:11 PDT 2017


wwa added a comment.

I suppose it could be done with JumpTable struct, given some additional data but I feel that it is much more clean and elegant with a separete one.
For instance, a target might need special lowering for JumpMaps but not JumpTables, so it could use TargetLowering::setOperationAction(ISD::JumpMap, Custom).
If JumpMaps and JumpTables are combined under a single ISD, then Target has to look into the struct to figure out how to handle it.

Having a separete ISD reuses the existing Lowering logic best.

In https://reviews.llvm.org/D32742#751541, @MatzeB wrote:

> I like the general idea of jumpmaps as detailed on the mailinglist.
>
> Can you motivate why this uses a new type of MachineOperand/ISDOpcode instead of somehow using just the existing JumpTable things?



https://reviews.llvm.org/D32742





More information about the llvm-commits mailing list