Ignore:
Timestamp:
Aug 18, 2015, 2:17:33 PM (4 years ago)
Author:
cameron
Message:

Link in print_register as needed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/pablo_compiler.cpp

    r4730 r4731  
    5555static cl::opt<bool> DumpTrace("dump-trace", cl::init(false), cl::desc("Generate dynamic traces of executed assignments."), cl::cat(fTracingOptions));
    5656
    57 extern "C" {
    58   void wrapped_print_register(char * regName, BitBlock bit_block) {
    59       print_register<BitBlock>(regName, bit_block);
    60   }
    61 }
    62 
    6357namespace pablo {
    6458
     
    130124    mCarryManager = new CarryManager(mBuilder, mBitBlockType, mZeroInitializer, mOneInitializer, &iBuilder);
    131125   
     126    if (DumpTrace) DeclareDebugFunctions();
    132127       
    133128    GenerateFunction(function);
    134 
     129   
    135130    mBuilder->SetInsertPoint(BasicBlock::Create(mMod->getContext(), "entry", mFunction,0));
    136131
     
    312307
    313308inline void PabloCompiler::DeclareDebugFunctions() {
    314     if (DumpTrace) {
    315309        //This function can be used for testing to print the contents of a register from JIT'd code to the terminal window.
    316310        mPrintRegisterFunction = mMod->getOrInsertFunction("wrapped_print_register", Type::getVoidTy(mMod->getContext()), Type::getInt8PtrTy(mMod->getContext()), mBitBlockType, NULL);
    317     }
    318311}
    319312
Note: See TracChangeset for help on using the changeset viewer.