[all-commits] [llvm/llvm-project] 982780: AMDGPU: Limit the search in finding the instructio...
Changpeng Fang via All-commits
all-commits at lists.llvm.org
Thu Feb 6 16:41:12 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 982780648124243131c6617c0d97fc1cb02d4e75
https://github.com/llvm/llvm-project/commit/982780648124243131c6617c0d97fc1cb02d4e75
Author: Changpeng Fang <changpeng.fang at gmail.com>
Date: 2020-02-06 (Thu, 06 Feb 2020)
Changed paths:
M llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
M llvm/test/CodeGen/AMDGPU/v_swap_b32.mir
Log Message:
-----------
AMDGPU: Limit the search in finding the instruction pattern for v_swap generation.
Summary:
Current implementation of matchSwap in SIShrinkInstructions searches the entire
use_nodbg_operands set to find the possible pattern to generate v_swap instruction.
This approach will lead to a O(N^3) in compile time for SIShrinkInstructions.
But in reality, the matching pattern only exists within nearby instructions in the
same basic block. This work limits the search to a maximum of 16 instructions, and has
a linear compile time comsumption.
Reviewers:
rampitec, arsenm
Differential Revision: https://reviews.llvm.org/D74180
More information about the All-commits
mailing list