Skip to content

Commit

Permalink
Update copyright years and minor refactoring
Browse files Browse the repository at this point in the history
Updating copyright year information and minor refactoring.
  • Loading branch information
gkluczek authored and igcbot committed Dec 22, 2023
1 parent 9a4665a commit 0c9f429
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion IGC/BiFModule/Headers/spirv.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*========================== begin_copyright_notice ============================

Copyright (C) 2017-2021 Intel Corporation
Copyright (C) 2017-2023 Intel Corporation

SPDX-License-Identifier: MIT

Expand Down
2 changes: 1 addition & 1 deletion IGC/BiFModule/Implementation/atomics.cl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*========================== begin_copyright_notice ============================
Copyright (C) 2017-2022 Intel Corporation
Copyright (C) 2017-2023 Intel Corporation
SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion IGC/BiFModule/Languages/OpenCL/IBiF_Atomics.cl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*========================== begin_copyright_notice ============================
Copyright (C) 2017-2021 Intel Corporation
Copyright (C) 2017-2023 Intel Corporation
SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion IGC/Compiler/CISACodeGen/CheckInstrTypes.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

/*========================== begin_copyright_notice ============================
Copyright (C) 2017-2021 Intel Corporation
Copyright (C) 2017-2023 Intel Corporation
SPDX-License-Identifier: MIT
Expand Down
5 changes: 4 additions & 1 deletion IGC/Compiler/CISACodeGen/EmitVISAPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14090,7 +14090,10 @@ void EmitPass::emitScalarAtomics(llvm::Instruction *pInst,
m_encoder->Add(pSrcsArr[i], pSrcsArr[i], pReturnVal);
m_encoder->Push();

if (atomic_op == EATOMIC_IADD || atomic_op == EATOMIC_IADD64 || atomic_op == EATOMIC_FADD || atomic_op == EATOMIC_FADD64)
if (atomic_op == EATOMIC_IADD ||
atomic_op == EATOMIC_IADD64 ||
atomic_op == EATOMIC_FADD ||
atomic_op == EATOMIC_FADD64)
{
m_encoder->SetSrcModifier(1, EMOD_NEG);
}
Expand Down
2 changes: 1 addition & 1 deletion IGC/Compiler/CISACodeGen/helper.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*========================== begin_copyright_notice ============================
Copyright (C) 2017-2021 Intel Corporation
Copyright (C) 2017-2023 Intel Corporation
SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion IGC/Compiler/CodeGenPublicEnums.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*========================== begin_copyright_notice ============================
Copyright (C) 2017-2021 Intel Corporation
Copyright (C) 2017-2023 Intel Corporation
SPDX-License-Identifier: MIT
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*========================== begin_copyright_notice ============================
Copyright (C) 2017-2021 Intel Corporation
Copyright (C) 2017-2023 Intel Corporation
SPDX-License-Identifier: MIT
Expand Down Expand Up @@ -123,4 +123,3 @@ DEF_OCL_IGC_ATOMIC("__builtin_IB_atomic_add_global_f32", EATOMIC_FADD, POINTER)
DEF_OCL_IGC_ATOMIC("__builtin_IB_atomic_sub_global_f32", EATOMIC_FSUB, POINTER)
DEF_OCL_IGC_ATOMIC("__builtin_IB_atomic_add_global_f64", EATOMIC_FADD64, POINTER)
DEF_OCL_IGC_ATOMIC("__builtin_IB_atomic_cmpxchg_local_i64", EATOMIC_CMPXCHG64, POINTER)

Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,8 @@ LscTypeInfo LSCFuncsResolution::decodeTypeInfoFromName()

AtomicOp LSCFuncsResolution::decodeAtomicOpFromName()
{
static const SymbolMapping symbols[42] {
static const uint32_t numSymbols = 42;
static const SymbolMapping symbols[numSymbols] {
// FP 64 (local not suported)
{"_add_global_double", EATOMIC_FADD64},
{"_sub_global_double", EATOMIC_FSUB64},
Expand Down Expand Up @@ -1063,11 +1064,11 @@ AtomicOp LSCFuncsResolution::decodeAtomicOpFromName()

// maybe a better way to do this, but the compiler seems to need an
// explicit size for inference below.
static_assert(sizeof(symbols)/sizeof(symbols[0]) == 42);
static_assert(sizeof(symbols)/sizeof(symbols[0]) == numSymbols);

AtomicOp atomicOp = EATOMIC_IADD;
StringRef FN = m_pCurrInstFunc->getName();
if (!findFirstInfixMapping<AtomicOp,42>(FN, symbols, atomicOp)) {
if (!findFirstInfixMapping<AtomicOp, numSymbols>(FN, symbols, atomicOp)) {
reportError("invalid lsc atomic operation");
}
return atomicOp;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*========================== begin_copyright_notice ============================

Copyright (C) 2017-2021 Intel Corporation
Copyright (C) 2017-2023 Intel Corporation

SPDX-License-Identifier: MIT

Expand Down

0 comments on commit 0c9f429

Please sign in to comment.