2003-08-28 17:12:14 +00:00
|
|
|
//===-- ModuloScheduling.cpp - Software Pipeling Approach - SMS --*- C++ -*--=//
|
2003-03-27 17:57:44 +00:00
|
|
|
//
|
2003-08-28 17:12:14 +00:00
|
|
|
// The is a software pipelining pass based on the Swing Modulo Scheduling
|
|
|
|
// alogrithm (SMS).
|
2003-03-27 17:57:44 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "ModuloSchedGraph.h"
|
|
|
|
|
2003-08-28 17:12:14 +00:00
|
|
|
#include "llvm/Pass.h"
|
|
|
|
#include "llvm/Function.h"
|
2003-03-27 17:57:44 +00:00
|
|
|
|
2003-08-28 17:12:14 +00:00
|
|
|
namespace {
|
2003-06-08 23:16:07 +00:00
|
|
|
|
2003-08-28 17:12:14 +00:00
|
|
|
class ModuloScheduling : public FunctionPass {
|
2003-06-10 20:04:30 +00:00
|
|
|
|
2003-03-27 17:57:44 +00:00
|
|
|
public:
|
2003-08-28 17:12:14 +00:00
|
|
|
virtual bool runOnFunction(Function &F);
|
2003-03-27 17:57:44 +00:00
|
|
|
};
|
|
|
|
|
2003-08-28 17:12:14 +00:00
|
|
|
RegisterOpt<ModuloScheduling> X("modulo-sched", "Modulo Scheduling/Software Pipelining");
|
|
|
|
}
|
2003-03-27 17:57:44 +00:00
|
|
|
|
2003-08-28 17:12:14 +00:00
|
|
|
//Create Modulo Scheduling Pass
|
|
|
|
Pass *createModuloSchedPass() {
|
|
|
|
return new ModuloScheduling();
|
2003-03-27 17:57:44 +00:00
|
|
|
}
|
|
|
|
|
2003-08-28 17:12:14 +00:00
|
|
|
//ModuloScheduling::runOnFunction - Main transformation entry point.
|
|
|
|
bool ModuloScheduling::runOnFunction(Function &F) {
|
|
|
|
bool Changed = false;
|
2003-03-27 17:57:44 +00:00
|
|
|
|
2003-08-28 17:12:14 +00:00
|
|
|
return Changed;
|
2003-03-27 17:57:44 +00:00
|
|
|
}
|
2003-08-28 17:12:14 +00:00
|
|
|
|