#include "source/opt/instruction.h"
#include <initializer_list>
#include "OpenCLDebugInfo100.h"
#include "source/disassemble.h"
#include "source/opt/fold.h"
#include "source/opt/ir_context.h"
#include "source/opt/reflect.h"
namespace spvtools {
namespace opt {
namespace {
constexpr uint32_t kTypeImageDimIndex = …;
constexpr uint32_t kLoadBaseIndex = …;
constexpr uint32_t kPointerTypeStorageClassIndex = …;
constexpr uint32_t kVariableStorageClassIndex = …;
constexpr uint32_t kTypeImageSampledIndex = …;
constexpr uint32_t kExtInstSetIdInIdx = …;
constexpr uint32_t kExtInstInstructionInIdx = …;
constexpr uint32_t kDebugScopeNumWords = …;
constexpr uint32_t kDebugScopeNumWordsWithoutInlinedAt = …;
constexpr uint32_t kDebugNoScopeNumWords = …;
constexpr uint32_t kOpBranchConditionalWithWeightsNumOperands = …;
}
Instruction::Instruction(IRContext* c)
: … { … }
Instruction::Instruction(IRContext* c, spv::Op op)
: … { … }
Instruction::Instruction(IRContext* c, const spv_parsed_instruction_t& inst,
std::vector<Instruction>&& dbg_line)
: … { … }
Instruction::Instruction(IRContext* c, const spv_parsed_instruction_t& inst,
const DebugScope& dbg_scope)
: … { … }
Instruction::Instruction(IRContext* c, spv::Op op, uint32_t ty_id,
uint32_t res_id, const OperandList& in_operands)
: … { … }
Instruction::Instruction(Instruction&& that)
: … { … }
Instruction& Instruction::operator=(Instruction&& that) { … }
Instruction* Instruction::Clone(IRContext* c) const { … }
uint32_t Instruction::GetSingleWordOperand(uint32_t index) const { … }
uint32_t Instruction::NumInOperandWords() const { … }
bool Instruction::HasBranchWeights() const { … }
void Instruction::ToBinaryWithoutAttachedDebugInsts(
std::vector<uint32_t>* binary) const { … }
void Instruction::ReplaceOperands(const OperandList& new_operands) { … }
bool Instruction::IsReadOnlyLoad() const { … }
Instruction* Instruction::GetBaseAddress() const { … }
bool Instruction::IsReadOnlyPointer() const { … }
bool Instruction::IsVulkanStorageImage() const { … }
bool Instruction::IsVulkanSampledImage() const { … }
bool Instruction::IsVulkanStorageTexelBuffer() const { … }
bool Instruction::IsVulkanStorageBuffer() const { … }
bool Instruction::IsVulkanStorageBufferVariable() const { … }
bool Instruction::IsVulkanUniformBuffer() const { … }
bool Instruction::IsReadOnlyPointerShaders() const { … }
bool Instruction::IsReadOnlyPointerKernel() const { … }
void Instruction::UpdateLexicalScope(uint32_t scope) { … }
void Instruction::UpdateDebugInlinedAt(uint32_t new_inlined_at) { … }
void Instruction::ClearDbgLineInsts() { … }
void Instruction::UpdateDebugInfoFrom(const Instruction* from) { … }
void Instruction::AddDebugLine(const Instruction* inst) { … }
bool Instruction::IsDebugLineInst() const { … }
bool Instruction::IsLineInst() const { … }
bool Instruction::IsLine() const { … }
bool Instruction::IsNoLine() const { … }
Instruction* Instruction::InsertBefore(std::unique_ptr<Instruction>&& inst) { … }
Instruction* Instruction::InsertBefore(
std::vector<std::unique_ptr<Instruction>>&& list) { … }
bool Instruction::IsValidBasePointer() const { … }
OpenCLDebugInfo100Instructions Instruction::GetOpenCL100DebugOpcode() const { … }
NonSemanticShaderDebugInfo100Instructions Instruction::GetShader100DebugOpcode()
const { … }
CommonDebugInfoInstructions Instruction::GetCommonDebugOpcode() const { … }
bool Instruction::IsValidBaseImage() const { … }
bool Instruction::IsOpaqueType() const { … }
bool Instruction::IsFoldable() const { … }
bool Instruction::IsFoldableByFoldScalar() const { … }
bool Instruction::IsFoldableByFoldVector() const { … }
bool Instruction::IsFloatingPointFoldingAllowed() const { … }
std::string Instruction::PrettyPrint(uint32_t options) const { … }
std::ostream& operator<<(std::ostream& str, const Instruction& inst) { … }
void Instruction::Dump() const { … }
bool Instruction::IsOpcodeCodeMotionSafe() const { … }
bool Instruction::IsScalarizable() const { … }
bool Instruction::IsOpcodeSafeToDelete() const { … }
bool Instruction::IsNonSemanticInstruction() const { … }
void DebugScope::ToBinary(uint32_t type_id, uint32_t result_id,
uint32_t ext_set,
std::vector<uint32_t>* binary) const { … }
}
}