Ignore:
Timestamp:
Jun 4, 2014, 5:15:51 AM (5 years ago)
Author:
cameron
Message:

Use CodeGenOpt::Default + createPromoteMemoryToRegisterPass

Location:
icGREP/icgrep-0.8/icgrep
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-0.8/icgrep/llvm_gen.cpp

    r3850 r3854  
    3535    MakeLLVMModule();
    3636
    37     //Create the jit execution engine.
     37    //Create the jit execution engine.up
    3838    InitializeNativeTarget();
    3939    std::string ErrStr;
    40     mExecutionEngine = EngineBuilder(mMod).setUseMCJIT(true).setErrorStr(&ErrStr).create();
     40    mExecutionEngine = EngineBuilder(mMod).setUseMCJIT(true).setErrorStr(&ErrStr).setOptLevel(CodeGenOpt::Default).create();
    4141    if (!mExecutionEngine)
    4242    {
     
    9797    // Set up the optimizer pipeline.  Start with registering info about how the target lays out data structures.
    9898    fpm.add(new DataLayout(*mExecutionEngine->getDataLayout()));
    99     // Provide basic AliasAnalysis support for GVN.
    100     fpm.add(createBasicAliasAnalysisPass());
    101     // Do simple "peephole" optimizations and bit-twiddling optzns.
    102     fpm.add(createInstructionCombiningPass());
    103     // Reassociate expressions.
    104     fpm.add(createReassociatePass());
    105     // Eliminate Common SubExpressions.
    106     fpm.add(createGVNPass());
    107     // Simplify the control flow graph (deleting unreachable blocks, etc).
    108     fpm.add(createCFGSimplificationPass());
     99
     100    fpm.add(createPromoteMemoryToRegisterPass());
    109101
    110102    fpm.doInitialization();
    111103
    112104    fpm.run(*mFunc_process_block);
     105
     106    //mMod->dump();
    113107
    114108    mExecutionEngine->finalizeObject();
  • icGREP/icgrep-0.8/icgrep/utf8_encoder.cpp

    r3850 r3854  
    191191    else
    192192    {
    193         retVal = 0x80 | (codepoint >> (6 * (len - n))) & 0x3F;
     193        retVal = 0x80 | ((codepoint >> (6 * (len - n))) & 0x3F);
    194194    }
    195195
Note: See TracChangeset for help on using the changeset viewer.