[patch] opt: Initialize asm printers to avoid DCE

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue May 20 14:57:42 PDT 2014


> Right. This could probably be "fixed" but it seems the improvements in terms
> of code size are rather small.
>
>
>> What is the plugin doing with the asm printer? Could it plugin in llc?
>
>
> It is a LLVM-IR optimizer that extracts parts of the LLVM IR, translates
> them to PTX, stores the PTX in a global variable and generates calls to the
> CUDA run-time to load and run this code instead of the original code.
>
> Do you think it would be better to immediately restructure opt's linking to
> not link the asm printers? I looked into this briefly, but it seems to be a
> larger refactoring that adds a lot of complexity.

I am honestly not sure. There were some discussions about what should
be in opt or in llc in the future. I remember proposals ranging from
opt not linking to CodeGen to just merging the two. I don't have a
strong opinion on the direction, but it would be nice to know that
this patch is pointing the right way.

Chandler, do you know what the current consensus is?

Cheers,
Rafael



More information about the llvm-commits mailing list