llvm-project/llvm/lib/Target/XCore
Philip Reames 288a95fc8c Seperate volatility and atomicity/ordering in SelectionDAG
At the moment, we mark every atomic memory access as being also volatile. This is unnecessarily conservative and prohibits many legal transforms (DCE, folding, etc..).

This patch removes MOVolatile from the MachineMemOperands of atomic, but not volatile, instructions. This should be strictly NFC after a series of previous patches which have gone in to ensure backend code is conservative about handling of isAtomic MMOs. Once it's in and baked for a bit, we'll start working through removing unnecessary bailouts one by one. We applied this same strategy to the middle end a few years ago, with good success.

To make sure this patch itself is NFC, it is build on top of a series of other patches which adjust code to (for the moment) be as conservative for an atomic access as for a volatile access and build up a test corpus (mostly in test/CodeGen/X86/atomics-unordered.ll)..

Previously landed

    D57593 Fix a bug in the definition of isUnordered on MachineMemOperand
    D57596 [CodeGen] Be conservative about atomic accesses as for volatile
    D57802 Be conservative about unordered accesses for the moment
    rL353959: [Tests] First batch of cornercase tests for unordered atomics.
    rL353966: [Tests] RMW folding tests w/unordered atomic operations.
    rL353972: [Tests] More unordered atomic lowering tests.
    rL353989: [SelectionDAG] Inline a single use helper function, and remove last non-MMO interface
    rL354740: [Hexagon, SystemZ] Be super conservative about atomics
    rL354800: [Lanai] Be super conservative about atomics
    rL354845: [ARM] Be super conservative about atomics

Attention Out of Tree Backend Owners: This patch may break you. If it does, you can use the TLI getMMOFlags hook to restore the MOVolatile to any instruction you need to. (See llvm-dev thread titled "PSA: Changes to how atomics are handled in backends" started Feb 27, 2019.)

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

llvm-svn: 355025
2019-02-27 20:20:08 +00:00
..
Disassembler Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstPrinter Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCTargetDesc Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TargetInfo Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt Consistently sort add_subdirectory calls in lib/Target/*/CMakeLists.txt 2018-04-23 12:49:34 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
README.txt
XCore.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCore.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreAsmPrinter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreCallingConv.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreFrameLowering.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreFrameLowering.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreFrameToArgsOffsetElim.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreISelDAGToDAG.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreISelLowering.cpp Seperate volatility and atomicity/ordering in SelectionDAG 2019-02-27 20:20:08 +00:00
XCoreISelLowering.h Seperate volatility and atomicity/ordering in SelectionDAG 2019-02-27 20:20:08 +00:00
XCoreInstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreInstrInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreInstrInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreInstrInfo.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreLowerThreadLocal.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreMCInstLower.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreMCInstLower.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreMachineFunctionInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreMachineFunctionInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreRegisterInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreRegisterInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreRegisterInfo.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreSelectionDAGInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreSelectionDAGInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreSubtarget.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreSubtarget.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreTargetMachine.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreTargetMachine.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreTargetObjectFile.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreTargetObjectFile.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreTargetStreamer.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCoreTargetTransformInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00

README.txt

To-do
-----

* Instruction encodings
* Tailcalls
* Investigate loop alignment
* Add builtins