Replies: 2 comments
-
|
Maybe for |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Yes. I think you can obtain |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Problem.
I'm having trouble with finding appropratie API for finding
<ty>in instructions like%add = add <ty> <op1> <op2>or%cmp = icmp <cond> <ty> <op1> <op2>.Why It is needed.
For a given instruction
%cmp = icmp <cond> <ty> <op1> <op2>,if I have
<ty>, type constraints{Env(<op1>) = <ty>}, {Env(<op2>)= <ty>}can be added, instead of merely adding{Env(<op1>) = Env(<op2>)}(Although I guess the latter one can be enough for this assignment).What have I tried
Using
Llvm.type_ofon%cmpgives the type of%cmp(thus alwaysi1), not the type of operands.Also
Llvm.operandseemed not capable of returning<ty>, as it only returns<op1>, <op2>, ....I've taken some time to throughly check through LLVM Ocaml binding and LlvmUtils, but really couldn't find one.
If there is any possible method, can you help me out? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions