[PATCH] D81403: [IndirectThunks] Make generated MF structure as expected by all instruction selectors.

Kristof Beyls via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 17 07:31:34 PDT 2020


kristof.beyls added a comment.

In D81403#2097148 <https://reviews.llvm.org/D81403#2097148>, @zbrid wrote:

> LGTM
>
> Could you explain how not adding the MBB entry block is different from removing extra MBB later? Curious on the details about the differences here since the change makes sense functionally and I don't see any issues, but I can't understand why adding the extra MBB entry block at the point we create the machine function and then deleting extra blocks results in something different than the automatically created entry block. Is it some attributes or configuration in the basic block or something?


This was triggering the following assert in GlobalISel:
https://github.com/llvm/llvm-project/blob/master/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp#L2495

The X86 target does not use globalisel by default, but the AArch64 target does use it by default at -O0. So now that IndirectThunks is used by AArch64 also, that has become a blocker.
Globalisel runs between the place where the MBB entry block was added and the block was removed later.
Apart from this assert blocking the compilation flow, I wouldn't expect code generation to be different.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81403/new/

https://reviews.llvm.org/D81403





More information about the llvm-commits mailing list