[llvm-commits] CVS: llvm/docs/GetElementPtr.html
Changes in directory llvm/docs: GetElementPtr.html updated: 1.13 -> 1.14 --- Log message: Fix validation problem --- Diffs of the changes: (+3 -3) GetElementPtr.html |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/docs/GetElementPtr.html diff -u llvm/docs/GetElementPtr.html:1.13 llvm/docs/GetElementPtr.html:1.14 --- llvm/docs/GetElementPtr.html:1.13 Wed Aug 16 22:25:07 2006 +++ llvm/docs/GetElementPtr.htmlWed Aug 16 22:26:50 2006 @@ -88,8 +88,8 @@ X = &Foo[0].F; Sometimes this question gets rephrased as: - Why is it okay to index through the first pointer, but - subsequent pointers won't be dereferenced? + Why is it okay to index through the first pointer, but + subsequent pointers won't be dereferenced? The answer is simply because memory does not have to be accessed to perform the computation. The first operand to the GEP instruction must be a value of a pointer type. The value of the pointer is provided directly to @@ -305,7 +305,7 @@ http://validator.w3.org/check/referer";>http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01!" /> http://llvm.org";>The LLVM Compiler Infrastructure - Last modified: $Date: 2006/08/17 03:25:07 $ + Last modified: $Date: 2006/08/17 03:26:50 $ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/docs/GetElementPtr.html
Changes in directory llvm/docs: GetElementPtr.html updated: 1.12 -> 1.13 --- Log message: remove IRC transcript. Anything still misunderstood after the faq is read can be added to the faq. --- Diffs of the changes: (+1 -327) GetElementPtr.html | 328 - 1 files changed, 1 insertion(+), 327 deletions(-) Index: llvm/docs/GetElementPtr.html diff -u llvm/docs/GetElementPtr.html:1.12 llvm/docs/GetElementPtr.html:1.13 --- llvm/docs/GetElementPtr.html:1.12 Wed Aug 16 00:53:32 2006 +++ llvm/docs/GetElementPtr.htmlWed Aug 16 22:25:07 2006 @@ -297,332 +297,6 @@ -Appendix: Discussion - - - The following is a real discussion from the - #llvm IRC channel about the GEP - instruction. You may find this instructive as it was the basis for this - document. - -UserComment -YorionIf x & y must alias, are [ getelementptr x,0,0,1,2 ] and [ getelementptr x,1,2 ] aliased? (they obviously have different types, but they should alias...) -Yorionoops, for the second one I meant [ getelementptr y,1,2 ] -ReidI don't see how that could be, Yorion but I'm not the authority on this -Yorionhmm.. -Reidthe two geps, by definition, are going to produce different pointers which are not aliased -Yorionwould [ GEP x,1,0 ] and [ GEP y,1 ] be aliased? -Reidif the second gep was [gep y,0,0,1,2] then they should be aliased as well -Reidno, I wouldn't expect that to work either :) -Reidyou can't just arbitrarily drop leading or trailing indices :) -Reid(.. leading or trailing 0 indices, I mean) -Reidthis instruction walks through a data structure and generates a pointer to the resulting thing -Reidif the number of indices are different, you're ending up at a different place and by definition they'll have different addresses -Yorionoh, I see, because of different types, [ GEP x,0,1 ] -& [ GEP x,1 ] actually might refer to different fields, but might also refer to the same ones... -Reidor, at least, that's my crude understanding of it :) -Reidno, they'll definitely refer to different fields -nicholasGEP x,0,1 ==> &((*(x+0))+1)? vs. GEP x,1 ==> &(*(x+1))? -Reidlemme grok that for a sec -Reidthat might be true in some limited definition of x, but it wouldn't be generally -nicholasoh. fields of different sizes in a structure. -Reidyup -Yorionis perhaps the type unification the reason why [ GEP x,0,1 ] and [ GEP x,1 ] cannot alias? -Reidno -Reidthey may or may not have the same type, but they are definitely different pointers -Reidlets use a concrete example for "x" -Reidsuppose x is "struct {int a, float b} *" -ReidGEP X,0,1 is going to return the address of b -ReidGEP X,1 is going to return the address of the *second* "a" (after the first b) -Yorionah, I see... -Yoriontrailing zeros are still a bit confusing... -Reidsame thing .. you're just selecting the 0th member of an array or structure -Yorionyou don't move away from the pointer, only the type is changed -Reidno, you still move away from the pointer .. the type might change, or not -Reidthe pointer definitely changes -Reidlets look at an example for trailing zero -Reidsuppose x is "int x[10][10][10][10]" (in C) -ReidGEP X,0,0 will yield you a 3 dimensional array -ReidGEP X,0,0,0,0,0 will yield you an "int" -Reidmake sense? -Yorionyes -Reidso, I think there's a law here: if the number of indices in two GEP instructions are not equivalent, there is no way the resulting pointers can alias -Reid(assuming the x and y alias) -YorionI was confused with some code in BasicAliasAnalysis that says that two pointers are equal if they differ only in trailing zeros -YorionBasicAliasAnalysis.cpp:504-518 -Reidlemme look -nicholasif y1 = GEP X, 0, 0 and y2 = GEP X, 0, 0, 0, 0, 0 (from Reid's example) -nicholasthen doesn't *y1 and *y2 both refer to the same "int"? -Reidthey shouldn't -Reidhmm .. actually, maybe you're right :) -Reidthey definitely have different *types* -Yoriontrue -nicholasdifferent types just doesn't cut it. :) -Reid.. thinking on this :) -nicholassimilarly, i could create a yucky with a struct that has a char *, then have you GEP right through the pointer into the pointed-to data. That could mean that the resulting point might alias anything. -Yorionmy theory (after reading BAA) is that all zeros can be omitted, and that the pointers alias if they have the same sequence of indices -Yorionhowever, this screws the typing, so that's why zeros are for -Yorionnicholas, does that match your hunch? -nicholasI have to admit, I've had much grief with GEPIs already. I wish the semantics were plainly documented as part of their own language, instead of just relying on C aliasing rules and C semantics... -nicholasYorion: leading zeroes
[llvm-commits] CVS: llvm/include/llvm/CodeGen/ScheduleDAG.h
Changes in directory llvm/include/llvm/CodeGen: ScheduleDAG.h updated: 1.31 -> 1.32 --- Log message: switch the SUnit pred/succ sets from being std::sets to being smallvectors. This reduces selectiondag time on kc++ from 5.43s to 4.98s (9%). More significantly, this speeds up the default ppc scheduler from ~1571ms to 1063ms, a 33% speedup. --- Diffs of the changes: (+30 -3) ScheduleDAG.h | 33 ++--- 1 files changed, 30 insertions(+), 3 deletions(-) Index: llvm/include/llvm/CodeGen/ScheduleDAG.h diff -u llvm/include/llvm/CodeGen/ScheduleDAG.h:1.31 llvm/include/llvm/CodeGen/ScheduleDAG.h:1.32 --- llvm/include/llvm/CodeGen/ScheduleDAG.h:1.31Wed Aug 16 17:12:48 2006 +++ llvm/include/llvm/CodeGen/ScheduleDAG.h Wed Aug 16 19:09:56 2006 @@ -82,9 +82,16 @@ // Preds/Succs - The SUnits before/after us in the graph. The boolean value // is true if the edge is a token chain edge, false if it is a value edge. -std::set > Preds; // All sunit predecessors. -std::set > Succs; // All sunit successors. +SmallVector, 4> Preds; // All sunit predecessors. +SmallVector, 4> Succs; // All sunit successors. +typedef SmallVector, 4>::iterator pred_iterator; +typedef SmallVector, 4>::iterator succ_iterator; +typedef SmallVector, 4>::const_iterator + const_pred_iterator; +typedef SmallVector, 4>::const_iterator + const_succ_iterator; + short NumPreds; // # of preds. short NumSuccs; // # of sucss. short NumPredsLeft; // # of preds not scheduled. @@ -111,6 +118,26 @@ Latency(0), CycleBound(0), Cycle(0), Depth(0), Height(0), NodeNum(nodenum) {} +/// addPred - This adds the specified node as a pred of the current node if +/// not already. This returns true if this is a new pred. +bool addPred(SUnit *N, bool isChain) { + for (unsigned i = 0, e = Preds.size(); i != e; ++i) +if (Preds[i].first == N && Preds[i].second == isChain) + return false; + Preds.push_back(std::make_pair(N, isChain)); + return true; +} + +/// addSucc - This adds the specified node as a succ of the current node if +/// not already. This returns true if this is a new succ. +bool addSucc(SUnit *N, bool isChain) { + for (unsigned i = 0, e = Succs.size(); i != e; ++i) +if (Succs[i].first == N && Succs[i].second == isChain) + return false; + Succs.push_back(std::make_pair(N, isChain)); + return true; +} + void dump(const SelectionDAG *G) const; void dumpAll(const SelectionDAG *G) const; }; @@ -127,7 +154,7 @@ public: virtual ~SchedulingPriorityQueue() {} -virtual void initNodes(const std::vector &SUnits) = 0; +virtual void initNodes(std::vector &SUnits) = 0; virtual void releaseState() = 0; virtual bool empty() const = 0; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp ScheduleDAGList.cpp ScheduleDAGRRList.cpp
Changes in directory llvm/lib/CodeGen/SelectionDAG: ScheduleDAG.cpp updated: 1.100 -> 1.101 ScheduleDAGList.cpp updated: 1.65 -> 1.66 ScheduleDAGRRList.cpp updated: 1.12 -> 1.13 --- Log message: switch the SUnit pred/succ sets from being std::sets to being smallvectors. This reduces selectiondag time on kc++ from 5.43s to 4.98s (9%). More significantly, this speeds up the default ppc scheduler from ~1571ms to 1063ms, a 33% speedup. --- Diffs of the changes: (+82 -78) ScheduleDAG.cpp | 56 +++--- ScheduleDAGList.cpp | 44 ScheduleDAGRRList.cpp | 60 +- 3 files changed, 82 insertions(+), 78 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.100 llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.101 --- llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.100 Mon Aug 7 17:12:12 2006 +++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Wed Aug 16 19:09:56 2006 @@ -84,7 +84,7 @@ N = *UI; break; } - if (!HasFlagUse) break; + if (!HasFlagUse) break; } // Now all flagged nodes are in FlaggedNodes and N is the bottom-most node. @@ -150,7 +150,7 @@ assert(OpVT != MVT::Flag && "Flagged nodes should be in same sunit!"); bool isChain = OpVT == MVT::Other; -if (SU->Preds.insert(std::make_pair(OpSU, isChain)).second) { +if (SU->addPred(OpSU, isChain)) { if (!isChain) { SU->NumPreds++; SU->NumPredsLeft++; @@ -158,7 +158,7 @@ SU->NumChainPredsLeft++; } } -if (OpSU->Succs.insert(std::make_pair(SU, isChain)).second) { +if (OpSU->addSucc(SU, isChain)) { if (!isChain) { OpSU->NumSuccs++; OpSU->NumSuccsLeft++; @@ -176,35 +176,35 @@ return; } -static void CalculateDepths(SUnit *SU, unsigned Depth) { - if (SU->Depth == 0 || Depth > SU->Depth) { -SU->Depth = Depth; -for (std::set >::iterator I = SU->Succs.begin(), - E = SU->Succs.end(); I != E; ++I) - CalculateDepths(I->first, Depth+1); +static void CalculateDepths(SUnit &SU, unsigned Depth) { + if (SU.Depth == 0 || Depth > SU.Depth) { +SU.Depth = Depth; +for (SUnit::succ_iterator I = SU.Succs.begin(), E = SU.Succs.end(); + I != E; ++I) + CalculateDepths(*I->first, Depth+1); } } void ScheduleDAG::CalculateDepths() { SUnit *Entry = SUnitMap[DAG.getEntryNode().Val]; - ::CalculateDepths(Entry, 0U); + ::CalculateDepths(*Entry, 0U); for (unsigned i = 0, e = SUnits.size(); i != e; ++i) if (SUnits[i].Preds.size() == 0 && &SUnits[i] != Entry) { - ::CalculateDepths(&SUnits[i], 0U); + ::CalculateDepths(SUnits[i], 0U); } } -static void CalculateHeights(SUnit *SU, unsigned Height) { - if (SU->Height == 0 || Height > SU->Height) { -SU->Height = Height; -for (std::set >::iterator I = SU->Preds.begin(), - E = SU->Preds.end(); I != E; ++I) - CalculateHeights(I->first, Height+1); +static void CalculateHeights(SUnit &SU, unsigned Height) { + if (SU.Height == 0 || Height > SU.Height) { +SU.Height = Height; +for (SUnit::pred_iterator I = SU.Preds.begin(), E = SU.Preds.end(); + I != E; ++I) + CalculateHeights(*I->first, Height+1); } } void ScheduleDAG::CalculateHeights() { SUnit *Root = SUnitMap[DAG.getRoot().Val]; - ::CalculateHeights(Root, 0U); + ::CalculateHeights(*Root, 0U); } /// CountResults - The results of target nodes have register or immediate @@ -646,24 +646,24 @@ if (Preds.size() != 0) { std::cerr << " Predecessors:\n"; -for (std::set >::const_iterator I = Preds.begin(), - E = Preds.end(); I != E; ++I) { +for (SUnit::const_succ_iterator I = Preds.begin(), E = Preds.end(); + I != E; ++I) { if (I->second) -std::cerr << " ch "; +std::cerr << " ch #"; else -std::cerr << " val "; - I->first->dump(G); +std::cerr << " val #"; + std::cerr << I->first << "\n"; } } if (Succs.size() != 0) { std::cerr << " Successors:\n"; -for (std::set >::const_iterator I = Succs.begin(), - E = Succs.end(); I != E; ++I) { +for (SUnit::const_succ_iterator I = Succs.begin(), E = Succs.end(); + I != E; ++I) { if (I->second) -std::cerr << " ch "; +std::cerr << " ch #"; else -std::cerr << " val "; - I->first->dump(G); +std::cerr << " val #"; + std::cerr << I->first << "\n"; } } std::cerr << "\n"; Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp:1.65 llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp:1.66 --- llvm/lib/CodeGen/SelectionDAG/ScheduleDAGLi
[llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/2006-08-16-CycleInDAG.ll
Changes in directory llvm/test/Regression/CodeGen/X86: 2006-08-16-CycleInDAG.ll added (r1.1) --- Log message: Another cyclic dag test case. --- Diffs of the changes: (+23 -0) 2006-08-16-CycleInDAG.ll | 23 +++ 1 files changed, 23 insertions(+) Index: llvm/test/Regression/CodeGen/X86/2006-08-16-CycleInDAG.ll diff -c /dev/null llvm/test/Regression/CodeGen/X86/2006-08-16-CycleInDAG.ll:1.1 *** /dev/null Wed Aug 16 19:00:56 2006 --- llvm/test/Regression/CodeGen/X86/2006-08-16-CycleInDAG.ll Wed Aug 16 19:00:46 2006 *** *** 0 --- 1,23 + ; RUN: llvm-as < %s | llc -march=x86 + + %struct.expr = type { %struct.rtx_def*, int, %struct.expr*, %struct.occr*, %struct.occr*, %struct.rtx_def* } + %struct.hash_table = type { %struct.expr**, uint, uint, int } + %struct.occr = type { %struct.occr*, %struct.rtx_def*, sbyte, sbyte } + %struct.rtx_def = type { ushort, ubyte, ubyte, %struct.u } + %struct.u = type { [1 x long] } + + void %test() { + %tmp = load uint* null ; [#uses=1] + %tmp8 = call uint %hash_rtx( ) ; [#uses=1] + %tmp11 = rem uint %tmp8, %tmp ; [#uses=1] + br bool false, label %cond_next, label %return + + cond_next:; preds = %entry + %tmp17 = getelementptr %struct.expr** null, uint %tmp11 ; <%struct.expr**> [#uses=0] + ret void + + return: ; preds = %entry + ret void + } + + declare uint %hash_rtx() ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
Changes in directory llvm/lib/Target/X86: X86ISelDAGToDAG.cpp updated: 1.92 -> 1.93 --- Log message: Doh. Incorrectly inverted condition. Also add a isOnlyUse check to match tablegen. --- Diffs of the changes: (+2 -1) X86ISelDAGToDAG.cpp |3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.92 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.93 --- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.92Wed Aug 16 02:30:09 2006 +++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Wed Aug 16 18:59:00 2006 @@ -610,7 +610,8 @@ SDOperand &Index, SDOperand &Disp) { if (N.getOpcode() == ISD::LOAD && N.hasOneUse() && - !CanBeFoldedBy(N.Val, P.Val)) + P.Val->isOnlyUse(N.Val) && + CanBeFoldedBy(N.Val, P.Val)) return SelectAddr(N.getOperand(1), Base, Scale, Index, Disp); return false; } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAG.h
Changes in directory llvm/include/llvm/CodeGen: SelectionDAG.h updated: 1.124 -> 1.125 --- Log message: add an accessor --- Diffs of the changes: (+2 -0) SelectionDAG.h |2 ++ 1 files changed, 2 insertions(+) Index: llvm/include/llvm/CodeGen/SelectionDAG.h diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.124 llvm/include/llvm/CodeGen/SelectionDAG.h:1.125 --- llvm/include/llvm/CodeGen/SelectionDAG.h:1.124 Wed Aug 16 16:01:10 2006 +++ llvm/include/llvm/CodeGen/SelectionDAG.hWed Aug 16 17:57:08 2006 @@ -245,6 +245,8 @@ const SDOperand *Ops, unsigned NumOps); SDOperand getNode(unsigned Opcode, const MVT::ValueType *VTs, unsigned NumVTs, const SDOperand *Ops, unsigned NumOps); + SDOperand getNode(unsigned Opcode, SDVTList VTs, +const SDOperand *Ops, unsigned NumOps); /// getSetCC - Helper function to make it easier to build SetCC's if you just /// have an ISD::CondCode instead of an SDOperand. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp SelectionDAG.cpp
Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.269 -> 1.270 SelectionDAG.cpp updated: 1.332 -> 1.333 --- Log message: minor changes. --- Diffs of the changes: (+24 -22) SelectionDAG.cpp | 37 +++-- SelectionDAGISel.cpp |9 + 2 files changed, 24 insertions(+), 22 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.269 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.270 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.269Mon Aug 14 18:53:35 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Aug 16 17:57:46 2006 @@ -2515,7 +2515,7 @@ unsigned CallingConv, bool isTailCall, SDOperand Callee, ArgListTy &Args, SelectionDAG &DAG) { - std::vector Ops; + SmallVector Ops; Ops.push_back(Chain); // Op#0 - Chain Ops.push_back(DAG.getConstant(CallingConv, getPointerTy())); // Op#1 - CC Ops.push_back(DAG.getConstant(isVarArg, getPointerTy()));// Op#2 - VarArg @@ -2592,7 +2592,7 @@ } // Figure out the result value types. - std::vector RetTys; + SmallVector RetTys; if (RetTy != Type::VoidTy) { MVT::ValueType VT = getValueType(RetTy); @@ -2636,8 +2636,9 @@ RetTys.push_back(MVT::Other); // Always has a chain. // Finally, create the CALL node. - SDOperand Res = DAG.getNode(ISD::CALL, DAG.getNodeValueTypes(RetTys), - RetTys.size(), &Ops[0], Ops.size()); + SDOperand Res = DAG.getNode(ISD::CALL, + DAG.getVTList(&RetTys[0], RetTys.size()), + &Ops[0], Ops.size()); // This returns a pair of operands. The first element is the // return value for the function (if RetTy is not VoidTy). The second Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.332 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.333 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.332Wed Aug 16 15:59:32 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Aug 16 17:57:46 2006 @@ -1459,26 +1459,21 @@ SDOperand SV) { SDOperand Ops[] = { Chain, Ptr, SV, getConstant(Count, MVT::i32), getValueType(EVT) }; - // Add token chain. - const MVT::ValueType *VTs = getNodeValueTypes(MVT::Vector, MVT::Other); - return getNode(ISD::VLOAD, VTs, 2, Ops, 5); + return getNode(ISD::VLOAD, getVTList(MVT::Vector, MVT::Other), Ops, 5); } SDOperand SelectionDAG::getExtLoad(unsigned Opcode, MVT::ValueType VT, SDOperand Chain, SDOperand Ptr, SDOperand SV, MVT::ValueType EVT) { SDOperand Ops[] = { Chain, Ptr, SV, getValueType(EVT) }; - const MVT::ValueType *VTs = getNodeValueTypes(VT, MVT::Other); - return getNode(Opcode, VTs, 2, Ops, 4); + return getNode(Opcode, getVTList(VT, MVT::Other), Ops, 4); } SDOperand SelectionDAG::getVAArg(MVT::ValueType VT, SDOperand Chain, SDOperand Ptr, SDOperand SV) { SDOperand Ops[] = { Chain, Ptr, SV }; - // Add token chain. - const MVT::ValueType *VTs = getNodeValueTypes(VT, MVT::Other); - return getNode(ISD::VAARG, VTs, 2, Ops, 3); + return getNode(ISD::VAARG, getVTList(VT, MVT::Other), Ops, 3); } SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT, @@ -1562,27 +1557,34 @@ const SDOperand *Ops, unsigned NumOps) { if (NumVTs == 1) return getNode(Opcode, VTs[0], Ops, NumOps); + return getNode(Opcode, makeVTList(VTs, NumVTs), Ops, NumOps); +} + +SDOperand SelectionDAG::getNode(unsigned Opcode, SDVTList VTList, +const SDOperand *Ops, unsigned NumOps) { + if (VTList.NumVTs == 1) +return getNode(Opcode, VTList.VTs[0], Ops, NumOps); switch (Opcode) { case ISD::EXTLOAD: case ISD::SEXTLOAD: case ISD::ZEXTLOAD: { MVT::ValueType EVT = cast(Ops[3])->getVT(); -assert(NumOps == 4 && NumVTs == 2 && "Bad *EXTLOAD!"); +assert(NumOps == 4 && VTList.NumVTs == 2 && "Bad *EXTLOAD!"); // If they are asking for an extending load from/to the same thing, return a // normal load. -if (VTs[0] == EVT) - return getLoad(VTs[0], Ops[0], Ops[1], Ops[2]); -if (MVT::isVector(VTs[0])) { - assert(EVT == MVT::getVectorBaseType(VTs[0]) && +if (VTList.VTs[0] == EVT) + return getLoad(VTList.VTs[0], Ops[0], Ops[1], Ops[2]); +if (MVT::isVector(VTList.VTs[0])) { + assert(EVT == MVT::getVectorBaseType(VTList.VTs[0]) && "Invalid vector extload!"); } else { - assert(EVT < VTs[0] && + assert(EVT < VTList.VTs[0] && "Should only be an exten
[llvm-commits] CVS: llvm/utils/NewNightlyTest.pl
Changes in directory llvm/utils: NewNightlyTest.pl updated: 1.52 -> 1.53 --- Log message: My last commit added some experimental features I have been working on. This commit rolls those back. --- Diffs of the changes: (+19 -18) NewNightlyTest.pl | 37 +++-- 1 files changed, 19 insertions(+), 18 deletions(-) Index: llvm/utils/NewNightlyTest.pl diff -u llvm/utils/NewNightlyTest.pl:1.52 llvm/utils/NewNightlyTest.pl:1.53 --- llvm/utils/NewNightlyTest.pl:1.52 Wed Aug 16 17:18:41 2006 +++ llvm/utils/NewNightlyTest.plWed Aug 16 17:32:20 2006 @@ -117,7 +117,7 @@ $NORUNNINGTESTS=0; $MAKECMD="make"; $SUBMITSERVER = "llvm.org"; -$SUBMITSCRIPT = "/nightlytest/NightlyTestAccept2.cgi"; +$SUBMITSCRIPT = "/nightlytest/NightlyTestAccept.cgi"; while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) { shift; @@ -824,7 +824,7 @@ # Create a list of the tests which were run... # system "egrep 'TEST-(PASS|FAIL)' < $ProgramTestLog ". - "| sort > $Prefix-$SubDir-Tests.txt"; + "| sort > $Prefix-multisourceprogramstable.txt"; } $ProgramsTable = ReadFile "report.nightly.csv"; @@ -838,36 +838,31 @@ } ($SingleSourceProgramsTable, $llcbeta_options) = TestDirectory("SingleSource"); - WriteFile "$Prefix-SingleSource-Performance.txt", $SingleSourceProgramsTable; + WriteFile "$Prefix-singlesourceprogramstable.txt", $SingleSourceProgramsTable; if ( $VERBOSE ) { print "MultiSource TEST STAGE\n"; } ($MultiSourceProgramsTable, $llcbeta_options) = TestDirectory("MultiSource"); - WriteFile "$Prefix-MultiSource-Performance.txt", $MultiSourceProgramsTable; + WriteFile "$Prefix-multisourceprogramstable.txt", $MultiSourceProgramsTable; if ( ! $NOEXTERNALS ) { if ( $VERBOSE ) { print "External TEST STAGE\n"; } ($ExternalProgramsTable, $llcbeta_options) = TestDirectory("External"); -WriteFile "$Prefix-External-Performance.txt", $ExternalProgramsTable; -system "cat $Prefix-SingleSource-Tests.txt " . - "$Prefix-MultiSource-Tests.txt ". - "$Prefix-External-Tests.txt | sort > $Prefix-Tests.txt"; -system "cat $Prefix-SingleSource-Performance.txt " . - "$Prefix-MultiSource-Performance.txt ". - "$Prefix-External-Performance.txt | sort > $Prefix-Performance.txt"; +WriteFile "$Prefix-externalprogramstable.txt", $ExternalProgramsTable; +system "cat $Prefix-singlesourceprogramstable.txt " . + "$Prefix-multisourceprogramstable.txt ". + "$Prefix-externalprogramstable.txt | sort > $Prefix-Tests.txt"; } else { $ExternalProgramsTable = "External TEST STAGE SKIPPED\n"; if ( $VERBOSE ) { print "External TEST STAGE SKIPPED\n"; } -system "cat $Prefix-SingleSource-Tests.txt " . - "$Prefix-MultiSource-Tests.txt ". +system "cat $Prefix-singlesourceprogramstable.txt " . + "$Prefix-multisourceprogramstable.txt ". " | sort > $Prefix-Tests.txt"; -system "cat $Prefix-SingleSource-Performance.txt " . - "$Prefix-MultiSource-Performance.txt ". - " | sort > $Prefix-Performance.txt"; } + WriteFile "$Prefix-externalprogramstable.txt", $ExternalProgramsTable; } ## @@ -877,8 +872,9 @@ # # ## -my $dejagnu_test_list = ReadFile "$Prefix-Tests.txt"; -my @DEJAGNU = split "\n", $dejagnu_test_list; +my $dejagnu = ReadFile $DejagnuSum; +my @DEJAGNU = split "\n", $dejagnu; +my $dejagnu_test_list=""; my $passes="", my $fails=""; @@ -888,12 +884,15 @@ for ($x=0; $x<@DEJAGNU; $x++) { if ($DEJAGNU[$x] =~ m/^PASS:/) { $passes.="$DEJAGNU[$x]\n"; + $dejagnu_test_list.="$DEJAGNU[$x]\n"; } elsif ($DEJAGNU[$x] =~ m/^FAIL:/) { $fails.="$DEJAGNU[$x]\n"; + $dejagnu_test_list.="$DEJAGNU[$x]\n"; } elsif ($DEJAGNU[$x] =~ m/^XFAIL:/) { $xfails.="$DEJAGNU[$x]\n"; + $dejagnu_test_list.="$DEJAGNU[$x]\n"; } } } @@ -984,6 +983,8 @@ @GCC_VERSION = split '\n', $gcc_version_long; my $gcc_version = $GCC_VERSION[0]; +my $all_tests = ReadFile "$Prefix-Tests.txt"; + ## # # Send data via a post request ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/TEST.nightly.report
Changes in directory llvm-test: TEST.nightly.report updated: 1.40 -> 1.41 --- Log message: Reinstating the comparisons to GCC for the nightly test reports. --- Diffs of the changes: (+7 -7) TEST.nightly.report | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) Index: llvm-test/TEST.nightly.report diff -u llvm-test/TEST.nightly.report:1.40 llvm-test/TEST.nightly.report:1.41 --- llvm-test/TEST.nightly.report:1.40 Wed Aug 16 12:16:15 2006 +++ llvm-test/TEST.nightly.report Wed Aug 16 17:25:07 2006 @@ -68,22 +68,22 @@ ( # Name ["Program" , '\'([^\']+)\' Program'], -# [], + [], # Times ["GCCAS", "TEST-RESULT-compile: .*$WallTimeRE"], ["Bytecode" , 'TEST-RESULT-compile: *([0-9]+)'], ["LLC compile" , "TEST-RESULT-llc: .*$WallTimeRE"], ["LLC-BETA compile" , "TEST-RESULT-llc-beta: .*$WallTimeRE"], ["JIT codegen" , "TEST-RESULT-jit-comptime: .*$WallTimeRE"], -# [], + [], ["GCC" , 'TEST-RESULT-nat-time: program\s*([.0-9m:]+)', \&FormatTime], ["CBE" , 'TEST-RESULT-cbe-time: program\s*([.0-9m:]+)', \&FormatTime], ["LLC" , 'TEST-RESULT-llc-time: program\s*([.0-9m:]+)', \&FormatTime], ["LLC-BETA" , 'TEST-RESULT-llc-beta-time: program\s*([.0-9m:]+)',\&FormatTime], ["JIT" , 'TEST-RESULT-jit-time: program\s*([.0-9m:]+)', \&FormatTime], -# [], -# ["GCC/CBE" , \&GCCCBERatio], -# ["GCC/LLC" , \&GCCLLCRatio], -# ["GCC/LLC-BETA" , \&GCCLLC_BETARatio], -# ["LLC/LLC-BETA" , \&LLCLLC_BETARatio] + [], + ["GCC/CBE" , \&GCCCBERatio], + ["GCC/LLC" , \&GCCLLCRatio], + ["GCC/LLC-BETA" , \&GCCLLC_BETARatio], + ["LLC/LLC-BETA" , \&LLCLLC_BETARatio] ); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/utils/NewNightlyTest.pl
Changes in directory llvm/utils: NewNightlyTest.pl updated: 1.51 -> 1.52 --- Log message: Changed the call to countloc.sh so that the correct topdirectory of the llvm build is set. --- Diffs of the changes: (+19 -20) NewNightlyTest.pl | 39 +++ 1 files changed, 19 insertions(+), 20 deletions(-) Index: llvm/utils/NewNightlyTest.pl diff -u llvm/utils/NewNightlyTest.pl:1.51 llvm/utils/NewNightlyTest.pl:1.52 --- llvm/utils/NewNightlyTest.pl:1.51 Mon Aug 14 13:49:05 2006 +++ llvm/utils/NewNightlyTest.plWed Aug 16 17:18:41 2006 @@ -117,7 +117,7 @@ $NORUNNINGTESTS=0; $MAKECMD="make"; $SUBMITSERVER = "llvm.org"; -$SUBMITSCRIPT = "/nightlytest/NightlyTestAccept.cgi"; +$SUBMITSCRIPT = "/nightlytest/NightlyTestAccept2.cgi"; while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) { shift; @@ -638,7 +638,7 @@ # Get the number of lines of source code. Must be here after the build is done # because countloc.sh uses the llvm-config script which must be built. -my $LOC = `utils/countloc.sh -topdir $BuildDir`; +my $LOC = `utils/countloc.sh -topdir $BuildDir/llvm`; # Get the time taken by the configure script my $ConfigTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$BuildLog"; @@ -824,7 +824,7 @@ # Create a list of the tests which were run... # system "egrep 'TEST-(PASS|FAIL)' < $ProgramTestLog ". - "| sort > $Prefix-multisourceprogramstable.txt"; + "| sort > $Prefix-$SubDir-Tests.txt"; } $ProgramsTable = ReadFile "report.nightly.csv"; @@ -838,31 +838,36 @@ } ($SingleSourceProgramsTable, $llcbeta_options) = TestDirectory("SingleSource"); - WriteFile "$Prefix-singlesourceprogramstable.txt", $SingleSourceProgramsTable; + WriteFile "$Prefix-SingleSource-Performance.txt", $SingleSourceProgramsTable; if ( $VERBOSE ) { print "MultiSource TEST STAGE\n"; } ($MultiSourceProgramsTable, $llcbeta_options) = TestDirectory("MultiSource"); - WriteFile "$Prefix-multisourceprogramstable.txt", $MultiSourceProgramsTable; + WriteFile "$Prefix-MultiSource-Performance.txt", $MultiSourceProgramsTable; if ( ! $NOEXTERNALS ) { if ( $VERBOSE ) { print "External TEST STAGE\n"; } ($ExternalProgramsTable, $llcbeta_options) = TestDirectory("External"); -WriteFile "$Prefix-externalprogramstable.txt", $ExternalProgramsTable; -system "cat $Prefix-singlesourceprogramstable.txt " . - "$Prefix-multisourceprogramstable.txt ". - "$Prefix-externalprogramstable.txt | sort > $Prefix-Tests.txt"; +WriteFile "$Prefix-External-Performance.txt", $ExternalProgramsTable; +system "cat $Prefix-SingleSource-Tests.txt " . + "$Prefix-MultiSource-Tests.txt ". + "$Prefix-External-Tests.txt | sort > $Prefix-Tests.txt"; +system "cat $Prefix-SingleSource-Performance.txt " . + "$Prefix-MultiSource-Performance.txt ". + "$Prefix-External-Performance.txt | sort > $Prefix-Performance.txt"; } else { $ExternalProgramsTable = "External TEST STAGE SKIPPED\n"; if ( $VERBOSE ) { print "External TEST STAGE SKIPPED\n"; } -system "cat $Prefix-singlesourceprogramstable.txt " . - "$Prefix-multisourceprogramstable.txt ". +system "cat $Prefix-SingleSource-Tests.txt " . + "$Prefix-MultiSource-Tests.txt ". " | sort > $Prefix-Tests.txt"; +system "cat $Prefix-SingleSource-Performance.txt " . + "$Prefix-MultiSource-Performance.txt ". + " | sort > $Prefix-Performance.txt"; } - WriteFile "$Prefix-externalprogramstable.txt", $ExternalProgramsTable; } ## @@ -872,9 +877,8 @@ # # ## -my $dejagnu = ReadFile $DejagnuSum; -my @DEJAGNU = split "\n", $dejagnu; -my $dejagnu_test_list=""; +my $dejagnu_test_list = ReadFile "$Prefix-Tests.txt"; +my @DEJAGNU = split "\n", $dejagnu_test_list; my $passes="", my $fails=""; @@ -884,15 +888,12 @@ for ($x=0; $x<@DEJAGNU; $x++) { if ($DEJAGNU[$x] =~ m/^PASS:/) { $passes.="$DEJAGNU[$x]\n"; - $dejagnu_test_list.="$DEJAGNU[$x]\n"; } elsif ($DEJAGNU[$x] =~ m/^FAIL:/) { $fails.="$DEJAGNU[$x]\n"; - $dejagnu_test_list.="$DEJAGNU[$x]\n"; } elsif ($DEJAGNU[$x] =~ m/^XFAIL:/) { $xfails.="$DEJAGNU[$x]\n"; - $dejagnu_test_list.="$DEJAGNU[$x]\n"; } } } @@ -983,8 +984,6 @@ @GCC_VERSION = split '\n', $gcc_version_long; my $gcc_version = $GCC_VERSION[0]; -my $all_tests = ReadFile "$Prefix-Tests.txt"; - ## # # Send data via a post request ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/ScheduleDAG.h
Changes in directory llvm/include/llvm/CodeGen: ScheduleDAG.h updated: 1.30 -> 1.31 --- Log message: Convert vector to smallvector: 4% speedup. --- Diffs of the changes: (+1 -1) ScheduleDAG.h |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/ScheduleDAG.h diff -u llvm/include/llvm/CodeGen/ScheduleDAG.h:1.30 llvm/include/llvm/CodeGen/ScheduleDAG.h:1.31 --- llvm/include/llvm/CodeGen/ScheduleDAG.h:1.30Tue Aug 1 14:14:14 2006 +++ llvm/include/llvm/CodeGen/ScheduleDAG.h Wed Aug 16 17:12:48 2006 @@ -78,7 +78,7 @@ /// a group of nodes flagged together. struct SUnit { SDNode *Node; // Representative node. -std::vector FlaggedNodes; // All nodes flagged to Node. +SmallVector FlaggedNodes;// All nodes flagged to Node. // Preds/Succs - The SUnits before/after us in the graph. The boolean value // is true if the edge is a token chain edge, false if it is a value edge. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/configure
Changes in directory llvm-test: configure updated: 1.37 -> 1.38 --- Log message: Oops, fix the SPEC95 case too. --- Diffs of the changes: (+1 -1) configure |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/configure diff -u llvm-test/configure:1.37 llvm-test/configure:1.38 --- llvm-test/configure:1.37Tue Aug 15 01:53:55 2006 +++ llvm-test/configure Wed Aug 16 17:09:23 2006 @@ -2511,7 +2511,7 @@ fi if test -n "$SPEC95_ROOT" ; then if test -d "$SPEC95_ROOT" ; then -if test `basename '${SPEC95_ROOT%benchspec}'` != "benchspec"; then +if test `basename ${SPEC95_ROOT}` != "benchspec"; then { { echo "$as_me:$LINENO: error: SPEC 95 directory must end in 'benchspec'" >&5 echo "$as_me: error: SPEC 95 directory must end in 'benchspec'" >&2;} { (exit 1); exit 1; }; } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/ADT/SmallVector.h
Changes in directory llvm/include/llvm/ADT: SmallVector.h updated: 1.13 -> 1.14 --- Log message: silence a warning. --- Diffs of the changes: (+1 -0) SmallVector.h |1 + 1 files changed, 1 insertion(+) Index: llvm/include/llvm/ADT/SmallVector.h diff -u llvm/include/llvm/ADT/SmallVector.h:1.13 llvm/include/llvm/ADT/SmallVector.h:1.14 --- llvm/include/llvm/ADT/SmallVector.h:1.13Tue Aug 15 20:23:31 2006 +++ llvm/include/llvm/ADT/SmallVector.h Wed Aug 16 17:09:24 2006 @@ -213,6 +213,7 @@ // Set end. End = Begin+RHSSize; + return *this; } /// SmallVector - This is a 'vector' (really, a variable-sized array), optimized ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/autoconf/configure.ac
Changes in directory llvm-test/autoconf: configure.ac updated: 1.35 -> 1.36 --- Log message: Oops, fix the SPEC95 case too. --- Diffs of the changes: (+1 -1) configure.ac |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/autoconf/configure.ac diff -u llvm-test/autoconf/configure.ac:1.35 llvm-test/autoconf/configure.ac:1.36 --- llvm-test/autoconf/configure.ac:1.35Tue Aug 15 01:53:55 2006 +++ llvm-test/autoconf/configure.ac Wed Aug 16 17:09:23 2006 @@ -88,7 +88,7 @@ fi if test -n "$SPEC95_ROOT" ; then if test -d "$SPEC95_ROOT" ; then -if test `basename '${SPEC95_ROOT%benchspec}'` != "benchspec"; then +if test `basename ${SPEC95_ROOT}` != "benchspec"; then AC_MSG_ERROR([SPEC 95 directory must end in 'benchspec']) fi else ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/CREDITS.TXT
Changes in directory llvm: CREDITS.TXT updated: 1.63 -> 1.64 --- Log message: Added my home web page. --- Diffs of the changes: (+1 -1) CREDITS.TXT |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/CREDITS.TXT diff -u llvm/CREDITS.TXT:1.63 llvm/CREDITS.TXT:1.64 --- llvm/CREDITS.TXT:1.63 Sun Aug 13 14:04:57 2006 +++ llvm/CREDITS.TXTWed Aug 16 16:18:56 2006 @@ -174,5 +174,5 @@ N: Bill Wendling E: [EMAIL PROTECTED] +W: http://web.mac.com/bwendling/ D: The `Lower Setjmp/Longjmp' pass, improvements to the -lowerswitch pass. -D: Bug hunter extraordinaire. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAG.h SelectionDAGNodes.h
Changes in directory llvm/include/llvm/CodeGen: SelectionDAG.h updated: 1.123 -> 1.124 SelectionDAGNodes.h updated: 1.142 -> 1.143 --- Log message: Change the use_list to be a smallvector instead of a vector. This reduces isel time from 6.79s to 5.53s (22%) on kc++ with a release build on ppc. Go smallvector! :) --- Diffs of the changes: (+4 -3) SelectionDAG.h |1 + SelectionDAGNodes.h |6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) Index: llvm/include/llvm/CodeGen/SelectionDAG.h diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.123 llvm/include/llvm/CodeGen/SelectionDAG.h:1.124 --- llvm/include/llvm/CodeGen/SelectionDAG.h:1.123 Tue Aug 15 14:11:05 2006 +++ llvm/include/llvm/CodeGen/SelectionDAG.hWed Aug 16 16:01:10 2006 @@ -20,6 +20,7 @@ #include "llvm/ADT/ilist" #include +#include #include #include #include Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.142 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.143 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.142 Tue Aug 15 14:11:05 2006 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Wed Aug 16 16:01:10 2006 @@ -23,9 +23,9 @@ #include "llvm/Value.h" #include "llvm/ADT/GraphTraits.h" #include "llvm/ADT/iterator" +#include "llvm/ADT/SmallVector.h" #include "llvm/Support/DataTypes.h" #include -#include namespace llvm { @@ -722,7 +722,7 @@ /// Uses - These are all of the SDNode's that use a value produced by this /// node. - std::vector Uses; + SmallVector Uses; // Out-of-line virtual method to give class a home. virtual void ANCHOR(); @@ -751,7 +751,7 @@ /// int getNodeId() const { return NodeId; } - typedef std::vector::const_iterator use_iterator; + typedef SmallVector::const_iterator use_iterator; use_iterator use_begin() const { return Uses.begin(); } use_iterator use_end() const { return Uses.end(); } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAG.cpp updated: 1.331 -> 1.332 --- Log message: Use the appropriate typedef --- Diffs of the changes: (+1 -2) SelectionDAG.cpp |3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.331 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.332 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.331Tue Aug 15 14:11:05 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Aug 16 15:59:32 2006 @@ -2540,8 +2540,7 @@ std::set UsersHandled; - for (std::vector::const_iterator UI = Uses.begin(), E = Uses.end(); - UI != E; ++UI) { + for (SDNode::use_iterator UI = Uses.begin(), E = Uses.end(); UI != E; ++UI) { SDNode *User = *UI; if (User->getNumOperands() == 1 || UsersHandled.insert(User).second) // First time we've seen this? ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvmc/CompilerDriver.cpp Configuration.cpp Makefile c
Changes in directory llvm/tools/llvmc: CompilerDriver.cpp updated: 1.37 -> 1.38 Configuration.cpp updated: 1.24 -> 1.25 Makefile updated: 1.20 -> 1.21 c updated: 1.1 -> 1.2 --- Log message: Patches to correct several bugs in llvmc. Patches contributed by Bram Adams. Thanks Bram. --- Diffs of the changes: (+58 -7) CompilerDriver.cpp | 53 + Configuration.cpp |7 +++ Makefile |2 +- c |3 +-- 4 files changed, 58 insertions(+), 7 deletions(-) Index: llvm/tools/llvmc/CompilerDriver.cpp diff -u llvm/tools/llvmc/CompilerDriver.cpp:1.37 llvm/tools/llvmc/CompilerDriver.cpp:1.38 --- llvm/tools/llvmc/CompilerDriver.cpp:1.37Tue Aug 1 13:12:29 2006 +++ llvm/tools/llvmc/CompilerDriver.cpp Wed Aug 16 15:31:44 2006 @@ -227,9 +227,54 @@ assert(pat != 0 && "Invalid command pattern"); // Copy over some pattern things that don't need to change -action->program = pat->program; action->flags = pat->flags; +// See if program starts with wildcard... +std::string programName=pat->program.toString(); +if (programName[0] == '%' && programName.length() >2) { + switch(programName[1]){ + case 'b': + if (programName.substr(0,8) == "%bindir%") { + std::string tmp(LLVM_BINDIR); + tmp.append(programName.substr(8)); + pat->program.set(tmp); + } + break; + case 'l': + if (programName.substr(0,12) == "%llvmgccdir%"){ + std::string tmp(LLVMGCCDIR); + tmp.append(programName.substr(12)); + pat->program.set(tmp); + }else if (programName.substr(0,13) == "%llvmgccarch%"){ + std::string tmp(LLVMGCCARCH); + tmp.append(programName.substr(13)); + pat->program.set(tmp); + }else if (programName.substr(0,9) == "%llvmgcc%"){ + std::string tmp(LLVMGCC); + tmp.append(programName.substr(9)); + pat->program.set(tmp); + }else if (programName.substr(0,9) == "%llvmgxx%"){ + std::string tmp(LLVMGXX); + tmp.append(programName.substr(9)); + pat->program.set(tmp); + }else if (programName.substr(0,9) == "%llvmcc1%"){ + std::string tmp(LLVMCC1); + tmp.append(programName.substr(9)); + pat->program.set(tmp); + }else if (programName.substr(0,13) == "%llvmcc1plus%"){ + std::string tmp(LLVMCC1PLUS); + tmp.append(programName.substr(13)); + pat->program.set(tmp); + }else if (programName.substr(0,8) == "%libdir%") { + std::string tmp(LLVM_LIBDIR); + tmp.append(programName.substr(8)); + pat->program.set(tmp); + } + break; + } +} +action->program = pat->program; + // Do the substitutions from the pattern to the actual StringVector::iterator PI = pat->args.begin(); StringVector::iterator PE = pat->args.end(); @@ -426,9 +471,9 @@ const char** Args = (const char**) alloca(sizeof(const char*)*(action->args.size()+2)); Args[0] = action->program.toString().c_str(); - for (unsigned i = 1; i != action->args.size(); ++i) -Args[i] = action->args[i].c_str(); - Args[action->args.size()] = 0; // null terminate list. + for (unsigned i = 1; i <= action->args.size(); ++i) +Args[i] = action->args[i-1].c_str(); + Args[action->args.size()+1] = 0; // null terminate list. if (isSet(TIME_ACTIONS_FLAG)) { Timer timer(action->program.toString()); timer.startTimer(); Index: llvm/tools/llvmc/Configuration.cpp diff -u llvm/tools/llvmc/Configuration.cpp:1.24 llvm/tools/llvmc/Configuration.cpp:1.25 --- llvm/tools/llvmc/Configuration.cpp:1.24 Mon May 29 13:52:05 2006 +++ llvm/tools/llvmc/Configuration.cpp Wed Aug 16 15:31:44 2006 @@ -116,6 +116,8 @@ result.clear(); while (next_is_real()) { switch (token ) { + case LLVMGCCDIR_SUBST: + case LLVMGCCARCH_SUBST: case STRING : case OPTION : result += ConfigLexerState.StringVal; @@ -260,6 +262,11 @@ str.clear(); do { switch (token) { + case BINDIR_SUBST: + case LLVMGCC_SUBST: + case LLVMGXX_SUBST: + case LLVMCC1_SUBST: + case LLVMCC1PLUS_SUBST: case OPTION: case STRING: case ARGS_SUBST: Index: llvm/tools/llvmc/Makefile diff -u llvm/tools/llvmc/Makefile:1.20 llvm/tools/llvmc/Makefile:1.21 --- llvm/tools/llvmc/Makefile:1.20 Thu Jul 6 19:46:19 2006 +++ llvm/tools/llvmc/Makefile Wed Aug 16 15:31:44 2006 @@ -24,7 +24,7 @@ -DLLVMGCC="\"$(LLVMGCC)\"" \ -DLLVMGXX="\"$(LLVMGXX)\"" \ -DLLVMCC1="\"$(LLVMCC1)\"" \ - -DLLVMCC1PLUS="$(LLVMCC1PLUS)" + -DLLVMCC1PLUS="\"$(LLVMCC1PLUS)\"" include $(LEVEL)/Makefile.common Index: llvm/tools/llvmc/c diff -u llvm/tools/llvmc/c:1.1 llvm/tools/llvmc/c:1.2 --- llvm/tools/llvm
[llvm-commits] CVS: llvm-test/TEST.nightly.report
Changes in directory llvm-test: TEST.nightly.report updated: 1.39 -> 1.40 --- Log message: Changing the way the nightly report gives us information when generating performance results. --- Diffs of the changes: (+10 -10) TEST.nightly.report | 20 ++-- 1 files changed, 10 insertions(+), 10 deletions(-) Index: llvm-test/TEST.nightly.report diff -u llvm-test/TEST.nightly.report:1.39 llvm-test/TEST.nightly.report:1.40 --- llvm-test/TEST.nightly.report:1.39 Fri Mar 17 01:06:34 2006 +++ llvm-test/TEST.nightly.report Wed Aug 16 12:16:15 2006 @@ -68,22 +68,22 @@ ( # Name ["Program" , '\'([^\']+)\' Program'], - [], +# [], # Times ["GCCAS", "TEST-RESULT-compile: .*$WallTimeRE"], ["Bytecode" , 'TEST-RESULT-compile: *([0-9]+)'], - ["LLCcompile" , "TEST-RESULT-llc: .*$WallTimeRE"], - ["LLC-BETAcompile" , "TEST-RESULT-llc-beta: .*$WallTimeRE"], - ["JITcodegen" , "TEST-RESULT-jit-comptime: .*$WallTimeRE"], - [], + ["LLC compile" , "TEST-RESULT-llc: .*$WallTimeRE"], + ["LLC-BETA compile" , "TEST-RESULT-llc-beta: .*$WallTimeRE"], + ["JIT codegen" , "TEST-RESULT-jit-comptime: .*$WallTimeRE"], +# [], ["GCC" , 'TEST-RESULT-nat-time: program\s*([.0-9m:]+)', \&FormatTime], ["CBE" , 'TEST-RESULT-cbe-time: program\s*([.0-9m:]+)', \&FormatTime], ["LLC" , 'TEST-RESULT-llc-time: program\s*([.0-9m:]+)', \&FormatTime], ["LLC-BETA" , 'TEST-RESULT-llc-beta-time: program\s*([.0-9m:]+)',\&FormatTime], ["JIT" , 'TEST-RESULT-jit-time: program\s*([.0-9m:]+)', \&FormatTime], - [], - ["GCC/CBE" , \&GCCCBERatio], - ["GCC/LLC" , \&GCCLLCRatio], - ["GCC/LLC-BETA" , \&GCCLLC_BETARatio], - ["LLC/LLC-BETA" , \&LLCLLC_BETARatio] +# [], +# ["GCC/CBE" , \&GCCCBERatio], +# ["GCC/LLC" , \&GCCLLCRatio], +# ["GCC/LLC-BETA" , \&GCCLLC_BETARatio], +# ["LLC/LLC-BETA" , \&LLCLLC_BETARatio] ); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/ARM/ARMFrameInfo.h ARMISelDAGToDAG.cpp ARMInstrInfo.td ARMRegisterInfo.cpp ARMTargetMachine.cpp ARMTargetMachine.h
Changes in directory llvm/lib/Target/ARM: ARMFrameInfo.h added (r1.1) ARMISelDAGToDAG.cpp updated: 1.29 -> 1.30 ARMInstrInfo.td updated: 1.14 -> 1.15 ARMRegisterInfo.cpp updated: 1.14 -> 1.15 ARMTargetMachine.cpp updated: 1.4 -> 1.5 ARMTargetMachine.h updated: 1.1 -> 1.2 --- Log message: Declare the callee saved regs Remove the hard coded store and load of the link register Implement ARMFrameInfo --- Diffs of the changes: (+60 -14) ARMFrameInfo.h | 43 +++ ARMISelDAGToDAG.cpp |5 ++--- ARMInstrInfo.td |2 +- ARMRegisterInfo.cpp | 18 ++ ARMTargetMachine.cpp |3 ++- ARMTargetMachine.h |3 ++- 6 files changed, 60 insertions(+), 14 deletions(-) Index: llvm/lib/Target/ARM/ARMFrameInfo.h diff -c /dev/null llvm/lib/Target/ARM/ARMFrameInfo.h:1.1 *** /dev/null Wed Aug 16 09:43:43 2006 --- llvm/lib/Target/ARM/ARMFrameInfo.h Wed Aug 16 09:43:33 2006 *** *** 0 --- 1,43 + //===-- ARMTargetFrameInfo.h - Define TargetFrameInfo for ARM ---*- C++ -*-===// + // + // The LLVM Compiler Infrastructure + // + // This file was developed by the "Instituto Nokia de Tecnologia" and + // is distributed under the University of Illinois Open Source + // License. See LICENSE.TXT for details. + // + //===--===// + // + // + // + //===--===// + + #ifndef ARM_FRAMEINFO_H + #define ARM_FRAMEINFO_H + + #include "ARM.h" + #include "llvm/Target/TargetFrameInfo.h" + #include "llvm/Target/TargetMachine.h" + + namespace llvm { + + class ARMFrameInfo: public TargetFrameInfo { + std::pair LR[1]; + + public: + ARMFrameInfo() + : TargetFrameInfo(TargetFrameInfo::StackGrowsDown, 8, 0) { + LR[0].first = ARM::R14; + LR[0].second = -4; + } + + const std::pair * + getCalleeSaveSpillSlots(unsigned &NumEntries) const { + NumEntries = 1; + return &LR[0]; + } + }; + + } // End llvm namespace + + #endif Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.29 llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.30 --- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.29Mon Aug 14 14:01:24 2006 +++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Wed Aug 16 09:43:33 2006 @@ -84,9 +84,8 @@ SDOperand Callee = Op.getOperand(4); unsigned NumOps= (Op.getNumOperands() - 5) / 2; - // Count how many bytes are to be pushed on the stack. Initially - // only the link register. - unsigned NumBytes = 4; + // Count how many bytes are to be pushed on the stack. + unsigned NumBytes = 0; // Add up all the space actually used. for (unsigned i = 4; i < NumOps; ++i) Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.14 llvm/lib/Target/ARM/ARMInstrInfo.td:1.15 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.14Fri Aug 11 04:01:08 2006 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Wed Aug 16 09:43:33 2006 @@ -61,7 +61,7 @@ def bx: InstARM<(ops), "bx r14", [(retflag)]>; } -let Defs = [R0, R1, R2, R3] in { +let Defs = [R0, R1, R2, R3, R14] in { def bl: InstARM<(ops i32imm:$func, variable_ops), "bl $func", [(ARMcall tglobaladdr:$func)]>; } Index: llvm/lib/Target/ARM/ARMRegisterInfo.cpp diff -u llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.14 llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.15 --- llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.14Wed Aug 9 12:37:45 2006 +++ llvm/lib/Target/ARM/ARMRegisterInfo.cpp Wed Aug 16 09:43:33 2006 @@ -58,13 +58,21 @@ } const unsigned* ARMRegisterInfo::getCalleeSaveRegs() const { - static const unsigned CalleeSaveRegs[] = { 0 }; + static const unsigned CalleeSaveRegs[] = { +ARM::R4, ARM::R5, ARM::R6, ARM::R7, +ARM::R8, ARM::R9, ARM::R10, ARM::R11, +ARM::R14, 0 + }; return CalleeSaveRegs; } const TargetRegisterClass* const * ARMRegisterInfo::getCalleeSaveRegClasses() const { - static const TargetRegisterClass * const CalleeSaveRegClasses[] = { 0 }; + static const TargetRegisterClass * const CalleeSaveRegClasses[] = { +&ARM::IntRegsRegClass, &ARM::IntRegsRegClass, &ARM::IntRegsRegClass, &ARM::IntRegsRegClass, +&ARM::IntRegsRegClass, &ARM::IntRegsRegClass, &ARM::IntRegsRegClass, &ARM::IntRegsRegClass, +&ARM::IntRegsRegClass, 0 + }; return CalleeSaveRegClasses; } @@ -126,16 +134,12 @@ // entry to the current function. This eliminates the need for add/sub // brackets around call sites. NumBytes += MFI->getMaxCallFrameSize(); - } else { -NumBytes += 4; } MFI->setStackSize(NumBytes); //sub sp, sp, #NumBytes BuildMI(MBB, MBBI, ARM::subri, 2, ARM::R13).addReg(ARM::R13).addImm(NumBytes); - //str lr, [sp, #NumBytes - 4] - BuildMI(MBB, MBBI, ARM::str, 2, ARM::R14).addImm(NumBytes - 4).addReg(ARM::R13); } void ARMRegisterInfo::emitEpilogue(
[llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp
Changes in directory llvm/lib/Target/IA64: IA64ISelDAGToDAG.cpp updated: 1.48 -> 1.49 --- Log message: SelectNodeTo() may return a SDOperand that is different from the input. --- Diffs of the changes: (+20 -31) IA64ISelDAGToDAG.cpp | 51 --- 1 files changed, 20 insertions(+), 31 deletions(-) Index: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp diff -u llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.48 llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.49 --- llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.48 Fri Aug 11 04:07:25 2006 +++ llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Wed Aug 16 02:29:13 2006 @@ -398,25 +398,21 @@ SDOperand Chain = CurDAG->getEntryNode(); // this is a constant, so.. if (cast(N)->isExactlyValue(+0.0)) { - Result = CurDAG->getCopyFromReg(Chain, IA64::F0, MVT::f64); + return CurDAG->getCopyFromReg(Chain, IA64::F0, MVT::f64).Val; } else if (cast(N)->isExactlyValue(+1.0)) { - Result = CurDAG->getCopyFromReg(Chain, IA64::F1, MVT::f64); + return CurDAG->getCopyFromReg(Chain, IA64::F1, MVT::f64).Val; } else assert(0 && "Unexpected FP constant!"); -return Result.Val; } case ISD::FrameIndex: { // TODO: reduce creepyness int FI = cast(N)->getIndex(); -if (N->hasOneUse()) { - Result = CurDAG->SelectNodeTo(N, IA64::MOV, MVT::i64, - CurDAG->getTargetFrameIndex(FI, MVT::i64)); - return NULL; -} else { - Result = SDOperand(CurDAG->getTargetNode(IA64::MOV, MVT::i64, -CurDAG->getTargetFrameIndex(FI, MVT::i64)), 0); - return Result.Val; -} +if (N->hasOneUse()) + return CurDAG->SelectNodeTo(N, IA64::MOV, MVT::i64, + CurDAG->getTargetFrameIndex(FI, MVT::i64)).Val; +else + return SDOperand(CurDAG->getTargetNode(IA64::MOV, MVT::i64, + CurDAG->getTargetFrameIndex(FI, MVT::i64)), 0).Val; } case ISD::ConstantPool: { // TODO: nuke the constant pool @@ -467,11 +463,10 @@ case MVT::i1: { // this is a bool Opc = IA64::LD1; // first we load a byte, then compare for != 0 if(N->getValueType(0) == MVT::i1) { // XXX: early exit! -Result = CurDAG->SelectNodeTo(N, IA64::CMPNE, MVT::i1, MVT::Other, +return CurDAG->SelectNodeTo(N, IA64::CMPNE, MVT::i1, MVT::Other, SDOperand(CurDAG->getTargetNode(Opc, MVT::i64, Address), 0), - CurDAG->getRegister(IA64::r0, MVT::i64), - Chain).getValue(Op.ResNo); -return NULL; +CurDAG->getRegister(IA64::r0, MVT::i64), +Chain).getValue(Op.ResNo).Val; } /* otherwise, we want to load a bool into something bigger: LD1 will do that for us, so we just fall through */ @@ -486,9 +481,8 @@ } // TODO: comment this -Result = CurDAG->SelectNodeTo(N, Opc, N->getValueType(0), MVT::Other, -Address, Chain).getValue(Op.ResNo); -return NULL; +return CurDAG->SelectNodeTo(N, Opc, N->getValueType(0), MVT::Other, +Address, Chain).getValue(Op.ResNo).Val; } case ISD::TRUNCSTORE: @@ -512,8 +506,7 @@ Tmp = SDOperand(CurDAG->getTargetNode(IA64::TPCADDS, MVT::i64, Initial, CurDAG->getConstant(1, MVT::i64), Tmp), 0); -Result = CurDAG->SelectNodeTo(N, Opc, MVT::Other, Address, Tmp, Chain); -return NULL; +return CurDAG->SelectNodeTo(N, Opc, MVT::Other, Address, Tmp, Chain).Val; } case MVT::i64: Opc = IA64::ST8; break; case MVT::f64: Opc = IA64::STF8; break; @@ -531,8 +524,7 @@ SDOperand N1, N2; AddToQueue(N1, N->getOperand(1)); AddToQueue(N2, N->getOperand(2)); -Result = CurDAG->SelectNodeTo(N, Opc, MVT::Other, N2, N1, Chain); -return NULL; +return CurDAG->SelectNodeTo(N, Opc, MVT::Other, N2, N1, Chain).Val; } case ISD::BRCOND: { @@ -542,9 +534,8 @@ MachineBasicBlock *Dest = cast(N->getOperand(2))->getBasicBlock(); //FIXME - we do NOT need long branches all the time -Result = CurDAG->SelectNodeTo(N, IA64::BRLCOND_NOTCALL, MVT::Other, CC, -CurDAG->getBasicBlock(Dest), Chain); -return NULL; +return CurDAG->SelectNodeTo(N, IA64::BRLCOND_NOTCALL, MVT::Other, CC, +CurDAG->getBasicBlock(Dest), Chain).Val; } case ISD::CALLSEQ_START: @@ -554,17 +545,15 @@ IA64::ADJUSTCALLSTACKDOWN : IA64::ADJUSTCALLSTACKUP; SDOperand N0; AddToQueue(N0, N->getOperand(0)); -Result = CurDAG->SelectNodeTo(N, Opc, MVT::Other, getI64Imm(Amt), N0); -return NULL; +return CurDAG->SelectNodeTo(N, Opc, MVT::
[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
Changes in directory llvm/lib/Target/X86: X86ISelDAGToDAG.cpp updated: 1.91 -> 1.92 --- Log message: SelectNodeTo() may return a SDOperand that is different from the input. --- Diffs of the changes: (+1 -2) X86ISelDAGToDAG.cpp |3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.91 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.92 --- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.91Fri Aug 11 04:05:03 2006 +++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Wed Aug 16 02:30:09 2006 @@ -703,8 +703,7 @@ if (C.Val) { if (N.Val->hasOneUse()) { -Result = CurDAG->SelectNodeTo(N.Val, X86::MOV32ri, MVT::i32, C); - return NULL; +return CurDAG->SelectNodeTo(N.Val, X86::MOV32ri, MVT::i32, C).Val; } else { SDNode *ResNode = CurDAG->getTargetNode(X86::MOV32ri, MVT::i32, C); Result = SDOperand(ResNode, 0); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp
Changes in directory llvm/lib/Target/Sparc: SparcISelDAGToDAG.cpp updated: 1.103 -> 1.104 --- Log message: SelectNodeTo() may return a SDOperand that is different from the input. --- Diffs of the changes: (+3 -3) SparcISelDAGToDAG.cpp |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp diff -u llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.103 llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.104 --- llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.103 Fri Aug 11 04:08:15 2006 +++ llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp Wed Aug 16 02:29:40 2006 @@ -1093,8 +1093,8 @@ // FIXME: Handle div by immediate. unsigned Opcode = N->getOpcode() == ISD::SDIV ? SP::SDIVrr : SP::UDIVrr; -Result = CurDAG->SelectNodeTo(N, Opcode, MVT::i32, DivLHS, DivRHS, TopPart); -return NULL; +return CurDAG->SelectNodeTo(N, Opcode, MVT::i32, DivLHS, DivRHS, +TopPart).Val; } case ISD::MULHU: case ISD::MULHS: { @@ -1106,7 +1106,7 @@ SDNode *Mul = CurDAG->getTargetNode(Opcode, MVT::i32, MVT::Flag, MulLHS, MulRHS); // The high part is in the Y register. -Result = CurDAG->SelectNodeTo(N, SP::RDY, MVT::i32, SDOperand(Mul, 1)); +return CurDAG->SelectNodeTo(N, SP::RDY, MVT::i32, SDOperand(Mul, 1)).Val; return NULL; } } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelLowering.cpp
Changes in directory llvm/lib/Target/IA64: IA64ISelLowering.cpp updated: 1.40 -> 1.41 --- Log message: RET_FLAG has an optional input flag, but it does not produce a flag result. --- Diffs of the changes: (+2 -8) IA64ISelLowering.cpp | 10 ++ 1 files changed, 2 insertions(+), 8 deletions(-) Index: llvm/lib/Target/IA64/IA64ISelLowering.cpp diff -u llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.40 llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.41 --- llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.40 Fri Aug 11 12:38:39 2006 +++ llvm/lib/Target/IA64/IA64ISelLowering.cpp Wed Aug 16 02:28:58 2006 @@ -573,14 +573,8 @@ SDOperand()); AR_PFSVal = DAG.getCopyToReg(Copy.getValue(0), IA64::AR_PFS, AR_PFSVal, Copy.getValue(1)); - std::vector NodeTys; - std::vector RetOperands; - NodeTys.push_back(MVT::Other); - NodeTys.push_back(MVT::Flag); - RetOperands.push_back(AR_PFSVal); - RetOperands.push_back(AR_PFSVal.getValue(1)); - return DAG.getNode(IA64ISD::RET_FLAG, NodeTys, - &RetOperands[0], RetOperands.size()); + return DAG.getNode(IA64ISD::RET_FLAG, MVT::Other, + AR_PFSVal, AR_PFSVal.getValue(1)); } } return SDOperand(); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp
Changes in directory llvm/lib/Target/Alpha: AlphaISelDAGToDAG.cpp updated: 1.50 -> 1.51 --- Log message: SelectNodeTo() may return a SDOperand that is different from the input. --- Diffs of the changes: (+12 -17) AlphaISelDAGToDAG.cpp | 29 - 1 files changed, 12 insertions(+), 17 deletions(-) Index: llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp diff -u llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.50 llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.51 --- llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.50Fri Aug 11 04:07:02 2006 +++ llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp Wed Aug 16 02:25:54 2006 @@ -197,10 +197,9 @@ case ISD::FrameIndex: { int FI = cast(N)->getIndex(); -Result = CurDAG->SelectNodeTo(N, Alpha::LDA, MVT::i64, - CurDAG->getTargetFrameIndex(FI, MVT::i32), - getI64Imm(0)); -return NULL; +return CurDAG->SelectNodeTo(N, Alpha::LDA, MVT::i64, +CurDAG->getTargetFrameIndex(FI, MVT::i32), +getI64Imm(0)).Val; } case AlphaISD::GlobalBaseReg: Result = getGlobalBaseReg(); @@ -228,8 +227,7 @@ Chain, Chain.getValue(1)); Chain = CurDAG->getCopyFromReg(Chain, Alpha::R27, MVT::i64, SDOperand(CNode, 1)); -Result = CurDAG->SelectNodeTo(N, Alpha::BIS, MVT::i64, Chain, Chain); -return NULL; +return CurDAG->SelectNodeTo(N, Alpha::BIS, MVT::i64, Chain, Chain).Val; } case ISD::READCYCLECOUNTER: { @@ -266,24 +264,21 @@ SDOperand CPI = CurDAG->getTargetConstantPool(C, MVT::i64); SDNode *Tmp = CurDAG->getTargetNode(Alpha::LDAHr, MVT::i64, CPI, getGlobalBaseReg()); -Result = CurDAG->SelectNodeTo(N, Alpha::LDQr, MVT::i64, MVT::Other, - CPI, SDOperand(Tmp, 0), CurDAG->getEntryNode()); -return NULL; +return CurDAG->SelectNodeTo(N, Alpha::LDQr, MVT::i64, MVT::Other, +CPI, SDOperand(Tmp, 0), CurDAG->getEntryNode()).Val; } case ISD::TargetConstantFP: { ConstantFPSDNode *CN = cast(N); bool isDouble = N->getValueType(0) == MVT::f64; MVT::ValueType T = isDouble ? MVT::f64 : MVT::f32; if (CN->isExactlyValue(+0.0)) { - Result = CurDAG->SelectNodeTo(N, isDouble ? Alpha::CPYST : Alpha::CPYSS, -T, CurDAG->getRegister(Alpha::F31, T), -CurDAG->getRegister(Alpha::F31, T)); - return NULL; + return CurDAG->SelectNodeTo(N, isDouble ? Alpha::CPYST : Alpha::CPYSS, + T, CurDAG->getRegister(Alpha::F31, T), + CurDAG->getRegister(Alpha::F31, T)).Val; } else if ( CN->isExactlyValue(-0.0)) { - Result = CurDAG->SelectNodeTo(N, isDouble ? Alpha::CPYSNT : Alpha::CPYSNS, -T, CurDAG->getRegister(Alpha::F31, T), -CurDAG->getRegister(Alpha::F31, T)); - return NULL; + return CurDAG->SelectNodeTo(N, isDouble ? Alpha::CPYSNT : Alpha::CPYSNS, + T, CurDAG->getRegister(Alpha::F31, T), + CurDAG->getRegister(Alpha::F31, T)).Val; } else { abort(); } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp
Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.244 -> 1.245 --- Log message: SelectNodeTo() may return a SDOperand that is different from the input. --- Diffs of the changes: (+1 -4) DAGISelEmitter.cpp |5 + 1 files changed, 1 insertion(+), 4 deletions(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.244 llvm/utils/TableGen/DAGISelEmitter.cpp:1.245 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.244Tue Aug 15 18:42:26 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Wed Aug 16 02:25:15 2006 @@ -2794,8 +2794,6 @@ if (NodeHasInFlag || HasImpInputs) Code += ", InFlag"; emitCode(Code + ");"); -if (isRoot) - emitCode(" return NULL;"); emitCode("} else {"); emitDecl("ResNode", 1); Code = " ResNode = CurDAG->getTargetNode(Opc" + utostr(OpcNo); @@ -2812,9 +2810,8 @@ Code += ", InFlag"; emitCode(Code + ");"); emitCode(" Result = SDOperand(ResNode, 0);"); -if (isRoot) - emitCode(" return Result.Val;"); emitCode("}"); +emitCode("return Result.Val;"); } return std::make_pair(1, ResNo); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits