llvm.org GIT mirror llvm / 5c99c6a
fix trivial typos; NFC sucessor -> successor git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307488 91177308-0d34-0410-b5e6-96231b3b80d8 Hiroshi Inoue 3 years ago
6 changed file(s) with 10 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
9393 // guarantee that 'I' never reaches 'BeforeHere' through a back-edge or
9494 // by its successors, i.e, prune if:
9595 //
96 // (1) BB is an entry block or have no sucessors.
97 // (2) There's no path coming back through BB sucessors.
96 // (1) BB is an entry block or have no successors.
97 // (2) There's no path coming back through BB successors.
9898 if (BB == &BB->getParent()->getEntryBlock() ||
9999 !BB->getTerminator()->getNumSuccessors())
100100 return true;
459459 void UnloopUpdater::updateBlockParents() {
460460 if (Unloop.getNumBlocks()) {
461461 // Perform a post order CFG traversal of all blocks within this loop,
462 // propagating the nearest loop from sucessors to predecessors.
462 // propagating the nearest loop from successors to predecessors.
463463 LoopBlocksTraversal Traversal(DFS, LI);
464464 for (BasicBlock *POI : Traversal) {
465465
5252 std::pair &LIP = LastInsertPoint[Num];
5353 SlotIndex MBBEnd = LIS.getMBBEndIdx(&MBB);
5454
55 SmallVector EHPadSucessors;
55 SmallVector EHPadSuccessors;
5656 for (const MachineBasicBlock *SMBB : MBB.successors())
5757 if (SMBB->isEHPad())
58 EHPadSucessors.push_back(SMBB);
58 EHPadSuccessors.push_back(SMBB);
5959
6060 // Compute insert points on the first call. The pair is independent of the
6161 // current live interval.
6767 LIP.first = LIS.getInstructionIndex(*FirstTerm);
6868
6969 // If there is a landing pad successor, also find the call instruction.
70 if (EHPadSucessors.empty())
70 if (EHPadSuccessors.empty())
7171 return LIP.first;
7272 // There may not be a call instruction (?) in which case we ignore LPad.
7373 LIP.second = LIP.first;
8686 if (!LIP.second)
8787 return LIP.first;
8888
89 if (none_of(EHPadSucessors, [&](const MachineBasicBlock *EHPad) {
89 if (none_of(EHPadSuccessors, [&](const MachineBasicBlock *EHPad) {
9090 return LIS.isLiveInToMBB(CurLI, EHPad);
9191 }))
9292 return LIP.first;
131131 // no blocks not dominated by the loop header.
132132 // - It's desirable to preserve the original block order when possible.
133133 // We use two ready lists; Preferred and Ready. Preferred has recently
134 // processed sucessors, to help preserve block sequences from the original
134 // processed successors, to help preserve block sequences from the original
135135 // order. Ready has the remaining ready blocks.
136136 PriorityQueue,
137137 CompareBlockNumbers>
328328 Loops[Exit] = N->getEntry();
329329
330330 } else {
331 // Test for sucessors as back edge
331 // Test for successors as back edge
332332 BasicBlock *BB = N->getNodeAs();
333333 BranchInst *Term = cast(BB->getTerminator());
334334
11 ; RUN: llc -disable-preheader-prot=true -disable-machine-licm -machine-sink-bfi=false -mtriple=x86_64-apple-darwin < %s | FileCheck %s -check-prefix=MSINK_NOBFI
22
33 ; Test that by changing BlockFrequencyInfo we change the order in which
4 ; machine-sink looks for sucessor blocks. By not using BFI, both G and B
4 ; machine-sink looks for successor blocks. By not using BFI, both G and B
55 ; have the same loop depth and no instructions is sinked - B is selected but
66 ; can't be used as to avoid breaking a non profitable critical edge. By using
77 ; BFI, "mul" is sinked into the less frequent block G.