Displaying 20 results from an estimated 900 matches similar to: "[LLVMdev] Codegen/Register allocation question."
2008 Sep 04
0
[LLVMdev] Codegen/Register allocation question.
On Sep 3, 2008, at 5:58 AM, Lang Hames wrote:
> Hi LLVMers,
>
> I have finally sorted out licensing issues and found some time, so I'm
> trying to port my PBQP register allocator to 2.4 in order to
Nice! We would definitely welcome your contribution.
>
> contribute it (if you want it). I've run into a bug that has me
> confused though.
>
> I'm currently
2006 Jun 30
3
[LLVMdev] Removing dead code
> > It seems to me that the only instructions
> > with dead definitions that I should not remove are the calls. Is it true?
> > I would like to know if a code like this below is safe, that is, besides
> > call instructions, is there other instructions that must stay in the code
> > even if their definitions are dead?
> >
> > MachineInstr * mi = iter;
>
2009 Feb 13
3
[LLVMdev] Modeling GPU vector registers, again (with my implementation)
It seems to me that LLVM sub-register is not for the following hardware
architecture.
All instructions of a hardware are vector instructions. All registers
contains
4 32-bit FP sub-registers. They are called r0.x, r0.y, r0.z, r0.w.
Most instructions write more than one elements in this way:
mul r0.xyw, r1, r2
add r0.z, r3, r4
sub r5, r0, r1
Notice that the four elements of r0 are written
2006 Jun 30
0
[LLVMdev] Removing dead code
On Thu, 29 Jun 2006, Fernando Magno Quintao Pereira wrote:
> I am working in a register allocator for LLVM, and I realized that,
> after I perform register allocation, there is many move instructions that
> are dead code, and can safely be removed. It is easy for the RA algorithm
> to remove these instructions. It seems to me that the only instructions
> with dead definitions
2006 Jun 30
2
[LLVMdev] Removing dead code
Dear guys,
I am working in a register allocator for LLVM, and I realized that,
after I perform register allocation, there is many move instructions that
are dead code, and can safely be removed. It is easy for the RA algorithm
to remove these instructions. It seems to me that the only instructions
with dead definitions that I should not remove are the calls. Is it true?
I would like to know
2007 Jun 26
3
[LLVMdev] Live Intervals Question
For the x86-64 target, I tried compiling a simple hello world. I don't
understand the live interval information.
Here's the machine instructions as dumped by LiveIntervalAnalysis:
********** MACHINEINSTRS **********
file hello.c line 3 b:
0 FNSTCW16m <fi#0>, 1, %NOREG, 0
FNSTCW16m <fi#0> 1 %mreg(0) 0
4 MOV8mi <fi#0>, 1, %NOREG, 1, 2
MOV8mi <fi#0> 1 %mreg(0) 1 2
8
2007 Jun 26
4
[LLVMdev] Live Intervals Question
Evan, thanks for responding so quickly.
On Tuesday 26 June 2007 14:11, Evan Cheng wrote:
> On Jun 26, 2007, at 11:20 AM, David A. Greene wrote:
> > 28 %AL<dead> = MOV8rr %reg1024<kill>, %EAX<imp-def>
> > MOV8rr %mreg(2)<d> %reg1024 %mreg(17)<d>
> > 32 CALL64pcrel32 <ga:printf>, %RDI<kill>, %RAX<imp-def>, %RCX<imp-
> >
2007 Jun 26
0
[LLVMdev] Live Intervals Question
On Jun 26, 2007, at 11:20 AM, David A. Greene wrote:
>
> 28 %AL<dead> = MOV8rr %reg1024<kill>, %EAX<imp-def>
> MOV8rr %mreg(2)<d> %reg1024 %mreg(17)<d>
> 32 CALL64pcrel32 <ga:printf>, %RDI<kill>, %RAX<imp-def>, %RCX<imp-
> def,dead>,
> %RDX<imp-def,dead>, %RSI<imp-def,dead>, %RDI<imp-def,dead>,
>
2007 Jun 27
0
[LLVMdev] Live Intervals Question
On Jun 26, 2007, at 12:57 PM, David Greene wrote:
> Evan, thanks for responding so quickly.
>
> On Tuesday 26 June 2007 14:11, Evan Cheng wrote:
>> On Jun 26, 2007, at 11:20 AM, David A. Greene wrote:
>>> 28 %AL<dead> = MOV8rr %reg1024<kill>, %EAX<imp-def>
>>> MOV8rr %mreg(2)<d> %reg1024 %mreg(17)<d>
>>> 32 CALL64pcrel32
2010 Jun 03
2
[LLVMdev] Unused argument registers can not be reused ?
While migrating my codebase from llvm-2.6 to llvm-2.7, I found a different behaviour in the register allocation. I have been able to reproduce it using the msp430 backend, with the 2.7 release as well as the svn head.
For the msp430, the first four parameters of a function are passed thru registers. What I observe is that if those parameters are not used inside the function, those registers can
2009 Jan 09
2
[LLVMdev] implicit CC register Defs cause "physreg was not killed in defining block!" assert
Hello,
For my backend, I define and use a CC register similiarly to the EFLAGS register in X86 (I call it CCFLAGS).
But if I make all arithmetic/logic instructions affect it ('let Defs = [CCFLAGS] in...' in InstrInfo.td) I run into
// The only case we should have a dead physreg here without a killing or
// instruction where we know it's dead is if it is live-in to the function
2004 Jun 09
2
[LLVMdev] BranchInst problem
Chris Lattner wrote:
> > Thanks, this works! I don't yet understand why spill code is needed there
> > at all, but I'll return to that when I have branches working correctly.
>
> I'm not sure either. Can you send the code before and after register
> allocation?
Attached.
> You might also try -regalloc=linearscan, as the default
> allocator is, uhhh,
2006 Jun 26
2
[LLVMdev] Mapping bytecode to X86
Dear guys,
I am in need of more of your help. I'm implementing a register
allocator, and I am having problems to make it produce correct code.
Consider this program here:
int main(int argc, char ** argv) {
int i, j, sum;
i = argv[0][0];
j = argv[0][1];
sum = (i + j) * j;
printf("Sum = %d\n", sum);
}
that maps to this llvm bytecode:
entry (0xa785590, LLVM
2009 Feb 13
0
[LLVMdev] Modeling GPU vector registers, again (with my implementation)
On Feb 13, 2009, at 9:47 AM, Alex wrote:
> It seems to me that LLVM sub-register is not for the following
> hardware architecture.
>
> All instructions of a hardware are vector instructions. All
> registers contains
> 4 32-bit FP sub-registers. They are called r0.x, r0.y, r0.z, r0.w.
>
> Most instructions write more than one elements in this way:
>
> mul
2010 Jun 04
0
[LLVMdev] Heads up: Local register allocator going away
On Thu, 2010-06-03 at 02:53 +0200, Jakob Stoklund Olesen wrote:
> If you are using the local register allocator, please try switching to the fast allocator and report any bugs you find.
>
Tried it, and it seems to break quite a big chunk of our tests on SPU :)
Before r103488 ("Mostly rewrite RegAllocFast") there was no problem.
But with r103488, I get a:
2009 Apr 20
4
[LLVMdev] Unnecessary moves after sign-extension in 2-address target
My two-address target machine has sign-extension instructions to extend
i8->i32 and i16->i32. When I compile this simple program:
int
sext (unsigned a, unsigned b, int c)
{
return (signed char) a + (signed short) b + c;
}
I get this IR:
define i32 @sext(i32 %a, i32 %b, i32 %c) nounwind readnone {
entry:
%conv = trunc i32 %a to i8 ; <i8>
2004 Jun 09
0
[LLVMdev] BranchInst problem
On Wed, 9 Jun 2004, Vladimir Prus wrote:
> Chris Lattner wrote:
> > > Thanks, this works! I don't yet understand why spill code is needed there
> > > at all, but I'll return to that when I have branches working correctly.
> >
> > I'm not sure either. Can you send the code before and after register
> > allocation?
>
> Attached.
Okay, yeah
2010 Jun 03
2
[LLVMdev] Heads up: Local register allocator going away
I just changed the default register allocator for -O0 builds to the fast allocator.
This means that the local register allocator is not used anymore, and since it does more or less the same as the fast allocator, there is no reason to keep it around.
I am going to delete it in a week or two.
If you are using the local register allocator, please try switching to the fast allocator and report any
2009 Jan 09
0
[LLVMdev] implicit CC register Defs cause "physreg was not killed in defining block!" assert
A physical register cannot be live across the block. So it must have a
use in the block or it must be marked dead. From your dump, it looks
like the CCFLAGS defs are not being marked dead. It's unclear where
things went wrong, but you can step through LiveVariables to debug this.
Evan
On Jan 9, 2009, at 2:50 AM, Christian Sayer wrote:
> Hello,
>
> For my backend, I define and
2004 Jun 09
2
[LLVMdev] BranchInst problem
Chris Lattner wrote:
> > > I'm not sure either. Can you send the code before and after register
> > > allocation?
> >
> > Attached.
>
> Okay, yeah the spill code looks right. The local allocator can't keep
> virtual registers in physical registers across basic blocks. As such, the
> vregs are spilled at the end of the entry block and then