llvm-project/llvm/lib/Target/Mips
Aleksandar Beserminji 3239ba8c0e [mips] Fix atomic operations at O0, v3
Similar to PR/25526, fast-regalloc introduces spills at the end of basic
blocks. When this occurs in between an ll and sc, the stores can cause the
atomic sequence to fail.

This patch fixes the issue by introducing more pseudos to represent atomic
operations and moving their lowering to after the expansion of postRA
pseudos.

This version addresses issues with the initial implementation and covers
all atomic operations.

This resolves PR/32020.

Thanks to James Cowgill for reporting the issue!

Patch By: Simon Dardis

Differential Revision: https://reviews.llvm.org/D31287

llvm-svn: 336328
2018-07-05 09:27:05 +00:00
..
AsmParser Add Triple::isMIPS()/isMIPS32()/isMIPS64(). NFC 2018-06-25 16:49:20 +00:00
Disassembler [mips] Fix the definitions of lwp, swp 2018-05-25 16:15:48 +00:00
InstPrinter [llvm] Remove redundant return [NFC] 2017-11-12 03:47:50 +00:00
MCTargetDesc Add Triple::isMIPS()/isMIPS32()/isMIPS64(). NFC 2018-06-25 16:49:20 +00:00
TargetInfo Add backend name to Target to enable runtime info to be fed back into TableGen 2017-11-15 23:55:44 +00:00
CMakeLists.txt [mips] Fix atomic operations at O0, v3 2018-07-05 09:27:05 +00:00
LLVMBuild.txt [MIPS GlobalISel] Adding GlobalISel 2018-02-23 11:06:40 +00:00
MSA.txt
MicroMips32r6InstrFormats.td [mips] Sink PredicateControl further down the class hierarchy. 2018-05-30 12:40:53 +00:00
MicroMips32r6InstrInfo.td [mips] Fix the predicates of some aliases 2018-06-19 15:25:01 +00:00
MicroMipsDSPInstrFormats.td [mips] Fix the predicates of some DSP instructions from AdditionalPredicates to ASEPredicate 2018-06-20 13:29:57 +00:00
MicroMipsDSPInstrInfo.td [mips] Fix the predicates of some DSP instructions from AdditionalPredicates to ASEPredicate 2018-06-20 13:29:57 +00:00
MicroMipsInstrFPU.td [X86][MIPS][ARM] New machine instruction property 'isMoveReg' 2018-05-23 15:28:28 +00:00
MicroMipsInstrFormats.td [mips] Add licensing information of the microMIPS tablegen files. (NFC) 2018-06-15 13:29:35 +00:00
MicroMipsInstrInfo.td [mips] Add microMIPS specific addressing patterns. 2018-06-20 22:40:12 +00:00
MicroMipsSizeReduction.cpp [mips][microMIPS] Extending size reduction pass with LWP and SWP 2018-06-13 12:51:37 +00:00
Mips.h [mips] Fix atomic operations at O0, v3 2018-07-05 09:27:05 +00:00
Mips.td [mips] Add support for Global INValidate ASE 2018-05-17 16:30:32 +00:00
Mips16FrameLowering.cpp [mips] Support shrink-wrapping 2018-06-29 16:37:16 +00:00
Mips16FrameLowering.h
Mips16HardFloat.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
Mips16HardFloatInfo.cpp
Mips16HardFloatInfo.h
Mips16ISelDAGToDAG.cpp [Mips] Remove uneeded variants of ADDC/ADDE lowering 2018-06-05 22:13:56 +00:00
Mips16ISelDAGToDAG.h
Mips16ISelLowering.cpp Target/TargetInstrInfo.h -> CodeGen/TargetInstrInfo.h to match layering 2017-11-08 01:01:31 +00:00
Mips16ISelLowering.h
Mips16InstrFormats.td
Mips16InstrInfo.cpp Change TII isCopyInstr way of returning arguments(NFC) 2018-06-06 16:36:30 +00:00
Mips16InstrInfo.h Change TII isCopyInstr way of returning arguments(NFC) 2018-06-06 16:36:30 +00:00
Mips16InstrInfo.td [Mips] Remove uneeded variants of ADDC/ADDE lowering 2018-06-05 22:13:56 +00:00
Mips16RegisterInfo.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
Mips16RegisterInfo.h
Mips32r6InstrFormats.td [mips] Sink PredicateControl further down the class hierarchy. 2018-05-30 12:40:53 +00:00
Mips32r6InstrInfo.td [mips] Correct the predicates of the cache and pref instructions 2018-05-22 10:55:05 +00:00
Mips64InstrInfo.td [mips] Fix atomic operations at O0, v3 2018-07-05 09:27:05 +00:00
Mips64r6InstrInfo.td [mips] Accept 32-bit offsets for ld/sd/lld commands 2018-05-10 16:01:36 +00:00
MipsAnalyzeImmediate.cpp
MipsAnalyzeImmediate.h
MipsAsmPrinter.cpp [DebugInfo] Examine all uses of isDebugValue() for debug instructions. 2018-05-09 02:42:00 +00:00
MipsAsmPrinter.h [X86][Mips] Remove unused method declaration from the X86 and Mips AsmPrinters. 2017-12-08 23:30:03 +00:00
MipsBranchExpansion.cpp [mips] Extend LONG_BRANCH_LUi/ADDiu with extra parameter 2018-06-12 10:23:49 +00:00
MipsCCState.cpp MachineFunction: Return reference from getFunction(); NFC 2017-12-15 22:22:58 +00:00
MipsCCState.h
MipsCallLowering.cpp [MIPS GlobalISel] Lower arguments using stack 2018-07-03 09:31:48 +00:00
MipsCallLowering.h [MIPS GlobalISel] Lower arguments using stack 2018-07-03 09:31:48 +00:00
MipsCallingConv.td
MipsCondMov.td [mips] Mark select instructions correctly 2018-05-15 16:05:04 +00:00
MipsConstantIslandPass.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
MipsDSPInstrFormats.td [mips] Sink PredicateControl further down the class hierarchy. 2018-05-30 12:40:53 +00:00
MipsDSPInstrInfo.td [mips] Fix the predicates of some DSP instructions from AdditionalPredicates to ASEPredicate 2018-06-20 13:29:57 +00:00
MipsDelaySlotFiller.cpp [mips][microMIPS] Extending size reduction pass with LWP and SWP 2018-06-13 12:51:37 +00:00
MipsEVAInstrFormats.td [mips] Sink PredicateControl further down the class hierarchy. 2018-05-30 12:40:53 +00:00
MipsEVAInstrInfo.td [mips] Correct the definitions of the unaligned word memory operation instructions 2018-04-19 13:33:51 +00:00
MipsExpandPseudo.cpp [mips] Fix atomic operations at O0, v3 2018-07-05 09:27:05 +00:00
MipsFastISel.cpp [Mips][FastISel] Do not duplicate condition while lowering branches 2018-07-02 08:56:57 +00:00
MipsFrameLowering.cpp [mips] Use register scavenging with MSA. 2017-11-02 12:47:22 +00:00
MipsFrameLowering.h [mips] Support shrink-wrapping 2018-06-29 16:37:16 +00:00
MipsISelDAGToDAG.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
MipsISelDAGToDAG.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
MipsISelLowering.cpp [mips] Fix atomic operations at O0, v3 2018-07-05 09:27:05 +00:00
MipsISelLowering.h [mips] Fix atomic operations at O0, v3 2018-07-05 09:27:05 +00:00
MipsInstrFPU.td [mips] Guard some floating point instructions correctly 2018-06-12 10:28:06 +00:00
MipsInstrFormats.td [mips] Correct predicates for loads, bit manipulation instructions and some pseudos 2018-06-20 19:59:58 +00:00
MipsInstrInfo.cpp [mips] Add support for isBranchOffsetInRange and use it for MipsLongBranch 2018-05-16 10:03:05 +00:00
MipsInstrInfo.h [mips] Add support for isBranchOffsetInRange and use it for MipsLongBranch 2018-05-16 10:03:05 +00:00
MipsInstrInfo.td [mips] Fix atomic operations at O0, v3 2018-07-05 09:27:05 +00:00
MipsInstructionSelector.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
MipsLegalizerInfo.cpp [GlobalISel][Mips] LegalizerInfo verifier: Adding LegalizerInfo::verify(...) call for Mips 2018-05-31 16:16:49 +00:00
MipsLegalizerInfo.h [MIPS GlobalISel] Adding GlobalISel 2018-02-23 11:06:40 +00:00
MipsMCInstLower.cpp [mips] Extend LONG_BRANCH_LUi/ADDiu with extra parameter 2018-06-12 10:23:49 +00:00
MipsMCInstLower.h [mips] Extend LONG_BRANCH_LUi/ADDiu with extra parameter 2018-06-12 10:23:49 +00:00
MipsMSAInstrFormats.td [mips] Correct predicates for MSA pseudo instructions 2018-06-14 13:03:53 +00:00
MipsMSAInstrInfo.td [X86][MIPS][ARM] New machine instruction property 'isMoveReg' 2018-05-23 15:28:28 +00:00
MipsMTInstrFormats.td [mips] Sink PredicateControl further down the class hierarchy. 2018-05-30 12:40:53 +00:00
MipsMTInstrInfo.td Reland "[mips][mt][6/7] Add support for mftr, mttr instructions." 2017-11-14 22:26:42 +00:00
MipsMachineFunction.cpp [mips] Removal of microMIPS64R6 2017-12-11 11:21:40 +00:00
MipsMachineFunction.h
MipsModuleISelDAGToDAG.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
MipsOptimizePICCall.cpp Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
MipsOptionRecord.h
MipsOs16.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
MipsRegisterBankInfo.cpp [MIPS GlobalISel] remove superfluous #includes (NFC) 2018-04-12 17:01:46 +00:00
MipsRegisterBankInfo.h [MIPS GlobalISel] Select add i32, i32 2018-04-11 15:12:32 +00:00
MipsRegisterBanks.td [MIPS GlobalISel] Select add i32, i32 2018-04-11 15:12:32 +00:00
MipsRegisterInfo.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
MipsRegisterInfo.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
MipsRegisterInfo.td Trivial commit to force LLVM to run TableGen for Mips target after 2017-12-20 12:45:40 +00:00
MipsSEFrameLowering.cpp [mips] Support shrink-wrapping 2018-06-29 16:37:16 +00:00
MipsSEFrameLowering.h [Mips] Remove dead code 2018-03-29 09:21:20 +00:00
MipsSEISelDAGToDAG.cpp [mips] Correct predicates for loads, bit manipulation instructions and some pseudos 2018-06-20 19:59:58 +00:00
MipsSEISelDAGToDAG.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
MipsSEISelLowering.cpp [Mips] Remove uneeded variants of ADDC/ADDE lowering 2018-06-05 22:13:56 +00:00
MipsSEISelLowering.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
MipsSEInstrInfo.cpp [Mips] Silencing warnings in instruction info (NFC) 2018-06-07 13:06:06 +00:00
MipsSEInstrInfo.h Change TII isCopyInstr way of returning arguments(NFC) 2018-06-06 16:36:30 +00:00
MipsSERegisterInfo.cpp [mips] Add microMIPSR6 ll/sc instructions. 2018-05-20 17:21:00 +00:00
MipsSERegisterInfo.h
MipsSchedule.td [mips] Add support for Global INValidate ASE 2018-05-17 16:30:32 +00:00
MipsScheduleGeneric.td [MIPS] Fix DIV/DIVU scheduling classes. 2018-05-02 13:37:28 +00:00
MipsScheduleP5600.td [SchedModel] Complete models shouldn't match against itineraries when they don't use them (PR35639) 2018-04-05 13:11:36 +00:00
MipsSubtarget.cpp [mips] Warn when crc, ginv, virt flags are used with too old revision 2018-07-04 19:26:31 +00:00
MipsSubtarget.h [mips] Warn when crc, ginv, virt flags are used with too old revision 2018-07-04 19:26:31 +00:00
MipsTargetMachine.cpp [mips] Fix atomic operations at O0, v3 2018-07-05 09:27:05 +00:00
MipsTargetMachine.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
MipsTargetObjectFile.cpp [MIPS] Don't crash on unsized extern types with -mgpopt 2018-01-26 15:56:14 +00:00
MipsTargetObjectFile.h
MipsTargetStreamer.h [mips] Add support for Global INValidate ASE 2018-05-17 16:30:32 +00:00
Relocation.txt [mips] Removal of microMIPS64R6 2017-12-11 11:21:40 +00:00