Skip to content

Commit 8dc2b90

Browse files
JoeCitizenCopilot
andcommitted
Address PR review: remove Hungarian notation and HLSL Change markers
- Rename bUpdated -> Updated (drop Hungarian prefix per reviewer feedback) - Remove // HLSL Change Begin/End markers in DxilConvergent.cpp since the file is already HLSL-specific Co-authored-by: Copilot <[email protected]>
1 parent 57651ce commit 8dc2b90

2 files changed

Lines changed: 8 additions & 10 deletions

File tree

lib/DXIL/DxilOperations.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6738,14 +6738,13 @@ Function *OP::GetOpFunc(OpCode opCode, Type *pOverloadType) {
67386738
if (existF->getFunctionType() != pFT)
67396739
return nullptr;
67406740
F = existF;
6741-
// HLSL Change Begin - ensure attributes are set on existing functions.
6741+
// Ensure attributes are set on existing functions.
67426742
if (OpProps.FuncAttr != Attribute::None &&
67436743
!F->hasFnAttribute(OpProps.FuncAttr))
67446744
F->addFnAttr(OpProps.FuncAttr);
67456745
// Mark wave ops as convergent since they depend on the active lane set.
67466746
if (IsDxilOpWave(opCode) && !F->hasFnAttribute(Attribute::Convergent))
67476747
F->addFnAttr(Attribute::Convergent);
6748-
// HLSL Change End
67496748
UpdateCache(opClass, pOverloadType, F);
67506749
return F;
67516750
}
@@ -6757,7 +6756,7 @@ Function *OP::GetOpFunc(OpCode opCode, Type *pOverloadType) {
67576756
F->addFnAttr(Attribute::NoUnwind);
67586757
if (OpProps.FuncAttr != Attribute::None)
67596758
F->addFnAttr(OpProps.FuncAttr);
6760-
// HLSL Change - mark wave ops as convergent.
6759+
// Mark wave ops as convergent since they depend on the active lane set.
67616760
if (IsDxilOpWave(opCode))
67626761
F->addFnAttr(Attribute::Convergent);
67636762

lib/HLSL/DxilConvergent.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,25 +45,24 @@ class DxilConvergentMark : public ModulePass {
4545
bool runOnModule(Module &M) override {
4646
const ShaderModel *SM = M.GetOrCreateHLModule().GetShaderModel();
4747

48-
bool bUpdated = false;
48+
bool Updated = false;
4949

50-
// HLSL Change Begin - Mark wave-sensitive HL functions as convergent.
50+
// Mark wave-sensitive HL functions as convergent.
5151
// This prevents optimizer passes (especially JumpThreading) from
5252
// restructuring control flow around wave ops, which would change
5353
// the set of active lanes at wave op call sites.
5454
for (Function &F : M.functions()) {
5555
if (F.isDeclaration() && IsHLWaveSensitive(&F) &&
5656
!F.hasFnAttribute(Attribute::Convergent)) {
5757
F.addFnAttr(Attribute::Convergent);
58-
bUpdated = true;
58+
Updated = true;
5959
}
6060
}
61-
// HLSL Change End
6261

6362
// Can skip if in a shader and version that doesn't support derivatives.
6463
if (!SM->IsPS() && !SM->IsLib() &&
6564
(!SM->IsSM66Plus() || (!SM->IsCS() && !SM->IsMS() && !SM->IsAS())))
66-
return bUpdated;
65+
return Updated;
6766
SupportsVectors = SM->IsSM69Plus();
6867

6968
for (Function &F : M.functions()) {
@@ -80,13 +79,13 @@ class DxilConvergentMark : public ModulePass {
8079
if (PropagateConvergent(V, &F, PDR)) {
8180
// TODO: emit warning here.
8281
}
83-
bUpdated = true;
82+
Updated = true;
8483
}
8584
}
8685
}
8786
}
8887

89-
return bUpdated;
88+
return Updated;
9089
}
9190

9291
private:

0 commit comments

Comments
 (0)