HomePhabricator

AMDGPU: Add offsets to MMO when lowering buffer intrinsics

Description

AMDGPU: Add offsets to MMO when lowering buffer intrinsics

Summary:
Without offsets on the MachineMemOperands (MMOs),
MachineInstr::mayAlias() will return true for all reads and writes to the
same resource descriptor. This leads to O(N^2) complexity in the MachineScheduler
when analyzing dependencies of buffer loads and stores. It also limits
the SILoadStoreOptimizer from merging more instructions.

This patch reduces the compile time of one pathological compute shader
from 12 seconds to 1 second.

Reviewers: arsenm, nhaehnle

Reviewed By: arsenm

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

Tags: #llvm

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

Details

Committed
tstellarOct 8 2019, 10:04 AM
Reviewer
arsenm
Differential Revision
D65097: AMDGPU: Add offsets to MMO when lowering buffer intrinsics
Parents
rL374086: [Attributor][Fix] Temporary fix for windows build bot failure
Branches
Unknown
Tags
Unknown