Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] Generate addi 40, r3 instruction"
2013 Apr 05
0
[LLVMdev] Generate addi 40, r3 instruction
Hi Vikram,
The error message would be helpful, but the most likely problem is the
duplication of $dst. It should probably be:
def ADDI : F1<opcode, (outs IntRegs:$dst), (ins IntRegs:$src, i32imm:$imm)
"addi $imm, $dst",
[(set $IntRegs:$dst, (add $IntRegs:$src, i32imm:$c))]> {
let Constraints = "$src = $dst";
}
i.e. separate
2007 Oct 19
2
[LLVMdev] Adding address registers to back-end
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 AddrRegs
2) I registered the class AddrRegs (addRegisterClass(MVT::iPTR, .. ))
3) I
2019 Jun 26
2
How to handle ISD::STORE when both operands are FrameIndex?
On Tue, Jun 25, 2019 at 9:59 AM Tim Northover <t.p.northover at gmail.com>
wrote:
> On Tue, 25 Jun 2019 at 06:26, Gleb Popov via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> >> While the store is being selected LLVM will just treat the value being
> >> stored as a generic pointer-width integer unless you have written a
> >> specific pattern for
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
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.
>
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
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
2006 Oct 01
2
[LLVMdev] Instruction descriptions question
Hi,
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.
But when I look into the X86InstrInfo.td, I have a very strong feeling
that it is one of the most complex instruction set descriptions
compared to other targets. I can imagine that this is due to the
complexity of X86's
2013 Mar 24
5
[LLVMdev] Types in TableGen instruction selection patterns
I have updated TableGen to support a new format for instruction selection patterns.
Before:
def : Pat<(subc IntRegs:$b, IntRegs:$c), (SUBCCrr IntRegs:$b, IntRegs:$c)>;
After:
def : Pat<(subc i32:$b, i32:$c), (SUBCCrr $b, $c)>;
Since the pattern matching happens on a DAG with type labels, not register classes, I think it makes more sense to specify types directly on the input
2009 Oct 20
0
[LLVMdev] No DWARF line number info with HasDotLocAndDotFile = true
Richard Osborne wrote:
> It seems to me that emitting DWARF line number information using .loc
> directives is currently broken. CellSPU is currently the only in tree
> target that sets HasDotLocAndDotFile in its MCAsmInfo and I can't get it
> to produce any line number information.
>
I think I understand why this is happening. Since HasDotLocAndDotFile is
set the
2012 Mar 07
0
[LLVMdev] Data/Address registers
On Mar 7, 2012, at 6:23 AM, Ivan Llopard <ivanllopard at gmail.com> wrote:
> Hi Jim,
>
> Thanks for your response.
>
> Le 06/03/2012 22:54, Jim Grosbach a écrit :
>> Hi Ivan,
>> On Mar 3, 2012, at 4:48 AM, Ivan Llopard<ivanllopard at gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I'm facing a problem in llvm while porting it
2008 Jun 27
2
[LLVMdev] Implementing llvm.atomic.cmp.swap.i32 on PowerPC
Hi all,
I'm trying to figure out how to add the instructions required for
llvm.atomic.cmp.swap.i32 on PowerPC. I figured out LWARX (patch
attached) but the other two (CMP_UNRESw and STWCX) require multiple
instructions:
let Defs = [CR0] in {
def STWCX : Pseudo<(outs), (ins GPRC:$rS, memrr:$dst, i32imm:$label),
"stwcx. $rS, $dst\n\tbne-
2013 May 27
0
[LLVMdev] Problem with LEA_ADDri
Hi
The construct in sparc
def LEA_ADDri : F3_2<2, 0b000000,
(outs IntRegs:$dst), (ins MEMri:$addr),
"add ${addr:arith}, $dst",
[(set IntRegs:$dst, ADDRri:$addr)]>;
generate instruction like : add %fp, -20, %l1
in my port it generate like : addi %fp, -20, %r2
But the problem is that our ISA does not support the
2009 Mar 27
0
[LLVMdev] atomic operations for ARM
Hi,
I have reworked my previous example and got something which is accepted
by tblgen:
let isCall = 1,
Defs = [R0, R1, R2, R3, R12, LR,
D0, D1, D2, D3, D4, D5, D6, D7, CPSR] in {
def ARM_ATOMIC_CMP_SWAP : ABXI<0b1011, (outs GPR:$dst), (ins
i32imm:$ptr, i32imm:$old, i32imm:$new),
"do_something",
[(set GPR:$dst,
(atomic_cmp_swap_32
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 25
2
How to handle ISD::STORE when both operands are FrameIndex?
On Mon, Jun 24, 2019 at 4:08 PM Tim Northover <t.p.northover at gmail.com>
wrote:
> On Mon, 24 Jun 2019 at 12:16, Gleb Popov via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > 1. Where does it come from? Can I do anything to make it not appear?
>
> It comes from something like:
>
> %ptr = alloca i8
> %var = alloca i8*
> store i8* %ptr, i8**