mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
dcc4f724cc
This patch adds a new SSA MI pass that runs on little-endian PPC64 code with VSX enabled. Loads and stores of 4x32 and 2x64 vectors without alignment constraints are accomplished for little-endian using lxvd2x/xxswapd and xxswapd/stxvd2x. The existence of the additional xxswapd instructions hurts performance in comparison with big-endian code, but they are necessary in the general case to support correct semantics. However, the general case does not apply to most vector code. Many vector instructions are lane-insensitive; they do not "care" which lanes the parallel computations are performed within, provided that the resulting data is stored into the correct locations. Thus this pass looks for computations that perform only lane-insensitive operations, and remove the unnecessary swaps from loads and stores in such computations. Future improvements will allow computations using certain lane-sensitive operations to also be optimized in this manner, by modifying the lane-sensitive operations to account for the permuted order of the lanes. However, this patch only adds the infrastructure to permit this; no lane-sensitive operations are optimized at this time. This code is heavily exercised by the various vectorizing applications in the projects/test-suite tree. For the time being, I have only added one simple test case to demonstrate what the pass is doing. Although it is quite simple, it provides coverage for much of the code, including the special case handling of copies and subreg-to-reg operations feeding the swaps. I plan to add additional tests in the future as I fill in more of the "special handling" code. Two existing tests were affected, because they expected the swaps to be present, but they are now removed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235910 91177308-0d34-0410-b5e6-96231b3b80d8
47 lines
1.3 KiB
CMake
47 lines
1.3 KiB
CMake
set(LLVM_TARGET_DEFINITIONS PPC.td)
|
|
|
|
tablegen(LLVM PPCGenAsmWriter.inc -gen-asm-writer)
|
|
tablegen(LLVM PPCGenAsmMatcher.inc -gen-asm-matcher)
|
|
tablegen(LLVM PPCGenDisassemblerTables.inc -gen-disassembler)
|
|
tablegen(LLVM PPCGenMCCodeEmitter.inc -gen-emitter)
|
|
tablegen(LLVM PPCGenRegisterInfo.inc -gen-register-info)
|
|
tablegen(LLVM PPCGenInstrInfo.inc -gen-instr-info)
|
|
tablegen(LLVM PPCGenDAGISel.inc -gen-dag-isel)
|
|
tablegen(LLVM PPCGenFastISel.inc -gen-fast-isel)
|
|
tablegen(LLVM PPCGenCallingConv.inc -gen-callingconv)
|
|
tablegen(LLVM PPCGenSubtargetInfo.inc -gen-subtarget)
|
|
add_public_tablegen_target(PowerPCCommonTableGen)
|
|
|
|
add_llvm_target(PowerPCCodeGen
|
|
PPCAsmPrinter.cpp
|
|
PPCBranchSelector.cpp
|
|
PPCCTRLoops.cpp
|
|
PPCHazardRecognizers.cpp
|
|
PPCInstrInfo.cpp
|
|
PPCISelDAGToDAG.cpp
|
|
PPCISelLowering.cpp
|
|
PPCEarlyReturn.cpp
|
|
PPCFastISel.cpp
|
|
PPCFrameLowering.cpp
|
|
PPCLoopDataPrefetch.cpp
|
|
PPCLoopPreIncPrep.cpp
|
|
PPCMCInstLower.cpp
|
|
PPCMachineFunctionInfo.cpp
|
|
PPCRegisterInfo.cpp
|
|
PPCSubtarget.cpp
|
|
PPCTargetMachine.cpp
|
|
PPCTargetObjectFile.cpp
|
|
PPCTargetTransformInfo.cpp
|
|
PPCSelectionDAGInfo.cpp
|
|
PPCTLSDynamicCall.cpp
|
|
PPCVSXCopy.cpp
|
|
PPCVSXFMAMutate.cpp
|
|
PPCVSXSwapRemoval.cpp
|
|
)
|
|
|
|
add_subdirectory(AsmParser)
|
|
add_subdirectory(Disassembler)
|
|
add_subdirectory(InstPrinter)
|
|
add_subdirectory(TargetInfo)
|
|
add_subdirectory(MCTargetDesc)
|