Ignore:
Timestamp:
May 22, 2017, 12:14:19 PM (2 years ago)
Author:
nmedfort
Message:

Restructuring work for the Driver classes. Start of work to eliminate the memory leaks with the ExecutionEngine?. Replaced custom AlignedMalloc? with backend call to std::aligned_malloc. Salvaged some work on DistributionPass? for reevaluation.

File:
1 edited

Legend:

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

    r5440 r5464  
    2222namespace llvm { class Value; }
    2323
    24 class ParabixDriver;
     24class Driver;
    2525
    2626class CBuilder : public llvm::IRBuilder<> {
    27     friend class ParabixDriver;
    2827public:
    2928
     
    5453   
    5554    void CreateFree(llvm::Value * const ptr);
    56    
    57     void CreateAlignedFree(llvm::Value * const ptr, const bool testForNullAddress = false);
    58    
     55
    5956    llvm::Value * CreateRealloc(llvm::Value * ptr, llvm::Value * size);
    6057
     
    6764        instr->setAlignment(getCacheAlignment());
    6865        return instr;
     66    }
     67
     68    llvm::Value * CreateCacheAlignedMalloc(llvm::Value * size) {
     69        return CreateAlignedMalloc(size, getCacheAlignment());
    6970    }
    7071
     
    188189
    189190    virtual bool supportsIndirectBr() const {
    190         return true;
     191        return false;
    191192    }
    192193
     
    215216    llvm::Function * LinkFunction(llvm::StringRef name, ExternalFunctionType * functionPtr) const;
    216217
     218    void setDriver(Driver * const driver) {
     219        mDriver = driver;
     220    }
     221
    217222protected:
    218223
    219224    llvm::Function * LinkFunction(llvm::StringRef name, llvm::FunctionType * type, void * functionPtr) const;
    220 
    221     void setDriver(ParabixDriver * driver) {
    222         mDriver = driver;
    223     }
    224225
    225226protected:
     
    229230    llvm::IntegerType *             mSizeType;
    230231    llvm::StructType *              mFILEtype;
    231     ParabixDriver *                 mDriver;
     232    Driver *                        mDriver;
    232233    llvm::LLVMContext               mContext;
    233234    const std::string               mTriple;
Note: See TracChangeset for help on using the changeset viewer.