[PATCH] D49994: Allow constraining virtual register's class within reason

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 31 01:48:50 PDT 2018


jonpa added a comment.

In https://reviews.llvm.org/D49994#1180497, @alexey.zhikhar wrote:

> In https://reviews.llvm.org/D49994#1180443, @lebedev.ri wrote:
>
> > Probably needs tests. (Not that i know how to write one here)
>
>
> Unfortunately, our backend is out-of-tree, so we can't upstream test cases for this patch. Jonas, you previously mentioned that this patch helps Z, do you happen to have a test case? @jonpa


IIRC, we tried this patch in an experimental setting (when evaluating a certain aspect of the SystemZ backend), so the test case we had then will not work on trunk :-/

I could derive a new test case quite easily, but I am personally not that sure exactly what to test for. I mean, after the coalescer, register allocator etc, with all those complex interactions of multiple optimizations, what type of test should we have that express the thing we are trying to fix? Is there really a clear case which really should be improved? Or is it more that some cases improve while others end up getting worse?

I made a test evaluation of this patch a while ago when I posted it, and it seemed then that the total number of COPYs marginally improve (decrease), while there is a very slight increase in spilling.

I could make a new test case that simply improves by e.g. having a COPY less, but I would like to know that this is really handling something specific and not just randomly end up getting better...

Is this making sense, and what are your thoughts?  What happens if you run your out-of-tree test cases with the SystemZ (-mcpu=z13) backend? Do you see any improvement? In that case, it seems like we have a test of real worth...


Repository:
  rL LLVM

https://reviews.llvm.org/D49994





More information about the llvm-commits mailing list