Add TargetLowering::prepareVolatileOrAtomicLoad
One unusual feature of the z architecture is that the result of a previous load can be reused indefinitely for subsequent loads, even if a cache-coherent store to that location is performed by another CPU. A special serializing instruction must be used if you want to force a load to be reattempted. Since volatile loads are not supposed to be omitted in this way, we should insert a serializing instruction before each such load. The same goes for atomic loads. The patch implements this at the IR->DAG boundary, in a similar way to atomic fences. It is a no-op for targets other than SystemZ. llvm-svn: 196905
Showing
- llvm/include/llvm/Target/TargetLowering.h 12 additions, 0 deletionsllvm/include/llvm/Target/TargetLowering.h
- llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp 6 additions, 1 deletionllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
- llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp 9 additions, 0 deletionsllvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
- llvm/lib/Target/SystemZ/SystemZISelLowering.cpp 6 additions, 0 deletionsllvm/lib/Target/SystemZ/SystemZISelLowering.cpp
- llvm/lib/Target/SystemZ/SystemZISelLowering.h 7 additions, 0 deletionsllvm/lib/Target/SystemZ/SystemZISelLowering.h
- llvm/lib/Target/SystemZ/SystemZInstrInfo.td 2 additions, 0 deletionsllvm/lib/Target/SystemZ/SystemZInstrInfo.td
- llvm/lib/Target/SystemZ/SystemZOperators.td 3 additions, 0 deletionsllvm/lib/Target/SystemZ/SystemZOperators.td
- llvm/lib/Target/SystemZ/SystemZProcessors.td 7 additions, 2 deletionsllvm/lib/Target/SystemZ/SystemZProcessors.td
- llvm/lib/Target/SystemZ/SystemZSubtarget.cpp 1 addition, 1 deletionllvm/lib/Target/SystemZ/SystemZSubtarget.cpp
- llvm/lib/Target/SystemZ/SystemZSubtarget.h 4 additions, 0 deletionsllvm/lib/Target/SystemZ/SystemZSubtarget.h
- llvm/test/CodeGen/SystemZ/Large/branch-range-01.py 2 additions, 2 deletionsllvm/test/CodeGen/SystemZ/Large/branch-range-01.py
- llvm/test/CodeGen/SystemZ/Large/branch-range-02.py 1 addition, 1 deletionllvm/test/CodeGen/SystemZ/Large/branch-range-02.py
- llvm/test/CodeGen/SystemZ/Large/branch-range-03.py 2 additions, 2 deletionsllvm/test/CodeGen/SystemZ/Large/branch-range-03.py
- llvm/test/CodeGen/SystemZ/Large/branch-range-04.py 2 additions, 2 deletionsllvm/test/CodeGen/SystemZ/Large/branch-range-04.py
- llvm/test/CodeGen/SystemZ/Large/branch-range-05.py 2 additions, 2 deletionsllvm/test/CodeGen/SystemZ/Large/branch-range-05.py
- llvm/test/CodeGen/SystemZ/Large/branch-range-06.py 2 additions, 2 deletionsllvm/test/CodeGen/SystemZ/Large/branch-range-06.py
- llvm/test/CodeGen/SystemZ/Large/branch-range-09.py 2 additions, 2 deletionsllvm/test/CodeGen/SystemZ/Large/branch-range-09.py
- llvm/test/CodeGen/SystemZ/Large/branch-range-10.py 2 additions, 2 deletionsllvm/test/CodeGen/SystemZ/Large/branch-range-10.py
- llvm/test/CodeGen/SystemZ/Large/branch-range-11.py 4 additions, 4 deletionsllvm/test/CodeGen/SystemZ/Large/branch-range-11.py
- llvm/test/CodeGen/SystemZ/Large/branch-range-12.py 4 additions, 4 deletionsllvm/test/CodeGen/SystemZ/Large/branch-range-12.py
Loading
Please register or sign in to comment