[llvm] [VPlan] Add hidden `-vplan-print-after-all` option (PR #175839)

Andrei Elovikov via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 20 08:42:14 PST 2026


eas wrote:

> Can you include a simple test in unittests/VPlanTest.cpp?

Not really, because the `LLVM_PRETTY_FUNCTION` can produce different outputs depending on the compiler used to build LLVM.

> it will be very useful to have this, thanks for working on this. just thinking if theres an alternative that avoids touching every invocation

I couldn't think of any. In fact, due to the instability of the produced name I'm thinking about making further [changes](https://github.com/llvm/llvm-project/commit/3b30c5c12c2e566968d0d7afb72c1367ba9868a1) that would touch those lines again (and would add a test now that it would be possible).

What I'd like to enable is to be able to write

```
// RUN: opt --pases=loop-vectorize -vplan-print-after=<VPlanTransformation> -disable-output < %s 2>&1 | FileCheck %s
...
```

so that we could verify the changes in a more direct way. However, because `LLVM_PRETTY_FUNCTION` isn't stable enough to be used in tests I have to write the names of the transformations explicitly. @fhahn , do you think those future changes should be kept separate and pulled into this PR?


https://github.com/llvm/llvm-project/pull/175839


More information about the llvm-commits mailing list