Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] Pattern matching in a SelectionDAG"
2010 Nov 24
1
[LLVMdev] Selecting BRCOND instead of BRCC
Hi everyone,
I have the following code (as part of a larger function):
%0 = icmp eq i16 %a, 0 ; <i1> [#uses=1]
br i1 %0, label %bb1, label %bb
I would like to match this with a BRCOND, but all I get is an error message
when compiling the above code that say:
LLVM ERROR: Cannot yet select: 0x170f200: ch = br_cc 0x170f000, 0x170ed00,
0x170dc60, 0x170ec00, 0x170ef00 [ID=19]
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
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 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 19
2
[LLVMdev] How to define macros in a tablegen file?
Hi,
I was wondering if there is a way to specify macros to help shorten
rewriting patterns like these:
def : Pat <(v4i8 (mul (v4i8 IntRegs:$a), (v4i8 IntRegs:$b))),
(v4i8
(VTRUNEHB
(v4i16
(VTRUNEWH
(v2i32
(VMPYH
(v2i16
(EXTRACT_SUBREG (v4i16 (VSXTBH (v4i8 IntRegs:$a))), subreg_hireg)),
(v2i16
(EXTRACT_SUBREG (v4i16 (VSXTBH (v4i8
2019 Jun 30
6
[hexagon][PowerPC] code regression (sub-optimal code) on LLVM 9 when generating hardware loops, and the "llvm.uadd" intrinsic.
Hi All,
The following code :
void hexagon2( int *a, int *res )
{
int i = 100;
while ( i-- ) {
*res++ = *a++;
}
}
gets compiled as a sub-optimal Software loop on LLVM 9.0 instead of a Hardware loop, whereas it was compiled as a Hardware Loop in LLVM 7.0.
This is the final assembly code generated by LLVM 9.0 :
.text
.file "main.c"
.globl hexagon2 // --
2010 Dec 15
2
[LLVMdev] Optimization passes break machine instructions on new backend
Hello!
I'm working on a new back-end and have hit a bit of a snag. I'm working on
getting selectcc working and have followed the MSP430 model of emitting a
custom CMP and SELECT_CC node and matching that with a pseudo-instruction
that has useCustomEmitter=1. However, my output ends up very wrong, despite
the Machine code being initially correct:
# Machine code for function func:
Function
2012 Sep 18
2
[LLVMdev] liveness assertion problem in llc
Hi,
I am working on a backend for a CGRA architecture with advanced predicate support (as on EPIC machines and as first used in the OpenIMPACT compiler). Until last month, the backend was working fine, but since the r161643 commit by stoklund, my backend doesn't work anymore. I think I noticed some related commits later on, and the assertion I get on the latest trunk (r164162) differs from
2013 Apr 05
3
[LLVMdev] Generate addi 40, r3 instruction
I want to generate the instruction like
addi 40, r3 ! i.e. r3 = r3 + 40
The format i wrote is
def ADDI : F1<opcode, (outs IntRegs:$dst), (ins IntRegs:$dst, i32imm:$imm)
"addi $imm, $dst",
[(set $IntRegs:$dst, (add $IntRegs:$dst, i32imm:$c))]
but it is not compiling.
what should be the format.
vikram
--
View this message
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 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 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 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,
2006 Oct 02
0
[LLVMdev] Instruction descriptions question
On Sun, 1 Oct 2006, Roman Levenstein wrote:
> I'm trying to implement a new backend for an embedded CISC processor.
> Therefore I thought that it makes sense to take X86 target as a basis,
> to save some time.
Ok. Note that the X86 backend is one of the most complex though, because
it supports several subtargets and ABIs, which makes it more complex than
some other targets.
>
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">,
2007 Oct 19
0
[LLVMdev] Adding address registers to back-end
On Oct 19, 2007, at 8:15 AM, Boris Boesler wrote:
> Hi!
>
> I'm writing a new back-end for a new architecture. First, I'll do
> some "tests" with an existing back-end (I chose the Sparc back-end).
> My architecture has special address-registers and I want to add such
> new address-registers to my Sparc back-end.
>
> 1) I defined a new register call
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 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)...
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