Including debug instructions from different places in the program could cause issues with debuggers. This makes sure that any debug information about original location in outlined functions is stripped accordingly, and adds new debug information to the outlined functions.
Tests Changed:
- llvm/test/Transforms/IROutliner/legal-debug.ll
New Tests:
- llvm/test/DebugInfo/AArch64/ir-outliner.ll
Side note: This seems surprising to me - do any other passes create functions with plain names like this? I'd expect anything being created would use something like the C++ reserved identifier namespace (double leading underscore or leading underscore and uppercase).