[llvm] [llvm-reduce] Remove DIGlobalVariableExpressions from DICompileUnit's globals (PR #94497)
Matthew Voss via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 5 09:32:29 PDT 2024
================
@@ -65,12 +65,14 @@ void identifyUninterestingMDNodes(Oracle &O, MDNodeList &MDs) {
SmallVector<Metadata *, 16> TN;
for (size_t I = 0; I < Tup->getNumOperands(); ++I) {
// Ignore any operands that are not DebugInfo metadata nodes.
- if (isa_and_nonnull<DINode>(Tup->getOperand(I)))
- // Don't add uninteresting operands to the tuple.
- if (!O.shouldKeep())
- continue;
-
- TN.push_back(Tup->getOperand(I));
+ if (Metadata *Op = Tup->getOperand(I).get()) {
+ if (isa<DINode>(Op) || isa<DIGlobalVariableExpression>(Op)) {
----------------
ormris wrote:
I believe it is possible to find nulls in the MD tree. Given the brute-force approach of this pass, I think `isa_and_nonnull` makes more sense.
https://github.com/llvm/llvm-project/pull/94497
More information about the llvm-commits
mailing list