[llvm] r276481 - GlobalISel: allow multiple types on MachineInstrs.

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 25 09:37:29 PDT 2016


On 22 Jul 2016, at 16:47, Quentin Colombet <qcolombet at apple.com> wrote:
>> +void MachineInstr::setType(LLT Ty, unsigned Idx) {
> 
> Shouldn’t we change the APIs to use const LLT& since it is probably not that cheap to copy it around anymore?

Each instance is still only 64 bits. I'm hoping that'll never change.

>> +; CHECK-NEXT: [[RES:%[0-9]+]](64) = G_ADD { s64 } [[ARG1]], [[ARG2]]
> 
> Could we avoid the {} when there is only one type?

I dithered on that, but went for uniformity rather than brevity. Other colours are:

   %0 = G_EXTRACT { s32, s64 } %1, %2, 0, 64
   %0 = G_EXTRACT s32 s64 %1, %2, 0, 64
   %0 = G_EXTRACT s32, s64, %1, %2, 0, 64

Unless anyone has other strong opinions I'll remove the braces from a single type as you suggested later today.

Tim.


More information about the llvm-commits mailing list