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

Restore check-ins from the last several days

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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");
Note: See TracChangeset for help on using the changeset viewer.