Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] Simple question"
2013 Mar 16
3
[LLVMdev] Simple question
On Mar 15, 2013 10:53 PM, "Óscar Fuentes" <ofv at wanadoo.es> wrote:
>
> James Courtier-Dutton <james.dutton at gmail.com> writes:
>
> > I think this is a very simple question, and it must just be missing
something.
> >
> > I am looking for find out how to assign a constant integer value to
> > the variable in llvm ir.
> >
> > The
2013 Mar 15
0
[LLVMdev] Simple question
James Courtier-Dutton <james.dutton at gmail.com> writes:
> I think this is a very simple question, and it must just be missing something.
>
> I am looking for find out how to assign a constant integer value to
> the variable in llvm ir.
>
> The following returns 12, and %var2 = 12.
> ; ModuleID = 't.c'
> target datalayout =
>
2013 Mar 15
0
[LLVMdev] Simple question
On Mar 15, 2013, at 3:08 PM, James Courtier-Dutton <james.dutton at gmail.com> wrote:
> Hi,
>
> I think this is a very simple question, and it must just be missing something.
>
> I am looking for find out how to assign a constant integer value to
> the variable in llvm ir.
>
> The following returns 12, and %var2 = 12.
> ; ModuleID = 't.c'
> target
2011 Nov 25
5
[LLVMdev] Where does LLVM mangle characters from llvm-ir names while generating native code?
So I was taking a look at Microsoft C++ ABI support while on vacation,
and ran into a major issue. Given the following llvm-ir:
$ clang++ -S -emit-llvm -O3 mangling.cpp -o - -Xclang -cxx-abi -Xclang microsoft
; ModuleID = 'mangling.cpp'
target datalayout =
"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f80:128:128-v64:64:64-
2011 Nov 25
2
[LLVMdev] Where does LLVM mangle characters from llvm-ir names while generating native code?
In the case I posted I had removed that line, however, you still get the __3F_ in the generated assembly with it.
Sent from my iPhone
On Nov 25, 2011, at 2:15 PM, Charles Davis <cdavis at mymail.mines.edu> wrote:
>
> On Nov 25, 2011, at 8:39 AM, Michael Spencer wrote:
>
>> So I was taking a look at Microsoft C++ ABI support while on vacation,
>> and ran into a major
2013 Oct 27
2
[LLVMdev] Missed optimization opportunity with piecewise load shift-or'd together?
The following piece of IR is a fixed point for opt -std-compile-opts/-O3:
---
target datalayout =
"e-p:64:64:64-S128-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f16:16:16-f32:32:32-f64:64:64-f128:128:128-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: nounwind readonly
define i32 @get32Bits(i8*
2012 Apr 10
3
[LLVMdev] How to explain this weird phenomenon????????
I did it !!!!
YOU MADE MY DAY !!!!!!!!!!!!!!!
--
祝好!
甄凯
------------------------------------------------------------------------------------------------------
2012-04-10
------------------------------------------------------------------------------------------------------
Name: 甄凯(ZhenKai)
Homepage:http://www.renren.com/262729393
Email: zhenkaixd at 126.com or 846227103 at
2011 Nov 25
0
[LLVMdev] Where does LLVM mangle characters from llvm-ir names while generating native code?
On Nov 25, 2011, at 8:39 AM, Michael Spencer wrote:
> So I was taking a look at Microsoft C++ ABI support while on vacation,
> and ran into a major issue. Given the following llvm-ir:
>
> $ clang++ -S -emit-llvm -O3 mangling.cpp -o - -Xclang -cxx-abi -Xclang microsoft
> ; ModuleID = 'mangling.cpp'
> target datalayout =
>
2013 Sep 05
2
[LLVMdev] Optimisation pass to move an alloca'd array to a global constant array
Hi All,
I was wondering if there is an optimisation pass that moves a stack
allocated array, initialised with constant values, to a global constant
array.
And if there is such a pass, what requirements are there for it to operate?
My optimised IR is below. As you can see an array of 5 integers is
created with alloca, then each element is stored to in turn. It would
be nice if this array was
2012 Feb 02
3
[LLVMdev] Why extra 4 bytes on stack ???
Hi There ,
Again ,I'm newbie to LLVM and please pardon me ..if you guys feel that
,the below question is very basic :)
Here i go ,compiled the below sample with clang i.e *clang enum.c -S
-emit-llvm* and there respective file are
$ cat enum.c
int main()
{
enum type{one=1,two,three} s;
s = one;
return s;
}
$ cat enum.s
; ModuleID = 'enum.c'
target datalayout =
2011 Nov 25
0
[LLVMdev] Where does LLVM mangle characters from llvm-ir names while generating native code?
On Nov 25, 2011, at 2:22 PM, bigcheesegs at gmail.com wrote:
> In the case I posted I had removed that line, however, you still get the __3F_ in the generated assembly with it.
Huh. It only seems to happen with a Windows triple or a Linux triple. Doesn't happen with a Mac triple, though--probably because the Darwin assembler supports quoted symbols (i.e. you can enclose an identifier in
2012 Apr 10
0
[LLVMdev] How to explain this weird phenomenon????????
Hi, my friends
I finally insert the callInst into the hello.bc file.Then I compile the hello.bc to hello.o file and the check.c to check.o file. And I think by link those to .o file togetherI can get the executable ELF file(clang hello.o check.o -o finalfile).
But when I link the two objective file, it said
"hello.o: In function `main':
hello.bc:(.text+0x69): undefined reference to
2012 Feb 02
0
[LLVMdev] Why extra 4 bytes on stack ???
On Thu, Feb 2, 2012 at 12:25 PM, Umesh Kalappa <umesh.kalappa0 at gmail.com> wrote:
> Hi There ,
>
> Again ,I'm newbie to LLVM and please pardon me ..if you guys feel that
> ,the below question is very basic :)
>
> Here i go ,compiled the below sample with clang i.e clang enum.c -S
> -emit-llvm and there respective file are
>
> $ cat enum.c
> int main()
2013 Feb 01
2
[LLVMdev] Question about compilation result - taking address of input array member
Hello,
I'm playing around with some LEA-related code generation on x86-64
(trunk LLVM & Clang), and I run into a case I don't understand:
$ cat takeaddr.c
int* bar(int table[10]) {
return &table[2];
}
$ clang -cc1 -emit-llvm takeaddr.c
$ cat takeaddr.ll
; ModuleID = 'takeaddr.c'
target datalayout =
2012 Apr 10
1
[LLVMdev] How to explain this weird phenomenon????????
Your files do not appear to implement the check() function.
On Tue, Apr 10, 2012 at 4:57 PM, 15102925731 <zhenkaixd at 126.com> wrote:
> Hi, my friends
>
> I finally insert the callInst into the hello.bc file.Then I compile the
> hello.bc to hello.o file and the check.c to check.o file. And I think by
> link those to .o file togetherI can get the executable ELF file(clang
2013 Jun 17
2
[LLVMdev] Failure handling half type
Hi,
if I write the following simple program:
target datalayout =
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
define void @foo () {
%1 = alloca half
store half 0xH42CC, half* %1 ; 0xH42CC = 3.4
%2 = load half* %1
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
$
2013 Jan 18
2
[LLVMdev] Weird volatile propagation ?
Hi All,
Using clang+llvm at head, I noticed a weird behaviour with the following
reduced testcase :
$ cat test.c
#include <stdint.h>
struct R {
uint16_t a;
uint16_t b;
};
volatile struct R * const addr = (volatile struct R *) 416;
void test(uint16_t a)
{
struct R r = { a, 1 };
*addr = r;
}
$ clang -O2 -o - -emit-llvm -S -c test.c
; ModuleID = 'test.c'
target
2013 Feb 01
0
[LLVMdev] Question about compilation result - taking address of input array member
On Fri, Feb 1, 2013 at 12:11 PM, Eli Bendersky <eliben at google.com> wrote:
> Hello,
>
> I'm playing around with some LEA-related code generation on x86-64
> (trunk LLVM & Clang), and I run into a case I don't understand:
>
> $ cat takeaddr.c
> int* bar(int table[10]) {
> return &table[2];
> }
>
> $ clang -cc1 -emit-llvm takeaddr.c
> $
2013 Mar 16
0
[LLVMdev] Simple question
You can't. You have to use the value 12 directly.
On 16 March 2013 00:18, James Courtier-Dutton <james.dutton at gmail.com>wrote:
>
> On Mar 15, 2013 10:53 PM, "Óscar Fuentes" <ofv at wanadoo.es> wrote:
> >
> > James Courtier-Dutton <james.dutton at gmail.com> writes:
> >
> > > I think this is a very simple question, and it must