Return true if the currently visible definition of this global (if any) is exactly the definition we will see at runtime.
Synopsis
Declared in <llvm/IR/GlobalValue.h>
bool
isDefinitionExact() const;
Description
Non‐exact linkage types inhibits most non‐inlining IPO, since a differently optimized variant of the same function can have different observable or undefined behavior than in the variant currently visible. For instance, we could have started with
void foo(int *v) { int t = 5 / v[0]; (void) t; }
and "refined" it to
void foo(int *v) { }
However, we cannot infer readnone for foo, since that would justify DSE'ing a store to v[0] across a call to foo, which can cause undefined behavior if the linker replaces the actual call destination with the unoptimized foo.
Inlining is okay across non‐exact linkage types as long as they're not interposable (see isInterposable), since in such cases the currently visible variant is a correct implementation of the original source function; it just isn't the only correct implementation.
Created with MrDocs