llvm-6502/lib
Hal Finkel 4a7156d421 Fix the aggressive anti-dep breaker's subregister definition handling
The aggressive anti-dependency breaker scans instructions, bottom-up, within the
scheduling region in order to find opportunities where register renaming can
be used to break anti-dependencies.

Unfortunately, the aggressive anti-dep breaker was treating a register definition
as defining all of that register's aliases (including super registers). This behavior
is incorrect when the super register is live and there are other definitions of
subregisters of the super register.

For example, given the following sequence:

%CR2EQ<def> = CROR %CR3UN, %CR3UN<kill>
%CR2GT<def> = IMPLICIT_DEF
%X4<def> = MFOCRF8 %CR2

the analysis of the first subregister definition would work as expected:
Anti:   %CR2GT<def> = IMPLICIT_DEF
        Def Groups: CR2GT=g194->g0(via CR2)
        Antidep reg: CR2GT (zero group)
        Use Groups:

but the analysis of the second one would not:
Anti:   %CR2EQ<def> = CROR %CR3UN, %CR3UN<kill>
        Def Groups: CR2EQ=g195
        Antidep reg: CR2EQ
        Rename Candidates for Group g195: ...

because, when processing the %CR2GT<def>, we'd mark all super registers of
%CR2GT (%CR2 in this case) as defined. As a result, when processing
%CR2EQ<def>, %CR2 no longer appears to be live, and %CR2EQ<def>'s group is not
%unioned with the %CR2 group.

I don't have an in-tree test case for this yet (and even if I did, I don't have
a small one).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202294 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-26 20:20:30 +00:00
..
Analysis Constify the Optnone checks in IR passes. 2014-02-26 01:23:26 +00:00
AsmParser
Bitcode
CodeGen Fix the aggressive anti-dep breaker's subregister definition handling 2014-02-26 20:20:30 +00:00
DebugInfo
ExecutionEngine
IR Fix typo. Thanks to Roman Divacky for noticing it. 2014-02-26 17:05:38 +00:00
IRReader
LineEditor [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
Linker Compare DataLayout by Value, not by pointer. 2014-02-26 17:02:08 +00:00
LTO
MC
Object Relax COFF string table check 2014-02-26 19:51:44 +00:00
Option
Support [CMake] BUILD_SHARED_LIBS: Fixup for r202261: Give PULIC to system_libs in LLVMSupport. 2014-02-26 12:18:55 +00:00
TableGen
Target ARMv8 IfConversion must skip narrow instructions that a) define CPSR and b) wouldn't affect CPSR in an IT block 2014-02-26 11:27:28 +00:00
Transforms GlobalOpt: Apply fastcc to internal x86_thiscallcc functions 2014-02-26 19:57:30 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile