Skip to content

Commit

Permalink
Merge pull request #178 from jrbyrnes/fixMasterBug
Browse files Browse the repository at this point in the history
Fix master bug
  • Loading branch information
jrbyrnes authored May 13, 2022
2 parents 0588baf + 7bb44c9 commit 5df3319
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 2 additions & 0 deletions include/opt-sched/Scheduler/machine_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ class MachineModel {
std::vector<RegTypeInfo> registerTypes_;
// A vector of issue types with their names and slot counts.
std::vector<IssueTypeInfo> issueTypes_;

void parseBuffer(SpecsBuffer &buf);
};

} // namespace opt_sched
Expand Down
15 changes: 9 additions & 6 deletions lib/Scheduler/machine_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ using namespace llvm::opt_sched;
using std::string;
using std::vector;

MachineModel::MachineModel(const std::string &modelFile) {
SpecsBuffer buf;
buf.Load(modelFile.c_str());
}

MachineModel::MachineModel(SpecsBuffer &buf) {
void MachineModel::parseBuffer(SpecsBuffer &buf) {
char buffer[MAX_NAMESIZE];

buf.ReadSpec("MODEL_NAME:", buffer);
Expand Down Expand Up @@ -91,6 +86,14 @@ MachineModel::MachineModel(SpecsBuffer &buf) {
}
}

MachineModel::MachineModel(const std::string &modelFile) {
SpecsBuffer buf;
buf.Load(modelFile.c_str());
parseBuffer(buf);
}

MachineModel::MachineModel(SpecsBuffer &buf) { parseBuffer(buf); }

InstType MachineModel::GetInstTypeByName(const string &typeName,
const string &prevName) const {
string composite = prevName.size() ? typeName + "_after_" + prevName : "";
Expand Down

0 comments on commit 5df3319

Please sign in to comment.