[PATCH] D102011: Use `-cfg-func-name` value as filter for `-view-cfg`, etc.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 10 11:52:44 PDT 2021
MaskRay added a comment.
In D102011#2744949 <https://reviews.llvm.org/D102011#2744949>, @fodinabor wrote:
> 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`
================
Comment at: llvm/test/Other/cfg-printer-filter.ll:1
+;RUN: opt < %s -dot-cfg -cfg-dot-filename-prefix=%t -cfg-func-name=f 2>/dev/null
+;RUN: FileCheck %s -input-file=%t.f.dot -check-prefix=F
----------------
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.`
================
Comment at: llvm/test/Other/cfg-printer-filter.ll:4
+;RUN: FileCheck %s -input-file=%t.func.dot -check-prefix=Func
+;RUN: not test -f %t.other.dot
+
----------------
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.
================
Comment at: llvm/test/Other/cfg-printer-filter.ll:11
+
+;END.
+
----------------
Delete
================
Comment at: llvm/test/Other/cfg-printer-filter.ll:40
+}
+
----------------
Delete trailing blank lines
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102011/new/
https://reviews.llvm.org/D102011
More information about the llvm-commits
mailing list