Closed betzinger closed 1 year ago
This looks like an extract on type level (although I am unable to match up the code with the thorin code without further investigation).
However, the simple solution seems to be to lower everything correctly (move mems, reshape types, ...). This is all done by the closure plugin (and the closure conversion phase for higher order functions):
./build/bin/thorin -p clos [file] -o - --output-ll T.ll
Or adding
.plugin clos;
Adding
.plugin clos;
produces valid llvm code, however, the generated llvm-code doesn't define the function map_reduce_test
. Is there an easy fix for that or should I open another issue?
Adding
.plugin clos;
produces valid llvm code, however, the generated llvm-code doesn't define the functionmap_reduce_test
. Is there an easy fix for that or should I open another issue?
The function is named map_reduce_test _reshape. This is a relict from when reshape renamed every function. I changed it to not rename externals. But somehow I forgot to merge the change into master.
Solutions:
Note: There are a few other things that appear weird (the three higher-order Pis without usage). But if they do not make the compiler crash/produce incorrect code, they can be ignored for now.
Alright, thanks a lot!
When trying to compile the llvm code generated from the program below, clang will abort with the error