[PATCH] D54774: [GlobalOpt] Optimize comdat dynamic initializers on Windows
John McCall via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 25 23:53:45 PST 2018
rjmccall added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/CtorUtils.cpp:116
+ bool AssumeComdatInitializers =
+ Triple(M.getTargetTriple()).isWindowsMSVCEnvironment();
+
----------------
efriedma wrote:
> If the IR doesn't have enough information to distinguish between the Microsoft and Itanium ABI cases, we should extend the IR to contain more information. Checking the triple means we're depending on semantic guarantees which are not documented in LangRef, and many not apply to non-C++ languages.
I agree with Eli. This is clearly a frontend-originated guarantee, not a target-wide guarantee, and should be reflected in the IR.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54774/new/
https://reviews.llvm.org/D54774
More information about the llvm-commits
mailing list