llvm-project/polly/lib
Michael Kruse fe0e5b3e43 [Polly] Insert !dbg metadata for emitted CallInsts.
The IR Verifier requires that every call instruction to an inlineable
function (among other things, its implementation must be visible in the
translation unit) must also have !dbg metadata attached to it. When
parallelizing, Polly emits calls to OpenMP runtime function out of thin
air, or at least not directly derived from a bounded list of previous
instruction. While we could search for instructions in the SCoP that has
some debug info attached to it, there is no guarantee that we find any.
Our solution is to generate a new DILocation that points to line 0 to
represent optimized code.

The OpenMP function implementation is usually not available in the
user's translation unit, but can become visible in an LTO build. For
the bug to appear, libomp must also be built with debug symbols.

IMHO, the IR verifier rule is too strict. Runtime functions can
also be inserted by other optimization passes, such as
LoopIdiomRecognize. When inserting a call to e.g. memset, it uses the
DebugLoc from a StoreInst from the unoptimized code. It is not
required to have !dbg metadata attached either.

Fixes #56692
2022-07-26 19:43:53 -05:00
..
Analysis Use any_of (NFC) 2022-07-22 01:05:17 -07:00
CodeGen [Polly] Insert !dbg metadata for emitted CallInsts. 2022-07-26 19:43:53 -05:00
Exchange Use value instead of getValue (NFC) 2022-07-15 20:03:13 -07:00
External [polly][cmake] Use `GNUInstallDirs` to support custom installation dirs 2022-01-18 20:33:42 +00:00
Plugin Generalize the pass registration mechanism used by Polly to any third-party tool 2020-01-02 16:45:31 +01:00
Support Remove redundaunt virtual specifiers (NFC) 2022-07-25 23:00:59 -07:00
Transform Remove redundaunt virtual specifiers (NFC) 2022-07-25 23:00:59 -07:00
CMakeLists.txt [Polly] Remove support for code generated by gfortran+DragonEgg. 2021-10-14 14:12:06 -05:00