search for: removedeadnod

Displaying 20 results from an estimated 23 matches for "removedeadnod".

Did you mean: removedeadnode
2013 Mar 04
1
[LLVMdev] Custom Lowering of ARM zero-extending loads
...D->isNonTemporal(), LD->getAlignment()); Chain = LdResult.getValue(1); SDValue Mask = DAG.getConstant(0x1, MVT::i32); DAG.ReplaceAllUsesOfValueWith(SDValue(LD, 0), LdResult); DAG.ReplaceAllUsesOfValueWith(SDValue(LD, 1), Chain); DAG.RemoveDeadNode(LD); //return DAG.getNode(ISD::AND, dl, MVT::i32, Op, Mask); } } -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130304/1b9f02c6/attachment.html>
2009 May 20
2
[LLVMdev] [PATCH] Add new phase to legalization to handle vector operations
...ME: Handle some special cases: FNEG->FSUB + Result = UnrollVectorOp(SDValue(Result, 0)).getNode(); + break; + } + break; + } + if (&*I != Result) { + Changed = true; + DAG.ReplaceAllUsesWith(I, Result); + } + } + + // Remove dead nodes now. + DAG.RemoveDeadNodes(); + + return Changed; +} + +SDValue VectorLegalizer::PromoteVectorOp(SDValue Op) { + MVT VT = Op.getValueType(); + assert(Op.getNode()->getNumValues() == 1 && + "Can't promote a vector with multiple results!"); + MVT NVT = TLI.getTypeToPromoteTo(Op.getOpcode(...
2017 Jul 29
2
ISelDAGToDAG breaks node ordering
...// Reshuffle LDW's results so that the first two match LOAD's result // type SDValue Unpack[] = { SDValue(LDW, 0), SDValue(LDW, 2), SDValue(LDW, 1) }; SDNode* NN = CurDAG->getMergeValues(Unpack, SDLoc(N)).getNode(); ReplaceUses(N, NN); CurDAG->RemoveDeadNode(N); With this code, I get correct-looking machine instructions, but the node order is all botched up. For example, given this input: SelectionDAG has 8 nodes: t0: ch = EntryToken t2: i16,ch = CopyFromReg t0, Register:i16 %vreg0 t5: i16,ch = load<Volatile LD2[%1](align=1)(derefere...
2009 May 20
0
[LLVMdev] [PATCH] Add new phase to legalization to handle vector operations
...ME: Handle some special cases: FNEG->FSUB + Result = UnrollVectorOp(SDValue(Result, 0)).getNode(); + break; + } + break; + } + if (&*I != Result) { + Changed = true; + DAG.ReplaceAllUsesWith(I, Result); + } + } + + // Remove dead nodes now. + DAG.RemoveDeadNodes(); + + return Changed; +} + +SDValue VectorLegalizer::PromoteVectorOp(SDValue Op) { + MVT VT = Op.getValueType(); + assert(Op.getNode()->getNumValues() == 1 && + "Can't promote a vector with multiple results!"); + MVT NVT = TLI.getTypeToPromoteTo(Op.getOpcode(...
2002 Nov 25
3
[LLVMdev] globals in DS graph
...t; > ... the common node in this case never gets unified. This is one of the > top priorities for me when I get back to Illinois (after thanksgiving > break), but it is unlikely to make much progress in the mean time. If you > would like to disable this behavior, look in the DSGraph::removeDeadNodes > (or similar) in DataStructure.cpp. In it you will see the code that marks > nodes as being "alive" in the current graph. All you have to do is add > code to mark all globals as alive, and they will be propogated up to main. > Alternatively, take a look at the CVS revisio...
2008 Oct 07
2
[LLVMdev] Making Sense of ISel DAG Output
.... When we pop back out to SelectRoot we run into this code: if (ResNode != Node) { if (ResNode) { ReplaceUses(Node, ResNode); } if (Node->use_empty()) { // Don't delete EntryToken, etc. ISelQueueUpdater ISQU(ISelQueue); CurDAG->RemoveDeadNode(Node, &ISQU); UpdateQueue(ISQU); } } Since we did an in-placement replacement the first test fails and we don't call ReplaceUses. I think this is correct EXCEPT that now we have orphaned machine-independent loadf64 and scalar_to_vector nodes that got disconnecte...
2002 Nov 24
4
[LLVMdev] globals in DS graph
I have some questions regarding how globals are represented in DS graph. Specifically, I wrote the following simple program: List *g; void alloc_func(){ g = ( List* ) malloc( sizeof( List ) ); } void free_func(){ free( g ); } int main(){ alloc_func(); free_func(); } I noticed that the DSnode for g in alloc_func is different from that of free_func and NEITHER of them had GlobalNode
2016 Jun 28
0
Question about changes to 'SelectionDAGISel.h'
...his in r269256. 2. Similarly, some places might replace all uses of a node with a new one, then return the new node. Just remove the dead node instead. There was some of this in r269358. 3. Anywhere else where Select returns a node, update it to call ReplaceNode instead (or ReplaceUses + RemoveDeadNode). All of the "Implement Select instead of SelectImpl" commits do some of this. 4. Where a utility function can return null when Select should fall back to another selector, rename that to try*, have it call ReplaceNode, and return a bool for success. 5. Where something calls S...
2017 Jul 31
0
ISelDAGToDAG breaks node ordering
On 7/29/2017 1:28 AM, Dr. ERDI Gergo via llvm-dev wrote: > Hi, > > During instruction selection, I have the following code for certain > LOAD instructions: > > const LoadSDNode *LD = cast<LoadSDNode>(N); > SDNode* LDW = CurDAG->getMachineNode(AVR::LDWRdPtr, SDLoc(N), > VT, PtrVT, MVT::Other, > LD->getBasePtr(), LD->getChain()); >
2002 Nov 25
0
[LLVMdev] globals in DS graph
...uot; global node of g? ... the common node in this case never gets unified. This is one of the top priorities for me when I get back to Illinois (after thanksgiving break), but it is unlikely to make much progress in the mean time. If you would like to disable this behavior, look in the DSGraph::removeDeadNodes (or similar) in DataStructure.cpp. In it you will see the code that marks nodes as being "alive" in the current graph. All you have to do is add code to mark all globals as alive, and they will be propogated up to main. Alternatively, take a look at the CVS revisions a few checkins ba...
2002 Nov 30
1
[LLVMdev] How to get a Module DSGraph?
...to obtain a DSGraph for a complete module, but haven't succeeded. I tried - getting the DSGraph for each function, and copying the nodes to a Module graph. But since there are no nodehandles, apparently there is no merging of nodes. - modifying BUDataStructure Pass so that it will not execute removeDeadNodes() or removeTriviallyDeadNodes(). - couldn't get mergeInGraph() to work, but tried. My main interest is in situations like void *M(int size) { return malloc(size); } void F() { void *p = M(....); } where I can identify that %p and the object returned by M() are the same. nicolas
2004 Aug 06
1
[LLVMdev] Why I cannot use PgmDependenceGraph?
...::Value* const, llvm::DSNodeHandle>, llv] opt(__gnu_cxx::hashtable<std::pair<llvm::Value* const, llvm::DSNodeHandle>, llv] opt(__gnu_cxx::hash_map<llvm::Value*, llvm::DSNodeHandle, __gnu_cxx::hash<llvm:] opt(llvm::DSScalarMap::find(llvm::Value*)+0x1a)[0x84a998e] opt(llvm::DSGraph::removeDeadNodes(unsigned)+0x3e1)[0x847def5] opt(llvm::IPModRef::getFuncInfo(llvm::Function const&, bool)+0xf3)[0x85db297] opt(llvm::IPModRef::run(llvm::Module&)+0xaf)[0x85db189] opt(llvm::PassManagerTraits<llvm::Module>::runPass(llvm::Pass*, llvm::Module*)+] opt(llvm::PassManagerT<llvm::Module&g...
2002 Nov 25
0
[LLVMdev] globals in DS graph
...e common node in this case never gets unified. This is one of the > > top priorities for me when I get back to Illinois (after thanksgiving > > break), but it is unlikely to make much progress in the mean time. If you > > would like to disable this behavior, look in the DSGraph::removeDeadNodes > > (or similar) in DataStructure.cpp. In it you will see the code that marks > > nodes as being "alive" in the current graph. All you have to do is add > > code to mark all globals as alive, and they will be propogated up to main. > > Alternatively, take a loo...
2016 Jun 28
2
Question about changes to 'SelectionDAGISel.h'
Thanks Ahmed and also Alex for your replies. This is more or less what I was realising, but it is a great confidence booster to know that it is the correct way also. I can replace all of my various 'Select*' specialisations with version that use 'ReplaceNode/SelectCode' and return 'void', but what about the places where I currently call 'Select(N)' directly?
2008 Oct 07
0
[LLVMdev] Making Sense of ISel DAG Output
...tRoot we run into this code: > > if (ResNode != Node) { > if (ResNode) { > ReplaceUses(Node, ResNode); > } > if (Node->use_empty()) { // Don't delete EntryToken, etc. > ISelQueueUpdater ISQU(ISelQueue); > CurDAG->RemoveDeadNode(Node, &ISQU); > UpdateQueue(ISQU); > } > } > > Since we did an in-placement replacement the first test fails and we > don't > call ReplaceUses. I think this is correct EXCEPT that now we have > orphaned > machine-independent loadf64 and...
2013 Mar 04
0
[LLVMdev] Unexpected DSAnalysis behavior
On 3/4/13 8:05 AM, Kevin Streit wrote: > Hi, > > during the hunt for a bug causing strange behavior of our automatic > parallelization framework, > I found some, at least for me, unexpected behavior of the > DataStructureAnalysis in Poolalloc. > > Consider the following simplified program: > > ==================== > int ARR[4] = {1, 2, 3, 4}; > > int a(int
2008 Oct 03
0
[LLVMdev] Making Sense of ISel DAG Output
On Fri, October 3, 2008 9:10 am, David Greene wrote: > On Thursday 02 October 2008 19:32, Dan Gohman wrote: > >> Looking at your dump() output above, it looks like the pre-selection >> loads have multiple uses, so even though you've managed to match a >> larger pattern that incorporates them, they still need to exist to >> satisfy some other users. > > Yes,
2008 Oct 03
3
[LLVMdev] Making Sense of ISel DAG Output
On Thursday 02 October 2008 19:32, Dan Gohman wrote: > Looking at your dump() output above, it looks like the pre-selection > loads have multiple uses, so even though you've managed to match a > larger pattern that incorporates them, they still need to exist to > satisfy some other users. Yes, I looked at that too. It looks like these other uses end up being chains to
2013 Mar 04
2
[LLVMdev] Unexpected DSAnalysis behavior
Hi, during the hunt for a bug causing strange behavior of our automatic parallelization framework, I found some, at least for me, unexpected behavior of the DataStructureAnalysis in Poolalloc. Consider the following simplified program: ==================== int ARR[4] = {1, 2, 3, 4}; int a(int pos) { return ARR[pos]; } int sum(int op_a, int op_b) { return a(op_a) + a(op_b); } int
2009 Dec 18
2
[LLVMdev] [PATCH] dbgs() Use
...) << "===== Instruction selection begins:\n"); Indent = 0; #endif SelectRoot(*CurDAG); #ifndef NDEBUG - DEBUG(errs() << "===== Instruction selection ends:\n"); + DEBUG(dbgs() << "===== Instruction selection ends:\n"); #endif CurDAG->RemoveDeadNodes(); @@ -853,7 +853,7 @@ bool is64Bit = Subtarget->is64Bit(); DebugLoc dl = N.getDebugLoc(); DEBUG({ - errs() << "MatchAddress: "; + dbgs() << "MatchAddress: "; AM.dump(); }); // Limit recursion. @@ -1711,9 +1711,9 @@ #ifndef...