Ignore:
Timestamp:
May 12, 2017, 4:54:11 PM (2 years ago)
Author:
nmedfort
Message:

Refactoring work + correction for getRawItemPointer

File:
1 edited

Legend:

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

    r5440 r5446  
    2424#include <pablo/ps_assign.h>
    2525#include <pablo/pablo_kernel.h>
    26 #include <kernels/kernel_builder.h>
     26#include <IR_Gen/idisa_builder.h>
     27#include <llvm/IR/Module.h>
    2728#include <llvm/Support/raw_os_ostream.h>
    2829
     
    4445
    4546Count * PabloBlock::createCount(PabloAST * expr) {
    46     Type * type = getParent()->getBuilder()->getSizeTy();
     47    IntegerType * const type = getParent()->getSizeTy();
    4748    return insertAtInsertionPoint(new (mAllocator) Count(expr, makeName("count"), type, mAllocator));
    4849}
    4950
    5051Count * PabloBlock::createCount(PabloAST * const expr, const llvm::StringRef & prefix)  {
    51     Type * type = getParent()->getBuilder()->getSizeTy();
     52    IntegerType * const type = getParent()->getSizeTy();
    5253    return insertAtInsertionPoint(new (mAllocator) Count(expr, makeName(prefix), type, mAllocator));
    5354}
     
    6364Var * PabloBlock::createVar(PabloAST * name, Type * type) {
    6465    if (type == nullptr) {
    65         type = getParent()->getBuilder()->getStreamTy();
     66        type = getParent()->getStreamTy();
    6667    }
    6768    if (LLVM_UNLIKELY(name == nullptr || !isa<String>(name))) {
     
    186187LessThan * PabloBlock::createLessThan(PabloAST * expr1, PabloAST * expr2) {
    187188    CHECK_SAME_TYPE(expr1, expr2);
    188     Type * type = getParent()->getBuilder()->getInt1Ty();
    189     return new (mAllocator) LessThan(type, expr1, expr2, mAllocator);
     189    IntegerType * const int1Ty = getParent()->getInt1Ty();
     190    return new (mAllocator) LessThan(int1Ty, expr1, expr2, mAllocator);
    190191}
    191192
Note: See TracChangeset for help on using the changeset viewer.