Ignore:
Timestamp:
Apr 8, 2016, 2:40:24 PM (3 years ago)
Author:
cameron
Message:

u8u16 progress

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/u8u16.cpp

    r5005 r5007  
    1515#include <llvm/ExecutionEngine/MCJIT.h>
    1616#include <llvm/IRReader/IRReader.h>
     17#include <llvm/IR/Verifier.h>
     18#include <llvm/Support/Debug.h>
     19
    1720#include <llvm/Support/CommandLine.h>
    1821#include <llvm/CodeGen/CommandFlags.h>
     
    4548static cl::list<std::string> inputFiles(cl::Positional, cl::desc("<input file ...>"), cl::OneOrMore);
    4649
     50static cl::OptionCategory eIRDumpOptions("LLVM IR Dump Options", "These options control dumping of LLVM IR.");
     51static cl::opt<bool> DumpGeneratedIR("dump-generated-IR", cl::init(false), cl::desc("Print LLVM IR generated by Pablo Compiler."), cl::cat(eIRDumpOptions));
    4752
    4853static cl::OptionCategory cMachineCodeOptimization("Machine Code Optimizations", "These options control back-end compilier optimization levels.");
     
    287292    pipelineBuilder.CreateKernels(function);
    288293
    289     pipelineBuilder.ExecuteKernels();
    290 
     294    llvm::Function * main_IR = pipelineBuilder.ExecuteKernels();
     295   
     296    if (DumpGeneratedIR) {
     297        M->dump();
     298    }
     299   
     300    verifyModule(*M, &dbgs());
    291301    //std::cerr << "ExecuteKernels(); done\n";
    292     llvm::Function * main_IR = M->getFunction("Main");
    293302    ExecutionEngine * mEngine = JIT_to_ExecutionEngine(M);
    294303   
     
    297306
    298307    delete idb;
    299 
    300308    return reinterpret_cast<u8u16FunctionType>(mEngine->getPointerToFunction(main_IR));
    301309}
    302310
    303 void doCaseFold(u8u16FunctionType fn_ptr, const std::string & fileName) {
     311void u8u16(u8u16FunctionType fn_ptr, const std::string & fileName) {
    304312    std::string mFileName = fileName;
    305313    size_t mFileSize;
     
    372380
    373381    for (unsigned i = 0; i != inputFiles.size(); ++i) {
    374         std::cerr << inputFiles[i] << " beginning\n";
    375         doCaseFold(fn_ptr, inputFiles[i]);
     382        u8u16(fn_ptr, inputFiles[i]);
    376383    }
    377384
Note: See TracChangeset for help on using the changeset viewer.