Displaying 20 results from an estimated 200 matches similar to: "[LLVMdev] Contants generation"
2013 Jun 25
0
[LLVMdev] Contants generation
Hi Elena,
> I’d like to generate constants inside .text in order to use ip-relative
> loads, when the code model is “large”.
I don't think this is a sequence the x86 backend supports at the
moment, but it is how ARM handles its constant-pools. The outline is
that you have a pass which looks through a functions constpool uses
and emits a pseudo-instruction for each, which is then
2013 Jun 25
2
[LLVMdev] Contants generation
Hi again,
Actually, I've just been looking at the existing code and the ARM
solution may be over-complicated for this situation.
You should be able to override EmitConstantPool directly, or possibly
even just override getSectionForConstantKind in
X86LinuxTargetObjectFile (and perhaps others) to return .text.
Tim.
2013 Feb 21
2
[LLVMdev] constants in text section for mips 16
I am working towards a more complete solution for large constants in
mips 16 (ala Arm constant islands and such). That is part of why I'm
busy expanding all macros being emitted in the mips 16 compiler (almost
done).
I'm wondering if there is a poor mans approach for large constants that
can be done very simply that I can add just for now.
Gcc mips 16 places them after the function
2013 Feb 21
0
[LLVMdev] constants in text section for mips 16
Hi Reed,
> I'm wondering if there is already some mechanism where I can assign literals
> to the text section and get a label for where it has been stored.
I think putting them in the text section is reasonably simple, though
doesn't have a generic "pleasePutConstantsAfterFunctions()" call in
LLVM.
A good place to start would be the reverse of my recent patch to
AArch64
2013 Jun 25
0
[LLVMdev] Contants generation
That what I actually did now, locally in the code.
But I still see the " movabsq"
.text
.align 8, 0x90
.LCPI0_0:
.quad 4606281698874543309 # double 0.9
.LCPI0_1:
.quad 4631147119616759172 # double 42.2794408
.LCPI0_2:
.long 1065353216 # float 1
.zero 4
...
movabsq $.LCPI0_1, %rax # encoding: [0x48,0xb8,A,A,A,A,A,A,A,A]
2013 Jun 25
2
[LLVMdev] Contants generation - proposal
Hi all,
I analyzed more and ready (1) to describe the problem and (2) I have a proposal.
(1) Problem description:
In X86_64 target the Code Model is "Large". It means that address is 64-bit and IP-relative memory operand can't be used in this case.
(Because in IP-relative memory operand the displacement is 32-bit).
In order to load constant, we use 2 instructions.
movabsq
2013 Jun 26
0
[LLVMdev] Contants generation - proposal
>> I think that the improved behavior for consts should be acceptable in the large model. But that's just me.
> By default, all constants should be in a special read-only section, and this section may be far from the text section.
Why should they? The only reason I can think of is to support
execute-only pages, but isn't that the less common use-case? From what
I could tell from
2013 Jun 25
0
[LLVMdev] Contants generation - proposal
Hi Elena,
> (2) Proposal
> Define one more Code Model, let's say "LargeNearConst", which will allow to put constants in .text.
Isn't that a little heavy-handed? The large model only requires the
less efficient access for symbols we can't control, and in fact x86
still uses pc-relative conditional branches within a function so it
can't pretend to support a single
2013 Jun 26
2
[LLVMdev] Contants generation - proposal
> I think that the improved behavior for consts should be acceptable in the large model. But that's just me.
By default, all constants should be in a special read-only section, and this section may be far from the text section.
I'm working with JIT model or with only one object file. The code model, when all constants are near, we can call "LargeJIT". (Is it sounds better
2013 Feb 25
1
[LLVMdev] constants in text section for mips 16
Why did you take out the constant island code for Arm 64?
Just did not need it?
On 02/21/2013 12:01 PM, Tim Northover wrote:
> Hi Reed,
>
>> I'm wondering if there is already some mechanism where I can assign literals
>> to the text section and get a label for where it has been stored.
>
> I think putting them in the text section is reasonably simple, though
>
2014 Oct 31
3
[LLVMdev] Large constants in patchpoints
Currently llvm crashes on following code, run through llc:
declare void @llvm.experimental.stackmap(i64, i32, ...)
define void @foo() {
tail call void (i64, i32, ...)* @llvm.experimental.stackmap(i64 0,
i32 0, i64 9223372036854775807)
ret void
}
The issue is that 9223372036854775807 (decimal for 0x7fffffffffffffff)
is the "empty key" for an int64_t, and in
2015 Aug 04
2
[LLVMdev] Help needed about code & data mixing when emit object files
Hi,
I'm building a new backend which can only load very limited range of imm.
So I decided to use constant pool, and place constant pool entries close
enough to instructions use the entries (we have very limited range
PC-relative memory load). However, lld & llc output the object files that
gather all constant pool entries into one section. How can I make them mix
these entries into code
2007 Aug 20
0
[LLVMdev] Problem with missing support for non-zero contant initializers.
On 8/20/07, Anton Korobeynikov <asl at math.spbu.ru> wrote:
> Hello, Tomas.
>
> > So far I have only been using LLVM at the user level. And I'm not sure
> > how this problem should be solved. It would be really nice if there
> > was a way to specify something like:
> > *******************************************************************
> >
2007 Aug 20
0
[LLVMdev] Problem with missing support for non-zero contant initializers.
On Mon, 20 Aug 2007, Tomas Lindquist Olsen wrote:
> I'm working on a LLVM based compiler for the D programming language by
> Walter Bright.
Nifty.
> D allows static arrays up to 16MB in size. I'm initializing global
> static arrays with a constant initializer. But D requires that (per
> default) static arrays are initialized with the default initializer
> for the
2007 Aug 20
1
[LLVMdev] Problem with missing support for non-zero contant initializers.
> > D allows static arrays up to 16MB in size. I'm initializing global
> > static arrays with a constant initializer. But D requires that (per
> > default) static arrays are initialized with the default initializer
> > for the element type. For float this happens to be NaN, so I cannot
> > use a 'zeroinitializer'.
>
> Wow, this *is* bad. I think
2007 Aug 20
1
[LLVMdev] Problem with missing support for non-zero contant initializers.
Chris Lattner wrote:
>> D allows static arrays up to 16MB in size. I'm initializing global
>> static arrays with a constant initializer. But D requires that (per
>> default) static arrays are initialized with the default initializer
>> for the element type. For float this happens to be NaN, so I cannot
>> use a 'zeroinitializer'.
>
> Wow, this *is*
2008 Dec 13
1
need to initialize contant arrays , where to do it...
I need to load names, from the table ''domains'' into an array
(frequently used in my app..)
ALL_DOMAINS = Domain.find(:all).map { |d| d.name }.compact
I tried to write it in an initialize or in my application.rb BUT
problem : when I run a rake db:migrate initially (after creating the
database)
I get an error..
rake db:migrate --trace
(in
2007 Aug 20
2
[LLVMdev] Problem with missing support for non-zero contant initializers.
Hello, Tomas.
> So far I have only been using LLVM at the user level. And I'm not sure
> how this problem should be solved. It would be really nice if there
> was a way to specify something like:
> *******************************************************************
> @_D9arrayinit5tableG32f = global [32 x float] [ 32 x float 0x7FF8000000000000 ]
>
2011 Mar 29
2
[LLVMdev] ARM mapping symbols
Hi there,
I've created a bug on llvm:
http://www.llvm.org/bugs/show_bug.cgi?id=9582
Basically, ARM, Thumb and data mapping symbols should have been
exported in the ELF file, so the linker can work correctly.
I can do the change and create some test cases, but I haven't been
paying much attention to recent MC developments. Is ArmAsmPrinter the
place to change for that, or is there an MC
2007 Aug 20
5
[LLVMdev] Problem with missing support for non-zero contant initializers.
Hi all.
I'm working on a LLVM based compiler for the D programming language by
Walter Bright.
D allows static arrays up to 16MB in size. I'm initializing global
static arrays with a constant initializer. But D requires that (per
default) static arrays are initialized with the default initializer
for the element type. For float this happens to be NaN, so I cannot
use a