/external/swiftshader/third_party/SPIRV-Tools/source/opt/ |
D | struct_cfg_analysis.cpp | 85 uint32_t StructuredCFGAnalysis::MergeBlock(uint32_t bb_id) { in MergeBlock() argument 86 uint32_t header_id = ContainingConstruct(bb_id); in MergeBlock() 96 uint32_t StructuredCFGAnalysis::LoopMergeBlock(uint32_t bb_id) { in LoopMergeBlock() argument 97 uint32_t header_id = ContainingLoop(bb_id); in LoopMergeBlock() 107 uint32_t StructuredCFGAnalysis::LoopContinueBlock(uint32_t bb_id) { in LoopContinueBlock() argument 108 uint32_t header_id = ContainingLoop(bb_id); in LoopContinueBlock() 118 bool StructuredCFGAnalysis::IsContinueBlock(uint32_t bb_id) { in IsContinueBlock() argument 119 assert(bb_id != 0); in IsContinueBlock() 120 return LoopContinueBlock(bb_id) == bb_id; in IsContinueBlock() 123 bool StructuredCFGAnalysis::IsMergeBlock(uint32_t bb_id) { in IsMergeBlock() argument [all …]
|
D | struct_cfg_analysis.h | 37 uint32_t ContainingConstruct(uint32_t bb_id) { in ContainingConstruct() argument 38 auto it = bb_to_construct_.find(bb_id); in ContainingConstruct() 48 uint32_t MergeBlock(uint32_t bb_id); 53 uint32_t ContainingLoop(uint32_t bb_id) { in ContainingLoop() argument 54 auto it = bb_to_construct_.find(bb_id); in ContainingLoop() 64 uint32_t LoopMergeBlock(uint32_t bb_id); 69 uint32_t LoopContinueBlock(uint32_t bb_id); 71 bool IsContinueBlock(uint32_t bb_id); 72 bool IsMergeBlock(uint32_t bb_id);
|
D | register_pressure.cpp | 93 uint32_t bb_id = bb.id(); in ComputePhiUses() local 94 bb.ForEachSuccessorLabel([live, bb_id, this](uint32_t sid) { in ComputePhiUses() 96 succ_bb->ForEachPhiInst([live, bb_id, this](const Instruction* phi) { in ComputePhiUses() 98 if (phi->GetSingleWordInOperand(i + 1) == bb_id) { in ComputePhiUses() 169 [&loop, this](uint32_t bb_id) { in DoLoopLivenessUnification() argument 170 return bb_id != loop.GetHeaderBlock()->id() && in DoLoopLivenessUnification() 171 loop_desc_[bb_id] == &loop; in DoLoopLivenessUnification() 184 for (uint32_t bb_id : blocks_in_loop) { in DoLoopLivenessUnification() local 185 BasicBlock* bb = cfg_.block(bb_id); in DoLoopLivenessUnification() 291 for (uint32_t bb_id : exit_blocks) { in ComputeLoopRegisterPressure() local [all …]
|
D | register_pressure.h | 99 const RegionRegisterLiveness* Get(uint32_t bb_id) const { in Get() argument 100 RegionRegisterLivenessMap::const_iterator it = block_pressure_.find(bb_id); in Get() 115 RegionRegisterLiveness* Get(uint32_t bb_id) { in Get() argument 116 RegionRegisterLivenessMap::iterator it = block_pressure_.find(bb_id); in Get() 125 RegionRegisterLiveness* GetOrInsert(uint32_t bb_id) { in GetOrInsert() argument 126 return &block_pressure_[bb_id]; in GetOrInsert()
|
D | loop_utils.cpp | 153 Instruction* GetOrBuildIncoming(uint32_t bb_id) { in GetOrBuildIncoming() 154 assert(base_->cfg_->block(bb_id) != nullptr && "Unknown basic block"); in GetOrBuildIncoming() 156 Instruction*& incoming_phi = bb_to_phi_[bb_id]; in GetOrBuildIncoming() 161 BasicBlock* bb = &*base_->cfg_->block(bb_id); in GetOrBuildIncoming() 186 base_->GetDefiningBlocks(bb_id); in GetOrBuildIncoming() 192 if (defining_blocks.size() > 1 || bb_id == base_->merge_block_id_) { in GetOrBuildIncoming() 196 assert(bb_id == base_->merge_block_id_); in GetOrBuildIncoming() 219 const std::vector<uint32_t>& GetDefiningBlocks(uint32_t bb_id) { in GetDefiningBlocks() argument 220 assert(cfg_->block(bb_id) != nullptr && "Unknown basic block"); in GetDefiningBlocks() 221 std::vector<uint32_t>& defining_blocks = bb_to_defining_blocks_[bb_id]; in GetDefiningBlocks() [all …]
|
D | loop_descriptor.h | 196 inline bool IsInsideLoop(uint32_t bb_id) const { in IsInsideLoop() argument 197 return loop_basic_blocks_.count(bb_id); in IsInsideLoop() 216 void RemoveBasicBlock(uint32_t bb_id) { in RemoveBasicBlock() argument 218 loop->loop_basic_blocks_.erase(bb_id); in RemoveBasicBlock() 496 inline void SetBasicBlockToLoop(uint32_t bb_id, Loop* loop) { in SetBasicBlockToLoop() argument 497 basic_block_to_loop_[bb_id] = loop; in SetBasicBlockToLoop() 515 inline void ForgetBasicBlock(uint32_t bb_id) { in ForgetBasicBlock() argument 516 basic_block_to_loop_.erase(bb_id); in ForgetBasicBlock()
|
D | loop_descriptor.cpp | 359 for (uint32_t bb_id : GetBlocks()) { in GetExitBlocks() local 360 const BasicBlock* bb = cfg->block(bb_id); in GetExitBlocks() 405 for (uint32_t bb_id : GetBlocks()) { in IsSafeToClone() local 406 BasicBlock* bb = cfg.block(bb_id); in IsSafeToClone() 416 for (uint32_t bb_id : blocks) { in IsSafeToClone() local 417 BasicBlock* bb = cfg.block(bb_id); in IsSafeToClone() 436 for (uint32_t bb_id : GetBlocks()) { in IsLCSSA() local 437 for (Instruction& insn : *cfg->block(bb_id)) { in IsLCSSA() 978 for (uint32_t bb_id : current_loop.GetBlocks()) in AddLoopNest() local 979 basic_block_to_loop_.insert(std::make_pair(bb_id, ¤t_loop)); in AddLoopNest() [all …]
|
D | function.h | 101 iterator FindBlock(uint32_t bb_id) { in FindBlock() argument 102 return std::find_if(begin(), end(), [bb_id](const BasicBlock& it_bb) { in FindBlock() 103 return bb_id == it_bb.id(); in FindBlock()
|
D | loop_unswitch_pass.cpp | 73 for (uint32_t bb_id : loop_->GetBlocks()) { in CanUnswitchLoop() local 74 BasicBlock* bb = cfg.block(bb_id); in CanUnswitchLoop() 464 ignore_node = [loop](uint32_t bb_id) { return !loop->IsInsideLoop(bb_id); }; in SpecializeLoop() argument
|
D | loop_peeling.cpp | 229 for (uint32_t bb_id : blocks_in_path) { in IsConditionCheckSideEffectFree() local 230 BasicBlock* bb = cfg.block(bb_id); in IsConditionCheckSideEffectFree()
|
/external/deqp-deps/SPIRV-Tools/source/opt/ |
D | struct_cfg_analysis.cpp | 85 uint32_t StructuredCFGAnalysis::MergeBlock(uint32_t bb_id) { in MergeBlock() argument 86 uint32_t header_id = ContainingConstruct(bb_id); in MergeBlock() 96 uint32_t StructuredCFGAnalysis::LoopMergeBlock(uint32_t bb_id) { in LoopMergeBlock() argument 97 uint32_t header_id = ContainingLoop(bb_id); in LoopMergeBlock() 107 uint32_t StructuredCFGAnalysis::LoopContinueBlock(uint32_t bb_id) { in LoopContinueBlock() argument 108 uint32_t header_id = ContainingLoop(bb_id); in LoopContinueBlock() 118 bool StructuredCFGAnalysis::IsContinueBlock(uint32_t bb_id) { in IsContinueBlock() argument 119 assert(bb_id != 0); in IsContinueBlock() 120 return LoopContinueBlock(bb_id) == bb_id; in IsContinueBlock() 123 bool StructuredCFGAnalysis::IsMergeBlock(uint32_t bb_id) { in IsMergeBlock() argument [all …]
|
D | struct_cfg_analysis.h | 37 uint32_t ContainingConstruct(uint32_t bb_id) { in ContainingConstruct() argument 38 auto it = bb_to_construct_.find(bb_id); in ContainingConstruct() 48 uint32_t MergeBlock(uint32_t bb_id); 53 uint32_t ContainingLoop(uint32_t bb_id) { in ContainingLoop() argument 54 auto it = bb_to_construct_.find(bb_id); in ContainingLoop() 64 uint32_t LoopMergeBlock(uint32_t bb_id); 69 uint32_t LoopContinueBlock(uint32_t bb_id); 71 bool IsContinueBlock(uint32_t bb_id); 72 bool IsMergeBlock(uint32_t bb_id);
|
D | register_pressure.cpp | 93 uint32_t bb_id = bb.id(); in ComputePhiUses() local 94 bb.ForEachSuccessorLabel([live, bb_id, this](uint32_t sid) { in ComputePhiUses() 96 succ_bb->ForEachPhiInst([live, bb_id, this](const Instruction* phi) { in ComputePhiUses() 98 if (phi->GetSingleWordInOperand(i + 1) == bb_id) { in ComputePhiUses() 169 [&loop, this](uint32_t bb_id) { in DoLoopLivenessUnification() argument 170 return bb_id != loop.GetHeaderBlock()->id() && in DoLoopLivenessUnification() 171 loop_desc_[bb_id] == &loop; in DoLoopLivenessUnification() 184 for (uint32_t bb_id : blocks_in_loop) { in DoLoopLivenessUnification() local 185 BasicBlock* bb = cfg_.block(bb_id); in DoLoopLivenessUnification() 291 for (uint32_t bb_id : exit_blocks) { in ComputeLoopRegisterPressure() local [all …]
|
D | register_pressure.h | 99 const RegionRegisterLiveness* Get(uint32_t bb_id) const { in Get() argument 100 RegionRegisterLivenessMap::const_iterator it = block_pressure_.find(bb_id); in Get() 115 RegionRegisterLiveness* Get(uint32_t bb_id) { in Get() argument 116 RegionRegisterLivenessMap::iterator it = block_pressure_.find(bb_id); in Get() 125 RegionRegisterLiveness* GetOrInsert(uint32_t bb_id) { in GetOrInsert() argument 126 return &block_pressure_[bb_id]; in GetOrInsert()
|
D | loop_utils.cpp | 153 Instruction* GetOrBuildIncoming(uint32_t bb_id) { in GetOrBuildIncoming() 154 assert(base_->cfg_->block(bb_id) != nullptr && "Unknown basic block"); in GetOrBuildIncoming() 156 Instruction*& incoming_phi = bb_to_phi_[bb_id]; in GetOrBuildIncoming() 161 BasicBlock* bb = &*base_->cfg_->block(bb_id); in GetOrBuildIncoming() 186 base_->GetDefiningBlocks(bb_id); in GetOrBuildIncoming() 192 if (defining_blocks.size() > 1 || bb_id == base_->merge_block_id_) { in GetOrBuildIncoming() 196 assert(bb_id == base_->merge_block_id_); in GetOrBuildIncoming() 219 const std::vector<uint32_t>& GetDefiningBlocks(uint32_t bb_id) { in GetDefiningBlocks() argument 220 assert(cfg_->block(bb_id) != nullptr && "Unknown basic block"); in GetDefiningBlocks() 221 std::vector<uint32_t>& defining_blocks = bb_to_defining_blocks_[bb_id]; in GetDefiningBlocks() [all …]
|
D | loop_descriptor.h | 196 inline bool IsInsideLoop(uint32_t bb_id) const { in IsInsideLoop() argument 197 return loop_basic_blocks_.count(bb_id); in IsInsideLoop() 216 void RemoveBasicBlock(uint32_t bb_id) { in RemoveBasicBlock() argument 218 loop->loop_basic_blocks_.erase(bb_id); in RemoveBasicBlock() 496 inline void SetBasicBlockToLoop(uint32_t bb_id, Loop* loop) { in SetBasicBlockToLoop() argument 497 basic_block_to_loop_[bb_id] = loop; in SetBasicBlockToLoop() 515 inline void ForgetBasicBlock(uint32_t bb_id) { in ForgetBasicBlock() argument 516 basic_block_to_loop_.erase(bb_id); in ForgetBasicBlock()
|
D | loop_descriptor.cpp | 359 for (uint32_t bb_id : GetBlocks()) { in GetExitBlocks() local 360 const BasicBlock* bb = cfg->block(bb_id); in GetExitBlocks() 405 for (uint32_t bb_id : GetBlocks()) { in IsSafeToClone() local 406 BasicBlock* bb = cfg.block(bb_id); in IsSafeToClone() 416 for (uint32_t bb_id : blocks) { in IsSafeToClone() local 417 BasicBlock* bb = cfg.block(bb_id); in IsSafeToClone() 436 for (uint32_t bb_id : GetBlocks()) { in IsLCSSA() local 437 for (Instruction& insn : *cfg->block(bb_id)) { in IsLCSSA() 977 for (uint32_t bb_id : current_loop.GetBlocks()) in AddLoopNest() local 978 basic_block_to_loop_.insert(std::make_pair(bb_id, ¤t_loop)); in AddLoopNest() [all …]
|
D | function.h | 101 iterator FindBlock(uint32_t bb_id) { in FindBlock() argument 102 return std::find_if(begin(), end(), [bb_id](const BasicBlock& it_bb) { in FindBlock() 103 return bb_id == it_bb.id(); in FindBlock()
|
D | loop_unswitch_pass.cpp | 75 for (uint32_t bb_id : loop_->GetBlocks()) { in CanUnswitchLoop() local 76 BasicBlock* bb = cfg.block(bb_id); in CanUnswitchLoop() 577 ignore_node = [loop](uint32_t bb_id) { return !loop->IsInsideLoop(bb_id); }; in SimplifyLoop() argument 767 for (uint32_t bb_id : dead_blocks) { in CleanLoopNest() local 768 Loop* l = loop_desc_[bb_id]; in CleanLoopNest() 770 l->RemoveBasicBlock(bb_id); in CleanLoopNest() 771 loop_desc_.ForgetBasicBlock(bb_id); in CleanLoopNest()
|
D | loop_peeling.cpp | 229 for (uint32_t bb_id : blocks_in_path) { in IsConditionCheckSideEffectFree() local 230 BasicBlock* bb = cfg.block(bb_id); in IsConditionCheckSideEffectFree()
|
/external/swiftshader/third_party/SPIRV-Tools/test/opt/loop_optimizations/ |
D | nested_loops.cpp | 199 for (uint32_t bb_id : loop->GetBlocks()) { in CheckLoopBlocks() local 200 EXPECT_EQ(expected_ids->count(bb_id), 1u); in CheckLoopBlocks() 201 expected_ids->erase(bb_id); in CheckLoopBlocks() 356 for (uint32_t bb_id : {22, 24}) EXPECT_EQ(ld[bb_id], nullptr); in TEST_F()
|
/external/deqp-deps/SPIRV-Tools/test/opt/loop_optimizations/ |
D | nested_loops.cpp | 199 for (uint32_t bb_id : loop->GetBlocks()) { in CheckLoopBlocks() local 200 EXPECT_EQ(expected_ids->count(bb_id), 1u); in CheckLoopBlocks() 201 expected_ids->erase(bb_id); in CheckLoopBlocks() 356 for (uint32_t bb_id : {22, 24}) EXPECT_EQ(ld[bb_id], nullptr); in TEST_F()
|