Ignore:
Timestamp:
Apr 18, 2017, 12:51:26 PM (2 years ago)
Author:
nmedfort
Message:

Potential bug fix for 32-bit. Modified MRemap to check for Linux OS support. Added MMapAdvise to CBuilder.

File:
1 edited

Legend:

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

    r5398 r5411  
    8181    llvm::Value * CreateFileSourceMMap(llvm::Value * fd, llvm::Value * size);
    8282
     83    enum class MADV {
     84        NORMAL
     85        , RANDOM
     86        , SEQUENTIAL
     87        , WILLNEED
     88        , DONTNEED
     89//        , REMOVE
     90//        , DONTFORK
     91//        , DOFORK
     92//        , HWPOISON
     93//        , MERGEABLE
     94//        , UNMERGEABLE
     95//        , HUGEPAGE
     96//        , NOHUGEPAGE
     97//        , DONTDUMP
     98//        , DODUMP
     99    };
     100
     101    llvm::Value * CreateMMapAdvise(llvm::Value * addr, llvm::Value * length, MADV advice) {
     102        return CreateMMapAdvise(addr, length, { advice });
     103    }
     104
     105    llvm::Value * CreateMMapAdvise(llvm::Value * addr, llvm::Value * length, std::initializer_list<MADV> advice);
     106
    83107    llvm::Value * CreateMMap(llvm::Value * const addr, llvm::Value * size, llvm::Value * const prot, llvm::Value * const flags, llvm::Value * const fd, llvm::Value * const offset);
    84108
    85109    llvm::Value * CheckMMapSuccess(llvm::Value * const addr);
    86110
    87     llvm::Value * CreateMRemap(llvm::Value * addr, llvm::Value * oldSize, llvm::Value * newSize, const bool mayMove = true);
     111    llvm::Value * CreateMRemap(llvm::Value * addr, llvm::Value * oldSize, llvm::Value * newSize);
    88112
    89113    llvm::Value * CreateMUnmap(llvm::Value * addr, llvm::Value * size);
    90 
    91 
    92114
    93115    //  Posix thread (pthread.h) functions.
Note: See TracChangeset for help on using the changeset viewer.