Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 38 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
@@ -1 +1,38 @@
Checks: '-*,clang-diagnostic-*,llvm-*,misc-*'
Checks: >
-*,
clang-diagnostic-*,
llvm-*,
misc-*,
-misc-const-correctness,
-misc-include-cleaner,
-misc-no-recursion,
-misc-non-private-member-variables-in-classes,
-misc-unused-parameters,
-misc-use-anonymous-namespace,
readability-identifier-naming

CheckOptions:
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.FunctionCase
value: camelBack
# Exclude from scanning as this is an exported symbol used for fuzzing
# throughout the code base.
- key: readability-identifier-naming.FunctionIgnoredRegexp
value: "LLVMFuzzerTestOneInput"
- key: readability-identifier-naming.MemberCase
value: CamelCase
- key: readability-identifier-naming.ParameterCase
value: CamelCase
- key: readability-identifier-naming.UnionCase
value: CamelCase
- key: readability-identifier-naming.VariableCase
value: CamelCase
- key: readability-identifier-naming.IgnoreMainLikeFunctions
value: 1
- key: readability-redundant-member-init.IgnoreBaseInCopyConstructors
value: 1
- key: modernize-use-default-member-init.UseAssignment
value: 1
12 changes: 6 additions & 6 deletions lib/HLSL/DxilScalarizeVectorIntrinsics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static bool scalarizeVectorLoad(hlsl::OP *HlslOP, const DataLayout &DL,
static bool scalarizeVectorStore(hlsl::OP *HlslOP, const DataLayout &DL,
CallInst *CI);
static bool scalarizeVectorIntrinsic(hlsl::OP *HlslOP, CallInst *CI);
static bool scalarizeVectorReduce(hlsl::OP *HlslOP, CallInst *CI);
static bool scalarizeVectorReduce(CallInst *CI);
static bool scalarizeVectorDot(hlsl::OP *HlslOP, CallInst *CI);
static bool scalarizeVectorWaveMatch(hlsl::OP *HlslOP, CallInst *CI);

Expand Down Expand Up @@ -85,7 +85,7 @@ class DxilScalarizeVectorIntrinsics : public ModulePass {
Changed |= scalarizeVectorStore(HlslOP, M.getDataLayout(), CI);
continue;
case DXIL::OpCodeClass::VectorReduce:
Changed |= scalarizeVectorReduce(HlslOP, CI);
Changed |= scalarizeVectorReduce(CI);
continue;
case DXIL::OpCodeClass::Dot:
Changed |= scalarizeVectorDot(HlslOP, CI);
Expand All @@ -106,7 +106,7 @@ class DxilScalarizeVectorIntrinsics : public ModulePass {
}
};

static unsigned GetRawBufferMask(unsigned NumComponents) {
static unsigned getRawBufferMask(unsigned NumComponents) {
switch (NumComponents) {
case 0:
return 0;
Expand Down Expand Up @@ -159,7 +159,7 @@ static bool scalarizeVectorLoad(hlsl::OP *HlslOP, const DataLayout &DL,
// Load 4 elements or however many less than 4 are left to load.
unsigned ChunkSize = std::min(NumComponents - EIx, MaxElemCount);
Args[DXIL::OperandIndex::kRawBufferLoadMaskOpIdx] =
HlslOP->GetI8Const(GetRawBufferMask(ChunkSize));
HlslOP->GetI8Const(getRawBufferMask(ChunkSize));
// If we've loaded a chunk already, update offset to next chunk.
if (EIx > 0)
Args[OffsetIdx] =
Expand All @@ -177,7 +177,7 @@ static bool scalarizeVectorLoad(hlsl::OP *HlslOP, const DataLayout &DL,
// Replace users of the vector extracted from the vector load resret.
Value *Status = nullptr;
for (auto CU = CI->user_begin(), CE = CI->user_end(); CU != CE;) {
auto EV = cast<ExtractValueInst>(*(CU++));
auto *EV = cast<ExtractValueInst>(*(CU++));
unsigned Ix = EV->getIndices()[0];
if (Ix == 0) {
// Handle value uses.
Expand Down Expand Up @@ -259,7 +259,7 @@ static bool scalarizeVectorStore(hlsl::OP *HlslOP, const DataLayout &DL,
return true;
}

static bool scalarizeVectorReduce(hlsl::OP *HlslOP, CallInst *CI) {
static bool scalarizeVectorReduce(CallInst *CI) {
IRBuilder<> Builder(CI);

OP::OpCode ReduceOp = OP::getOpCode(CI);
Expand Down
Loading
Loading