[llvm] [LLVM-Reduce] - Distinct Metadata Reduction (PR #96072)
Robert Barinov via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 21 05:18:50 PDT 2024
================
@@ -1,8 +1,8 @@
-; RUN: llvm-reduce --abort-on-invalid-reduction --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
+; RUN: llvm-reduce --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
----------------
rbintel wrote:
So the problem is I changed the way first level unnamed metadata reduction is done (ReduceMetadata.cpp). At some point it will try to reduce the nodes in `!llvm.dbg.cu`, so the reducer will generate an invalid case and go back if there is no flag (or fail if the flag is set). This happens due to the fact that I removed the hardcoded constraints, before it was pretty conservative and only tried to run the algorithm on a subset of named metadata:
```
static constexpr StringLiteral ListNamedMetadata[] = {
"llvm.module.flags",
"llvm.ident",
"opencl.spir.version",
"opencl.ocl.version",
"opencl.used.extensions",
"opencl.used.optional.core.features",
"opencl.compiler.options"
};
```
but now it tries to reduce any named node it encounters.
The question is which behavior is preferable:
1) Try the reduction, fail the test and continue reducing
2) Skip the named node if it is `!llvm.dbg.cu`
https://github.com/llvm/llvm-project/pull/96072
More information about the llvm-commits
mailing list