Displaying 20 results from an estimated 200 matches similar to: "[LLVMdev] Possible missed optimization?"
2011 Mar 26
2
[LLVMdev] Possible missed optimization?
Hello Jakob, thanks for the reply. The three regclasses involved here are
all subsets from each other and aren't disjoint. These are the basic
descriptions of the regclasses involved to show what i mean:
DREGS: R31R30, R29R28 down to R1R0 (16 regs)
DLDREGS: R31R30, R29R28 down to R17R16 (8 regs)
PTRREGS: R31R30, R29R28, R27R26 (3 regs)
All classes intersect each other
2011 Mar 26
0
[LLVMdev] Possible missed optimization?
On Mar 24, 2011, at 5:42 PM, Borja Ferrer wrote:
> The last copy instruction should be removed as pointed out above, but since R27R26 is killed in the load instruction it has to be emitted. About the insane amount of regclasses there, the load/store and the andi instructions take subsets of regs from the main register class, they cant work with all registers, that's why STW and LDW needs
2011 Mar 28
0
[LLVMdev] Possible missed optimization?
On Mar 26, 2011, at 4:09 PM, Borja Ferrer wrote:
> You can look at the output of -debug-only=regcoalescing to see what is going on.
>
> This is the debug output i've got, some information is a bit cryptic for me so next is what i understood:
>
> ********** SIMPLE REGISTER COALESCING **********
> ********** Function: foo
> ********** JOINING INTERVALS ***********
>
2011 Mar 26
2
[LLVMdev] Possible missed optimization?
>
> You can look at the output of -debug-only=regcoalescing to see what is
> going on.
>
> This is the debug output i've got, some information is a bit cryptic for me
so next is what i understood:
********** SIMPLE REGISTER COALESCING **********
********** Function: foo
********** JOINING INTERVALS ***********
entry:
16L %vreg0<def> = COPY %R25R24<kill>;
2011 Mar 26
0
[LLVMdev] Possible missed optimization?
On Mar 26, 2011, at 1:04 PM, Borja Ferrer wrote:
> Hello Jakob, thanks for the reply. The three regclasses involved here are all subsets from each other and aren't disjoint. These are the basic descriptions of the regclasses involved to show what i mean:
>
> DREGS: R31R30, R29R28 down to R1R0 (16 regs)
> DLDREGS: R31R30, R29R28 down to R17R16 (8 regs)
> PTRREGS:
2012 Jan 27
2
[LLVMdev] Double spills with Greedy regalloc
Hello,
I noticed the following interesting code sequence while compiling a piece
of code with the backend I'm developing. Probably this issue is for Jakob,
but anyways this is what I'm getting:
STDWPtrQRr <fi#12>, 0, %R25R24; mem:ST2[FixedStack12](align=1)
STDWPtrQRr <fi#12>, 0, %R25R24; mem:ST2[FixedStack12](align=1)
STDWPtrQRr <fi#13>, 0, %R23R22;
2012 Jan 27
0
[LLVMdev] Double spills with Greedy regalloc
On Jan 27, 2012, at 10:20 AM, Borja Ferrer wrote:
> Hello,
>
> I noticed the following interesting code sequence while compiling a piece of code with the backend I'm developing. Probably this issue is for Jakob, but anyways this is what I'm getting:
>
> STDWPtrQRr <fi#12>, 0, %R25R24; mem:ST2[FixedStack12](align=1)
> STDWPtrQRr <fi#12>, 0, %R25R24;
2011 Apr 26
0
[LLVMdev] Symbol folding with MC
On Apr 26, 2011, at 1:27 PM, Borja Ferrer wrote:
> Hello Jim thanks for the reply,
>
> For normal additions with immediates I've done the same as ARM does, basically transforming add(x, imm) nodes to sub(x, -imm) with a pattern in the .td file like this:
> def : Pat<(add DLDREGS:$src1, imm:$src2),
> (SUBIWRdK DLDREGS:$src1, (imm16_neg_XFORM imm:$src2))>;
2011 Apr 27
1
[LLVMdev] Symbol folding with MC
Thanks Jim, I've implemented the negation part successfully :) maybe the
second part could be a possible feature request so others could use it
aswell?
2011/4/27 Jim Grosbach <grosbach at apple.com>
>
> On Apr 26, 2011, at 1:27 PM, Borja Ferrer wrote:
>
> > Hello Jim thanks for the reply,
> >
> > For normal additions with immediates I've done the same as
2011 Apr 26
2
[LLVMdev] Symbol folding with MC
Hello Jim thanks for the reply,
For normal additions with immediates I've done the same as ARM does,
basically transforming add(x, imm) nodes to sub(x, -imm) with a pattern in
the .td file like this:
def : Pat<(add DLDREGS:$src1, imm:$src2),
(SUBIWRdK DLDREGS:$src1, (imm16_neg_XFORM imm:$src2))>;
Now, the typical pattern concerning additions with global addresses looks
2015 Jan 31
3
[LLVMdev] Encoding instructions with inconsistent formats
I'm attempting to implement codegen support for the AVR ST/LD
<http://www.atmel.com/webdoc/avrassembler/avrassembler.wb_ST.html> family
of instructions.
The binary encoding is not particularly consistent -- take a look at this
table of variants of LD, along with their machine code representation:
# load 8 bits from pointer register X into general purpose Rd
ld Rd, X `1001 000d dddd
2011 Dec 08
2
[LLVMdev] Register allocation in two passes
Jakob I've just noticed that I'm getting false positives about spills when
there are actually none.
What is happening is that although execution reaches to the line
spiller().spill(LRE); inside RAGreedy::selectOrSplit() the insertion of the
spill is avoided because the register gets rematted. This is the debug
output I'm getting to show what I mean:
Inline spilling
2011 Dec 08
0
[LLVMdev] Register allocation in two passes
On Dec 8, 2011, at 12:15 PM, Borja Ferrer wrote:
> Jakob I've just noticed that I'm getting false positives about spills when there are actually none.
> What is happening is that although execution reaches to the line spiller().spill(LRE); inside RAGreedy::selectOrSplit() the insertion of the spill is avoided because the register gets rematted. This is the debug output I'm
2010 Nov 27
3
[LLVMdev] Register Pairing
Hello, some months ago i wrote to the mailing list asking some questions
about register pairing, i've been experimenting several things with the help
i got back then.
Some background first: this issue is for a backend for an 8bit
microcontroller with only 8bit regs, however it has a few 16bit instructions
that only work with fixed register pairs, so it doesnt allow all
combinations of regs.
2017 Jul 29
2
ISelDAGToDAG breaks node ordering
Hi,
During instruction selection, I have the following code for certain LOAD
instructions:
const LoadSDNode *LD = cast<LoadSDNode>(N);
SDNode* LDW = CurDAG->getMachineNode(AVR::LDWRdPtr, SDLoc(N), VT,
PtrVT, MVT::Other,
LD->getBasePtr(), LD->getChain());
// Honestly, I have no idea what this does, but other memory
// accessing instructions
2010 Nov 29
0
[LLVMdev] Register Pairing
On Nov 27, 2010, at 8:56 AM, Borja Ferrer wrote:
> Some background first: this issue is for a backend for an 8bit microcontroller with only 8bit regs, however it has a few 16bit instructions that only work with fixed register pairs, so it doesnt allow all combinations of regs. This introduces some problems because if data wider than 8bits is expanded into 8bit operations the 16bit instructions
2017 May 28
2
Pseudo-instruction that overwrites its input register
Hi,
I'd like to define a pseudo-instruction whose expansion will, as a
side-effect, overwrite an input register's value: the pseudo-instruction
ldw r1:r2, P
to load 2 bytes from memory address P is to be expaneded to
ld r1, P+
ld r2, P
where "ld _, P+" is an instruction that loads a single byte from P, and
post-increments P by one.
How can I represent this behaviour in
2017 May 28
2
Pseudo-instruction that overwrites its input register
On Sun, 28 May 2017, David Chisnall wrote:
>> let Constraints = "@earlyclobber $reg" in
>> def LDWRdPtr : Pseudo<(outs DREGS:$reg),
>> (ins PTRREGS:$ptrreg),
>> "ldw\t$reg, $ptrreg",
>> [(set i16:$reg, (load i16:$ptrreg))]>,
>>
2011 Apr 26
0
[LLVMdev] Symbol folding with MC
Hello,
On Apr 26, 2011, at 6:30 AM, Borja Ferrer wrote:
> Hello, I have some questions regarding folding operations with symbols during the instruction print stage with MC. At the moment I'm working with global symbols but i guess that other symbol types should be equivalent.
>
> My first question is how can i negate the address of a symbol?
>
> Consider this piece of code:
2011 Apr 26
2
[LLVMdev] Symbol folding with MC
Hello, I have some questions regarding folding operations with symbols
during the instruction print stage with MC. At the moment I'm working with
global symbols but i guess that other symbol types should be equivalent.
My first question is how can i negate the address of a symbol?
Consider this piece of code:
char g_var[80];
char foo(int a) { return g_var[a]; }
this gets compiles into