AnyDSL / thorin

The Higher-Order Intermediate Representation

Home Page:https://anydsl.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SegFault in -emit-thorin

richardmembarth opened this issue · comments

Calling impala -emit-thorin on AnyDSL/stincilla/sorting_networks/bitonic.impala segfaults:

impala bitonic.impala -emit-thorin
module 'bitonic'

thorin/analyses/domtree.cpp:53: const thorin::CFNode* thorin::DomTreeBase<<anonymous> >::lca(const thorin::CFNode*, const thorin::CFNode*) const [with bool forward = true]: Assertion `i && j' failed.
Aborted (core dumped)

3463372 fixed it.

args, broken again. now we have an endless loop...

this problem only occurs, when using certain higher-order idioms. When compiling with -Othorin implied by -emit-llvm we should never run into this case.

Of course, this issue should be fixed but the thing is (long story short): Our CFA is currently too smart for the scheduler, so the scheduler gets confused. I'll postpone for 0.5 as -emit-thorin is actually more a debugging option no end user will use and fixing this issue is a bit more involved.

The last commit gets rid of the endless loop an emits a warning instead

fixed.