All lowerings that take place during test execution will be recorded in log
files if the macro LOG_LOWERINGS is defined at compile time. This allows to
capture also lowerings that happen in child processes. If the macro remains
undefined, MLIR will behave exactly as before.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Using #ifdef's isn't great. Can we instead have a cl::opt and just use a regular if to control this. Then we can test it too.
Comment Actions
I know, defining this with a macro (instead of cl::opt) feels a bit odd, just like writing all these files instead of printing it to the debug stream.
I considered both, however, there was no way to pass the flag on to all of the pattern applications among the test cases. Especially in the lit tests I would not know how to do this; the debug stream is consumed by, e.g. file-check and the flags are defined in the lit files.
If the aim is to collect all pattern applications, this is still the only way I can think of. If instead this is a debugging feature, we could do it with a simple flag.