Displaying 20 results from an estimated 30000 matches similar to: "[LLVMdev] what's correct behavior for struct forward declarations?"
2008 Apr 20
0
[LLVMdev] Global variable-length array
On Apr 19, 2008, at 22:45, Talin wrote:
> Suppose I have a global variable which points to a constant,
> variable length array.
This is somewhat contradictory. Do you want an 'vla *g;' in C? If so,
your global will be of type %vla** (you'll load a pointer to the array
from the global). Its initializer would be a bitcast of a global which
has some type similar to %vla.
2014 Jan 29
2
[LLVMdev] getelementptr on static const struct
Hi,
I found a mysterious behavior of LLVM optimizer.
I compiled the following code by clang -emit-llvm -S:
#include <stddef.h>
static const struct t {char t[4]; char s;} p = {{}, 'a'};
char f() {
return ((char*)&p)[offsetof(struct t, s)];
}
then I obtained the following LLVM IR:
%struct.t = type { [4 x i8], i8 }
@p = constant %struct.t { [4 x i8] zeroinitializer, i8 97
2011 Feb 15
0
[LLVMdev] How to use ConstantFoldConstantExpression?
I forgot to mention, that I use LLVM release 2.8, I did not try it with the latest revision, but I expect that I
am rather doing something wrong than using non-implemented functions.
On Tue, 15 Feb 2011 14:09:57 +0100, ihusar <ihusar at fit.vutbr.cz> wrote:
> Hello,
>
> i need to fold constants, i found that a function ConstantFoldConstantExpression could be used,
> however
2011 Feb 15
3
[LLVMdev] How to use ConstantFoldConstantExpression?
Hello,
i need to fold constants, i found that a function ConstantFoldConstantExpression could be used,
however I am not able to make it fold anything. Could you please give me some advice, what I am doing wrong?
My code looks something like this:
//data layout is obtained from clang-generated code for triple arm-none-linux-gnueabi with added v32:32:32
const char* const TARGET_DATA_LAYOUT =
2009 Jul 16
1
[LLVMdev] forward declarations of global values
Hi,
Is it possible to use forward declarations for global variables when
emitting llvm IL from C++ ? I.e. if I have a global array, but I
can't determine its size until after the llvm IL code which uses it is
emitted.
thanks
Zoltan
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2011 Feb 15
2
[LLVMdev] How to use ConstantFoldConstantExpression?
Adam,
I just fixed this issue a few days ago. A version from the trunk should work for you.
Cheers,
Nadav
-----Original Message-----
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of ihusar
Sent: Tuesday, February 15, 2011 15:52
To: llvmdev at cs.uiuc.edu
Subject: Re: [LLVMdev] How to use ConstantFoldConstantExpression?
I forgot to mention, that I use
2010 May 07
3
[LLVMdev] AsmPrinter behavior
I compile these two lines in llc
@tst1 = internal global [4 x i8] zeroinitializer;
@tst2 = internal global [4 x i8] [i8 0, i8 1, i8 2, i8 3];
@tst1 is emited via MCStreamer::EmitCommonSymbol
while the other is emited via MCStreamer::EmitLabel followed by
MCStreamer::EmitBytes
from what I can tell, only symbols with common linkage should me emitted
by MCStreamer::EmitCommonSymbol,
is this the
2014 Oct 25
2
[LLVMdev] Adding masked vector load and store intrinsics
> So %passthrough can *only* be undef or zeroinitializer?
No, it can be any value including undef and zeroinitializer.
We considered, while designing, zero and merge semantics and decided that merge semantics is better because it covers zero semantics if you use zeroinitializer in the %paththru.
- Elena
-----Original Message-----
From: dag at cray.com [mailto:dag at cray.com]
Sent:
2019 Jan 16
2
Skipping construction/destruction of stack allocated objects
Hello,
For performance reasons, I would like to provide a way to skip
construction/destruction of objects that are stack allocated. Typically,
C-style arrays of std::complex create an initialization loops that is
almost always unnecessary.
I am thinking of providing an __attribute__((uninitialized)) that can be
applied to an object declaration:
{
std::complex<float> foo[64][64]
2020 May 21
2
Updated llc does not compile my .ll files any more [addrspace on AVR problem?]
Hi,
I’ve come back and updated my llvm toolset with modern code (my branch was about 1-2 years old) and now the llvm IR files produced by my front end no longer compile with llc.
Here is a sample of llvm ir produced by my front end (it’s a standard version 3.1 build of swift from the swift.org open source website).
; ModuleID = 'main.ll'
source_filename = "main.ll"
target
2014 Sep 26
2
[LLVMdev] Canonicalizing vector masking.
Hi, I received an internal test case from a game team (it wasn't about this
in particular), and I was wondering if there was maybe an opportunity to
canonicalize a particular code pattern:
%inputi = bitcast <4 x float> %input to <4 x i32>
%row0i = and <4 x i32> %inputi, <i32 -1, i32 0, i32 0, i32 0>
%row0 = bitcast <4 x i32> %row0i to <4 x float>
2013 Apr 29
3
[LLVMdev] Many tests fail on Win64
Hi,
I check-out the latest version of LLVM and see many failures (on Win64):
********************
67> FAIL: LLVM :: Transforms/GlobalOpt/zeroinitializer-gep-load.ll (5518 of 7763)
67> ******************** TEST 'LLVM :: Transforms/GlobalOpt/zeroinitializer-gep-load.ll' FAILED ********************
67> Script:
67> --
67> W:/LLVM_org/build64/bin/Debug/opt.EXE <
2011 Dec 13
0
[LLVMdev] AMD IL Code Generator Backend for OpenCL
Hi Micah, all,
On Dec 13, 2011, at 8:49 AM, Villmow, Micah wrote:
If you look at the test cases, you can infer what needs to be done. Basically since this is targeted
for OpenCL, we annotate OpenCL kernels slightly different than normal functions and that is
what causes the code to be generated. That being said, on my list of things to do is fix this so that
any function will be generated
2011 Jun 17
3
[LLVMdev] can GlobalAlias point to a middle of a structure?
Hi,
In order to find out-of-bound accesses to global objects with
AddressSanitizer (
http://code.google.com/p/address-sanitizer/wiki/AddressSanitizer)
I need to create redzones to the left and to the right of every global
variable.
I tried the following:
Before:
@Extern = global [10 x i8] zeroinitializer, align 1
After:
%0 = type { [32 x i8], [10 x i8], [54 x i8] }
@Extern_asan_redzone =
2011 Aug 24
1
[LLVMdev] Assert on Large Zeroinitializer Store
On 8/24/11 1:51 PM, Eli Friedman wrote:
> On Wed, Aug 24, 2011 at 11:41 AM, John Criswell<criswell at illinois.edu> wrote:
>> Dear All,
>>
>> I currently have one of my transforms creating the following store
>> instruction:
>>
>> store [65536 x i8] zeroinitializer, [65536 x i8]* %buf.i, align 16
>>
>> ... which causes the SelectionDAG code
2013 Apr 29
0
[LLVMdev] Many tests fail on Win64
In a debug build you should get a stack trace by default, which would
be helpful here.
I can try to repro later today, but I'm not surprised there are issues
because most people I know stick with 32-bit builds even on 64-bit
Windows.
On Mon, Apr 29, 2013 at 4:27 AM, Demikhovsky, Elena
<elena.demikhovsky at intel.com> wrote:
> Hi,
>
>
>
> I check-out the latest version of
2017 Apr 24
4
why do undefined globals end up in .data instead of .bss?
On Mon, Apr 24, 2017 at 2:53 PM, Friedman, Eli <efriedma at codeaurora.org>
wrote:
> On 4/23/2017 10:10 AM, Andrew Kelley via llvm-dev wrote:
>
>> Here is a module:
>>
>> @vals = internal unnamed_addr global [20000000 x i32] undef, align 4
>>
>> LLVM puts the global in the .data section, and results in a 77MB .o file
>> of mostly zeroes. Why does
2013 Mar 30
2
[LLVMdev] Missed optimisation opportunities?
I'm writing a front end for an existing interpreted language with slightly
odd semantics for primitive values.
Similar to the values in a database table, any value could be null, even
for non-pointer types.
For example a boolean variable could be true, false, or null.
To model this behaviour, I'm passing an {i1, [type]} around for every
numeric type. And using insertvalue / extractvalue
2011 Jun 17
0
[LLVMdev] can GlobalAlias point to a middle of a structure?
Hi Kostya,
> In order to find out-of-bound accesses to global objects with AddressSanitizer
> (http://code.google.com/p/address-sanitizer/wiki/AddressSanitizer)
> I need to create redzones to the left and to the right of every global variable.
>
> I tried the following:
> Before:
> @Extern = global [10 x i8] zeroinitializer, align 1
> After:
> %0 = type { [32 x
2020 May 21
2
Updated llc does not compile my .ll files any more [addrspace on AVR problem?]
That’s useful info, thanks.
I think it will be useful for me to understand the connection, why this type of pointer is being emitted now.
Do you have any suggestions where i can look to find the platform specific code that is making function pointers go into addrspace?
Carl
p.s. I am also working on passing the avr target flag to swift, but swift itself had (has?) limitations that make it