You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The instruction-specific flags (e.g. inbounds, nsw, nuw, exact) do not seem to be exposed (I could not find any docs on them, and I don't see the relevant llvm-sys API calls in the code). Specifically, add/sub/mul instructions can have nuw/nsw flags, udiv/sdiv/urem/srem instructions can have the exact flag, and getelementptr instructions can have the inbounds flag. These should all now be exposed via llvm-sys, though some only in more recent LLVM versions
Describe the solution you'd like
This information should be exposed somehow. I see that the fast-math flags, disjoint, volatile, etc. are exposed on the InstructionValue struct. That seems like a logical place to expose these as well, unless there's another place that is considered more appropriate or there are concerns about InstructionValue taking on too much surface
If it's as simple as adding getter/setter methods to InstructionValue, I can take a crack at a PR. Figured it was worth opening an issue to see if there were other thoughts
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The instruction-specific flags (e.g.
inbounds
,nsw
,nuw
,exact
) do not seem to be exposed (I could not find any docs on them, and I don't see the relevant llvm-sys API calls in the code). Specifically,add
/sub
/mul
instructions can havenuw
/nsw
flags,udiv
/sdiv
/urem
/srem
instructions can have theexact
flag, andgetelementptr
instructions can have theinbounds
flag. These should all now be exposed via llvm-sys, though some only in more recent LLVM versionsDescribe the solution you'd like
This information should be exposed somehow. I see that the fast-math flags, disjoint, volatile, etc. are exposed on the
InstructionValue
struct. That seems like a logical place to expose these as well, unless there's another place that is considered more appropriate or there are concerns aboutInstructionValue
taking on too much surfaceAdditional context
LangRef - Binary arithmetic ops
LangRef - GEP
There are likely other flags coming down the pipeline: the
samesign
flag foricmp
instructions, for exampleIf it's as simple as adding getter/setter methods to
InstructionValue
, I can take a crack at a PR. Figured it was worth opening an issue to see if there were other thoughtsThe text was updated successfully, but these errors were encountered: