|
39 | 39 | // For a kind 3 variable (alloca w/o metadata) this pass creates a WG-shared
|
40 | 40 | // local "shadow" variable. Before each PFWI invocation leader WI stores its
|
41 | 41 | // private copy of the variable into the shadow (under "is leader" guard), then
|
42 |
| -// all WIs (ouside of "is leader" guard) load the shadow value into their |
| 42 | +// all WIs (outside of "is leader" guard) load the shadow value into their |
43 | 43 | // private copies ("materialize" the private copy). This works because these
|
44 | 44 | // variables are uniform - i.e. have the same value in all WIs and are not
|
45 | 45 | // changed within PFWI. The only exceptions are captures of private_memory
|
|
67 | 67 | //
|
68 | 68 | // TODO The approach employed by this pass generates lots of barriers and data
|
69 | 69 | // copying between private and local memory, which might not be efficient. There
|
70 |
| -// are optimization opportunities listed below. Also other aproaches can be |
| 70 | +// are optimization opportunities listed below. Also other approaches can be |
71 | 71 | // considered like
|
72 | 72 | // "Efficient Fork-Join on GPUs through Warp Specialization" by Arpith C. Jacob
|
73 | 73 | // et. al.
|
@@ -148,10 +148,10 @@ static IntegerType *getSizeTTy(Module &M) {
|
148 | 148 | return PtrSize == 8 ? Type::getInt64Ty(Ctx) : Type::getInt32Ty(Ctx);
|
149 | 149 | }
|
150 | 150 |
|
151 |
| -// Encaplulates SPIRV-dependent code generation. |
| 151 | +// Encapsulates SPIR-V-dependent code generation. |
152 | 152 | // TODO this should be factored out into a separate project in clang
|
153 | 153 | namespace spirv {
|
154 |
| -// There is no TargetMachine for SPIRV, so define those inline here |
| 154 | +// There is no TargetMachine for SPIR-V, so define those inline here |
155 | 155 | enum class AddrSpace : unsigned {
|
156 | 156 | Private = 0,
|
157 | 157 | Global = 1,
|
@@ -302,7 +302,7 @@ shareOutputViaLocalMem(Instruction &I, BasicBlock &BBa, BasicBlock &BBb,
|
302 | 302 | // 3) Generate a load in the "worker" BB of the value stored by the leader
|
303 | 303 | Bld.SetInsertPoint(&BBb.front());
|
304 | 304 | auto *WGVal = Bld.CreateLoad(WGLocal, "wg_val_" + Twine(I.getName()));
|
305 |
| - // 4) Finally, replace usages of I ouside the scope |
| 305 | + // 4) Finally, replace usages of I outside the scope |
306 | 306 | for (auto *U : Users)
|
307 | 307 | U->replaceUsesOfWith(&I, WGVal);
|
308 | 308 | }
|
@@ -530,7 +530,7 @@ static bool localMustBeMaterialized(const AllocaInst *L, const BasicBlock &BB) {
|
530 | 530 | // that BB to current.
|
531 | 531 | // - Avoid unnecessary '*p = *@Shadow_p' reloads and redirect p uses them to the
|
532 | 532 | // @Shadow_p in case it can be proved it is safe (see note above). Might not
|
533 |
| -// have any noticible effect, though, as reading from Shadow always goes to a |
| 533 | +// have any noticeable effect, though, as reading from Shadow always goes to a |
534 | 534 | // register file anyway.
|
535 | 535 | //
|
536 | 536 | void materializeLocalsInWIScopeBlocks(SmallPtrSetImpl<AllocaInst *> &Locals,
|
@@ -658,7 +658,7 @@ static void fixupPrivateMemoryPFWILambdaCaptures(CallInst *PFWICall) {
|
658 | 658 | continue;
|
659 | 659 | PrivMemCaptures.push_back(CaptureDesc{AI, GEP});
|
660 | 660 | }
|
661 |
| - // now rewrite the captured addresss of a private_memory variables within the |
| 661 | + // now rewrite the captured address of a private_memory variables within the |
662 | 662 | // PFWI lambda object:
|
663 | 663 | for (auto &C : PrivMemCaptures) {
|
664 | 664 | GetElementPtrInst *NewGEP = cast<GetElementPtrInst>(C.second->clone());
|
@@ -854,11 +854,11 @@ GlobalVariable *spirv::createWGLocalVariable(Module &M, Type *T,
|
854 | 854 | return G;
|
855 | 855 | }
|
856 | 856 |
|
857 |
| -// Functions below expose SPIRV translator-specific intrinsics to the use |
| 857 | +// Functions below expose SPIR-V translator-specific intrinsics to the use |
858 | 858 | // in LLVM IR. Those calls and global references will be translated to
|
859 |
| -// corresponding SPIRV operations and builtin variables. |
| 859 | +// corresponding SPIR-V operations and builtin variables. |
860 | 860 | //
|
861 |
| -// TODO generalize to support all SPIRV intrinsic operations and builtin |
| 861 | +// TODO generalize to support all SPIR-V intrinsic operations and builtin |
862 | 862 | // variables
|
863 | 863 |
|
864 | 864 | // extern "C" const __constant size_t __spirv_BuiltInLocalInvocationIndex;
|
|
0 commit comments