]> granicus.if.org Git - llvm/commit
[AMDGPU] Make printf lowering faster when there are no printfs
authorJay Foad <jay.foad@gmail.com>
Wed, 2 Oct 2019 08:44:15 +0000 (08:44 +0000)
committerJay Foad <jay.foad@gmail.com>
Wed, 2 Oct 2019 08:44:15 +0000 (08:44 +0000)
commitf0c173a27b7b0cc8de7678f8c479795feefd824b
tree746d842e3ad497a64016f0d07d40a0207bc230f6
parentc16df692d666081d8ca8eb75153fbe1c309fc158
[AMDGPU] Make printf lowering faster when there are no printfs

Summary:
Printf lowering unconditionally visited every instruction in the module.
To make it faster in the common case where there are no printfs, look up
the printf function (if any) and iterate over its users instead.

Reviewers: rampitec, kzhuravl, alex-t, arsenm

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

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373433 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp