Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F3999201
passmanager-full.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jul 9, 1:45 AM
Size
1 KB
Mime Type
text/x-c
Expires
Sat, Jul 11, 1:45 AM (1 d, 6 h)
Engine
blob
Format
Raw Data
Handle
273061
Attached To
rXR Xreate
passmanager-full.cpp
View Options
/*
* passmanager-full.cpp
*
* Author: Volodymyr Melnychenko <v.melnychenko@xreate.org>
* Created on January 27, 2017, 7:10 PM
*/
#include "passmanager.h"
#include "llvmlayer.h"
#include "pass/compilepass.h"
#include "pass/adhocpass.h"
#include "pass/cfapass.h"
#include "pass/dfapass.h"
#include "pass/interpretationpass.h"
#include "pass/versionspass.h"
using namespace xreate;
void PassManager::runWithoutCompilation(){
if (flagIsProcessed) return;
CFAPass* passCFG = new CFAPass(this);
//TODO is it really DFGPass needs CFGpass?
this->registerPass(new DFAPass(this), PassId::DFGPass, passCFG);
this->registerPass(passCFG, PassId::CFGPass);
this->registerPass(new AdhocPass(this), PassId::AdhocPass);
this->registerPass(new InterpretationPass(this), PassId::InterpretationPass);
this->registerPass(new VersionsPass(this), PassId::VersionsPass);
this->executePasses();
CompilePass::prepareQueries(clasp);
clasp->run();
flagIsProcessed = true;
}
void*
PassManager::run()
{
runWithoutCompilation();
CompilePass* compiler = new CompilePass(this);
compiler->run();
llvm->print();
llvm->initJit();
return llvm->getFunctionPointer(compiler->getEntryFunction());
}
Event Timeline
Log In to Comment