[PATCH] D17728: TableGen: Add hasNoSchedulingInfo flag to instructions

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 29 16:47:54 PST 2016


MatzeB added a comment.

In http://reviews.llvm.org/D17728#364714, @atrick wrote:

> I had the same idea when adding the "Unsupported" flag to the ProcWriteResources template. It emits  InvalidNumMicroOps, so you can use the API SchedModel.getSchedClassDesc(SchedClassIdx).isValid().
>
> The idea was that some subtargets support only a subset of the ISA.
>
> Do we really need to add a scheduling specific flag to tablegen Instruction class too?


The problem with Unsupproted is that it forces us to list the unsupported instructions in each scheduling model again. We've got a bunch of generic instructions which we will never even encounter when the scheduler is running (e.g. PHI, EXTRACT_SUBREG, INSERT_SUBREG, STACKMAP) or for which we deliberately do not want to create scheduling info because they will not result in machine instructions (DBG_VALUE, IMPLICIT_DEF, KILL, LIFETIME_START, LIFETIME_END).
None of the existing instruction flags appears to match exactly these cases, (the closes existing thing is isPseudo and isCodeGenOnly, but both have examples where we still want scheduling information; e.g. COPY has isPseudo and isCodeGenOnly set but we still want scheduling information for it.

After our discussion I thought about introducing a new flag for instructions that do not result in machine instructions after all, but this won't catch this case either, because for example EXTRACT_SUBREG, INSERT_SUBREG do actually result in machine instruction but we still don't want to ever include them into the scheduling model because they are lowered early enough.

So is it okay to add this flag is specifically about the instruction being included in the scheduling model?


Repository:
  rL LLVM

http://reviews.llvm.org/D17728





More information about the llvm-commits mailing list