Home | History | Annotate | Download | only in Analysis

Lines Matching refs:Block

57 static SourceLocation getFirstStmtLoc(const CFGBlock *Block) {
58 // Find the source location of the first statement in the block, if the block
60 for (const auto &B : *Block)
64 // Block is empty.
65 // If we have one successor, return the first statement in that block
66 if (Block->succ_size() == 1 && *Block->succ_begin())
67 return getFirstStmtLoc(*Block->succ_begin());
72 static SourceLocation getLastStmtLoc(const CFGBlock *Block) {
73 // Find the source location of the last statement in the block, if the block
75 if (const Stmt *StmtNode = Block->getTerminator()) {
78 for (CFGBlock::const_reverse_iterator BI = Block->rbegin(),
79 BE = Block->rend(); BI != BE; ++BI) {
85 // If we have one successor, return the first statement in that block
87 if (Block->succ_size() == 1 && *Block->succ_begin())
88 Loc = getFirstStmtLoc(*Block->succ_begin());
92 // If we have one predecessor, return the last statement in that block
93 if (Block->pred_size() == 1 && *Block->pred_begin())
94 return getLastStmtLoc(*Block->pred_begin());
1029 assert(CurrBlock && "Block pointer must not be NULL");
1042 const CFGBlock *Block, ConsumedStateMap *StateMap,
1045 assert(Block && "Block pointer must not be NULL");
1047 auto &Entry = StateMapsArray[Block->getBlockID()];
1057 void ConsumedBlockInfo::addInfo(const CFGBlock *Block,
1060 assert(Block && "Block pointer must not be NULL");
1062 auto &Entry = StateMapsArray[Block->getBlockID()];
1071 ConsumedStateMap* ConsumedBlockInfo::borrowInfo(const CFGBlock *Block) {
1072 assert(Block && "Block pointer must not be NULL");
1073 assert(StateMapsArray[Block->getBlockID()] && "Block has no block info");
1075 return StateMapsArray[Block->getBlockID()].get();
1078 void ConsumedBlockInfo::discardInfo(const CFGBlock *Block) {
1079 StateMapsArray[Block->getBlockID()] = nullptr;
1083 ConsumedBlockInfo::getInfo(const CFGBlock *Block) {
1084 assert(Block && "Block pointer must not be NULL");
1086 auto &Entry = StateMapsArray[Block->getBlockID()];
1087 return isBackEdgeTarget(Block) ? llvm::make_unique<ConsumedStateMap>(*Entry)
1092 assert(From && "From block must not be NULL");
1093 assert(To && "From block must not be NULL");
1098 bool ConsumedBlockInfo::isBackEdgeTarget(const CFGBlock *Block) {
1099 assert(Block && "Block pointer must not be NULL");
1103 if (Block->pred_size() < 2)
1106 unsigned int BlockVisitOrder = VisitOrder[Block->getBlockID()];
1107 for (CFGBlock::const_pred_iterator PI = Block->pred_begin(),
1108 PE = Block->pred_end(); PI != PE; ++PI) {
1377 // Visit all of the basic block's statements.
1446 } // End of block iterator.