[PATCH] D110064: [SelectionDAG] Assume that a GlobalAlias may alias other global values
Nirav Dave via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 20 05:59:03 PDT 2021
niravd added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp:155
+ // global values and at least one is a GlobalAlias.
+ if (IsGV0 && IsGV1 &&
+ (isa<GlobalAlias>(cast<GlobalAddressSDNode>(
----------------
It looks like we can walk the GlobalAlias to the referenced object. If so, we should fully walk to a non-alias global instead.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp:168
+ // dereferenced)?
+ if (BasePtr0.getIndex() == BasePtr1.getIndex()) {
+ IsAlias = false;
----------------
We should handle this case earlier so we can correct determine that identical global aliases do in fact alias.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110064/new/
https://reviews.llvm.org/D110064
More information about the llvm-commits
mailing list