1/* 2 * Copyright (c) 2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 54 unchanged lines hidden (view full) --- 63 public: 64 typedef DependencyEntry<DynInstPtr> DepEntry; 65 66 /** Default construction. Must call resize() prior to use. */ 67 DependencyGraph() 68 : numEntries(0), memAllocCounter(0), nodesTraversed(0), nodesRemoved(0) 69 { } 70 |
71 ~DependencyGraph(); 72 |
73 /** Resize the dependency graph to have num_entries registers. */ 74 void resize(int num_entries); 75 76 /** Clears all of the linked lists. */ 77 void reset(); 78 79 /** Inserts an instruction to be dependent on the given index. */ 80 void insert(PhysRegIndex idx, DynInstPtr &new_inst); --- 37 unchanged lines hidden (view full) --- 118 public: 119 // Debug variable, remove when done testing. 120 uint64_t nodesTraversed; 121 // Debug variable, remove when done testing. 122 uint64_t nodesRemoved; 123}; 124 125template <class DynInstPtr> |
126DependencyGraph<DynInstPtr>::~DependencyGraph() 127{ 128 delete [] dependGraph; 129} 130 131template <class DynInstPtr> |
132void 133DependencyGraph<DynInstPtr>::resize(int num_entries) 134{ 135 numEntries = num_entries; 136 dependGraph = new DepEntry[numEntries]; 137} 138 139template <class DynInstPtr> --- 133 unchanged lines hidden --- |