[llvm-commits] CVS: llvm/lib/Reoptimizer/Inst/SparcInstManip.h

Joel Stanley jstanley at cs.uiuc.edu
Wed Apr 30 12:31:05 PDT 2003


Changes in directory llvm/lib/Reoptimizer/Inst:

SparcInstManip.h updated: 1.3 -> 1.4

---
Log message:

Privatized the large portion of the SparcInstManip class that no longer needs exposure.


---
Diffs of the changes:

Index: llvm/lib/Reoptimizer/Inst/SparcInstManip.h
diff -u llvm/lib/Reoptimizer/Inst/SparcInstManip.h:1.3 llvm/lib/Reoptimizer/Inst/SparcInstManip.h:1.4
--- llvm/lib/Reoptimizer/Inst/SparcInstManip.h:1.3	Wed Apr 30 12:31:47 2003
+++ llvm/lib/Reoptimizer/Inst/SparcInstManip.h	Wed Apr 30 12:37:10 2003
@@ -25,8 +25,6 @@
         PARAM_1 = 136
     };
 
-    // Overloaded functions
-    
     virtual void     buildSlot(Phase3Info* p3info,
                                std::vector<unsigned>& snippet);
 
@@ -46,8 +44,10 @@
     virtual void     printRange(unsigned* start, unsigned* end) const;
     virtual void     printInst(unsigned inst) const;
 
-    ////
-                     
+  private:
+    SparcInstManip() {}
+    typedef std::map<unsigned, unsigned> OutputToInputRegMap;
+
     void             startCode(std::vector<unsigned>& snippet) { m_pCurrSnippet = &snippet; }
     void             endCode()                                 { m_pCurrSnippet = 0;        }
                      
@@ -81,8 +81,9 @@
     unsigned         getRestoreInst() const;
     inline unsigned  getCallInst(uint64_t dest, uint64_t pc) const;
 
-    // These are functions so when SparcInstManip is superclassed, they'd become virtual, etc.
-    // In the short term we could use class constants, but this is more clear.
+    // These need to become class constants where possible since this portion of the
+    // interface is no longer externally visible and they never became virtual functions
+    // as intended. TODO.
     
     unsigned         getGenLoadSize() const           { return 6;                              }
     unsigned         getGenCallSize() const           { return 2;                              }
@@ -92,15 +93,10 @@
     unsigned         getGenSpillSharedSize() const    { return getGenLoadSize() + getSharedSize(); }
     unsigned         getGenRestoreSharedSize() const  { return getGenLoadSize() + getSharedSize(); }
     unsigned         getGenRestoreSize() const        { return 1;                              }
-
     inline unsigned  getGenAddressCopySize(unsigned loadInst) const;
 
     uint64_t getPhase4SpillAddr() { return (uint64_t) sm_phase4SpillRegion; }
 
-  private:
-    SparcInstManip() {}
-    typedef std::map<unsigned, unsigned>        OutputToInputRegMap;
-
     bool            isCandidateLoad(uint64_t addr,
                                     uint64_t end,
                                     InstCandidate& cand);
@@ -185,5 +181,3 @@
 }
 
 #endif // _INCLUDED_SPARCINSTMANIP_H
-
-





More information about the llvm-commits mailing list