This patch introduces a new RAII struct that will temporarily make an OpenMP
RTL function have external linkage. This is done before the attributor is
invoked to prevent it from incorrectly removing some function definitions that
we will use later. For example, if we determine all calls to one function are
dead, because it has internal linkage it can safely be removed. Later when we
try to get an instance to that function to modify the source using
getOrCreateRuntimeFunction we will then get an empty declaration for that
function that won't be defined anywhere. This patch prevents this from
occurring.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Transforms/IPO/OpenMPOpt.cpp | ||
---|---|---|
1818–1821 | You need to create objects with a lifetime that matches the scope. You are creating unnamed objects here that die right away. |
no need to store OMPInfoCache