Displaying 20 results from an estimated 11000 matches similar to: "How does LLVM know where to resolve declared only functions?"
2019 Jan 27
2
How does LLVM know where to resolve declared only functions?
> It's the linkers job to hook together functions and definitions that end up in the same binary. Your OS will then hook in functions from other binaries when your executable is loaded into memory.
How does it know whether it is a system function or a user-defined function?
It seems that user functions have higher priorities over system
functions as demonstrated by the following example.
2019 Jan 18
2
Is it possible to generate the IR representation with the original macro information?
Hi,
I use the following commands to compile the IR. But I don't see the
macro information in the .ll file. Is there a way to preserve the
macro information (print() in this case) for debugging purposes?
$ clang -std=gnu99 -g3 -flto -Wall -pedantic -c -o main.o main.c
$ clang main.o -flto -fuse-ld=gold '-Wl,-plugin-opt=save-temps' -o main.exe
$ llvm-dis main.exe.0.0.preopt.bc
/* vim:
2010 Feb 03
3
How to flatten a tree (based on list) to a certain depth?
Suppose that I have the following list of lists of frames 'root'
(let's call it a 'tree' of frames). I want to flatten it to be a list
of frames. However, if I unlist(root), it will flatten the frames as
well. Is there a simply way to flatten the tree to certain depth?
aframe1=data.frame(x=1:3,y=1:3)
aframe2=data.frame(u=7:9,v=11:13)
aframe3=data.frame(p=3:5,q=6:8)
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
2009 May 25
4
Crash with core32 (syslinux-3.81-pre12-68-g4a211f6)
I got a qemu crash and errors reported in bochs while trying to get latest core32
branch working (pxelinux):
qemu: fatal: Trying to execute code outside RAM or ROM at 0xe6e8aa07
EAX=6e0c7811 EBX=000034b3 ECX=ca68b338 EDX=00000048
ESI=750e3fff EDI=00000020 EBP=d07e4988 ESP=00102324
EIP=e6e8aa07 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0028 00000000 ffffffff 00cf9300
CS =0020
2016 Oct 18
2
Why stdin is required to be overwritten in SSH?
Hi SSH,
I have put the ssh command in `script.sh`, with the code:
~~~
#!/usr/bin/env bash
ssh -q server date
~~~
And I have one `main.sh` to call `script.sh` as below.
~~~
#!/usr/bin/env bash
# vim: set noexpandtab tabstop=2:
while read -r run
do
./script.sh
done < <(seq 10)
~~~
The `script.sh` can be called only once, say
~~~
$ ./main.sh
Tue Oct 18 12:26:05 CDT 2016
~~~
But 10 runs
2018 Mar 27
2
IRMover asserts "mapping to a source type" when repeatedly linking - usage or LLVM bug?
Hi,
On 2018-03-26 16:44:05 -0700, Duncan P. N. Exon Smith wrote:
> > The second approach is to *not* cache modules but re-read them from disk
> > (or memory, but that's irrelevant here). That works without any sort of
> > asserts, but "leaks" memory because everytime a module is re-read from
> > disk it re-creates types (cf
2009 Jun 01
1
error on implementing printf
hello, all.
here is my implementation of printf for use in syslinux core.
#include <stdio.h>
#include <unistd.h>
#define BUF_SIZE 1024
char buf[BUF_SIZE];
extern void myputs(const char *);
int printf(const char *format, ...)
{
va_list ap;
int rv;
#if 1
myputs("DEBUG:the string we want fomart is\n\r");
myputs(format);
#endif
va_start(ap, format);
2018 Mar 27
0
IRMover asserts "mapping to a source type" when repeatedly linking - usage or LLVM bug?
> On Mar 26, 2018, at 17:09, Andres Freund <andres at anarazel.de> wrote:
>
> Hi,
>
> On 2018-03-26 16:44:05 -0700, Duncan P. N. Exon Smith wrote:
>>> The second approach is to *not* cache modules but re-read them from disk
>>> (or memory, but that's irrelevant here). That works without any sort of
>>> asserts, but "leaks" memory
2018 Mar 23
2
IRMover asserts "mapping to a source type" when repeatedly linking - usage or LLVM bug?
Hi,
(sorry if the CC's are inappropriate, they seemed relevant based on a
git log of IRMover.cpp)
I'm using LLVM to implement Just-in-Time compilation for PostgreSQL. One
part of that is doing inlining of operators. For that I'm using bitcode
pre-generated using clang.
The current code uses a single LLVMContext & Orc to generate the
code. That largely workes well. But inlining
2018 Mar 26
0
IRMover asserts "mapping to a source type" when repeatedly linking - usage or LLVM bug?
> On Mar 23, 2018, at 16:11, Andres Freund via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> Hi,
>
> (sorry if the CC's are inappropriate, they seemed relevant based on a
> git log of IRMover.cpp)
>
> I'm using LLVM to implement Just-in-Time compilation for PostgreSQL. One
> part of that is doing inlining of operators. For that I'm using bitcode
2019 Jan 22
2
Must string literals be declared as a global variable in LLVM IR?
Hi,
#include <stdio.h>
int main(int argc, char *argv[]) {
puts("Hello World!");
return 0;
}
The above C code is converted to the following IR code. The string
literal "Hello World!" is defined as an unnamed global constant.
Does the IR language support the declaration of local values to store
the string literal? I don't this is supported as I am reading
2013 Nov 26
3
[PATCH] Remove versioning information
The versioning information is confusing for end-users. The numbers
are stuck at 1.5.0 when the tools have moved to 1.8.3.
I suggest removing the versioning system in the kernel altogether
and let the kernel version be the guide to debug issues. However, if
you think versioning is still required, please state the reason and
modify the version string in the ver.* files to reflect the uptodate
2019 Jan 26
3
How to debug .ll file with segmentation fault?
Could you give specific pointers to the resources that are relevant to
segmentation fault debugging? This kind of bug is the hardest to bebug
because the error message has nothing to do with the actual bug.
Generic advices without consideration of specific properties of the problem
will surely end up inefficient debugging.
What I added to the .ll file in this case are just function calls to
2011 Apr 16
1
[LLVMdev] [Fwd: Re: [Fwd: Regarding Inter Procedural Constant Propagation]]
Hi,
I used the following commands on the program attached below:
llvm-gcc --emit-llvm main.c -c -o main.bc
opt -ipconstprop main.bc -o main1.bc
diff main.bc main1.bc
no difference was o/p :(
The Program Segment is as shown below:
#include <stdio.h>
void f1(int a)
{
a=a+1;
printf("%d",a);
}
void f2()
{
int b;
b=1;
f1(b);
}
int main()
{
int
2019 Jan 26
2
How to debug .ll file with segmentation fault?
Hi,
I edited a working .ll file and llvm-as it to a .bc file. But it
causes segmentation fault. I don't know how to debug such errors.
Could anybody show me the best way to debug such errors? Thanks.
$ TRACE_OUTFILE=/tmp/trace.txt lli /tmp/y/bash_trcr.bc --norc
__trace_init
LLVMSymbolizer: error reading file: No such file or directory
#0 0x00007f162b1ee0ea
2006 Mar 02
1
minor oddity in pdf() help page
The following paragraph from ?pdf struck me as a bit odd:
'pdf' writes uncompressed PDF. It is primarily intended for
producing PDF graphics for inclusion in other documents, and
PDF-includers such as 'pdftex' are usually able to handle
compression.
Should that be "...and PDF-includers such as 'pdftex' are usually _un_able to
handle
2016 May 17
2
How to debug if LTO generate wrong code?
> On May 17, 2016, at 1:33 AM, Shi, Steven via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> Hello,
> Let me ask a LTO simple question again. For the llvm LTO example in the link:http://llvm.org/docs/LinkTimeOptimization.html <http://llvm.org/docs/LinkTimeOptimization.html>, I use below build commands to generate three different optimization level binary: -O0, -O1, -O2.
2012 Dec 18
2
[LLVMdev] Getting rid of tabs in LLVM's assembly output?
On Tue, Dec 18, 2012 at 1:09 PM, Craig Topper <craig.topper at gmail.com> wrote:
> But its pretty easy to change the tabstop within the editor to make it
> readable.
>
True, in this case... The output is not trying to be intelligent in
the general case, just spitting out tabs. I agree that to replace
this, however, it would be best to look at some smart column-padded
formatting
2016 May 16
2
How to debug if LTO generate wrong code?
Hi Umesh,
Thank you for the suggestion. I can use the "Brute force method " to narrow down the LTO wrong instructions here and there, but I still don't know why these wrong instructions are generated, and how to let Clang LTO don't generate those wrong instructions.
I suspect the wrong code is caused by some LTO wrong optimization pass, so I hope to disable all optimizations in