Changeset 6193


Ignore:
Timestamp:
Nov 6, 2018, 4:03:40 PM (5 months ago)
Author:
nmedfort
Message:

Check-in of partially implemented DirectorySearch? kernel

Location:
icGREP/icgrep-devel/icgrep
Files:
2 added
8 edited

Legend:

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

    r6189 r6193  
    255255    Module * const m = getModule();
    256256    Function * mkstempFn = m->getFunction("mkstemp");
    257     if (mkstempFn == nullptr) {
    258         mkstempFn = cast<Function>(m->getOrInsertFunction("mkstemp", getInt32Ty(), getInt8PtrTy(), nullptr));
     257    if (mkstempFn == nullptr) {       
     258        FunctionType * const fty = FunctionType::get(getInt32Ty(), {getInt8PtrTy()}, false);
     259        mkstempFn = Function::Create(fty, Function::ExternalLinkage, "mkstemp", m);
    259260    }
    260261    return CreateCall(mkstempFn, ftemplate);
     
    265266    Function * strlenFn = m->getFunction("strlen");
    266267    if (strlenFn == nullptr) {
    267         strlenFn = cast<Function>(m->getOrInsertFunction("strlen", getSizeTy(), getInt8PtrTy(), nullptr));
     268        FunctionType * const fty = FunctionType::get(getSizeTy(), {getInt8PtrTy()}, false);
     269        strlenFn = Function::Create(fty, Function::ExternalLinkage, "strlen", m);
    268270    }
    269271    return CreateCall(strlenFn, str);
     
    274276    Function * printf = m->getFunction("printf");
    275277    if (printf == nullptr) {
    276         FunctionType * fty = FunctionType::get(getInt32Ty(), {getInt8PtrTy()}, true);
     278        FunctionType * const fty = FunctionType::get(getInt32Ty(), {getInt8PtrTy()}, true);
    277279        printf = Function::Create(fty, Function::ExternalLinkage, "printf", m);
    278280        printf->addAttribute(1, Attribute::NoAlias);
  • icGREP/icgrep-devel/icgrep/icgrep.config

    r6184 r6193  
    1 
     1CONFIG+=c++14
  • icGREP/icgrep-devel/icgrep/icgrep.files

    r6187 r6193  
     1icgrep.pro
     2kernels/directorysearch.cpp
     3kernels/directorysearch.h
    14wc.cpp
    25CMakeLists.txt
  • icGREP/icgrep-devel/icgrep/icgrep.includes

    r6184 r6193  
    11.
    22../libllvm/include
     3../../icgrep-devel/libllvm/include
    34kernels/pipeline
    45util
  • icGREP/icgrep-devel/icgrep/kernels/lz4/lz4_bytestream_decoder.cpp

    r6184 r6193  
    102102    b->SetInsertPoint(cpyLoopBody);
    103103//#ifndef NDEBUG
    104 //    iBuilder->CallPrintIntToStderr("srcOffset", phiSrcOffset);
    105 //    iBuilder->CallPrintIntToStderr("dstOffset", phiDstOffset);
     104//    iBuilder->CallPrintInt("srcOffset", phiSrcOffset);
     105//    iBuilder->CallPrintInt("dstOffset", phiDstOffset);
    106106//#endif
    107107    BasicBlock * reachingBufferEnd_then = b->CreateBasicBlock("matchcopy_reaching_buf_end_then");
  • icGREP/icgrep-devel/icgrep/preprocess.cpp

    r6184 r6193  
    7070    iBuilder->CreateRetVoid();
    7171
    72     pxDriver.LinkFunction(*scanMatchK, "wrapped_report_pos", &wrapped_report_pos);
     72    pxDriver.LinkFunction(*scanMatchK, "wrapped_report_pos", wrapped_report_pos);
    7373    pxDriver.finalizeObject();
    7474
  • icGREP/icgrep-devel/icgrep/toolchain/object_cache.cpp

    r6190 r6193  
    206206
    207207void ParabixObjectCache::performIncrementalCacheCleanupStep() {
    208     if (LLVM_LIKELY(mCleanupMutex.try_lock())) {
     208    //if (LLVM_LIKELY(mCleanupMutex.try_lock())) {
    209209        try {
    210210
     
    243243            mCleanupIterator = fs::directory_iterator(p);
    244244        }
    245         mCleanupMutex.unlock();
    246     }
     245//        mCleanupMutex.unlock();
     246//    }
    247247}
    248248
  • icGREP/icgrep-devel/icgrep/toolchain/object_cache.h

    r6190 r6193  
    1515#include <vector>
    1616#include <string>
    17 #include <mutex>
     17//#include <mutex>
    1818
    1919namespace llvm { class Module; }
     
    4949    void performIncrementalCacheCleanupStep();
    5050private:
    51     std::mutex mCleanupMutex;
     51//    std::mutex mCleanupMutex;
    5252    unsigned mCacheRetrievals;
    5353    unsigned mNewlyCached;
Note: See TracChangeset for help on using the changeset viewer.