Ignore:
Timestamp:
May 30, 2018, 12:41:51 AM (17 months ago)
Author:
xwa163
Message:
  1. Enable swizzled match copy in multiplexing lz4_grep for some special case
  2. Implement some lz4 AIO (all-in-one) pipeline and related kernel
Location:
icGREP/icgrep-devel/icgrep/IR_Gen
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/IR_Gen/CBuilder.cpp

    r6012 r6059  
    295295    }
    296296    return dprintf;
     297}
     298
     299void CBuilder::CallPrintIntCond(const std::string & name, llvm::Value * const value, llvm::Value * const cond) {
     300    BasicBlock* callBlock = this->CreateBasicBlock("callBlock");
     301    BasicBlock* exitBlock = this->CreateBasicBlock("exitBlock");
     302    this->CreateCondBr(cond, callBlock, exitBlock);
     303
     304    this->SetInsertPoint(callBlock);
     305    this->CallPrintInt(name, value);
     306
     307    this->CreateBr(exitBlock);
     308    this->SetInsertPoint(exitBlock);
    297309}
    298310
  • icGREP/icgrep-devel/icgrep/IR_Gen/CBuilder.h

    r5988 r6059  
    210210    //  Create a call to:  int pthread_join(pthread_t thread, void **value_ptr);
    211211    llvm::Value * CreatePThreadJoinCall(llvm::Value * thread, llvm::Value * value_ptr);
    212    
     212
     213    void CallPrintIntCond(const std::string & name, llvm::Value * const value, llvm::Value * const cond);
     214
    213215    void CallPrintInt(const std::string & name, llvm::Value * const value);
    214216   
  • icGREP/icgrep-devel/icgrep/IR_Gen/idisa_builder.cpp

    r6053 r6059  
    2727    assert (a->getType()->getPrimitiveSizeInBits() == ty->getPrimitiveSizeInBits());
    2828    return CreateBitCast(a, ty);
     29}
     30
     31void IDISA_Builder::CallPrintRegisterCond(const std::string & regName, llvm::Value * const value, llvm::Value * const cond) {
     32    BasicBlock* callBlock = this->CreateBasicBlock("callBlock");
     33    BasicBlock* exitBlock = this->CreateBasicBlock("exitBlock");
     34    this->CreateCondBr(cond, callBlock, exitBlock);
     35
     36    this->SetInsertPoint(callBlock);
     37    this->CallPrintRegister(regName, value);
     38
     39    this->CreateBr(exitBlock);
     40    this->SetInsertPoint(exitBlock);
    2941}
    3042
  • icGREP/icgrep-devel/icgrep/IR_Gen/idisa_builder.h

    r6050 r6059  
    196196        return getStreamSetTy(getContext(), NumElements, FieldWidth);
    197197    }
    198    
     198
     199    void CallPrintRegisterCond(const std::string & regName, llvm::Value * const value, llvm::Value * const cond);
    199200    void CallPrintRegister(const std::string & regName, llvm::Value * const value);
    200201
Note: See TracChangeset for help on using the changeset viewer.