[PATCH] D116832: [UpdateLLCTestChecks] Allow replacing register names with variables

David Greene via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 19 07:04:55 PST 2022


greened added a comment.

In D116832#3252510 <https://reviews.llvm.org/D116832#3252510>, @lebedev.ri wrote:

> Sorry if this has been asked before, but i think the main question here is: what's the target audience here?

Not asked before, and these are fair questions!

The target audience is anyone maintaining a code generator.  The ultimate goal (along with other patches) is to enhance the tool to create much more focused tests.  Let me give an example.  In my previous job I worked.a lot on X86 non-temporal load/store support.  We found that we'd get a lot of spurious test changes as we changed other parts of the backend.  Since the tests were only concerned with ensuring we continued to emit `MOVNT` instructions, I added the ability for `update_llc_test_checks.py` to filter and scrub output to minimize test changes caused by unrelated work.  Essentially, I filtered the asm to only check `MOVNT` and a few auxilliary instructions and scrubbed the register names so that changes in other instructions that caused different register allocations wouldn't alter the test checks.  They would continue to work as written.

> Is this intended to be used solely downstream, or for certain upstream backend? Is it planned to be ever enabled by default?

I don't intend for this ever to be default.  It should be strictly opt-in.  As I mentioned above, I originally developed this for an in-tree backend, though it happens that the current downstream backend I'm working on can also use it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116832/new/

https://reviews.llvm.org/D116832



More information about the llvm-commits mailing list