[llvm-dev] [llvm] Query the target from an opt pass?
Friedman, Eli via llvm-dev
llvm-dev at lists.llvm.org
Tue Apr 3 13:54:41 PDT 2018
On 4/3/2018 11:15 AM, Kevin Neal wrote:
>
> Hmmm, a quick look at the documentation for TargetTransformInfo
> doesn't look
>
> like it.
>
> In LegalizeDAG.cpp it uses TLI.getOperationAction() to find out if an
> SDNode
>
> should be expanded by the legalizer or passed down to the target.
> That's what
>
> I need to know, but I need it in a pass pre-legalization.
>
Right; you probably need to add a TTI hook (which can call into TLI).
The ScalarizeMaskedMemIntrin pass is a good example to follow.
-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/20180403/711f9f02/attachment.html>
More information about the llvm-dev
mailing list