LCOV - code coverage report
Current view: top level - lib/CodeGen - StackSlotColoring.cpp (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 210 211 99.5 %
Date: 2017-09-14 15:23:50 Functions: 16 16 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //===-- StackSlotColoring.cpp - Stack slot coloring pass. -----------------===//
       2             : //
       3             : //                     The LLVM Compiler Infrastructure
       4             : //
       5             : // This file is distributed under the University of Illinois Open Source
       6             : // License. See LICENSE.TXT for details.
       7             : //
       8             : //===----------------------------------------------------------------------===//
       9             : //
      10             : // This file implements the stack slot coloring pass.
      11             : //
      12             : //===----------------------------------------------------------------------===//
      13             : 
      14             : #include "llvm/ADT/BitVector.h"
      15             : #include "llvm/ADT/SmallVector.h"
      16             : #include "llvm/ADT/Statistic.h"
      17             : #include "llvm/CodeGen/LiveIntervalAnalysis.h"
      18             : #include "llvm/CodeGen/LiveStackAnalysis.h"
      19             : #include "llvm/CodeGen/MachineBlockFrequencyInfo.h"
      20             : #include "llvm/CodeGen/MachineFrameInfo.h"
      21             : #include "llvm/CodeGen/MachineInstrBuilder.h"
      22             : #include "llvm/CodeGen/MachineMemOperand.h"
      23             : #include "llvm/CodeGen/MachineRegisterInfo.h"
      24             : #include "llvm/CodeGen/Passes.h"
      25             : #include "llvm/CodeGen/PseudoSourceValue.h"
      26             : #include "llvm/IR/Module.h"
      27             : #include "llvm/Support/CommandLine.h"
      28             : #include "llvm/Support/Debug.h"
      29             : #include "llvm/Support/raw_ostream.h"
      30             : #include "llvm/Target/TargetInstrInfo.h"
      31             : #include "llvm/Target/TargetSubtargetInfo.h"
      32             : #include <vector>
      33             : using namespace llvm;
      34             : 
      35             : #define DEBUG_TYPE "stack-slot-coloring"
      36             : 
      37             : static cl::opt<bool>
      38       72306 : DisableSharing("no-stack-slot-sharing",
      39      216918 :              cl::init(false), cl::Hidden,
      40      289224 :              cl::desc("Suppress slot sharing during stack coloring"));
      41             : 
      42      144612 : static cl::opt<int> DCELimit("ssc-dce-limit", cl::init(-1), cl::Hidden);
      43             : 
      44             : STATISTIC(NumEliminated, "Number of stack slots eliminated due to coloring");
      45             : STATISTIC(NumDead,       "Number of trivially dead stack accesses eliminated");
      46             : 
      47             : namespace {
      48      139509 :   class StackSlotColoring : public MachineFunctionPass {
      49             :     LiveStacks* LS;
      50             :     MachineFrameInfo *MFI;
      51             :     const TargetInstrInfo  *TII;
      52             :     const MachineBlockFrequencyInfo *MBFI;
      53             : 
      54             :     // SSIntervals - Spill slot intervals.
      55             :     std::vector<LiveInterval*> SSIntervals;
      56             : 
      57             :     // SSRefs - Keep a list of MachineMemOperands for each spill slot.
      58             :     // MachineMemOperands can be shared between instructions, so we need
      59             :     // to be careful that renames like [FI0, FI1] -> [FI1, FI2] do not
      60             :     // become FI0 -> FI1 -> FI2.
      61             :     SmallVector<SmallVector<MachineMemOperand *, 8>, 16> SSRefs;
      62             : 
      63             :     // OrigAlignments - Alignments of stack objects before coloring.
      64             :     SmallVector<unsigned, 16> OrigAlignments;
      65             : 
      66             :     // OrigSizes - Sizess of stack objects before coloring.
      67             :     SmallVector<unsigned, 16> OrigSizes;
      68             : 
      69             :     // AllColors - If index is set, it's a spill slot, i.e. color.
      70             :     // FIXME: This assumes PEI locate spill slot with smaller indices
      71             :     // closest to stack pointer / frame pointer. Therefore, smaller
      72             :     // index == better color.
      73             :     BitVector AllColors;
      74             : 
      75             :     // NextColor - Next "color" that's not yet used.
      76             :     int NextColor;
      77             : 
      78             :     // UsedColors - "Colors" that have been assigned.
      79             :     BitVector UsedColors;
      80             : 
      81             :     // Assignments - Color to intervals mapping.
      82             :     SmallVector<SmallVector<LiveInterval*,4>, 16> Assignments;
      83             : 
      84             :   public:
      85             :     static char ID; // Pass identification
      86       15599 :     StackSlotColoring() :
      87      124792 :       MachineFunctionPass(ID), NextColor(-1) {
      88       15599 :         initializeStackSlotColoringPass(*PassRegistry::getPassRegistry());
      89       15599 :       }
      90             : 
      91       15549 :     void getAnalysisUsage(AnalysisUsage &AU) const override {
      92       15549 :       AU.setPreservesCFG();
      93       15549 :       AU.addRequired<SlotIndexes>();
      94       15549 :       AU.addPreserved<SlotIndexes>();
      95       15549 :       AU.addRequired<LiveStacks>();
      96       15549 :       AU.addRequired<MachineBlockFrequencyInfo>();
      97       15549 :       AU.addPreserved<MachineBlockFrequencyInfo>();
      98       31098 :       AU.addPreservedID(MachineDominatorsID);
      99       15549 :       MachineFunctionPass::getAnalysisUsage(AU);
     100       15549 :     }
     101             : 
     102             :     bool runOnMachineFunction(MachineFunction &MF) override;
     103             : 
     104             :   private:
     105             :     void InitializeSlots();
     106             :     void ScanForSpillSlotRefs(MachineFunction &MF);
     107             :     bool OverlapWithAssignments(LiveInterval *li, int Color) const;
     108             :     int ColorSlot(LiveInterval *li);
     109             :     bool ColorSlots(MachineFunction &MF);
     110             :     void RewriteInstruction(MachineInstr &MI, SmallVectorImpl<int> &SlotMapping,
     111             :                             MachineFunction &MF);
     112             :     bool RemoveDeadStores(MachineBasicBlock* MBB);
     113             :   };
     114             : } // end anonymous namespace
     115             : 
     116             : char StackSlotColoring::ID = 0;
     117             : char &llvm::StackSlotColoringID = StackSlotColoring::ID;
     118             : 
     119       20212 : INITIALIZE_PASS_BEGIN(StackSlotColoring, DEBUG_TYPE,
     120             :                 "Stack Slot Coloring", false, false)
     121       20212 : INITIALIZE_PASS_DEPENDENCY(SlotIndexes)
     122       20212 : INITIALIZE_PASS_DEPENDENCY(LiveStacks)
     123       20212 : INITIALIZE_PASS_DEPENDENCY(MachineLoopInfo)
     124      197996 : INITIALIZE_PASS_END(StackSlotColoring, DEBUG_TYPE,
     125             :                 "Stack Slot Coloring", false, false)
     126             : 
     127             : namespace {
     128             :   // IntervalSorter - Comparison predicate that sort live intervals by
     129             :   // their weight.
     130             :   struct IntervalSorter {
     131             :     bool operator()(LiveInterval* LHS, LiveInterval* RHS) const {
     132             :       return LHS->weight > RHS->weight;
     133             :     }
     134             :   };
     135             : }
     136             : 
     137             : /// ScanForSpillSlotRefs - Scan all the machine instructions for spill slot
     138             : /// references and update spill slot weights.
     139        3652 : void StackSlotColoring::ScanForSpillSlotRefs(MachineFunction &MF) {
     140        7304 :   SSRefs.resize(MFI->getObjectIndexEnd());
     141             : 
     142             :   // FIXME: Need the equivalent of MachineRegisterInfo for frameindex operands.
     143        7304 :   for (MachineFunction::iterator MBBI = MF.begin(), E = MF.end();
     144       86517 :        MBBI != E; ++MBBI) {
     145       82865 :     MachineBasicBlock *MBB = &*MBBI;
     146      165730 :     for (MachineBasicBlock::iterator MII = MBB->begin(), EE = MBB->end();
     147     1164715 :          MII != EE; ++MII) {
     148     1081850 :       MachineInstr &MI = *MII;
     149     6327486 :       for (unsigned i = 0, e = MI.getNumOperands(); i != e; ++i) {
     150    10491272 :         MachineOperand &MO = MI.getOperand(i);
     151     5245636 :         if (!MO.isFI())
     152     5136676 :           continue;
     153      108960 :         int FI = MO.getIndex();
     154      108960 :         if (FI < 0)
     155        4690 :           continue;
     156      208540 :         if (!LS->hasInterval(FI))
     157       57557 :           continue;
     158       93426 :         LiveInterval &li = LS->getInterval(FI);
     159       46713 :         if (!MI.isDebugValue())
     160       46505 :           li.weight += LiveIntervals::getSpillWeight(false, true, MBFI, MI);
     161             :       }
     162     1584125 :       for (MachineInstr::mmo_iterator MMOI = MI.memoperands_begin(),
     163     1081850 :                                       EE = MI.memoperands_end();
     164     1584125 :            MMOI != EE; ++MMOI) {
     165      502275 :         MachineMemOperand *MMO = *MMOI;
     166      455293 :         if (const FixedStackPseudoSourceValue *FSV =
     167      605451 :             dyn_cast_or_null<FixedStackPseudoSourceValue>(
     168      455293 :                 MMO->getPseudoValue())) {
     169       56194 :           int FI = FSV->getFrameIndex();
     170       56194 :           if (FI >= 0)
     171      103564 :             SSRefs[FI].push_back(MMO);
     172             :         }
     173             :       }
     174             :     }
     175             :   }
     176        3652 : }
     177             : 
     178             : /// InitializeSlots - Process all spill stack slot liveintervals and add them
     179             : /// to a sorted (by weight) list.
     180        3652 : void StackSlotColoring::InitializeSlots() {
     181        7304 :   int LastFI = MFI->getObjectIndexEnd();
     182        3652 :   OrigAlignments.resize(LastFI);
     183        3652 :   OrigSizes.resize(LastFI);
     184        3652 :   AllColors.resize(LastFI);
     185        3652 :   UsedColors.resize(LastFI);
     186        3652 :   Assignments.resize(LastFI);
     187             : 
     188             :   typedef std::iterator_traits<LiveStacks::iterator>::value_type Pair;
     189        7304 :   SmallVector<Pair *, 16> Intervals;
     190        7304 :   Intervals.reserve(LS->getNumIntervals());
     191       23672 :   for (auto &I : *LS)
     192       12716 :     Intervals.push_back(&I);
     193       10956 :   std::sort(Intervals.begin(), Intervals.end(),
     194             :             [](Pair *LHS, Pair *RHS) { return LHS->first < RHS->first; });
     195             : 
     196             :   // Gather all spill slots into a list.
     197             :   DEBUG(dbgs() << "Spill slot intervals:\n");
     198       23672 :   for (auto *I : Intervals) {
     199       12716 :     LiveInterval &li = I->second;
     200             :     DEBUG(li.dump());
     201       25432 :     int FI = TargetRegisterInfo::stackSlot2Index(li.reg);
     202       25432 :     if (MFI->isDeadObjectIndex(FI))
     203           0 :       continue;
     204       25432 :     SSIntervals.push_back(&li);
     205       38148 :     OrigAlignments[FI] = MFI->getObjectAlignment(FI);
     206       38148 :     OrigSizes[FI]      = MFI->getObjectSize(FI);
     207       12716 :     AllColors.set(FI);
     208             :   }
     209             :   DEBUG(dbgs() << '\n');
     210             : 
     211             :   // Sort them by weight.
     212       10956 :   std::stable_sort(SSIntervals.begin(), SSIntervals.end(), IntervalSorter());
     213             : 
     214             :   // Get first "color".
     215        7304 :   NextColor = AllColors.find_first();
     216        3652 : }
     217             : 
     218             : /// OverlapWithAssignments - Return true if LiveInterval overlaps with any
     219             : /// LiveIntervals that have already been assigned to the specified color.
     220             : bool
     221      259931 : StackSlotColoring::OverlapWithAssignments(LiveInterval *li, int Color) const {
     222      519862 :   const SmallVectorImpl<LiveInterval *> &OtherLIs = Assignments[Color];
     223      547611 :   for (unsigned i = 0, e = OtherLIs.size(); i != e; ++i) {
     224      571220 :     LiveInterval *OtherLI = OtherLIs[i];
     225      571220 :     if (OtherLI->overlaps(*li))
     226             :       return true;
     227             :   }
     228             :   return false;
     229             : }
     230             : 
     231             : /// ColorSlot - Assign a "color" (stack slot) to the specified stack slot.
     232             : ///
     233       12716 : int StackSlotColoring::ColorSlot(LiveInterval *li) {
     234       12716 :   int Color = -1;
     235       12716 :   bool Share = false;
     236       25432 :   int FI = TargetRegisterInfo::stackSlot2Index(li->reg);
     237             : 
     238       12716 :   if (!DisableSharing) {
     239             :     // Check if it's possible to reuse any of the used colors.
     240       25432 :     Color = UsedColors.find_first();
     241      528438 :     while (Color != -1) {
     242      259931 :       if (!OverlapWithAssignments(li, Color)) {
     243             :         Share = true;
     244             :         ++NumEliminated;
     245             :         break;
     246             :       }
     247      515722 :       Color = UsedColors.find_next(Color);
     248             :     }
     249             :   }
     250             : 
     251       16856 :   if (Color != -1 && MFI->getStackID(Color) != MFI->getStackID(FI)) {
     252             :     DEBUG(dbgs() << "cannot share FIs with different stack IDs\n");
     253             :     Share = false;
     254             :   }
     255             : 
     256             :   // Assign it to the first available color (assumed to be the best) if it's
     257             :   // not possible to share a used color with other objects.
     258       12715 :   if (!Share) {
     259             :     assert(NextColor != -1 && "No more spill slots?");
     260       10647 :     Color = NextColor;
     261       21294 :     UsedColors.set(Color);
     262       21294 :     NextColor = AllColors.find_next(NextColor);
     263             :   }
     264             : 
     265             :   // Record the assignment.
     266       25432 :   Assignments[Color].push_back(li);
     267             :   DEBUG(dbgs() << "Assigning fi#" << FI << " to fi#" << Color << "\n");
     268             : 
     269             :   // Change size and alignment of the allocated slot. If there are multiple
     270             :   // objects sharing the same slot, then make sure the size and alignment
     271             :   // are large enough for all.
     272       25432 :   unsigned Align = OrigAlignments[FI];
     273       14785 :   if (!Share || Align > MFI->getObjectAlignment(Color))
     274       10731 :     MFI->setObjectAlignment(Color, Align);
     275       25432 :   int64_t Size = OrigSizes[FI];
     276       14785 :   if (!Share || Size > MFI->getObjectSize(Color))
     277       10734 :     MFI->setObjectSize(Color, Size);
     278       12716 :   return Color;
     279             : }
     280             : 
     281             : /// Colorslots - Color all spill stack slots and rewrite all frameindex machine
     282             : /// operands in the function.
     283        3652 : bool StackSlotColoring::ColorSlots(MachineFunction &MF) {
     284        7304 :   unsigned NumObjs = MFI->getObjectIndexEnd();
     285       10956 :   SmallVector<int, 16> SlotMapping(NumObjs, -1);
     286       10956 :   SmallVector<float, 16> SlotWeights(NumObjs, 0.0);
     287       14608 :   SmallVector<SmallVector<int, 4>, 16> RevMap(NumObjs);
     288        7304 :   BitVector UsedColors(NumObjs);
     289             : 
     290             :   DEBUG(dbgs() << "Color spill slot intervals:\n");
     291        3652 :   bool Changed = false;
     292       20020 :   for (unsigned i = 0, e = SSIntervals.size(); i != e; ++i) {
     293       25432 :     LiveInterval *li = SSIntervals[i];
     294       25432 :     int SS = TargetRegisterInfo::stackSlot2Index(li->reg);
     295       12716 :     int NewSS = ColorSlot(li);
     296             :     assert(NewSS >= 0 && "Stack coloring failed?");
     297       25432 :     SlotMapping[SS] = NewSS;
     298       25432 :     RevMap[NewSS].push_back(SS);
     299       25432 :     SlotWeights[NewSS] += li->weight;
     300       25432 :     UsedColors.set(NewSS);
     301       12716 :     Changed |= (SS != NewSS);
     302             :   }
     303             : 
     304             :   DEBUG(dbgs() << "\nSpill slots after coloring:\n");
     305       20020 :   for (unsigned i = 0, e = SSIntervals.size(); i != e; ++i) {
     306       25432 :     LiveInterval *li = SSIntervals[i];
     307       25432 :     int SS = TargetRegisterInfo::stackSlot2Index(li->reg);
     308       25432 :     li->weight = SlotWeights[SS];
     309             :   }
     310             :   // Sort them by new weight.
     311       10956 :   std::stable_sort(SSIntervals.begin(), SSIntervals.end(), IntervalSorter());
     312             : 
     313             : #ifndef NDEBUG
     314             :   for (unsigned i = 0, e = SSIntervals.size(); i != e; ++i)
     315             :     DEBUG(SSIntervals[i]->dump());
     316             :   DEBUG(dbgs() << '\n');
     317             : #endif
     318             : 
     319        3652 :   if (!Changed)
     320             :     return false;
     321             : 
     322             :   // Rewrite all MachineMemOperands.
     323       18004 :   for (unsigned SS = 0, SE = SSRefs.size(); SS != SE; ++SS) {
     324       33044 :     int NewFI = SlotMapping[SS];
     325       16522 :     if (NewFI == -1 || (NewFI == (int)SS))
     326       10654 :       continue;
     327             : 
     328        5868 :     const PseudoSourceValue *NewSV = MF.getPSVManager().getFixedStack(NewFI);
     329       11736 :     SmallVectorImpl<MachineMemOperand *> &RefMMOs = SSRefs[SS];
     330       38563 :     for (unsigned i = 0, e = RefMMOs.size(); i != e; ++i)
     331       80481 :       RefMMOs[i]->setValue(NewSV);
     332             :   }
     333             : 
     334             :   // Rewrite all MO_FrameIndex operands.  Look for dead stores.
     335       62394 :   for (MachineBasicBlock &MBB : MF) {
     336     1813442 :     for (MachineInstr &MI : MBB)
     337      786379 :       RewriteInstruction(MI, SlotMapping, MF);
     338       60171 :     RemoveDeadStores(&MBB);
     339             :   }
     340             : 
     341             :   // Delete unused stack slots.
     342        4879 :   while (NextColor != -1) {
     343             :     DEBUG(dbgs() << "Removing unused stack object fi#" << NextColor << "\n");
     344        4138 :     MFI->RemoveStackObject(NextColor);
     345        4138 :     NextColor = AllColors.find_next(NextColor);
     346             :   }
     347             : 
     348             :   return true;
     349             : }
     350             : 
     351             : /// RewriteInstruction - Rewrite specified instruction by replacing references
     352             : /// to old frame index with new one.
     353      786379 : void StackSlotColoring::RewriteInstruction(MachineInstr &MI,
     354             :                                            SmallVectorImpl<int> &SlotMapping,
     355             :                                            MachineFunction &MF) {
     356             :   // Update the operands.
     357     4573254 :   for (unsigned i = 0, ee = MI.getNumOperands(); i != ee; ++i) {
     358     7573750 :     MachineOperand &MO = MI.getOperand(i);
     359     3786875 :     if (!MO.isFI())
     360             :       continue;
     361       76035 :     int OldFI = MO.getIndex();
     362       76035 :     if (OldFI < 0)
     363             :       continue;
     364      147292 :     int NewFI = SlotMapping[OldFI];
     365       73646 :     if (NewFI == -1 || NewFI == OldFI)
     366             :       continue;
     367       26963 :     MO.setIndex(NewFI);
     368             :   }
     369             : 
     370             :   // The MachineMemOperands have already been updated.
     371      786379 : }
     372             : 
     373             : 
     374             : /// RemoveDeadStores - Scan through a basic block and look for loads followed
     375             : /// by stores.  If they're both using the same stack slot, then the store is
     376             : /// definitely dead.  This could obviously be much more aggressive (consider
     377             : /// pairs with instructions between them), but such extensions might have a
     378             : /// considerable compile time impact.
     379       60171 : bool StackSlotColoring::RemoveDeadStores(MachineBasicBlock* MBB) {
     380             :   // FIXME: This could be much more aggressive, but we need to investigate
     381             :   // the compile time impact of doing so.
     382       60171 :   bool changed = false;
     383             : 
     384      120342 :   SmallVector<MachineInstr*, 4> toErase;
     385             : 
     386      120342 :   for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end();
     387      845946 :        I != E; ++I) {
     388      785775 :     if (DCELimit != -1 && (int)NumDead >= DCELimit)
     389             :       break;
     390             :     int FirstSS, SecondSS;
     391     1571551 :     if (TII->isStackSlotCopy(*I, FirstSS, SecondSS) && FirstSS == SecondSS &&
     392             :         FirstSS != -1) {
     393           1 :       ++NumDead;
     394           1 :       changed = true;
     395           1 :       toErase.push_back(&*I);
     396      785774 :       continue;
     397             :     }
     398             : 
     399      785774 :     MachineBasicBlock::iterator NextMI = std::next(I);
     400      785774 :     MachineBasicBlock::iterator ProbableLoadMI = I;
     401             : 
     402      785774 :     unsigned LoadReg = 0;
     403      785774 :     unsigned StoreReg = 0;
     404     2333700 :     if (!(LoadReg = TII->isLoadFromStackSlot(*I, FirstSS)))
     405             :       continue;
     406             :     // Skip the ...pseudo debugging... instructions between a load and store.
     407       71991 :     while ((NextMI != E) && NextMI->isDebugValue()) {
     408         603 :       ++NextMI;
     409             :       ++I;
     410             :     }
     411       23964 :     if (NextMI == E) continue;
     412       46560 :     if (!(StoreReg = TII->isStoreToStackSlot(*NextMI, SecondSS)))
     413             :       continue;
     414         843 :     if (FirstSS != SecondSS || LoadReg != StoreReg || FirstSS == -1) continue;
     415             : 
     416           1 :     ++NumDead;
     417           1 :     changed = true;
     418             : 
     419           1 :     if (NextMI->findRegisterUseOperandIdx(LoadReg, true, nullptr) != -1) {
     420           1 :       ++NumDead;
     421           1 :       toErase.push_back(&*ProbableLoadMI);
     422             :     }
     423             : 
     424           1 :     toErase.push_back(&*NextMI);
     425           1 :     ++I;
     426             :   }
     427             : 
     428       60174 :   for (SmallVectorImpl<MachineInstr *>::iterator I = toErase.begin(),
     429       60171 :        E = toErase.end(); I != E; ++I)
     430           3 :     (*I)->eraseFromParent();
     431             : 
     432      120342 :   return changed;
     433             : }
     434             : 
     435             : 
     436      135770 : bool StackSlotColoring::runOnMachineFunction(MachineFunction &MF) {
     437             :   DEBUG({
     438             :       dbgs() << "********** Stack Slot Coloring **********\n"
     439             :              << "********** Function: " << MF.getName() << '\n';
     440             :     });
     441             : 
     442      135770 :   MFI = &MF.getFrameInfo();
     443      135770 :   TII = MF.getSubtarget().getInstrInfo();
     444      135770 :   LS = &getAnalysis<LiveStacks>();
     445      135770 :   MBFI = &getAnalysis<MachineBlockFrequencyInfo>();
     446             : 
     447      135770 :   bool Changed = false;
     448             : 
     449      271540 :   unsigned NumSlots = LS->getNumIntervals();
     450      135770 :   if (NumSlots == 0)
     451             :     // Nothing to do!
     452             :     return false;
     453             : 
     454             :   // If there are calls to setjmp or sigsetjmp, don't perform stack slot
     455             :   // coloring. The stack could be modified before the longjmp is executed,
     456             :   // resulting in the wrong value being used afterwards. (See
     457             :   // <rdar://problem/8007500>.)
     458        3658 :   if (MF.exposesReturnsTwice())
     459             :     return false;
     460             : 
     461             :   // Gather spill slot references
     462        3652 :   ScanForSpillSlotRefs(MF);
     463        3652 :   InitializeSlots();
     464        3652 :   Changed = ColorSlots(MF);
     465             : 
     466        3652 :   NextColor = -1;
     467        7304 :   SSIntervals.clear();
     468       33182 :   for (unsigned i = 0, e = SSRefs.size(); i != e; ++i)
     469       77634 :     SSRefs[i].clear();
     470        3652 :   SSRefs.clear();
     471        7304 :   OrigAlignments.clear();
     472        7304 :   OrigSizes.clear();
     473        3652 :   AllColors.clear();
     474        3652 :   UsedColors.clear();
     475       33182 :   for (unsigned i = 0, e = Assignments.size(); i != e; ++i)
     476       77634 :     Assignments[i].clear();
     477        3652 :   Assignments.clear();
     478             : 
     479        3652 :   return Changed;
     480      216918 : }

Generated by: LCOV version 1.13