Skip to content

[SPIR-V] Add SPIRVGlobalInstrRegistry, don't emit OpEntryPoint/OpName in MF#257

Draft
michalpaszkowski wants to merge 5 commits intofeature/spirv-backend-llvm15_0_7_4from
refactor_SPIRVModuleAnalysis_OpEntryPoints
Draft

[SPIR-V] Add SPIRVGlobalInstrRegistry, don't emit OpEntryPoint/OpName in MF#257
michalpaszkowski wants to merge 5 commits intofeature/spirv-backend-llvm15_0_7_4from
refactor_SPIRVModuleAnalysis_OpEntryPoints

Conversation

@michalpaszkowski
Copy link
Member

@michalpaszkowski michalpaszkowski commented Apr 6, 2023

This is a work in progress in an effort to declutter SPIRVModuleAnalysis and avoid emitting global (module-level) instructions in MF.

IRTranslator lowers switches to [G_SUB] + G_ICMP + G_BRCOND + G_BR
sequences. Since values and destination MBBs are included in the
spv_switch intrinsics, the sequences are not needed for ISel.

Before this commit, the information decoded by these sequences were
added to spv_switch intrinsics in SPIRVPreLegalizer and the sequences
were kept until SPIRVModuleAnalysis where they were marked skipped for
emission.

After this commit, the [G_SUB] + G_ICMP + G_BRCOND + G_BR sequences
and MBBs containing only these MIs are erased in SPIRVPreLegalizer.
@michalpaszkowski michalpaszkowski force-pushed the refactor_SPIRVModuleAnalysis_OpEntryPoints branch 3 times, most recently from 1ed9add to 00a3c26 Compare April 10, 2023 10:13
@michalpaszkowski michalpaszkowski force-pushed the refactor_SPIRVModuleAnalysis_OpEntryPoints branch from 00a3c26 to ed5372c Compare April 10, 2023 11:14
@michalpaszkowski michalpaszkowski changed the title [SPIR-V] Add SPIRVGlobalInstrRegistry, don't emit OpEntryPoint in MF [SPIR-V] Add SPIRVGlobalInstrRegistry, don't emit OpEntryPoint/OpName in MF Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant