IR values convert to check prefix FileCheck variables for IR checks. For example, nameless values, e.g., %0, convert to check prefix TMP FileCheck variables, e.g., [[TMP0:%.*]]. This check prefix may clash with named values that have the same name and that causes auto-generated tests to fail. Currently a warning is emitted to change the names of the IR values but this is not always possible, if for example they are generated by clang. Manual intervention to fix the FileCheck variable names is too tedious. This patch add a parameter to prefix conflicting FileCheck variable names with a user-provided string to automate the process.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Cool, thanks. LGTM, two nits.
llvm/utils/UpdateTestChecks/common.py | ||
---|---|---|
532 | Move the re.match into a helper (also used below), maybe: may_clash_with_default_check_prefix_name(check_prefix, var) | |
563 | I would not add the and not _prefix_filecheck... stuff here because if the other condition holds a warning seems appropriate, maybe the prefix was chosen pooreley, etc. |
Move the re.match into a helper (also used below), maybe: may_clash_with_default_check_prefix_name(check_prefix, var)