This is an archive of the discontinued LLVM Phabricator instance.

[amdgpu] Skip non-instruction values in CF user tracing.
ClosedPublic

Authored by hliao on Jan 3 2020, 12:11 PM.

Details

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.

Diff Detail

Event Timeline

hliao created this revision.Jan 3 2020, 12:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 3 2020, 12:11 PM
hliao added a comment.Jan 3 2020, 12:13 PM

one compilation is reduced from 460s to 121s after this trivial change.

arsenm accepted this revision.Jan 3 2020, 12:16 PM

Where is this being called from that it's so expensive?

This revision is now accepted and ready to land.Jan 3 2020, 12:16 PM
hliao added a comment.Jan 3 2020, 12:59 PM

Where is this being called from that it's so expensive?

the tracking through the D-U chain may step into other functions even though the lowering itself is a function pass. for modules with lots of functions, that implies the almost whole module IR is traversed each time a function is lowered. that's the unnecessary overhead.

This revision was automatically updated to reflect the committed changes.