Displaying 20 results from an estimated 1100 matches similar to: "[LLVMdev] Register coalescing (Subregs and SuperRegs)"
2012 May 14
0
[LLVMdev] Register coalescing (Subregs and SuperRegs)
Hi,
Consider this MI code from the hexagon backend.
------------------------------------------------------------------
16B %vreg0<def> = COPY %R0<kill>; IntRegs:%vreg0
32B %vreg1<def> = LDriw %vreg0, 0;
mem:LD4[%a],IntRegs:%vreg1,%vreg0
48B %vreg2<def> = LDriw_indexed %vreg0<kill>, 4;
mem:LD4[%add.ptr] IntRegs:%vreg2,%vreg0
64B
2012 Apr 27
0
[LLVMdev] MemRefs in a Load Instruction
> -----Original Message-----
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> On Behalf Of Pranav Bhandarkar
> Sent: Thursday, April 26, 2012 5:24 PM
> To: llvmdev at cs.uiuc.edu
> Subject: [LLVMdev] MemRefs in a Load Instruction
>
> Hi,
>
> On the hexagon target, I have written a following combiner pattern.
>
2012 Apr 26
2
[LLVMdev] MemRefs in a Load Instruction
Hi,
On the hexagon target, I have written a following combiner pattern.
*********************************************
def: Pat<(i64 (or (i64 (shl (i64 (extloadi32 (i32 (add IntRegs:$src1,
s11_2ExtPred:$offset1)))),
(i32 32))),
(i64 (zextloadi32 ADDRriS11_2:$src2)))),
(i64 (COMBINE_rr
2012 Jun 13
0
[LLVMdev] Assert in live update from MI scheduler.
Ok, after a long detour I am back to where I have started. I think there is
a problem at dep DAG construction. Let me try to convince you.
Here is the C code we are dealing with:
push ()
{
struct xx_stack *stack, *top;
for (stack = xx_stack; stack; stack = stack->next)
top = stack;
yy_instr = top->first;
}
If the loop never iterates, "top" will have
2012 Jun 14
1
[LLVMdev] Assert in live update from MI scheduler.
Sergei,
Absolutely right, the copy/ldriw should not be reordered. I was attempting to explain that I consider it a phi-elimination bug, not a DAG builder bug. Liveness will also have problems with this code in the long run.
To avoid confusion, I filed PR13112: Phi elimination generates uninitialized vreg uses, and disabled the SSA check until its fixes in r158461.
However, your C code is also
2012 Jun 13
0
[LLVMdev] Assert in live update from MI scheduler.
Andy,
You are probably right here - look at this - before phi elimination this
code looks much more sane:
# *** IR Dump After Live Variable Analysis ***:
# Machine code for function push: SSA
Function Live Outs: %R0
BB#0: derived from LLVM BB %entry
%vreg5<def> = IMPLICIT_DEF; IntRegs:%vreg5
%vreg4<def> = TFRI_V4 <ga:@xx_stack>; IntRegs:%vreg4
2012 Jun 13
2
[LLVMdev] Assert in live update from MI scheduler.
On Jun 13, 2012, at 1:15 PM, Sergei Larin <slarin at codeaurora.org> wrote:
> Andy,
>
> You are probably right here – look at this – before phi elimination this code looks much more sane:
>
> # *** IR Dump After Live Variable Analysis ***:
> # Machine code for function push: SSA
> Function Live Outs: %R0
>
> BB#0: derived from LLVM BB %entry
>
2012 Aug 30
0
[LLVMdev] MC Register mapping question (MCRegUnitIterator )
Arnold,
It is not my code per say - this is what is done in
LiveIntervalAnalysis.cpp collectRanges(), it wants to iterate over "units"
of D1 (whatever they are assumed to be), but right there it associates them
with actual physical register live ranges (see the tread below), and it does
it wrongly. I was trying to pinpoint exactly to where the issue is, but
there are too many
2012 Aug 30
0
[LLVMdev] MC Register mapping question (MCRegUnitIterator )
Hello Jakob and everyone,
I am observing an issue with MCRegUnitIterator in my back end, and trying
to reverse engineer some of the table gen magic around it, but if you or
someone readily knows the answer, I would highly appreciate it.
Here is the problem.
In my back end we have a rather simple int register file structure:
// Integer registers.
def R0 : Ri< 0, "r0">,
2012 Aug 30
0
[LLVMdev] Assert in LiveInterval update
Hi Sergei, Andy,
Sorry - I got distracted with some other work. I'm looking into this and
PR13719 now. I'll let you know what I find out.
Sergei - thanks very much for the investigation. That should help me pin
this down.
Cheers,
Lang.
On Tue, Aug 28, 2012 at 2:33 PM, Sergei Larin <slarin at codeaurora.org> wrote:
> Andy, Lang,
>
> Thanks for the suggestion.
>
2012 Sep 03
2
[LLVMdev] Assert in LiveInterval update
Hi Sergei,
I just fixed the broken test case for PR13719 with r163107, but from the
debugging output you've posted it suspect it won't fix your test case.
Your analysis looks good - findLastUseBefore(..) doesn't appear to be
handling physregs. I'm surprised that isn't causing more failures. I'll see
if I can find a failing case in the LLVM test-suite (it's been a
2012 Jul 06
0
[LLVMdev] MachineOperand: Subreg defines and the Undef flag
Hi Jakob,
> New_MI_1:: Vreg1 = 0 ; Vreg1 and Vreg2
> are 32 bit virt. regs.
> New_MI_2:: Vreg2 = COPY C:lo_sub_reg.
> New_MI_3:: B= REG_SEQUENCE<Vreg1, hi_sub_reg, Vreg2, lo_sub_reg> ; B
> is a
> 64 bit virt reg.
I used this approach and it worked find until I hit, what I believe is, a
bug in the register coalescer.
When the register
2012 Aug 31
0
[LLVMdev] Assert in LiveInterval update
Lang,
I think I am getting closer to understanding this. The findLastUseBefore()
should probably look something like this:
// Return the last use of reg between NewIdx and OldIdx.
SlotIndex findLastUseBefore(unsigned Reg, SlotIndex OldIdx) {
SlotIndex LastUse = NewIdx;
if (TargetRegisterInfo::isPhysicalRegister(Reg)) {
for (MCRegUnitRootIterator Roots(Reg,
2012 Aug 30
2
[LLVMdev] MC Register mapping question (MCRegUnitIterator )
Hi Sergei,
Register units != sub registers.
Register units are an abstraction to describe overlapping of registers
effectively.
You probably wanted to use MCSubRegIterator.
On Thu, Aug 30, 2012 at 2:30 PM, Sergei Larin <slarin at codeaurora.org> wrote:
> Hello Jakob and everyone,
>
> I am observing an issue with MCRegUnitIterator in my back end, and trying
> to reverse
2012 Jun 13
0
[LLVMdev] Assert in live update from MI scheduler.
On Jun 12, 2012, at 10:22 AM, Sergei Larin <slarin at codeaurora.org> wrote:
>
> Hello everyone,
>
> I am working on a release based on the branch 3.1 version of code.
> Unfortunately it has enough differences that exact rev does not apply.
> I am hitting an assert in liveness update with seemingly trivial code
> (attached).
>
>
2012 Jun 12
2
[LLVMdev] Assert in live update from MI scheduler.
Hello everyone,
I am working on a release based on the branch 3.1 version of code.
Unfortunately it has enough differences that exact rev does not apply.
I am hitting an assert in liveness update with seemingly trivial code
(attached).
/local/mnt/workspace/slarin/tools/llvm-mainline-merged/lib/CodeGen/LiveInter
valAnalysis.cpp:1078: void
2012 Aug 31
2
[LLVMdev] Assert in LiveInterval update
Hi Lang,
Just one more quick question. in LiveIntervalAnalysis.cpp In
SlotIndex findLastUseBefore(unsigned Reg, SlotIndex OldIdx)
Did you really mean to use
for (MachineRegisterInfo::use_nodbg_iterator
UI = MRI.use_nodbg_begin(Reg),
UE = MRI.use_nodbg_end();
UI != UE; UI.skipInstruction()) {}
Aren't we currently dealing with units,
2012 Jul 06
2
[LLVMdev] MachineOperand: Subreg defines and the Undef flag
On Jul 5, 2012, at 6:01 PM, "Pranav Bhandarkar" <pranavb at codeaurora.org> wrote:
> Hi Jakob,
>
>> New_MI_1:: Vreg1 = 0 ; Vreg1 and Vreg2
>> are 32 bit virt. regs.
>> New_MI_2:: Vreg2 = COPY C:lo_sub_reg.
>> New_MI_3:: B= REG_SEQUENCE<Vreg1, hi_sub_reg, Vreg2, lo_sub_reg> ; B
>> is a
>> 64 bit
2012 Jun 13
0
[LLVMdev] Assert in live update from MI scheduler.
Andy,
I traced my problem to this point:
In ScheduleDAGInstrs.cpp we have the following function:
/// addVRegDefDeps - Add register output and data dependencies from this
SUnit
/// to instructions that occur later in the same scheduling region if they
read
/// from or write to the virtual register defined at OperIdx.
///
/// TODO: Hoist loop induction variable increments. This has to be
///
2012 Aug 28
5
[LLVMdev] Assert in LiveInterval update
Andy, Lang,
Thanks for the suggestion.
I have spent more time with it today, and I do see some strange things in
liveness update. I am not at the actual cause yet, but here is what I got so
far:
I have the following live ranges when I start scheduling a region:
R2 = [0B,48r:0)[352r,416r:5)...
R3 = [0B,48r:0)[368r,416r:5)...
R4 = [0B,32r:0)[384r,416r:4)...
R5 = [0B,32r:0)[400r,416r:4)...