Skip to content

Commit

Permalink
[amdgpu] Skip non-instruction values in CF user tracing.
Browse files Browse the repository at this point in the history
Summary:
- 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.

Reviewers: alex-t, rampitec

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

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72174
  • Loading branch information
darkbuck committed Jan 3, 2020
1 parent fed2a50 commit 3566c75
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions llvm/lib/Target/AMDGPU/SIISelLowering.cpp
Expand Up @@ -11023,6 +11023,8 @@ SITargetLowering::getRegClassFor(MVT VT, bool isDivergent) const {
}

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;
Expand Down

0 comments on commit 3566c75

Please sign in to comment.