[PATCH] D135427: [LTO] Make local linkage GlobalValue in non-prevailing COMDAT available_externally

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 4 16:32:39 PDT 2022


tejohnson added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/FunctionImport.cpp:1162
+    // it to available_externally. For simplicity we don't handle ConstantExpr
+    // aliasee, which is unlikely used in a COMDAT.
+    for (auto &GA : TheModule.aliases()) {
----------------
MaskRay wrote:
> tejohnson wrote:
> > MaskRay wrote:
> > > tejohnson wrote:
> > > > Should that be asserted?
> > > The case technically can happen and will cause a Verifier failure, so we don't necessarily assert it here...
> > Ok as long as it fails obviously somewhere. Wondering if we need a TODO here to handle that case in the future?
> Aliasing a ConstantExpr is a less-used extension, so I think a TODO is not necessary (the comment is still clear, just without the TODO keyword).
Thinking more about this, if we know that a constant expr aliasee will lead to a verifier failure, I think it is best to assert here so that it is easier to debug when and if that happens.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135427/new/

https://reviews.llvm.org/D135427



More information about the llvm-commits mailing list