Page MenuHomePhabricator

AMDGPU/GlobalISel: Use same builder/observer in post-legalizer-combiner
ClosedPublic

Authored by Petar.Avramovic on Nov 2 2020, 9:23 AM.

Details

Summary

Change match/apply functions into methods of new target specific combiner
helper class. Use reference to MachineIRBuilder from helper instead of
constructing new MachineIRBuilder each time new instruction needs to made.
Allows correct tracking of newly created instructions.

Diff Detail

Event Timeline

Petar.Avramovic created this revision.Nov 2 2020, 9:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 2 2020, 9:23 AM
Petar.Avramovic requested review of this revision.Nov 2 2020, 9:23 AM
arsenm added a comment.Nov 2 2020, 9:27 AM

Also see D81899

llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp
179

setInstrAndDebugLoc (we should really just fix this terrible API to make with-debug the normal case)

232

AndDebugLoc

arsenm added a comment.Nov 2 2020, 9:27 AM
This comment was removed by arsenm.

Use setInstrAndDebugLoc.

arsenm accepted this revision.Nov 2 2020, 10:52 AM
This revision is now accepted and ready to land.Nov 2 2020, 10:52 AM