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
0
votes
1 answer

Dot file not genearting for -view-isel-dags option

While trying to see the SelectionDag nodes generated during the instruction selection phase using LLVM (built from sources with debug mode enabled), I am using the below command which is not creating Graphviz DOT file. llc -view-isel-dags…
harry
  • 970
  • 6
  • 25
0
votes
0 answers

LLVM with op & ld - linking error

I am trying to familiarize myself with LLVM & clang for a project, where I will work with different optimizations. Therefore I need to interact with LLVM not only via clang, but use opt & llc. Now I am failing at linking of a very basic example with…
MartinM
  • 129
  • 1
  • 8
0
votes
1 answer

Understanding llvm-ir to assembly for x86_64-unknown-linux-gnu

I transform the following llvm-IR ; Function Attrs: noinline norecurse nounwind uwtable define i32 @main() #0{ entry: %sub = sub nsw i32 5, 3 %cmp = icmp slt i32 %sub, 3 br i1 %cmp, label %if.then, label %if.else if.then: …
lupin
  • 173
  • 5
  • 19
0
votes
1 answer

llc: unsupported relocation on symbol

Problem llc is giving me the following error: LLVM ERROR: unsupported relocation on symbol Detailed compilation flow I am implementing an LLVM frontend for a middle-level IR (MIR) of a compiler, and after I convert various methods to many bitcode…
Paschalis
  • 11,929
  • 9
  • 52
  • 82
0
votes
2 answers

How to generate LLVM api code via IR code, in current versions?

I am trying to generate LLVM API code that can regenerate IR code that is fed into it. As i discovered via various questions such as this question it was at some point possible to do the following to achieve this goal: clang++ -S -O0 -emit-llvm…
Jemar Jones
  • 1,491
  • 2
  • 21
  • 27
0
votes
1 answer

what are the args that are being passed from clang to llc?

I am working on the llvm project. Recently I tryed to compiler one of my .c files using clang command line into an .s file by using the next command: clang --target=arch -S -O0 select.c -o select.s and it crashed in the backend in the function…
yehudahs
  • 2,488
  • 8
  • 34
  • 54
0
votes
1 answer

Broken module error in llc when compiling manually edited IR file

I tried to insert line 35 and line 36 into the code, but an error happened when I tried to use llc to generate an .o file. 35 %12 = ptrtoint i32* %1 to i64 36 call void @__Storemy(i32 10, i64 %12) 37 store i32 %10, i32* %1 38 br label…
valiant wang
  • 75
  • 10
0
votes
1 answer

llc -view-*-dags foo.ll not working in ubuntu

I have installed LLVM3.6 on my Ubuntu 14.04 machine. I have also set the path for LLVM_PATH_DOT=/usr/bin/dot and later on LLVM_PATH_DOT=/usr/bin/dotty. I also tried to check LLVM_ENABLE_DOXYGEN during CMake configuration, and gave the path for…
ConsistentProgrammer
  • 1,294
  • 10
  • 14
0
votes
2 answers

What is a "move" opcode in LLVM IR?

I am a newbie to LLVM IR, and I am trying to simulate some x86 instructions in LLVM IR. Here is a simple case: move %eax, %ebx However, I didn't find any corresponding mov opcode after looking at the materials at here and here. So my question is…
lllllllllllll
  • 8,519
  • 9
  • 45
  • 80
-1
votes
1 answer

OSX - Compile to WebAssembly with llc "llc: : error: unable to get target for 'wasm32', see --version and --triple."

I'm running on OSX and trying to compile following c code to webAssembly: void test(){ //do stuff } I've looked at this example and tried running the following commands: clang -emit-llvm --target=wasm32 -Oz test.c -c -o test.bc llc…
Shlomi Schwartz
  • 8,693
  • 29
  • 109
  • 186
-2
votes
1 answer

Why is LLC.exe missing in LLVM windows?

I've been trying to use emscripten to build C into WASM and Javascript. Emscripten requires clang so I installed it but then it says "emcc: error: llc executable not found at C:\Program Files\LLVM\bin\llc.exe" when running emcc and em++. Is there a…
1 2
3