[PATCH] D145854: [GlobalDCE] Don't add dependency via icmp against inbouds pointer
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 16 11:36:04 PDT 2023
jdoerfert added a comment.
This patch is all over the place. We have different other places where we simplify globals or comparisons, this should go there instead.
================
Comment at: llvm/lib/Analysis/TypeMetadataUtils.cpp:272
+ }
+}
----------------
Why is this code in this file?
================
Comment at: llvm/lib/Transforms/IPO/GlobalDCE.cpp:64-67
+ if (GV && GV->hasLocalLinkage()) {
+ return true;
+ }
+ return false;
----------------
================
Comment at: llvm/lib/Transforms/IPO/GlobalDCE.cpp:84
+ return O->getPointerDereferenceableBytes(DL, CanBeNull, CanBeFreed);
+}
+
----------------
We should not copy code.
================
Comment at: llvm/lib/Transforms/IPO/GlobalDCE.cpp:107
+ }
+ }
Deps.insert(Parent);
----------------
This code doesn't belong here. No other such logic is used in this traversal.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145854/new/
https://reviews.llvm.org/D145854
More information about the llvm-commits
mailing list