Displaying 20 results from an estimated 6000 matches similar to: "How to generate a .ll file with functions' parameter names"
2019 Dec 08
2
How to generate a .ll file with functions' parameter names
Hi Hideto,
thanks for your answer. Unfortunately I'm still using llvm 6.0 and in
llvm-dis I don't see that option. I tried reading the full list of options
but I didn't see an alternative.
Do you have any suggestions?
Thanks
Alberto
Il giorno dom 8 dic 2019 alle ore 08:50 Hideto Ueno <
uenoku.tokotoko at gmail.com> ha scritto:
> Hi Alberto,
>
> Variable names in LLVM
2019 Feb 25
3
Why is there still ineffective code after -o3 optimization?
Hi,
I have some IR module from random generation (mostly ineffective
instructions).
It has a function with void return, and two function arguments where one
is a reference.
Therefore, I expect every instruction not altering the value at the 2nd
arguments address should be ineffective.
Here is the function definition (see below for full ll):
define void @_Z27entityMainDataInputCallbackdRd(double
2019 Jan 19
2
What does "preds" mean in a .ll file?
Hi,
I see things like this. What does it mean? Is it documented somewhere? Thanks.
; preds = %for.body
https://llvm.org/docs/LangRef.html
; <label>:91: ; preds = %88
%92 = load i8**, i8*** @glob_complete_word.matches, align 8, !dbg !99798
%93 = load i32, i32* @glob_complete_word.ind, align 4, !dbg !99799
%94 = sext i32 %93 to i64, !dbg !99798
2020 May 31
2
LLC crash while handling DEBUG info
Hi-
Here is the simple C++ function:
-----------
void foo() {
}
-----------
Let's say, above function is compiled to generate LLVM IR with -g flag
using the command line `clang++ -g -O0 -S -emit-llvm foo.cpp`, we get
below IR
-----------
; ModuleID = 'foo.cpp'
source_filename = "foo.cpp"
target datalayout =
2019 Aug 31
3
Usage of the jumptable attribute
Hello everyone,
I'm new to LLVM (which is a really great project by the way) and I hope
this is the right place for my question.
In the LLVM Language Reference Manual I found the "jumptable" function
attribute, which seems to be exactly what I need for my project (where I
want to add one level of indirection to every function call), but I have
trouble figuring out, how to use
2017 Oct 12
2
[GlobalISel] [X86] unable to legalize instruction
Thanks for your quick reply.
Here its is:
===========
; ModuleID = 'simple_foo.c'
source_filename = "simple_foo.c"
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.13.0"
; Function Attrs: noinline nounwind optnone ssp uwtable
define i32 @foo(i32 %a, i32 %b, i32 %c) #0 {
entry:
%retval = alloca i32, align
2019 Apr 07
2
GVN-Hoist test case not working
Hello,
I was trying a basic example on LLVM GVN Hoist and output differs from what
I expect. Am I missing something ?
*Code* :
int main()
{
int x = 7;
int a = 0;
if(a == 7){
x = 1;
a = 8 * x;
} else {
x = 1;
a = 2 * x;
}
return 0;
}
*Commands* :
clang-8 -O0 -S -emit-llvm test.c
opt-8 -gvn-hoist -S < test.ll
*Output :*
; ModuleID = '<stdin>'
source_filename =
2019 Jul 08
4
What can cause llc to throw an error for instruction numbering?
Hi Tim,
Thank you for that. I was just trying to replicate the branch instruction under a new opcode, so I don’t think that returns a value. Plus the code I was testing out didn’t have a br or my newly added instruction but it still threw that error at me. Here’s the IR code I tested:
; ModuleID = ‘cc.c’
source_filename = “cc.c”
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128”
2020 May 31
2
LLC crash while handling DEBUG info
Hi David
If you look at line
https://github.com/llvm/llvm-project/blob/master/llvm/lib/IR/Verifier.cpp#L1160
there is IR verification which asserts that only in case of `spFlags
= DISPFlagDefinition`, the compilation unit (`unit` field) should be
present. Otherwise, it should *not* be present. In the crash case,
`spFlags = DISPFlagOptimized`. So, I guess, `unit` field should *not* be
present,
2017 Oct 12
1
[GlobalISel] [X86] unable to legalize instruction
I believe if you pass(iirc) -pass-remarks-missed=“gisel-*”, it’ll print the instruction it failed to legalize.
Sent from my iPhone
> On Oct 11, 2017, at 6:44 PM, S. Bharadwaj Yadavalli via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> Thanks for your quick reply.
>
> Here its is:
>
> ===========
>
> ; ModuleID = 'simple_foo.c'
> source_filename
2017 Oct 25
3
LLVM v6.0 Internalize and GlobalDCE PASS can not work together?
Hi LLVM developers,
$ cat hello.c
#include <stdio.h>
void foo() {
}
int main(int argc, char *argv[]) {
for (int i = 0; i < 10; i++) {
printf("%d\n", i);
}
return 0;
}
$ /opt/llvm-svn/bin/clang --version
Fedora clang version 6.0.0 (trunk 316308) (based on LLVM 6.0.0svn)
Target: x86_64-redhat-linux
Thread model: posix
InstalledDir: /opt/llvm-svn/bin
$
2020 May 31
2
LLC crash while handling DEBUG info
I am bit confused - `unit` must be present for definitions, and `optimized `
is also a `definition`, so, `unit` must be present for `optimized ` too. Am
I right?
Mahesha
On Sun, May 31, 2020 at 10:14 PM David Blaikie <dblaikie at gmail.com> wrote:
> definition and optimized are orthogonal (a function could be both, or
> neither) - one says this DISubprogram describes a function
2018 Apr 26
2
windows ABI problem with i128?
I'm trying to use LLVM to create compiler-rt.o on Windows. I use this
command from the compiler-rt project:
[nix-shell:~/downloads/llvm-project/compiler-rt]$ clang -nostdlib -S
-emit-llvm lib/builtins/udivti3.c -g -target x86_64-windows
-DCRT_HAS_128BIT
The resulting LLVM IR is:
=================================================================
; ModuleID = 'lib/builtins/udivti3.c'
2017 Oct 26
2
LLVM v6.0 Internalize and GlobalDCE PASS can not work together?
Hi Hal,
Thanks for your hint!
$ /opt/llvm-svn/bin/opt -S -internalize
-internalize-public-api-list=main -globaldce hello3.ll -o
hello3.dce.ll it works :)
But I argue that `main` Function should be inserted into ExternalNames
by default:
Index: lib/Transforms/IPO/Internalize.cpp
===================================================================
--- lib/Transforms/IPO/Internalize.cpp
2020 Jun 01
2
LLC crash while handling DEBUG info
Let's forget about my malformed IR if it is adding additional confusion
here. I mentioned it here to ease the conversation, but if it is causing
confusion rather than making the discussion flow easier, then we better
ignore it.
The whole triggering point for this email initiative is - one of the
applications is crashing with the stack trace that I mentioned earlier. The
crash is during the
2019 Jul 08
2
What can cause llc to throw an error for instruction numbering?
I duplicated an instruction in llvm and changed its opcode by following the guide at https://llvm.org/docs/ExtendingLLVM.html (Adding a new instruction) and then fixed the dependencies that caused an error when building. Now the modified llvm builds but throws but now throws the error:
llc: error: llc: check.ll:12:3: error: instruction expected to be numbered '%5'
%4 = alloca i32, align
2018 Apr 26
0
windows ABI problem with i128?
Most probably you need to properly specify the calling convention the
backend is using for calling the runtime functions. Or implement the
stub for udivti3 that performs the necessary argument lifting.
I guess there is no standard ABI document describing the intended
calling convention here, so I'd just do what mingw64 does here and
make everything here compatible.
On Thu, Apr 26, 2018 at
2018 Dec 06
2
Source locations missing when using xray-account
Hi David,
Sorry for taking a few days to reply. It's not easy for you to compile
a Haskell file to see the problem as the debug information is still
WIP. Below I prove the IR for a simple hello world program which you
can feed into llc.
https://gist.github.com/05296933e37e87533a51d493b46aa48d
The `out.ir` file can be passed straight to `llc`.
Can you see anything obviously wrong?
Matt
2018 Apr 26
1
windows ABI problem with i128?
On Thu, Apr 26, 2018 at 3:44 AM, Anton Korobeynikov <anton at korobeynikov.info
> wrote:
> Most probably you need to properly specify the calling convention the
> backend is using for calling the runtime functions.
Thanks for the tip. Can you be more specific? Are you suggesting there is
some config parameter I can set before running TargetMachineEmitToFile?
Do you know what
2019 Jan 20
3
(no subject)
Hi all,
I have the following C code:
#include<stdio.h>
int main(int argc, char *argv[]) {
printf("%s\n", argv[0]);
return argc;
}
that generates the following IR for the main function:
; Function Attrs: noinline nounwind optnone uwtable
define i32 @main(i32, i8**) #0 {
%3 = alloca i32, align 4
%4 = alloca i32, align 4
%5 = alloca i8**, align 8
store i32 0, i32*