================
@@ -1700,6 +1701,13 @@
PassBuilder::buildModuleOptimizationPipeline(OptimizationLevel Level,
InlineContext{ThinOrFullLTOPhase::None, InlinePass::CGSCCInliner}));
}
}
+
+ // Lower !comment_string.loadtime metadata to a concrete TU-local string
+ // global and attach !implicit.ref to all defined functions. Running late
+ // ensures compiler-generated functions (e.g. from inlining, coroutines)
+ // are also anchored to the copyright string via .ref directives.
+ MPM.addPass(LowerCommentStringPass());
----------------
tonykuttai wrote:
Primary motivation was to convert `!comment_string.loadtime` metadata to LLVM
IR earlier in the pipeline. Also it needs to run in both pre-link and post-link
LTO phases, which is simpler in opt. The pass itself is bailed out early for
non-aix targets. Having it in the general pipeline makes future extension much
easier. update `isSupportedTarget()` when adding z/OS or other targets that
need similar load-time comment functionality.
https://github.com/llvm/llvm-project/pull/178184
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits