This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Enable LICM in the BE pipeline
ClosedPublic

Authored by rampitec on Jun 26 2018, 12:12 PM.

Details

Summary

This allows to hoist code portion to compute reciprocal of loop
invariant denominator in integer division after codegen prepare
expansion.

Diff Detail

Repository
rL LLVM

Event Timeline

rampitec created this revision.Jun 26 2018, 12:12 PM
arsenm added inline comments.Jun 28 2018, 10:27 AM
lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
642 ↗(On Diff #153337)

Why here? Does this trigger a dominator tree recalculation? If so can it be moved somewhere else where it's already available?

rampitec added inline comments.Jun 28 2018, 10:32 AM
lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
642 ↗(On Diff #153337)

I can move it into the top of addStraightLineScalarOptimizationPasses(). This will be after the SROA, so DT will exist.

rampitec updated this revision to Diff 153351.Jun 28 2018, 10:43 AM
rampitec marked 2 inline comments as done.

Moved LICM post SROA.

arsenm accepted this revision.Jun 29 2018, 8:27 AM

LGTM

This revision is now accepted and ready to land.Jun 29 2018, 8:27 AM
This revision was automatically updated to reflect the committed changes.