[llvm-dev] [RFC] Compiled regression tests.
David Greene via llvm-dev
llvm-dev at lists.llvm.org
Wed Jul 1 11:43:07 PDT 2020
Hal Finkel via llvm-dev <llvm-dev at lists.llvm.org> writes:
> I definitely agree that we should not be trying to do this kind of
> checking using textual metadata-node matching in FileCheck. The
> alternative already available is to add an analysis pass with some kind
> of verifier output. This output, not the raw metadata itself, can be
> checked by FileCheck. We also need to check the verification code, but
> at least that's something we can keep just in one place. For parallel
> annotations, we already have such a thing (we can run opt -loops
> -analyze; e.g., in
> test/Analysis/LoopInfo/annotated-parallel-complex.ll). We also do this
> kind of thing for the cost model (by running with -cost-model -analyze).
> To what extent would making more-extensive use of this technique address
> the use cases you're trying to address?
Analysis tests are definitely useful but I don't think they're
sufficient. By their nature, analysis tests run in a "sanitized"
environment. The test specifies exactly what is analyzed and no other
passes are run.
>From my quick glance at Michael's example test, it's checking that the
inlining pass does something specific with metadata:
; Check that the access groups (llvm.access.group) are correctly merged.
I suppose one could create an "analysis" that just dumps out metadata
information. Is that what you have in mind? That seems like a lot of
overhead just to write a test to check metadata.
-David
More information about the llvm-dev
mailing list