Commit 97c13ad1 by Ben Clayton

LLVMReactor: Finalize the debug info earlier

Before finalization, the IR is not verifiable. This should also be finalized before optimization passes. Bug: b/131914569 Change-Id: Ibc5b2bf85369412148565daaf81779dac30d6e8a Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30452Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com>
parent 7579db11
...@@ -963,6 +963,13 @@ namespace rr ...@@ -963,6 +963,13 @@ namespace rr
} }
} }
#ifdef ENABLE_RR_DEBUG_INFO
if (debugInfo != nullptr)
{
debugInfo->Finalize();
}
#endif // ENABLE_RR_DEBUG_INFO
if(false) if(false)
{ {
std::error_code error; std::error_code error;
...@@ -982,13 +989,6 @@ namespace rr ...@@ -982,13 +989,6 @@ namespace rr
::module->print(file, 0); ::module->print(file, 0);
} }
#ifdef ENABLE_RR_DEBUG_INFO
if (debugInfo != nullptr)
{
debugInfo->Finalize();
}
#endif // ENABLE_RR_DEBUG_INFO
LLVMRoutine *routine = ::reactorJIT->acquireRoutine(::function); LLVMRoutine *routine = ::reactorJIT->acquireRoutine(::function);
return routine; return routine;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment