Commit 6c17dd6d authored by Aaron Smith's avatar Aaron Smith

Disable running the passes automatically as it interferes with automarking

Passes now must be run explicitly with the pass name i.e, "opt -mypass"
parent bcfc1da3
......@@ -50,9 +50,3 @@ struct MyPass : public FunctionPass {
char MyPass::ID = 0;
static RegisterPass<MyPass> X("mypass", "My liveness analysis and dead code elimination pass");
static RegisterStandardPasses Y(
PassManagerBuilder::EP_EarlyAsPossible,
[](const PassManagerBuilder &Builder,
legacy::PassManagerBase &PM) { PM.add(new MyPass()); });
......@@ -3,9 +3,8 @@
#include "llvm/Pass.h"
#include "llvm/IR/Function.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
using namespace llvm;
......@@ -17,16 +16,10 @@ struct MyPass : public FunctionPass {
bool runOnFunction(Function &F) override {
errs() << "I saw a function called " << F.getName() << "!\n";
return false;
return true;
}
};
}
char MyPass::ID = 0;
static RegisterPass<MyPass> X("mypass", "My simple dead code elimination pass");
static RegisterStandardPasses Y(
PassManagerBuilder::EP_EarlyAsPossible,
[](const PassManagerBuilder &Builder,
legacy::PassManagerBase &PM) { PM.add(new MyPass()); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment