홍도선
2010-May-18 07:38 UTC
[LLVMdev] when compiling the IR api codes, "g++ internal error" occurred.
Hello~! I’m beginner about LLVM. My purpose is inserting a function call to basic block, which is composed of IR codes. For this, I did following works. 1) Generate bytecodes from c++ codes 2) Generate the C++ codes, composed of LLVM APIs. $ llc -march=cpp main.bc -o=main_irgen.cpp 3) Insert function call APIs to the generated C++ codes from step 2) 4) Compile the functional call inserted codes. $ g++ -O2 main_irgen.cpp `llvm-config --cxxflags --ldflags --libs core` -o main_irgen.cpp -> In this step, an error occurred. The messages are as follows g++: Internal error: segmentation fault (program cc1plus) When the generated “main_irgen.cpp” file had 3000~4000 code lines, no error occurred. But, the file had over 30000 code lines, internal error occurred. It was likely that the memory was lacking. But the computer memory is 4G. If you know, give me the way to solve or solution. Thank’U. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100518/617e5930/attachment.html>
Eli Friedman
2010-May-18 19:03 UTC
[LLVMdev] when compiling the IR api codes, "g++ internal error" occurred.
2010/5/18 홍도선 <dshong at sdgroup.snu.ac.kr>:> Hello~! > > > > I'm beginner about LLVM. > > > > My purpose is inserting a function call to basic block, which is composed of > IR codes. > > For this, I did following works. > > > > 1) Generate bytecodes from c++ codes > > 2) Generate the C++ codes, composed of LLVM APIs. > > $ llc -march=cpp main.bc -o=main_irgen.cpp > > 3) Insert function call APIs to the generated C++ codes from step 2) > > 4) Compile the functional call inserted codes. > > $ g++ -O2 main_irgen.cpp `llvm-config --cxxflags --ldflags --libs core` -o > main_irgen.cpp > > -> In this step, an error occurred. The messages are as follows > > g++: Internal error: segmentation fault (program cc1plus) > > > > When the generated "main_irgen.cpp" file had 3000~4000 code lines, no error > occurred. But, the file had over 30000 code lines, internal error occurred.If you need to import a IR file that large, you should use the bitcode reader instead of compiling it into your program with "llc -march=cpp". The relevant call is llvm::ParseBitcodeFile. -Eli
Possibly Parallel Threads
- using lmer weights argument to represent heteroskedasticity
- [LLVMdev] function inlining of llvm-gcc versus gcc, and llvm-g++ versus g++?
- "a binary read error occurred" in read.dta
- error occurred while evaluating nil.accepts
- [PATCH] Remove device information when VmError occurred