[PATCH] D72174: [amdgpu] Skip non-instruction values in CF user tracing.
Michael Liao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 3 12:12:02 PST 2020
hliao created this revision.
hliao added reviewers: alex-t, rampitec.
Herald added subscribers: llvm-commits, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, jvesely, kzhuravl, arsenm.
Herald added a project: LLVM.
- CF users won't be non-instruction values. Skip them to save the compilation time. It's especially true when there are multiple functions in that module, where, says, a constant may be used in most functions. The current CF user tracing adds significant overhead.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D72174
Files:
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
Index: llvm/lib/Target/AMDGPU/SIISelLowering.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+++ llvm/lib/Target/AMDGPU/SIISelLowering.cpp
@@ -11023,6 +11023,8 @@
}
static bool hasCFUser(const Value *V, SmallPtrSet<const Value *, 16> &Visited) {
+ if (!isa<Instruction>(V))
+ return false;
if (!Visited.insert(V).second)
return false;
bool Result = false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72174.236105.patch
Type: text/x-patch
Size: 445 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200103/5d3565fe/attachment.bin>
More information about the llvm-commits
mailing list