Changeset 4685 for icGREP


Ignore:
Timestamp:
Jul 19, 2015, 3:34:52 PM (4 years ago)
Author:
nmedfort
Message:

Minor simplification of generate_predefined_ucd_functions.

Location:
icGREP/icgrep-devel/icgrep
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/CMakeLists.txt

    r4684 r4685  
    9292add_custom_command(OUTPUT ${PRECOMPILED_FILES}
    9393  COMMAND generate_predefined_ucd_functions
    94   ARGS -o ${PRECOMPILED_PROPERTIES_OBJ} -dir ${PROJECT_SOURCE_DIR}/UCD/ -lib $<TARGET_FILE:UCDlib> ${MULTIPLEXING_FLAG}
     94  ARGS -o ${PRECOMPILED_PROPERTIES_OBJ} -dir ${PROJECT_SOURCE_DIR}/UCD/ ${MULTIPLEXING_FLAG}
    9595  DEPENDS generate_predefined_ucd_functions
    9696  COMMENT "Building predefined UCD functions..."
  • icGREP/icgrep-devel/icgrep/generate_predefined_ucd_functions.cpp

    r4684 r4685  
    4848UCDSourcePath("dir", cl::desc("UCD source code directory"), cl::value_desc("directory"), cl::Required);
    4949
    50 static cl::opt<std::string>
    51 UCDLibraryPath("lib", cl::desc("Static UCD library path"), cl::value_desc("filename"), cl::Required);
    52 
    5350#ifdef ENABLE_MULTIPLEXING
    5451static cl::opt<bool> EnableMultiplexing("multiplexing", cl::init(false),
     
    7673    if (EnableMultiplexing) {
    7774        AutoMultiplexing::optimize(function);
     75        Simplifier::optimize(function);
    7876    }
    7977    #endif
     
    223221    }
    224222
    225     auto MCPU = llvm::sys::getHostCPUName();
    226 
    227223    TargetOptions Options;
    228224
    229225    std::unique_ptr<TargetMachine> Target(
    230                 TheTarget->createTargetMachine(TheTriple.getTriple(), MCPU, "", Options,
     226                TheTarget->createTargetMachine(TheTriple.getTriple(), sys::getHostCPUName(), "", Options,
    231227                                               Reloc::Default, CodeModel::Small, CodeGenOpt::Aggressive));
    232228
     
    237233    #ifdef USE_LLVM_3_5
    238234    std::string error;
    239     std::unique_ptr<tool_output_file> Out = make_unique<tool_output_file>(ObjectFilename.c_str(), error, sys::fs::F_None);
     235    std::unique_ptr<tool_output_file> out = make_unique<tool_output_file>(ObjectFilename.c_str(), error, sys::fs::F_None);
    240236    if (!error.empty()) {
    241237        throw std::runtime_error(error);
     
    243239    #else
    244240    std::error_code error;
    245     std::unique_ptr<tool_output_file> Out = make_unique<tool_output_file>(ObjectFilename, error, sys::fs::F_None);
     241    std::unique_ptr<tool_output_file> out = make_unique<tool_output_file>(ObjectFilename, error, sys::fs::F_None);
    246242    if (error) {
    247243        throw std::runtime_error(error.message());
     
    273269    PM.add(createSinkingPass());
    274270
    275     formatted_raw_ostream FOS(Out->os());
     271    formatted_raw_ostream FOS(out->os());
    276272    // Ask the target to add backend passes as necessary.
    277273    if (Target->addPassesToEmitFile(PM, FOS, TargetMachine::CGFT_ObjectFile)) {
     
    281277    PM.run(*module);
    282278
    283     Out->keep();
     279    out->keep();
    284280}
    285281
  • icGREP/icgrep-devel/icgrep/re/re_compiler.cpp

    r4684 r4685  
    6262
    6363}
    64 
    6564   
    6665MarkerType RE_Compiler::AdvanceMarker(MarkerType m, MarkerPosition newpos, PabloBuilder & pb) {
     
    8988
    9089#define UNICODE_LINE_BREAK (!DisableUnicodeLineBreak)
    91 
    9290
    9391void RE_Compiler::initializeRequiredStreams() {
Note: See TracChangeset for help on using the changeset viewer.