llvm-project/polly
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
..
cmake [cmake] Support custom package install paths 2022-07-25 21:02:53 +00:00
docs Bump the trunk major version to 15 2022-02-01 23:54:52 -08:00
include/polly [Polly] Insert !dbg metadata for emitted CallInsts. 2022-07-26 19:43:53 -05:00
lib [Polly] Insert !dbg metadata for emitted CallInsts. 2022-07-26 19:43:53 -05:00
test [Polly] Insert !dbg metadata for emitted CallInsts. 2022-07-26 19:43:53 -05:00
tools
unittests [polly][unittests] Link DeLICMTests with libLLVMCore 2022-01-28 21:58:40 +01:00
utils Harmonize Python shebang 2020-07-16 21:53:45 +02:00
www [Polly] Clean up Polly's getting started docs. 2021-10-14 12:26:57 -05:00
.arclint
.gitattributes
.gitignore
CMakeLists.txt [cmake] Make include(GNUInstallDirs) always below project(..) 2022-01-20 18:59:17 +00:00
CREDITS.txt
LICENSE.TXT Rename top-level LICENSE.txt files to LICENSE.TXT 2021-03-10 21:26:24 -08:00
README

README

Polly - Polyhedral optimizations for LLVM
-----------------------------------------
http://polly.llvm.org/

Polly uses a mathematical representation, the polyhedral model, to represent and
transform loops and other control flow structures. Using an abstract
representation it is possible to reason about transformations in a more general
way and to use highly optimized linear programming libraries to figure out the
optimal loop structure. These transformations can be used to do constant
propagation through arrays, remove dead loop iterations, optimize loops for
cache locality, optimize arrays, apply advanced automatic parallelization, drive
vectorization, or they can be used to do software pipelining.