Skip to content

Commit c081937

Browse files
committed
update comment
1 parent 1225c2f commit c081937

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp

+4-6
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,10 @@ void SPIRVPassConfig::addIRPasses() {
191191
TargetPassConfig::addIRPasses();
192192

193193
if (TM.getSubtargetImpl()->isVulkanEnv()) {
194-
// The frontend has a tendency to quickly addrspacecast pointers to the
195-
// default address space, and relies on addrspacecast instructions at the
196-
// boundaries. Vulkan does not allow such things, and we must keep the
197-
// pointer address space stable.
198-
// This pass will determine real address space of a pointer, and patch
199-
// instructions removing Addrspacecasts.
194+
// Vulkan does not allow address space casts. This pass is run to remove
195+
// address space casts that can be removed.
196+
// If an address space cast is not removed while targeting Vulkan, lowering
197+
// will fail during MIR lowering.
200198
addPass(createInferAddressSpacesPass(/* AddressSpace= */ 0));
201199

202200
// 1. Simplify loop for subsequent transformations. After this steps, loops

0 commit comments

Comments
 (0)