[llvm] r240394 - Revert r240302 ("Bring r240130 back.").

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Jun 23 18:52:14 PDT 2015


On 23 June 2015 at 16:49, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:
> Thanks!
>
> With asserts this reduces to
>
> define void @fj()  {
>   call void asm "bsr $0,%eax", "o"(i32 1)
>   ret void
> }
>
> crashing llc.

Gosh, that is horrible.

The way inline asm is implemented is

* We kept most of the old (pre-MC) assembly printer around.
* We use it to print/expand inline asm to a string.
* We parse that string.

So anything that can show up in inline asm needs a name by which we
can find it again.

I think the way to fix this is to directly transition from the inline
asm pattern "bsr $0,%eax" to a MCInst with an operand pointing to
whatever we created for $0. That will let us nuke the old printer and
save memory by not creating names just in case they are used in inline
asm.

That, unfortunately, is quite a bit more work than I can do at the moment.

Cheers,
Rafael




More information about the llvm-commits mailing list