Home | History | Annotate | Download | only in Analysis

Lines Matching refs:block

117   ValueVector &getValueVector(const CFGBlock *block) {
118 return vals[block->getBlockID()];
123 bool updateValueVectorWithScratch(const CFGBlock *block);
133 Value getValue(const CFGBlock *block, const CFGBlock *dstBlock,
137 return getValueVector(block)[idx.getValue()];
157 static void printVector(const CFGBlock *block, ValueVector &bv,
159 llvm::errs() << block->getBlockID() << " :";
180 bool CFGBlockValues::updateValueVectorWithScratch(const CFGBlock *block) {
181 ValueVector &dst = getValueVector(block);
186 printVector(block, scratch, 0);
214 // Treat the first block as already analyzed.
222 void enqueueSuccessors(const CFGBlock *block);
227 void DataflowWorklist::enqueueSuccessors(const clang::CFGBlock *block) {
228 for (CFGBlock::const_succ_iterator I = block->succ_begin(),
229 E = block->succ_end(); I != E; ++I) {
436 const CFGBlock *block;
444 const CFGBlock *block, AnalysisDeclContext &ac,
447 : vals(vals), cfg(cfg), block(block), ac(ac),
506 // Starting from the maybe-uninitialized use in block 9:
507 // * Block 7 is not visited because we have only visited one of its two
509 // * Block 8 is visited because we've visited its only successor.
510 // From block 8:
511 // * Block 7 is visited because we've now visited both of its successors.
512 // From block 7:
515 Block 3 is not visited because it initializes 'n'.
519 // 'n' is definitely uninitialized for two edges into block 7 (from blocks 2
524 Queue.push_back(block);
525 // Specify that we've already visited all successors of the starting block.
528 SuccsVisited[block->getBlockID()] = block->succ_size();
536 // This block initializes the variable.
541 // When visiting the first successor of a block, mark all NULL
551 // All paths from this block lead to the use and don't initialize the
560 const CFGBlock *Block = *BI;
561 unsigned BlockID = Block->getBlockID();
562 const Stmt *Term = Block->getTerminator();
563 if (SuccsVisited[BlockID] && SuccsVisited[BlockID] < Block->succ_size() &&
565 // This block inevitably leads to the use. If we have an edge from here
566 // to a post-dominator block, and the variable is uninitialized on that
568 for (CFGBlock::const_succ_iterator I = Block->succ_begin(),
569 E = Block->succ_end(); I != E; ++I) {
572 vals.getValue(Block, Succ, vd) == Uninitialized) {
589 Branch.Output = I - Block->succ_begin();
728 static bool runOnBlock(const CFGBlock *block, const CFG &cfg,
733 wasAnalyzed[block->getBlockID()] = true;
737 for (CFGBlock::const_pred_iterator I = block->pred_begin(),
738 E = block->pred_end(); I != E; ++I) {
746 TransferFunctions tf(vals, cfg, block, ac, classification, handler);
747 for (CFGBlock::const_iterator I = block->begin(), E = block->end();
752 return vals.updateValueVectorWithScratch(block);
773 /// The current block to scribble use information.
825 while (const CFGBlock *block = worklist.dequeue()) {
826 PBH.currentBlock = block->getBlockID();
828 // Did the block change?
829 bool changed = runOnBlock(block, cfg, ac, vals,
832 if (changed || !previouslyVisited[block->getBlockID()])
833 worklist.enqueueSuccessors(block);
834 previouslyVisited[block->getBlockID()] = true;
842 const CFGBlock *block = *BI;
843 if (PBH.hadUse[block->getBlockID()]) {
844 runOnBlock(block, cfg, ac, vals, classification, wasAnalyzed, handler);