search for: sdnode

Displaying 20 results from an estimated 822 matches for "sdnode".

Did you mean: mdnode
2016 Oct 24
2
Accessing the associated LLVM IR Instruction for an SDNode used in instruction selection (back end)
Hello. Quentin, retrieving the LLVM IR instruction from which an SDNode originates is useful during the instruction selection phase. For example, I need to recover the LLVM IR variable which is used to fill an entire vector with the ISD::BUILD_VECTOR target-independent SDNode . From the recovered LLVM IR variable I can walk on the use-def-chains in order to ge...
2016 Oct 21
2
Accessing the associated LLVM IR Instruction for an SDNode used in instruction selection (back end)
Hello. I would like to access the LLVM IR Instruction from which an SDNode (from SelectionDAG) originates. For this I have modified: - llvm/lib/CodeGen/SelectionDAGISel.cpp, SelectionDAGISel::SelectBasicBlock(), namely I put SDB->clear() at the beginning of the method in order to avoid clearing NodeMap after creating the initial SelectionDAG from LLVM IR, sin...
2018 Apr 09
2
Tablegen pattern: How to emit a SDNode in an output pattern?
I'm trying to write a tablegen pattern to that matches a sequence of SDNodes and emits again an SDNode and another instruction. The pattern I've written looks like the folowing: def : Pat<(foo (bar GPR:$rs1), simm12:$imm1), (bar (BAZ GPR:$rs1, simm12:$imm1))>; foo and bar are SDNodes, BAZ is an instruction. In particular, bar is defined as follows: d...
2016 Jun 28
3
Question about changes to 'SelectionDAGISel.h'
It occurred to me that instead of the various breakout 'Select*' functions returning the 'SDNode*' result, maybe I should be calling: ReplaceNode(N, newValue); return; or: SelectCode(N); return; Perhaps? MartinO From: Martin J. O'Riordan [mailto:martin.oriordan at movidius.com] Sent: 28 June 2016 16:49 To: 'LLVM Developers' <llvm-dev...
2009 Aug 01
0
[LLVMdev] RFC: SDNode Flags
On Jul 31, 2009, at 11:26 AM, David Greene wrote: > Right now the MemSDNode keeps a volatile bit in the SubclassData to > mark > volatile memory operations. > > We have some changes we'd like to push back that adds a NonTemporal > flag > to MemSDNode to mark instructions where movnt (on x86) and other > goodness > can happen (we'll als...
2007 Nov 22
2
[LLVMdev] Getting the pointer type from a Load/Store SDNode
I'm digging into this, but I'd like to know if it's feasible to get to the pointer type from a Load/Store SDNode? This would relieve me from having to put the address space information into those SDNodes. Is Load/StoreSDNode->getSrcValue()->getType() going to do what I want? If not, I can't see another way of getting to the pointer type. -- Christopher Lamb -------------- next part --------...
2009 Jul 02
1
[LLVMdev] [Help Needed] tblgen code get a compile error
I am working the AVR backend. It is still in the early stage. I got the following error:[ 86%] Building CXX object lib/Target/AVR/CMakeFiles/LLVMAVRCodeGen.dir/AVRISelDAGToDAG.cpp.obj AVRISelDAGToDAG.cpp C:\llvm-build\lib\Target\AVR\AVRGenDAGISel.inc(596) : error C2664: 'llvm::SDNode *llvm::SelectionDAG::SelectNodeTo(llvm::SDNode *,unsigned int,llvm::MVT,llvm::MVT,llvm::MVT,const llvm::SDValue *,unsigned int)' : cannot convert parameter 6 from 'llvm::SDValue' to 'const llvm::SDValue *' No user-defined-conversion operator available that can perform th...
2016 May 28
4
sum elements in the vector
...gt; >> >> We had done this for generation of X86 PSAD (sum of absolute difference) >> instruction through >> >> Llvm intrinsic. Doing this requires following >> >> 1. Define an intrinsic, xyz(), for the required instruction and >> corresponding SDNode >> >> 2. Generate the “call xyz() “ IR based the matched pattern >> >> 3. Map “call xyz()” IR to corresponding SDNode in >> SelectionDagBuilder.cpp >> >> 4. Provide default expansion of the xyz() intrinsic >> >> 5. Legali...
2009 Aug 03
2
[LLVMdev] RFC: SDNode Flags
On Saturday 01 August 2009 15:12, Dan Gohman wrote: > LoadSDNode, which inherits from MemSDNode is the largest > SDNode. With the current SDNode allocation strategy, making it > bigger will increase the allocation needed for all nodes. Ok. > > new (N) LoadSDNode(..., isVolatile|isNonTemporal); > > > > Thoughts? > > This sounds r...
2015 Feb 18
2
[LLVMdev] local variable in Pattern definition?
Hi guys, When I am trying to define pattern in a multi class, I got something like this: “ multi class P_PAT<string sty, SDNode tNode> { def : Pat<( !cast<ValueType>(“v2” # sty) (tNode !cast<ValueType>(“v2” # sty):$src1, !cast<ValueType>(“v2” # sty):$src2) ), ( add !cast<ValueType>(“v2” # sty):$src1, !cast<ValueType>(“v2” # sty):$src2) >; } “ noticed that in the a...
2016 Jun 28
0
Question about changes to 'SelectionDAGISel.h'
On Tue, Jun 28, 2016 at 8:53 AM, Martin J. O'Riordan via llvm-dev <llvm-dev at lists.llvm.org> wrote: > It occurred to me that instead of the various breakout ‘Select*’ functions > returning the ‘SDNode*’ result, maybe I should be calling: > > > > ReplaceNode(N, newValue); > > return; > > or: > > SelectCode(N); > > return; > > > > Perhaps? Yes, I think the core difference is that Select() - not its caller - now does the replacement, so there...
2016 Oct 29
1
Problems with Inline ASM expressions generated in the back end
...it seems we must malloc the char * that is passed to getTargetExternalSymbol as a reference, so we must make sure the value persists after we get out of this function. Hopefully no leak will happen either - maybe when deleting SDNode the destructor frees the char *. // This seems to be so because of this method doing creation of the SDNode, which is used also by getTargetExternalSymbol(): template <typename SDNodeT, typename... ArgTypes> SDNodeT *newSDNode(A...
2011 Jun 30
1
[LLVMdev] SDNode enum
Hi, The document for "Adding a new SelectionDAG node" ( @ http://llvm.org/releases/2.9/docs/ExtendingLLVM.html#sdnode ) says, "1. include/llvm/CodeGen/SelectionDAGNodes.h: Add an enum value for the new SelectionDAG node." Where exactly shall one add the info for new SelectionDAG ? I dont see enums for other SDnodes too. Please help. Regards, Ankur
2007 Nov 22
0
[LLVMdev] Getting the pointer type from a Load/Store SDNode
On Wed, 21 Nov 2007, Christopher Lamb wrote: > I'm digging into this, but I'd like to know if it's feasible to get to the > pointer type from a Load/Store SDNode? This would relieve me from having to > put the address space information into those SDNodes. > > Is Load/StoreSDNode->getSrcValue()->getType() going to do what I want? > If not, I can't see another way of getting to the pointer type. Hrm, the codegen has a couple of intere...
2009 Feb 24
3
[LLVMdev] [llvm-commits] [llvm] r65296 - in /llvm/trunk: include/llvm/CodeGen/ lib/CodeGen/SelectionDAG/ lib/Target/CellSPU/ lib/Target/PowerPC/ lib/Target/X86/ test/CodeGen/X86/
...geman <natebegeman at me.com> > wrote: > > On Feb 23, 2009, at 1:46 PM, Chris Lattner wrote: > > In my opinion, the proper direction for shuffles is: > > 1. Back out your patch. > 2. Move the functionality of "is splat" etc to method somewhere, e.g. > on SDNode. > 3. Introduce a new ShuffleVectorSDNode that only has two SDValue > operands (the two input vectors), but that also contains an array of > ints in the node (not as operands). > 4. Move the helper functions from #2 back into ShuffleVectorSDNode. > > I'm working on #2 and #3 r...
2016 Apr 04
7
sum elements in the vector
...ment it in my compiler but I'm not sure even where to start. I did look at other targets, but they don't seem to have anything like it ( I could be wrong. My experience with LLVM is limited, so if I missed it, I'd appreciate if someone could point it out ). My understanding is that if SDNode for such an instruction doesn't exist I have to define one. Unfortunately, I don't know how to do it. I don't even know where to start looking. Would someone care to point me in the right direction? Any help is appreciated. -- Rail Shafigulin Software Engineer Esencia Technologies --...
2009 Feb 23
2
[LLVMdev] [llvm-commits] [llvm] r65296 - in /llvm/trunk: include/llvm/CodeGen/ lib/CodeGen/SelectionDAG/ lib/Target/CellSPU/ lib/Target/PowerPC/ lib/Target/X86/ test/CodeGen/X86/
...;> benefit. >> > > It's not entirely gratuitous; the rationale for adding a new node class is > threefold: > > I don't see this. Adding some helper methods would have the same > functionality. And the first thing the helper method would have to check is if this SDNode is a BUILD_VECTOR node, right? b) Where else would one encapsulate a constant splat predicate? >> SelectionDAG and SDNode are not good classes for constant splat detection, >> since it's functionality specific to building vectors. >> > > Eventually we need to add a Shu...
2016 May 27
0
sum elements in the vector
...gt; wrote: > Hi Rail, > > > > We had done this for generation of X86 PSAD (sum of absolute difference) > instruction through > > Llvm intrinsic. Doing this requires following > > 1. Define an intrinsic, xyz(), for the required instruction and > corresponding SDNode > > 2. Generate the “call xyz() “ IR based the matched pattern > > 3. Map “call xyz()” IR to corresponding SDNode in > SelectionDagBuilder.cpp > > 4. Provide default expansion of the xyz() intrinsic > > 5. Legalize type and/or operation > > 6...
2016 May 30
0
sum elements in the vector
...had done this for generation of X86 PSAD (sum of absolute difference) >>> instruction through >>> >>> Llvm intrinsic. Doing this requires following >>> >>> 1. Define an intrinsic, xyz(), for the required instruction and >>> corresponding SDNode >>> >>> 2. Generate the “call xyz() “ IR based the matched pattern >>> >>> 3. Map “call xyz()” IR to corresponding SDNode in >>> SelectionDagBuilder.cpp >>> >>> 4. Provide default expansion of the xyz() intrinsic >&...
2009 Feb 23
2
[LLVMdev] [llvm-commits] [llvm] r65296 - in /llvm/trunk: include/llvm/CodeGen/ lib/CodeGen/SelectionDAG/ lib/Target/CellSPU/ lib/Target/PowerPC/ lib/Target/X86/ test/CodeGen/X86/
On Feb 23, 2009, at 1:46 PM, Chris Lattner wrote: > In my opinion, the proper direction for shuffles is: > > 1. Back out your patch. > 2. Move the functionality of "is splat" etc to method somewhere, e.g. > on SDNode. > 3. Introduce a new ShuffleVectorSDNode that only has two SDValue > operands (the two input vectors), but that also contains an array of > ints in the node (not as operands). > 4. Move the helper functions from #2 back into ShuffleVectorSDNode. I'm working on #2 and #3 right now,...