[llvm-commits] CVS: reopt/lib/Inst/lib/InstManip.h Phases.cpp SparcInstManip.cpp SparcInstManip.h
Brian Gaeke
gaeke at cs.uiuc.edu
Sun Dec 5 18:14:16 PST 2004
Changes in directory reopt/lib/Inst/lib:
InstManip.h updated: 1.21 -> 1.22
Phases.cpp updated: 1.39 -> 1.40
SparcInstManip.cpp updated: 1.22 -> 1.23
SparcInstManip.h updated: 1.17 -> 1.18
---
Log message:
Streamline the interfaces here so that usage of BinInterface is minimized.
Move the pieces of BinInterface that this code uses here, and dump the rest.
---
Diffs of the changes: (+3 -47)
Index: reopt/lib/Inst/lib/InstManip.h
diff -u reopt/lib/Inst/lib/InstManip.h:1.21 reopt/lib/Inst/lib/InstManip.h:1.22
--- reopt/lib/Inst/lib/InstManip.h:1.21 Fri Sep 24 16:22:43 2004
+++ reopt/lib/Inst/lib/InstManip.h Sun Dec 5 20:14:03 2004
@@ -113,7 +113,6 @@
virtual unsigned getBranchAlways(uint64_t dest, uint64_t pc,
bool annulHigh = true) const = 0;
virtual bool isBranch(unsigned inst) const = 0;
- virtual void printRange(unsigned* start, unsigned* end) const = 0;
virtual void printInst(unsigned inst) const = 0;
void makePhase3SpillRegion(unsigned numFuncs);
@@ -122,7 +121,6 @@
void copySnippetToSlot(std::vector<unsigned>& snippet,
uint64_t slotBase);
- inline void printRange(uint64_t start, uint64_t end) const;
unsigned getSharedSize() const { return m_sharedSize; }
unsigned getInstWidth() const { return m_instWidth; }
@@ -148,11 +146,6 @@
unsigned m_nopInst;
};
-void InstManip::printRange(uint64_t start, uint64_t end) const
-{
- printRange((unsigned*) start, (unsigned*) end);
-}
-
/// InstCandidate is a class that represents a location in the code that is
/// determined to be a candidate for instrumentation. Because the
/// transformation action required for a particular candidate requires auxiliary
Index: reopt/lib/Inst/lib/Phases.cpp
diff -u reopt/lib/Inst/lib/Phases.cpp:1.39 reopt/lib/Inst/lib/Phases.cpp:1.40
--- reopt/lib/Inst/lib/Phases.cpp:1.39 Wed Nov 19 14:49:53 2003
+++ reopt/lib/Inst/lib/Phases.cpp Sun Dec 5 20:14:03 2004
@@ -436,15 +436,6 @@
uint64_t repInstAddr = m_pIM->getStartAddr(range.first);
unsigned origInst = vm->readInstrFrmVm(repInstAddr);
-#if 0
-#if VERBOSE > 3
- DEBUG_MSG(4, "printing function before writing branch-to-slot\n");
- DEBUG_MSG(4, "range goes from " << HEX(range.first) << " to " << HEX(range.second) << endl);
- m_pIM->printRange(range.first, range.second);
- DEBUG_MSG(4, "done printing function...\n");
-#endif
-#endif
-
assert(!m_pIM->isBranch(origInst) &&
"Unhandled case: branch instruction first in function body");
@@ -453,15 +444,6 @@
// Replace instruction at repInstAddr with a branch to start of a new slot.
uint64_t slotBase = replaceInstWithBrToSlot(repInstAddr, slotSize, m_pTC, m_pIM);
-#if 0
-#if VERBOSE > 3
- DEBUG_MSG(4, "printing function after writing branch-to-slot\n");
- DEBUG_MSG(4, "range goes from " << HEX(range.first) << " to " << HEX(range.second) << endl);
- m_pIM->printRange(range.first, range.second);
- DEBUG_MSG(4, "done printing function...\n");
-#endif
-#endif
-
// Build the Phase3Info structure and generate the phase 3 slot.
Phase3Info* p3info = new Phase3Info(range, origInst, repInstAddr,
Index: reopt/lib/Inst/lib/SparcInstManip.cpp
diff -u reopt/lib/Inst/lib/SparcInstManip.cpp:1.22 reopt/lib/Inst/lib/SparcInstManip.cpp:1.23
--- reopt/lib/Inst/lib/SparcInstManip.cpp:1.22 Wed Nov 19 14:49:53 2003
+++ reopt/lib/Inst/lib/SparcInstManip.cpp Sun Dec 5 20:14:04 2004
@@ -70,8 +70,8 @@
#include "reopt/TraceCache.h"
#include "reopt/VirtualMem.h"
#include "reopt/MemoryManager.h"
-#include "reopt/BinInterface/sparc9.h"
-#include "reopt/BinInterface/bitmath.h"
+#include "BinInterface/SparcV9.h"
+#include "BinInterface/BitMath.h"
#include "reopt/InstrUtils.h"
#include "SparcInstManip.h"
#include "PhaseInfo.h"
@@ -465,25 +465,6 @@
}
-void SparcInstManip::printRange(unsigned* start,
- unsigned* end) const
-{
- // Dumps contents (and corresponding disassembly) of memory range given by range
- // to stdout. TODO: Parameterize by an ostream instance; cannot do this yet
- // because BinInterface is hard-coded to use printf and must be changed.
-
- cout << "Sparc dissassembly of range ["
- << start << ", " << end << "]:" << endl;
-
- for(; start <= end; ++start) {
- cout << start << " | "
- << std::setw(8) << std::setfill('0')
- << HEX(*start) << " | ";
- sparc_print(*start);
- cout << endl;
- }
-}
-
void SparcInstManip::printInst(unsigned inst) const
{
sparc_print(inst);
Index: reopt/lib/Inst/lib/SparcInstManip.h
diff -u reopt/lib/Inst/lib/SparcInstManip.h:1.17 reopt/lib/Inst/lib/SparcInstManip.h:1.18
--- reopt/lib/Inst/lib/SparcInstManip.h:1.17 Wed Nov 19 14:49:53 2003
+++ reopt/lib/Inst/lib/SparcInstManip.h Sun Dec 5 20:14:04 2004
@@ -16,7 +16,7 @@
#ifndef SPARCINSTMANIP_H
#define SPARCINSTMANIP_H
-#include "reopt/BinInterface/sparcdis.h"
+#include "BinInterface/SparcDis.h"
#include "reopt/InstrUtils.h" // getCallInstr, getUndepJumpInstr, etc.
#include "InstManip.h"
#include <map>
More information about the llvm-commits
mailing list