]> granicus.if.org Git - llvm/commit
AMDGPU/LoadStoreOptimizer: combine MMOs when merging instructions
authorTom Stellard <tstellar@redhat.com>
Mon, 29 Jul 2019 16:40:58 +0000 (16:40 +0000)
committerTom Stellard <tstellar@redhat.com>
Mon, 29 Jul 2019 16:40:58 +0000 (16:40 +0000)
commit6b43815b282eb747b6da31f56291033d867a9589
tree2c69c407c879d3ec0927b5a515214f4ed42e81aa
parent510b3b6b248fc32d20651ad9c23bb5a20689d224
AMDGPU/LoadStoreOptimizer: combine MMOs when merging instructions

Summary:
The LoadStoreOptimizer was creating instructions with 2
MachineMemOperands, which meant they were assumed to alias with all other instructions,
because MachineInstr:mayAlias() returns true when an instruction has multiple
MachineMemOperands.

This was preventing these instructions from being merged again, and was
giving the scheduler less freedom to reorder them.

Reviewers: arsenm, nhaehnle

Reviewed By: arsenm

Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367237 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
test/CodeGen/AMDGPU/merge-load-store.mir
test/CodeGen/MIR/AMDGPU/load-store-opt-dlc.mir