llvm

ld: library not found for -lomp

旧城冷巷雨未停 提交于 2019-12-19 03:37:12
问题 In macOS Sierra, installation for xgboost with openmp enabled always fails. From https://xgboost.readthedocs.io/en/latest/build.html , I've tried: cp make/config.mk ./config.mk; make -j4 With, export CC=/usr/local/Cellar/llvm/4.0.0_1/bin/clang export CXX=/usr/local/Cellar/llvm/4.0.0_1/bin/clang++ export CXX1X=/usr/local/Cellar/llvm/4.0.0_1/bin/clang++ It fails with, clang-4.0clang-4.0: : warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument]warning: argument

Execute LLVM IR code generated from Rust/Python source code

徘徊边缘 提交于 2019-12-19 02:39:18
问题 When I generate LLVM IR Code from C++, I can use the console command clang++ -emit-llvm –S test.cpp to get a test.ll file which is the LLVM IR I want. To get an executable these are the steps to follow: llvm-as test.ll -> gives me the test.bc file. llc test.bc --o test.s -> gives me the test.s file. clang++ test.s -o test.native -> gives me a native file that i can execute. For C++ this works just fine. In theory, should the same steps apply when I write Rust or Python Code? I take my Rust

Warning “Use of GNU statement expression extension”

徘徊边缘 提交于 2019-12-18 19:38:12
问题 I have this Objective-C istruction: NSRange range = NSMakeRange(i, MIN(a, b)); where a and b are NSUInteger s. MIN() is the macro defined in the standard NSObjCRuntime.h header file as: #if !defined(MIN) #define MIN(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __a : __b; }) #endif During the compilation, the LLVM Compiler 4.1 highlights my instruction showing the warning: "Use of GNU statement expression extension". What does this mean? Is it my fault? If yes, how can

Why sometimes 'self' isn't available while debugging with lldb?

我只是一个虾纸丫 提交于 2019-12-18 19:14:07
问题 A lot of time (when it's not every time) I got the following error when I try to print objects on lldb. Is there some build/debug configuration to change or is this an error inside lldb? (lldb) po userLevel error: warning: Stopped in an Objective-C method, but 'self' isn't available; pretending we are in a generic context error: use of undeclared identifier 'userLevel' error: 1 errors parsing expression I build with llvm and do not strip debug symbols. Edit: Here is the backtrace: (lldb) bt *

Difference between LLVM, GCC 4.2 and Apple LLVM compiler 3.1

五迷三道 提交于 2019-12-18 15:33:28
问题 What are the major differences between LLVM GCC 4.2 and Apple LLVM compiler 3.1? I'm fairly new to compilers so any help is appreciated. Also I'm especially interested in how the two compilers could affect game performance. 回答1: The difference is a matter of both technology and speed. CLANG was still young and buggy when Apple began the transition away from GCC's compiler and toolchain, so LLVM was built as a back-end to GCC to facilitate its eventual replacement. So, code went in and was

What is the LLVM version bundled with Xcode?

一个人想着一个人 提交于 2019-12-18 15:06:54
问题 Up to Xcode 6 when typing clang --version we got the information on what LLVM version it was built: Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) But now with Xcode 7 we only get the following: Apple LLVM version 7.0.0 (clang-700.0.72) 回答1: See https://gist.github.com/yamaya/2924292 in which an interesting comment says: Looking at the sources (src/CMakeLists.txt), it appears AppleClang is based on (approximately) the following LLVM branches: clang-700.0.72 => LLVM 3.7.0

Whats is proper version of llvm/clang/xcode?

旧巷老猫 提交于 2019-12-18 13:54:10
问题 This gist mentions that xcode 9 published with 'Apple LLVM version 9.0.0 (clang-900.0.38)', but the last version of llvm in llvm.org is LLVM 5.0.0. What is the relation between them? 回答1: Apple's Xcode ship with LLVM, but it is not the open source version. For example, some clang extra tool won't be installed to you Mac. So at least, Apple has modify CMakeLists.txt . You can read the CMakeLists.txt or Makefile in apple open source. This is only a suggestion, maybe is not helpful. Another:

LLVM. How to access to struct fields based on their names?

安稳与你 提交于 2019-12-18 13:34:42
问题 I have little example code in C++: struct RecordTest { int value1; int value2; }; void test() { RecordTest rt; rt.value1 = 15; rt.value2 = 75; } and LLVM 3.4 IR for it: %struct.RecordTest = type { i32, i32 } ; Function Attrs: nounwind define void @_Z4testv() #0 { entry: %rt = alloca %struct.RecordTest, align 4 %value1 = getelementptr inbounds %struct.RecordTest* %rt, i32 0, i32 0 store i32 15, i32* %value1, align 4 %value2 = getelementptr inbounds %struct.RecordTest* %rt, i32 0, i32 1 store

How to write a custom intermodular pass in LLVM?

邮差的信 提交于 2019-12-18 13:09:02
问题 I've written a standard Analysis pass in LLVM, by extending the FunctionPass class. Everything seems to make sense. Now what I'd like to do is write a couple of intermodular passes, that is, passes that allows me to analyze more than one module at a time. The purpose of one such pass is to construct a call graph of the entire application. The purpose of the other such pass is that I have an idea for an optimization involving function calls and their parameters. I know about interprocedural

How to write a custom intermodular pass in LLVM?

别来无恙 提交于 2019-12-18 13:08:03
问题 I've written a standard Analysis pass in LLVM, by extending the FunctionPass class. Everything seems to make sense. Now what I'd like to do is write a couple of intermodular passes, that is, passes that allows me to analyze more than one module at a time. The purpose of one such pass is to construct a call graph of the entire application. The purpose of the other such pass is that I have an idea for an optimization involving function calls and their parameters. I know about interprocedural