// Copyright (c) 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #include "source/opt/reduce_load_size.h" #include <set> #include <vector> #include "source/opt/instruction.h" #include "source/opt/ir_builder.h" #include "source/opt/ir_context.h" #include "source/util/bit_vector.h" namespace spvtools { namespace opt { namespace { constexpr uint32_t kExtractCompositeIdInIdx = …; constexpr uint32_t kVariableStorageClassInIdx = …; constexpr uint32_t kLoadPointerInIdx = …; } // namespace Pass::Status ReduceLoadSize::Process() { … } bool ReduceLoadSize::ReplaceExtract(Instruction* inst) { … } bool ReduceLoadSize::ShouldReplaceExtract(Instruction* inst) { … } } // namespace opt } // namespace spvtools