[llvm-dev] Backend Plugins?

Friedman, Eli via llvm-dev llvm-dev at lists.llvm.org
Thu May 17 12:31:02 PDT 2018


On 5/17/2018 12:22 PM, Kenneth Adam Miller wrote:
>
> On Thu, May 17, 2018 at 3:09 PM, Friedman, Eli 
> <efriedma at codeaurora.org <mailto:efriedma at codeaurora.org>> wrote:
>
>     On 5/17/2018 10:10 AM, Kenneth Adam Miller via llvm-dev wrote:
>
>         Hello,
>
>
>         I've looked around in the documentation, and I can't see
>         anywhere where there is a backend plugin capability for LLVM.
>         I'd like to be able to get the output of the instruction
>         selector along with the LLVM IR, or perhaps instrument that.
>
>
>         Is there any capability to have a backend plugin in LLVM at all?
>
>
>     It sounds like you want to write a MachineFunctionPass as a
>     plugin, and run it in the middle of the pass pipeline of an
>     existing backend?  No, there isn't any support for that;
>     RegisterStandardPasses only works on IR.
>
>     -Eli
>
>     -- 
>     Employee of Qualcomm Innovation Center, Inc.
>     Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
>     a Linux Foundation Collaborative Project
>
>
> Yeah, I just discovered MachineFunctionPass. I don't know that I want 
> to run it in the middle of the pass pipeline of an existing backend so 
> much as I want the desired target to run and then have my machine 
> function pass run. If I can get the address of every machine 
> instruction I will be very happy.
>
If you're inserting instrumentation, you need to emit the instrumented 
code somehow, which implies the "middle" of the pass pipeline of an 
existing backend (although maybe pretty close to the end).  And if 
you're not inserting instrumentation, I'm not sure what you mean by the 
"address" of an instruction.

-Eli

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180517/98ad43c9/attachment.html>


More information about the llvm-dev mailing list