2003-10-13 03:32:08 +00:00
|
|
|
//===-- ModuloScheduling.cpp - Software Pipeling Approach - SMS -----------===//
|
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
|
2003-10-10 17:41:32 +00:00
|
|
|
// algorithm (SMS).
|
2003-03-27 17:57:44 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "ModuloSchedGraph.h"
|
2003-08-28 17:12:14 +00:00
|
|
|
#include "llvm/Function.h"
|
2003-10-10 17:41:32 +00:00
|
|
|
#include "llvm/Pass.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-10-10 17:41:32 +00:00
|
|
|
RegisterOpt<ModuloScheduling> X("modulo-sched",
|
|
|
|
"Modulo Scheduling/Software Pipelining");
|
2003-08-28 17:12:14 +00:00
|
|
|
}
|
2003-03-27 17:57:44 +00:00
|
|
|
|
2003-10-10 17:41:32 +00:00
|
|
|
/// Create Modulo Scheduling Pass
|
|
|
|
///
|
2003-08-28 17:12:14 +00:00
|
|
|
Pass *createModuloSchedPass() {
|
|
|
|
return new ModuloScheduling();
|
2003-03-27 17:57:44 +00:00
|
|
|
}
|
|
|
|
|
2003-10-10 17:41:32 +00:00
|
|
|
/// ModuloScheduling::runOnFunction - main transformation entry point
|
|
|
|
///
|
2003-08-28 17:12:14 +00:00
|
|
|
bool ModuloScheduling::runOnFunction(Function &F) {
|
|
|
|
bool Changed = false;
|
|
|
|
return Changed;
|
2003-03-27 17:57:44 +00:00
|
|
|
}
|