[PATCH] D19132: AMDGPU: Correct reported code size

Valery Pykhtin via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 28 09:24:17 PDT 2016


vpykhtin added a comment.

In http://reviews.llvm.org/D19132#401815, @arsenm wrote:

> In http://reviews.llvm.org/D19132#401791, @vpykhtin wrote:
>
> > Why not to consider 4 byte instructions as having potentially larger size and keep current encoding sizes?
>
>
> It's supposed to be 0 if it can't be determined just from the opcode:
>
>   // Size - Size of encoded instruction, or zero if the size cannot be determined
>   // from the opcode.
>   int Size = 0;


It turns out when Size==0 no decoding code is generated for an instruction at all. See FixedLenDecoderEmitter.cpp, line 2276. The comment above probably assumes custom decoder should be used but this is an overkill in this situation. I think we should left current sizes and fix computed len somehow differently.


http://reviews.llvm.org/D19132





More information about the llvm-commits mailing list