[PATCH] R600/SI: add pass to mark CF live ranges as non-spillable

Tom Stellard tom at stellard.net
Wed Apr 29 13:38:16 PDT 2015


On Wed, Apr 29, 2015 at 10:24:35PM +0200, Grigori Goronzy wrote:
> On 2015-04-28 23:19, Tom Stellard wrote:
> >>+; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s
> >>+; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s
> >>+; RUN: llc -march=amdgcn -mcpu=SI < %s | FileCheck
> >>-check-prefix=SI %s
> >>+; RUN: llc -march=amdgcn -mcpu=tonga < %s | FileCheck
> >>-check-prefix=SI %s
> >
> >These run lines should be merged into only two lines, like this:
> >
> >; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s |
> >FileCheck -check-prefix=SI %s
> >; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s |
> >FileCheck -check-prefix=SI %s
> >
> 
> If the machine verifier fails, I don't get any useful output to run
> FileCheck on. Those lines test separate issues, and isn't it useful
> to be able to test both independently?. The machine verifier can
> detect non-terminator instructions after a terminator (sometimes
> spilling instructions are inserted after a CBRANCH in the same BB)
> while the FileCheck test verifies restore instruction ordering
> (restores after associated CF instruction are invalid).
> 

I don't see any reason to test the two things independently.  If the
test fails it will be pretty clear which one of those problems caused
the failure.

In fact, I don't think having the extra RUN lines will change the output
of the test when there is a failure, so all the really do is increase
the run-time of the test.

-Tom

> >
> >This test is somewhat big, did you try reducing it with bugpoint and
> >compiling with -O0 to force spilling?
> >
> 
> The test was reduced with bugpoint, but without -O0. If I remember
> correctly, -O0 managed to mostly "work around" the bugs because it
> always forces spilling at specific points.
> 
> Best regards
> Grigori
> 



More information about the llvm-commits mailing list