diff --git a/source/fuzz/transformation_replace_copy_memory_with_load_store.cpp b/source/fuzz/transformation_replace_copy_memory_with_load_store.cpp index bf6996ad3..9a6e429b7 100644 --- a/source/fuzz/transformation_replace_copy_memory_with_load_store.cpp +++ b/source/fuzz/transformation_replace_copy_memory_with_load_store.cpp @@ -61,7 +61,7 @@ void TransformationReplaceCopyMemoryWithLoadStore::Apply( copy_memory_instruction->opcode() == SpvOpCopyMemory && "The required OpCopyMemory instruction must be defined."); - // Coherence check: Both operands must be pointers. + // Integrity check: Both operands must be pointers. // Get types of ids used as a source and target of |copy_memory_instruction|. auto target = ir_context->get_def_use_mgr()->GetDef( @@ -83,7 +83,7 @@ void TransformationReplaceCopyMemoryWithLoadStore::Apply( source_type_opcode == SpvOpTypePointer && "Operands must be of type OpTypePointer"); - // Coherence check: |source| and |target| must point to the same type. + // Integrity check: |source| and |target| must point to the same type. uint32_t target_pointee_type = fuzzerutil::GetPointeeTypeIdFromPointerType( ir_context, target->type_id()); uint32_t source_pointee_type = fuzzerutil::GetPointeeTypeIdFromPointerType( diff --git a/source/opt/loop_peeling.cpp b/source/opt/loop_peeling.cpp index 556442dcd..071c27cb1 100644 --- a/source/opt/loop_peeling.cpp +++ b/source/opt/loop_peeling.cpp @@ -1063,7 +1063,7 @@ LoopPeelingPass::LoopPeelingInfo::HandleInequality(CmpOperator cmp_op, } uint32_t cast_iteration = 0; - // coherence check: can we fit |iteration| in a uint32_t ? + // Integrity check: can we fit |iteration| in a uint32_t ? if (static_cast(iteration) < std::numeric_limits::max()) { cast_iteration = static_cast(iteration); } diff --git a/source/opt/optimizer.cpp b/source/opt/optimizer.cpp index 403231ab7..05eafbbae 100644 --- a/source/opt/optimizer.cpp +++ b/source/opt/optimizer.cpp @@ -579,8 +579,8 @@ bool Optimizer::Run(const uint32_t* original_binary, #ifndef NDEBUG // We do not keep the result id of DebugScope in struct DebugScope. - // Instead, we assign random ids for them, which results in coherence - // check failures. We want to skip the coherence check when the module + // Instead, we assign random ids for them, which results in integrity + // check failures. We want to skip the integrity check when the module // contains DebugScope instructions. if (status == opt::Pass::Status::SuccessWithoutChange && !context->module()->ContainsDebugScope()) { diff --git a/source/reduce/operand_to_dominating_id_reduction_opportunity_finder.cpp b/source/reduce/operand_to_dominating_id_reduction_opportunity_finder.cpp index 1bd9d9d7d..59001fab2 100644 --- a/source/reduce/operand_to_dominating_id_reduction_opportunity_finder.cpp +++ b/source/reduce/operand_to_dominating_id_reduction_opportunity_finder.cpp @@ -91,9 +91,8 @@ void OperandToDominatingIdReductionOpportunityFinder:: // constant. It is thus not relevant to this pass. continue; } - // Coherence check: we should not get here if the argument is a - // constant. - assert(!context->get_constant_mgr()->GetConstantFromInst(def)); + assert(!context->get_constant_mgr()->GetConstantFromInst(def) && + "We should not get here if the argument is a constant."); if (def->type_id() != candidate_dominator->type_id()) { // The types need to match. continue; diff --git a/test/binary_parse_test.cpp b/test/binary_parse_test.cpp index e9ad57ded..93e87bdda 100644 --- a/test/binary_parse_test.cpp +++ b/test/binary_parse_test.cpp @@ -92,7 +92,7 @@ std::ostream& operator<<(std::ostream& os, const ParsedInstruction& inst) { return os; } -// Coherence check for the equality operator on ParsedInstruction. +// Basic check for the equality operator on ParsedInstruction. TEST(ParsedInstruction, ZeroInitializedAreEqual) { spv_parsed_instruction_t pi = {}; ParsedInstruction a(pi); diff --git a/test/fuzz/transformation_add_dead_break_test.cpp b/test/fuzz/transformation_add_dead_break_test.cpp index 784f0a383..4a5a4b795 100644 --- a/test/fuzz/transformation_add_dead_break_test.cpp +++ b/test/fuzz/transformation_add_dead_break_test.cpp @@ -21,8 +21,7 @@ namespace { TEST(TransformationAddDeadBreakTest, BreaksOutOfSimpleIf) { // For a simple if-then-else, checks that some dead break scenarios are - // possible, and coherence-checks that some illegal scenarios are indeed not - // allowed. + // possible, and that some invalid scenarios are indeed not allowed. // The SPIR-V for this test is adapted from the following GLSL, by separating // some assignments into their own basic blocks, and adding constants for true diff --git a/test/fuzz/transformation_add_dead_continue_test.cpp b/test/fuzz/transformation_add_dead_continue_test.cpp index 2c3006b1f..2d56da556 100644 --- a/test/fuzz/transformation_add_dead_continue_test.cpp +++ b/test/fuzz/transformation_add_dead_continue_test.cpp @@ -21,8 +21,8 @@ namespace { TEST(TransformationAddDeadContinueTest, SimpleExample) { // For a simple loop, checks that some dead continue scenarios are possible, - // coherence-checks that some illegal scenarios are indeed not allowed, and - // then applies a transformation. + // checks that some invalid scenarios are indeed not allowed, and then applies + // a transformation. // The SPIR-V for this test is adapted from the following GLSL, by separating // some assignments into their own basic blocks, and adding constants for true diff --git a/test/opcode_table_get_test.cpp b/test/opcode_table_get_test.cpp index a64a9c933..4ff67d955 100644 --- a/test/opcode_table_get_test.cpp +++ b/test/opcode_table_get_test.cpp @@ -21,7 +21,7 @@ namespace { using GetTargetOpcodeTableGetTest = ::testing::TestWithParam; using ::testing::ValuesIn; -TEST_P(GetTargetOpcodeTableGetTest, CoherenceCheck) { +TEST_P(GetTargetOpcodeTableGetTest, IntegrityCheck) { spv_opcode_table table; ASSERT_EQ(SPV_SUCCESS, spvOpcodeTableGet(&table, GetParam())); ASSERT_NE(0u, table->count); diff --git a/test/opt/graphics_robust_access_test.cpp b/test/opt/graphics_robust_access_test.cpp index c4b089bb4..4dbe81810 100644 --- a/test/opt/graphics_robust_access_test.cpp +++ b/test/opt/graphics_robust_access_test.cpp @@ -1323,8 +1323,8 @@ TEST_F(GraphicsRobustAccessTest, // Split the address calculation across two access chains. Force // the transform to walk up the access chains to find the base variable. // This time, put the different access chains in different basic blocks. - // This coherence-checks that we keep the instruction-to-block mapping - // consistent. + // This is an integrity check to ensure that we keep the instruction-to-block + // mapping consistent. for (auto* ac : AccessChains()) { std::ostringstream shaders; shaders << ShaderPreambleAC({"i", "j", "k", "bb1", "bb2", "ssbo_s", diff --git a/utils/vscode/src/parser/parser.go b/utils/vscode/src/parser/parser.go index 90953c9b3..260a616ca 100644 --- a/utils/vscode/src/parser/parser.go +++ b/utils/vscode/src/parser/parser.go @@ -356,7 +356,7 @@ func lex(source string) ([]*Token, []Diagnostic, error) { lastPos := Position{} for l.e == nil { - // Coherence-check that the parser is making progress + // Integrity check that the parser is making progress if l.pos == lastPos { log.Panicf("Parsing stuck at %v", l.pos) }