#ifndef SOURCE_OPT_INSTRUCTION_H_
#define SOURCE_OPT_INSTRUCTION_H_
#include <cassert>
#include <functional>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "NonSemanticShaderDebugInfo100.h"
#include "OpenCLDebugInfo100.h"
#include "source/binary.h"
#include "source/common_debug_info.h"
#include "source/latest_version_glsl_std_450_header.h"
#include "source/latest_version_spirv_header.h"
#include "source/opcode.h"
#include "source/operand.h"
#include "source/opt/reflect.h"
#include "source/util/ilist_node.h"
#include "source/util/small_vector.h"
#include "source/util/string_utils.h"
#include "spirv-tools/libspirv.h"
constexpr uint32_t kNoDebugScope = …;
constexpr uint32_t kNoInlinedAt = …;
namespace spvtools {
namespace opt {
class Function;
class IRContext;
class Module;
class InstructionList;
struct Operand { … };
inline bool operator!=(const Operand& o1, const Operand& o2) { … }
class DebugScope { … };
class Instruction : public utils::IntrusiveNodeBase<Instruction> { … };
std::ostream& operator<<(std::ostream& str, const Instruction& inst);
inline bool Instruction::operator==(const Instruction& other) const { … }
inline bool Instruction::operator!=(const Instruction& other) const { … }
inline bool Instruction::operator<(const Instruction& other) const { … }
inline Operand& Instruction::GetOperand(uint32_t index) { … }
inline const Operand& Instruction::GetOperand(uint32_t index) const { … }
inline void Instruction::AddOperand(Operand&& operand) { … }
inline void Instruction::AddOperand(const Operand& operand) { … }
inline void Instruction::SetInOperand(uint32_t index,
Operand::OperandData&& data) { … }
inline void Instruction::SetOperand(uint32_t index,
Operand::OperandData&& data) { … }
inline void Instruction::SetInOperands(OperandList&& new_operands) { … }
inline void Instruction::SetResultId(uint32_t res_id) { … }
inline void Instruction::SetDebugScope(const DebugScope& scope) { … }
inline void Instruction::SetResultType(uint32_t ty_id) { … }
inline bool Instruction::IsNop() const { … }
inline void Instruction::ToNop() { … }
inline bool Instruction::WhileEachInst(
const std::function<bool(Instruction*)>& f, bool run_on_debug_line_insts) { … }
inline bool Instruction::WhileEachInst(
const std::function<bool(const Instruction*)>& f,
bool run_on_debug_line_insts) const { … }
inline void Instruction::ForEachInst(const std::function<void(Instruction*)>& f,
bool run_on_debug_line_insts) { … }
inline void Instruction::ForEachInst(
const std::function<void(const Instruction*)>& f,
bool run_on_debug_line_insts) const { … }
inline void Instruction::ForEachId(const std::function<void(uint32_t*)>& f) { … }
inline void Instruction::ForEachId(
const std::function<void(const uint32_t*)>& f) const { … }
inline bool Instruction::WhileEachInId(
const std::function<bool(uint32_t*)>& f) { … }
inline bool Instruction::WhileEachInId(
const std::function<bool(const uint32_t*)>& f) const { … }
inline void Instruction::ForEachInId(const std::function<void(uint32_t*)>& f) { … }
inline void Instruction::ForEachInId(
const std::function<void(const uint32_t*)>& f) const { … }
inline bool Instruction::WhileEachInOperand(
const std::function<bool(uint32_t*)>& f) { … }
inline bool Instruction::WhileEachInOperand(
const std::function<bool(const uint32_t*)>& f) const { … }
inline void Instruction::ForEachInOperand(
const std::function<void(uint32_t*)>& f) { … }
inline void Instruction::ForEachInOperand(
const std::function<void(const uint32_t*)>& f) const { … }
inline bool Instruction::HasLabels() const { … }
bool Instruction::IsDecoration() const { … }
bool Instruction::IsLoad() const { … }
bool Instruction::IsAtomicWithLoad() const { … }
bool Instruction::IsAtomicOp() const { … }
bool Instruction::IsConstant() const { … }
}
}
#endif