[llvm-dev] Support for out-of-tree backend passes?

William Woodruff via llvm-dev llvm-dev at lists.llvm.org
Mon Mar 4 18:01:33 PST 2019


On Mon, Mar 04, 2019 at 05:26:16PM -0500, Nemanja Ivanovic wrote:
>    Don't forget that the back end lowers LLVM IR to
>    SDAG, then the SDAG is selected, converted into SSA MIR, then RA and
>    rewriting happens to take it out of SSA and finally it lowers to the MC
>    layer. It would be ambiguous to invoke  llc -my-pass unless we are
>    restricting the passes to IR->IR ones, restricting it to
>    pre-codegenprep and generally imposing the same requirements on the
>    passes as exist in the middle end.

Excellent points. My use case does indeed involve just IR->IR,
but there's not much point in exposing the back-end if more
diverse cases don't benefit from it.

In the mean time, I've been successfully implementing what I want
with a combination of a middle-end pass for metadata and an in-tree
back-end pass for analysis. Thanks to all for answering my questions!

William

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190304/c416a651/attachment.sig>


More information about the llvm-dev mailing list