search for: allnodes_begin

Displaying 11 results from an estimated 11 matches for "allnodes_begin".

2012 Sep 03
1
[LLVMdev] Selection DAG output as bare DAG, code review
...a block"<<std::endl; static int numberOfBlocks=0; numberOfBlocks++; std::cout<<"-We are in Block:"<<numberOfBlocks<<std::endl; //FIRST OF ALL, LET US TRY NUMBERING THE NODES int in=0; for (SelectionDAG::allnodes_iterator I = CurDAG->allnodes_begin(),E = CurDAG->allnodes_end(); I != E; ++I) { I->setNodeId(in++); } //END NUMBERING THE NODES. //LET'S TRY WRITING A FILE std::ofstream myfile; std::string filename="DDGBLOCK"+convertInt(numberOfBlocks)+".txt"; myfile.open (filename....
2012 Aug 21
0
[LLVMdev] SelectionDAGISel::CodeGenAndEmitDAG() confusion.
...fied the SelectionDAGISel::CodeGenAndEmitDAG() function as follows void SelectionDAGISel::CodeGenAndEmitDAG() { std::string GroupName; //JOE'S EDITS START std::cout<<"Hello everybody Joe was here!"<<std::endl; for (SelectionDAG::allnodes_iterator I = CurDAG->allnodes_begin(),E = CurDAG->allnodes_end(); I != E; ++I) { std::cout<<"start"<<I->getOperationName(CurDAG)<<std::endl; } //JOE'S EDITS END ...and, for santity checking purposes, I've added similar code at the end... // Free the SelectionDAG state, no...
2009 May 20
2
[LLVMdev] [PATCH] Add new phase to legalization to handle vector operations
...bool Changed = false; + + // The vector legalizer is a relatively simple process because it doesn't + // need to legalize everything: it just needs to catch vector operations + // which might expand to libcalls. + DAG.AssignTopologicalOrder(); + for (SelectionDAG::allnodes_iterator I = DAG.allnodes_begin(), + E = prior(DAG.allnodes_end()); I != next(E); ++I) { + bool HasVectorValue = false; + for (SDNode::value_iterator J = I->value_begin(); J != I->value_end(); ++J) + HasVectorValue |= J->isVector(); + if (!HasVectorValue) continue; + SDNode* Result = I; + switch...
2009 Dec 18
2
[LLVMdev] [PATCH] dbgs() Use
...,7 +5998,7 @@ } void SelectionDAG::dump() const { - errs() << "SelectionDAG has " << AllNodes.size() << " nodes:"; + dbgs() << "SelectionDAG has " << AllNodes.size() << " nodes:"; for (allnodes_const_iterator I = allnodes_begin(), E = allnodes_end(); I != E; ++I) { @@ -6008,7 +6009,7 @@ if (getRoot().getNode()) DumpNodes(getRoot().getNode(), 2, this); - errs() << "\n\n"; + dbgs() << "\n\n"; } void SDNode::printr(raw_ostream &OS, const SelectionDAG *G) const { @@ -60...
2009 May 20
0
[LLVMdev] [PATCH] Add new phase to legalization to handle vector operations
...ool Changed = false; + + // The vector legalizer is a relatively simple process because it doesn't + // need to legalize everything: it just needs to catch vector operations + // which might need to be unrolled. + DAG.AssignTopologicalOrder(); + for (SelectionDAG::allnodes_iterator I = DAG.allnodes_begin(), + E = prior(DAG.allnodes_end()); I != next(E); ++I) { + bool HasVectorValue = false; + for (SDNode::value_iterator J = I->value_begin(); J != I->value_end(); ++J) + HasVectorValue |= J->isVector(); + if (!HasVectorValue) continue; + SDNode* Result = I; + switch...
2007 Oct 02
0
[LLVMdev] RFC: Tail call optimization X86
Hi all, I changed the code that checks whether a tail call is really eligible for optimization so that it performs the check/fix in SelectionDAGISel.cpp:BuildSelectionDAG() as suggest by Evan. Also eliminated an error that caused the remaining failing test cases in the test-suite. The results look very nice (on darwin x86, r42486). The same number (46) of failing test cases on patched
2007 Sep 26
3
[LLVMdev] RFC: Tail call optimization X86
On Tue, 25 Sep 2007, Evan Cheng wrote: >> the stack adjustment only fastcc was not one of them. Now that fastcc >> can cause tail call optimization i had to change the convention from >> caller pops arguments to callee pops arguments in order to allow tail >> call optimization in a general way. > > Hmmm. Ok. So this is due to X86CallingConv.td changes? Unfortunately
2007 Oct 04
3
[LLVMdev] RFC: Tail call optimization X86
Comments: CheckDAGForTailCallsAndFixThem - 1. for (SelectionDAG::allnodes_iterator BE = DAG.allnodes_begin(), + BI = prior(DAG.allnodes_end()); BI != BE; BI--) { Please use pre-decrement instead of post-decrement. 2. The function is slower than it should be. You are scanning all the nodes in the DAG twice. You should just examine DAG.getRoot() to make determine whether it's a return or...
2009 May 21
0
[LLVMdev] [PATCH] Add new phase to legalization to handle vector operations
On Wed, May 20, 2009 at 4:55 PM, Dan Gohman <gohman at apple.com> wrote: > Can you explain why you chose the approach of using a new pass? > I pictured removing LegalizeDAG's type legalization code would > mostly consist of finding all the places that use TLI.getTypeAction > and just deleting code for handling its Expand and Promote. Are you > anticipating something more
2009 May 20
2
[LLVMdev] [PATCH] Add new phase to legalization to handle vector operations
On May 20, 2009, at 1:34 PM, Eli Friedman wrote: > On Wed, May 20, 2009 at 1:19 PM, Eli Friedman > <eli.friedman at gmail.com> wrote: > >> Per subject, this patch adding an additional pass to handle vector >> >> operations; the idea is that this allows removing the code from >> >> LegalizeDAG that handles illegal types, which should be a significant
2009 May 21
2
[LLVMdev] [PATCH] Add new phase to legalization to handle vector operations
...ool Changed = false; + + // The vector legalizer is a relatively simple process because it doesn't + // need to legalize everything: it just needs to catch vector operations + // which might need to be unrolled. + DAG.AssignTopologicalOrder(); + for (SelectionDAG::allnodes_iterator I = DAG.allnodes_begin(), + E = prior(DAG.allnodes_end()); I != next(E); ++I) { + bool HasVectorValue = false; + for (SDNode::value_iterator J = I->value_begin(); J != I->value_end(); ++J) + HasVectorValue |= J->isVector(); + if (!HasVectorValue) continue; + SDNode* Result = I; + switch...