Questions tagged [llc]

llc is the LLVM Static Compiler. Use this tag for questions related to running llc, or problems encountered when using it.

The llc command is part of the compiler infrastructure. It's output is assembly language that can be passed to a native assembler for final code generation.

Use this tag if you have a question about running llc, using llc options, or have a problem when running it.

See the llc documentation for additional information.

41 questions
15
votes
3 answers

No LLC on Windows?

I wanted to play around with LLVM IR and installed latest LLVM v4 (on my Windows PC) but I cannot find llc in the among installed files (looked in 'bin' folder and in all others). Wondering if this tool is not available or maybe it got deprecated or…
Gonzalez
  • 681
  • 1
  • 11
  • 21
11
votes
2 answers

Why does clang/llvm on windows require Visual Studio's Link.exe?

According to LLVM's Getting Started (Windows) site: ... Clang can be used to emit bitcode, directly emit object files or even linked executables using Visual Studio’s link.exe. Why is the use of Link.exe on Windows necessary? And, for that matter,…
Ephemera
  • 8,672
  • 8
  • 44
  • 84
8
votes
2 answers

LLVM as base compiler for different languages

I am new to LLVM compiler and infrastructure. I have the following thought. Clang is the LLVM front end for C/C++, similarly Rustc for Rust programming language. Both can emit the LLVM IR code and the emitted code can be compiled to executable…
Bharadwaj
  • 737
  • 6
  • 26
5
votes
0 answers

llvm no registered targets when building from source

I am using the LLVM c bindings to write a compiler and when I try to create a target from the default target triple (x86_64-pc-windows-msvc), LLVM says there are no registered…
5
votes
2 answers

Recommended way to distribute Halide generated functions?

I am currently experimenting with Halide, the initial tests show quite promising performance improvements. I am now wondering about what is the best strategy to distribute Halide code. Requiring users to install Halide seems like a heavy barrier at…
rodrigob
  • 2,891
  • 3
  • 30
  • 34
4
votes
2 answers

llc has no debug or -view-dag-combine1-dags option

I have llc program installed on my computer via package manager (of course I have LLVM installed, 6.0.0 version). Also, I have it built from sources. What I want is to view DAGs, generated by llvm. But, unfortunately, I don't have any of options…
Nikita Vorobyev
  • 313
  • 2
  • 9
4
votes
1 answer

How to avoid undesired constant folding performed by LLVM's code generator?

What I am trying to achieve is to avoid constant-folding of some constants (which represent addresses in my code) such as the 100000000 constant below. I need this because later the JIT-compiled code might get patched, which changes the constants…
3
votes
0 answers

how to define metadata for @llvm.dbg.declare?

I am trying to use @llvm.dbg.declare to get information about a variable inside llvm code I use the following code: define i32 @main() nounwind ssp { %1 = alloca i32, align 4 %tsi = alloca %struct.timespec, align 8 %tsf = alloca…
user3794683
  • 101
  • 1
  • 4
2
votes
1 answer

LLC Compiler is not recognized as the name of a cmdlet, function, script file, or operable program

Im creating a custom programming language using python, PLY as lexer and parser, and LLVMlite as low level intermediate language to do code generation. I have installed PLY and LLC using Python pip I use LLC to create a object file output.o, and GCC…
lefir
  • 21
  • 1
2
votes
1 answer

Clobber X86 register by modifying LLVM Backend

I am trying to alter a little bit the LLVM Backend for X86 target, to produce some desired behaviour. More specifically, I would like to emulate a flag like gcc's fcall-used-reg option, which instructs the compiler to convert a callee-saved register…
2
votes
0 answers

Is there any way to avoid deletion of duplicate load instruction when compiled using LLVM

I am working on creating LLVM front-end module pass. So, Basically I need to duplicate all load instructions and store in a different register. At -O0 for clang, opt and llc tool, this duplicated load instruction is removed. I looked at the final…
Arjun
  • 133
  • 6
1
vote
0 answers

eBPF Toolchain / compiling ebpf with CMake using clang and llc / two staged build process

I have a bunch of ebpf-programs (using c and libbpf; no BCC/bpftrace) in a folder, let's call them File1.bpf.c, File2.bpf.c, .... Usually, I compile bpf programs with clang and llc, every file by itself: clang -I …
Dennis
  • 150
  • 1
  • 11
1
vote
1 answer

Can LLC -O=3 not omit frame pointers from unoptimized llvm bytecode produced by clang -O0?

I have a simple c code: // main.c #include void foo() { } int main() { return 0; } Output of following command clang -O3 -emit-llvm -c main.c -o main.bc; llc main.bc -o main.S; cat main.S; I get: ... foo: …
Saksham Jain
  • 537
  • 3
  • 14
1
vote
1 answer

llc/clang exact -march target for the current host cpu

I am trying to find a command line option to specify "generate code for this host your are compiling on, it should take advantage of all the CPU features available, and needs not run on any other system" for llvm. I have fairly recent llvm versions…
jlainema
  • 31
  • 4
1
vote
1 answer

How do I use a freshly compiled LLVM tool directly from LLVM source tree?

I am writing a MachineFunctionPass targeting the X86 architecture which results in a modified llc binary. In order to test my modified version of llc I have created a bunch of .c programs whose MIR will be handled by my pass. For the sake of…
peperunas
  • 428
  • 1
  • 6
  • 17
1
2 3