[PATCH] D116465: [SPIRV 6/6] Add one essential pass and the simplest tests
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 14 15:29:00 PST 2022
arsenm added a comment.
In D116465#3320801 <https://reviews.llvm.org/D116465#3320801>, @iliya-diyachkov wrote:
> @arsenm, when you suggested moving GlobalTypesAndRegNum' operations to AsmPrinter, did you implied that we need to insert SPIRVDummyGlobalPass after all SPIRVGISel passes to have whole MIR at the first run of AsmPrinter? Or is there another approach (or some pass configuration) to achieve the correct processing of the whole MIR in AsmPrinter?
If you can emit this global information at the end of the printed module instead of the start, that would be easiest. If you really have to emit it at the top, you may be able to get away with something similar to what AMDGPU does for reporting total register counts used in the presence of indirect function calls. AMDGPUAsmPrinter depends on a module analysis, AMDGPUResourceUsageAnalysis. This effectively forces all functions to be codegened before final emission (which does have an associated compile time / memory cost)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116465/new/
https://reviews.llvm.org/D116465
More information about the llvm-commits
mailing list