Currently the value is only used when calling F->viewCFG() which is missing out on its potential and usefulness.
So I added the check to the printer passes as well.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Add test for the filtering with -dot-cfg and -dot-cfg-only. As far as I see it, the view variant is not really testable. Happy to be proved wrong, though. :)
Also, would it make sense to un-hide and document the flag now, given it actually is useful now?
You may document the effect of -cfg-func-name in docs/Passes.rst
llvm/test/Other/cfg-printer-filter.ll | ||
---|---|---|
1 | The most common style is ; RUN Add a comment, e.g. ;; Both f and func are dumped because their names contain the pattern f` as a substring.` | |
4 | It will be robust to rm -f %t.other.dot first before testing this. A stale (e.g. when testing the feature) %t.other.dot file could cause the test to fail. | |
11 | Delete | |
40 | Delete trailing blank lines |
The most common style is ; RUN
Add a comment, e.g. ;; Both f and func are dumped because their names contain the pattern f` as a substring.`