run post-RA hazard recognizer pass late
authorMark Searles <m.c.searles@gmail.com>
Mon, 16 Jul 2018 10:02:41 +0000 (10:02 +0000)
committerMark Searles <m.c.searles@gmail.com>
Mon, 16 Jul 2018 10:02:41 +0000 (10:02 +0000)
commit72da47df2514bd54b0d9378280625591f9dd2f9e
tree0aa97bb31fda298e3fd93fc969a4e85c14609813
parentc2d5d9adb549fe0374aa6ef60365effafbd580a6
run post-RA hazard recognizer pass late

Memory legalizer, waitcnt, and shrink  passes can perturb the instructions,
which means that the post-RA hazard recognizer pass should run after them.
Otherwise, one of those passes may invalidate the work done by the hazard
recognizer. Note that this has adverse side-effect that any consecutive
S_NOP 0's, emitted by the hazard recognizer, will not be shrunk into a
single S_NOP <N>. This should be addressed in a follow-on patch.

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

llvm-svn: 337154
llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp
llvm/test/CodeGen/AMDGPU/llvm.amdgcn.mov.dpp.ll
llvm/test/CodeGen/AMDGPU/llvm.amdgcn.update.dpp.ll
llvm/test/CodeGen/AMDGPU/memory_clause.ll