diff options
author | Scott Manley <rscottmanley@gmail.com> | 2024-05-07 10:45:28 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-07 08:45:28 -0700 |
commit | 57175533da0f3ea2054550c2e4d3e831e93bb4df (patch) | |
tree | fea755e869edfaa5c684d21d44930787df7505b3 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | e84fae837c0b154153bd9b9a3255ec5a67b1ea61 (diff) | |
download | llvm-57175533da0f3ea2054550c2e4d3e831e93bb4df.zip llvm-57175533da0f3ea2054550c2e4d3e831e93bb4df.tar.gz llvm-57175533da0f3ea2054550c2e4d3e831e93bb4df.tar.bz2 |
[MLIR][IR] add -mlir-print-unique-ssa-ids to AsmPrinter (#91241)
Add an option to unique the numbers of values, block arguments and
naming conflicts when requested and/or printing generic op form. This is
helpful when debugging. For example, if you have:
scf.for
%0 =
%1 = opA %0
scf.for
%0 =
%1 = opB %0
And you get a verifier error which says opB's "operand #0 does not
dominate this use", it looks like %0 does dominate the use. This is not
intuitive. If these were numbered uniquely, it would look like:
scf.for
%0 =
%1 = opA %0
scf.for
%2 =
%3 = opB %0
And thus, much clearer as to why you are getting the error since %0 is
out of scope. Since generic op form should aim to give you the most
possible information, it seems like a good idea to use unique numbers in
this situation. Adding an option also gives those an option to use it
outside of generic op form.
Co-authored-by: Scott Manley <scmanley@nvidia.com>
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions