Ignore:
Timestamp:
Jan 20, 2018, 10:17:47 PM (17 months ago)
Author:
cameron
Message:

LLVM_VERSION_CODE macro, CC-multiplex option, performance bug fixes

Location:
icGREP/icgrep-devel/icgrep/IR_Gen
Files:
3 edited

Legend:

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

    r5828 r5841  
    4141
    4242
    43 #if LLVM_VERSION_INTEGER < LLVM_5_0_0
     43#if LLVM_VERSION_INTEGER < LLVM_VERSION_CODE(5, 0, 0)
    4444#define setReturnDoesNotAlias() setDoesNotAlias(0)
    4545#endif
     
    6262        isPoisoned->setCallingConv(CallingConv::C);
    6363        isPoisoned->setReturnDoesNotAlias();
    64         #if LLVM_VERSION_INTEGER < LLVM_5_0_0
     64        #if LLVM_VERSION_INTEGER < LLVM_VERSION_CODE(5, 0, 0)
    6565        isPoisoned->setDoesNotAlias(1);
    6666        #endif
     
    183183        IntegerType * const int32Ty = getInt32Ty();
    184184        write = cast<Function>(m->getOrInsertFunction("write",
    185 #if LLVM_VERSION_INTEGER < LLVM_5_0_0
     185#if LLVM_VERSION_INTEGER < LLVM_VERSION_CODE(5, 0, 0)
    186186        AttributeSet().addAttribute(getContext(), 2U, Attribute::NoAlias),
    187187#else
     
    205205        IntegerType * const int32Ty = getInt32Ty();
    206206        readFn = cast<Function>(m->getOrInsertFunction("read",
    207 #if LLVM_VERSION_INTEGER < LLVM_5_0_0
     207#if LLVM_VERSION_INTEGER < LLVM_VERSION_CODE(5, 0, 0)
    208208        AttributeSet().addAttribute(getContext(), 2U, Attribute::NoAlias),
    209209#else
     
    419419            f->setCallingConv(CallingConv::C);
    420420            f->setReturnDoesNotAlias();
    421             #if LLVM_VERSION_INTEGER < LLVM_5_0_0
     421            #if LLVM_VERSION_INTEGER <LLVM_VERSION_CODE(5, 0, 0)
    422422            f->setDoesNotAlias(1);
    423423            #endif
     
    455455        f->setCallingConv(CallingConv::C);
    456456        f->setReturnDoesNotAlias();
    457 #if LLVM_VERSION_INTEGER < LLVM_5_0_0
     457#if LLVM_VERSION_INTEGER < LLVM_VERSION_CODE(5, 0, 0)
    458458        f->setDoesNotAlias(1);
    459459#endif
     
    984984            function = Function::Create(fty, Function::PrivateLinkage, "assert", m);
    985985            function->setDoesNotThrow();
    986 #if LLVM_VERSION_INTEGER < LLVM_5_0_0
     986#if LLVM_VERSION_INTEGER < LLVM_VERSION_CODE(5, 0, 0)
    987987            function->setDoesNotAlias(2);
    988988#endif
  • icGREP/icgrep-devel/icgrep/IR_Gen/idisa_avx_builder.cpp

    r5839 r5841  
    11/*
    2  *  Copyright (c) 2015 International Characters.
     2 *  Copyright (c) 2018 International Characters.
    33 *  This software is licensed to the public under the Open Software License 3.0.
    44 *  icgrep is a trademark of International Characters.
     
    66
    77#include "idisa_avx_builder.h"
     8#include <toolchain/toolchain.h>
    89
    910using namespace llvm;
     
    102103   
    103104Value * IDISA_AVX2_Builder::esimd_mergeh(unsigned fw, Value * a, Value * b) {
    104 #if LLVM_VERSION_INTEGER < LLVM_6_0_0
     105#if LLVM_VERSION_INTEGER < LLVM_VERSION_CODE(6, 0, 0)
    105106    if ((fw == 128) && (mBitBlockWidth == 256)) {
    106107        Value * vperm2i128func = Intrinsic::getDeclaration(getModule(), Intrinsic::x86_avx2_vperm2i128);
     
    113114
    114115Value * IDISA_AVX2_Builder::esimd_mergel(unsigned fw, Value * a, Value * b) {
    115 #if LLVM_VERSION_INTEGER < LLVM_6_0_0
     116#if LLVM_VERSION_INTEGER < LLVM_VERSION_CODE(6, 0, 0)
    116117    if ((fw == 128) && (mBitBlockWidth == 256)) {
    117118        Value * vperm2i128func = Intrinsic::getDeclaration(getModule(), Intrinsic::x86_avx2_vperm2i128);
  • icGREP/icgrep-devel/icgrep/IR_Gen/idisa_nvptx_builder.cpp

    r5733 r5841  
    263263    InlineAsm *IA = InlineAsm::get(AsmFnTy, AsmStream, "=r,r", true, false);
    264264    CallInst * result = CreateCall(IA, conv);
    265 #if LLVM_VERSION_INTEGER < LLVM_5_0_0
     265#if LLVM_VERSION_INTEGER < LLVM_VERSION_CODE(5, 0, 0)
    266266    result->addAttribute(AttributeSet::FunctionIndex, Attribute::NoUnwind);
    267267#else
Note: See TracChangeset for help on using the changeset viewer.