/third_party/spirv-tools/source/opt/ |
D | struct_cfg_analysis.cpp | 120 uint32_t StructuredCFGAnalysis::MergeBlock(uint32_t bb_id) { in MergeBlock() argument 121 uint32_t header_id = ContainingConstruct(bb_id); in MergeBlock() 131 uint32_t StructuredCFGAnalysis::NestingDepth(uint32_t bb_id) { in NestingDepth() argument 136 for (uint32_t merge_block_id = MergeBlock(bb_id); merge_block_id != 0; in NestingDepth() 144 uint32_t StructuredCFGAnalysis::LoopMergeBlock(uint32_t bb_id) { in LoopMergeBlock() argument 145 uint32_t header_id = ContainingLoop(bb_id); in LoopMergeBlock() 155 uint32_t StructuredCFGAnalysis::LoopContinueBlock(uint32_t bb_id) { in LoopContinueBlock() argument 156 uint32_t header_id = ContainingLoop(bb_id); in LoopContinueBlock() 166 uint32_t StructuredCFGAnalysis::LoopNestingDepth(uint32_t bb_id) { in LoopNestingDepth() argument 171 for (uint32_t merge_block_id = LoopMergeBlock(bb_id); merge_block_id != 0; in LoopNestingDepth() [all …]
|
D | struct_cfg_analysis.h | 38 uint32_t ContainingConstruct(uint32_t bb_id) { in ContainingConstruct() argument 39 auto it = bb_to_construct_.find(bb_id); in ContainingConstruct() 54 uint32_t MergeBlock(uint32_t bb_id); 64 uint32_t ContainingLoop(uint32_t bb_id) { in ContainingLoop() argument 65 auto it = bb_to_construct_.find(bb_id); in ContainingLoop() 75 uint32_t LoopMergeBlock(uint32_t bb_id); 80 uint32_t LoopContinueBlock(uint32_t bb_id); 87 uint32_t LoopNestingDepth(uint32_t bb_id); 92 uint32_t ContainingSwitch(uint32_t bb_id) { in ContainingSwitch() argument 93 auto it = bb_to_construct_.find(bb_id); in ContainingSwitch() [all …]
|
D | register_pressure.cpp | 100 uint32_t bb_id = bb.id(); in ComputePhiUses() local 101 bb.ForEachSuccessorLabel([live, bb_id, this](uint32_t sid) { in ComputePhiUses() 103 succ_bb->ForEachPhiInst([live, bb_id, this](const Instruction* phi) { in ComputePhiUses() 105 if (phi->GetSingleWordInOperand(i + 1) == bb_id) { in ComputePhiUses() 176 [&loop, this](uint32_t bb_id) { in DoLoopLivenessUnification() argument 177 return bb_id != loop.GetHeaderBlock()->id() && in DoLoopLivenessUnification() 178 loop_desc_[bb_id] == &loop; in DoLoopLivenessUnification() 191 for (uint32_t bb_id : blocks_in_loop) { in DoLoopLivenessUnification() local 192 BasicBlock* bb = cfg_.block(bb_id); in DoLoopLivenessUnification() 298 for (uint32_t bb_id : exit_blocks) { in ComputeLoopRegisterPressure() local [all …]
|
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 | 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_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() 499 inline void SetBasicBlockToLoop(uint32_t bb_id, Loop* loop) { in SetBasicBlockToLoop() argument 500 basic_block_to_loop_[bb_id] = loop; in SetBasicBlockToLoop() 518 inline void ForgetBasicBlock(uint32_t bb_id) { in ForgetBasicBlock() argument 519 basic_block_to_loop_.erase(bb_id); in ForgetBasicBlock()
|
D | loop_descriptor.cpp | 358 for (uint32_t bb_id : GetBlocks()) { in GetExitBlocks() local 359 const BasicBlock* bb = cfg->block(bb_id); in GetExitBlocks() 404 for (uint32_t bb_id : GetBlocks()) { in IsSafeToClone() local 405 BasicBlock* bb = cfg.block(bb_id); in IsSafeToClone() 415 for (uint32_t bb_id : blocks) { in IsSafeToClone() local 416 BasicBlock* bb = cfg.block(bb_id); in IsSafeToClone() 435 for (uint32_t bb_id : GetBlocks()) { in IsLCSSA() local 436 for (Instruction& insn : *cfg->block(bb_id)) { in IsLCSSA() 996 for (uint32_t bb_id : current_loop.GetBlocks()) in AddLoopNest() local 997 basic_block_to_loop_.insert(std::make_pair(bb_id, ¤t_loop)); in AddLoopNest() [all …]
|
/third_party/skia/third_party/externals/spirv-tools/source/opt/ |
D | struct_cfg_analysis.cpp | 120 uint32_t StructuredCFGAnalysis::MergeBlock(uint32_t bb_id) { in MergeBlock() argument 121 uint32_t header_id = ContainingConstruct(bb_id); in MergeBlock() 131 uint32_t StructuredCFGAnalysis::NestingDepth(uint32_t bb_id) { in NestingDepth() argument 136 for (uint32_t merge_block_id = MergeBlock(bb_id); merge_block_id != 0; in NestingDepth() 144 uint32_t StructuredCFGAnalysis::LoopMergeBlock(uint32_t bb_id) { in LoopMergeBlock() argument 145 uint32_t header_id = ContainingLoop(bb_id); in LoopMergeBlock() 155 uint32_t StructuredCFGAnalysis::LoopContinueBlock(uint32_t bb_id) { in LoopContinueBlock() argument 156 uint32_t header_id = ContainingLoop(bb_id); in LoopContinueBlock() 166 uint32_t StructuredCFGAnalysis::LoopNestingDepth(uint32_t bb_id) { in LoopNestingDepth() argument 171 for (uint32_t merge_block_id = LoopMergeBlock(bb_id); merge_block_id != 0; in LoopNestingDepth() [all …]
|
D | struct_cfg_analysis.h | 38 uint32_t ContainingConstruct(uint32_t bb_id) { in ContainingConstruct() argument 39 auto it = bb_to_construct_.find(bb_id); in ContainingConstruct() 54 uint32_t MergeBlock(uint32_t bb_id); 64 uint32_t ContainingLoop(uint32_t bb_id) { in ContainingLoop() argument 65 auto it = bb_to_construct_.find(bb_id); in ContainingLoop() 75 uint32_t LoopMergeBlock(uint32_t bb_id); 80 uint32_t LoopContinueBlock(uint32_t bb_id); 87 uint32_t LoopNestingDepth(uint32_t bb_id); 92 uint32_t ContainingSwitch(uint32_t bb_id) { in ContainingSwitch() argument 93 auto it = bb_to_construct_.find(bb_id); in ContainingSwitch() [all …]
|
D | register_pressure.cpp | 100 uint32_t bb_id = bb.id(); in ComputePhiUses() local 101 bb.ForEachSuccessorLabel([live, bb_id, this](uint32_t sid) { in ComputePhiUses() 103 succ_bb->ForEachPhiInst([live, bb_id, this](const Instruction* phi) { in ComputePhiUses() 105 if (phi->GetSingleWordInOperand(i + 1) == bb_id) { in ComputePhiUses() 176 [&loop, this](uint32_t bb_id) { in DoLoopLivenessUnification() argument 177 return bb_id != loop.GetHeaderBlock()->id() && in DoLoopLivenessUnification() 178 loop_desc_[bb_id] == &loop; in DoLoopLivenessUnification() 191 for (uint32_t bb_id : blocks_in_loop) { in DoLoopLivenessUnification() local 192 BasicBlock* bb = cfg_.block(bb_id); in DoLoopLivenessUnification() 298 for (uint32_t bb_id : exit_blocks) { in ComputeLoopRegisterPressure() local [all …]
|
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 | 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_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() 498 inline void SetBasicBlockToLoop(uint32_t bb_id, Loop* loop) { in SetBasicBlockToLoop() argument 499 basic_block_to_loop_[bb_id] = loop; in SetBasicBlockToLoop() 517 inline void ForgetBasicBlock(uint32_t bb_id) { in ForgetBasicBlock() argument 518 basic_block_to_loop_.erase(bb_id); in ForgetBasicBlock()
|
D | loop_descriptor.cpp | 358 for (uint32_t bb_id : GetBlocks()) { in GetExitBlocks() local 359 const BasicBlock* bb = cfg->block(bb_id); in GetExitBlocks() 404 for (uint32_t bb_id : GetBlocks()) { in IsSafeToClone() local 405 BasicBlock* bb = cfg.block(bb_id); in IsSafeToClone() 415 for (uint32_t bb_id : blocks) { in IsSafeToClone() local 416 BasicBlock* bb = cfg.block(bb_id); in IsSafeToClone() 435 for (uint32_t bb_id : GetBlocks()) { in IsLCSSA() local 436 for (Instruction& insn : *cfg->block(bb_id)) { in IsLCSSA() 991 for (uint32_t bb_id : current_loop.GetBlocks()) in AddLoopNest() local 992 basic_block_to_loop_.insert(std::make_pair(bb_id, ¤t_loop)); in AddLoopNest() [all …]
|
D | function.h | 119 iterator FindBlock(uint32_t bb_id) { in FindBlock() argument 120 return std::find_if(begin(), end(), [bb_id](const BasicBlock& it_bb) { in FindBlock() 121 return bb_id == it_bb.id(); in FindBlock()
|
/third_party/skia/third_party/externals/swiftshader/third_party/SPIRV-Tools/source/opt/ |
D | struct_cfg_analysis.cpp | 120 uint32_t StructuredCFGAnalysis::MergeBlock(uint32_t bb_id) { in MergeBlock() argument 121 uint32_t header_id = ContainingConstruct(bb_id); in MergeBlock() 131 uint32_t StructuredCFGAnalysis::NestingDepth(uint32_t bb_id) { in NestingDepth() argument 136 for (uint32_t merge_block_id = MergeBlock(bb_id); merge_block_id != 0; in NestingDepth() 144 uint32_t StructuredCFGAnalysis::LoopMergeBlock(uint32_t bb_id) { in LoopMergeBlock() argument 145 uint32_t header_id = ContainingLoop(bb_id); in LoopMergeBlock() 155 uint32_t StructuredCFGAnalysis::LoopContinueBlock(uint32_t bb_id) { in LoopContinueBlock() argument 156 uint32_t header_id = ContainingLoop(bb_id); in LoopContinueBlock() 166 uint32_t StructuredCFGAnalysis::LoopNestingDepth(uint32_t bb_id) { in LoopNestingDepth() argument 171 for (uint32_t merge_block_id = LoopMergeBlock(bb_id); merge_block_id != 0; in LoopNestingDepth() [all …]
|
D | struct_cfg_analysis.h | 38 uint32_t ContainingConstruct(uint32_t bb_id) { in ContainingConstruct() argument 39 auto it = bb_to_construct_.find(bb_id); in ContainingConstruct() 54 uint32_t MergeBlock(uint32_t bb_id); 64 uint32_t ContainingLoop(uint32_t bb_id) { in ContainingLoop() argument 65 auto it = bb_to_construct_.find(bb_id); in ContainingLoop() 75 uint32_t LoopMergeBlock(uint32_t bb_id); 80 uint32_t LoopContinueBlock(uint32_t bb_id); 87 uint32_t LoopNestingDepth(uint32_t bb_id); 92 uint32_t ContainingSwitch(uint32_t bb_id) { in ContainingSwitch() argument 93 auto it = bb_to_construct_.find(bb_id); in ContainingSwitch() [all …]
|
D | register_pressure.cpp | 100 uint32_t bb_id = bb.id(); in ComputePhiUses() local 101 bb.ForEachSuccessorLabel([live, bb_id, this](uint32_t sid) { in ComputePhiUses() 103 succ_bb->ForEachPhiInst([live, bb_id, this](const Instruction* phi) { in ComputePhiUses() 105 if (phi->GetSingleWordInOperand(i + 1) == bb_id) { in ComputePhiUses() 176 [&loop, this](uint32_t bb_id) { in DoLoopLivenessUnification() argument 177 return bb_id != loop.GetHeaderBlock()->id() && in DoLoopLivenessUnification() 178 loop_desc_[bb_id] == &loop; in DoLoopLivenessUnification() 191 for (uint32_t bb_id : blocks_in_loop) { in DoLoopLivenessUnification() local 192 BasicBlock* bb = cfg_.block(bb_id); in DoLoopLivenessUnification() 298 for (uint32_t bb_id : exit_blocks) { in ComputeLoopRegisterPressure() local [all …]
|
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 | 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_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() 498 inline void SetBasicBlockToLoop(uint32_t bb_id, Loop* loop) { in SetBasicBlockToLoop() argument 499 basic_block_to_loop_[bb_id] = loop; in SetBasicBlockToLoop() 517 inline void ForgetBasicBlock(uint32_t bb_id) { in ForgetBasicBlock() argument 518 basic_block_to_loop_.erase(bb_id); in ForgetBasicBlock()
|
D | loop_descriptor.cpp | 358 for (uint32_t bb_id : GetBlocks()) { in GetExitBlocks() local 359 const BasicBlock* bb = cfg->block(bb_id); in GetExitBlocks() 404 for (uint32_t bb_id : GetBlocks()) { in IsSafeToClone() local 405 BasicBlock* bb = cfg.block(bb_id); in IsSafeToClone() 415 for (uint32_t bb_id : blocks) { in IsSafeToClone() local 416 BasicBlock* bb = cfg.block(bb_id); in IsSafeToClone() 435 for (uint32_t bb_id : GetBlocks()) { in IsLCSSA() local 436 for (Instruction& insn : *cfg->block(bb_id)) { in IsLCSSA() 991 for (uint32_t bb_id : current_loop.GetBlocks()) in AddLoopNest() local 992 basic_block_to_loop_.insert(std::make_pair(bb_id, ¤t_loop)); in AddLoopNest() [all …]
|
/third_party/skia/third_party/externals/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()
|
/third_party/skia/third_party/externals/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()
|
/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()
|