llvm

What is LLVM and How is replacing Python VM with LLVM increasing speeds 5x?

☆樱花仙子☆ 提交于 2019-12-31 09:11:30
问题 Google is sponsoring an Open Source project to increase the speed of Python by 5x. Unladen-Swallow seems to have a good project plan Why is concurrency such a hard problem? Is LLVM going to solve the concurrency problem? Are there solutions other than Multi-core for Hardware advancement? 回答1: LLVM is several things together - kind of a virtual machine/optimizing compiler, combined with different frontends that take the input in a particular language and output the result in an intermediate

stat() unavailable in ios simulator?

拈花ヽ惹草 提交于 2019-12-31 05:16:12
问题 I've compiled and linked ios app that uses lib (libclang) that uses stat() with no errors. But i'm having runtime error: 2014-07-07 16:55:14.138 LibClangUsage7Demo[74938:60b] started Detected an attempt to call a symbol in system libraries that is not present on the iPhone: stat$INODE64 called from function _ZN4llvm3sys2fs6statusERKNS_5TwineERNS1_11file_statusE in image LibClangUsage7Demo. LLVM code which raises error is (/Unix/Path.inc): error_code status(const Twine &Path, file_status

Lack of autorelease optimization under ARC compiler

久未见 提交于 2019-12-31 03:49:11
问题 I was just wondering, why is there no autorelease pool optimization under the ARC compiler, where it would retain an object in the innermost scope, remove it from the autorelease pool and release once the object is no longer in use? To quote a very impractical example from another question, for(NSUInteger i = 0; i < 10000; i++) { for(NSUInteger j = 0; j < 10000; j++) { NSNumber* n = [NSNumber numberWithUnsignedInteger:j]; //NSLog(@"%@", n); //Disabled this to increase memory bloat faster. } }

Trouble linking against LLVM with project including Flex and Bison

主宰稳场 提交于 2019-12-30 09:39:07
问题 I've been working through a tutorial on writing compilers with Flex, Bison, and LLVM (http://gnuu.org/2009/09/18/writing-your-own-toy-compiler/), and attempting to compile the final binary fails with many of the following "undefined reference" errors: g++ -o parser `llvm-config --libs core jit native --cxxflags --ldflags` *.cpp /tmp/ccl0CSyi.o: In function `NBinaryOperator::codeGen(CodeGenContext&)': codegen.cpp:(.text+0x2ce): undefined reference to `llvm::BinaryOperator::Create(llvm:

Does Xcode 4 have support for AVX?

末鹿安然 提交于 2019-12-30 07:33:42
问题 Before I spend time and money downloading Xcode 4, can anyone tell me whether it comes with a version of gcc (or any other compiler, e.g. LLVM) which supports the AVX instruction set on Sandy Bridge CPUs (i.e. gcc -mavx on mainstream gcc builds) ? I don't seen any public release notes anywhere so it's not easy to check, and I don't really need Xcode 4 yet unless it has AVX support. 回答1: I eventually cracked and downloaded Xcode 4 - it looks like clang is the only compiler that may support AVX

Error when using imshow on OS X

余生长醉 提交于 2019-12-30 05:28:06
问题 I have setup OpenCV2 in XCode but unfortunately imshow does not work: Undefined symbols for architecture x86_64: "cv::imshow(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, cv::_InputArray const&)", referenced from: _main in main.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) I am running OS X 10.8.4 with latest XCode. I have attached a few images below to show the

How can I print to a string in LLVM

╄→гoц情女王★ 提交于 2019-12-30 04:46:05
问题 I want to print an instruction in LLVM to a string instead of the screen. I use I->print( errs() ) to print to the screen. How can I instead put the instruction in a string? 回答1: Like this, std::string str; llvm::raw_string_ostream rso(str); I->print(rso); 来源: https://stackoverflow.com/questions/13515844/how-can-i-print-to-a-string-in-llvm

LLVM out of source pass build: Loadable modules not supported (on Linux)

倾然丶 夕夏残阳落幕 提交于 2019-12-30 04:43:19
问题 I compiled and installed LLVM from trunk on debian wheezy some weeks ago (configure & make) and now tried to out of source compile the llvm-mutate pass. AFAICC, llvm-mutate follows the cmake out of source pass build instructions. When trying to build llvm-mutate mkdir build cd build cmake -DCMAKE_MODULE_PATH=/usr/local/share/llvm/cmake ../ I get: -- Mutate ignored -- Loadable modules not supported on this platform. hmm? opt and the loadable passes (at llvm_trunk/build/Debug+Asserts/lib/xxx.so

Compiler output language - LLVM IR vs C

牧云@^-^@ 提交于 2019-12-30 03:09:08
问题 For writing a compiler, what are the advantages and disadvantages of using LLVM IR vs C for a target language? I know both are used, and I imagine that the final machine code would be similar if I were to use clang to compile the C. So what are other things to consider? 回答1: I've used LLVM IR for a few compiler back ends and have worked with compilers that use C as a back end. One thing that I found that gave the LLVM IR an advantage is that it is typed. It is hard to make completely ill

Why is llvm considered unsuitable for implementing a JIT?

耗尽温柔 提交于 2019-12-29 10:12:57
问题 Many dynamic languages implement (or want to implement) a JIT Compiler in order to speed up their execution times. Inevitably, someone from the peanut gallery asks why they don't use LLVM. The answer is often, "LLVM is unsuitable for building a JIT." (For Example, Armin Rigo's comment here.) Why is LLVM Unsuitable for building a JIT? Note: I know LLVM has its own JIT. If LLVM used to be unsuitable, but now is suitable, please say what changed. I'm not talking about running LLVM Bytecode on