[llvm-commits] CVS: llvm/lib/Reoptimizer/Inst/ElfReader.cpp ElfReader.h InstManip.h Phases.cpp
Joel Stanley
jstanley at cs.uiuc.edu
Wed Apr 30 14:15:01 PDT 2003
Changes in directory llvm/lib/Reoptimizer/Inst:
ElfReader.cpp updated: 1.5 -> 1.6
ElfReader.h updated: 1.4 -> 1.5
InstManip.h updated: 1.13 -> 1.14
Phases.cpp updated: 1.18 -> 1.19
---
Log message:
---
Diffs of the changes:
Index: llvm/lib/Reoptimizer/Inst/ElfReader.cpp
diff -u llvm/lib/Reoptimizer/Inst/ElfReader.cpp:1.5 llvm/lib/Reoptimizer/Inst/ElfReader.cpp:1.6
--- llvm/lib/Reoptimizer/Inst/ElfReader.cpp:1.5 Tue Apr 29 14:48:29 2003
+++ llvm/lib/Reoptimizer/Inst/ElfReader.cpp Wed Apr 30 14:21:06 2003
@@ -24,6 +24,7 @@
#include <iostream>
#include "ElfReader.h"
+#include "InstManip.h"
using std::cerr;
using std::endl;
@@ -68,7 +69,8 @@
}
bool ElfReader::GetNextFunction(std::string& fname,
- std::pair<uint64_t, uint64_t>& range)
+ std::pair<uint64_t, uint64_t>& range,
+ InstManip* im)
{
// Locate next function (skipping non-function entries) in the symbol table if
// possible. If found, return true, yielding name & extents by reference. Return
@@ -92,7 +94,7 @@
if(sym.st_shndx == m_codeSectionIdx) {
fname = m_strTab + sym.st_name;
range.first = sym.st_value;
- range.second = sym.st_value + sym.st_size - 4;
+ range.second = sym.st_value + sym.st_size - im->getInstWidth();
return true;
}
}
Index: llvm/lib/Reoptimizer/Inst/ElfReader.h
diff -u llvm/lib/Reoptimizer/Inst/ElfReader.h:1.4 llvm/lib/Reoptimizer/Inst/ElfReader.h:1.5
--- llvm/lib/Reoptimizer/Inst/ElfReader.h:1.4 Tue Apr 29 14:48:29 2003
+++ llvm/lib/Reoptimizer/Inst/ElfReader.h Wed Apr 30 14:21:06 2003
@@ -10,6 +10,8 @@
#include <libelf.h>
+class InstManip;
+
class ElfReader
{
public:
@@ -17,7 +19,8 @@
~ElfReader();
bool GetNextFunction(std::string& string,
- std::pair<uint64_t, uint64_t>& range);
+ std::pair<uint64_t, uint64_t>& range,
+ InstManip* im);
private:
ElfReader() {}
Index: llvm/lib/Reoptimizer/Inst/InstManip.h
diff -u llvm/lib/Reoptimizer/Inst/InstManip.h:1.13 llvm/lib/Reoptimizer/Inst/InstManip.h:1.14
--- llvm/lib/Reoptimizer/Inst/InstManip.h:1.13 Wed Apr 30 12:31:47 2003
+++ llvm/lib/Reoptimizer/Inst/InstManip.h Wed Apr 30 14:21:06 2003
@@ -22,8 +22,9 @@
#ifndef _INCLUDED_INSTMANIP_H
#define _INCLUDED_INSTMANIP_H
-#include <vector>
#include <algorithm>
+#include <map>
+#include <vector>
class TraceCache;
class Phase2;
Index: llvm/lib/Reoptimizer/Inst/Phases.cpp
diff -u llvm/lib/Reoptimizer/Inst/Phases.cpp:1.18 llvm/lib/Reoptimizer/Inst/Phases.cpp:1.19
--- llvm/lib/Reoptimizer/Inst/Phases.cpp:1.18 Wed Apr 30 12:31:47 2003
+++ llvm/lib/Reoptimizer/Inst/Phases.cpp Wed Apr 30 14:21:06 2003
@@ -116,7 +116,7 @@
private:
Phase3() {}
- void processCandidates(vector<InstCandidate>& candidates);
+ void processCandidates(vector<InstCandidate>& candidates);
Phase3Info* m_pPhase3Info;
TraceCache* m_pTC;
@@ -176,7 +176,7 @@
// functions here -- this could be quite large.
vector<std::pair<std::string, AddressRange> > funcs;
- while(elfReader.GetNextFunction(funcName, range))
+ while(elfReader.GetNextFunction(funcName, range, m_pIM))
funcs.push_back(std::make_pair(funcName, range));
cerr << "There are " << funcs.size() << " functions to process." << endl << endl;
More information about the llvm-commits
mailing list