]> granicus.if.org Git - llvm/commit
[ORC] Make sure that queries on emitted-but-not-ready symbols fail correctly.
authorLang Hames <lhames@gmail.com>
Mon, 26 Aug 2019 21:42:51 +0000 (21:42 +0000)
committerLang Hames <lhames@gmail.com>
Mon, 26 Aug 2019 21:42:51 +0000 (21:42 +0000)
commitf68f3663ea23795d1650ac13dc3b7ab637fd15ae
treea975183153f40a98dec03f3a0cec7d81b2fb2567
parent3cee2c9320264a95d83ac4d7c5e1fe1d708a41d4
[ORC] Make sure that queries on emitted-but-not-ready symbols fail correctly.

In r369808 the failure scheme for ORC symbols was changed to make
MaterializationResponsibility objects responsible for failing the symbols
they represented. This simplifies error logic in the case where symbols are
still covered by a MaterializationResponsibility, but left a gap in error
handling: Symbols that have been emitted but are not yet ready (due to a
dependence on some unemitted symbol) are not covered by a
MaterializationResponsibility object. Under the scheme introduced in r369808
such symbols would be moved to the error state, but queries on those symbols
were never notified. This led to deadlocks when such symbols were failed.

This commit updates error logic to immediately fail queries on any symbol that
has already been emitted if one of its dependencies fails.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369976 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ExecutionEngine/Orc/Core.h
lib/ExecutionEngine/Orc/Core.cpp
unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp