Ignore:
Timestamp:
Jun 6, 2017, 6:20:55 PM (2 years ago)
Author:
cameron
Message:

Restore check-ins from the last several days

Location:
icGREP/icgrep-devel/icgrep/toolchain
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/toolchain/NVPTXDriver.h

    r5474 r5493  
    2323    void finalizeObject() override;
    2424
     25    bool hasExternalFunction(const llvm::StringRef /* functionName */) const override { return false; }
     26
    2527    void * getMain() override; // "main" exists until the driver is deleted
    2628
  • icGREP/icgrep-devel/icgrep/toolchain/cpudriver.cpp

    r5489 r5493  
    2020#include <kernels/kernel.h>
    2121#include <llvm/IR/Verifier.h>
    22 
    2322#ifndef NDEBUG
    2423#define IN_DEBUG_MODE true
     
    7877        mEngine->setObjectCache(mCache);
    7978    }
    80 
    8179    mMainModule->setTargetTriple(mTarget->getTargetTriple().getTriple());
    8280
     
    136134        mEngine->addGlobalMapping(f, functionPtr);
    137135    } else if (LLVM_UNLIKELY(f->getType() != type->getPointerTo())) {
    138         report_fatal_error("Cannot link " + name + ": a function with a differing signature already exists with that name in " + mod->getName());
     136        report_fatal_error("Cannot link " + name + ": a function with a different signature already exists with that name in " + mod->getName());
    139137    }
    140138    return f;
     
    154152        PM.add(createPrintModulePass(*IROutputStream));
    155153    }
    156 
    157154    if (IN_DEBUG_MODE || LLVM_UNLIKELY(codegen::DebugOptionIsSet(codegen::VerifyIR))) {
    158155        PM.add(createVerifierPass());
     
    163160    PM.add(createInstructionCombiningPass());    //Simple peephole optimizations and bit-twiddling.
    164161    PM.add(createCFGSimplificationPass());
     162
    165163    if (LLVM_UNLIKELY(codegen::DebugOptionIsSet(codegen::ShowIR))) {
    166164        if (LLVM_LIKELY(IROutputStream == nullptr)) {
     
    223221}
    224222
     223bool ParabixDriver::hasExternalFunction(llvm::StringRef functionName) const {
     224    return mEngine->getPointerToNamedFunction(functionName, false) != nullptr;
     225}
     226
    225227void * ParabixDriver::getMain() {
    226228    return mEngine->getPointerToNamedFunction("Main");
  • icGREP/icgrep-devel/icgrep/toolchain/cpudriver.h

    r5474 r5493  
    2121    void finalizeObject() override;
    2222
     23    bool hasExternalFunction(const llvm::StringRef functionName) const override;
     24
    2325    void * getMain() override; // "main" exists until the driver is deleted
    2426
  • icGREP/icgrep-devel/icgrep/toolchain/driver.h

    r5474 r5493  
    4040    llvm::Function * LinkFunction(kernel::Kernel & kb, llvm::StringRef name, ExternalFunctionType * functionPtr) const;
    4141
     42    virtual bool hasExternalFunction(const llvm::StringRef functionName) const = 0;
     43
    4244    virtual void finalizeObject() = 0;
    4345
  • icGREP/icgrep-devel/icgrep/toolchain/object_cache.cpp

    r5464 r5493  
    207207
    208208ParabixObjectCache::ParabixObjectCache()
    209 : mCachePath(std::move(getDefaultPath())) {
     209: mCachePath(getDefaultPath()) {
    210210
    211211}
Note: See TracChangeset for help on using the changeset viewer.