Ignore:
Timestamp:
May 24, 2017, 12:06:43 PM (2 years ago)
Author:
nmedfort
Message:

Eliminated ExecutionEngine? memory leak. Intentionally broke compatibility with prior versions to ensure unchecked in projects are restructured.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/u8u16.cpp

    r5464 r5474  
    357357    iBuilder->CreateRetVoid();
    358358   
    359     pxDriver.linkAndFinalize();
     359    pxDriver.finalizeObject();
    360360}
    361361
     
    430430    iBuilder->CreateRetVoid();
    431431
    432     pxDriver.linkAndFinalize();
     432    pxDriver.finalizeObject();
    433433}
    434434
    435435typedef void (*u8u16FunctionType)(uint32_t fd, char * output_data);
    436 
    437 u8u16FunctionType u8u16CodeGen() {
    438     ParabixDriver pxDriver("u8u16");
    439     if (enableAVXdel && AVX2_available() && codegen::BlockSize==256) {
    440         u8u16PipelineAVX2Gen(pxDriver);
    441     } else{
    442         u8u16PipelineGen(pxDriver);
    443     }
    444     return reinterpret_cast<u8u16FunctionType>(pxDriver.getPointerToMain());
    445 }
    446436
    447437size_t file_size(const int fd) {
     
    483473    cl::HideUnrelatedOptions(ArrayRef<const cl::OptionCategory *>{&u8u16Options, pablo::pablo_toolchain_flags(), codegen::codegen_flags()});
    484474    cl::ParseCommandLineOptions(argc, argv);
    485     u8u16(u8u16CodeGen(), inputFile);
     475    ParabixDriver pxDriver("u8u16");
     476    if (enableAVXdel && AVX2_available() && codegen::BlockSize==256) {
     477        u8u16PipelineAVX2Gen(pxDriver);
     478    } else {
     479        u8u16PipelineGen(pxDriver);
     480    }
     481    auto u8u16Function = reinterpret_cast<u8u16FunctionType>(pxDriver.getMain());
     482    u8u16(u8u16Function, inputFile);
    486483    return 0;
    487484}
Note: See TracChangeset for help on using the changeset viewer.