Displaying 20 results from an estimated 1000 matches similar to: "How to handle ISD::STORE when both operands are FrameIndex?"
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**
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
2019 Jun 26
2
How to handle ISD::STORE when both operands are FrameIndex?
On Wed, Jun 26, 2019 at 12:38 PM Tim Northover <t.p.northover at gmail.com>
wrote:
> Hi Gleb,
>
> On Wed, 26 Jun 2019 at 07:28, Gleb Popov <6yearold at gmail.com> wrote:
> > def StoreStackF : InstRI<2, (outs), (ins IntRegs:$reg, i32imm:$i),
> > "storestackf $reg, [$i]", [(store_stack i32:$reg,
> AddrFI:$i)]>;
> >
>
2018 Apr 10
1
How to finalize instruction lowering after register allocation.
Hi,
I've some problems/questions while implementing the BUILD_VECTOR primitive for a SIMD microcontroller...
This microcontroller has two FPU units: UnitA and UnitB.
UnitA has a bank of 512 registers named RegisterA_0 .. RegisterA_511.
UnitB has a bank of 512 registers named RegisterB_0 .. RegisterB_511.
The FPU instruction format has a 2 bits operand indicating which units are involved:
2019 Jan 22
2
Different SelectionDAGs for same CPU
Hi,
I used 2 different compilers to compile the same IR for the same custom target.
The LLVM IR code is
define i32 @_Z9test_mathv() #0 {
%a = alloca i32, align 4
%1 = load i32, i32* %a, align 4
ret i32 %1
}
Before instruction selection, the Selection DAGs are the same:
Optimized legalized selection DAG: %bb.0 '_Z9test_mathv:'
SelectionDAG has 7 nodes:
t0: ch = EntryToken
t4:
2019 Jan 26
2
Different SelectionDAGs for same CPU
Hi Tim,
>That C++ function is probably what looks for an FrameIndex node and
>has been taught that it can be folded into the load.
How do you teach a function that a node can be folded into an instruction?
________________________________
From: Tim Northover <t.p.northover at gmail.com>
Sent: Monday, January 21, 2019 11:52 PM
To: Josh Sharp
Cc: via llvm-dev
Subject: Re: [llvm-dev]
2007 Dec 04
1
[LLVMdev] Using frameindex in a pattern
Evan Cheng wrote:
>
> On Dec 3, 2007, at 12:53 PM, Vladimir Prus wrote:
>
>>
>> Suppose I have a target that does not have register+constant
>> addressing mode. Then, I have DAG like:
>>
>> (store ..., (frameindex))
>>
>> Targets like SPARC have the following patterns to catch this:
>>
>> def ADDRri : ComplexPattern<i32, 2,
2014 Dec 05
2
[LLVMdev] illegal code generated for special architecture
Hi!
I'm making a strange observation in my backend, that ends in illegal code:
Version 1:
- I lower FrameIndex to TargetFrameIndex (nothing special)
- I generate a special address-register ADD instruction in eliminateFrameIndex() to write FramePointer + offset into a new address-register
- I use explicit load and store and address-registers in my target instruction patterns:
eg (store
2018 May 04
2
How to constraint instructions reordering from patterns?
Hi,
Is there a kind of scope mechanism in the instruction lowering pattern language in order to control where instructions are inserted or how they are later reordered during the SelectionDiag linearization?
I know the glue chain that stick instructions together. But such mechanism in not provided in instruction lowering pattern.
I'm facing many situations where some patterns are lowered into
2018 May 04
2
How to constraint instructions reordering from patterns?
The DAG dumping will try to print some of the nodes "inline" (i.e. where
they are used) to make the output more readable, so the dump of the DAG
may not strictly reflect the node ordering.
-Krzysztof
On 5/4/2018 8:18 AM, Dominique Torette via llvm-dev wrote:
> Here is a last example to illustrate my concern.
>
> The problem is about the lowering of node t13.
>
>
2018 May 04
0
How to constraint instructions reordering from patterns?
Here is a last example to illustrate my concern.
The problem is about the lowering of node t13.
Initial selection DAG: BB#0 '_start:entry'
SelectionDAG has 44 nodes:
t11: i16 = Constant<0>
t0: ch = EntryToken
t3: ch = llvm.clp.set.rspa t0, TargetConstant:i16<392>, Constant:i32<64>
t5: ch = llvm.clp.set.rspb t3,
2018 May 04
0
How to constraint instructions reordering from patterns?
Krzysztof,
Thanks for your interest to my questions.
In order to clarify the context, here is the C source file of my test case.
The 3 builtins initialize some stack pointers. They have to be executed before any other instruction.
extern float fdivfaddfmul_a(float a, float b, float c, float d);
volatile static float x1,x2,x3,x4;
void _start(void)
{
float res;
2010 Sep 25
2
[LLVMdev] Strange exception in SelectionDAGBuilder
I'm working on the code to handle GC tracing of "intermediate values" (as
described in the GC doc), and I've run into a weird problem. (Note, this has
nothing to do with the patch I have proposed, this error occurs with regular
old pointer-allocas.)
The exception I am getting occurs in this code here in
SelectionDAGBuilder.cpp:
*case* *Intrinsic*::gcroot:
*if* (GFI) {
2018 Dec 17
4
In ISel, where Constant<0> comes from?
Hello, LLVM devs.
I'm compiling the following simple IR:
define dso_local i32 @main(i32 %argc, i8** %argv) {
entry:
%retval = alloca i32, align 4
%argc.addr = alloca i32, align 4
%argv.addr = alloca i8**, align 8
store i32 0, i32* %retval, align 4
store i32 %argc, i32* %argc.addr, align 4
store i8** %argv, i8*** %argv.addr, align 8
ret i32 0
}
using `llc -march=sparc
2020 Feb 18
2
Function Return Legalization
Hi llvm-dev,
>> The CopyFromReg->CopyToReg->CopyFromReg sequence doesn’t have the chains set correctly: the second CopyFromReg’s input chain isn’t connected to the CopyToReg’s output chain. (This appears to be the same problem in both graphs.)
The DAG mentioned was generated by the SelectionDAGBuilder and as much as possible, we only modify the files within our target so I tried
2018 Dec 18
2
In ISel, where Constant<0> comes from?
On Tue, 18 Dec 2018 at 07:11, Gleb Popov via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> However, I haven't managed to get a "Constant<>" in the DAG when compiling for X86. I'm interested in how it is lowered. Can you please give me some guidance on this?
How are you looking? When I run "llc -mtriple=x86_64-linux-gnu
-debug-only=isel" on your IR I get
2016 Jul 30
1
Instruction selection bug for vector store with FixedStack
Hello.
Could you please help me solve the following LLC bug happening at instruction
selection time:
ISEL: Starting pattern match on root node: t172: ch = store<ST64[FixedStack6]>
t0, t6, FrameIndex:i64<6>, undef:i64
Initial Opcode index to 157
Skipped scope entry (due to false predicate) at index 162, continuing at 236
Match failed at
2019 Feb 13
2
Question about register allocation
Hi,
I'd like to understand how register allocation works in the case where an instruction is folded into another one. Where in the code would be a good place to start looking at?
After ISEL, one of the instructions has another instruction folded into it, which looks like this
t1: i32,i1,i1,i1,i1 = ADDRR TargetFrameIndex:i32<0>, MOVRI:i32,i1,i1
But during the 'Assembly
2009 Mar 18
2
[LLVMdev] Selecting FrameIndex
Hi All
I'm having nightmares with FrameIndexes during my backend development :(
I have ComplexPatterns defined for my two addressing modes (RR and
RI). Most of the time, FrameIndex operands appear to be on load/store
nodes, in which case everything works fine as my custom addressing
modes matchers work fine.
Unfortunately, I now have an add node which has a FrameIndex operand
(this results
2007 Dec 03
2
[LLVMdev] Using frameindex in a pattern
Suppose I have a target that does not have register+constant
addressing mode. Then, I have DAG like:
(store ..., (frameindex))
Targets like SPARC have the following patterns to catch this:
def ADDRri : ComplexPattern<i32, 2,
"SelectADDRri", [frameindex], []>;
def STri : F3_2<3, 0b000100,
(outs), (ins MEMri:$addr, IntRegs:$src),