similar to: [LLVMdev] LLVM Basic Program Compilation

Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] LLVM Basic Program Compilation"

2014 Aug 01
2
[LLVMdev] LLVM Basic Program Compilation
I am just getting started with llvm. Here's code I am trying to compile: #include <stdio.h>#include "llvm/IR/LLVMContext.h"#include "llvm/IR/Module.h"#include "llvm/IR/IRBuilder.h" int main(){ llvm::LLVMContext& context = llvm::getGlobalContext(); llvm::Module* module = new llvm::Module("top", context); llvm::IRBuilder<>
2014 Sep 09
2
[LLVMdev] Machine Code for different architectures
How does LLVM generate machine code for different architectures? For example, the machine code for x86 and amd will vary. How does LLVM convert its IR to machine code for different architectures.Can you please explain the approach? Is it just write two different programs for two different architectures and pass a flag to the compiler based on which machine code you want to generate? Thanks a lot
2014 Aug 02
2
[LLVMdev] LLVM Basic Program Compilation
Thank you Chris. I am using llvm-3.4.2. I am facing the same issue when using clang++ as well. $ clang++ try.cpp -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS `llvm-config --cxxflags --ldflags --libs` -S -emit-llvm gives me errors $clang++ try.cpp -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -S -emit-llvm $ lli try.s gives me Program used external function
2014 Sep 09
3
[LLVMdev] Machine Code for different architectures
Hi Johnny, Thanks for this - particularly the tip about cfe-dev. I'm currently trying to coerce lldb to debug these type of architectures (our current toolchain already outputs good dwarf info). However, I'm struggling since lldb has just assumes that the size of a byte is universally 8-bits. At some stage, I *think* at some stage we'd like to derive a compiler, from the "same
2014 Sep 09
2
[LLVMdev] Machine Code for different architectures
Hi, We have some DSP architectures (kalimba) which have 24-bits as their "minimum addressable unit". So this means that the sizeof a char (and an int and a short for that matter) is 24-bits. I quickly read the posted link WritingAnLLVMBackend.html but did not see an obvious answer to the following question: Is it possible to write a backend that faithfully represents these
2014 Aug 04
3
[LLVMdev] LLVM AllocaInst and StoreInst
Hi, I am trying to write a simple interpreter. I am trying to generate LLVM IR for assignment operation. The code for the generation part looks like this llvm::Value* codeGenSymTab(llvm::LLVMContext& context) { > printf("\n CodeGen SymTab \n"); > Value *num = ConstantInt::get(Type::getInt64Ty(context), aTable.value, > true); > Value *alloc = new
2014 Sep 10
2
[LLVMdev] Machine Code for different architectures
Hi Patrik, Thanks for this note. It's encouraging to read there has been some provision made for non-8-bit bytes. I'm not a compiler/backend expert, (although maybe I'll need to be soon!), so I won't look at the patches right now, however may at some stage in the future myself or colleague may request these patches from yourself. Yes, our 24-bit architectures have non-power-of-2
2014 Aug 07
2
[LLVMdev] Advantages of LLVM Optimization
Hi, I am planning to use LLVM in my compiler dev project. I would like to know what power LLVM code optimization phase provides to my code ? I had a look at http://llvm.org/docs/Passes.html which describes the optimization passes. >From a newbie standpoint can you please explain the power of LLVM optimization? Thank you, Prakash -------------- next part -------------- An HTML attachment was
2014 Sep 03
2
[LLVMdev] Convert C code with external library access to llvm
Hi, I have written a c program which accesses sqlite database. Normally I compile the program as $ clang insertselect.c -l sqlite3 To emit-llvm I use: > $ clang insertselect.c -S -emit-llvm How do I link the sqlite3 library so that llvm can generate IR with the IR being linked to the external library? Thanks for your help? Thanks Prakash -------------- next part -------------- An
2010 Apr 10
3
[LLVMdev] darwin dragon-egg build issues
Is anyone building dragon-egg on darwin? I am trying to build against the fink gcc45 package that I have prepared for darwin and a updated fink llvm 2.7 package that is built as... ../llvm-2.7/configure --prefix=/sw --prefix=/sw/lib/llvm --mandir=/sw/share/man --infodir=/sw/share/info --with-gmp=/sw --with-libiconv-prefix=/usr --with-system-zlib --with-as=/Developer/usr/bin/as
2015 Oct 06
2
Extra space in LLVM_DEFINITIONS causes CMake 3.1 to fail
LLVM_DEFINITIONS used to be defined as set(LLVM_DEFINITIONS "-D__STDC_LIMIT_MACROS" "-D__STDC_CONSTANT_MACROS") Now it is defined as set(LLVM_DEFINITIONS " -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS") (note that it is no longer a cmake list but a string, and the string contains a leading space!) This causes CMake 3.1 to emit g++ -D
2011 Apr 08
4
[LLVMdev] dragonegg build failure
> Is there anything I can do to make the build more verbose so I can debug this? make VERBOSE=1
2009 Mar 04
2
[LLVMdev] Fwd: PPC Nightly Build Result
Something last night broke the build on Darwin PPC. Possible Gabor's check-in? -bw Begin forwarded message: > From: admin at spang.apple.com (admin) > Date: March 4, 2009 3:56:10 AM PST > To: wendling at apple.com > Subject: PPC Nightly Build Result > > /Volumes/SandBox/NightlyTest/llvmgcc42.roots/llvmgcc42~obj/obj- > powerpc-powerpc/./prev-gcc/xgcc
2015 Oct 06
2
Extra space in LLVM_DEFINITIONS causes CMake 3.1 to fail
I made this change (not specifically changing from a list to a string, but changing from a hardcoded value to the value that was actually decided by cmake), and I checked that it works with cmake 2.8.12.2 which is the minimum version set in CMakeLists.txt. So if it doesn’t work with cmake 3.1/3.2 then that looks like something new that was introduced after 2.8.12.2. I’ll have a look at this
2009 Mar 05
0
[LLVMdev] Fwd: PPC Nightly Build Result
Hi Bill, this might be a latent bug related to PPC. I have no such machine to access atm., but I shall be able to reproduce the problem when back at home. (In about 4 hours). I keep you informed. Cheers, Gabor On Mar 4, 7:57 pm, Bill Wendling <wendl... at apple.com> wrote: > Something last night broke the build on Darwin PPC. Possible Gabor's   > check-in? > > -bw
2017 Nov 26
5
Compilation issue "unsupported relocation on symbol" with clang 3.7.1
Hi List, I'm trying to build llvm-5.0.0 with clang-3.7.1 on ARM (native building). At some point I have the following issue : ---- [1588/5024] Building C object projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins-arm.dir/cpu_model.c.o ../projects/compiler-rt/lib/builtins/cpu_model.c:596:7: warning: ISO C requires a translation unit to contain at least one declaration
2009 May 27
2
[LLVMdev] CMake build maturity
Paul Melis <llvm at assumetheposition.nl> writes: > It seems that the llvm-config generated when building through CMake does > not contain -lpthread on my 32-bit Core2Duo Gentoo Linux system (even > though I configured with LLVM_ENABLE_PTHREADS). I get missing symbols > during linking of e.g. the JIT tutorial code: [snip] This should be fixed now. Now about this one: >
2012 Dec 07
2
[LLVMdev] dragonegg now requires clang
Duncan, I am unable to complile dragonegg 3.2 with FSF gcc 4.7 due the the compiler errors... GCC=/sw/lib/gcc4.7/bin/gcc-4 LLVM_CONFIG=/sw/opt/llvm-3.2/bin/llvm-config VERBOSE=1 ENABLE_LLVM_PLUGINS=1 make CPPFLAGS="-g -DENABLE_LTO -I/sw/include" /sw/lib/gcc4.7/bin/gcc-4 --version > /dev/null /sw/opt/llvm-3.2/bin/llvm-config --version > /dev/null Compiling utils/TargetInfo.cpp
2020 Apr 23
3
Cannot build master
I am nuilding that now. CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=$HOME/opt/llvm11-git \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=ON \ -DLLVM_ENABLE_EH=ON \ -DLLVM_ENABLE_RTTI=ON \ -DLLVM_HOST_TRIPLE=x86_64-pc-linux-gnu \ -DLLVM_TARGETS_TO_BUILD="AMDGPU;MSP430;WebAssembly;X86" \
2015 Jul 30
2
[LLVMdev] Ideas for making llvm-config --cxxflags more useful
Hi, My understanding of llvm-config --cxxflags is that it is supposed to report which flags are necessary to compile a program that will include LLVM's headers and link against its libraries. What it currently reports is all of the flags which were used to compile LLVM. This is not very useful, because users are required in most cases to filter out flags they don't want. I would like