Revert "[OpenMP][IRBuilder] Perform finalization (incl. outlining) late"
This reverts commit 8a56d64d76.
Will be recommitted once the clang test problem is addressed.
This commit is contained in:
@@ -1405,7 +1405,11 @@ static void fixupDebugInfoPostExtraction(Function &OldFunc, Function &NewFunc,
|
||||
DISubprogram *OldSP = OldFunc.getSubprogram();
|
||||
LLVMContext &Ctx = OldFunc.getContext();
|
||||
|
||||
if (!OldSP) {
|
||||
// See llvm.org/PR44560, OpenMP passes an invalid subprogram to CodeExtractor.
|
||||
bool NeedWorkaroundForOpenMPIRBuilderBug =
|
||||
OldSP && OldSP->getRetainedNodes()->isTemporary();
|
||||
|
||||
if (!OldSP || NeedWorkaroundForOpenMPIRBuilderBug) {
|
||||
// Erase any debug info the new function contains.
|
||||
stripDebugInfo(NewFunc);
|
||||
// Make sure the old function doesn't contain any non-local metadata refs.
|
||||
|
||||
Reference in New Issue
Block a user