llvm-6502/test
Richard Sandiford 9608ed1311 Fix overly pessimistic shortcut in post-RA MachineLICM
Post-RA LICM keeps three sets of registers: PhysRegDefs, PhysRegClobbers
and TermRegs.  When it sees a definition of R it adds all aliases of R
to the corresponding set, so that when it needs to test for membership
it only needs to test a single register, rather than worrying about
aliases there too.  E.g. the final candidate loop just has:

    unsigned Def = Candidates[i].Def;
    if (!PhysRegClobbers.test(Def) && ...) {

to test whether register Def is multiply defined.

However, there was also a shortcut in ProcessMI to make sure we didn't
add candidates if we already knew that they would fail the final test.
This shortcut was more pessimistic than the final one because it
checked whether _any alias_ of the defined register was multiply defined.
This is too conservative for targets that define register pairs.
E.g. on z, R0 and R1 are sometimes used as a pair, so there is a
128-bit register that aliases both R0 and R1.  If a loop used
R0 and R1 independently, and the definition of R0 came first,
we would be able to hoist the R0 assignment (because that used
the final test quoted above) but not the R1 assignment (because
that meant we had two definitions of the paired R0/R1 register
and would fail the shortcut in ProcessMI).

This patch just uses the same check for the ProcessMI shortcut as
we use in the final candidate loop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188774 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-20 09:11:13 +00:00
..
Analysis [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
Assembler [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
Bindings/Ocaml [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
Bitcode [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
BugPoint [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
CodeGen Fix overly pessimistic shortcut in post-RA MachineLICM 2013-08-20 09:11:13 +00:00
DebugInfo Turn on pubnames by default on linux. 2013-08-19 21:07:38 +00:00
ExecutionEngine Marking MCJIT PIC tests as XFAIL on AArch64 2013-08-20 01:50:50 +00:00
Feature [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
FileCheck [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
Instrumentation [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
Integer [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
JitListener [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
Linker [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
MC [mips] Fix instruction definitions that were incorrectly marked as code-gen-only. 2013-08-19 19:08:03 +00:00
Object [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
Other [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
TableGen Fix a bug in TableGen where the intrinsic function name recognizer could mis-identify names if one was a prefix substring of the other 2013-07-25 12:32:00 +00:00
tools [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
Transforms Add a llvm.copysign intrinsic 2013-08-19 23:35:46 +00:00
Unit [tests] Update to use lit_config and lit package, as appropriate. 2013-08-09 16:22:05 +00:00
Verifier [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
YAMLParser
CMakeLists.txt
lit.cfg [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
lit.site.cfg.in [tests] Update to use lit_config and lit package, as appropriate. 2013-08-09 16:22:05 +00:00
Makefile [tests] Remove dead VALGRIND and CLEANED_TESTSUITE makefile variables. 2013-08-08 20:59:27 +00:00
Makefile.tests Remove dead code from the makefile build system. 2013-07-25 20:25:31 +00:00
TestRunner.sh