mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-10 01:10:48 +00:00
6a8c7bf8e7
on X86 Atom. Some of our tests failed because the tail merging part of the BranchFolding pass was creating new basic blocks which did not contain live-in information. When the anti-dependency code in the Post-RA scheduler ran, it would sometimes rename the register containing the function return value because the fact that the return value was live-in to the subsequent block had been lost. To fix this, it is necessary to run the RegisterScavenging code in the BranchFolding pass. This patch makes sure that the register scavenging code is invoked in the X86 subtarget only when post-RA scheduling is being done. Post RA scheduling in the X86 subtarget is only done for Atom. This patch adds a new function to the TargetRegisterClass to control whether or not live-ins should be preserved during branch folding. This is necessary in order for the anti-dependency optimizations done during the PostRASchedulerList pass to work properly when doing Post-RA scheduling for the X86 in general and for the Intel Atom in particular. The patch adds and invokes the new function trackLivenessAfterRegAlloc() instead of using the existing requiresRegisterScavenging(). It changes BranchFolding.cpp to call trackLivenessAfterRegAlloc() instead of requiresRegisterScavenging(). It changes the all the targets that implemented requiresRegisterScavenging() to also implement trackLivenessAfterRegAlloc(). It adds an assertion in the Post RA scheduler to make sure that post RA liveness information is available when it is needed. It changes the X86 break-anti-dependencies test to use –mcpu=atom, in order to avoid running into the added assertion. Finally, this patch restores the use of anti-dependency checking (which was turned off temporarily for the 3.1 release) for Intel Atom in the Post RA scheduler. Patch by Andy Zhang! Thanks to Jakob and Anton for their reviews. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155395 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
MCTargetDesc | ||
TargetInfo | ||
CellSDKIntrinsics.td | ||
CMakeLists.txt | ||
LLVMBuild.txt | ||
Makefile | ||
README.txt | ||
SPU64InstrInfo.td | ||
SPU128InstrInfo.td | ||
SPU.h | ||
SPU.td | ||
SPUAsmPrinter.cpp | ||
SPUCallingConv.td | ||
SPUFrameLowering.cpp | ||
SPUFrameLowering.h | ||
SPUHazardRecognizers.cpp | ||
SPUHazardRecognizers.h | ||
SPUInstrBuilder.h | ||
SPUInstrFormats.td | ||
SPUInstrInfo.cpp | ||
SPUInstrInfo.h | ||
SPUInstrInfo.td | ||
SPUISelDAGToDAG.cpp | ||
SPUISelLowering.cpp | ||
SPUISelLowering.h | ||
SPUMachineFunction.cpp | ||
SPUMachineFunction.h | ||
SPUMathInstr.td | ||
SPUNodes.td | ||
SPUNopFiller.cpp | ||
SPUOperands.td | ||
SPURegisterInfo.cpp | ||
SPURegisterInfo.h | ||
SPURegisterInfo.td | ||
SPURegisterNames.h | ||
SPUSchedule.td | ||
SPUSelectionDAGInfo.cpp | ||
SPUSelectionDAGInfo.h | ||
SPUSubtarget.cpp | ||
SPUSubtarget.h | ||
SPUTargetMachine.cpp | ||
SPUTargetMachine.h |
//===- README.txt - Notes for improving CellSPU-specific code gen ---------===// This code was contributed by a team from the Computer Systems Research Department in The Aerospace Corporation: - Scott Michel (head bottle washer and much of the non-floating point instructions) - Mark Thomas (floating point instructions) - Michael AuYeung (intrinsics) - Chandler Carruth (LLVM expertise) - Nehal Desai (debugging, i32 operations, RoadRunner SPU expertise) Some minor fixes added by Kalle Raiskila. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR OTHERWISE. IN NO EVENT SHALL THE AEROSPACE CORPORATION BE LIABLE FOR DAMAGES OF ANY KIND OR NATURE WHETHER BASED IN CONTRACT, TORT, OR OTHERWISE ARISING OUT OF OR IN CONNECTION WITH THE USE OF THE SOFTWARE INCLUDING, WITHOUT LIMITATION, DAMAGES RESULTING FROM LOST OR CONTAMINATED DATA, LOST PROFITS OR REVENUE, COMPUTER MALFUNCTION, OR FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR SUCH DAMAGES ARE FORESEEABLE. --------------------------------------------------------------------------- --WARNING--: --WARNING--: The CellSPU work is work-in-progress and "alpha" quality code. --WARNING--: If you are brave enough to try this code or help to hack on it, be sure to add 'spu' to configure's --enable-targets option, e.g.: ./configure <your_configure_flags_here> \ --enable-targets=x86,x86_64,powerpc,spu --------------------------------------------------------------------------- TODO: * Create a machine pass for performing dual-pipeline scheduling specifically for CellSPU, and insert branch prediction instructions as needed. * i32 instructions: * i32 division (work-in-progress) * i64 support (see i64operations.c test harness): * shifts and comparison operators: done * sign and zero extension: done * addition: done * subtraction: needed * multiplication: done * i128 support: * zero extension, any extension: done * sign extension: done * arithmetic operators (add, sub, mul, div): needed * logical operations (and, or, shl, srl, sra, xor, nor, nand): needed * or: done * f64 support * Comparison operators: SETOEQ unimplemented SETOGT unimplemented SETOGE unimplemented SETOLT unimplemented SETOLE unimplemented SETONE unimplemented SETO done (lowered) SETUO done (lowered) SETUEQ unimplemented SETUGT unimplemented SETUGE unimplemented SETULT unimplemented SETULE unimplemented SETUNE unimplemented * LLVM vector suport * VSETCC needs to be implemented. It's pretty straightforward to code, but needs implementation. * Intrinsics * spu.h instrinsics added but not tested. Need to have an operational llvm-spu-gcc in order to write a unit test harness. ===-------------------------------------------------------------------------===