Home | History | Annotate | Download | only in Analysis

Lines Matching defs:Block

114   ValueVector &getValueVector(const CFGBlock *block) {
115 return *vals[block->getBlockID()];
120 bool updateValueVectorWithScratch(const CFGBlock *block);
130 Value getValue(const CFGBlock *block, const CFGBlock *dstBlock,
134 return getValueVector(block)[idx.getValue()];
160 static void printVector(const CFGBlock *block, ValueVector &bv,
162 llvm::errs() << block->getBlockID() << " :";
183 bool CFGBlockValues::updateValueVectorWithScratch(const CFGBlock *block) {
184 ValueVector &dst = getValueVector(block);
189 printVector(block, scratch, 0);
215 void enqueueSuccessors(const CFGBlock *block);
220 void DataflowWorklist::enqueueSuccessors(const clang::CFGBlock *block) {
222 for (CFGBlock::const_succ_iterator I = block->succ_begin(),
223 E = block->succ_end(); I != E; ++I) {
412 const CFGBlock *block;
419 const CFGBlock *block, AnalysisDeclContext &ac,
422 : vals(vals), cfg(cfg), block(block), ac(ac),
479 // Starting from the maybe-uninitialized use in block 9:
480 // * Block 7 is not visited because we have only visited one of its two
482 // * Block 8 is visited because we've visited its only successor.
483 // From block 8:
484 // * Block 7 is visited because we've now visited both of its successors.
485 // From block 7:
488 // * Block 3 is not visited because it initializes 'n'.
492 // 'n' is definitely uninitialized for two edges into block 7 (from blocks 2
497 Queue.push_back(block);
498 // Specify that we've already visited all successors of the starting block.
501 SuccsVisited[block->getBlockID()] = block->succ_size();
509 // This block initializes the variable.
514 // When visiting the first successor of a block, mark all NULL
524 // All paths from this block lead to the use and don't initialize the
533 const CFGBlock *Block = *BI;
534 unsigned BlockID = Block->getBlockID();
535 const Stmt *Term = Block->getTerminator();
536 if (SuccsVisited[BlockID] && SuccsVisited[BlockID] < Block->succ_size() &&
538 // This block inevitably leads to the use. If we have an edge from here
539 // to a post-dominator block, and the variable is uninitialized on that
541 for (CFGBlock::const_succ_iterator I = Block->succ_begin(),
542 E = Block->succ_end(); I != E; ++I) {
545 vals.getValue(Block, Succ, vd) == Uninitialized) {
562 Branch.Output = I - Block->succ_begin();
684 static bool runOnBlock(const CFGBlock *block, const CFG &cfg,
689 wasAnalyzed[block->getBlockID()] = true;
693 for (CFGBlock::const_pred_iterator I = block->pred_begin(),
694 E = block->pred_end(); I != E; ++I) {
702 TransferFunctions tf(vals, cfg, block, ac, classification, handler);
703 for (CFGBlock::const_iterator I = block->begin(), E = block->end();
709 return vals.updateValueVectorWithScratch(block);
744 while (const CFGBlock *block = worklist.dequeue()) {
745 // Did the block change?
746 bool changed = runOnBlock(block, cfg, ac, vals,
749 if (changed || !previouslyVisited[block->getBlockID()])
750 worklist.enqueueSuccessors(block);
751 previouslyVisited[block->getBlockID()] = true;
756 const CFGBlock *block = *BI;
757 if (wasAnalyzed[block->getBlockID()]) {
758 runOnBlock(block, cfg, ac, vals, classification, wasAnalyzed, &handler);