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
local::Name->Operand
local =LocalReference double
instr::Instruction->Codegen (Operand)
instr ins =do
n <- fresh
let ref = (UnName n)
blk <- current
let i = stack blk
modifyBlock (blk { stack = (ref := ins) : i } )
return$ local ref
I found this error when I tried to print the generated IR with llvm-hs-pretty. Even a simple function definition def f(a) a; will trigger this problem with the following generated IR:
I am not sure whether this is some incompatibility with newer version LLVM or this is a fault made by myself, but as suggested by @sdiehl in the repo of llvm-hs-pretty, this should be wrong.
The text was updated successfully, but these errors were encountered:
As noted in llvm document, the return value of
alloca
should be a pointer. However, in the process of generating the IR of aFunction
, it is used with typedouble
:That's because the
alloca
is defined with theinstr
function:where
instr
is defined to be a double reference:I found this error when I tried to print the generated IR with
llvm-hs-pretty
. Even a simple function definitiondef f(a) a;
will trigger this problem with the following generated IR:I am not sure whether this is some incompatibility with newer version LLVM or this is a fault made by myself, but as suggested by @sdiehl in the repo of
llvm-hs-pretty
, this should be wrong.The text was updated successfully, but these errors were encountered: