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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 5 11:16:59 PDT 2022


MaskRay added a comment.

In D135427#3910121 <https://reviews.llvm.org/D135427#3910121>, @dblaikie wrote:

> "can happen and will cause a Verifier failure" - could you clarify further what that means? A pass, given verified IR, shouldn't ever produce verifier-failing IR, right?

GlobalAlias in a non-prevailing COMDAT is not correctly handled today (may crash or spuriously succeed). This patch makes it correct for likely all cases Clang CodeGen produces (when `C5/D5` constructor/destructor  aliases are used).
But I do not plan to handle ConstantExpr aliasee (an extension espindola added in ~2015/2016 which allows `.set test5, test2-bar`) in a non-prevailing COMDAT - which to the best of my knowledge not used today.
That code still crashes, even not caught by the assert in FuncImport.cpp; I added a check in Verifier.cpp to catch to avoid a crash further down in the compilation pipeline.


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