[AMDGPU] Add new Mode Register pass
authorTim Corringham <tcorring@amd.com>
Mon, 10 Dec 2018 12:06:10 +0000 (12:06 +0000)
committerTim Corringham <tcorring@amd.com>
Mon, 10 Dec 2018 12:06:10 +0000 (12:06 +0000)
commit4c4d2fe280bc8a04598e7e9d75c63fb64ee4cd81
tree30dc08ac8b95ec64acd2ef885b4b18d0d33ca3ee
parenta06b163d5cee8114cd34c4565bbf1d5f28554684
[AMDGPU] Add new Mode Register pass

A new pass to manage the Mode register.

Currently this just manages the floating point double precision
rounding requirements, but is intended to be easily extended to
encompass all Mode register settings.

The immediate motivation comes from the requirement to use the
round-to-zero rounding mode for the 16 bit interpolation
instructions, where the rounding mode setting is shared between
16 and 64 bit operations.

llvm-svn: 348754
12 files changed:
llvm/lib/Target/AMDGPU/AMDGPU.h
llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
llvm/lib/Target/AMDGPU/CMakeLists.txt
llvm/lib/Target/AMDGPU/SIDefines.h
llvm/lib/Target/AMDGPU/SIInstrFormats.td
llvm/lib/Target/AMDGPU/SIInstrInfo.h
llvm/lib/Target/AMDGPU/SIModeRegister.cpp [new file with mode: 0644]
llvm/lib/Target/AMDGPU/VOP1Instructions.td
llvm/lib/Target/AMDGPU/VOP2Instructions.td
llvm/lib/Target/AMDGPU/VOP3Instructions.td
llvm/lib/Target/AMDGPU/VOP3PInstructions.td
llvm/test/CodeGen/AMDGPU/mode-register.mir [new file with mode: 0644]