This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Constrain the inliner on maximum number of basic blocks in a caller function
ClosedPublic

Authored by vpykhtin on Jun 5 2019, 10:02 AM.

Details

Summary

This patch improves compile time performance: luxmark hotel scene compilation time is reduced from 250 to 6 sec.

The actual check is performed last to give a change to inline what have to be always inlined.

Diff Detail

Repository
rL LLVM

Event Timeline

vpykhtin created this revision.Jun 5 2019, 10:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 5 2019, 10:02 AM
rampitec added inline comments.Jun 5 2019, 11:20 AM
lib/Target/AMDGPU/AMDGPUInline.cpp
53 ↗(On Diff #203187)

Use prefix amdgpu.

arsenm added inline comments.Jun 5 2019, 11:28 AM
lib/Target/AMDGPU/AMDGPUInline.cpp
53 ↗(On Diff #203187)

Should add a comment explaining this is a compile time hack

test/CodeGen/AMDGPU/inline-maxbb.ll
1–2 ↗(On Diff #203187)

Should only run the amdgpu-inline pass, not all of -O3

vpykhtin updated this revision to Diff 203288.Jun 5 2019, 11:33 PM

updated diff with per review issues done.

vpykhtin marked 3 inline comments as done.Jun 5 2019, 11:33 PM
rampitec accepted this revision.Jun 6 2019, 6:47 AM

LGTM

This revision is now accepted and ready to land.Jun 6 2019, 6:47 AM
This revision was automatically updated to reflect the committed changes.