#include "source/opt/local_access_chain_convert_pass.h"
#include "ir_context.h"
#include "iterator.h"
#include "source/util/string_utils.h"
namespace spvtools {
namespace opt {
namespace {
constexpr uint32_t kStoreValIdInIdx = …;
constexpr uint32_t kAccessChainPtrIdInIdx = …;
}
void LocalAccessChainConvertPass::BuildAndAppendInst(
spv::Op opcode, uint32_t typeId, uint32_t resultId,
const std::vector<Operand>& in_opnds,
std::vector<std::unique_ptr<Instruction>>* newInsts) { … }
uint32_t LocalAccessChainConvertPass::BuildAndAppendVarLoad(
const Instruction* ptrInst, uint32_t* varId, uint32_t* varPteTypeId,
std::vector<std::unique_ptr<Instruction>>* newInsts) { … }
void LocalAccessChainConvertPass::AppendConstantOperands(
const Instruction* ptrInst, std::vector<Operand>* in_opnds) { … }
bool LocalAccessChainConvertPass::ReplaceAccessChainLoad(
const Instruction* address_inst, Instruction* original_load) { … }
bool LocalAccessChainConvertPass::GenAccessChainStoreReplacement(
const Instruction* ptrInst, uint32_t valId,
std::vector<std::unique_ptr<Instruction>>* newInsts) { … }
bool LocalAccessChainConvertPass::Is32BitConstantIndexAccessChain(
const Instruction* acp) const { … }
bool LocalAccessChainConvertPass::HasOnlySupportedRefs(uint32_t ptrId) { … }
void LocalAccessChainConvertPass::FindTargetVars(Function* func) { … }
Pass::Status LocalAccessChainConvertPass::ConvertLocalAccessChains(
Function* func) { … }
void LocalAccessChainConvertPass::Initialize() { … }
bool LocalAccessChainConvertPass::AllExtensionsSupported() const { … }
Pass::Status LocalAccessChainConvertPass::ProcessImpl() { … }
LocalAccessChainConvertPass::LocalAccessChainConvertPass() { … }
Pass::Status LocalAccessChainConvertPass::Process() { … }
void LocalAccessChainConvertPass::InitExtensions() { … }
bool LocalAccessChainConvertPass::AnyIndexIsOutOfBounds(
const Instruction* access_chain_inst) { … }
bool LocalAccessChainConvertPass::IsIndexOutOfBounds(
const analysis::Constant* index, const analysis::Type* type) const { … }
}
}