[llvm-dev] [llvm] Query the target from an opt pass?

Kevin Neal via llvm-dev llvm-dev at lists.llvm.org
Tue Apr 3 09:25:28 PDT 2018


I'm working on the #pragma STDC FENV_ACCESS ON support, specifically
the support for a strict version of the FP to unsigned int conversion.

I've got a pass that runs and converts a new intrinsic into code that
uses the FP to signed int conversion code similar to how SelectionDAG
handles this now. Except that SelectionDAG will let the target handle
it if the target says it will.

How do I, from an "optimization" pass, query the target to see if it
already has a better way of handling exactly this case? I grepped around
and I didn't see anything in a pass that looked like what I need.

Oh, and the reason I did this as a pass is because I need to add branches,
which means splitting basic blocks. I don't think I can do this in
SelectionDAG.

--
Kevin P. Neal
SAS/C and SAS/C++ Compiler
Host Research and Development
SAS Institute, Inc.




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


More information about the llvm-dev mailing list