AMDGPU/GlobalISel: Use same builder/observer in post-legalizer-combiner
authorPetar Avramovic <Petar.Avramovic@amd.com>
Tue, 3 Nov 2020 08:23:56 +0000 (09:23 +0100)
committerPetar Avramovic <Petar.Avramovic@amd.com>
Tue, 3 Nov 2020 08:24:50 +0000 (09:24 +0100)
commit0031418dce3e06b8ca98ad1ec048e4833785bdaa
tree81f09116e59ec8c14f708b2d0d402d066d62b2db
parentd3bd06f5c709fe073739a06e0d5a22020f0bf90c
AMDGPU/GlobalISel: Use same builder/observer in post-legalizer-combiner

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.

Differential Revision: https://reviews.llvm.org/D90623
llvm/lib/Target/AMDGPU/AMDGPUCombine.td
llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp