dep_graph.hh (2689:dbf969c18a65) | dep_graph.hh (2734:af0d50755df7) |
---|---|
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 | 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 |
|
71 /** Resize the dependency graph to have num_entries registers. */ 72 void resize(int num_entries); 73 74 /** Clears all of the linked lists. */ 75 void reset(); 76 77 /** Inserts an instruction to be dependent on the given index. */ 78 void insert(PhysRegIndex idx, DynInstPtr &new_inst); --- 37 unchanged lines hidden (view full) --- 116 public: 117 // Debug variable, remove when done testing. 118 uint64_t nodesTraversed; 119 // Debug variable, remove when done testing. 120 uint64_t nodesRemoved; 121}; 122 123template <class DynInstPtr> | 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> |
|
124void 125DependencyGraph<DynInstPtr>::resize(int num_entries) 126{ 127 numEntries = num_entries; 128 dependGraph = new DepEntry[numEntries]; 129} 130 131template <class DynInstPtr> --- 133 unchanged lines hidden --- | 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 --- |