Skip to content
Snippets Groups Projects
Commit 91a60b70 authored by RafaeNoor's avatar RafaeNoor
Browse files

Added lower switch pass into hcc tool

parent 4a991c0d
No related branches found
No related tags found
No related merge requests found
......@@ -32,8 +32,10 @@
#include "llvm/Support/ToolOutputFile.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Scalar/SimplifyCFG.h"
#include "llvm/Transforms/Utils.h"
#include "llvm/Transforms/Utils/SimplifyCFGOptions.h"
#include "HPVMCGenPass.h"
#include "HCCVerifierPass.h"
......@@ -168,8 +170,10 @@ int main(int argc, char** argv)
// Find the marker function in the input module
// findAndExtractTasks(*M);
legacy::PassManager Passes;
Passes.add(createLowerSwitchPass());
Passes.add(createLoopSimplifyPass());
Passes.add(new HCCVerifierPass());
Passes.add(new HCCVerifierPass());
Passes.add(new HPVMCGenPass(/* Subpass configurations */ ExtractOpts));
auto ftor = std::function<bool(const Function &)>(
......@@ -177,8 +181,6 @@ int main(int argc, char** argv)
return true;
});
//Passes.add(createCFGSimplificationPass(/*Threshold = */ 1, /*Forward Switch Cond*/ false, /*Convert Switch */ false, /* KeepLoops */ true, /* SinkCommon*/ false,
// ftor));
SimplifyCFGOptions SCFGOpt; // Use default setings
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment