[llvm-dev] Clang/LLVM 5.0 optnone attribute with -O0 (original) (raw)
Diptorup Deb via llvm-dev llvm-dev at lists.llvm.org
Sun Sep 17 22:12:46 PDT 2017
- Previous message: [llvm-dev] Usage of base register other than ebp for array accesses
- Next message: [llvm-dev] Clang/LLVM 5.0 optnone attribute with -O0
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
We have a research LLVM-based domain-specific code generator that we want to upgrade form LLVM 4.0 to 5.0. The code generator is written as an out-of-tree loadable module for opt.
Till Clang 4.0 we were compiling the front-end code (annotated C++) using -O0. The generated bitcode was further processed using opt with our module loaded. In Clang 5.0 we see that using -O0 adds the optnone attribute to all functions, making it impossible to use any existing LLVM passes in our code generator.
We also tried using - "clang -Xclang -load -Xclang .so -mllvm "
, but this caused a segfault at llvm::legacy::FunctionPassManagerImpl::doInitialization(llvm::Module&).
What is the right way to get around this issue?
Dipto
- Previous message: [llvm-dev] Usage of base register other than ebp for array accesses
- Next message: [llvm-dev] Clang/LLVM 5.0 optnone attribute with -O0
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]