name
string
code
string
asm
string
file
string
spvtools::opt::analysis::DefUseManager::AnalyzeInstUse(spvtools::opt::Instruction*)
void DefUseManager::AnalyzeInstUse(Instruction* inst) { // Create entry for the given instruction. Note that the instruction may // not have any in-operands. In such cases, we still need a entry for those // instructions so this manager knows it has seen the instruction later. auto* used_ids = &inst_to_used_ids...
pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x50(%rbp) addq $0x68, %rdi leaq -0x10(%rbp), %rsi callq 0x898270 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi callq 0xe8df0 cmpq $0x0, %rax je 0x895daa movq -0x50(%rbp), %rdi movq -0x10(%rbp), %r...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/def_use_manager.cpp
spvtools::opt::analysis::DefUseManager::AnalyzeDefUse(spvtools::opt::Module*)
void DefUseManager::AnalyzeDefUse(Module* module) { if (!module) return; // Analyze all the defs before any uses to catch forward references. module->ForEachInst( std::bind(&DefUseManager::AnalyzeInstDef, this, std::placeholders::_1), true); module->ForEachInst( std::bind(&DefUseManager::Analy...
pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0xb8(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x896bea jmp 0x896cee movq -0xb8(%rbp), %rax movq -0x10(%rbp), %rcx movq %rcx, -0xd0(%rbp) leaq -0x1073(%rip), %rcx # 0x895b90 movq %rcx, -0x58(%rbp) movq ...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/def_use_manager.cpp
spvtools::opt::DescriptorScalarReplacement::ReplaceAccessChain(spvtools::opt::Instruction*, spvtools::opt::Instruction*)
bool DescriptorScalarReplacement::ReplaceAccessChain(Instruction* var, Instruction* use) { if (use->NumInOperands() <= 1) { context()->EmitErrorMessage( "Variable cannot be replaced: invalid instruction", use); return false; } const analysis::C...
pushq %rbp movq %rsp, %rbp subq $0x130, %rsp # imm = 0x130 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x110(%rbp) movq -0x20(%rbp), %rdi callq 0x76b860 cmpl $0x1, %eax ja 0x89c2bf movq -0x110(%rbp), %rdi callq 0x76b110 movq %rax, -0x118(%rbp) leaq ...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/desc_sroa.cpp
spvtools::opt::DescriptorScalarReplacement::GetNumBindingsUsedByType(unsigned int)
uint32_t DescriptorScalarReplacement::GetNumBindingsUsedByType( uint32_t type_id) { Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); // If it's a pointer, look at the underlying type. if (type_inst->opcode() == spv::Op::OpTypePointer) { type_id = type_inst->GetSingleWordInOperand(1); type...
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x48(%rbp) callq 0x76b080 movq %rax, %rdi movl -0x14(%rbp), %esi callq 0x895fb0 movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rdi callq 0x76b0f0 cmpl $0x20, %eax jne 0x89dba2 movq -0x20(%rbp), %rdi m...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/desc_sroa.cpp
spvtools::opt::IRContext::BuildIdToNameMap()
void IRContext::BuildIdToNameMap() { id_to_name_ = MakeUnique<std::multimap<uint32_t, Instruction*>>(); for (Instruction& debug_inst : debugs2()) { if (debug_inst.opcode() == spv::Op::OpMemberName || debug_inst.opcode() == spv::Op::OpName) { id_to_name_->insert({debug_inst.GetSingleWordInOperand(0...
pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x70(%rbp) leaq -0x10(%rbp), %rdi callq 0x89f3c0 movq -0x70(%rbp), %rdi addq $0x210, %rdi # imm = 0x210 leaq -0x10(%rbp), %rsi callq 0x89f420 leaq -0x10(%rbp), %rdi callq 0x7413a0 movq -0x70(%rbp), %rsi leaq -...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/ir_context.h
spvtools::opt::(anonymous namespace)::GetVariableType(spvtools::opt::IRContext*, spvtools::opt::Instruction*)
Instruction* GetVariableType(IRContext* context, Instruction* var) { if (var->opcode() != spv::Op::OpVariable) { return nullptr; } uint32_t ptr_type_id = var->type_id(); Instruction* ptr_type_inst = context->get_def_use_mgr()->GetDef(ptr_type_id); if (ptr_type_inst->opcode() != spv::Op::OpTypePointer) { ...
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rdi callq 0x76b0f0 cmpl $0x3b, %eax je 0x8a1708 movq $0x0, -0x8(%rbp) jmp 0x8a176d movq -0x18(%rbp), %rdi callq 0x76b040 movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rdi callq 0x76b8a0 movq %rax, %rdi movl -0x1c(%r...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/desc_sroa_util.cpp
spvtools::opt::DominatorAnalysisBase::Dominates(spvtools::opt::Instruction*, spvtools::opt::Instruction*) const
bool DominatorAnalysisBase::Dominates(Instruction* a, Instruction* b) const { if (!a || !b) { return false; } if (a == b) { return true; } BasicBlock* bb_a = a->context()->get_instr_block(a); BasicBlock* bb_b = b->context()->get_instr_block(b); if (bb_a != bb_b) { return tree_.Dominates(bb_...
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x48(%rbp) cmpq $0x0, -0x18(%rbp) je 0x8a1d2a cmpq $0x0, -0x20(%rbp) jne 0x8a1d33 movb $0x0, -0x1(%rbp) jmp 0x8a1e07 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x8a1...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/dominator_analysis.cpp
spvtools::opt::DominatorTree::Visit(std::function<bool (spvtools::opt::DominatorTreeNode const*)>) const
bool Visit(std::function<bool(const DominatorTreeNode*)> func) const { for (auto n : *this) { if (!func(&n)) return false; } return true; }
pushq %rbp movq %rsp, %rbp subq $0x110, %rsp # imm = 0x110 movq %rsi, -0x110(%rbp) movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rsi leaq -0x78(%rbp), %rdi callq 0x8a7750 movq -0x20(%rbp), %rsi leaq -0xd0(%rbp), %rdi callq 0x8a7780 leaq -0x78(%...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/dominator_tree.h
spvtools::opt::TreeDFIterator<spvtools::opt::DominatorTreeNode const>::MoveToNextNode()
inline void MoveToNextNode() { if (!current_) return; if (parent_iterators_.empty()) { current_ = nullptr; return; } std::pair<NodePtr, NodeIterator>& next_it = parent_iterators_.top(); // Set the new node. current_ = *next_it.second; // Update the iterator for the next child. ...
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x48(%rbp) cmpq $0x0, (%rax) jne 0x8a978f jmp 0x8a9891 movq -0x48(%rbp), %rdi addq $0x8, %rdi callq 0x8a98a0 testb $0x1, %al jne 0x8a97a2 jmp 0x8a97b2 movq -0x48(%rbp), %rax movq $0x0, (%rax) jmp 0x8a9891 movq -0x48(%rbp...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/tree_iterator.h
spvtools::opt::EliminateDeadIOComponentsPass::FindMaxIndex(spvtools::opt::Instruction const&, unsigned int, bool)
unsigned EliminateDeadIOComponentsPass::FindMaxIndex( const Instruction& var, const unsigned original_max, const bool skip_first_index) { unsigned max = 0; bool seen_non_const_ac = false; assert(var.opcode() == spv::Op::OpVariable && "must be variable"); context()->get_def_use_mgr()->WhileEachUser( ...
pushq %rbp movq %rsp, %rbp subq $0x100, %rsp # imm = 0x100 movb %cl, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) andb $0x1, %al movb %al, -0x15(%rbp) movq -0x8(%rbp), %rax movq %rax, -0xe0(%rbp) movl $0x0, -0x1c(%rbp) movb $0x0, -0x1d(%rbp) movq -0x10(%rbp), %rdi callq 0x76b0f0 mo...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/eliminate_dead_io_components_pass.cpp
spvtools::opt::IRContext::CloneNames(unsigned int, unsigned int, unsigned int)
void IRContext::CloneNames(const uint32_t old_id, const uint32_t new_id, const uint32_t max_member_index) { std::vector<std::unique_ptr<Instruction>> names_to_add; auto names = GetNames(old_id); for (auto n : names) { Instruction* old_name_inst = n.second; if (old_name_inst->opc...
pushq %rbp movq %rsp, %rbp subq $0xf0, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movl %ecx, -0x14(%rbp) movq -0x8(%rbp), %rax movq %rax, -0xe8(%rbp) leaq -0x30(%rbp), %rdi callq 0x7fa8c0 movq -0xe8(%rbp), %rdi movl -0xc(%rbp), %esi callq 0x89eb40 movq %rax, -0x40(%rbp) movq %rdx, -0x38(%rb...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/ir_context.h
spvtools::opt::EliminateDeadMembersPass::Process()
Pass::Status EliminateDeadMembersPass::Process() { if (!context()->get_feature_mgr()->HasCapability(spv::Capability::Shader)) return Status::SuccessWithoutChange; FindLiveMembers(); if (RemoveDeadMembers()) { return Status::SuccessWithChange; } return Status::SuccessWithoutChange; }
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x18(%rbp) callq 0x76b110 movq %rax, %rdi callq 0x76c140 movq %rax, %rdi movl $0x1, %esi callq 0x76c180 testb $0x1, %al jne 0x8b5f3b movl $0x11, -0x4(%rbp) jmp 0x8b5f63 movq -0x18(%rbp), %rdi callq 0x8b5f70 movq -0x18(...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/eliminate_dead_members_pass.cpp
spvtools::opt::EliminateDeadMembersPass::MarkMembersAsLiveForExtract(spvtools::opt::Instruction const*)
void EliminateDeadMembersPass::MarkMembersAsLiveForExtract( const Instruction* inst) { assert(inst->opcode() == spv::Op::OpCompositeExtract || (inst->opcode() == spv::Op::OpSpecConstantOp && spv::Op(inst->GetSingleWordInOperand(kSpecConstOpOpcodeIdx)) == spv::Op::OpCompositeExtrac...
pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x10(%rbp), %rdi callq 0x76b0f0 movl %eax, %ecx movb $0x1, %al cmpl $0x51, %ecx movb %al, -0x49(%rbp) je 0x8b629c movq -0x10(%rbp), %rdi callq 0x76b0f0 movl %eax, %ecx xorl %eax, %...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/eliminate_dead_members_pass.cpp
spvtools::opt::EliminateDeadMembersPass::MarkTypeAsFullyUsed(unsigned int)
void EliminateDeadMembersPass::MarkTypeAsFullyUsed(uint32_t type_id) { Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); assert(type_inst != nullptr); switch (type_inst->opcode()) { case spv::Op::OpTypeStruct: // Mark every member and its type as fully used. for (uint32_t i = 0; i < ty...
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x38(%rbp) callq 0x76b080 movq %rax, %rdi movl -0xc(%rbp), %esi callq 0x895fb0 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x8b64f4 jmp 0x8b6513 leaq 0x337133(%rip), %rdi # 0xbed62e leaq 0x3...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/eliminate_dead_members_pass.cpp
spvtools::opt::EliminateDeadMembersPass::MarkMembersAsLiveForArrayLength(spvtools::opt::Instruction const*)
void EliminateDeadMembersPass::MarkMembersAsLiveForArrayLength( const Instruction* inst) { assert(inst->opcode() == spv::Op::OpArrayLength); uint32_t object_id = inst->GetSingleWordInOperand(0); Instruction* object_inst = get_def_use_mgr()->GetDef(object_id); uint32_t pointer_type_id = object_inst->type_id(...
pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x10(%rbp), %rdi callq 0x76b0f0 cmpl $0x44, %eax jne 0x8b6c58 jmp 0x8b6c77 leaq 0x336d02(%rip), %rdi # 0xbed961 leaq 0x336874(%rip), %rsi # 0xbed4da movl $0x115, %edx ...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/eliminate_dead_members_pass.cpp
spvtools::opt::EliminateDeadMembersPass::UpdateOpTypeStruct(spvtools::opt::Instruction*)
bool EliminateDeadMembersPass::UpdateOpTypeStruct(Instruction* inst) { assert(inst->opcode() == spv::Op::OpTypeStruct); const auto& live_members = used_members_[inst->result_id()]; if (live_members.size() == inst->NumInOperands()) { return false; } Instruction::OperandList new_operands; for (uint32_t ...
pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x18(%rbp), %rdi callq 0x76b0f0 cmpl $0x1e, %eax jne 0x8b6ecb jmp 0x8b6eea leaq 0x364106(%rip), %rdi # 0xc1afd8 leaq 0x336601(%rip), %rsi # 0xbed4da movl $0x166, %edx ...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/eliminate_dead_members_pass.cpp
spvtools::opt::EliminateDeadMembersPass::GetNewMemberIndex(unsigned int, unsigned int)
uint32_t EliminateDeadMembersPass::GetNewMemberIndex(uint32_t type_id, uint32_t member_idx) { auto live_members = used_members_.find(type_id); if (live_members == used_members_.end()) { return member_idx; } auto current_member = live_members->second.find...
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x50(%rbp) addq $0xe0, %rdi leaq -0x14(%rbp), %rsi callq 0x8b94c0 movq -0x50(%rbp), %rdi movq %rax, -0x20(%rbp) addq $0xe0, %rdi callq 0x8b9520 movq %rax, -0x28(%rbp) leaq ...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/eliminate_dead_members_pass.cpp
spvtools::opt::EliminateDeadMembersPass::FindLiveMembers(spvtools::opt::Function const&)::$_0::operator()(spvtools::opt::Instruction const*) const
void EliminateDeadMembersPass::FindLiveMembers(const Instruction* inst) { switch (inst->opcode()) { case spv::Op::OpStore: MarkMembersAsLiveForStore(inst); break; case spv::Op::OpCopyMemory: case spv::Op::OpCopyMemorySized: MarkMembersAsLiveForCopyMemory(inst); break; case spv:...
pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rsi callq 0x8b66a0 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/eliminate_dead_members_pass.cpp
spvtools::opt::FixStorageClass::Process()
Pass::Status FixStorageClass::Process() { bool modified = false; get_module()->ForEachInst([this, &modified](Instruction* inst) { if (inst->opcode() == spv::Op::OpVariable) { std::set<uint32_t> seen; std::vector<std::pair<Instruction*, uint32_t>> uses; get_def_use_mgr()->ForEachUse(inst, ...
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x50(%rbp) movb $0x0, -0x9(%rbp) callq 0x7750e0 movq %rax, %rcx movq -0x50(%rbp), %rax movq %rcx, -0x48(%rbp) movq %rax, -0x40(%rbp) leaq -0x9(%rbp), %rax movq %rax, -0x38(%rbp) leaq -0x30(%rbp), %rdi leaq -0x40(%rbp), %...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/fix_storage_class.cpp
spvtools::opt::FixStorageClass::PropagateStorageClass(spvtools::opt::Instruction*, spv::StorageClass, std::set<unsigned int, std::less<unsigned int>, std::allocator<unsigned int>>*)
bool FixStorageClass::PropagateStorageClass(Instruction* inst, spv::StorageClass storage_class, std::set<uint32_t>* seen) { if (!IsPointerResultType(inst)) { return false; } if (IsPointerToStorageClass(inst, storage_class...
pushq %rbp movq %rsp, %rbp subq $0xf0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0xc8(%rbp) movq -0x18(%rbp), %rsi callq 0x8beee0 testb $0x1, %al jne 0x8bec1b movb $0x0, -0x1(%rbp) jmp 0x8beec8 movq -0xc8(%rbp), %rdi movq -0x18(%r...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/fix_storage_class.cpp
spvtools::opt::InstructionList::iterator::Erase()
iterator Erase() { iterator_template next_node = *this; ++next_node; node_->RemoveFromList(); delete node_; return next_node; }
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x38(%rbp) movq %rdi, %rax movq %rax, -0x30(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rsi movq %rsi, -0x28(%rbp) leaq -0x18(%rbp), %rdi callq 0x771ab0 leaq -0x18(%rbp), %rdi callq 0x775a60 movq -0x28(%rbp), %rax movq (%rax), %rdi callq ...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/instruction_list.h
spvtools::opt::InstructionFolder::OperateWords(spv::Op, std::vector<unsigned int, std::allocator<unsigned int>> const&) const
uint32_t InstructionFolder::OperateWords( spv::Op opcode, const std::vector<uint32_t>& operand_words) const { switch (operand_words.size()) { case 1: return UnaryOperate(opcode, operand_words.front()); case 2: return BinaryOperate(opcode, operand_words.front(), operand_words.back()); case ...
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rdi callq 0xe8df0 movq %rax, %rcx movq %rcx, -0x28(%rbp) subq $0x1, %rax je 0x8c274e jmp 0x8c2733 movq -0x28(%rbp), %rax subq $0x2, %rax je 0x...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/fold.cpp
spvtools::opt::InstructionFolder::FoldBinaryBooleanOpToConstant(spvtools::opt::Instruction*, std::function<unsigned int (unsigned int)> const&, unsigned int*) const
bool InstructionFolder::FoldBinaryBooleanOpToConstant( Instruction* inst, const std::function<uint32_t(uint32_t)>& id_map, uint32_t* result) const { spv::Op opcode = inst->opcode(); analysis::ConstantManager* const_manger = context_->get_constant_mgr(); uint32_t ids[2]; const analysis::BoolConstant* co...
pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x18(%rbp), %rdi callq 0x76b0f0 movl %eax, %ecx movq -0x78(%rbp), %rax movl %ecx, -0x2c(%rbp) movq (%rax), %rdi callq 0x76b310 movq ...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/fold.cpp
spvtools::opt::InstructionFolder::FoldIntegerOpToConstant(spvtools::opt::Instruction*, std::function<unsigned int (unsigned int)> const&, unsigned int*) const
bool InstructionFolder::FoldIntegerOpToConstant( Instruction* inst, const std::function<uint32_t(uint32_t)>& id_map, uint32_t* result) const { assert(IsFoldableOpcode(inst->opcode()) && "Unhandled instruction opcode in FoldScalars"); switch (inst->NumInOperands()) { case 2: return FoldBin...
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rdi callq 0x76b0f0 movq -0x38(%rbp), %rdi movl %eax, %esi callq 0x8c3340 movb %al, %cl xorl %eax, %eax testb $0x1, %cl ...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/fold.cpp
spvtools::opt::InstructionFolder::FoldVectors(spv::Op, unsigned int, std::vector<spvtools::opt::analysis::Constant const*, std::allocator<spvtools::opt::analysis::Constant const*>> const&) const
std::vector<uint32_t> InstructionFolder::FoldVectors( spv::Op opcode, uint32_t num_dims, const std::vector<const analysis::Constant*>& operands) const { assert(IsFoldableOpcode(opcode) && "Unhandled instruction opcode in FoldVectors"); std::vector<uint32_t> result; for (uint32_t d = 0; d < num_di...
pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %rdi, -0xa0(%rbp) movq %rdi, %rax movq %rax, -0x98(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl %ecx, -0x18(%rbp) movq %r8, -0x20(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x90(%rbp) movl -0x14(%rbp), %esi callq 0x8c3340 movb %al, %cl xor...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/fold.cpp
spvtools::opt::InstructionFolder::FoldInstructionInternal(spvtools::opt::Instruction*) const::$_0::operator()(unsigned int) const
bool InstructionFolder::FoldInstructionInternal(Instruction* inst) const { auto identity_map = [](uint32_t id) { return id; }; Instruction* folded_inst = FoldInstructionToConstant(inst, identity_map); if (folded_inst != nullptr) { inst->SetOpcode(spv::Op::OpCopyObject); inst->SetInOperands({{SPV_OPERAND_T...
pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl -0xc(%rbp), %eax popq %rbp retq
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/fold.cpp
spvtools::opt::FoldingRules::AddFoldingRules()
void FoldingRules::AddFoldingRules() { // Add all folding rules to the list for the opcodes to which they apply. // Note that the order in which rules are added to the list matters. If a rule // applies to the instruction, the rest of the rules will not be attempted. // Take that into consideration. rules_[sp...
pushq %rbp movq %rsp, %rbp subq $0xe60, %rsp # imm = 0xE60 movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0xc00(%rbp) addq $0x8, %rdi movl $0x7c, -0xc(%rbp) leaq -0xc(%rbp), %rsi callq 0x80ff80 movq %rax, -0xe58(%rbp) leaq -0x30(%rbp), %rdi callq 0x8c7150 movq -0xe58(%rbp), %rdi leaq -0x30(%rbp), %r...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
spvtools::opt::(anonymous namespace)::FMixFeedingExtract()
FoldingRule FMixFeedingExtract() { return [](IRContext* context, Instruction* inst, const std::vector<const analysis::Constant*>&) { assert(inst->opcode() == spv::Op::OpCompositeExtract && "Wrong opcode. Should be OpCompositeExtract."); analysis::DefUseManager* def_use_mgr = context->g...
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, %rax movq %rax, -0x18(%rbp) movq %rdi, -0x8(%rbp) leaq -0x9(%rbp), %rsi callq 0x8ca630 movq -0x18(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
spvtools::opt::(anonymous namespace)::MergeAddNegateArithmetic()
FoldingRule MergeAddNegateArithmetic() { return [](IRContext* context, Instruction* inst, const std::vector<const analysis::Constant*>& constants) { assert(inst->opcode() == spv::Op::OpFAdd || inst->opcode() == spv::Op::OpIAdd); const analysis::Type* type = context->get_type_mgr...
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, %rax movq %rax, -0x18(%rbp) movq %rdi, -0x8(%rbp) leaq -0x9(%rbp), %rsi callq 0x8ccb00 movq -0x18(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
spvtools::opt::(anonymous namespace)::MergeAddAddArithmetic()
FoldingRule MergeAddAddArithmetic() { return [](IRContext* context, Instruction* inst, const std::vector<const analysis::Constant*>& constants) { assert(inst->opcode() == spv::Op::OpFAdd || inst->opcode() == spv::Op::OpIAdd); const analysis::Type* type = context->get_type_mgr()-...
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, %rax movq %rax, -0x18(%rbp) movq %rdi, -0x8(%rbp) leaq -0x9(%rbp), %rsi callq 0x8cd2f0 movq -0x18(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
spvtools::opt::(anonymous namespace)::MergeDivMulArithmetic()
FoldingRule MergeDivMulArithmetic() { return [](IRContext* context, Instruction* inst, const std::vector<const analysis::Constant*>& constants) { assert(inst->opcode() == spv::Op::OpFDiv); analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); analysis::ConstantManager* const_mgr =...
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, %rax movq %rax, -0x18(%rbp) movq %rdi, -0x8(%rbp) leaq -0x9(%rbp), %rsi callq 0x8d1e50 movq -0x18(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
spvtools::opt::(anonymous namespace)::MergeDivNegateArithmetic()
FoldingRule MergeDivNegateArithmetic() { return [](IRContext* context, Instruction* inst, const std::vector<const analysis::Constant*>& constants) { assert(inst->opcode() == spv::Op::OpFDiv); analysis::ConstantManager* const_mgr = context->get_constant_mgr(); if (!inst->IsFloatingPointFoldingA...
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, %rax movq %rax, -0x18(%rbp) movq %rdi, -0x8(%rbp) leaq -0x9(%rbp), %rsi callq 0x8d28b0 movq -0x18(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
spvtools::opt::(anonymous namespace)::MergeNegateArithmetic()
FoldingRule MergeNegateArithmetic() { return [](IRContext* context, Instruction* inst, const std::vector<const analysis::Constant*>& constants) { assert(inst->opcode() == spv::Op::OpFNegate || inst->opcode() == spv::Op::OpSNegate); (void)constants; const analysis::Type* type = ...
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, %rax movq %rax, -0x18(%rbp) movq %rdi, -0x8(%rbp) leaq -0x9(%rbp), %rsi callq 0x8d5970 movq -0x18(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
spvtools::opt::(anonymous namespace)::MergeSubAddArithmetic()
FoldingRule MergeSubAddArithmetic() { return [](IRContext* context, Instruction* inst, const std::vector<const analysis::Constant*>& constants) { assert(inst->opcode() == spv::Op::OpFSub || inst->opcode() == spv::Op::OpISub); const analysis::Type* type = context->get_type_mgr()-...
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, %rax movq %rax, -0x18(%rbp) movq %rdi, -0x8(%rbp) leaq -0x9(%rbp), %rsi callq 0x8d8180 movq -0x18(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
spvtools::opt::(anonymous namespace)::RedundantSelect()
FoldingRule RedundantSelect() { // An OpSelect instruction where both values are the same or the condition is // constant can be replaced by one of the values return [](IRContext*, Instruction* inst, const std::vector<const analysis::Constant*>& constants) { assert(inst->opcode() == spv::Op::OpSel...
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, %rax movq %rax, -0x18(%rbp) movq %rdi, -0x8(%rbp) leaq -0x9(%rbp), %rsi callq 0x8da620 movq -0x18(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
spvtools::opt::(anonymous namespace)::VectorShuffleFeedingShuffle()
FoldingRule VectorShuffleFeedingShuffle() { return [](IRContext* context, Instruction* inst, const std::vector<const analysis::Constant*>&) { assert(inst->opcode() == spv::Op::OpVectorShuffle && "Wrong opcode. Should be OpVectorShuffle."); analysis::DefUseManager* def_use_mgr = contex...
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, %rax movq %rax, -0x18(%rbp) movq %rdi, -0x8(%rbp) leaq -0x9(%rbp), %rsi callq 0x8db870 movq -0x18(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
spvtools::opt::(anonymous namespace)::BitCastScalarOrVector()::$_0::operator()(spvtools::opt::IRContext*, spvtools::opt::Instruction*, std::vector<spvtools::opt::analysis::Constant const*, std::allocator<spvtools::opt::analysis::Constant const*>> const&) const
FoldingRule BitCastScalarOrVector() { return [](IRContext* context, Instruction* inst, const std::vector<const analysis::Constant*>& constants) { assert(inst->opcode() == spv::Op::OpBitcast && constants.size() == 1); if (constants[0] == nullptr) return false; const analysis::Type* type = ...
pushq %rbp movq %rsp, %rbp subq $0x140, %rsp # imm = 0x140 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rdi callq 0x76b0f0 movl %eax, %ecx xorl %eax, %eax cmpl $0x7c, %ecx movb %al, -0xfe(%rbp) jne 0x8c8299 movq -0x28(%rbp), %rdi callq 0x84f77...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
spvtools::opt::(anonymous namespace)::ConvertWordsToNumericScalarOrVectorConstant(spvtools::opt::analysis::ConstantManager*, std::vector<unsigned int, std::allocator<unsigned int>> const&, spvtools::opt::analysis::Type const*)
const analysis::Constant* ConvertWordsToNumericScalarOrVectorConstant( analysis::ConstantManager* const_mgr, const std::vector<uint32_t>& words, const analysis::Type* type) { const spvtools::opt::analysis::Integer* int_type = type->AsInteger(); if (int_type && int_type->width() <= 32) { assert(words.si...
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x20(%rbp), %rdi movq (%rdi), %rax callq *0x50(%rax) movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) je 0x8c882b movq -0x28(%rbp), %rdi callq 0x797ae0 cmpl $0x20, %eax ja 0x8c882b movq -0x18(%rbp), %rdi ...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
spvtools::opt::(anonymous namespace)::GetWordsFromScalarIntConstant(spvtools::opt::analysis::IntConstant const*)
std::vector<uint32_t> GetWordsFromScalarIntConstant( const analysis::IntConstant* c) { assert(c != nullptr); uint32_t width = c->type()->AsInteger()->width(); assert(width == 8 || width == 16 || width == 32 || width == 64); if (width == 64) { uint64_t uval = static_cast<uint64_t>(c->GetU64()); retur...
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x48(%rbp) movq %rdi, %rax movq %rax, -0x40(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) je 0x8c89e4 jmp 0x8c8a03 leaq 0x31ab86(%rip), %rdi # 0xbe3571 leaq 0x3282dc(%rip), %rsi # 0xbf0cce movl $0x91, %edx leaq 0x328488(%rip), %rc...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
spvtools::opt::(anonymous namespace)::VectorShuffleFeedingExtract()::$_0::operator()(spvtools::opt::IRContext*, spvtools::opt::Instruction*, std::vector<spvtools::opt::analysis::Constant const*, std::allocator<spvtools::opt::analysis::Constant const*>> const&) const
FoldingRule VectorShuffleFeedingExtract() { return [](IRContext* context, Instruction* inst, const std::vector<const analysis::Constant*>&) { assert(inst->opcode() == spv::Op::OpCompositeExtract && "Wrong opcode. Should be OpCompositeExtract."); analysis::DefUseManager* def_use_mgr = c...
pushq %rbp movq %rsp, %rbp subq $0x140, %rsp # imm = 0x140 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rdi callq 0x76b0f0 movl %eax, %ecx xorl %eax, %eax cmpl $0x51, %ecx movb %al, -0x105(%rbp) jne 0x8ca1cd movb $0x1, %al movb %al, -0x105(%rb...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
spvtools::opt::(anonymous namespace)::DoInsertedValuesCoverEntireObject(spvtools::opt::analysis::Type const*, std::map<unsigned int, unsigned int, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int>>>&)
bool DoInsertedValuesCoverEntireObject( const analysis::Type* type, std::map<uint32_t, uint32_t>& values_inserted) { uint32_t container_size = GetNumberOfElements(type); if (container_size != values_inserted.size()) { return false; } if (values_inserted.rbegin()->first >= container_size) { return f...
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rdi callq 0x8cb360 movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rdi callq 0x8ddff0 movq %rax, %rcx movq -0x30(%rbp), %rax cmpq %rcx, %rax je 0x8cb03e movb $0x0, -0x1(%r...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
bool spvtools::opt::(anonymous namespace)::IsValidResult<double>(double)
bool IsValidResult(T val) { int classified = std::fpclassify(val); switch (classified) { case FP_NAN: case FP_INFINITE: case FP_SUBNORMAL: return false; default: return true; } }
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movsd %xmm0, -0x10(%rbp) movsd -0x10(%rbp), %xmm0 callq 0xdd760 movl %eax, -0x14(%rbp) movl -0x14(%rbp), %eax movl %eax, -0x18(%rbp) subl $0x2, %eax jb 0x8ce8e1 jmp 0x8ce8d7 movl -0x18(%rbp), %eax subl $0x3, %eax jne 0x8ce8e7 jmp 0x8ce8e1 movb $0x0, -0x1(%rbp) jmp 0x8ce8eb mo...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
spvtools::opt::(anonymous namespace)::MergeAddSubArithmetic()::$_0::operator()(spvtools::opt::IRContext*, spvtools::opt::Instruction*, std::vector<spvtools::opt::analysis::Constant const*, std::allocator<spvtools::opt::analysis::Constant const*>> const&) const
FoldingRule MergeAddSubArithmetic() { return [](IRContext* context, Instruction* inst, const std::vector<const analysis::Constant*>& constants) { assert(inst->opcode() == spv::Op::OpFAdd || inst->opcode() == spv::Op::OpIAdd); const analysis::Type* type = context->get_type_mgr()-...
pushq %rbp movq %rsp, %rbp subq $0x1e0, %rsp # imm = 0x1E0 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rdi callq 0x76b0f0 movl %eax, %ecx movb $0x1, %al cmpl $0x81, %ecx movb %al, -0x18e(%rbp) je 0x8cee6d movq -0x20(%rbp), %rdi callq 0x76b0f0...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
spvtools::opt::(anonymous namespace)::MergeGenericAddSubArithmetic()::$_0::operator()(spvtools::opt::IRContext*, spvtools::opt::Instruction*, std::vector<spvtools::opt::analysis::Constant const*, std::allocator<spvtools::opt::analysis::Constant const*>> const&) const
FoldingRule MergeGenericAddSubArithmetic() { return [](IRContext* context, Instruction* inst, const std::vector<const analysis::Constant*>&) { assert(inst->opcode() == spv::Op::OpFAdd || inst->opcode() == spv::Op::OpIAdd); const analysis::Type* type = context->get_type_mgr()->Ge...
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rdi callq 0x76b0f0 movl %eax, %ecx movb $0x1, %al cmpl $0x81, %ecx movb %al, -0x41(%rbp) je 0x8cf6b4 movq -0x20(%rbp), %rdi callq 0x76b0f0 cmpl $0x80, %eax sete %al ...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
spvtools::opt::(anonymous namespace)::MergeGenericAddendSub(unsigned int, unsigned int, spvtools::opt::Instruction*)
bool MergeGenericAddendSub(uint32_t addend, uint32_t sub, Instruction* inst) { IRContext* context = inst->context(); analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); Instruction* sub_inst = def_use_mgr->GetDef(sub); if (sub_inst->opcode() != spv::Op::OpFSub && sub_inst->opcode() != spv::...
pushq %rbp movq %rsp, %rbp subq $0xf0, %rsp movl %edi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq -0x18(%rbp), %rdi callq 0x779a10 movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rdi callq 0x76b8a0 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rdi movl -0xc(%rbp), %esi callq 0x895fb0 movq %rax, -0x30(%rbp) movq...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
spvtools::opt::(anonymous namespace)::RedundantFDiv()::$_0::operator()(spvtools::opt::IRContext*, spvtools::opt::Instruction*, std::vector<spvtools::opt::analysis::Constant const*, std::allocator<spvtools::opt::analysis::Constant const*>> const&) const
FoldingRule RedundantFDiv() { return [](IRContext*, Instruction* inst, const std::vector<const analysis::Constant*>& constants) { assert(inst->opcode() == spv::Op::OpFDiv && "Wrong opcode. Should be OpFDiv."); assert(constants.size() == 2); if (!inst->IsFloatingPointFoldingAllowed...
pushq %rbp movq %rsp, %rbp subq $0x1a0, %rsp # imm = 0x1A0 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rdi callq 0x76b0f0 movl %eax, %ecx xorl %eax, %eax cmpl $0x88, %ecx movb %al, -0x15e(%rbp) jne 0x8d0690 movb $0x1, %al movb %al, -0x15e(%rb...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
spvtools::opt::(anonymous namespace)::NegateConstant(spvtools::opt::analysis::ConstantManager*, spvtools::opt::analysis::Constant const*)
uint32_t NegateConstant(analysis::ConstantManager* const_mgr, const analysis::Constant* c) { if (c->type()->AsVector()) { return NegateVectorConstant(const_mgr, c); } else if (c->type()->AsFloat()) { return NegateFloatingPointConstant(const_mgr, c); } else { assert(c->type()->A...
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rdi callq 0x7e91a0 movq %rax, %rdi movq (%rdi), %rax callq *0x70(%rax) cmpq $0x0, %rax je 0x8d2f9a movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x8d3020 movl %eax, -0x4(%rbp) jmp 0x8d300d movq -0x18(%rbp)...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
spvtools::opt::(anonymous namespace)::RedundantFMul()::$_0::operator()(spvtools::opt::IRContext*, spvtools::opt::Instruction*, std::vector<spvtools::opt::analysis::Constant const*, std::allocator<spvtools::opt::analysis::Constant const*>> const&) const
FoldingRule RedundantFMul() { return [](IRContext*, Instruction* inst, const std::vector<const analysis::Constant*>& constants) { assert(inst->opcode() == spv::Op::OpFMul && "Wrong opcode. Should be OpFMul."); assert(constants.size() == 2); if (!inst->IsFloatingPointFoldingAllowed...
pushq %rbp movq %rsp, %rbp subq $0x1a0, %rsp # imm = 0x1A0 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rdi callq 0x76b0f0 movl %eax, %ecx xorl %eax, %eax cmpl $0x85, %ecx movb %al, -0x15e(%rbp) jne 0x8d39b0 movb $0x1, %al movb %al, -0x15e(%rb...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
spvtools::opt::(anonymous namespace)::MergeMulNegateArithmetic()::$_0::operator()(spvtools::opt::IRContext*, spvtools::opt::Instruction*, std::vector<spvtools::opt::analysis::Constant const*, std::allocator<spvtools::opt::analysis::Constant const*>> const&) const
FoldingRule MergeMulNegateArithmetic() { return [](IRContext* context, Instruction* inst, const std::vector<const analysis::Constant*>& constants) { assert(inst->opcode() == spv::Op::OpFMul || inst->opcode() == spv::Op::OpIMul); analysis::ConstantManager* const_mgr = context->get_consta...
pushq %rbp movq %rsp, %rbp subq $0x1a0, %rsp # imm = 0x1A0 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rdi callq 0x76b0f0 movl %eax, %ecx movb $0x1, %al cmpl $0x85, %ecx movb %al, -0x15e(%rbp) je 0x8d54fd movq -0x20(%rbp), %rdi callq 0x76b0f0...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
spvtools::opt::(anonymous namespace)::RedundantIAdd()::$_0::operator()(spvtools::opt::IRContext*, spvtools::opt::Instruction*, std::vector<spvtools::opt::analysis::Constant const*, std::allocator<spvtools::opt::analysis::Constant const*>> const&) const
FoldingRule RedundantIAdd() { return [](IRContext* context, Instruction* inst, const std::vector<const analysis::Constant*>& constants) { assert(inst->opcode() == spv::Op::OpIAdd && "Wrong opcode. Should be OpIAdd."); uint32_t operand = std::numeric_limits<uint32_t>::max(); const a...
pushq %rbp movq %rsp, %rbp subq $0x110, %rsp # imm = 0x110 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rdi callq 0x76b0f0 movl %eax, %ecx xorl %eax, %eax cmpl $0x80, %ecx movb %al, -0xd6(%rbp) jne 0x8d95c0 movb $0x1, %al movb %al, -0xd6(%rbp)...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
spvtools::opt::(anonymous namespace)::StoringUndef()::$_0::operator()(spvtools::opt::IRContext*, spvtools::opt::Instruction*, std::vector<spvtools::opt::analysis::Constant const*, std::allocator<spvtools::opt::analysis::Constant const*>> const&) const
FoldingRule StoringUndef() { return [](IRContext* context, Instruction* inst, const std::vector<const analysis::Constant*>&) { assert(inst->opcode() == spv::Op::OpStore && "Wrong opcode. Should be OpStore."); analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); // I...
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rdi callq 0x76b0f0 movl %eax, %ecx xorl %eax, %eax cmpl $0x3e, %ecx movb %al, -0x41(%rbp) jne 0x8db644 movb $0x1, %al movb %al, -0x41(%rbp) jmp 0x8db644 movb -0x41(%...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
spvtools::opt::(anonymous namespace)::UpdateImageOperands()::$_0::operator()(spvtools::opt::IRContext*, spvtools::opt::Instruction*, std::vector<spvtools::opt::analysis::Constant const*, std::allocator<spvtools::opt::analysis::Constant const*>> const&) const
FoldingRule UpdateImageOperands() { return [](IRContext*, Instruction* inst, const std::vector<const analysis::Constant*>& constants) { const auto opcode = inst->opcode(); (void)opcode; assert((opcode == spv::Op::OpImageSampleImplicitLod || opcode == spv::Op::OpImageSampleExplicitL...
pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rdi callq 0x76b0f0 movl %eax, -0x2c(%rbp) cmpl $0x57, -0x2c(%rbp) je 0x8dc6ee cmpl $0x58, -0x2c(%rbp) je 0x8dc6ee cmpl $0x59, -0x2c(%rbp) je 0x8dc6ee cmpl $0x5a, -0x...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/folding_rules.cpp
spvtools::opt::FoldSpecConstantOpAndCompositePass::Process()
Pass::Status FoldSpecConstantOpAndCompositePass::Process() { bool modified = false; analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); // Traverse through all the constant defining instructions. For Normal // Constants whose values are determined and do not depend on OpUndef // instructions...
pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x50(%rbp) movb $0x0, -0x9(%rbp) callq 0x76b110 movq %rax, %rdi callq 0x76b310 movq -0x50(%rbp), %rdi movq %rax, -0x18(%rbp) callq 0x76b110 movq %rax, %rsi leaq -0x20(%rbp), %rdi callq 0x780c50 leaq -0x28(%rbp), %rdi lea...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/fold_spec_constant_op_and_composite_pass.cpp
spvtools::opt::FoldSpecConstantOpAndCompositePass::DoComponentWiseOperation(spvtools::opt::InstructionList::iterator*)
Instruction* FoldSpecConstantOpAndCompositePass::DoComponentWiseOperation( Module::inst_iterator* pos) { const Instruction* inst = &**pos; analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); const analysis::Type* result_type = const_mgr->GetType(inst); spv::Op spec_opcode = static_cast<spv...
pushq %rbp movq %rsp, %rbp subq $0x1a0, %rsp # imm = 0x1A0 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x160(%rbp) movq -0x18(%rbp), %rdi callq 0x772880 movq -0x160(%rbp), %rdi movq %rax, -0x20(%rbp) callq 0x76b110 movq %rax, %rdi callq 0x76b310 movq %rax, -0x28(%rbp) mov...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/fold_spec_constant_op_and_composite_pass.cpp
unsigned int spvtools::utils::ClearHighBits<unsigned int>(unsigned int, unsigned long)
T ClearHighBits(T word, size_t num_bits_to_set) { if (num_bits_to_set == 0) { return word; } const size_t word_bit_width = IntegerBitWidth<T>::get; assert(num_bits_to_set <= word_bit_width && "Can't clear more bits than bit width"); return MutateBits(word, word_bit_width - num_bits_to_set, num_bi...
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x8e039e movl -0x8(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x8e03fd movq $0x20, -0x18(%rbp) xorl %eax, %eax cmpq $0x20, -0x10(%rbp) movb %al, -0x19(%rbp) ja 0x8e03b9 movb $0x1, %al movb %al, -0x19(%rbp) jmp...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/util/bitutils.h
spvtools::opt::InlinePass::CloneAndMapLocals(spvtools::opt::Function*, std::vector<std::unique_ptr<spvtools::opt::Instruction, std::default_delete<spvtools::opt::Instruction>>, std::allocator<std::unique_ptr<spvtools::opt::Instruction, std::default_delete<spvtools::opt::Instruction>>>>*, std::unordered_map<unsigned int...
bool InlinePass::CloneAndMapLocals( Function* calleeFn, std::vector<std::unique_ptr<Instruction>>* new_vars, std::unordered_map<uint32_t, uint32_t>* callee2caller, analysis::DebugInlinedAtContext* inlined_at_ctx) { auto callee_block_itr = calleeFn->begin(); auto callee_var_itr = callee_block_itr->begin(...
pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x18(%rbp), %rdi callq 0x76f940 movq %rax, -0x40(%rbp) movq %rdx, -0x38(%rbp) leaq -0x40(%rbp), %rdi callq 0x7...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/inline_pass.cpp
spvtools::opt::InlinePass::MoveCallerInstsAfterFunctionCall(std::unordered_map<unsigned int, spvtools::opt::Instruction*, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, spvtools::opt::Instruction*>>>*, std::unordered_map<unsigned int, unsigned int, std::hash<unsigned ...
bool InlinePass::MoveCallerInstsAfterFunctionCall( std::unordered_map<uint32_t, Instruction*>* preCallSB, std::unordered_map<uint32_t, uint32_t>* postCallSB, std::unique_ptr<BasicBlock>* new_blk_ptr, BasicBlock::iterator call_inst_itr, bool multiBlocks) { // Copy remaining instructions from caller blo...
pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %r8, -0x68(%rbp) movq %rdi, %r8 movq -0x68(%rbp), %rdi movb %r9b, %al movq %r8, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %rdi, -0x30(%rbp) andb $0x1, %al movb %al, -0x31(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x60(%rbp) call...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/inline_pass.cpp
spvtools::opt::Instruction::NumInOperandWords() const
uint32_t Instruction::NumInOperandWords() const { uint32_t size = 0; for (uint32_t i = TypeResultIdCount(); i < operands_.size(); ++i) size += static_cast<uint32_t>(operands_[i].words.size()); return size; }
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x18(%rbp) movl $0x0, -0xc(%rbp) callq 0x76c0e0 movl %eax, -0x10(%rbp) movq -0x18(%rbp), %rdi movl -0x10(%rbp), %eax movq %rax, -0x20(%rbp) addq $0x38, %rdi callq 0x7727b0 movq %rax, %rcx movq -0x20(%rbp), %rax cmpq %rcx...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/instruction.cpp
spvtools::opt::Instruction::GetBaseAddress() const
Instruction* Instruction::GetBaseAddress() const { uint32_t base = GetSingleWordInOperand(kLoadBaseIndex); Instruction* base_inst = context()->get_def_use_mgr()->GetDef(base); bool done = false; while (!done) { switch (base_inst->opcode()) { case spv::Op::OpAccessChain: case spv::Op::OpInBoundsA...
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x28(%rbp) xorl %esi, %esi callq 0x76b0b0 movq -0x28(%rbp), %rdi movl %eax, -0xc(%rbp) callq 0x779a10 movq %rax, %rdi callq 0x76b8a0 movq %rax, %rdi movl -0xc(%rbp), %esi callq 0x895fb0 movq %rax, -0x18(%rbp) movb $0x0, ...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/instruction.cpp
spvtools::opt::Instruction::UpdateDebugInlinedAt(unsigned int)
void Instruction::UpdateDebugInlinedAt(uint32_t new_inlined_at) { dbg_scope_.SetInlinedAt(new_inlined_at); for (auto& i : dbg_line_insts_) { i.dbg_scope_.SetInlinedAt(new_inlined_at); } if (!IsLineInst() && context()->AreAnalysesValid(IRContext::kAnalysisDebugInfo)) { context()->get_debug_info_mgr...
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x38(%rbp) addq $0x68, %rdi movl -0xc(%rbp), %esi callq 0x8fb6c0 movq -0x38(%rbp), %rax addq $0x50, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi callq 0x7702a0 movq %rax, -0x20(%rbp) movq -0x1...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/instruction.cpp
spvtools::opt::Instruction::IsValidBasePointer() const
bool Instruction::IsValidBasePointer() const { uint32_t tid = type_id(); if (tid == 0) { return false; } Instruction* type = context()->get_def_use_mgr()->GetDef(tid); if (type->opcode() != spv::Op::OpTypePointer) { return false; } auto feature_mgr = context()->get_feature_mgr(); if (feature_m...
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x40(%rbp) callq 0x76b040 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) jne 0x8f877b movb $0x0, -0x1(%rbp) jmp 0x8f88d6 movq -0x40(%rbp), %rdi callq 0x779a10 movq %rax, %rdi callq 0x76b8a0 movq %rax, %rdi movl -0x14(%r...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/instruction.cpp
spvtools::opt::Instruction::IsOpaqueType() const
bool Instruction::IsOpaqueType() const { if (opcode() == spv::Op::OpTypeStruct) { bool is_opaque = false; ForEachInOperand([&is_opaque, this](const uint32_t* op_id) { Instruction* type_inst = context()->get_def_use_mgr()->GetDef(*op_id); is_opaque |= type_inst->IsOpaqueType(); }); return i...
pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x60(%rbp) callq 0x76b0f0 cmpl $0x1e, %eax jne 0x8f894f movq -0x60(%rbp), %rax movb $0x0, -0x11(%rbp) leaq -0x11(%rbp), %rcx movq %rcx, -0x48(%rbp) movq %rax, -0x40(%rbp) leaq -0x38(%rbp), %rdi leaq -0x48(%rbp), %rsi c...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/instruction.cpp
spvtools::opt::Instruction::GetOpenCL100DebugOpcode() const
OpenCLDebugInfo100Instructions Instruction::GetOpenCL100DebugOpcode() const { if (opcode() != spv::Op::OpExtInst) { return OpenCLDebugInfo100InstructionsMax; } if (!context()->get_feature_mgr()->GetExtInstImportId_OpenCL100DebugInfo()) { return OpenCLDebugInfo100InstructionsMax; } if (GetSingleWordI...
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x18(%rbp) callq 0x76b0f0 cmpl $0xc, %eax je 0x8f8a07 movl $0x7ffffff, -0x4(%rbp) # imm = 0x7FFFFFF jmp 0x8f8a78 movq -0x18(%rbp), %rdi callq 0x779a10 movq %rax, %rdi callq 0x76c140 movq %rax, %rdi callq 0x8903a0 cmpl...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/instruction.cpp
spvtools::opt::Instruction::IsFoldableByFoldScalar() const
bool Instruction::IsFoldableByFoldScalar() const { const InstructionFolder& folder = context()->get_instruction_folder(); if (!folder.IsFoldableOpcode(opcode())) { return false; } Instruction* type = context()->get_def_use_mgr()->GetDef(type_id()); if (!folder.IsFoldableScalarType(type)) { return fal...
pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x60(%rbp) callq 0x779a10 movq %rax, %rdi callq 0x79ac20 movq -0x60(%rbp), %rdi movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x58(%rbp) callq 0x76b0f0 movq -0x58(%rbp), %rdi movl %eax, %esi callq 0x8c3340 ...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/instruction.cpp
spvtools::opt::Instruction::IsFoldableByFoldVector() const
bool Instruction::IsFoldableByFoldVector() const { const InstructionFolder& folder = context()->get_instruction_folder(); if (!folder.IsFoldableOpcode(opcode())) { return false; } Instruction* type = context()->get_def_use_mgr()->GetDef(type_id()); if (!folder.IsFoldableVectorType(type)) { return fal...
pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x60(%rbp) callq 0x779a10 movq %rax, %rdi callq 0x79ac20 movq -0x60(%rbp), %rdi movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x58(%rbp) callq 0x76b0f0 movq -0x58(%rbp), %rdi movl %eax, %esi callq 0x8c3340 ...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/instruction.cpp
spvtools::opt::Instruction::IsFloatingPointFoldingAllowed() const
bool Instruction::IsFloatingPointFoldingAllowed() const { // TODO: Add the rules for kernels. For now it will be pessimistic. // For now, do not support capabilities introduced by SPV_KHR_float_controls. if (!context_->get_feature_mgr()->HasCapability(spv::Capability::Shader) || context_->get_feature_mgr()...
pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x48(%rbp) movq 0x20(%rax), %rdi callq 0x76c140 movq %rax, %rdi movl $0x1, %esi callq 0x76c180 testb $0x1, %al jne 0x8f8fc3 jmp 0x8f905b movq -0x48(%rbp), %rax movq 0x20(%rax), %rdi callq 0x76c140 movq %rax, %rdi movl ...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/instruction.cpp
spvtools::opt::Instruction::PrettyPrint[abi:cxx11](unsigned int) const
std::string Instruction::PrettyPrint(uint32_t options) const { // Convert the module to binary. std::vector<uint32_t> module_binary; context()->module()->ToBinary(&module_binary, /* skip_nop = */ false); // Convert the instruction to binary. This is used to identify the correct // stream of words to output f...
pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x78(%rbp) movq %rdi, %rax movq %rax, -0x50(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x80(%rbp) leaq -0x30(%rbp), %rdi callq 0xe8dd0 movq -0x80(%rbp), %rdi callq 0x779a10 movq %rax, %rdi callq 0x7...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/instruction.cpp
spvtools::opt::DebugScope::ToBinary(unsigned int, unsigned int, unsigned int, std::vector<unsigned int, std::allocator<unsigned int>>*) const
void DebugScope::ToBinary(uint32_t type_id, uint32_t result_id, uint32_t ext_set, std::vector<uint32_t>* binary) const { uint32_t num_words = kDebugScopeNumWords; CommonDebugInfoInstructions dbg_opcode = CommonDebugInfoDebugScope; if (GetLexicalScope() == kNoDeb...
pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movl %ecx, -0x14(%rbp) movq %r8, -0x20(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0xa0(%rbp) movl $0x7, -0x24(%rbp) movl $0x17, -0x28(%rbp) callq 0x804f10 cmpl $0x0, %eax jne 0x8f958f movl $0x5, -0x24(%rbp) movl ...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/instruction.cpp
unsigned int* spvtools::utils::SmallVector<unsigned int, 2ul>::insert<unsigned int const*>(unsigned int*, unsigned int const*, unsigned int const*)
iterator insert(iterator pos, InputIt first, InputIt last) { size_t element_idx = (pos - begin()); size_t num_of_new_elements = std::distance(first, last); size_t new_size = size_ + num_of_new_elements; if (!large_data_ && new_size > small_size) { MoveToLargeData(); } if (large_data_) { ...
pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x80(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x88(%rbp) callq 0x8fc160 movq %rax, %rcx movq -0x88(%rbp), %rax subq %rcx, %rax sarq $0x2, %rax movq %...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/util/small_vector.h
spvtools::opt::InterfaceVariableScalarReplacement::ReportErrorIfHasNoExtraArraynessForOtherEntry(spvtools::opt::Instruction*)
bool InterfaceVariableScalarReplacement:: ReportErrorIfHasNoExtraArraynessForOtherEntry(Instruction* var) { if (vars_without_extra_arrayness.find(var) == vars_without_extra_arrayness.end()) return false; std::string message( "A variable is not arrayed for an entry point but it is " "array...
pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0xb0(%rbp) addq $0xe0, %rdi leaq -0x18(%rbp), %rsi callq 0x8b3e70 movq -0xb0(%rbp), %rdi movq %rax, -0x20(%rbp) addq $0xe0, %rdi callq 0x79ad50 movq %rax, -0x28(%rbp) leaq -0x20(%rbp), %rdi leaq ...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/interface_var_sroa.cpp
spvtools::opt::InterfaceVariableScalarReplacement::GetVariableLocation(spvtools::opt::Instruction*, unsigned int*)
bool InterfaceVariableScalarReplacement::GetVariableLocation( Instruction* var, uint32_t* location) { return !context()->get_decoration_mgr()->WhileEachDecoration( var->result_id(), uint32_t(spv::Decoration::Location), [location](const Instruction& inst) { *location = inst.GetSingl...
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rdi callq 0x76b110 movq %rax, %rdi callq 0x77da60 movq %rax, -0x50(%rbp) movq -0x10(%rbp), %rdi callq 0x76b360 movl %eax, -0x48(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) leaq -0x38...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/interface_var_sroa.cpp
spvtools::opt::InterfaceVariableScalarReplacement::KillLocationAndComponentDecorations(unsigned int)
void InterfaceVariableScalarReplacement::KillLocationAndComponentDecorations( uint32_t var_id) { context()->get_decoration_mgr()->RemoveDecorationsFrom( var_id, [](const Instruction& inst) { spv::Decoration decoration = spv::Decoration( inst.GetSingleWordInOperand(kOpDecorateDecorationIn...
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rdi callq 0x76b110 movq %rax, %rdi callq 0x77da60 movq %rax, -0x40(%rbp) movl -0xc(%rbp), %eax movl %eax, -0x38(%rbp) leaq -0x30(%rbp), %rdi leaq -0x31(%rbp), %rsi callq 0x8fd750 movq -0x40(%rbp), %rdi movl -0x38(%...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/interface_var_sroa.cpp
spvtools::opt::InterfaceVariableScalarReplacement::ReplaceInterfaceVariableWithScalars(spvtools::opt::Instruction*, spvtools::opt::Instruction*, unsigned int, unsigned int, unsigned int)
bool InterfaceVariableScalarReplacement::ReplaceInterfaceVariableWithScalars( Instruction* interface_var, Instruction* interface_var_type, uint32_t location, uint32_t component, uint32_t extra_array_length) { NestedCompositeComponents scalar_interface_vars = CreateScalarInterfaceVarsForReplacement(inter...
pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movl %r8d, -0x28(%rbp) movl %r9d, -0x2c(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x18(%rbp), %rdi callq 0x8fce80 movq -0x...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/interface_var_sroa.cpp
spvtools::opt::InterfaceVariableScalarReplacement::AddLocationAndComponentDecorations(spvtools::opt::InterfaceVariableScalarReplacement::NestedCompositeComponents const&, unsigned int*, unsigned int)
void InterfaceVariableScalarReplacement::AddLocationAndComponentDecorations( const NestedCompositeComponents& vars, uint32_t* location, uint32_t component) { if (!vars.HasMultipleComponents()) { uint32_t var_id = vars.GetComponentVariable()->result_id(); CreateDecoration(context()->get_decoration_mgr(...
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rdi callq 0x902f00 testb $0x1, %al jne 0x8fdc08 movq -0x10(%rbp), %rdi callq 0x902f20 movq %rax, %rdi callq 0x76b360 movq...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/interface_var_sroa.cpp
spvtools::opt::(anonymous namespace)::ReplaceLoadWithCompositeConstruct(spvtools::opt::IRContext*, std::unordered_map<spvtools::opt::Instruction*, spvtools::opt::Instruction*, std::hash<spvtools::opt::Instruction*>, std::equal_to<spvtools::opt::Instruction*>, std::allocator<std::pair<spvtools::opt::Instruction* const, ...
void ReplaceLoadWithCompositeConstruct( IRContext* context, const std::unordered_map<Instruction*, Instruction*>& loads_to_composites) { for (const auto& load_and_composite : loads_to_composites) { Instruction* load = load_and_composite.first; Instruction* composite_construct = load_and_composite.seco...
pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi callq 0x903110 movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rdi callq 0x903140 movq %rax, -0x28(%rbp) leaq -0x20(%rbp), %rdi leaq -0x28(%rbp), %rsi callq 0xda9a0 tes...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/interface_var_sroa.cpp
spvtools::opt::InterfaceVariableScalarReplacement::ReplaceComponentOfInterfaceVarWith(spvtools::opt::Instruction*, spvtools::opt::Instruction*, spvtools::opt::Instruction*, std::vector<unsigned int, std::allocator<unsigned int>> const&, unsigned int const*, std::unordered_map<spvtools::opt::Instruction*, spvtools::opt:...
bool InterfaceVariableScalarReplacement::ReplaceComponentOfInterfaceVarWith( Instruction* interface_var, Instruction* interface_var_user, Instruction* scalar_var, const std::vector<uint32_t>& interface_var_component_indices, const uint32_t* extra_array_index, std::unordered_map<Instruction*, Instruc...
pushq %rbp movq %rsp, %rbp subq $0x1b0, %rsp # imm = 0x1B0 movq 0x18(%rbp), %rax movq 0x10(%rbp), %rax movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x178(%rbp) movq -0x20(%rbp), %rdi ...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/interface_var_sroa.cpp
spvtools::opt::InterfaceVariableScalarReplacement::StoreComponentOfValueToScalarVar(unsigned int, std::vector<unsigned int, std::allocator<unsigned int>> const&, spvtools::opt::Instruction*, unsigned int const*, spvtools::opt::Instruction*)
void InterfaceVariableScalarReplacement::StoreComponentOfValueToScalarVar( uint32_t value_id, const std::vector<uint32_t>& component_indices, Instruction* scalar_var, const uint32_t* extra_array_index, Instruction* insert_before) { uint32_t component_type_id = GetPointeeTypeIdOfVar(scalar_var); Instruct...
pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x58(%rbp) movq -0x20(%rbp), %rsi callq 0x8ffd60 movl %eax, -0x34(%rbp) movq -0x20(%rbp), %rax movq %rax, -0...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/interface_var_sroa.cpp
spvtools::opt::InterfaceVariableScalarReplacement::UseBaseAccessChainForAccessChain(spvtools::opt::Instruction*, spvtools::opt::Instruction*)
void InterfaceVariableScalarReplacement::UseBaseAccessChainForAccessChain( Instruction* access_chain, Instruction* base_access_chain) { assert(base_access_chain->opcode() == spv::Op::OpAccessChain && access_chain->opcode() == spv::Op::OpAccessChain && access_chain->GetSingleWordInOperand(0) == ...
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x18(%rbp), %rdi callq 0x76b0f0 movl %eax, %ecx xorl %eax, %eax cmpl $0x41, %ecx movb %al, -0x39(%rbp) jne 0x8ff402 movq -0x10(%rbp), %rdi callq 0x76b0f0 movl %eax, %ecx xorl %eax, %eax cmpl $0x41, %ecx...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/interface_var_sroa.cpp
spvtools::opt::InterfaceVariableScalarReplacement::CreateAccessChainToVar(unsigned int, spvtools::opt::Instruction*, std::vector<unsigned int, std::allocator<unsigned int>> const&, spvtools::opt::Instruction*, unsigned int*)
Instruction* InterfaceVariableScalarReplacement::CreateAccessChainToVar( uint32_t var_type_id, Instruction* var, const std::vector<uint32_t>& index_ids, Instruction* insert_before, uint32_t* component_type_id) { analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); *component_type_id = Ge...
pushq %rbp movq %rsp, %rbp subq $0x1d0, %rsp # imm = 0x1D0 movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x1a8(%rbp) callq 0x76b110 movq %rax, %rdi callq 0x76b8a0 movq %rax, -0x38(%rbp) m...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/interface_var_sroa.cpp
spvtools::opt::InterfaceVariableScalarReplacement::CreateCompositeExtract(unsigned int, unsigned int, std::vector<unsigned int, std::allocator<unsigned int>> const&, unsigned int const*)
Instruction* InterfaceVariableScalarReplacement::CreateCompositeExtract( uint32_t type_id, uint32_t composite_id, const std::vector<uint32_t>& indexes, const uint32_t* extra_first_index) { uint32_t component_id = TakeNextId(); Instruction* composite_extract = new Instruction( context(), spv::Op::OpCom...
pushq %rbp movq %rsp, %rbp subq $0x210, %rsp # imm = 0x210 movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movq %rcx, -0x18(%rbp) movq %r8, -0x20(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x1f8(%rbp) callq 0x7928e0 movl %eax, -0x24(%rbp) movl $0x70, %edi callq 0xdb140 movq -0x1f8(%rbp), %rdi...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/interface_var_sroa.cpp
spvtools::opt::InterfaceVariableScalarReplacement::GetArrayType(unsigned int, unsigned int)
uint32_t InterfaceVariableScalarReplacement::GetArrayType( uint32_t elem_type_id, uint32_t array_length) { analysis::Type* elem_type = context()->get_type_mgr()->GetType(elem_type_id); uint32_t array_length_id = context()->get_constant_mgr()->GetUIntConstId(array_length); analysis::Array array_type( ...
pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0xb8(%rbp) callq 0x76b110 movq %rax, %rdi callq 0x76b2c0 movq %rax, %rdi movl -0xc(%rbp), %esi callq 0x7b9e70 movq -0xb8(%rbp), %rdi movq %rax, -0x18(%rbp) callq 0x76b110 movq...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/interface_var_sroa.cpp
spvtools::opt::(anonymous namespace)::GetArrayLength(spvtools::opt::analysis::DefUseManager*, spvtools::opt::Instruction*)
uint32_t GetArrayLength(analysis::DefUseManager* def_use_mgr, Instruction* array_type) { assert(array_type->opcode() == spv::Op::OpTypeArray); uint32_t const_int_id = array_type->GetSingleWordInOperand(kOpTypeArrayLengthInOperandIndex); Instruction* array_length_inst = def_use_mgr->G...
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rdi callq 0x76b0f0 cmpl $0x1c, %eax jne 0x900ba0 jmp 0x900bbf leaq 0x2f7acb(%rip), %rdi # 0xbf8672 leaq 0x2f71a6(%rip), %rsi # 0xbf7d54 movl $0x2b, %edx leaq 0x2f7ae5(%rip), %rcx # 0xbf869f callq 0xd6a00...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/interface_var_sroa.cpp
spvtools::opt::InterfaceVariableScalarReplacement::Process()
Pass::Status InterfaceVariableScalarReplacement::Process() { Pass::Status status = Status::SuccessWithoutChange; for (Instruction& entry_point : get_module()->entry_points()) { status = CombineStatus(status, ReplaceInterfaceVarsWithScalars(entry_point)); } return status; }
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x48(%rbp) movl $0x11, -0xc(%rbp) callq 0x7750e0 movq %rax, %rsi leaq -0x28(%rbp), %rdi callq 0x775120 leaq -0x28(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rsi leaq -0x30(%rbp), %rdi callq 0x774ea0 movq -0x18...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/interface_var_sroa.cpp
spvtools::opt::InvocationInterlockPlacementPass::removeBeginAndEndInstructionsFromFunction(spvtools::opt::Function*)
bool InvocationInterlockPlacementPass:: removeBeginAndEndInstructionsFromFunction(Function* func) { bool modified = false; func->ForEachInst([this, &modified](Instruction* inst) { switch (inst->opcode()) { case spv::Op::OpBeginInvocationInterlockEXT: context()->KillInst(inst); modified...
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movb $0x0, -0x11(%rbp) movq -0x10(%rbp), %rcx movq %rcx, -0x50(%rbp) movq %rax, -0x48(%rbp) leaq -0x11(%rbp), %rax movq %rax, -0x40(%rbp) leaq -0x38(%rbp), %rdi leaq -0x48(%rbp), %rsi callq 0x906210 movq -0x50...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/invocation_interlock_placement_pass.cpp
spvtools::opt::InvocationInterlockPlacementPass::extractInstructionsFromCalls(std::vector<spvtools::opt::BasicBlock*, std::allocator<spvtools::opt::BasicBlock*>>)
bool InvocationInterlockPlacementPass::extractInstructionsFromCalls( std::vector<BasicBlock*> blocks) { bool modified = false; for (BasicBlock* block : blocks) { block->ForEachInst([this, &modified](Instruction* inst) { if (inst->opcode() == spv::Op::OpFunctionCall) { uint32_t function_id = ...
pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x70(%rbp) movb $0x0, -0x11(%rbp) movq %rsi, -0x20(%rbp) movq -0x20(%rbp), %rdi callq 0x82ac50 movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rdi callq 0x82ac80 movq %rax, -0x30(%rbp) leaq -0x28(%rbp), ...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/invocation_interlock_placement_pass.cpp
spvtools::opt::InvocationInterlockPlacementPass::computeReachableBlocks(std::unordered_set<unsigned int, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<unsigned int>>&, std::unordered_set<unsigned int, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<unsigned int>> const&, bool...
InvocationInterlockPlacementPass::BlockSet InvocationInterlockPlacementPass::computeReachableBlocks( BlockSet& previous_inside, const BlockSet& starting_nodes, bool reverse_cfg) { BlockSet inside = starting_nodes; std::deque<uint32_t> worklist; worklist.insert(worklist.begin(), starting_nodes.begin(), ...
pushq %rbp movq %rsp, %rbp subq $0x150, %rsp # imm = 0x150 movq %rdi, -0x140(%rbp) movb %r8b, %al movq %rdi, %r8 movq %r8, -0x138(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) andb $0x1, %al movb %al, -0x21(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x130(%rbp...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/invocation_interlock_placement_pass.cpp
spvtools::opt::(anonymous namespace)::ReplaceInternalInterpolate(spvtools::opt::IRContext*, spvtools::opt::Instruction*, std::vector<spvtools::opt::analysis::Constant const*, std::allocator<spvtools::opt::analysis::Constant const*>> const&)
bool ReplaceInternalInterpolate(IRContext* ctx, Instruction* inst, const std::vector<const analysis::Constant*>&) { uint32_t glsl450_ext_inst_id = ctx->get_feature_mgr()->GetExtInstImportId_GLSLstd450(); assert(glsl450_ext_inst_id != 0); uint32_t ext_opcode = inst->GetSingle...
pushq %rbp movq %rsp, %rbp subq $0x230, %rsp # imm = 0x230 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rdi callq 0x76c140 movq %rax, %rdi callq 0x77d7e0 movl %eax, -0x24(%rbp) cmpl $0x0, -0x24(%rbp) je 0x910aa3 jmp 0x910ac2 leaq 0x2e8aec(%rip), %rdi # 0xbf9596 l...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/interp_fixup_pass.cpp
spvtools::opt::IRContext::KillInst(spvtools::opt::Instruction*)
Instruction* IRContext::KillInst(Instruction* inst) { if (!inst) { return nullptr; } KillNamesAndDecorates(inst); KillOperandFromDebugInstructions(inst); if (AreAnalysesValid(kAnalysisDefUse)) { analysis::DefUseManager* def_use_mgr = get_def_use_mgr(); def_use_mgr->ClearInst(inst); for (aut...
pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x50(%rbp) cmpq $0x0, -0x18(%rbp) jne 0x9126fc movq $0x0, -0x8(%rbp) jmp 0x912978 movq -0x50(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x912990 movq -0x50(%rbp), %rdi movq -0x18(%rbp), %rsi callq ...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/ir_context.cpp
spvtools::opt::IRContext::RemoveFromIdToName(spvtools::opt::Instruction const*)
void IRContext::RemoveFromIdToName(const Instruction* inst) { if (id_to_name_ && (inst->opcode() == spv::Op::OpName || inst->opcode() == spv::Op::OpMemberName)) { auto range = id_to_name_->equal_range(inst->GetSingleWordInOperand(0)); for (auto it = range.first; it != range.second; ++it)...
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x48(%rbp) addq $0x210, %rdi # imm = 0x210 callq 0x917e10 testb $0x1, %al jne 0x912c3d jmp 0x912cff movq -0x10(%rbp), %rdi callq 0x76b0f0 cmpl $0x5, %eax je 0x912c5d movq -0x10(%rbp), %r...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/ir_context.cpp
spvtools::opt::IRContext::RemoveCapability(spv::Capability)
bool IRContext::RemoveCapability(spv::Capability capability) { const bool removed = KillInstructionIf( module()->capability_begin(), module()->capability_end(), [capability](Instruction* inst) { return static_cast<spv::Capability>(inst->GetSingleWordOperand(0)) == capability; ...
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x50(%rbp) callq 0x738aa0 movq %rax, %rsi leaq -0x18(%rbp), %rdi callq 0x781260 movq -0x50(%rbp), %rdi callq 0x738aa0 movq %rax, %rsi leaq -0x20(%rbp), %rdi callq 0x917d60 movl -0xc(%rbp), %eax movl...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/ir_context.cpp
spvtools::opt::IRContext::ForgetUses(spvtools::opt::Instruction*)
void IRContext::ForgetUses(Instruction* inst) { if (AreAnalysesValid(kAnalysisDefUse)) { get_def_use_mgr()->EraseUseRecordsOfOperandIds(inst); } if (AreAnalysesValid(kAnalysisDecorations)) { if (inst->IsDecoration()) { get_decoration_mgr()->RemoveDecoration(inst); } } if (AreAnalysesValid(kA...
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x18(%rbp) movl $0x1, %esi callq 0x76b8e0 testb $0x1, %al jne 0x9137d8 jmp 0x9137ed movq -0x18(%rbp), %rdi callq 0x76b8a0 movq %rax, %rdi movq -0x10(%rbp), %rsi callq 0x895eb0 movq -0x18(%rbp), %rd...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/ir_context.cpp
spvtools::opt::IRContext::AddVarToEntryPoints(unsigned int)
void IRContext::AddVarToEntryPoints(uint32_t var_id) { uint32_t ocnt = 0; for (auto& e : module()->entry_points()) { bool found = false; e.ForEachInOperand([&ocnt, &found, &var_id](const uint32_t* idp) { if (ocnt >= kEntryPointInterfaceInIdx) { if (*idp == var_id) found = true; } +...
pushq %rbp movq %rsp, %rbp subq $0x110, %rsp # imm = 0x110 movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0xf8(%rbp) movl $0x0, -0x10(%rbp) callq 0x738aa0 movq %rax, %rsi leaq -0x28(%rbp), %rdi callq 0x775120 leaq -0x28(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rsi ...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/ir_context.cpp
spvtools::opt::IRContext::EmitErrorMessage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, spvtools::opt::Instruction*)
void IRContext::EmitErrorMessage(std::string message, Instruction* inst) { if (!consumer()) { return; } Instruction* line_inst = inst; while (line_inst != nullptr) { // Stop at the beginning of the basic block. if (!line_inst->dbg_line_insts().empty()) { line_inst = &line_inst->dbg_line_insts()....
pushq %rbp movq %rsp, %rbp subq $0xf0, %rsp movq %rsi, -0xd8(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0xd0(%rbp) callq 0x76ed10 movq %rax, %rdi callq 0x73e3a0 testb $0x1, %al jne 0x91509f jmp 0x915270 movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) cmpq $...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/ir_context.cpp
spvtools::opt::IRContext::GetStage()
spv::ExecutionModel IRContext::GetStage() { const auto& entry_points = module()->entry_points(); if (entry_points.empty()) { return spv::ExecutionModel::Max; } uint32_t stage = entry_points.begin()->GetSingleWordInOperand( kEntryPointExecutionModelInIdx); auto it = std::find_if( entry_points....
pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x90(%rbp) callq 0x738aa0 movq %rax, %rsi leaq -0x28(%rbp), %rdi callq 0x775120 leaq -0x28(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi callq 0x780a80 testb $0x1, %al jne 0x915b12 jmp 0x915b1e movl $0x7fff...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/ir_context.cpp
spvtools::opt::IRContext::ReplaceAllUsesWith(unsigned int, unsigned int)::$_0::operator()(spvtools::opt::Instruction*) const
bool IRContext::ReplaceAllUsesWithPredicate( uint32_t before, uint32_t after, const std::function<bool(Instruction*)>& predicate) { if (before == after) return false; if (AreAnalysesValid(kAnalysisDebugInfo)) { get_debug_info_mgr()->ReplaceAllUsesInDebugScopeWithPredicate(before, after, ...
pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movb $0x1, %al andb $0x1, %al popq %rbp retq nopw %cs:(%rax,%rax)
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/ir_context.cpp
spvtools::opt::analysis::LivenessManager::GetComponentType(unsigned int, unsigned int) const
uint32_t LivenessManager::GetComponentType(uint32_t index, uint32_t agg_type_id) const { analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); Instruction* agg_type_inst = def_use_mgr->GetDef(agg_type_id); const uint32_t kArrayElementInIdx = 0; switch (...
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq -0x10(%rbp), %rdi callq 0x925140 movq %rax, %rdi callq 0x76b8a0 movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rdi movl -0x18(%rbp), %esi callq 0x895fb0 movq %rax, -0x28(%rbp) movl $0x0, -0x2c(%rbp) movq -0x...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/liveness.cpp
spvtools::opt::LocalAccessChainConvertPass::HasOnlySupportedRefs(unsigned int)
bool LocalAccessChainConvertPass::HasOnlySupportedRefs(uint32_t ptrId) { if (supported_ref_ptrs_.find(ptrId) != supported_ref_ptrs_.end()) return true; if (get_def_use_mgr()->WhileEachUser(ptrId, [this](Instruction* user) { if (user->GetCommonDebugOpcode() == CommonDebugInfoDebugValue || user->G...
pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x68(%rbp) addq $0xe0, %rdi leaq -0x14(%rbp), %rsi callq 0x3932e0 movq -0x68(%rbp), %rdi movq %rax, -0x20(%rbp) addq $0xe0, %rdi callq 0x394f20 movq %rax, -0x28(%rbp) leaq -0x20(%rbp), %rdi leaq ...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/local_access_chain_convert_pass.cpp
spvtools::opt::LocalSingleBlockLoadStoreElimPass::HasOnlySupportedRefs(unsigned int)
bool LocalSingleBlockLoadStoreElimPass::HasOnlySupportedRefs(uint32_t ptrId) { if (supported_ref_ptrs_.find(ptrId) != supported_ref_ptrs_.end()) return true; if (get_def_use_mgr()->WhileEachUser(ptrId, [this](Instruction* user) { auto dbg_op = user->GetCommonDebugOpcode(); if (dbg_op == CommonDebugI...
pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x68(%rbp) addq $0x1c0, %rdi # imm = 0x1C0 leaq -0x14(%rbp), %rsi callq 0x3932e0 movq -0x68(%rbp), %rdi movq %rax, -0x20(%rbp) addq $0x1c0, %rdi # imm = 0x1C0 callq 0x394f20...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/local_single_block_elim_pass.cpp
spvtools::opt::LocalSingleBlockLoadStoreElimPass::LocalSingleBlockLoadStoreElim(spvtools::opt::Function*)
bool LocalSingleBlockLoadStoreElimPass::LocalSingleBlockLoadStoreElim( Function* func) { // Perform local store/load, load/load and store/store elimination // on each block bool modified = false; std::vector<Instruction*> instructions_to_kill; std::unordered_set<Instruction*> instructions_to_save; for (...
pushq %rbp movq %rsp, %rbp subq $0x1a0, %rsp # imm = 0x1A0 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x168(%rbp) movb $0x0, -0x11(%rbp) leaq -0x30(%rbp), %rdi callq 0x757ad0 leaq -0x68(%rbp), %rdi callq 0x767940 movq -0x10(%rbp), %rdi callq 0x76f940 movq %rax, -0x78(%rbp)...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/local_single_block_elim_pass.cpp
spvtools::opt::LocalSingleBlockLoadStoreElimPass::Initialize()
void LocalSingleBlockLoadStoreElimPass::Initialize() { // Initialize Target Type Caches seen_target_vars_.clear(); seen_non_target_vars_.clear(); // Clear collections supported_ref_ptrs_.clear(); // Initialize extensions allowlist InitExtensions(); }
pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x10(%rbp) addq $0x38, %rdi callq 0x3959b0 movq -0x10(%rbp), %rdi addq $0x70, %rdi callq 0x3959b0 movq -0x10(%rbp), %rdi addq $0x1c0, %rdi # imm = 0x1C0 callq 0x3959b0 movq -0x10(%rbp), %rdi callq 0x92a5e0 add...
/DiligentGraphics[P]DiligentCore/ThirdParty/SPIRV-Tools/source/opt/local_single_block_elim_pass.cpp