search for: removedeadnodes

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

2013 Mar 04
1
[LLVMdev] Custom Lowering of ARM zero-extending loads
Hi, For my research, I need to reshape the current ARM backend to support armv2a. Zero-extend half word load (ldrh) is not supported by armv2a, so I need to make the code generation to not generate ldrh instructions. I want to replace all those instances with a 32-bit load (ldr) and then and the result with 0xffff to mask out the upper bits. These are the modifications that I have made to
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
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()); // Honestly, I have no idea what this does, but other memory // accessing instructions
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 revisions...
2008 Oct 07
2
[LLVMdev] Making Sense of ISel DAG Output
On Friday 03 October 2008 12:06, Dan Gohman wrote: > 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
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'
"Martin J. O'Riordan" <martin.oriordan at movidius.com> writes: > 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
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 back...
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>...
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 look...
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
On Oct 7, 2008, at 12:04 PM, David Greene wrote: > On Friday 03 October 2008 12:06, Dan Gohman wrote: >> 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
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 N...