llvm-project/llvm/lib/Target/Sparc
Fangrui Song f4c16c4473 [MC] llvm::Optional => std::optional
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2022-12-04 21:36:08 +00:00
..
AsmParser Fix "not all control paths return a value" MSVC warning. NFC. 2022-06-06 11:31:46 +01:00
Disassembler [llvm] Use std::size instead of llvm::array_lengthof 2022-09-08 09:01:53 -06:00
MCTargetDesc [MC] llvm::Optional => std::optional 2022-12-04 21:36:08 +00:00
TargetInfo [Sparc] Don't claim JIT support on SPARC for now 2022-07-15 08:18:40 +02:00
CMakeLists.txt [Sparc] Don't claim JIT support on SPARC for now 2022-07-15 08:18:40 +02:00
DelaySlotFiller.cpp
LeonFeatures.td
LeonPasses.cpp
LeonPasses.h
README.txt
Sparc.h
Sparc.td [Sparc] Fix useDeprecatedPositionallyEncodedOperands errors. 2022-10-26 14:06:07 -04:00
SparcAsmPrinter.cpp [CodeGen] Move instruction predicate verification to emitInstruction 2022-07-14 09:33:28 +01:00
SparcCallingConv.td [SPARC] Make calls to function with big return values work 2022-10-18 00:01:55 +00:00
SparcFrameLowering.cpp [SPARC] Don't do leaf optimization on procedures with inline assembly 2022-06-27 15:09:30 +02:00
SparcFrameLowering.h
SparcISelDAGToDAG.cpp
SparcISelLowering.cpp [SPARC] Add tail call support for 64-bit target 2022-11-26 23:29:05 -05:00
SparcISelLowering.h [SPARC] Don't emit deprecated FP branches when targeting v9 2022-11-16 20:56:17 -05:00
SparcInstr64Bit.td [SPARC] Improve integer branch handling for v9 targets 2022-11-16 20:51:20 -05:00
SparcInstrAliases.td
SparcInstrFormats.td
SparcInstrInfo.cpp [SPARC] Improve integer branch handling for v9 targets 2022-11-16 20:51:20 -05:00
SparcInstrInfo.h
SparcInstrInfo.td [SPARC] Don't emit deprecated FP branches when targeting v9 2022-11-16 20:56:17 -05:00
SparcInstrVIS.td
SparcMCInstLower.cpp
SparcMachineFunctionInfo.cpp llvm-reduce: Add cloning of target MachineFunctionInfo 2022-06-07 10:14:48 -04:00
SparcMachineFunctionInfo.h llvm-reduce: Add cloning of target MachineFunctionInfo 2022-06-07 10:14:48 -04:00
SparcRegisterInfo.cpp PEI should be able to use backward walk in replaceFrameIndicesBackward. 2022-11-18 15:57:34 +01:00
SparcRegisterInfo.h PEI should be able to use backward walk in replaceFrameIndicesBackward. 2022-11-18 15:57:34 +01:00
SparcRegisterInfo.td
SparcSchedule.td
SparcSubtarget.cpp
SparcSubtarget.h
SparcTargetMachine.cpp CodeGen/CommandFlags: Convert Optional to std::optional 2022-12-03 18:38:12 +00:00
SparcTargetMachine.h CodeGen/CommandFlags: Convert Optional to std::optional 2022-12-03 18:38:12 +00:00
SparcTargetObjectFile.cpp
SparcTargetObjectFile.h

README.txt

To-do
-----

* Keep the address of the constant pool in a register instead of forming its
  address all of the time.
* We can fold small constant offsets into the %hi/%lo references to constant
  pool addresses as well.
* When in V9 mode, register allocate %icc[0-3].
* Add support for isel'ing UMUL_LOHI instead of marking it as Expand.
* Emit the 'Branch on Integer Register with Prediction' instructions.  It's
  not clear how to write a pattern for this though:

float %t1(int %a, int* %p) {
        %C = seteq int %a, 0
        br bool %C, label %T, label %F
T:
        store int 123, int* %p
        br label %F
F:
        ret float undef
}

codegens to this:

t1:
        save -96, %o6, %o6
1)      subcc %i0, 0, %l0
1)      bne .LBBt1_2    ! F
        nop
.LBBt1_1:       ! T
        or %g0, 123, %l0
        st %l0, [%i1]
.LBBt1_2:       ! F
        restore %g0, %g0, %g0
        retl
        nop

1) should be replaced with a brz in V9 mode.

* Same as above, but emit conditional move on register zero (p192) in V9
  mode.  Testcase:

int %t1(int %a, int %b) {
        %C = seteq int %a, 0
        %D = select bool %C, int %a, int %b
        ret int %D
}

* Emit MULX/[SU]DIVX instructions in V9 mode instead of fiddling
  with the Y register, if they are faster.

* Codegen bswap(load)/store(bswap) -> load/store ASI

* Implement frame pointer elimination, e.g. eliminate save/restore for
  leaf fns.
* Fill delay slots

* Use %g0 directly to materialize 0. No instruction is required.