Ignore:
Timestamp:
Oct 20, 2014, 6:33:00 PM (5 years ago)
Author:
nmedfort
Message:

Missing pe_next.h file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/pablo_compiler.cpp

    r4253 r4254  
    231231void PabloCompiler::DefineTypes()
    232232{
    233     StructType * StructTy_struct_Basis_bits = mMod->getTypeByName("struct.Basis_bits");
    234     if (StructTy_struct_Basis_bits == nullptr) {
    235         StructTy_struct_Basis_bits = StructType::create(mMod->getContext(), "struct.Basis_bits");
     233    StructType * structBasisBits = mMod->getTypeByName("struct.Basis_bits");
     234    if (structBasisBits == nullptr) {
     235        structBasisBits = StructType::create(mMod->getContext(), "struct.Basis_bits");
    236236    }
    237237    std::vector<Type*>StructTy_struct_Basis_bits_fields;
     
    240240        StructTy_struct_Basis_bits_fields.push_back(mXi64Vect);
    241241    }
    242     if (StructTy_struct_Basis_bits->isOpaque()) {
    243         StructTy_struct_Basis_bits->setBody(StructTy_struct_Basis_bits_fields, /*isPacked=*/false);
    244     }
    245     mBasisBitsInputPtr = PointerType::get(StructTy_struct_Basis_bits, 0);
    246 
    247     std::vector<Type*>FuncTy_0_args;
    248     FuncTy_0_args.push_back(mBasisBitsInputPtr);
     242    if (structBasisBits->isOpaque()) {
     243        structBasisBits->setBody(StructTy_struct_Basis_bits_fields, /*isPacked=*/false);
     244    }
     245    mBasisBitsInputPtr = PointerType::get(structBasisBits, 0);
     246
     247    std::vector<Type*>functionTypeArgs;
     248    functionTypeArgs.push_back(mBasisBitsInputPtr);
    249249
    250250    //The carry q array.
    251251    //A pointer to the BitBlock vector.
    252     FuncTy_0_args.push_back(PointerType::get(mXi64Vect, 0));
     252    functionTypeArgs.push_back(PointerType::get(mXi64Vect, 0));
    253253
    254254    //The output structure.
     
    258258    }
    259259    if (outputStruct->isOpaque()) {
    260         std::vector<Type*>StructTy_struct_Output_fields;
    261         StructTy_struct_Output_fields.push_back(mXi64Vect);
    262         StructTy_struct_Output_fields.push_back(mXi64Vect);
    263         outputStruct->setBody(StructTy_struct_Output_fields, /*isPacked=*/false);
     260        std::vector<Type*>fields;
     261        fields.push_back(mXi64Vect);
     262        fields.push_back(mXi64Vect);
     263        outputStruct->setBody(fields, /*isPacked=*/false);
    264264    }
    265265    PointerType* outputStructPtr = PointerType::get(outputStruct, 0);
    266266
    267267    //The &output parameter.
    268     FuncTy_0_args.push_back(outputStructPtr);
     268    functionTypeArgs.push_back(outputStructPtr);
    269269
    270270    mFunctionType = FunctionType::get(
    271271     /*Result=*/Type::getVoidTy(mMod->getContext()),
    272      /*Params=*/FuncTy_0_args,
     272     /*Params=*/functionTypeArgs,
    273273     /*isVarArg=*/false);
    274274}
     
    426426            throw std::runtime_error("Unknown unicode category \"" + callee + "\"");
    427427            #undef CHECK_GENERAL_CODE_CATEGORY
    428             Value * get_unicode_category = mMod->getOrInsertFunction("__get_category_" + callee, mXi64Vect, mBasisBitsInputPtr, NULL);
    429             if (get_unicode_category == nullptr) {
     428            Value * unicodeCategory = mMod->getOrInsertFunction("__get_category_" + callee, mXi64Vect, mBasisBitsInputPtr, NULL);
     429            if (unicodeCategory == nullptr) {
    430430                throw std::runtime_error("Could not create static method call for unicode category \"" + callee + "\"");
    431431            }
    432             mExecutionEngine->addGlobalMapping(cast<GlobalValue>(get_unicode_category), callee_ptr);
    433             mCalleeMap.insert(std::make_pair(callee, get_unicode_category));
     432            mExecutionEngine->addGlobalMapping(cast<GlobalValue>(unicodeCategory), callee_ptr);
     433            mCalleeMap.insert(std::make_pair(callee, unicodeCategory));
    434434        }
    435435    }
Note: See TracChangeset for help on using the changeset viewer.