This is an archive of the discontinued LLVM Phabricator instance.

Add optimization bisect opt-in calls for AMDGPU passes
ClosedPublic

Authored by andrew.w.kaylor on Apr 22 2016, 6:19 PM.

Details

Summary

This patch adds calls to AMDGPU-specific passes that can be safely skipped to opt-in to the optimization bisect mechanism.

The following passes are not calling the opt-in function:

AMDGPUAlwaysInline
AMDGPUAnnotateKernelFeatures
AMDGPUCFGStructurizer
AMDGPUOpenCLImageTypeLoweringPass
R600ControlFlowFinalizer
R600EmitClauseMarkers
R600ExpandSpecialInstrsPass
R600Packetizer
R600TextureIntrinsicsReplacer
SIAnnotateControlFlow
SIFixControlFlowLiveIntervals
SIFixSGPRCopies
SIInsertNops
SIInsertWaits
SILowerControlFlow
SILowerI1Copies
SITypeRewriter
SIWholeQuadMode

Note that the call to skipFunction() will also check for the "optnone" function attribute, so this can theoretically result in passes being skipped even when optimization bisect is not being done. However, I believe that any pass that can be safely skipped should be skipped for functions with the optnone attribute. Where the OptNone function attribute was being checked, it is now being checked within the call to skipFunction().

Diff Detail

Repository
rL LLVM

Event Timeline

andrew.w.kaylor retitled this revision from to Add optimization bisect opt-in calls for AMDGPU passes.
andrew.w.kaylor updated this object.
andrew.w.kaylor added a reviewer: tstellarAMD.
andrew.w.kaylor set the repository for this revision to rL LLVM.
andrew.w.kaylor added a subscriber: llvm-commits.
arsenm accepted this revision.Apr 22 2016, 6:21 PM
arsenm added a reviewer: arsenm.

LGTM

This revision is now accepted and ready to land.Apr 22 2016, 6:21 PM

Note that the call to skipFunction() will also check for the "optnone" function attribute, so this can theoretically result in passes being skipped even when optimization bisect is not being done. However, I believe that any pass that can be safely skipped should be skipped for functions with the optnone attribute. Where the OptNone function attribute was being checked, it is now being checked within the call to skipFunction().

The original optnone implementation never got to targets other than X86, so thank you for this!

This revision was automatically updated to reflect the committed changes.