Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] adding an optional flag edge to a BRIND node"
2006 May 30
2
[LLVMdev] [RFC, ARM] expanding RET to CopyToReg;BRIND
I have changed the way in which the ARM backend generates a function
return. Instead of expanding a RET to a CopyToReg;RETFLAG, it now
expands into a CopyToReg;BRIND. I haven't commit it yet, but the patch
is attached.
In my opinion the resulting code is easier to understand, but I have
some questions:
Why all backends use RETFLAG?
Why it is named RETFLAG?
Why the Copy that places the
2006 May 30
0
[LLVMdev] [RFC, ARM] expanding RET to CopyToReg;BRIND
On Tue, 30 May 2006, [UTF-8] Rafael Esp?ndola wrote:
> I have changed the way in which the ARM backend generates a function
> return. Instead of expanding a RET to a CopyToReg;RETFLAG, it now
> expands into a CopyToReg;BRIND. I haven't commit it yet, but the patch
> is attached.
Ok, I haven't looked at the code, but you're free to do whatever make
sense.
> In my
2006 May 31
2
[LLVMdev] [RFC, ARM] expanding RET to CopyToReg;BRIND
> > Why it is named RETFLAG?
>
> Historical reason. Originally we didn't have nodes that could
> *optionally* have an input flag. A better design, e.g. on PPC would be to
> have a PPCISD::RET node, which takes an optional input flag, and always
> lower RET to it.
I See. I will try to always lower to "(mov)*;bx lr" on ARM.
> Flag in the SelectionDAG stuff is
2006 May 31
0
[LLVMdev] [RFC, ARM] expanding RET to CopyToReg;BRIND
On Wed, 31 May 2006, [UTF-8] Rafael Esp?ndola wrote:
>> We don't want the copy and shift to wander apart from each other (e.g. we
>> don't want another shift to get scheduled in between them), so we flag
>> them together. In practice, these copies usually get coallesced away.
> In the second case shl explicitly uses CL. Shouldn't the register
> allocator be
2006 May 31
1
[LLVMdev] [RFC, ARM] expanding RET to CopyToReg;BRIND
On 5/31/06, Chris Lattner <sabre at nondot.org> wrote:
> On Wed, 31 May 2006, [UTF-8] Rafael Esp?ndola wrote:
> >> We don't want the copy and shift to wander apart from each other (e.g. we
> >> don't want another shift to get scheduled in between them), so we flag
> >> them together. In practice, these copies usually get coallesced away.
> > In
2006 Aug 03
1
[LLVMdev] need some help to remove a dummy mov
I have just added a retflag to the ARM backend. I thought that using
BRIND directly was to blame for a dummy move. But I the move wasn't
removed.
When compiling
---------------------------------------
int %g() {
entry:
call void %f( )
ret int 42
}
declare void %f()
--------------------------------------
The ARM backend produces
-------------------------------------------
g:
2006 May 17
1
[LLVMdev] matching "ret 0"
I am trying to make the ARM backend compile
int f() {return 0;}
I have added a custom expansion of ret that is similar to the one used
in ppc and sparc. If I understand it correctly, it will expand the ret
into an assignment to the return register (R0) and a RETFLAG node.
I declared the bx instruction to match RETFLAG.
Now the instruction selection says it can't match "
i32 = Constant
2006 Oct 02
2
[LLVMdev] returning a double in two registers
I have started to add support for FP in the ARM backend.
According to the ABI, 32 bit floating point numbers should be returned
in R0 and 64bit ones in R0/R1.
I have solved the 32 bit case by inserting bit_converts in LowerRET.
For the 64bit case I considered two options:
1) Creating two nodes. fp_lo and fp_hi. I could then select fmrdh and fmrdl with
(set IntRegs:$dst (bitconvert (fp_hi
2017 Feb 14
2
Ensuring chain dependencies with expansion to libcalls
Hi all,
Our target does not have native support for 64-bit integers, so we rely on
library calls for certain operations (like sdiv). We recently ran into a
problem where these operations that are expanded to library calls aren't
maintaining the proper ordering in relation to other chains in the DAG.
The following snippet of a DAG demonstrates the problem.
t0: ch = EntryToken
t2:
2016 Aug 02
2
Instruction selection problems due to SelectionDAGBuilder
Hello.
I'm having problems at instruction selection with my back end with the following
basic-block due to a vector add with immediate constant vector (obtained by vectorizing a
simple C program doing vector sum map):
vector.ph: ; preds = %vector.memcheck50
%.splatinsert = insertelement <8 x i64> undef, i64 %i.07.unr, i32 0
2016 Aug 23
2
Help in understanding physreg LiveVariables
So if I first create the value in an entry BB and then build a CopyToReg
but then I have to read it in a BB that loops back to itself, with it's own
CopyToReg at the end, then I have two CopyToReg nodes for the same value.
In this case, I need to create 3 virt regs, 1 for each CopyToReg and a
third for the CopyFromReg in the beginning of the loop BB, right? And then
I need to build a PHI
2017 Nov 05
2
What pattern string corresponds to CopyToReg?
Well, that's the thing: I thought that was CopyToReg. I don't know what the
name of the node is to load one value into a register, so I don't know how
to construct such a pattern.
On Sat, Nov 4, 2017 at 9:23 PM Craig Topper <craig.topper at gmail.com> wrote:
> Do you have a pattern for loading an i16 immediate into a 16-bit register?
>
> ~Craig
>
> On Sat, Nov 4,
2017 Nov 05
2
What pattern string corresponds to CopyToReg?
Hmm, okay. Then what's the problem being reported here? I'm not sure what
I'm supposed to do with "LLVM ERROR: Cannot select: t1: i16 =
Constant<127>".BTW, the function is:
; ModuleID = 'return.c'
source_filename = "return.c"
target datalayout =
"E-m:e-p:16:16:16-i1:16:16-i8:16:16-i16:16:16-i32:16:16-i64:16:16-S16-n16"
target triple =
2020 Feb 22
2
COPYs between register classes
Hi,
On SystemZ there are a set of "access registers" that can be copied in
and out of 32-bit GPRs with special instructions. These instructions can
only perform the copy using low 32-bit parts of the 64-bit GPRs. As
reported and discussed at https://bugs.llvm.org/show_bug.cgi?id=44254,
this is currently broken due to the fact that the default register class
for 32-bit integers is
2017 Nov 05
2
What pattern string corresponds to CopyToReg?
So there's a DAG that looks like this in the debug output:
Selecting: t3: ch,glue = CopyToReg t0, Register:i16 %R5, Constant:i16<127>
In the instruction selection phase, what pattern would that match? I've
constructed this so far:
(??? REG16:$dst, i16imm:$src)
but the problem is, I can't determine what to use as ???. There is an
ISD::CopyToReg enum value, but I don't
2007 Oct 17
2
[LLVMdev] The one remaining bug keeping CellSPU from release...
Evan:
What you requested was in the debug output (sans offending Node), but
here it is, outside of the attachment. The offending node is
highlighted:
SU(0): 0xa908760: ch = EntryToken
SU(1): 0xa907600: i32,ch,flag = CopyFromReg 0xa9095d0, 0xa9070e0,
0xa9095d0:1
0xa906e30: ch,flag = CopyToReg 0xa908760, 0xa9070e0, 0xa9071f0
<<--<<--<<--<<--<< Node
2007 Oct 18
0
[LLVMdev] The one remaining bug keeping CellSPU from release...
Sorry, still not enough information. I am guessing it's asserting in
getVR() called from EmitNode()? The node is CopyToReg and it's trying
to find the virtual register of operand 2? From the schedule, I don't
see the definition of the operand.
Can you do DAG.viewGraph()? That should gives us a better idea.
Evan
On Oct 16, 2007, at 9:06 PM, Scott Michel wrote:
> Evan:
>
2016 Nov 03
2
rotl: undocumented LLVM instruction?
Is there any way to get it to delay this optimization where it goes from
this:
Initial selection DAG: BB#0 'bclr64:entry'
SelectionDAG has 14 nodes:
t0: ch = EntryToken
t2: i64,ch = CopyFromReg t0, Register:i64 %vreg0
t4: i64,ch = CopyFromReg t0, Register:i64 %vreg1
t6: i64 = sub t4, Constant:i64<1>
t7: i64 = shl Constant:i64<1>, t6
2020 Aug 07
2
Branches which return values in SelectionDAG
Hi all,
I am working on modeling an instruction similar to SystemZ's 'BRCT', which takes a register, decrements it, and branches if the register is nonzero. I saw that the LLVM backend for SystemZ generates the instruction in a MachineFunctionPass as part of a pass intended to eliminate or combine compares.
I then looked at ARM, where it uses the HardwareLoops pass first, and then a
2009 Jul 23
2
[LLVMdev] patch for llc/ARM: added mechanism to move switch tables from .text -> .data; also cleanup and documentation
On Tue, Jul 14, 2009 at 6:48 PM, Bob Wilson <bob.wilson at apple.com> wrote:
>
> On Jul 2, 2009, at 10:48 AM, robert muth wrote:
>
> I spend over a day trying to follow your suggestion. In the end I was not
> successful. Here is what Iearned:
>
> After setting
>
> ARMJITInfo::hasCustomJumpTables -> true
> setOperationAction for ISD::BR_JT -> Expand
>