This is an archive of the discontinued LLVM Phabricator instance.

[SPIR-V] Rename SPIRVGlobalRegistry to SPIRVGlobalObjectRegistry
Needs ReviewPublic

Authored by mpaszkowski on Apr 27 2023, 11:00 AM.

Details

Summary

This patch renames SPIRVGlobalRegistry to SPIRVGlobalObjectRegistry -- in preparation for adding SPIRVGlobalInstrRegistry (will create a separate revision and link below). This patch also marks GlobalObjectRegistry find/add method arguments as const.

Diff Detail

Event Timeline

mpaszkowski created this revision.Apr 27 2023, 11:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2023, 11:00 AM
mpaszkowski requested review of this revision.Apr 27 2023, 11:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2023, 11:00 AM
iliya-diyachkov added inline comments.May 4 2023, 5:09 AM
llvm/lib/Target/SPIRV/Registries/SPIRVGlobalObjectRegistry.cpp
1–2

The same suggestion as for SPIRVGlobalObjectRegistry.h.

8

The same issue.

16

The same issue.

llvm/lib/Target/SPIRV/Registries/SPIRVGlobalObjectRegistry.h
1–2

This line break doesn't look very nice. There are such examples in llvm, but much more often this comment is written in one line. We could use something like this

//==- SPIRVGlobalObjectRegistry.h - SPIR-V Global Object Registry -*- C++ -*-=//

On other hand, you are going to introduce SPIRVGlobalInstrRegistry files in the next step, reducing Instruction to Instr. So it may be a suitable solution (in the same way) to use Obj instead of Object in the file/class name. It's still meaningful, and the names won't be so long.

8

The preferred string length is 80 characters.

15

The same issue