[llvm-commits] CVS: llvm/lib/CodeGen/PHIElimination.cpp

2006-08-11 Thread Chris Lattner


Changes in directory llvm/lib/CodeGen:

PHIElimination.cpp updated: 1.43 -> 1.44
---
Log message:

Fix an obvious bug, noticed by inspection.  No current targets trigger this.


---
Diffs of the changes:  (+3 -3)

 PHIElimination.cpp |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Index: llvm/lib/CodeGen/PHIElimination.cpp
diff -u llvm/lib/CodeGen/PHIElimination.cpp:1.43 
llvm/lib/CodeGen/PHIElimination.cpp:1.44
--- llvm/lib/CodeGen/PHIElimination.cpp:1.43Thu Jul 20 12:28:38 2006
+++ llvm/lib/CodeGen/PHIElimination.cpp Sat Aug 12 00:41:39 2006
@@ -103,9 +103,9 @@
 /// use of the specified register.
 static bool InstructionUsesRegister(MachineInstr *MI, unsigned SrcReg) {
   for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i)
-if (MI->getOperand(0).isRegister() &&
-MI->getOperand(0).getReg() == SrcReg &&
-MI->getOperand(0).isUse())
+if (MI->getOperand(i).isRegister() &&
+MI->getOperand(i).getReg() == SrcReg &&
+MI->getOperand(i).isUse())
   return true;
   return false;
 }



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Transforms/Utils/LoopSimplify.cpp

2006-08-11 Thread Chris Lattner


Changes in directory llvm/lib/Transforms/Utils:

LoopSimplify.cpp updated: 1.71 -> 1.72
---
Log message:

Don't attempt to split subloops out of a loop with a huge number of backedges.
Not only will this take huge amounts of compile time, the resultant loop nests
won't be useful for optimization.  This reduces loopsimplify time on
Transforms/LoopSimplify/2006-08-11-LoopSimplifyLongTime.ll from ~32s to ~0.4s
with a debug build of llvm on a 2.7Ghz G5.


---
Diffs of the changes:  (+19 -8)

 LoopSimplify.cpp |   27 +++
 1 files changed, 19 insertions(+), 8 deletions(-)


Index: llvm/lib/Transforms/Utils/LoopSimplify.cpp
diff -u llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.71 
llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.72
--- llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.71 Fri Aug 11 23:51:20 2006
+++ llvm/lib/Transforms/Utils/LoopSimplify.cpp  Sat Aug 12 00:25:00 2006
@@ -168,6 +168,8 @@
 ///
 bool LoopSimplify::ProcessLoop(Loop *L) {
   bool Changed = false;
+ReprocessLoop:
+  
   // Canonicalize inner loops before outer loops.  Inner loop canonicalization
   // can provide work for the outer loop to canonicalize.
   for (Loop::iterator I = L->begin(), E = L->end(); I != E; ++I)
@@ -208,16 +210,25 @@
 
   // If the header has more than two predecessors at this point (from the
   // preheader and from multiple backedges), we must adjust the loop.
-  if (L->getNumBackEdges() != 1) {
-
-// If this is really a nested loop, rip it out into a child loop.
-if (Loop *NL = SeparateNestedLoop(L)) {
-  ++NumNested;
-  // This is a big restructuring change, reprocess the whole loop.
-  ProcessLoop(NL);
-  return true;
+  unsigned NumBackedges = L->getNumBackEdges();
+  if (NumBackedges != 1) {
+// If this is really a nested loop, rip it out into a child loop.  Don't do
+// this for loops with a giant number of backedges, just factor them into a
+// common backedge instead.
+if (NumBackedges < 8) {
+  if (Loop *NL = SeparateNestedLoop(L)) {
+++NumNested;
+// This is a big restructuring change, reprocess the whole loop.
+ProcessLoop(NL);
+Changed = true;
+// GCC doesn't tail recursion eliminate this.
+goto ReprocessLoop;
+  }
 }
 
+// If we either couldn't, or didn't want to, identify nesting of the loops,
+// insert a new block that all backedges target, then make it jump to the
+// loop header.
 InsertUniqueBackedgeBlock(L);
 NumInserted++;
 Changed = true;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/Regression/Transforms/LoopSimplify/2006-08-11-LoopSimplifyLongTime.ll 2006-08-11-LoopSimplifyLongTime.ll.bc

2006-08-11 Thread Chris Lattner


Changes in directory llvm/test/Regression/Transforms/LoopSimplify:

2006-08-11-LoopSimplifyLongTime.ll added (r1.1)
2006-08-11-LoopSimplifyLongTime.ll.bc added (r1.1)
---
Log message:

New testcase, this used to take hours to loopsimplify.


---
Diffs of the changes:  (+5 -0)

 2006-08-11-LoopSimplifyLongTime.ll|5 +
 2006-08-11-LoopSimplifyLongTime.ll.bc |0 
 2 files changed, 5 insertions(+)


Index: 
llvm/test/Regression/Transforms/LoopSimplify/2006-08-11-LoopSimplifyLongTime.ll
diff -c /dev/null 
llvm/test/Regression/Transforms/LoopSimplify/2006-08-11-LoopSimplifyLongTime.ll:1.1
*** /dev/null   Sat Aug 12 00:23:37 2006
--- 
llvm/test/Regression/Transforms/LoopSimplify/2006-08-11-LoopSimplifyLongTime.ll 
Sat Aug 12 00:23:27 2006
***
*** 0 
--- 1,5 
+ ; This used to take hours to loop simplify.
+ ; RUN: opt %s.bc -loopsimplify -disable-output
+ 
+ ; Note, the input is actually in the accompanying .bc file to save space.
+ 


Index: 
llvm/test/Regression/Transforms/LoopSimplify/2006-08-11-LoopSimplifyLongTime.ll.bc



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Analysis/LoopInfo.cpp

2006-08-11 Thread Chris Lattner


Changes in directory llvm/lib/Analysis:

LoopInfo.cpp updated: 1.75 -> 1.76
---
Log message:

Make Loop::getExitBlocks significantly faster for large loops.  Instead of
pounding on Loop::contains (which is O(n) in the size of the loop), use a
sorted vector, which is O(log(N)) for each query.  This speeds up Duraid's
horrible testcase from ~72s to ~31s in a debug build.


---
Diffs of the changes:  (+9 -3)

 LoopInfo.cpp |   12 +---
 1 files changed, 9 insertions(+), 3 deletions(-)


Index: llvm/lib/Analysis/LoopInfo.cpp
diff -u llvm/lib/Analysis/LoopInfo.cpp:1.75 llvm/lib/Analysis/LoopInfo.cpp:1.76
--- llvm/lib/Analysis/LoopInfo.cpp:1.75 Tue Aug  1 19:14:16 2006
+++ llvm/lib/Analysis/LoopInfo.cpp  Sat Aug 12 00:02:03 2006
@@ -336,11 +336,17 @@
 /// are the blocks _outside of the current loop_ which are branched to.
 ///
 void Loop::getExitBlocks(std::vector &ExitBlocks) const {
+  // Sort the blocks vector so that we can use binary search to do quick
+  // lookups.
+  std::vector LoopBBs(block_begin(), block_end());
+  std::sort(LoopBBs.begin(), LoopBBs.end());
+  
   for (std::vector::const_iterator BI = Blocks.begin(),
- BE = Blocks.end(); BI != BE; ++BI)
+   BE = Blocks.end(); BI != BE; ++BI)
 for (succ_iterator I = succ_begin(*BI), E = succ_end(*BI); I != E; ++I)
-  if (!contains(*I))   // Not in current loop?
-ExitBlocks.push_back(*I);  // It must be an exit block...
+  if (!std::binary_search(LoopBBs.begin(), LoopBBs.end(), *I))
+// Not in current loop? It must be an exit block.
+ExitBlocks.push_back(*I);
 }
 
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Transforms/Utils/LoopSimplify.cpp

2006-08-11 Thread Chris Lattner


Changes in directory llvm/lib/Transforms/Utils:

LoopSimplify.cpp updated: 1.70 -> 1.71
---
Log message:

Reimplement the loopsimplify code which deletes edges from unreachable 
blocks that target loop blocks.

Before, the code was run once per loop, and depended on the number of 
predecessors each block in the loop had.  Unfortunately, scanning preds can
be really slow when huge numbers of phis exist or when phis with huge numbers
of inputs exist.

Now, the code is run once per function and scans successors instead of preds,
which is far faster.  In addition, the new code is simpler and is goto free, 
woo.

This change speeds up a nasty testcase Duraid provided me from taking hours to 
taking ~72s with a debug build.  The functionality this implements is already 
tested in the testsuite as 
Transforms/CodeExtractor/2004-03-13-LoopExtractorCrash.ll.



---
Diffs of the changes:  (+53 -29)

 LoopSimplify.cpp |   82 +++
 1 files changed, 53 insertions(+), 29 deletions(-)


Index: llvm/lib/Transforms/Utils/LoopSimplify.cpp
diff -u llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.70 
llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.71
--- llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.70 Wed Jun 28 18:17:24 2006
+++ llvm/lib/Transforms/Utils/LoopSimplify.cpp  Fri Aug 11 23:51:20 2006
@@ -105,6 +105,58 @@
   LI = &getAnalysis();
   AA = getAnalysisToUpdate();
 
+  // Check to see that no blocks (other than the header) in loops have
+  // predecessors that are not in loops.  This is not valid for natural loops,
+  // but can occur if the blocks are unreachable.  Since they are unreachable 
we
+  // can just shamelessly destroy their terminators to make them not branch 
into
+  // the loop!
+  for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) {
+// This case can only occur for unreachable blocks.  Blocks that are
+// unreachable can't be in loops, so filter those blocks out.
+if (LI->getLoopFor(BB)) continue;
+
+bool BlockUnreachable = false;
+TerminatorInst *TI = BB->getTerminator();
+
+// Check to see if any successors of this block are non-loop-header loops
+// that are not the header.
+for (unsigned i = 0, e = TI->getNumSuccessors(); i != e; ++i) {
+  // If this successor is not in a loop, BB is clearly ok.
+  Loop *L = LI->getLoopFor(TI->getSuccessor(i));
+  if (!L) continue;
+  
+  // If the succ is the loop header, and if L is a top-level loop, then 
this
+  // is an entrance into a loop through the header, which is also ok.
+  if (L->getHeader() == TI->getSuccessor(i) && L->getParentLoop() == 0)
+continue;
+  
+  // Otherwise, this is an entrance into a loop from some place invalid.
+  // Either the loop structure is invalid and this is not a natural loop 
(in
+  // which case the compiler is buggy somewhere else) or BB is unreachable.
+  BlockUnreachable = true;
+  break;
+}
+
+// If this block is ok, check the next one.
+if (!BlockUnreachable) continue;
+
+// Otherwise, this block is dead.  To clean up the CFG and to allow later
+// loop transformations to ignore this case, we delete the edges into the
+// loop by replacing the terminator.
+
+// Remove PHI entries from the successors.
+for (unsigned i = 0, e = TI->getNumSuccessors(); i != e; ++i)
+  TI->getSuccessor(i)->removePredecessor(BB);
+   
+// Add a new unreachable instruction.
+new UnreachableInst(TI);
+
+// Delete the dead terminator.
+if (AA) AA->deleteValue(&BB->back());
+BB->getInstList().pop_back();
+Changed |= true;
+  }
+  
   for (LoopInfo::iterator I = LI->begin(), E = LI->end(); I != E; ++I)
 Changed |= ProcessLoop(*I);
 
@@ -121,38 +173,10 @@
   for (Loop::iterator I = L->begin(), E = L->end(); I != E; ++I)
 Changed |= ProcessLoop(*I);
   
-  // Check to see that no blocks (other than the header) in the loop have
-  // predecessors that are not in the loop.  This is not valid for natural
-  // loops, but can occur if the blocks are unreachable.  Since they are
-  // unreachable we can just shamelessly destroy their terminators to make them
-  // not branch into the loop!
   assert(L->getBlocks()[0] == L->getHeader() &&
  "Header isn't first block in loop?");
-  for (unsigned i = 1, e = L->getBlocks().size(); i != e; ++i) {
-BasicBlock *LoopBB = L->getBlocks()[i];
-  Retry:
-for (pred_iterator PI = pred_begin(LoopBB), E = pred_end(LoopBB);
- PI != E; ++PI)
-  if (!L->contains(*PI)) {
-// This predecessor is not in the loop.  Kill its terminator!
-BasicBlock *DeadBlock = *PI;
-for (succ_iterator SI = succ_begin(DeadBlock), E = succ_end(DeadBlock);
- SI != E; ++SI)
-  (*SI)->removePredecessor(DeadBlock);  // Remove PHI node entries
-
-// Delete the dead terminator.
-if (AA) AA->deleteValue(&DeadBlock->back())

[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h

2006-08-11 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGCSEMap.h updated: 1.4 -> 1.5
---
Log message:

Track # nodes in a CSEMap.


---
Diffs of the changes:  (+1 -0)

 SelectionDAGCSEMap.h |1 +
 1 files changed, 1 insertion(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h:1.4 
llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h:1.5
--- llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h:1.4  Fri Aug 11 18:55:53 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h  Fri Aug 11 20:07:51 2006
@@ -35,6 +35,7 @@
   class SelectionDAGCSEMap {
 void **Buckets;
 unsigned NumBuckets;  // Always a power of 2.
+unsigned NumNodes;
   public:
 class NodeID;
 SelectionDAGCSEMap();



___
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/SelectionDAGCSEMap.cpp

2006-08-11 Thread Chris Lattner


Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAGCSEMap.cpp updated: 1.4 -> 1.5
---
Log message:

Switch to using SuperFastHash instead of adding all elements together.  This
doesn't significantly improve performance but it helps a small amount.


---
Diffs of the changes:  (+24 -6)

 SelectionDAGCSEMap.cpp |   30 --
 1 files changed, 24 insertions(+), 6 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp:1.4 
llvm/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp:1.5
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp:1.4Fri Aug 11 
18:55:53 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cppFri Aug 11 
20:07:10 2006
@@ -126,10 +126,23 @@
 /// ComputeHash - Compute a strong hash value for this NodeID, for lookup in
 /// the SelectionDAGCSEMap.
 unsigned SelectionDAGCSEMap::NodeID::ComputeHash() const {
-  // FIXME: this hash function sucks.
-  unsigned Hash = 0;
-  for (unsigned i = 0, e = Bits.size(); i != e; ++i)
-Hash = Hash+Bits[i];
+  // This is adapted from SuperFastHash by Paul Hsieh.
+  unsigned Hash = Bits.size();
+  for (const unsigned *BP = &Bits[0], *E = BP+Bits.size(); BP != E; ++BP) {
+unsigned Data = *BP;
+Hash += Data & 0x;
+unsigned Tmp  = ((Data >> 16) << 11) ^ Hash;
+Hash  = (Hash << 16) ^ Tmp;
+Hash += Hash >> 11;
+  }
+  
+  // Force "avalanching" of final 127 bits.
+  Hash ^= Hash << 3;
+  Hash += Hash >> 5;
+  Hash ^= Hash << 4;
+  Hash += Hash >> 17;
+  Hash ^= Hash << 25;
+  Hash += Hash >> 6;
   return Hash;
 }
 
@@ -142,7 +155,7 @@
 
//===--===//
 // SelectionDAGCSEMap Implementation
 
-SelectionDAGCSEMap::SelectionDAGCSEMap() {
+SelectionDAGCSEMap::SelectionDAGCSEMap() : NumNodes(0) {
   NumBuckets = 256;
   Buckets = new void*[NumBuckets];
   memset(Buckets, 0, NumBuckets*sizeof(void*));
@@ -211,6 +224,8 @@
 /// is not already in the map.  InsertPos must be obtained from 
 /// FindNodeOrInsertPos.
 void SelectionDAGCSEMap::InsertNode(SDNode *N, void *InsertPos) {
+  ++NumNodes;
+  
   /// The insert position is actually a bucket pointer.
   void **Bucket = static_cast(InsertPos);
   
@@ -230,12 +245,15 @@
 /// RemoveNode - Remove a node from the CSE map, returning true if one was
 /// removed or false if the node was not in the CSE map.
 bool SelectionDAGCSEMap::RemoveNode(SDNode *N) {
+
   // Because each bucket is a circular list, we don't need to compute N's hash
   // to remove it.  Chase around the list until we find the node (or bucket)
   // which points to N.
   void *Ptr = N->getNextInBucket();
   if (Ptr == 0) return false;  // Not in CSEMap.
-  
+
+  --NumNodes;
+
   void *NodeNextPtr = Ptr;
   N->SetNextInBucket(0);
   while (1) {



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/utils/llvmdo

2006-08-11 Thread Reid Spencer


Changes in directory llvm/utils:

llvmdo updated: 1.15 -> 1.16
---
Log message:

Lexer.cpp is a generated file both in lib/AsmParser and projects/Stacker
so we remove it from being counted.


---
Diffs of the changes:  (+1 -0)

 llvmdo |1 +
 1 files changed, 1 insertion(+)


Index: llvm/utils/llvmdo
diff -u llvm/utils/llvmdo:1.15 llvm/utils/llvmdo:1.16
--- llvm/utils/llvmdo:1.15  Fri Aug 11 18:51:05 2006
+++ llvm/utils/llvmdo   Fri Aug 11 18:58:58 2006
@@ -127,6 +127,7 @@
   \! -name '*AST-Remove.ll' \
   \! -name 'llvmAsmParser.cpp' \
   \! -name 'llvmAsmParser.h' \
+  \! -name 'Lexer.cpp' \
   \! -name 'FileLexer.cpp' \
   \! -name 'FileParser.cpp' \
   \! -name 'FileParser.h' \



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/Support/MathExtras.h

2006-08-11 Thread Chris Lattner


Changes in directory llvm/include/llvm/Support:

MathExtras.h updated: 1.34 -> 1.35
---
Log message:

remove IncludeFile turds in MathExtras.h, which bloats every .o file that
#includes it.


---
Diffs of the changes:  (+0 -3)

 MathExtras.h |3 ---
 1 files changed, 3 deletions(-)


Index: llvm/include/llvm/Support/MathExtras.h
diff -u llvm/include/llvm/Support/MathExtras.h:1.34 
llvm/include/llvm/Support/MathExtras.h:1.35
--- llvm/include/llvm/Support/MathExtras.h:1.34 Wed Jul 26 11:18:00 2006
+++ llvm/include/llvm/Support/MathExtras.h  Fri Aug 11 18:52:54 2006
@@ -307,7 +307,4 @@
 
 } // End llvm namespace
 
-FORCE_DEFINING_FILE_TO_BE_LINKED(SupportIsInf)
-FORCE_DEFINING_FILE_TO_BE_LINKED(SupportIsNAN)
-
 #endif



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/utils/llvmdo

2006-08-11 Thread Reid Spencer


Changes in directory llvm/utils:

llvmdo updated: 1.14 -> 1.15
---
Log message:

Weed out some cruft and add in some missing extensions.


---
Diffs of the changes:  (+40 -18)

 llvmdo |   58 --
 1 files changed, 40 insertions(+), 18 deletions(-)


Index: llvm/utils/llvmdo
diff -u llvm/utils/llvmdo:1.14 llvm/utils/llvmdo:1.15
--- llvm/utils/llvmdo:1.14  Fri Aug 11 16:53:27 2006
+++ llvm/utils/llvmdo   Fri Aug 11 18:51:05 2006
@@ -69,31 +69,42 @@
   -path '*/.libs/*' \
 \) -prune  -o \( \
   \( \
+ -name '*.ac' -o \
+ -name '*.b' -o \
+ -name '*.c' -o \
+ -name '*.cc' -o \
+ -name '*.cfg' -o \
  -name '*.cpp' -o \
- -name '*.h' -o \
+ -name '*.css' -o \
  -name '*.def' -o \
- -name '*.c' -o \
+ -name '*.el' -o \
+ -name '*.exp' -o \
+ -name '*.footer' -o \
+ -name '*.gnuplot' -o \
+ -name '*.h' -o \
+ -name '*.header' -o \
+ -name '*.html' -o \
+ -name '*.in' -o \
+ -name '*.inc' -o \
+ -name '*.intro' -o \
  -name '*.l' -o \
- -name '*.y' -o \
- -name '*.td' -o \
- -name '*.py' -o \
- -name '*.pl' -o \
- -name '*.sh' -o \
+ -name '*.ll' -o \
+ -name '*.llx' -o \
  -name '*.lst' -o \
+ -name '*.m4' -o \
+ -name '*.pl' -o \
  -name '*.pod' -o \
- -name '*.html' -o \
- -name '*.css' -o \
- -name '*.cfg' -o \
- -name '*.cc' -o \
+ -name '*.py' -o \
+ -name '*.sh' -o \
+ -name '*.schema' -o \
+ -name '*.tcl' -o \
+ -name '*.td' -o \
+ -name '*.tr' -o \
  -name '*.txt' -o \
  -name '*.TXT' -o \
- -name '*.el' -o \
- -name '*.m4' -o \
- -name '*.in' -o \
- -name '*.ac' -o \
  -name '*.tr' -o \
  -name '*.vim' -o \
- -name '*.gnuplot' -o \
+ -name '*.y' -o \
  -name 'Make*' -o \
  -path 'test/*.ll' -o \
  -path 'runtime/*.ll' \
@@ -101,7 +112,19 @@
   \! -name '.*' \
   \! -name '*~' \
   \! -name '#*' \
-  \! -name 'Lexer.cpp' \
+  \! -name '*.cvs' \
+  \! -name 'configure' \
+  \! -name 'slow.ll' \
+  \! -name '*libtool*' \
+  \! -name 'ltdl*' \
+  \! -name 'ltdl.m4' \
+  \! -name 'ltmain.m4' \
+  \! -name 'ltmain.sh' \
+  \! -name 'aclocal.m4' \
+  \! -name 'acinclude.m4' \
+  \! -name '*VerifierIsReallySlow.llx' \
+  \! -name '*LoopSimplifyCrash.ll' \
+  \! -name '*AST-Remove.ll' \
   \! -name 'llvmAsmParser.cpp' \
   \! -name 'llvmAsmParser.h' \
   \! -name 'FileLexer.cpp' \
@@ -116,4 +139,3 @@
 else
   echo "Can't find LLVM top directory in $TOPDIR"
 fi
-



___
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/SelectionDAGCSEMap.cpp

2006-08-11 Thread Chris Lattner


Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAGCSEMap.cpp updated: 1.3 -> 1.4
---
Log message:

Switch NodeID to track 32-bit chunks instead of 8-bit chunks, for a 2.5%
speedup in isel time.


---
Diffs of the changes:  (+9 -15)

 SelectionDAGCSEMap.cpp |   24 +---
 1 files changed, 9 insertions(+), 15 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp:1.3 
llvm/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp:1.4
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp:1.3Fri Aug 11 
16:55:30 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cppFri Aug 11 
18:55:53 2006
@@ -105,21 +105,15 @@
   // on the host.  It doesn't matter however, because hashing on pointer values
   // in inherently unstable.  Nothing in the SelectionDAG should depend on the
   // ordering of nodes in the CSEMap.
-  union {
-intptr_t PtrI;
-unsigned char PtrA[sizeof(intptr_t)];
-  };
-  PtrI = (intptr_t)Ptr;
-  Bits.append(PtrA, PtrA+sizeof(intptr_t));
+  intptr_t PtrI = (intptr_t)Ptr;
+  Bits.push_back(unsigned(PtrI));
+  if (sizeof(intptr_t) > sizeof(unsigned))
+Bits.push_back(unsigned(uint64_t(PtrI) >> 32));
 }
 
 void SelectionDAGCSEMap::NodeID::AddOperand(SDOperand Op) {
   AddPointer(Op.Val);
-  // 2 bytes of resno might be too small, three should certainly be enough. :)
-  assert(Op.ResNo < (1 << 24) && "ResNo too large for CSE Map to handle!");
-  Bits.push_back((Op.ResNo >>  0) & 0xFF);
-  Bits.push_back((Op.ResNo >>  8) & 0xFF);
-  Bits.push_back((Op.ResNo >> 16) & 0xFF);
+  Bits.push_back(Op.ResNo);
 }
 
 void SelectionDAGCSEMap::NodeID::SetOperands(const SDOperand *Ops, 
@@ -135,13 +129,13 @@
   // FIXME: this hash function sucks.
   unsigned Hash = 0;
   for (unsigned i = 0, e = Bits.size(); i != e; ++i)
-Hash += Bits[i];
+Hash = Hash+Bits[i];
   return Hash;
 }
 
 bool SelectionDAGCSEMap::NodeID::operator==(const NodeID &RHS) const {
   if (Bits.size() != RHS.Bits.size()) return false;
-  return memcmp(&Bits[0], &RHS.Bits[0], Bits.size()) == 0;
+  return memcmp(&Bits[0], &RHS.Bits[0], Bits.size()*sizeof(Bits[0])) == 0;
 }
 
 
@@ -169,8 +163,8 @@
 }
 
 void **SelectionDAGCSEMap::GetBucketPtr(void *NextInBucketPtr) {
-  assert(NextInBucketPtr >= Buckets && NextInBucketPtr < Buckets+NumBuckets &&
- "NextInBucketPtr is not a bucket ptr");
+  //assert(NextInBucketPtr >= Buckets && NextInBucketPtr < Buckets+NumBuckets 
&&
+  //   "NextInBucketPtr is not a bucket ptr");
   return static_cast(NextInBucketPtr);
 }
 



___
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/SelectionDAGCSEMap.h

2006-08-11 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGCSEMap.h updated: 1.3 -> 1.4
---
Log message:

Switch NodeID to track 32-bit chunks instead of 8-bit chunks, for a 2.5%
speedup in isel time.


---
Diffs of the changes:  (+9 -16)

 SelectionDAGCSEMap.h |   25 +
 1 files changed, 9 insertions(+), 16 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h:1.3 
llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h:1.4
--- llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h:1.3  Fri Aug 11 16:00:46 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h  Fri Aug 11 18:55:53 2006
@@ -63,7 +63,7 @@
 class NodeID {
   /// Use a SmallVector to avoid a heap allocation in the common case.
   ///
-  SmallVector Bits;
+  SmallVector Bits;
 public:
   NodeID() {}
   NodeID(SDNode *N);
@@ -77,13 +77,13 @@
  const SDOperand *OpList, unsigned N);
   
   void SetOpcode(unsigned short ID) {
-Bits.push_back(ID & 0xFF);
-Bits.push_back(ID >> 8);
+Bits.push_back(ID);
   }
   
-  /// getOpcode - If the opcode has been set for this NodeID, return it.
+  /// getOpcode - Return the opcode that has been set for this NodeID.
+  ///
   unsigned getOpcode() const {
-return Bits[0] + (Bits[1] << 8);
+return Bits[0];
   }
 
   void SetValueTypes(const void *VTList) { AddPointer(VTList); }
@@ -99,21 +99,14 @@
   void AddOperand(SDOperand Op);
   void AddPointer(const void *Ptr);
   void AddInteger(signed I) {
-Bits.push_back((I >>  0) & 0xFF);
-Bits.push_back((I >>  8) & 0xFF);
-Bits.push_back((I >> 16) & 0xFF);
-Bits.push_back((I >> 24) & 0xFF);
+Bits.push_back(I);
   }
   void AddInteger(unsigned I) {
-AddInteger((signed)I);
+Bits.push_back(I);
   }
   void AddInteger(uint64_t I) {
-union {
-  uint64_t x;
-  unsigned char A[8];
-};
-x = I;
-Bits.append(A, A+8);
+Bits.push_back(unsigned(I));
+Bits.push_back(unsigned(I >> 32));
   }
   
   unsigned ComputeHash() const;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Support/IsInf.cpp IsNAN.cpp

2006-08-11 Thread Chris Lattner


Changes in directory llvm/lib/Support:

IsInf.cpp updated: 1.9 -> 1.10
IsNAN.cpp updated: 1.6 -> 1.7
---
Log message:

remove IncludeFile turds in MathExtras.h, which bloats every .o file that
#includes it.


---
Diffs of the changes:  (+9 -13)

 IsInf.cpp |   13 +++--
 IsNAN.cpp |9 ++---
 2 files changed, 9 insertions(+), 13 deletions(-)


Index: llvm/lib/Support/IsInf.cpp
diff -u llvm/lib/Support/IsInf.cpp:1.9 llvm/lib/Support/IsInf.cpp:1.10
--- llvm/lib/Support/IsInf.cpp:1.9  Wed Jul 26 11:18:00 2006
+++ llvm/lib/Support/IsInf.cpp  Fri Aug 11 18:52:54 2006
@@ -6,9 +6,12 @@
 // the University of Illinois Open Source License. See LICENSE.TXT for details.
 //
 
//===--===//
+//
+// Platform-independent wrapper around C99 isinf()
+//
+//===--===//
 
 #include "llvm/Config/config.h"
-#include "llvm/System/IncludeFile.h"
 
 #if HAVE_ISINF_IN_MATH_H
 # include 
@@ -33,16 +36,14 @@
 #elif defined(__hpux)
 // HP-UX is "special"
 #include 
-static int isinf(double x) { return ((x)==INFINITY)||((x)==-INFINITY); }
+static int isinf(double x) { return ((x) == INFINITY) || ((x) == -INFINITY); }
 #else
 # error "Don't know how to get isinf()"
 #endif
 
 namespace llvm {
 
-int IsInf (float f)  { return isinf (f); }
-int IsInf (double d) { return isinf (d); }
+int IsInf(float f)  { return isinf(f); }
+int IsInf(double d) { return isinf(d); }
 
 } // end namespace llvm;
-
-DEFINING_FILE_FOR(SupportIsInf)


Index: llvm/lib/Support/IsNAN.cpp
diff -u llvm/lib/Support/IsNAN.cpp:1.6 llvm/lib/Support/IsNAN.cpp:1.7
--- llvm/lib/Support/IsNAN.cpp:1.6  Wed Jul 26 11:18:00 2006
+++ llvm/lib/Support/IsNAN.cpp  Fri Aug 11 18:52:54 2006
@@ -12,7 +12,6 @@
 
//===--===//
 
 #include "llvm/Config/config.h"
-#include "llvm/System/IncludeFile.h"
 
 #if HAVE_ISNAN_IN_MATH_H
 # include 
@@ -29,10 +28,6 @@
 #endif
 
 namespace llvm {
-
-int IsNAN (float f)  { return isnan (f); }
-int IsNAN (double d) { return isnan (d); }
-
+  int IsNAN(float f)  { return isnan(f); }
+  int IsNAN(double d) { return isnan(d); }
 } // end namespace llvm;
-
-DEFINING_FILE_FOR(SupportIsNAN)



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/utils/userloc.pl

2006-08-11 Thread Reid Spencer


Changes in directory llvm/utils:

userloc.pl updated: 1.6 -> 1.7
---
Log message:

Weed out cruft that should not be counted and add in extensions we 
previously missed.


---
Diffs of the changes:  (+50 -106)

 userloc.pl |  156 +++--
 1 files changed, 50 insertions(+), 106 deletions(-)


Index: llvm/utils/userloc.pl
diff -u llvm/utils/userloc.pl:1.6 llvm/utils/userloc.pl:1.7
--- llvm/utils/userloc.pl:1.6   Fri Aug 11 15:44:17 2006
+++ llvm/utils/userloc.pl   Fri Aug 11 18:50:27 2006
@@ -8,32 +8,30 @@
 #   then the cwd is used. The directory must be an LLVM tree checked 
out
 #   from cvs. 
 #
-# Syntax:   userloc.pl [-recurse|-tag=tag|-html... ...
+# Syntax:   userloc.pl [-tag=tag|-html... ...
 #
 # Options:
-#   -recurse
-#   Recurse through sub directories. Without this, only the
-#   specified directory is examined
 #   -tag=tag
 #   Use "tag" to select the revision (as per cvs -r option)
 #   -filedetails
 #   Report details about lines of code in each file for each user
 #   -html
 #   Generate HTML output instead of text output
+# Directories:
+#   The directories passed after the options should be relative paths to
+#   directories of interest from the top of the llvm source tree, e.g. "lib"
+#   or "include", etc.
 
-die "Usage userloc.pl [-recurse|-tag=tag|-html] ..." 
+die "Usage userloc.pl [-tag=tag|-html] ..." 
   if ($#ARGV < 0);
 
 my $tag = "";
-my $recurse = 0;
 my $html = 0;
 my $debug = 0;
 my $filedetails = "";
-while ( substr($ARGV[0],0,1) eq '-' )
+while ( defined($ARGV[0]) && substr($ARGV[0],0,1) eq '-' )
 {
-  if ($ARGV[0] eq "-recurse") {
-$recurse = 1;
-  } elsif ($ARGV[0] =~ /-tag=.*/) {
+  if ($ARGV[0] =~ /-tag=.*/) {
 $tag = $ARGV[0];
 $tag =~ s#-tag=(.*)#$1#;
   } elsif ($ARGV[0] =~ /-filedetails/) {
@@ -48,54 +46,30 @@
   shift;
 }
 
-die "Usage userloc.pl [-recurse|-tag=tag|-html] ..." 
-  if ($#ARGV < 0);
-
+chomp(my $srcroot = `llvm-config --src-root`);
+my $llvmdo = "$srcroot/utils/llvmdo";
 my %Stats;
 my %FileStats;
 
-sub ValidateFile
+my $annotate = "cvs -z6 annotate -lf ";
+if (length($tag) > 0)
 {
-  my $f = $_[0];
-  my $d = $_[1];
-
-  if ( $d =~ ".*autoconf.*")
-  {
-return 1 if ($f eq "configure.ac");
-return 1 if ($f eq "AutoRegen.sh");
-return 0;
-  }
-  return 0 if ( "$f" eq "configure");
-  return 0 if ( "$f" eq 'PPCPerfectShuffle.h' );
-  return 0 if ( $f =~ /.*\.cvs/);
-  return 1;
+  $annotate = $annotate . " -r" . $tag;
 }
 
 sub GetCVSFiles
 {
   my $d = $_[0];
   my $files ="";
-  open STATUS, "cvs -nfz6 status $d -l 2>/dev/null |" 
-|| die "Can't 'cvs status'";
-  while ( defined($line = ) )
-  {
-if ( $line =~ /^File:.*/ )
-{
-  chomp($line);
-  $line =~ s#^File: ([A-Za-z0-9._-]*)[ \t]*Status:.*#$1#;
-  $files = "$files $d/$line" if (ValidateFile($line,$d));
-}
-
+  open FILELIST, 
+"$llvmdo -dirs \"$d\" echo |" || die "Can't get list of files with llvmdo";
+  while ( defined($line = ) ) {
+chomp($file = $line);
+$files = "$files $file";
   }
   return $files;
 }
 
-my $annotate = "cvs -z6 annotate -lf ";
-if (length($tag) > 0)
-{
-  $annotate = $annotate . " -r" . $tag;
-}
-
 sub ScanDir
 {
   my $Dir = $_[0];
@@ -124,37 +98,14 @@
   close DATA;
 }
 
-sub ValidateDirectory
-{
-  my $d = $_[0];
-  return 0 if (! -d "$d" || ! -d "$d/CVS");
-  return 0 if ($d =~ /.*CVS.*/);
-  return 0 if ($d =~ /.*Debug.*/);
-  return 0 if ($d =~ /.*Release.*/);
-  return 0 if ($d =~ /.*Profile.*/);
-  return 0 if ($d =~ /.*docs\/CommandGuide\/html.*/);
-  return 0 if ($d =~ /.*docs\/CommandGuide\/man.*/);
-  return 0 if ($d =~ /.*docs\/CommandGuide\/ps.*/);
-  return 0 if ($d =~ /.*docs\/CommandGuide\/man.*/);
-  return 0 if ($d =~ /.*docs\/HistoricalNotes.*/);
-  return 0 if ($d =~ /.*docs\/img.*/);
-  return 0 if ($d =~ /.*bzip2.*/);
-  return 1 if ($d =~ /.*projects\/Stacker.*/);
-  return 1 if ($d =~ /.*projects\/sample.*/);
-  return 0 if ($d =~ /.*projects\/llvm-.*/);
-  return 0 if ($d =~ /.*win32.*/);
-  return 0 if ($d =~ /.*\/.libs\/.*/);
-  return 1;
-}
-
 sub printStats
 {
   my $dir = $_[0];
   my $hash = $_[1];
-  my $usr;
+  my $user;
   my $total = 0;
 
-  foreach $usr (keys %Stats) { $total += $Stats{$usr}; }
+  foreach $user (keys %Stats) { $total += $Stats{$user}; }
 
   if ($html) { 
 print "";
@@ -164,15 +115,20 @@
 print "\n";
   }
 
-  foreach $usr ( sort keys %Stats )
+  foreach $user ( sort keys %Stats )
   {
-my $v = $Stats{$usr};
+my $v = $Stats{$user};
 if (defined($v))
 {
   if ($html) {
-printf "%d(%4.1f%%)%s", $v, (100.0/$total)*$v,$usr;
+printf "%d(%4.1f%%)", $v, 
(100.0/$total)*$v;
+if ($filedetails) {
+  print "$user";
+} else {
+  print $user,"";
+}
   } else {
-printf "%8d  (%4.1f%%)  %s\n", $v, (100.0/$tot

[llvm-commits] CVS: llvm/include/llvm/ADT/SmallVector.h

2006-08-11 Thread Chris Lattner


Changes in directory llvm/include/llvm/ADT:

SmallVector.h updated: 1.10 -> 1.11
---
Log message:

move code out of line so that GCC doesn't inline it at -O3


---
Diffs of the changes:  (+69 -62)

 SmallVector.h |  131 ++
 1 files changed, 69 insertions(+), 62 deletions(-)


Index: llvm/include/llvm/ADT/SmallVector.h
diff -u llvm/include/llvm/ADT/SmallVector.h:1.10 
llvm/include/llvm/ADT/SmallVector.h:1.11
--- llvm/include/llvm/ADT/SmallVector.h:1.10Fri Aug 11 18:19:51 2006
+++ llvm/include/llvm/ADT/SmallVector.h Fri Aug 11 18:40:23 2006
@@ -131,47 +131,7 @@
   new (Begin+NumElts-1) T(Elt);
   }
   
-  const SmallVectorImpl &operator=(const SmallVectorImpl &RHS) {
-// Avoid self-assignment.
-if (this == &RHS) return *this;
-
-// If we already have sufficient space, assign the common elements, then
-// destroy any excess.
-unsigned RHSSize = RHS.size();
-unsigned CurSize = size();
-if (CurSize >= RHSSize) {
-  // Assign common elements.
-  std::copy(RHS.Begin, RHS.Begin+RHSSize, Begin);
-  
-  // Destroy excess elements.
-  for (unsigned i = RHSSize; i != CurSize; ++i)
-Begin[i].~T();
-  
-  // Trim.
-  End = Begin + RHSSize;
-  return *this;
-}
-
-// If we have to grow to have enough elements, destroy the current 
elements.
-// This allows us to avoid copying them during the grow.
-if (Capacity-Begin < RHSSize) {
-  // Destroy current elements.
-  for (iterator I = Begin, E = End; I != E; ++I)
-I->~T();
-  End = Begin;
-  CurSize = 0;
-  grow(RHSSize);
-} else if (CurSize) {
-  // Otherwise, use assignment for the already-constructed elements.
-  std::copy(RHS.Begin, RHS.Begin+CurSize, Begin);
-}
-
-// Copy construct the new elements in place.
-std::uninitialized_copy(RHS.Begin+CurSize, RHS.End, Begin+CurSize);
-
-// Set end.
-End = Begin+RHSSize;
-  }
+  const SmallVectorImpl &operator=(const SmallVectorImpl &RHS);
   
 private:
   /// isSmall - Return true if this is a smallvector which has not had dynamic
@@ -182,31 +142,78 @@
 
   /// grow - double the size of the allocated memory, guaranteeing space for at
   /// least one more element or MinSize if specified.
-  void grow(unsigned MinSize = 0) {
-unsigned CurCapacity = Capacity-Begin;
-unsigned CurSize = size();
-unsigned NewCapacity = 2*CurCapacity;
-if (NewCapacity < MinSize)
-  NewCapacity = MinSize;
-T *NewElts = reinterpret_cast(new char[NewCapacity*sizeof(T)]);
+  void grow(unsigned MinSize = 0);
+};
 
-// Copy the elements over.
-std::uninitialized_copy(Begin, End, NewElts);
-
-// Destroy the original elements.
+// Define this out-of-line to dissuade the C++ compiler from inlining it.
+template 
+void SmallVectorImpl::grow(unsigned MinSize) {
+  unsigned CurCapacity = Capacity-Begin;
+  unsigned CurSize = size();
+  unsigned NewCapacity = 2*CurCapacity;
+  if (NewCapacity < MinSize)
+NewCapacity = MinSize;
+  T *NewElts = reinterpret_cast(new char[NewCapacity*sizeof(T)]);
+  
+  // Copy the elements over.
+  std::uninitialized_copy(Begin, End, NewElts);
+  
+  // Destroy the original elements.
+  for (iterator I = Begin, E = End; I != E; ++I)
+I->~T();
+  
+  // If this wasn't grown from the inline copy, deallocate the old space.
+  if (!isSmall())
+delete[] (char*)Begin;
+  
+  Begin = NewElts;
+  End = NewElts+CurSize;
+  Capacity = Begin+NewCapacity;
+}
+  
+template 
+const SmallVectorImpl &
+SmallVectorImpl::operator=(const SmallVectorImpl &RHS) {
+  // Avoid self-assignment.
+  if (this == &RHS) return *this;
+  
+  // If we already have sufficient space, assign the common elements, then
+  // destroy any excess.
+  unsigned RHSSize = RHS.size();
+  unsigned CurSize = size();
+  if (CurSize >= RHSSize) {
+// Assign common elements.
+std::copy(RHS.Begin, RHS.Begin+RHSSize, Begin);
+
+// Destroy excess elements.
+for (unsigned i = RHSSize; i != CurSize; ++i)
+  Begin[i].~T();
+
+// Trim.
+End = Begin + RHSSize;
+return *this;
+  }
+  
+  // If we have to grow to have enough elements, destroy the current elements.
+  // This allows us to avoid copying them during the grow.
+  if (Capacity-Begin < RHSSize) {
+// Destroy current elements.
 for (iterator I = Begin, E = End; I != E; ++I)
   I->~T();
-
-// If this wasn't grown from the inline copy, deallocate the old space.
-if (!isSmall())
-  delete[] (char*)Begin;
-
-Begin = NewElts;
-End = NewElts+CurSize;
-Capacity = Begin+NewCapacity;
+End = Begin;
+CurSize = 0;
+grow(RHSSize);
+  } else if (CurSize) {
+// Otherwise, use assignment for the already-constructed elements.
+std::copy(RHS.Begin, RHS.Begin+CurSize, Begin);
   }
-};
-
+  
+  // Copy construct the new elements in place.
+  std::uninitialized_copy(RHS.B

[llvm-commits] CVS: llvm/docs/TestingGuide.html

2006-08-11 Thread Patrick Jenkins


Changes in directory llvm/docs:

TestingGuide.html updated: 1.38 -> 1.39
---
Log message:

Added information for the new nightly tester.


---
Diffs of the changes:  (+36 -20)

 TestingGuide.html |   56 ++
 1 files changed, 36 insertions(+), 20 deletions(-)


Index: llvm/docs/TestingGuide.html
diff -u llvm/docs/TestingGuide.html:1.38 llvm/docs/TestingGuide.html:1.39
--- llvm/docs/TestingGuide.html:1.38Thu Jun  1 11:48:56 2006
+++ llvm/docs/TestingGuide.html Fri Aug 11 18:27:02 2006
@@ -557,21 +557,30 @@
 
 
 
-The http://llvm.org/testresults/";>LLVM Nightly Testers
+The http://llvm.org/nightlytest/";>LLVM Nightly Testers
 automatically check out an LLVM tree, build it, run the "nightly" 
-program test (described above), run  all of the feature and regression tests, 
-and then delete the checked out tree.  This tester is designed to ensure that 
-programs don't break as well as keep track of LLVM's progress over time.
-
-If you'd like to set up an instance of the nightly tester to run on your
-machine, take a look at the comments at the top of the
-utils/NightlyTest.pl file.  We usually run it from a crontab entry
-that looks like this:
+program test (described above), run all of the feature and regression tests, 
+delete the checked out tree, and then submit the results to 
+http://llvm.org/nightlytest/";>http://llvm.org/nightlytest/. 
+After test results are submitted to 
+http://llvm.org/nightlytest/";>http://llvm.org/nightlytest/,
+they are processed and displayed on the tests page. An email to 
+http://lists.cs.uiuc.edu/pipermail/llvm-testresults/";>
[EMAIL PROTECTED] summarizing the results is also generated. 
+This testing scheme is designed to ensure that programs don't break as well 
+as keep track of LLVM's progress over time.
+
+If you'd like to set up an instance of the nightly tester to run on your 
+machine, take a look at the comments at the top of the 
+utils/NewNightlyTest.pl file. If you decide to set up a nightly 
tester 
+please choose a unique nickname and invoke utils/NewNightlyTest.pl 
+with the "-nickname [yournickname]" command line option. We usually run it 
+from a crontab entry that looks like this:
 
 
 
-5 3 * * *  $HOME/llvm/utils/NightlyTest.pl -parallel $CVSROOT \
-   $HOME/buildtest $HOME/cvs/testresults
+5 3 * * *  $HOME/llvm/utils/NewNightlyTest.pl -parallel -nickname Nickname \
+   $CVSROOT $HOME/buildtest $HOME/cvs/testresults
 
 
 
@@ -589,17 +598,24 @@
 export PATH=/proj/install/bin:$LLVMGCCDIR/bin:$PATH
 export LD_LIBRARY_PATH=/proj/install/lib
 cd $BASE
-cp /proj/work/llvm/llvm/utils/NightlyTest.pl .
-nice ./NightlyTest.pl -nice -release -verbose -parallel -enable-linscan \
-   -noexternals 2>&1 > output.log
-mail -s 'X86 nightly tester results' http://mail.cs.uiuc.edu/mailman/\
-   listinfo/llvm-testresults">[EMAIL PROTECTED] < output.log
+cp /proj/work/llvm/llvm/utils/NewNightlyTest.pl .
+nice ./NewNightlyTest.pl -nice -release -verbose -parallel -enable-linscan \
+   -nickname NightlyTester -noexternals 2>&1 > output.log
 
 
 
-Take a look at the NightlyTest.pl file to see what all of the flags
-and strings do.  If you start running the nightly tests, please let us know and
-we'll link your page to the global tester page.  Thanks!
+It is also possible to specify the the location your nightly test results
+are submitted. You can do this by passing the command line option
+"-submit-server [server_address]" and "-submit-script [script_on_server]" to
+utils/NewNightlyTest.pl. For example, to submit to the llvm.org 
+nightly test results page, you would invoke the nightly test script with 
+"-submit-server llvm.org -submit-script /nightlytest/NightlyTestAccept.cgi". 
+If these options are not specified, the nightly test script sends the results 
+to the llvm.org nightly test results page.
+
+Take a look at the NewNightlyTest.pl file to see what all of the
+flags and strings do.  If you start running the nightly tests, please let us
+know. Thanks!
 
 
 
@@ -614,7 +630,7 @@
 
   John T. Criswell, Reid Spencer, and Tanya Lattner
   http://llvm.org";>The LLVM Compiler Infrastructure
-  Last modified: $Date: 2006/06/01 16:48:56 $
+  Last modified: $Date: 2006/08/11 23:27:02 $
 
 
 



___
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

2006-08-11 Thread Chris Lattner


Changes in directory llvm/include/llvm/ADT:

SmallVector.h updated: 1.9 -> 1.10
---
Log message:

Split SmallVector into SmallVector and SmallVectorImpl, which allows us to
eliminate code duplication due to the 'N' parameter.


---
Diffs of the changes:  (+45 -40)

 SmallVector.h |   85 ++
 1 files changed, 45 insertions(+), 40 deletions(-)


Index: llvm/include/llvm/ADT/SmallVector.h
diff -u llvm/include/llvm/ADT/SmallVector.h:1.9 
llvm/include/llvm/ADT/SmallVector.h:1.10
--- llvm/include/llvm/ADT/SmallVector.h:1.9 Mon Aug  7 20:54:17 2006
+++ llvm/include/llvm/ADT/SmallVector.h Fri Aug 11 18:19:51 2006
@@ -20,63 +20,39 @@
 
 namespace llvm {
 
-/// SmallVector - This is a 'vector' (really, a variable-sized array), 
optimized
-/// for the case when the array is small.  It contains some number of elements
-/// in-place, which allows it to avoid heap allocation when the actual number 
of
-/// elements is below that threshold.  This allows normal "small" cases to be
-/// fast without losing generality for large inputs.
-///
-/// Note that this does not attempt to be exception safe.
-///
-template 
-class SmallVector {
+/// SmallVectorImpl - This class consists of common code factored out of the
+/// SmallVector class to reduce code duplication based on the SmallVector 'N'
+/// template parameter.
+template 
+class SmallVectorImpl {
+  T *Begin, *End, *Capacity;
+  
   // Allocate raw space for N elements of type T.  If T has a ctor or dtor, we
   // don't want it to be automatically run, so we need to represent the space 
as
   // something else.  An array of char would work great, but might not be
   // aligned sufficiently.  Instead, we either use GCC extensions, or some
   // number of union instances for the space, which guarantee maximal 
alignment.
+protected:
   union U {
 double D;
 long double LD;
 long long L;
 void *P;
-  };
-  
-  /// InlineElts - These are the 'N' elements that are stored inline in the 
body
-  /// of the vector
-  U InlineElts[(sizeof(T)*N+sizeof(U)-1)/sizeof(U)];
-  T *Begin, *End, *Capacity;
+  } FirstEl;
+  // Space after 'FirstEl' is clobbered, do not add any instance vars after it.
 public:
   // Default ctor - Initialize to empty.
-  SmallVector() : Begin((T*)InlineElts), End(Begin), Capacity(Begin+N) {
-  }
-  
-  template
-  SmallVector(ItTy S, ItTy E)
-: Begin((T*)InlineElts), End(Begin), Capacity(Begin+N) {
-append(S, E);
+  SmallVectorImpl(unsigned N)
+: Begin((T*)&FirstEl), End((T*)&FirstEl), Capacity((T*)&FirstEl+N) {
   }
   
-  SmallVector(const SmallVector &RHS) {
-unsigned RHSSize = RHS.size();
-Begin = (T*)InlineElts;
-
-// Doesn't fit in the small case?  Allocate space.
-if (RHSSize > N) {
-  End = Capacity = Begin;
-  grow(RHSSize);
-}
-End = Begin+RHSSize;
-Capacity = Begin+N;
-std::uninitialized_copy(RHS.begin(), RHS.end(), Begin);
-  }
-  ~SmallVector() {
+  ~SmallVectorImpl() {
 // Destroy the constructed elements in the vector.
 for (iterator I = Begin, E = End; I != E; ++I)
   I->~T();
 
 // If this wasn't grown from the inline copy, deallocate the old space.
-if ((void*)Begin != (void*)InlineElts)
+if (!isSmall())
   delete[] (char*)Begin;
   }
   
@@ -155,7 +131,7 @@
   new (Begin+NumElts-1) T(Elt);
   }
   
-  const SmallVector &operator=(const SmallVector &RHS) {
+  const SmallVectorImpl &operator=(const SmallVectorImpl &RHS) {
 // Avoid self-assignment.
 if (this == &RHS) return *this;
 
@@ -201,7 +177,7 @@
   /// isSmall - Return true if this is a smallvector which has not had dynamic
   /// memory allocated for it.
   bool isSmall() const {
-return (void*)Begin == (void*)InlineElts;
+return (void*)Begin == (void*)&FirstEl;
   }
 
   /// grow - double the size of the allocated memory, guaranteeing space for at
@@ -231,6 +207,35 @@
   }
 };
 
+  
+/// SmallVector - This is a 'vector' (really, a variable-sized array), 
optimized
+/// for the case when the array is small.  It contains some number of elements
+/// in-place, which allows it to avoid heap allocation when the actual number 
of
+/// elements is below that threshold.  This allows normal "small" cases to be
+/// fast without losing generality for large inputs.
+///
+/// Note that this does not attempt to be exception safe.
+///
+template 
+class SmallVector : public SmallVectorImpl {
+  /// InlineElts - These are 'N-1' elements that are stored inline in the body
+  /// of the vector.  The extra '1' element is stored in SmallVectorImpl.
+  typedef typename SmallVectorImpl::U U;
+  U InlineElts[(sizeof(T)*N+sizeof(U)-1)/sizeof(U) - 1];
+public:  
+  SmallVector() : SmallVectorImpl(N) {
+  }
+  
+  template
+  SmallVector(ItTy S, ItTy E) : SmallVectorImpl(N) {
+append(S, E);
+  }
+  
+  SmallVector(const SmallVector &RHS) : SmallVectorImpl(N) {
+operator=(RHS);
+  }
+};
+
 } // End llvm namespace
 
 #endif

[llvm-commits] CVS: llvm/utils/NewNightlyTest.pl

2006-08-11 Thread Patrick Jenkins


Changes in directory llvm/utils:

NewNightlyTest.pl updated: 1.47 -> 1.48
---
Log message:

Added two flags (-submit-server and -submit-script) which allow the user to 
specify where the test results are submitted too. If these are not specified 
they default to the LLVM.org server.


---
Diffs of the changes:  (+18 -5)

 NewNightlyTest.pl |   23 ++-
 1 files changed, 18 insertions(+), 5 deletions(-)


Index: llvm/utils/NewNightlyTest.pl
diff -u llvm/utils/NewNightlyTest.pl:1.47 llvm/utils/NewNightlyTest.pl:1.48
--- llvm/utils/NewNightlyTest.pl:1.47   Wed Aug  9 00:45:12 2006
+++ llvm/utils/NewNightlyTest.plFri Aug 11 18:02:09 2006
@@ -52,7 +52,7 @@
 #   the default.
 #  -compileflagsNext argument specifies extra options passed to make when
 #   building LLVM.
-#  -use-gmake  Use gmake instead of the default make command 
to build
+#  -use-gmake   Use gmake instead of the default make command to build
 #   llvm and run tests.
 #
 #   Options to configure llvm-test 
@@ -61,6 +61,14 @@
 #  -noexternals Do not run the external tests (for cases where povray
 #   or SPEC are not installed)
 #  -with-externals  Specify a directory where the external tests are located.
+#  -submit-server   Specifies a server to submit the test results too. If this
+#   option is not specified it defaults to 
+#   llvm.org. This is basically just the address of the 
+#   webserver
+#  -submit-script   Specifies which script to call on the submit server. If
+#   this option is not specified it defaults to
+#   /nightlytest/NightlyTestAccept.cgi. This is basically 
+#   everything after the www.yourserver.org.
 #
 # CVSROOT is the CVS repository from which the tree will be checked out,
 #  specified either in the full :method:[EMAIL PROTECTED]:/dir syntax, or
@@ -111,6 +119,8 @@
 $NOTEST=0;
 $NORUNNINGTESTS=0;
 $MAKECMD="make";
+$SUBMITSERVER = "llvm.org";
+$SUBMITSCRIPT = "/nightlytest/NightlyTestAccept.cgi";
 
 while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) {
 shift;
@@ -142,6 +152,12 @@
 if (/^-with-externals$/)  {
$CONFIGUREARGS .= " --with-externals=$ARGV[0]"; shift; next;
 }
+if (/^-submit-server/)  {
+   $SUBMITSERVER = "$ARGV[0]"; shift; next;
+}
+if (/^-submit-script/)  {
+   $SUBMITSCRIPT = "$ARGV[0]"; shift; next;
+}
 if (/^-nickname$/) { $nickname = "$ARGV[0]"; shift; next; }
 if (/^-gccpath/) { $CONFIGUREARGS .= 

   " CC=$ARGV[0]/gcc CXX=$ARGV[0]/g++"; 
@@ -996,9 +1012,6 @@
 
 if ( $VERBOSE ) { print "SEND THE DATA VIA THE POST REQUEST\n"; }
 
-
-my $host = "llvm.org";
-my $file = "/nightlytest/NightlyTestAccept.cgi";
 my %hash_of_data = ('machine_data' => $machine_data,
'build_data' => $build_data,
'gcc_version' => $gcc_version,
@@ -1049,7 +1062,7 @@
 }
 }
 else{
-my $response = SendData $host,$file,\%hash_of_data;
+my $response = SendData $SUBMITSERVER,$SUBMITSCRIPT,\%hash_of_data;
 if( $VERBOSE) { print "\n$response"; }
 }
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/utils/countloc.sh

2006-08-11 Thread Reid Spencer


Changes in directory llvm/utils:

countloc.sh updated: 1.4 -> 1.5
---
Log message:

Make this script not care where it is run from by getting the llvm src
root from the llvm-config script.


---
Diffs of the changes:  (+1 -1)

 countloc.sh |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/utils/countloc.sh
diff -u llvm/utils/countloc.sh:1.4 llvm/utils/countloc.sh:1.5
--- llvm/utils/countloc.sh:1.4  Mon Sep 20 03:09:36 2004
+++ llvm/utils/countloc.sh  Fri Aug 11 16:55:31 2006
@@ -19,7 +19,7 @@
 # details.
 
##===--===##
 
-TOPDIR=`pwd | sed -e 's#\(.*/llvm\).*#\1#'`
+TOPDIR=`llvm-config --src-root`
 if test -d "$TOPDIR" ; then
   cd $TOPDIR
   ./utils/llvmdo -dirs "include lib tools test utils examples" wc -l | awk '\



___
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

2006-08-11 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAG.h updated: 1.116 -> 1.117
---
Log message:

Remove 8 more std::map's.



---
Diffs of the changes:  (+16 -16)

 SelectionDAG.h |   32 
 1 files changed, 16 insertions(+), 16 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAG.h
diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.116 
llvm/include/llvm/CodeGen/SelectionDAG.h:1.117
--- llvm/include/llvm/CodeGen/SelectionDAG.h:1.116  Fri Aug 11 16:00:46 2006
+++ llvm/include/llvm/CodeGen/SelectionDAG.hFri Aug 11 16:55:30 2006
@@ -111,22 +111,30 @@
   SDOperand getTargetConstant(uint64_t Val, MVT::ValueType VT) {
 return getConstant(Val, VT, true);
   }
-  SDOperand getConstantFP(double Val, MVT::ValueType VT);
-  SDOperand getTargetConstantFP(double Val, MVT::ValueType VT);
+  SDOperand getConstantFP(double Val, MVT::ValueType VT, bool isTarget = 
false);
+  SDOperand getTargetConstantFP(double Val, MVT::ValueType VT) {
+return getConstantFP(Val, VT, true);
+  }
   SDOperand getGlobalAddress(const GlobalValue *GV, MVT::ValueType VT,
  int offset = 0, bool isTargetGA = false);
   SDOperand getTargetGlobalAddress(const GlobalValue *GV, MVT::ValueType VT,
int offset = 0) {
 return getGlobalAddress(GV, VT, offset, true);
   }
-  SDOperand getFrameIndex(int FI, MVT::ValueType VT);
-  SDOperand getTargetFrameIndex(int FI, MVT::ValueType VT);
-  SDOperand getJumpTable(int JTI, MVT::ValueType VT);
-  SDOperand getTargetJumpTable(int JTI, MVT::ValueType VT);
+  SDOperand getFrameIndex(int FI, MVT::ValueType VT, bool isTarget = false);
+  SDOperand getTargetFrameIndex(int FI, MVT::ValueType VT) {
+return getFrameIndex(FI, VT, true);
+  }
+  SDOperand getJumpTable(int JTI, MVT::ValueType VT, bool isTarget = false);
+  SDOperand getTargetJumpTable(int JTI, MVT::ValueType VT) {
+return getJumpTable(JTI, VT, true);
+  }
   SDOperand getConstantPool(Constant *C, MVT::ValueType VT,
-   unsigned Alignment=0,  int offset = 0);
+unsigned Align = 0, int Offs = 0, bool isT=false);
   SDOperand getTargetConstantPool(Constant *C, MVT::ValueType VT,
-  unsigned Alignment=0, int offset = 0);
+  unsigned Align = 0, int Offset = 0) {
+return getConstantPool(C, VT, Align, Offset, true);
+  }
   SDOperand getBasicBlock(MachineBasicBlock *MBB);
   SDOperand getExternalSymbol(const char *Sym, MVT::ValueType VT);
   SDOperand getTargetExternalSymbol(const char *Sym, MVT::ValueType VT);
@@ -452,14 +460,6 @@
   // Maps to auto-CSE operations.
   std::vector CondCodeNodes;
 
-  std::map, SDNode*> ConstantFPs;
-  std::map, SDNode*> TargetConstantFPs;
-  std::map FrameIndices, TargetFrameIndices, JumpTableIndices,
-TargetJumpTableIndices;
-  std::map >, SDNode*> ConstantPoolIndices;
-  std::map >, SDNode*> 
TargetConstantPoolIndices;
   std::vector ValueTypeNodes;
   std::map ExternalSymbols;
   std::map TargetExternalSymbols;



___
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 SelectionDAGCSEMap.cpp

2006-08-11 Thread Chris Lattner


Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAG.cpp updated: 1.324 -> 1.325
SelectionDAGCSEMap.cpp updated: 1.2 -> 1.3
---
Log message:

Remove 8 more std::map's.



---
Diffs of the changes:  (+58 -92)

 SelectionDAG.cpp   |  132 ++---
 SelectionDAGCSEMap.cpp |   18 ++
 2 files changed, 58 insertions(+), 92 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.324 
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.325
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.324Fri Aug 11 
16:01:22 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp  Fri Aug 11 16:55:30 2006
@@ -341,16 +341,6 @@
   bool Erased = false;
   switch (N->getOpcode()) {
   case ISD::HANDLENODE: return;  // noop.
-  case ISD::ConstantFP: {
-uint64_t V = DoubleToBits(cast(N)->getValue());
-Erased = ConstantFPs.erase(std::make_pair(V, N->getValueType(0)));
-break;
-  }
-  case ISD::TargetConstantFP: {
-uint64_t V = DoubleToBits(cast(N)->getValue());
-Erased = TargetConstantFPs.erase(std::make_pair(V, N->getValueType(0)));
-break;
-  }
   case ISD::STRING:
 Erased = StringNodes.erase(cast(N)->getValue());
 break;
@@ -360,31 +350,6 @@
 Erased = CondCodeNodes[cast(N)->get()] != 0;
 CondCodeNodes[cast(N)->get()] = 0;
 break;
-  case ISD::FrameIndex:
-Erased = FrameIndices.erase(cast(N)->getIndex());
-break;
-  case ISD::TargetFrameIndex:
-Erased = TargetFrameIndices.erase(cast(N)->getIndex());
-break;
-  case ISD::JumpTable:
-Erased = JumpTableIndices.erase(cast(N)->getIndex());
-break;
-  case ISD::TargetJumpTable:
-Erased = 
-  TargetJumpTableIndices.erase(cast(N)->getIndex());
-break;
-  case ISD::ConstantPool:
-Erased = ConstantPoolIndices.
-  erase(std::make_pair(cast(N)->get(),
-
std::make_pair(cast(N)->getOffset(),
- 
cast(N)->getAlignment(;
-break;
-  case ISD::TargetConstantPool:
-Erased = TargetConstantPoolIndices.
-  erase(std::make_pair(cast(N)->get(),
-
std::make_pair(cast(N)->getOffset(),
- 
cast(N)->getAlignment(;
-break;
   case ISD::ExternalSymbol:
 Erased = ExternalSymbols.erase(cast(N)->getSymbol());
 break;
@@ -547,7 +512,8 @@
 }
 
 
-SDOperand SelectionDAG::getConstantFP(double Val, MVT::ValueType VT) {
+SDOperand SelectionDAG::getConstantFP(double Val, MVT::ValueType VT,
+  bool isTarget) {
   assert(MVT::isFloatingPoint(VT) && "Cannot create integer FP constant!");
   if (VT == MVT::f32)
 Val = (float)Val;  // Mask out extra precision.
@@ -555,24 +521,14 @@
   // Do the map lookup using the actual bit pattern for the floating point
   // value, so that we don't have problems with 0.0 comparing equal to -0.0, 
and
   // we don't have issues with SNANs.
-  SDNode *&N = ConstantFPs[std::make_pair(DoubleToBits(Val), VT)];
-  if (N) return SDOperand(N, 0);
-  N = new ConstantFPSDNode(false, Val, VT);
-  AllNodes.push_back(N);
-  return SDOperand(N, 0);
-}
-
-SDOperand SelectionDAG::getTargetConstantFP(double Val, MVT::ValueType VT) {
-  assert(MVT::isFloatingPoint(VT) && "Cannot create integer FP constant!");
-  if (VT == MVT::f32)
-Val = (float)Val;  // Mask out extra precision.
-  
-  // Do the map lookup using the actual bit pattern for the floating point
-  // value, so that we don't have problems with 0.0 comparing equal to -0.0, 
and
-  // we don't have issues with SNANs.
-  SDNode *&N = TargetConstantFPs[std::make_pair(DoubleToBits(Val), VT)];
-  if (N) return SDOperand(N, 0);
-  N = new ConstantFPSDNode(true, Val, VT);
+  unsigned Opc = isTarget ? ISD::TargetConstantFP : ISD::ConstantFP;
+  SelectionDAGCSEMap::NodeID ID(Opc, getNodeValueTypes(VT));
+  ID.AddInteger(DoubleToBits(Val));
+  void *IP = 0;
+  if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP))
+return SDOperand(E, 0);
+  SDNode *N = new ConstantFPSDNode(isTarget, Val, VT);
+  CSEMap.InsertNode(N, IP);
   AllNodes.push_back(N);
   return SDOperand(N, 0);
 }
@@ -593,57 +549,49 @@
   return SDOperand(N, 0);
 }
 
-SDOperand SelectionDAG::getFrameIndex(int FI, MVT::ValueType VT) {
-  SDNode *&N = FrameIndices[FI];
-  if (N) return SDOperand(N, 0);
-  N = new FrameIndexSDNode(FI, VT, false);
-  AllNodes.push_back(N);
-  return SDOperand(N, 0);
-}
-
-SDOperand SelectionDAG::getTargetFrameIndex(int FI, MVT::ValueType VT) {
-  SDNode *&N = TargetFrameIndices[FI];
-  if (N) return SDOperand(N, 0);
-  N = new FrameIndexSDNode(FI, VT, true);
-  AllNodes.push_back(N);
-  return SDOperand(N, 0);
-}
-
-SDOperand SelectionDAG::getJumpTable(int JTI, MVT::ValueType VT) {
-  SDNode *&N = JumpTableIndices[JTI];
-  if (N) return SDOperand(N, 0);
-  N = new JumpTableSDNode(JTI, VT, false);
+SDOperand SelectionDAG::getFrameIndex(int FI, MVT::Va

[llvm-commits] CVS: llvm/utils/llvmdo llvmgrep

2006-08-11 Thread Reid Spencer


Changes in directory llvm/utils:

llvmdo updated: 1.13 -> 1.14
llvmgrep updated: 1.9 -> 1.10
---
Log message:

Make llvmdo and llvmgrep invulnerable to where they are run from by getting
the llvm source root from the llvm-config command. The dependency now is 
that the correct llvm-config command is in the path. For most developers
this is the case.


---
Diffs of the changes:  (+11 -5)

 llvmdo   |   13 ++---
 llvmgrep |3 +--
 2 files changed, 11 insertions(+), 5 deletions(-)


Index: llvm/utils/llvmdo
diff -u llvm/utils/llvmdo:1.13 llvm/utils/llvmdo:1.14
--- llvm/utils/llvmdo:1.13  Thu Apr 20 13:43:59 2006
+++ llvm/utils/llvmdo   Fri Aug 11 16:53:27 2006
@@ -27,8 +27,8 @@
 
##===--===##
 
 if test $# -lt 1 ; then
-  echo "Usage: llvmdo [-dirs "DIRNAMES..."] PROGRAM ARGS...";
-  exit 1;
+  echo "Usage: llvmdo [-dirs "DIRNAMES..."] PROGRAM ARGS..."
+  exit 1
 fi
 
 if test "$1" = "-dirs" ; then
@@ -37,13 +37,20 @@
 elif test -z "$LLVMDO_DIRS" ; then
   LLVMDO_DIRS="include lib tools utils runtime autoconf docs test examples 
projects"
 fi
+if test "$1" = "" ; then
+  echo "Missing program name to run"
+  exit 1
+fi
+
 PROGRAM=`which $1`
 if test ! -x "$PROGRAM" ; then
   echo "Can't execute $1"
   exit 1
 fi
 shift;
-TOPDIR=`pwd | sed -e 's#\(.*/llvm[0-9]*\).*#\1#'`
+
+TOPDIR=`llvm-config --src-root`
+
 if test -d "$TOPDIR" ; then
   cd $TOPDIR
   case `uname -s` in


Index: llvm/utils/llvmgrep
diff -u llvm/utils/llvmgrep:1.9 llvm/utils/llvmgrep:1.10
--- llvm/utils/llvmgrep:1.9 Tue Mar 14 00:08:05 2006
+++ llvm/utils/llvmgrep Fri Aug 11 16:53:27 2006
@@ -18,8 +18,7 @@
 # details.
 
##===--===##
 
-TOPDIR=`pwd | sed -e 's#\(.*/llvm[0-9]*\).*#\1#'`
-echo $TOPDIR
+TOPDIR=`llvm-config --src-root`
 if test -d "$TOPDIR" ; then
   cd $TOPDIR
   case `uname -s` in



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/tools/llvm-config/llvm-config.in.in

2006-08-11 Thread Reid Spencer


Changes in directory llvm/tools/llvm-config:

llvm-config.in.in updated: 1.21 -> 1.22
---
Log message:

Don't print double newline for --src-root and --obj-root as it tends to
confuse shells that might use this output.


---
Diffs of the changes:  (+2 -2)

 llvm-config.in.in |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/tools/llvm-config/llvm-config.in.in
diff -u llvm/tools/llvm-config/llvm-config.in.in:1.21 
llvm/tools/llvm-config/llvm-config.in.in:1.22
--- llvm/tools/llvm-config/llvm-config.in.in:1.21   Fri Aug  4 16:52:23 2006
+++ llvm/tools/llvm-config/llvm-config.in.inFri Aug 11 16:50:24 2006
@@ -124,9 +124,9 @@
 } elsif ($arg eq "--build-mode") {
 $has_opt = 1; print "$LLVM_BUILDMODE\n";
 } elsif ($arg eq "--obj-root") {
-$has_opt = 1; print `cd $LLVM_OBJ_ROOT/; pwd` . "\n";
+$has_opt = 1; print `cd $LLVM_OBJ_ROOT/; pwd`;
 } elsif ($arg eq "--src-root") {
-$has_opt = 1; print `cd $LLVM_SRC_ROOT/; pwd` . "\n";
+$has_opt = 1; print `cd $LLVM_SRC_ROOT/; pwd`;
 } else {
 usage();
 }



___
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/ValueSet.h

2006-08-11 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

ValueSet.h (r1.15) removed
---
Log message:

remove old piece of the V9 backend.


---
Diffs of the changes:  (+0 -0)

 0 files changed



___
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/Makefile

2006-08-11 Thread Chris Lattner


Changes in directory llvm/lib/Target/X86:

Makefile updated: 1.26 -> 1.27
---
Log message:

eliminate extraneous blank line


---
Diffs of the changes:  (+0 -1)

 Makefile |1 -
 1 files changed, 1 deletion(-)


Index: llvm/lib/Target/X86/Makefile
diff -u llvm/lib/Target/X86/Makefile:1.26 llvm/lib/Target/X86/Makefile:1.27
--- llvm/lib/Target/X86/Makefile:1.26   Thu Apr 13 01:39:24 2006
+++ llvm/lib/Target/X86/MakefileFri Aug 11 16:08:16 2006
@@ -18,4 +18,3 @@
 X86GenSubtarget.inc
 
 include $(LEVEL)/Makefile.common
-



___
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 SelectionDAGCSEMap.cpp

2006-08-11 Thread Chris Lattner


Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAG.cpp updated: 1.323 -> 1.324
SelectionDAGCSEMap.cpp updated: 1.1 -> 1.2
---
Log message:

Move the BBNodes, GlobalValues, TargetGlobalValues, Constants, TargetConstants,
RegNodes, and ValueNodes maps into the CSEMap.


---
Diffs of the changes:  (+83 -88)

 SelectionDAG.cpp   |  145 +++--
 SelectionDAGCSEMap.cpp |   26 
 2 files changed, 83 insertions(+), 88 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.323 
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.324
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.323Fri Aug 11 
13:38:11 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp  Fri Aug 11 16:01:22 2006
@@ -341,15 +341,6 @@
   bool Erased = false;
   switch (N->getOpcode()) {
   case ISD::HANDLENODE: return;  // noop.
-  case ISD::Constant:
-Erased = 
Constants.erase(std::make_pair(cast(N)->getValue(),
-N->getValueType(0)));
-break;
-  case ISD::TargetConstant:
-Erased = TargetConstants.erase(std::make_pair(
-cast(N)->getValue(),
-  N->getValueType(0)));
-break;
   case ISD::ConstantFP: {
 uint64_t V = DoubleToBits(cast(N)->getValue());
 Erased = ConstantFPs.erase(std::make_pair(V, N->getValueType(0)));
@@ -369,18 +360,6 @@
 Erased = CondCodeNodes[cast(N)->get()] != 0;
 CondCodeNodes[cast(N)->get()] = 0;
 break;
-  case ISD::GlobalAddress: {
-GlobalAddressSDNode *GN = cast(N);
-Erased = GlobalValues.erase(std::make_pair(GN->getGlobal(),
-   GN->getOffset()));
-break;
-  }
-  case ISD::TargetGlobalAddress: {
-GlobalAddressSDNode *GN = cast(N);
-Erased =TargetGlobalValues.erase(std::make_pair(GN->getGlobal(),
-GN->getOffset()));
-break;
-  }
   case ISD::FrameIndex:
 Erased = FrameIndices.erase(cast(N)->getIndex());
 break;
@@ -406,9 +385,6 @@
 
std::make_pair(cast(N)->getOffset(),
  
cast(N)->getAlignment(;
 break;
-  case ISD::BasicBlock:
-Erased = BBNodes.erase(cast(N)->getBasicBlock());
-break;
   case ISD::ExternalSymbol:
 Erased = ExternalSymbols.erase(cast(N)->getSymbol());
 break;
@@ -420,15 +396,6 @@
 Erased = ValueTypeNodes[cast(N)->getVT()] != 0;
 ValueTypeNodes[cast(N)->getVT()] = 0;
 break;
-  case ISD::Register:
-Erased = RegNodes.erase(std::make_pair(cast(N)->getReg(),
-   N->getValueType(0)));
-break;
-  case ISD::SRCVALUE: {
-SrcValueSDNode *SVN = cast(N);
-Erased =ValueNodes.erase(std::make_pair(SVN->getValue(), 
SVN->getOffset()));
-break;
-  }
   default:
 // Remove it from the CSE Map.
 Erased = CSEMap.RemoveNode(N);
@@ -551,21 +518,6 @@
  getConstant(Imm, Op.getValueType()));
 }
 
-SDOperand SelectionDAG::getConstant(uint64_t Val, MVT::ValueType VT) {
-  assert(MVT::isInteger(VT) && "Cannot create FP integer constant!");
-  assert(!MVT::isVector(VT) && "Cannot create Vector ConstantSDNodes!");
-  
-  // Mask out any bits that are not valid for this constant.
-  if (VT != MVT::i64)
-Val &= ((uint64_t)1 << MVT::getSizeInBits(VT)) - 1;
-
-  SDNode *&N = Constants[std::make_pair(Val, VT)];
-  if (N) return SDOperand(N, 0);
-  N = new ConstantSDNode(false, Val, VT);
-  AllNodes.push_back(N);
-  return SDOperand(N, 0);
-}
-
 SDOperand SelectionDAG::getString(const std::string &Val) {
   StringSDNode *&N = StringNodes[Val];
   if (!N) {
@@ -575,19 +527,26 @@
   return SDOperand(N, 0);
 }
 
-SDOperand SelectionDAG::getTargetConstant(uint64_t Val, MVT::ValueType VT) {
+SDOperand SelectionDAG::getConstant(uint64_t Val, MVT::ValueType VT, bool isT) 
{
   assert(MVT::isInteger(VT) && "Cannot create FP integer constant!");
-  // Mask out any bits that are not valid for this constant.
-  if (VT != MVT::i64)
-Val &= ((uint64_t)1 << MVT::getSizeInBits(VT)) - 1;
+  assert(!MVT::isVector(VT) && "Cannot create Vector ConstantSDNodes!");
   
-  SDNode *&N = TargetConstants[std::make_pair(Val, VT)];
-  if (N) return SDOperand(N, 0);
-  N = new ConstantSDNode(true, Val, VT);
+  // Mask out any bits that are not valid for this constant.
+  Val &= MVT::getIntVTBitMask(VT);
+
+  unsigned Opc = isT ? ISD::TargetConstant : ISD::Constant;
+  SelectionDAGCSEMap::NodeID ID(Opc, getNodeValueTypes(VT));
+  ID.AddInteger(Val);
+  void *IP = 0;
+  if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP))
+return SDOperand(E, 0);
+  SDNode *N = new ConstantSDNode(isT, Val, VT);
+  CSEMap.InsertNode(N, IP);
   AllNodes.push_back(N);
   return SDOperand(N, 0);
 }
 
+
 SDOperand SelectionDAG::getConstantFP(double Val, MVT::ValueTyp

[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAG.h SelectionDAGCSEMap.h

2006-08-11 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAG.h updated: 1.115 -> 1.116
SelectionDAGCSEMap.h updated: 1.2 -> 1.3
---
Log message:

Start moving leaf nodes over to the CSEMap.


---
Diffs of the changes:  (+20 -14)

 SelectionDAG.h   |   21 -
 SelectionDAGCSEMap.h |   13 -
 2 files changed, 20 insertions(+), 14 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAG.h
diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.115 
llvm/include/llvm/CodeGen/SelectionDAG.h:1.116
--- llvm/include/llvm/CodeGen/SelectionDAG.h:1.115  Fri Aug 11 13:37:42 2006
+++ llvm/include/llvm/CodeGen/SelectionDAG.hFri Aug 11 16:00:46 2006
@@ -52,9 +52,6 @@
   // AllNodes - A linked list of nodes in the current DAG.
   ilist AllNodes;
 
-  // ValueNodes - track SrcValue nodes
-  std::map, SDNode*> ValueNodes;
-
 public:
   SelectionDAG(TargetLowering &tli, MachineFunction &mf, MachineDebugInfo *di)
   : TLI(tli), MF(mf), DI(di) {
@@ -110,14 +107,18 @@
   void RemoveDeadNodes();
 
   SDOperand getString(const std::string &Val);
-  SDOperand getConstant(uint64_t Val, MVT::ValueType VT);
-  SDOperand getTargetConstant(uint64_t Val, MVT::ValueType VT);
+  SDOperand getConstant(uint64_t Val, MVT::ValueType VT, bool isTarget = 
false);
+  SDOperand getTargetConstant(uint64_t Val, MVT::ValueType VT) {
+return getConstant(Val, VT, true);
+  }
   SDOperand getConstantFP(double Val, MVT::ValueType VT);
   SDOperand getTargetConstantFP(double Val, MVT::ValueType VT);
   SDOperand getGlobalAddress(const GlobalValue *GV, MVT::ValueType VT,
- int offset = 0);
+ int offset = 0, bool isTargetGA = false);
   SDOperand getTargetGlobalAddress(const GlobalValue *GV, MVT::ValueType VT,
-   int offset = 0);
+   int offset = 0) {
+return getGlobalAddress(GV, VT, offset, true);
+  }
   SDOperand getFrameIndex(int FI, MVT::ValueType VT);
   SDOperand getTargetFrameIndex(int FI, MVT::ValueType VT);
   SDOperand getJumpTable(int JTI, MVT::ValueType VT);
@@ -449,13 +450,8 @@
   std::list > VTList;
   
   // Maps to auto-CSE operations.
-  std::map, RegisterSDNode*> RegNodes;
   std::vector CondCodeNodes;
 
-  std::map, SDNode*> GlobalValues;
-  std::map, SDNode*> TargetGlobalValues;
-  std::map, SDNode*> Constants;
-  std::map, SDNode*> TargetConstants;
   std::map, SDNode*> ConstantFPs;
   std::map, SDNode*> TargetConstantFPs;
   std::map FrameIndices, TargetFrameIndices, JumpTableIndices,
@@ -464,7 +460,6 @@
  std::pair >, SDNode*> ConstantPoolIndices;
   std::map >, SDNode*> 
TargetConstantPoolIndices;
-  std::map BBNodes;
   std::vector ValueTypeNodes;
   std::map ExternalSymbols;
   std::map TargetExternalSymbols;


Index: llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h:1.2 
llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h:1.3
--- llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h:1.2  Fri Aug 11 13:53:44 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h  Fri Aug 11 16:00:46 2006
@@ -98,12 +98,23 @@
   void SetOperands(const SDOperand *Ops, unsigned NumOps);
   void AddOperand(SDOperand Op);
   void AddPointer(const void *Ptr);
-  void AddInteger(int I) {
+  void AddInteger(signed I) {
 Bits.push_back((I >>  0) & 0xFF);
 Bits.push_back((I >>  8) & 0xFF);
 Bits.push_back((I >> 16) & 0xFF);
 Bits.push_back((I >> 24) & 0xFF);
   }
+  void AddInteger(unsigned I) {
+AddInteger((signed)I);
+  }
+  void AddInteger(uint64_t I) {
+union {
+  uint64_t x;
+  unsigned char A[8];
+};
+x = I;
+Bits.append(A, A+8);
+  }
   
   unsigned ComputeHash() const;
   



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/utils/userloc.pl

2006-08-11 Thread Reid Spencer


Changes in directory llvm/utils:

userloc.pl updated: 1.5 -> 1.6
---
Log message:

Clean up the HTML output. Add a -filedetails option to report the number of
lines contributed by each user to each file.


---
Diffs of the changes:  (+61 -50)

 userloc.pl |  111 +
 1 files changed, 61 insertions(+), 50 deletions(-)


Index: llvm/utils/userloc.pl
diff -u llvm/utils/userloc.pl:1.5 llvm/utils/userloc.pl:1.6
--- llvm/utils/userloc.pl:1.5   Fri Aug 11 13:36:55 2006
+++ llvm/utils/userloc.pl   Fri Aug 11 15:44:17 2006
@@ -16,6 +16,8 @@
 #   specified directory is examined
 #   -tag=tag
 #   Use "tag" to select the revision (as per cvs -r option)
+#   -filedetails
+#   Report details about lines of code in each file for each user
 #   -html
 #   Generate HTML output instead of text output
 
@@ -26,6 +28,7 @@
 my $recurse = 0;
 my $html = 0;
 my $debug = 0;
+my $filedetails = "";
 while ( substr($ARGV[0],0,1) eq '-' )
 {
   if ($ARGV[0] eq "-recurse") {
@@ -33,6 +36,8 @@
   } elsif ($ARGV[0] =~ /-tag=.*/) {
 $tag = $ARGV[0];
 $tag =~ s#-tag=(.*)#$1#;
+  } elsif ($ARGV[0] =~ /-filedetails/) {
+$filedetails = 1;
   } elsif ($ARGV[0] eq "-html") {
 $html = 1;
   } elsif ($ARGV[0] eq "-debug") {
@@ -47,7 +52,7 @@
   if ($#ARGV < 0);
 
 my %Stats;
-my %StatsDetails;
+my %FileStats;
 
 sub ValidateFile
 {
@@ -96,19 +101,26 @@
   my $Dir = $_[0];
   my $files = GetCVSFiles($Dir);
 
-  open (DATA,"$annotate $files 2>/dev/null |")
+  open (DATA,"$annotate $files 2>&1 |")
 || die "Can't read cvs annotation data";
 
+  my $curfile = "";
   while ( defined($line = ) )
   {
-if ($line =~ /^[0-9.]*[ \t]*\([^)]*\):/)
-{
-  chomp($line);
-  $line =~ s#^[0-9.]*[ \t]*\(([a-zA-Z0-9_.-]*) [^)]*\):.*#$1#;
-  $Stats{$line}++;
+chomp($line);
+if ($line =~ '^Annotations for.*') {
+  $curfile = $line;
+  $curfile =~ s#^Annotations for ([[:print:]]*)#$1#;
+} elsif ($line =~ /^[0-9.]*[ \t]*\([^)]*\):/) {
+  $uname = $line;
+  $uname =~ s#^[0-9.]*[ \t]*\(([a-zA-Z0-9_.-]*) [^)]*\):.*#$1#;
+  $Stats{$uname}++;
+  if ($filedetails) {
+$FileStats{$uname} = {} unless exists $FileStats{$uname};
+${$FileStats{$uname}}{$curfile}++;
+  }
 }
   }
-
   close DATA;
 }
 
@@ -135,56 +147,61 @@
   return 1;
 }
 
-my $RowCount = 0;
 sub printStats
 {
   my $dir = $_[0];
   my $hash = $_[1];
-  my $user;
+  my $usr;
   my $total = 0;
 
-  if ($RowCount % 10 == 0)
-  {
-if ($html) {
-  print " Directory\n";
-  foreach $user (sort keys %Stats)
-  {
-print "",$user,"\n";
-  }
-  print "\n";
-}
-  }
-
-  $RowCount++;
+  foreach $usr (keys %Stats) { $total += $Stats{$usr}; }
 
-  if ($html)
-{ print "",$dir,""; }
-  else
-{ print $dir,"\n"; }
-
-  foreach $user (keys %{$hash}) { $total += $hash->{$user}; }
+  if ($html) { 
+print "";
+print " LOC\n";
+print " \%LOC\n";
+print " User\n";
+print "\n";
+  }
 
-  foreach $user ( sort keys %Stats )
+  foreach $usr ( sort keys %Stats )
   {
-my $v = $hash->{$user};
+my $v = $Stats{$usr};
 if (defined($v))
 {
-  if ($html)
-  {
-printf "%d(%2.1f%%)", $v,
-  (100.0/$total)*$v;
-  }
-  else
-  {
-printf "%8d (%4.1f%%): %s\n", $v, (100.0/$total)*$v, $user;
+  if ($html) {
+printf "%d(%4.1f%%)%s", $v, (100.0/$total)*$v,$usr;
+  } else {
+printf "%8d  (%4.1f%%)  %s\n", $v, (100.0/$total)*$v, $usr;
   }
 }
-elsif ($html)
-{
-  print "- ";
+  }
+  print "\n" if ($html);
+
+  if ($filedetails) {
+foreach $user (sort keys %FileStats) {
+  my $total = 0;
+  foreach $file (sort keys %{$FileStats{$user}}) { 
+$total += ${$FileStats{$user}}{$file}
+  }
+  if ($html) {
+print "$user\n";
+  } else {
+print $user,":\n";
+  }
+  foreach $file (sort keys %{$FileStats{$user}}) {
+my $v = ${$FileStats{$user}}{$file};
+if ($html) { 
+  printf "  %d %4.1f%%%s",$v, (100.0/$total)*$v,$file;
+} else {
+  printf "%8d  (%4.1f%%)  %s\n", $v, (100.0/$total)*$v, $file;
+}
+  }
+  if ($html) { print "\n"; }
 }
   }
-  print "\n" if ($html);
 }
 
 my @ALLDIRS = @ARGV;
@@ -223,16 +240,10 @@
   }
 }
 
-if ($html)
-{
-  print "\n";
-}
-
-printStats("Total",\%Stats);
+printStats;
 
 if ($html) 
 {
-  print "";
   if (scalar @ignored_dirs > 0) {
 print "The following directories were skipped:\n";
 print "\n";



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/utils/vim/README

2006-08-11 Thread Reid Spencer


Changes in directory llvm/utils/vim:

README updated: 1.5 -> 1.6
---
Log message:

Remove blank line at end of file, removing test user "foo" from CVS history.


---
Diffs of the changes:  (+0 -1)

 README |1 -
 1 files changed, 1 deletion(-)


Index: llvm/utils/vim/README
diff -u llvm/utils/vim/README:1.5 llvm/utils/vim/README:1.6
--- llvm/utils/vim/README:1.5   Wed Dec  8 23:46:48 2004
+++ llvm/utils/vim/README   Fri Aug 11 14:42:11 2006
@@ -41,4 +41,3 @@
   augroup filetype
 au! BufRead,BufNewFile *Makefile* set filetype=make
   augroup END
-



___
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/SelectionDAGCSEMap.h

2006-08-11 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGCSEMap.h updated: 1.1 -> 1.2
---
Log message:

new method for adding ints


---
Diffs of the changes:  (+6 -0)

 SelectionDAGCSEMap.h |6 ++
 1 files changed, 6 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h:1.1 
llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h:1.2
--- llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h:1.1  Mon Aug  7 18:31:24 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h  Fri Aug 11 13:53:44 2006
@@ -98,6 +98,12 @@
   void SetOperands(const SDOperand *Ops, unsigned NumOps);
   void AddOperand(SDOperand Op);
   void AddPointer(const void *Ptr);
+  void AddInteger(int I) {
+Bits.push_back((I >>  0) & 0xFF);
+Bits.push_back((I >>  8) & 0xFF);
+Bits.push_back((I >> 16) & 0xFF);
+Bits.push_back((I >> 24) & 0xFF);
+  }
   
   unsigned ComputeHash() const;
   



___
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

2006-08-11 Thread Chris Lattner


Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAG.cpp updated: 1.322 -> 1.323
---
Log message:

eliminate the NullaryOps map, use CSEMap instead.


---
Diffs of the changes:  (+18 -22)

 SelectionDAG.cpp |   40 ++--
 1 files changed, 18 insertions(+), 22 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.322 
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.323
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.322Fri Aug 11 
12:46:28 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp  Fri Aug 11 13:38:11 2006
@@ -430,18 +430,8 @@
 break;
   }
   default:
-if (N->getNumValues() == 1) {
-  if (N->getNumOperands() == 0) {
-Erased = NullaryOps.erase(std::make_pair(N->getOpcode(),
- N->getValueType(0)));
-  } else { 
-// Remove it from the CSE Map.
-Erased = CSEMap.RemoveNode(N);
-  }
-} else {
-  // Remove it from the CSE Map.
-  Erased = CSEMap.RemoveNode(N);
-}
+// Remove it from the CSE Map.
+Erased = CSEMap.RemoveNode(N);
 break;
   }
 #ifndef NDEBUG
@@ -973,11 +963,15 @@
 /// getNode - Gets or creates the specified node.
 ///
 SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT) {
-  SDNode *&N = NullaryOps[std::make_pair(Opcode, VT)];
-  if (!N) {
-N = new SDNode(Opcode, VT);
-AllNodes.push_back(N);
-  }
+  MVT::ValueType *VTs = getNodeValueTypes(VT);
+  SelectionDAGCSEMap::NodeID ID(Opcode, VTs);
+  void *IP = 0;
+  if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP))
+return SDOperand(E, 0);
+  SDNode *N = new SDNode(Opcode, VT);
+  CSEMap.InsertNode(N, IP);
+  
+  AllNodes.push_back(N);
   return SDOperand(N, 0);
 }
 
@@ -1892,16 +1886,18 @@
 /// the current one.
 SDOperand SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
  MVT::ValueType VT) {
-  // If an identical node already exists, use it.
-  SDNode *&ON = NullaryOps[std::make_pair(ISD::BUILTIN_OP_END+TargetOpc, VT)];
-  if (ON) return SDOperand(ON, 0);
-  
+  MVT::ValueType *VTs = getNodeValueTypes(VT);
+  SelectionDAGCSEMap::NodeID ID(ISD::BUILTIN_OP_END+TargetOpc, VTs);
+  void *IP = 0;
+  if (SDNode *ON = CSEMap.FindNodeOrInsertPos(ID, IP))
+return SDOperand(ON, 0);
+   
   RemoveNodeFromCSEMaps(N);
   
   N->MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc);
   N->setValueTypes(getNodeValueTypes(VT), 1);
 
-  ON = N;   // Memoize the new node.
+  CSEMap.InsertNode(N, IP);
   return SDOperand(N, 0);
 }
 



___
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

2006-08-11 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAG.h updated: 1.114 -> 1.115
---
Log message:

eliminate the NullaryOps map, use CSEMap instead.


---
Diffs of the changes:  (+0 -2)

 SelectionDAG.h |2 --
 1 files changed, 2 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAG.h
diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.114 
llvm/include/llvm/CodeGen/SelectionDAG.h:1.115
--- llvm/include/llvm/CodeGen/SelectionDAG.h:1.114  Fri Aug 11 12:46:44 2006
+++ llvm/include/llvm/CodeGen/SelectionDAG.hFri Aug 11 13:37:42 2006
@@ -449,8 +449,6 @@
   std::list > VTList;
   
   // Maps to auto-CSE operations.
-  std::map, SDNode *> NullaryOps;
-
   std::map, RegisterSDNode*> RegNodes;
   std::vector CondCodeNodes;
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/utils/userloc.pl

2006-08-11 Thread Reid Spencer


Changes in directory llvm/utils:

userloc.pl updated: 1.4 -> 1.5
---
Log message:

Drop the -details option, it was broken. If you want to know about a
particular directory, just pass that directory to the script. Also, clean
up the HTML output, put list of skipped dirs at the end, and make a few
other minor improvements.


---
Diffs of the changes:  (+42 -54)

 userloc.pl |   96 ++---
 1 files changed, 42 insertions(+), 54 deletions(-)


Index: llvm/utils/userloc.pl
diff -u llvm/utils/userloc.pl:1.4 llvm/utils/userloc.pl:1.5
--- llvm/utils/userloc.pl:1.4   Thu Apr 20 13:47:13 2006
+++ llvm/utils/userloc.pl   Fri Aug 11 13:36:55 2006
@@ -8,11 +8,9 @@
 #   then the cwd is used. The directory must be an LLVM tree checked 
out
 #   from cvs. 
 #
-# Syntax:   userloc.pl [-details|-recurse|-tag=tag|-html... ...
+# Syntax:   userloc.pl [-recurse|-tag=tag|-html... ...
 #
 # Options:
-#   -details
-#   Print detailed per-directory information.
 #   -recurse
 #   Recurse through sub directories. Without this, only the
 #   specified directory is examined
@@ -21,40 +19,31 @@
 #   -html
 #   Generate HTML output instead of text output
 
-die "Usage userloc.pl [-details|-recurse|-tag=tag|-html] ..." 
+die "Usage userloc.pl [-recurse|-tag=tag|-html] ..." 
   if ($#ARGV < 0);
 
 my $tag = "";
-my $details = 0;
 my $recurse = 0;
 my $html = 0;
+my $debug = 0;
 while ( substr($ARGV[0],0,1) eq '-' )
 {
-  if ($ARGV[0] eq "-details")
-  {
-$details = 1 ;
-  }
-  elsif ($ARGV[0] eq "-recurse")
-  {
+  if ($ARGV[0] eq "-recurse") {
 $recurse = 1;
-  }
-  elsif ($ARGV[0] =~ /-tag=.*/)
-  {
+  } elsif ($ARGV[0] =~ /-tag=.*/) {
 $tag = $ARGV[0];
 $tag =~ s#-tag=(.*)#$1#;
-  }
-  elsif ($ARGV[0] eq "-html")
-  {
+  } elsif ($ARGV[0] eq "-html") {
 $html = 1;
-  }
-  else
-  {
+  } elsif ($ARGV[0] eq "-debug") {
+$debug = 1;
+  } else {
 die "Invalid option: $ARGV[0]";
   }
   shift;
 }
 
-die "Usage userloc.pl [-details|-recurse|-tag=tag|-html] ..." 
+die "Usage userloc.pl [-recurse|-tag=tag|-html] ..." 
   if ($#ARGV < 0);
 
 my %Stats;
@@ -65,14 +54,15 @@
   my $f = $_[0];
   my $d = $_[1];
 
-  return 0 if ( "$f" eq "configure");
   if ( $d =~ ".*autoconf.*")
   {
 return 1 if ($f eq "configure.ac");
 return 1 if ($f eq "AutoRegen.sh");
 return 0;
   }
-
+  return 0 if ( "$f" eq "configure");
+  return 0 if ( "$f" eq 'PPCPerfectShuffle.h' );
+  return 0 if ( $f =~ /.*\.cvs/);
   return 1;
 }
 
@@ -95,13 +85,13 @@
   return $files;
 }
 
-my $annotate = "cvs annotate -lf ";
+my $annotate = "cvs -z6 annotate -lf ";
 if (length($tag) > 0)
 {
-  $annotate = $annotate . " -r " . $tag;
+  $annotate = $annotate . " -r" . $tag;
 }
 
-sub ScanDir 
+sub ScanDir
 {
   my $Dir = $_[0];
   my $files = GetCVSFiles($Dir);
@@ -109,26 +99,23 @@
   open (DATA,"$annotate $files 2>/dev/null |")
 || die "Can't read cvs annotation data";
 
-  my %st;
   while ( defined($line = ) )
   {
-if ($line =~ /^[0-9.]*[ \t]*\(/)
+if ($line =~ /^[0-9.]*[ \t]*\([^)]*\):/)
 {
-  $line =~ s#^[0-9.]*[ \t]*\(([a-zA-Z0-9_.-]*).*#$1#;
   chomp($line);
-  $st{$line}++;
+  $line =~ s#^[0-9.]*[ \t]*\(([a-zA-Z0-9_.-]*) [^)]*\):.*#$1#;
   $Stats{$line}++;
 }
   }
 
-  $StatsDetails{$Dir} = { %st };
-
   close DATA;
 }
 
 sub ValidateDirectory
 {
   my $d = $_[0];
+  return 0 if (! -d "$d" || ! -d "$d/CVS");
   return 0 if ($d =~ /.*CVS.*/);
   return 0 if ($d =~ /.*Debug.*/);
   return 0 if ($d =~ /.*Release.*/);
@@ -144,6 +131,7 @@
   return 1 if ($d =~ /.*projects\/sample.*/);
   return 0 if ($d =~ /.*projects\/llvm-.*/);
   return 0 if ($d =~ /.*win32.*/);
+  return 0 if ($d =~ /.*\/.libs\/.*/);
   return 1;
 }
 
@@ -157,12 +145,14 @@
 
   if ($RowCount % 10 == 0)
   {
-print " Directory\n";
-foreach $user (sort keys %Stats)
-{
-  print "",$user,"\n";
+if ($html) {
+  print " Directory\n";
+  foreach $user (sort keys %Stats)
+  {
+print "",$user,"\n";
+  }
+  print "\n";
 }
-print "\n";
   }
 
   $RowCount++;
@@ -217,41 +207,39 @@
 print "This document shows the total lines of code per user in each\n";
 print "LLVM directory. Lines of code are attributed by the user that last\n";
 print "committed the line. This does not necessarily reflect 
authorship.\n";
-print "The following directories were skipped:\n";
-print "\n";
 }
 
+my @ignored_dirs;
+
 for $Dir (@ALLDIRS) 
 { 
-  if ( -d "$Dir" && -d "$Dir/CVS" && ValidateDirectory($Dir) )
+  if ( ValidateDirectory($Dir) )
   {
 ScanDir($Dir); 
   }
   elsif ($html)
   {
-print "$Dir\n";
+push @ignored_dirs, $Dir;
   }
 }
 
 if ($html)
 {
-  print "\n";
   print "\n";
 }
 
-if ($details)
-{
-  foreach $dir (sort keys %StatsDetails)
-  {
-printStats($dir,$StatsDetails{$dir});
-  }
-}
-
 printStats("Total",\%Stats);
 
-
-if ($htm

[llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp

2006-08-11 Thread Evan Cheng


Changes in directory llvm/utils/TableGen:

DAGISelEmitter.cpp updated: 1.241 -> 1.242
---
Log message:

Use SmallVector instead.

---
Diffs of the changes:  (+1 -1)

 DAGISelEmitter.cpp |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/utils/TableGen/DAGISelEmitter.cpp
diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.241 
llvm/utils/TableGen/DAGISelEmitter.cpp:1.242
--- llvm/utils/TableGen/DAGISelEmitter.cpp:1.241Fri Aug 11 03:59:35 2006
+++ llvm/utils/TableGen/DAGISelEmitter.cpp  Fri Aug 11 13:33:41 2006
@@ -2560,7 +2560,7 @@
"(N.getOperand(N.getNumOperands()-1).getValueType() == 
MVT::Flag);");
   }
   if (HasVarOps)
-emitCode("std::vector Ops;");
+emitCode("SmallVector Ops;");
 
   // How many results is this pattern expected to produce?
   unsigned PatResults = 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/DAGCombiner.cpp

2006-08-11 Thread Chris Lattner


Changes in directory llvm/lib/CodeGen/SelectionDAG:

DAGCombiner.cpp updated: 1.181 -> 1.182
---
Log message:

change internal impl of dag combiner so that calls to CombineTo never have to
make a temporary vector.


---
Diffs of the changes:  (+9 -12)

 DAGCombiner.cpp |   21 +
 1 files changed, 9 insertions(+), 12 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.181 
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.182
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.181 Fri Aug 11 12:46:28 2006
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp   Fri Aug 11 12:56:38 2006
@@ -75,16 +75,17 @@
   WorkList.push_back(N);
 }
 
-SDOperand CombineTo(SDNode *N, const std::vector &To) {
+SDOperand CombineTo(SDNode *N, const SDOperand *To, unsigned NumTo) {
+  assert(N->getNumValues() == NumTo && "Broken CombineTo call!");
   ++NodesCombined;
   DEBUG(std::cerr << "\nReplacing "; N->dump();
 std::cerr << "\nWith: "; To[0].Val->dump(&DAG);
-std::cerr << " and " << To.size()-1 << " other values\n");
+std::cerr << " and " << NumTo-1 << " other values\n");
   std::vector NowDead;
-  DAG.ReplaceAllUsesWith(N, &To[0], &NowDead);
+  DAG.ReplaceAllUsesWith(N, To, &NowDead);
   
   // Push the new nodes and any users onto the worklist
-  for (unsigned i = 0, e = To.size(); i != e; ++i) {
+  for (unsigned i = 0, e = NumTo; i != e; ++i) {
 WorkList.push_back(To[i].Val);
 AddUsersToWorkList(To[i].Val);
   }
@@ -101,16 +102,12 @@
 }
 
 SDOperand CombineTo(SDNode *N, SDOperand Res) {
-  std::vector To;
-  To.push_back(Res);
-  return CombineTo(N, To);
+  return CombineTo(N, &Res, 1);
 }
 
 SDOperand CombineTo(SDNode *N, SDOperand Res0, SDOperand Res1) {
-  std::vector To;
-  To.push_back(Res0);
-  To.push_back(Res1);
-  return CombineTo(N, To);
+  SDOperand To[] = { Res0, Res1 };
+  return CombineTo(N, To, 2);
 }
   private:
 
@@ -253,7 +250,7 @@
 
 SDOperand TargetLowering::DAGCombinerInfo::
 CombineTo(SDNode *N, const std::vector &To) {
-  return ((DAGCombiner*)DC)->CombineTo(N, To);
+  return ((DAGCombiner*)DC)->CombineTo(N, &To[0], To.size());
 }
 
 SDOperand TargetLowering::DAGCombinerInfo::



___
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

2006-08-11 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAG.h updated: 1.113 -> 1.114
---
Log message:

Change one ReplaceAllUsesWith method to take an array of operands to 
replaceinstead of a vector of operands.



---
Diffs of the changes:  (+1 -1)

 SelectionDAG.h |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/SelectionDAG.h
diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.113 
llvm/include/llvm/CodeGen/SelectionDAG.h:1.114
--- llvm/include/llvm/CodeGen/SelectionDAG.h:1.113  Fri Aug 11 12:40:26 2006
+++ llvm/include/llvm/CodeGen/SelectionDAG.hFri Aug 11 12:46:44 2006
@@ -393,7 +393,7 @@
   std::vector *Deleted = 0);
   void ReplaceAllUsesWith(SDNode *From, SDNode *To,
   std::vector *Deleted = 0);
-  void ReplaceAllUsesWith(SDNode *From, const std::vector &To,
+  void ReplaceAllUsesWith(SDNode *From, const SDOperand *To,
   std::vector *Deleted = 0);
 
   /// ReplaceAllUsesOfValueWith - Replace any uses of From with To, leaving



___
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/DAGCombiner.cpp SelectionDAG.cpp

2006-08-11 Thread Chris Lattner


Changes in directory llvm/lib/CodeGen/SelectionDAG:

DAGCombiner.cpp updated: 1.180 -> 1.181
SelectionDAG.cpp updated: 1.321 -> 1.322
---
Log message:

Change one ReplaceAllUsesWith method to take an array of operands to replace
instead of a vector of operands.


---
Diffs of the changes:  (+5 -6)

 DAGCombiner.cpp  |5 +++--
 SelectionDAG.cpp |6 ++
 2 files changed, 5 insertions(+), 6 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.180 
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.181
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.180 Mon Aug  7 21:23:41 2006
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp   Fri Aug 11 12:46:28 2006
@@ -81,7 +81,7 @@
 std::cerr << "\nWith: "; To[0].Val->dump(&DAG);
 std::cerr << " and " << To.size()-1 << " other values\n");
   std::vector NowDead;
-  DAG.ReplaceAllUsesWith(N, To, &NowDead);
+  DAG.ReplaceAllUsesWith(N, &To[0], &NowDead);
   
   // Push the new nodes and any users onto the worklist
   for (unsigned i = 0, e = To.size(); i != e; ++i) {
@@ -416,7 +416,8 @@
   std::cerr << "\nWith: "; RV.Val->dump(&DAG);
   std::cerr << '\n');
 std::vector NowDead;
-DAG.ReplaceAllUsesWith(N, std::vector(1, RV), &NowDead);
+SDOperand OpV = RV;
+DAG.ReplaceAllUsesWith(N, &OpV, &NowDead);
   
 // Push the new node and any users onto the worklist
 WorkList.push_back(RV.Val);


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.321 
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.322
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.321Mon Aug  7 
21:23:41 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp  Fri Aug 11 12:46:28 2006
@@ -2441,11 +2441,9 @@
 /// This version can replace From with any result values.  To must match the
 /// number and types of values returned by From.
 void SelectionDAG::ReplaceAllUsesWith(SDNode *From,
-  const std::vector &To,
+  const SDOperand *To,
   std::vector *Deleted) {
-  assert(From->getNumValues() == To.size() &&
- "Incorrect number of values to replace with!");
-  if (To.size() == 1 && To[0].Val->getNumValues() == 1) {
+  if (From->getNumValues() == 1 && To[0].Val->getNumValues() == 1) {
 // Degenerate case handled above.
 ReplaceAllUsesWith(SDOperand(From, 0), To[0], Deleted);
 return;



___
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

2006-08-11 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAG.h updated: 1.112 -> 1.113
---
Log message:

Remove now-dead method.



---
Diffs of the changes:  (+0 -4)

 SelectionDAG.h |4 
 1 files changed, 4 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAG.h
diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.112 
llvm/include/llvm/CodeGen/SelectionDAG.h:1.113
--- llvm/include/llvm/CodeGen/SelectionDAG.h:1.112  Fri Aug 11 12:25:05 2006
+++ llvm/include/llvm/CodeGen/SelectionDAG.hFri Aug 11 12:40:26 2006
@@ -211,10 +211,6 @@
 SDOperand N5);
   SDOperand getNode(unsigned Opcode, MVT::ValueType VT,
 const SDOperand *Ops, unsigned NumOps);
-  SDOperand getNode(unsigned Opcode, MVT::ValueType VT,
-const std::vector &Ops) {
-return getNode(Opcode, VT, &Ops[0], Ops.size());
-  }
   SDOperand getNode(unsigned Opcode, std::vector &ResultTys,
 const SDOperand *Ops, unsigned NumOps);
   



___
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/ARMISelDAGToDAG.cpp

2006-08-11 Thread Chris Lattner


Changes in directory llvm/lib/Target/ARM:

ARMISelDAGToDAG.cpp updated: 1.27 -> 1.28
---
Log message:

Eliminate use of getNode that takes a vector.


---
Diffs of the changes:  (+2 -1)

 ARMISelDAGToDAG.cpp |3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.27 
llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.28
--- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.27Fri Aug 11 12:22:35 2006
+++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Fri Aug 11 12:38:39 2006
@@ -121,7 +121,8 @@
 }
   }
   if (!MemOpChains.empty())
-Chain = DAG.getNode(ISD::TokenFactor, MVT::Other, MemOpChains);
+Chain = DAG.getNode(ISD::TokenFactor, MVT::Other,
+&MemOpChains[0], MemOpChains.size());
 
   // Build a sequence of copy-to-reg nodes chained together with token chain
   // and flag operands which copy the outgoing args into the appropriate regs.



___
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/X86ISelLowering.cpp

2006-08-11 Thread Chris Lattner


Changes in directory llvm/lib/Target/X86:

X86ISelLowering.cpp updated: 1.244 -> 1.245
---
Log message:

Eliminate use of getNode that takes a vector.


---
Diffs of the changes:  (+21 -11)

 X86ISelLowering.cpp |   32 +---
 1 files changed, 21 insertions(+), 11 deletions(-)


Index: llvm/lib/Target/X86/X86ISelLowering.cpp
diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.244 
llvm/lib/Target/X86/X86ISelLowering.cpp:1.245
--- llvm/lib/Target/X86/X86ISelLowering.cpp:1.244   Fri Aug 11 04:05:03 2006
+++ llvm/lib/Target/X86/X86ISelLowering.cpp Fri Aug 11 12:38:39 2006
@@ -2365,7 +2365,8 @@
 MaskVec.push_back(DAG.getConstant(1-i+NumElems, EVT));
   else
 MaskVec.push_back(DAG.getConstant(i+NumElems, EVT));
-SDOperand ShufMask = DAG.getNode(ISD::BUILD_VECTOR, MaskVT, MaskVec);
+SDOperand ShufMask = DAG.getNode(ISD::BUILD_VECTOR, MaskVT,
+ &MaskVec[0], MaskVec.size());
 return DAG.getNode(ISD::VECTOR_SHUFFLE, VT, V[0], V[1], ShufMask);
   }
 
@@ -2501,14 +2502,15 @@
 MaskVec.push_back(PermMask.getOperand(i));
   for (unsigned i = 4; i != 8; ++i)
 MaskVec.push_back(DAG.getConstant(i, BaseVT));
-  SDOperand Mask = DAG.getNode(ISD::BUILD_VECTOR, MaskVT, MaskVec);
+  SDOperand Mask = DAG.getNode(ISD::BUILD_VECTOR, MaskVT,
+   &MaskVec[0], MaskVec.size());
   V1 = DAG.getNode(ISD::VECTOR_SHUFFLE, VT, V1, V2, Mask);
   MaskVec.clear();
   for (unsigned i = 0; i != 4; ++i)
 MaskVec.push_back(DAG.getConstant(i, BaseVT));
   for (unsigned i = 4; i != 8; ++i)
 MaskVec.push_back(PermMask.getOperand(i));
-  Mask = DAG.getNode(ISD::BUILD_VECTOR, MaskVT, MaskVec);
+  Mask = DAG.getNode(ISD::BUILD_VECTOR, MaskVT, 
&MaskVec[0],MaskVec.size());
   return DAG.getNode(ISD::VECTOR_SHUFFLE, VT, V1, V2, Mask);
 }
   } else {
@@ -2558,7 +2560,8 @@
 }
 if (NumLo <= 2 && NumHi <= 2) {
   V1 = DAG.getNode(ISD::VECTOR_SHUFFLE, VT, V1, V2,
-   DAG.getNode(ISD::BUILD_VECTOR, MaskVT, Mask1));
+   DAG.getNode(ISD::BUILD_VECTOR, MaskVT,
+   &Mask1[0], Mask1.size()));
   for (unsigned i = 0; i != NumElems; ++i) {
 if (Locs[i].first == -1)
   continue;
@@ -2570,7 +2573,8 @@
   }
 
   return DAG.getNode(ISD::VECTOR_SHUFFLE, VT, V1, V1,
- DAG.getNode(ISD::BUILD_VECTOR, MaskVT, Mask2));
+ DAG.getNode(ISD::BUILD_VECTOR, MaskVT,
+ &Mask2[0], Mask2.size()));
 }
 
 // Break it into (shuffle shuffle_hi, shuffle_lo).
@@ -2604,10 +2608,12 @@
 
 SDOperand LoShuffle =
   DAG.getNode(ISD::VECTOR_SHUFFLE, VT, V1, V2,
-  DAG.getNode(ISD::BUILD_VECTOR, MaskVT, LoMask));
+  DAG.getNode(ISD::BUILD_VECTOR, MaskVT,
+  &LoMask[0], LoMask.size()));
 SDOperand HiShuffle = 
   DAG.getNode(ISD::VECTOR_SHUFFLE, VT, V1, V2,
-  DAG.getNode(ISD::BUILD_VECTOR, MaskVT, HiMask));
+  DAG.getNode(ISD::BUILD_VECTOR, MaskVT,
+  &HiMask[0], HiMask.size()));
 std::vector MaskOps;
 for (unsigned i = 0; i != NumElems; ++i) {
   if (Locs[i].first == -1) {
@@ -2618,7 +2624,8 @@
   }
 }
 return DAG.getNode(ISD::VECTOR_SHUFFLE, VT, LoShuffle, HiShuffle,
-   DAG.getNode(ISD::BUILD_VECTOR, MaskVT, MaskOps));
+   DAG.getNode(ISD::BUILD_VECTOR, MaskVT,
+   &MaskOps[0], MaskOps.size()));
   }
 
   return SDOperand();
@@ -2651,7 +2658,8 @@
 IdxVec.push_back(DAG.getNode(ISD::UNDEF, MVT::getVectorBaseType(MaskVT)));
 IdxVec.push_back(DAG.getNode(ISD::UNDEF, MVT::getVectorBaseType(MaskVT)));
 IdxVec.push_back(DAG.getNode(ISD::UNDEF, MVT::getVectorBaseType(MaskVT)));
-SDOperand Mask = DAG.getNode(ISD::BUILD_VECTOR, MaskVT, IdxVec);
+SDOperand Mask = DAG.getNode(ISD::BUILD_VECTOR, MaskVT,
+ &IdxVec[0], IdxVec.size());
 Vec = DAG.getNode(ISD::VECTOR_SHUFFLE, Vec.getValueType(),
   Vec, Vec, Mask);
 return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, VT, Vec,
@@ -2669,7 +2677,8 @@
 std::vector IdxVec;
 IdxVec.push_back(DAG.getConstant(1, MVT::getVectorBaseType(MaskVT)));
 IdxVec.push_back(DAG.getNode(ISD::UNDEF, MVT::getVectorBaseType(MaskVT)));
-SDOperand Mask = DAG.getNode(ISD::BUILD_VECTOR, MaskVT, IdxVec);
+SDOperand Mask = DAG.getNode(ISD::BUILD_VECTOR, MaskVT,
+ &IdxVec[0], IdxVec.size());
 Vec = DAG.getNode(ISD::VECTOR_SHUFFLE, Vec.getValueType(),
   Vec, DAG.getNode(ISD::UNDEF, Vec.getValueType()), Mask);
 return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, VT, Vec,
@@ -2706,7 +2715,8 @@
   for (unsigned i = 1;

[llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelLowering.cpp

2006-08-11 Thread Chris Lattner


Changes in directory llvm/lib/Target/IA64:

IA64ISelLowering.cpp updated: 1.39 -> 1.40
---
Log message:

Eliminate use of getNode that takes a vector.


---
Diffs of the changes:  (+1 -1)

 IA64ISelLowering.cpp |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Target/IA64/IA64ISelLowering.cpp
diff -u llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.39 
llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.40
--- llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.39  Fri Aug 11 12:21:12 2006
+++ llvm/lib/Target/IA64/IA64ISelLowering.cpp   Fri Aug 11 12:38:39 2006
@@ -396,7 +396,7 @@
 
   // Emit all stores, make sure they occur before any copies into physregs.
   if (!Stores.empty())
-Chain = DAG.getNode(ISD::TokenFactor, MVT::Other, Stores);
+Chain = DAG.getNode(ISD::TokenFactor, MVT::Other, 
&Stores[0],Stores.size());
 
   static const unsigned IntArgRegs[] = {
 IA64::out0, IA64::out1, IA64::out2, IA64::out3, 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelLowering.cpp

2006-08-11 Thread Chris Lattner


Changes in directory llvm/lib/Target/PowerPC:

PPCISelLowering.cpp updated: 1.202 -> 1.203
---
Log message:

Eliminate use of getNode that takes a vector.


---
Diffs of the changes:  (+22 -19)

 PPCISelLowering.cpp |   41 ++---
 1 files changed, 22 insertions(+), 19 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCISelLowering.cpp
diff -u llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.202 
llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.203
--- llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.202   Fri Aug 11 12:18:05 2006
+++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp Fri Aug 11 12:38:39 2006
@@ -895,7 +895,7 @@
 // If this function is vararg, store any remaining integer argument regs
 // to their spots on the stack so that they may be loaded by deferencing 
the
 // result of va_next.
-std::vector MemOps;
+SmallVector MemOps;
 for (; GPR_idx != Num_GPR_Regs; ++GPR_idx) {
   unsigned VReg = RegMap->createVirtualRegister(&PPC::GPRCRegClass);
   MF.addLiveIn(GPR[GPR_idx], VReg);
@@ -908,7 +908,7 @@
   FIN = DAG.getNode(ISD::ADD, PtrOff.getValueType(), FIN, PtrOff);
 }
 if (!MemOps.empty())
-  Root = DAG.getNode(ISD::TokenFactor, MVT::Other, MemOps);
+  Root = DAG.getNode(ISD::TokenFactor, 
MVT::Other,&MemOps[0],MemOps.size());
   }
   
   ArgValues.push_back(Root);
@@ -1011,7 +1011,7 @@
   const unsigned *GPR = isPPC64 ? GPR_64 : GPR_32;
 
   std::vector > RegsToPass;
-  std::vector MemOpChains;
+  SmallVector MemOpChains;
   for (unsigned i = 0; i != NumOps; ++i) {
 SDOperand Arg = Op.getOperand(5+2*i);
 
@@ -1096,7 +1096,8 @@
 }
   }
   if (!MemOpChains.empty())
-Chain = DAG.getNode(ISD::TokenFactor, MVT::Other, MemOpChains);
+Chain = DAG.getNode(ISD::TokenFactor, MVT::Other,
+&MemOpChains[0], MemOpChains.size());
   
   // Build a sequence of copy-to-reg nodes chained together with token chain
   // and flag operands which copy the outgoing args into the appropriate regs.
@@ -1609,8 +1610,10 @@
   
   // Build a canonical splat for this value.
   SDOperand Elt = DAG.getConstant(Val, MVT::getVectorBaseType(CanonicalVT));
-  std::vector Ops(MVT::getVectorNumElements(CanonicalVT), Elt);
-  SDOperand Res = DAG.getNode(ISD::BUILD_VECTOR, CanonicalVT, Ops);
+  SmallVector Ops;
+  Ops.assign(MVT::getVectorNumElements(CanonicalVT), Elt);
+  SDOperand Res = DAG.getNode(ISD::BUILD_VECTOR, CanonicalVT,
+  &Ops[0], Ops.size());
   return DAG.getNode(ISD::BIT_CONVERT, VT, Res);
 }
 
@@ -1643,11 +1646,11 @@
   LHS = DAG.getNode(ISD::BIT_CONVERT, MVT::v16i8, LHS);
   RHS = DAG.getNode(ISD::BIT_CONVERT, MVT::v16i8, RHS);
   
-  std::vector Ops;
+  SDOperand Ops[16];
   for (unsigned i = 0; i != 16; ++i)
-Ops.push_back(DAG.getConstant(i+Amt, MVT::i32));
+Ops[i] = DAG.getConstant(i+Amt, MVT::i32);
   SDOperand T = DAG.getNode(ISD::VECTOR_SHUFFLE, MVT::v16i8, LHS, RHS,
-DAG.getNode(ISD::BUILD_VECTOR, MVT::v16i8, Ops));
+DAG.getNode(ISD::BUILD_VECTOR, MVT::v16i8, 
Ops,16));
   return DAG.getNode(ISD::BIT_CONVERT, VT, T);
 }
 
@@ -1879,12 +1882,12 @@
   case OP_VSLDOI12:
 return BuildVSLDOI(OpLHS, OpRHS, 12, OpLHS.getValueType(), DAG);
   }
-  std::vector Ops;
+  SDOperand Ops[16];
   for (unsigned i = 0; i != 16; ++i)
-Ops.push_back(DAG.getConstant(ShufIdxs[i], MVT::i32));
+Ops[i] = DAG.getConstant(ShufIdxs[i], MVT::i32);
   
   return DAG.getNode(ISD::VECTOR_SHUFFLE, OpLHS.getValueType(), OpLHS, OpRHS,
- DAG.getNode(ISD::BUILD_VECTOR, MVT::v16i8, Ops));
+ DAG.getNode(ISD::BUILD_VECTOR, MVT::v16i8, Ops, 16));
 }
 
 /// LowerVECTOR_SHUFFLE - Return the code we lower for VECTOR_SHUFFLE.  If this
@@ -1992,7 +1995,7 @@
   MVT::ValueType EltVT = MVT::getVectorBaseType(V1.getValueType());
   unsigned BytesPerElement = MVT::getSizeInBits(EltVT)/8;
   
-  std::vector ResultMask;
+  SmallVector ResultMask;
   for (unsigned i = 0, e = PermMask.getNumOperands(); i != e; ++i) {
 unsigned SrcElt;
 if (PermMask.getOperand(i).getOpcode() == ISD::UNDEF)
@@ -2005,7 +2008,8 @@
MVT::i8));
   }
   
-  SDOperand VPermMask = DAG.getNode(ISD::BUILD_VECTOR, MVT::v16i8, ResultMask);
+  SDOperand VPermMask = DAG.getNode(ISD::BUILD_VECTOR, MVT::v16i8,
+&ResultMask[0], ResultMask.size());
   return DAG.getNode(PPCISD::VPERM, V1.getValueType(), V1, V2, VPermMask);
 }
 
@@ -2180,14 +2184,13 @@
 OddParts = DAG.getNode(ISD::BIT_CONVERT, MVT::v16i8, OddParts);
 
 // Merge the results together.
-std::vector Ops;
+SDOperand Ops[16];
 for (unsigned i = 0; i != 8; ++i) {
-  Ops.push_back(DAG.getConstant(2*i+1, MVT::i8));
-  Ops.push_back(DAG.getConstant(2*i+1+16, MVT::i8));
+  Ops[i*2  ] = DAG.getConstant(2*i+1, MVT::i8);
+  Ops[i*2+1] = DAG.getConstant(2*i+1+16, MVT

[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaISelLowering.cpp

2006-08-11 Thread Chris Lattner


Changes in directory llvm/lib/Target/Alpha:

AlphaISelLowering.cpp updated: 1.57 -> 1.58
---
Log message:

Eliminate use of getNode that takes a vector.


---
Diffs of the changes:  (+1 -1)

 AlphaISelLowering.cpp |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Target/Alpha/AlphaISelLowering.cpp
diff -u llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.57 
llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.58
--- llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.57Fri Aug 11 12:19:54 2006
+++ llvm/lib/Target/Alpha/AlphaISelLowering.cpp Fri Aug 11 12:38:39 2006
@@ -261,7 +261,7 @@
 }
 
 //Set up a token factor with all the stack traffic
-Root = DAG.getNode(ISD::TokenFactor, MVT::Other, LS);
+Root = DAG.getNode(ISD::TokenFactor, MVT::Other, &LS[0], LS.size());
   }
 
   ArgValues.push_back(Root);



___
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

2006-08-11 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAG.h updated: 1.111 -> 1.112
---
Log message:

remove a (now) unused getNode method.


---
Diffs of the changes:  (+0 -5)

 SelectionDAG.h |5 -
 1 files changed, 5 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAG.h
diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.111 
llvm/include/llvm/CodeGen/SelectionDAG.h:1.112
--- llvm/include/llvm/CodeGen/SelectionDAG.h:1.111  Mon Aug  7 21:23:41 2006
+++ llvm/include/llvm/CodeGen/SelectionDAG.hFri Aug 11 12:25:05 2006
@@ -217,11 +217,6 @@
   }
   SDOperand getNode(unsigned Opcode, std::vector &ResultTys,
 const SDOperand *Ops, unsigned NumOps);
-  SDOperand getNode(unsigned Opcode, std::vector &ResultTys,
-const std::vector &Ops) {
-return getNode(Opcode, ResultTys, &Ops[0], Ops.size());
-  }
-  
   
   /// 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/Target/ARM/ARMISelDAGToDAG.cpp

2006-08-11 Thread Chris Lattner


Changes in directory llvm/lib/Target/ARM:

ARMISelDAGToDAG.cpp updated: 1.26 -> 1.27
---
Log message:

elimiante use of getNode that takes vector of operands.


---
Diffs of the changes:  (+4 -3)

 ARMISelDAGToDAG.cpp |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)


Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.26 
llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.27
--- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.26Fri Aug 11 04:06:36 2006
+++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Fri Aug 11 12:22:35 2006
@@ -157,7 +157,7 @@
   unsigned CallOpc = ARMISD::CALL;
   if (InFlag.Val)
 Ops.push_back(InFlag);
-  Chain = DAG.getNode(CallOpc, NodeTys, Ops);
+  Chain = DAG.getNode(CallOpc, NodeTys, &Ops[0], Ops.size());
   InFlag = Chain.getValue(1);
 
   std::vector ResultVals;
@@ -182,7 +182,8 @@
 return Chain;
 
   ResultVals.push_back(Chain);
-  SDOperand Res = DAG.getNode(ISD::MERGE_VALUES, NodeTys, ResultVals);
+  SDOperand Res = DAG.getNode(ISD::MERGE_VALUES, NodeTys, &ResultVals[0],
+  ResultVals.size());
   return Res.getValue(Op.ResNo);
 }
 
@@ -279,7 +280,7 @@
   // Return the new list of results.
   std::vector RetVT(Op.Val->value_begin(),
 Op.Val->value_end());
-  return DAG.getNode(ISD::MERGE_VALUES, RetVT, ArgValues);
+  return DAG.getNode(ISD::MERGE_VALUES, RetVT, &ArgValues[0], 
ArgValues.size());
 }
 
 SDOperand ARMTargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) {



___
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

2006-08-11 Thread Chris Lattner


Changes in directory llvm/lib/Target/IA64:

IA64ISelLowering.cpp updated: 1.38 -> 1.39
---
Log message:

eliminate use of getNode that takes vector of operands.


---
Diffs of the changes:  (+4 -2)

 IA64ISelLowering.cpp |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)


Index: llvm/lib/Target/IA64/IA64ISelLowering.cpp
diff -u llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.38 
llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.39
--- llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.38  Fri May 26 18:10:12 2006
+++ llvm/lib/Target/IA64/IA64ISelLowering.cpp   Fri Aug 11 12:21:12 2006
@@ -469,7 +469,8 @@
 assert(0 && "this should never happen!\n");
 
   // to make way for a hack:
-  Chain = DAG.getNode(IA64ISD::BRCALL, NodeTys, CallOperands);
+  Chain = DAG.getNode(IA64ISD::BRCALL, NodeTys,
+  &CallOperands[0], CallOperands.size());
   InFlag = Chain.getValue(1);
 
   // restore the GP, SP and RP after the call  
@@ -578,7 +579,8 @@
   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);
+  return DAG.getNode(IA64ISD::RET_FLAG, NodeTys,
+ &RetOperands[0], RetOperands.size());
 }
 }
 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/AlphaISelLowering.cpp

2006-08-11 Thread Chris Lattner


Changes in directory llvm/lib/Target/Alpha:

AlphaISelLowering.cpp updated: 1.56 -> 1.57
---
Log message:

eliminate use of getNode that takes vector.  Wrap a really long line.


---
Diffs of the changes:  (+6 -4)

 AlphaISelLowering.cpp |   10 ++
 1 files changed, 6 insertions(+), 4 deletions(-)


Index: llvm/lib/Target/Alpha/AlphaISelLowering.cpp
diff -u llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.56 
llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.57
--- llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.56Mon Jul  3 13:00:29 2006
+++ llvm/lib/Target/Alpha/AlphaISelLowering.cpp Fri Aug 11 12:19:54 2006
@@ -159,7 +159,8 @@
   }
 }
 
-//http://www.cs.arizona.edu/computer.help/policy/DIGITAL_unix/AA-PY8AC-TET1_html/callCH3.html#BLOCK21
+//http://www.cs.arizona.edu/computer.help/policy/DIGITAL_unix/
+//AA-PY8AC-TET1_html/callCH3.html#BLOCK21
 
 //For now, just use variable size stack frame format
 
@@ -268,12 +269,13 @@
   // Return the new list of results.
   std::vector RetVT(Op.Val->value_begin(),
 Op.Val->value_end());
-  return DAG.getNode(ISD::MERGE_VALUES, RetVT, ArgValues);
+  return DAG.getNode(ISD::MERGE_VALUES, RetVT, &ArgValues[0], 
ArgValues.size());
 }
 
 static SDOperand LowerRET(SDOperand Op, SelectionDAG &DAG, unsigned int RA) {
   SDOperand Copy = DAG.getCopyToReg(Op.getOperand(0), Alpha::R26, 
-   DAG.getNode(AlphaISD::GlobalRetAddr, 
MVT::i64),
+   DAG.getNode(AlphaISD::GlobalRetAddr, 
+MVT::i64),
SDOperand());
   switch (Op.getNumOperands()) {
   default:
@@ -350,7 +352,7 @@
   Ops.push_back(Chain);
   Ops.push_back(Callee);
   Ops.insert(Ops.end(), args_to_use.begin(), args_to_use.end());
-  SDOperand TheCall = DAG.getNode(AlphaISD::CALL, RetVals, Ops);
+  SDOperand TheCall = DAG.getNode(AlphaISD::CALL, RetVals, &Ops[0], 
Ops.size());
   Chain = TheCall.getValue(RetTyVT != MVT::isVoid);
   Chain = DAG.getNode(ISD::CALLSEQ_END, MVT::Other, Chain,
   DAG.getConstant(NumBytes, getPointerTy()));



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelLowering.cpp

2006-08-11 Thread Chris Lattner


Changes in directory llvm/lib/Target/PowerPC:

PPCISelLowering.cpp updated: 1.201 -> 1.202
---
Log message:

Convert vectors to fixed sized arrays and smallvectors.  Eliminate use of 
getNode that takes a vector.


---
Diffs of the changes:  (+42 -37)

 PPCISelLowering.cpp |   79 +++-
 1 files changed, 42 insertions(+), 37 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCISelLowering.cpp
diff -u llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.201 
llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.202
--- llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.201   Fri Aug 11 11:47:32 2006
+++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp Fri Aug 11 12:18:05 2006
@@ -754,7 +754,7 @@
   MachineFunction &MF = DAG.getMachineFunction();
   MachineFrameInfo *MFI = MF.getFrameInfo();
   SSARegMap *RegMap = MF.getSSARegMap();
-  std::vector ArgValues;
+  SmallVector ArgValues;
   SDOperand Root = Op.getOperand(0);
   
   unsigned ArgOffset = 24;
@@ -916,7 +916,7 @@
   // Return the new list of results.
   std::vector RetVT(Op.Val->value_begin(),
 Op.Val->value_end());
-  return DAG.getNode(ISD::MERGE_VALUES, RetVT, ArgValues);
+  return DAG.getNode(ISD::MERGE_VALUES, RetVT, &ArgValues[0], 
ArgValues.size());
 }
 
 /// isCallCompatibleAddress - Return the immediate to use if the specified
@@ -,7 +,7 @@
   NodeTys.push_back(MVT::Other);   // Returns a chain
   NodeTys.push_back(MVT::Flag);// Returns a flag for retval copy to use.
 
-  std::vector Ops;
+  SmallVector Ops;
   unsigned CallOpc = PPCISD::CALL;
   
   // If the callee is a GlobalAddress/ExternalSymbol node (quite common, every
@@ -1127,12 +1127,8 @@
   else {
 // Otherwise, this is an indirect call.  We have to use a MTCTR/BCTRL pair
 // to do the call, we can't use PPCISD::CALL.
-Ops.push_back(Chain);
-Ops.push_back(Callee);
-
-if (InFlag.Val)
-  Ops.push_back(InFlag);
-Chain = DAG.getNode(PPCISD::MTCTR, NodeTys, Ops);
+SDOperand MTCTROps[] = {Chain, Callee, InFlag};
+Chain = DAG.getNode(PPCISD::MTCTR, NodeTys, MTCTROps, 2+(InFlag.Val!=0));
 InFlag = Chain.getValue(1);
 
 // Copy the callee address into R12 on darwin.
@@ -1142,7 +1138,6 @@
 NodeTys.clear();
 NodeTys.push_back(MVT::Other);
 NodeTys.push_back(MVT::Flag);
-Ops.clear();
 Ops.push_back(Chain);
 CallOpc = PPCISD::BCTRL;
 Callee.Val = 0;
@@ -1162,10 +1157,11 @@
   
   if (InFlag.Val)
 Ops.push_back(InFlag);
-  Chain = DAG.getNode(CallOpc, NodeTys, Ops);
+  Chain = DAG.getNode(CallOpc, NodeTys, &Ops[0], Ops.size());
   InFlag = Chain.getValue(1);
 
-  std::vector ResultVals;
+  SDOperand ResultVals[3];
+  unsigned NumResults = 0;
   NodeTys.clear();
   
   // If the call has results, copy the values out of the ret val registers.
@@ -1175,27 +1171,31 @@
   case MVT::i32:
 if (Op.Val->getValueType(1) == MVT::i32) {
   Chain = DAG.getCopyFromReg(Chain, PPC::R4, MVT::i32, InFlag).getValue(1);
-  ResultVals.push_back(Chain.getValue(0));
+  ResultVals[0] = Chain.getValue(0);
   Chain = DAG.getCopyFromReg(Chain, PPC::R3, MVT::i32,
  Chain.getValue(2)).getValue(1);
-  ResultVals.push_back(Chain.getValue(0));
+  ResultVals[1] = Chain.getValue(0);
+  NumResults = 2;
   NodeTys.push_back(MVT::i32);
 } else {
   Chain = DAG.getCopyFromReg(Chain, PPC::R3, MVT::i32, InFlag).getValue(1);
-  ResultVals.push_back(Chain.getValue(0));
+  ResultVals[0] = Chain.getValue(0);
+  NumResults = 1;
 }
 NodeTys.push_back(MVT::i32);
 break;
   case MVT::i64:
 Chain = DAG.getCopyFromReg(Chain, PPC::X3, MVT::i64, InFlag).getValue(1);
-ResultVals.push_back(Chain.getValue(0));
+ResultVals[0] = Chain.getValue(0);
+NumResults = 1;
 NodeTys.push_back(MVT::i64);
 break;
   case MVT::f32:
   case MVT::f64:
 Chain = DAG.getCopyFromReg(Chain, PPC::F1, Op.Val->getValueType(0),
InFlag).getValue(1);
-ResultVals.push_back(Chain.getValue(0));
+ResultVals[0] = Chain.getValue(0);
+NumResults = 1;
 NodeTys.push_back(Op.Val->getValueType(0));
 break;
   case MVT::v4f32:
@@ -1204,7 +1204,8 @@
   case MVT::v16i8:
 Chain = DAG.getCopyFromReg(Chain, PPC::V2, Op.Val->getValueType(0),
InFlag).getValue(1);
-ResultVals.push_back(Chain.getValue(0));
+ResultVals[0] = Chain.getValue(0);
+NumResults = 1;
 NodeTys.push_back(Op.Val->getValueType(0));
 break;
   }
@@ -1214,12 +1215,13 @@
   NodeTys.push_back(MVT::Other);
   
   // If the function returns void, just return the chain.
-  if (ResultVals.empty())
+  if (NumResults == 1)
 return Chain;
   
   // Otherwise, merge everything together with a MERGE_VALUES node.
-  ResultVals.push_back(Chain);
-  SDOperand Res = DAG.getNode(ISD::MERGE_VALUES, NodeTys, ResultVals);
+  ResultVals[NumResults++] = Chain

[llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.cgi

2006-08-11 Thread Patrick Jenkins


Changes in directory nightlytest-serverside:

NightlyTestAccept.cgi updated: 1.43 -> 1.44
---
Log message:

Changed the format of significant changes in the nightly emails


---
Diffs of the changes:  (+2 -2)

 NightlyTestAccept.cgi |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: nightlytest-serverside/NightlyTestAccept.cgi
diff -u nightlytest-serverside/NightlyTestAccept.cgi:1.43 
nightlytest-serverside/NightlyTestAccept.cgi:1.44
--- nightlytest-serverside/NightlyTestAccept.cgi:1.43   Thu Aug 10 17:30:29 2006
+++ nightlytest-serverside/NightlyTestAccept.cgiFri Aug 11 12:13:35 2006
@@ -742,7 +742,7 @@
 if($perc > 5 || $perc < -5){
 if( ! exists $output_big_changes{"$x"} ){
 my $rounded_perc = sprintf("%1.2f", $perc);
-$output_big_changes{"$x"}[0]="$prog ($x) changed 
\%$rounded_perc ($value_old => $value_new)\n";
+$output_big_changes{"$x"}[0]="$prog: $rounded_perc\% 
($value_old => $value_new)\n";
 }
 else{
 my $rounded_perc = sprintf("%1.2f", $perc);
@@ -793,7 +793,7 @@
foreach my $meas(keys(%output_big_changes)){
$email.= "$meas:\n";
foreach my $x(@{ $output_big_changes{$meas} } ){
-   $email.= "--- $x";
+   $email.= " $x";
}
}
 }



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelLowering.cpp

2006-08-11 Thread Chris Lattner


Changes in directory llvm/lib/Target/PowerPC:

PPCISelLowering.cpp updated: 1.200 -> 1.201
---
Log message:

Fix miscompilation of float vector returns.  Compile code to this:

_func:
vsldoi v2, v3, v2, 12
vsldoi v2, v2, v2, 4
blr

instead of:

_func:
vsldoi v2, v3, v2, 12
vsldoi v2, v2, v2, 4
*** vor f1, v2, v2
blr



---
Diffs of the changes:  (+4 -4)

 PPCISelLowering.cpp |8 
 1 files changed, 4 insertions(+), 4 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCISelLowering.cpp
diff -u llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.200 
llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.201
--- llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.200   Fri Jul 28 11:45:47 2006
+++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp Fri Aug 11 11:47:32 2006
@@ -1238,11 +1238,11 @@
   ArgReg = PPC::R3;
 } else if (ArgVT == MVT::i64) {
   ArgReg = PPC::X3;
-} else if (MVT::isFloatingPoint(ArgVT)) {
-  ArgReg = PPC::F1;
-} else {
-  assert(MVT::isVector(ArgVT));
+} else if (MVT::isVector(ArgVT)) {
   ArgReg = PPC::V2;
+} else {
+  assert(MVT::isFloatingPoint(ArgVT));
+  ArgReg = PPC::F1;
 }
 
 Copy = DAG.getCopyToReg(Op.getOperand(0), ArgReg, Op.getOperand(1),



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/Regression/CodeGen/PowerPC/2006-08-11-RetVector.ll

2006-08-11 Thread Chris Lattner


Changes in directory llvm/test/Regression/CodeGen/PowerPC:

2006-08-11-RetVector.ll added (r1.1)
---
Log message:

New testcase


---
Diffs of the changes:  (+8 -0)

 2006-08-11-RetVector.ll |8 
 1 files changed, 8 insertions(+)


Index: llvm/test/Regression/CodeGen/PowerPC/2006-08-11-RetVector.ll
diff -c /dev/null 
llvm/test/Regression/CodeGen/PowerPC/2006-08-11-RetVector.ll:1.1
*** /dev/null   Fri Aug 11 11:46:48 2006
--- llvm/test/Regression/CodeGen/PowerPC/2006-08-11-RetVector.llFri Aug 
11 11:46:38 2006
***
*** 0 
--- 1,8 
+ ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vsldoi &&
+ ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | not grep vor
+ 
+ <4 x float> %func(<4 x float> %fp0, <4 x float> %fp1) {
+ %tmp76 = shufflevector <4 x float> %fp0, <4 x float> %fp1, <4 x uint> 
< uint 0, uint 1, uint 2, uint 7 >; <<4 x float>> [#uses=1]
+ ret <4 x float> %tmp76
+ }
+ 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/docs/WritingAnLLVMPass.html

2006-08-11 Thread Chris Lattner


Changes in directory llvm/docs:

WritingAnLLVMPass.html updated: 1.46 -> 1.47
---
Log message:

Minor cleanups


---
Diffs of the changes:  (+5 -5)

 WritingAnLLVMPass.html |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)


Index: llvm/docs/WritingAnLLVMPass.html
diff -u llvm/docs/WritingAnLLVMPass.html:1.46 
llvm/docs/WritingAnLLVMPass.html:1.47
--- llvm/docs/WritingAnLLVMPass.html:1.46   Mon Aug  7 20:48:17 2006
+++ llvm/docs/WritingAnLLVMPass.htmlFri Aug 11 11:37:02 2006
@@ -102,7 +102,7 @@
 
 
 
-  Written by mailto:[EMAIL PROTECTED]">Chris Lattner, 
+  Written by mailto:[EMAIL PROTECTED]">Chris Lattner and
   mailto:[EMAIL PROTECTED]">Jim Laskey
 
 
@@ -1484,7 +1484,7 @@
 .cpp file add the following include;
 
 
-  #include ""llvm/CodeGen/RegAllocRegistry.h""
+  #include "llvm/CodeGen/RegAllocRegistry.h"
 
 
 Also in your register allocator .cpp file, define a creator function in the
@@ -1522,8 +1522,8 @@
 
 And that's it.  The user is now free to use -regalloc=myregalloc as
 an option.  Registering instruction schedulers is similar except use the
-RegisterRegAlloc class.  Note that the
-RegisterRegAlloc::FunctionPassCtor is significantly different from
+RegisterScheduler class.  Note that the
+RegisterScheduler::FunctionPassCtor is significantly different from
 RegisterRegAlloc::FunctionPassCtor.
 
 To force the load/linking of your register allocator into the llc/lli tools,
@@ -1734,7 +1734,7 @@
 
   mailto:[EMAIL PROTECTED]">Chris Lattner
   http://llvm.org";>The LLVM Compiler Infrastructure
-  Last modified: $Date: 2006/08/08 01:48:17 $
+  Last modified: $Date: 2006/08/11 16:37:02 $
 
 
 



___
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/X86InstrInfo.td

2006-08-11 Thread Evan Cheng


Changes in directory llvm/lib/Target/X86:

X86InstrInfo.td updated: 1.281 -> 1.282
---
Log message:

CALLSEQ_* produces chain even if that's not needed.

---
Diffs of the changes:  (+1 -1)

 X86InstrInfo.td |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Target/X86/X86InstrInfo.td
diff -u llvm/lib/Target/X86/X86InstrInfo.td:1.281 
llvm/lib/Target/X86/X86InstrInfo.td:1.282
--- llvm/lib/Target/X86/X86InstrInfo.td:1.281   Thu Jul 20 16:37:39 2006
+++ llvm/lib/Target/X86/X86InstrInfo.td Fri Aug 11 04:03:33 2006
@@ -67,7 +67,7 @@
 
 def X86callseq_start :
  SDNode<"ISD::CALLSEQ_START", SDT_X86CallSeqStart,
-[SDNPHasChain]>;
+[SDNPHasChain, SDNPOutFlag]>;
 def X86callseq_end :
  SDNode<"ISD::CALLSEQ_END",   SDT_X86CallSeqEnd,
 [SDNPHasChain, SDNPInFlag, SDNPOutFlag]>;



___
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/IA64ISelDAGToDAG.cpp

2006-08-11 Thread Evan Cheng


Changes in directory llvm/lib/Target/IA64:

IA64ISelDAGToDAG.cpp updated: 1.47 -> 1.48
---
Log message:

Match tablegen changes.

---
Diffs of the changes:  (+21 -25)

 IA64ISelDAGToDAG.cpp |   46 +-
 1 files changed, 21 insertions(+), 25 deletions(-)


Index: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp
diff -u llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.47 
llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.48
--- llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.47  Mon Aug  7 17:23:40 2006
+++ llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp   Fri Aug 11 04:07:25 2006
@@ -65,7 +65,7 @@
 
 // Select - Convert the specified operand from a target-independent to a
 // target-specific node if it hasn't already been changed.
-void Select(SDOperand &Result, SDOperand N);
+SDNode *Select(SDOperand &Result, SDOperand N);
 
 SDNode *SelectIntImmediateExpr(SDOperand LHS, SDOperand RHS,
unsigned OCHi, unsigned OCLo,
@@ -296,12 +296,12 @@
 
 // Select - Convert the specified operand from a target-independent to a
 // target-specific node if it hasn't already been changed.
-void IA64DAGToDAGISel::Select(SDOperand &Result, SDOperand Op) {
+SDNode *IA64DAGToDAGISel::Select(SDOperand &Result, SDOperand Op) {
   SDNode *N = Op.Val;
   if (N->getOpcode() >= ISD::BUILTIN_OP_END &&
   N->getOpcode() < IA64ISD::FIRST_NUMBER) {
 Result = Op;
-return;   // Already selected.
+return NULL;   // Already selected.
   }
 
   switch (N->getOpcode()) {
@@ -376,15 +376,14 @@
for (unsigned i = 0, e = CallResults.size(); i != e; ++i)
  ReplaceUses(Op.getValue(i), CallResults[i]);
Result = CallResults[Op.ResNo];
-   return;
+   return NULL;
   }
   
   case IA64ISD::GETFD: {
 SDOperand Input;
 AddToQueue(Input, N->getOperand(0));
 Result = SDOperand(CurDAG->getTargetNode(IA64::GETFD, MVT::i64, Input), 0);
-ReplaceUses(Op, Result);
-return;
+return Result.Val;
   } 
   
   case ISD::FDIV:
@@ -393,8 +392,7 @@
   case ISD::SREM:
   case ISD::UREM:
 Result = SelectDIV(Op);
-ReplaceUses(Op, Result);
-return;
+return Result.Val;
  
   case ISD::TargetConstantFP: {
 SDOperand Chain = CurDAG->getEntryNode(); // this is a constant, so..
@@ -405,20 +403,20 @@
   Result = CurDAG->getCopyFromReg(Chain, IA64::F1, MVT::f64);
 } else
   assert(0 && "Unexpected FP constant!");
-return;
+return Result.Val;
   }
 
   case ISD::FrameIndex: { // TODO: reduce creepyness
 int FI = cast(N)->getIndex();
-if (N->hasOneUse())
+if (N->hasOneUse()) {
   Result = CurDAG->SelectNodeTo(N, IA64::MOV, MVT::i64,
   CurDAG->getTargetFrameIndex(FI, MVT::i64));
-else {
+  return NULL;
+} else {
   Result = SDOperand(CurDAG->getTargetNode(IA64::MOV, MVT::i64,
 CurDAG->getTargetFrameIndex(FI, MVT::i64)), 0);
-  ReplaceUses(Op, Result);
+  return Result.Val;
 }
-return;
   }
 
   case ISD::ConstantPool: { // TODO: nuke the constant pool
@@ -429,8 +427,7 @@
   CP->getAlignment());
 Result = SDOperand(CurDAG->getTargetNode(IA64::ADDL_GA, MVT::i64, // ?
  CurDAG->getRegister(IA64::r1, MVT::i64), CPI), 0);
-ReplaceUses(Op, Result);
-return;
+return Result.Val;
   }
 
   case ISD::GlobalAddress: {
@@ -439,8 +436,7 @@
 SDOperand Tmp = SDOperand(CurDAG->getTargetNode(IA64::ADDL_GA, MVT::i64, 
  CurDAG->getRegister(IA64::r1, MVT::i64), GA), 
0);
 Result = SDOperand(CurDAG->getTargetNode(IA64::LD8, MVT::i64, Tmp), 0);
-ReplaceUses(Op, Result);
-return;
+return Result.Val;
   }
   
 /* XXX  case ISD::ExternalSymbol: {
@@ -475,7 +471,7 @@
 SDOperand(CurDAG->getTargetNode(Opc, MVT::i64, Address), 
0),
   CurDAG->getRegister(IA64::r0, MVT::i64), 
   Chain).getValue(Op.ResNo);
-return;
+return NULL;
   }
   /* otherwise, we want to load a bool into something bigger: LD1
  will do that for us, so we just fall through */
@@ -492,7 +488,7 @@
 // TODO: comment this
 Result = CurDAG->SelectNodeTo(N, Opc, N->getValueType(0), MVT::Other,
 Address, Chain).getValue(Op.ResNo);
-return;
+return NULL;
   }
   
   case ISD::TRUNCSTORE:
@@ -517,7 +513,7 @@
   CurDAG->getConstant(1, MVT::i64),
   Tmp), 0);
 Result = CurDAG->SelectNodeTo(N, Opc, MVT::Other, Address, Tmp, Chain);
-return;
+return NULL;
   }
   case MVT::i64: Opc = IA64::ST8;  break;
   case MVT::f64: Opc = IA64::STF8; break;
@@ -536,7 +532,7 @@
 AddToQueue(N1, N->getOperand(1));
 AddToQueue(N2, N->getOperand(2));
 

[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcInstrInfo.td

2006-08-11 Thread Evan Cheng


Changes in directory llvm/lib/Target/Sparc:

SparcInstrInfo.td updated: 1.124 -> 1.125
---
Log message:

CALLSEQ_* produces chain even if that's not needed.

---
Diffs of the changes:  (+4 -2)

 SparcInstrInfo.td |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)


Index: llvm/lib/Target/Sparc/SparcInstrInfo.td
diff -u llvm/lib/Target/Sparc/SparcInstrInfo.td:1.124 
llvm/lib/Target/Sparc/SparcInstrInfo.td:1.125
--- llvm/lib/Target/Sparc/SparcInstrInfo.td:1.124   Mon May  8 23:58:46 2006
+++ llvm/lib/Target/Sparc/SparcInstrInfo.td Fri Aug 11 04:03:00 2006
@@ -117,8 +117,10 @@
 
 // These are target-independent nodes, but have target-specific formats.
 def SDT_SPCallSeq : SDTypeProfile<0, 1, [ SDTCisVT<0, i32> ]>;
-def callseq_start : SDNode<"ISD::CALLSEQ_START", SDT_SPCallSeq, 
[SDNPHasChain]>;
-def callseq_end   : SDNode<"ISD::CALLSEQ_END",   SDT_SPCallSeq, 
[SDNPHasChain]>;
+def callseq_start : SDNode<"ISD::CALLSEQ_START", SDT_SPCallSeq,
+   [SDNPHasChain, SDNPOutFlag]>;
+def callseq_end   : SDNode<"ISD::CALLSEQ_END",   SDT_SPCallSeq,
+   [SDNPHasChain, SDNPOutFlag]>;
 
 def SDT_SPCall: SDTypeProfile<0, 1, [SDTCisVT<0, i32>]>;
 def call  : SDNode<"SPISD::CALL", SDT_SPCall,



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp

2006-08-11 Thread Evan Cheng


Changes in directory llvm/lib/Target/PowerPC:

PPCISelDAGToDAG.cpp updated: 1.201 -> 1.202
---
Log message:

Match tablegen changes.

---
Diffs of the changes:  (+32 -53)

 PPCISelDAGToDAG.cpp |   85 +++-
 1 files changed, 32 insertions(+), 53 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
diff -u llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.201 
llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.202
--- llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.201   Mon Aug  7 21:23:41 2006
+++ llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Fri Aug 11 04:07:52 2006
@@ -83,7 +83,7 @@
 
 // Select - Convert the specified operand from a target-independent to a
 // target-specific node if it hasn't already been changed.
-void Select(SDOperand &Result, SDOperand Op);
+SDNode *Select(SDOperand &Result, SDOperand Op);
 
 SDNode *SelectBitfieldInsert(SDNode *N);
 
@@ -166,8 +166,8 @@
 
 private:
 SDOperand SelectSETCC(SDOperand Op);
-void MySelect_PPCbctrl(SDOperand &Result, SDOperand N);
-void MySelect_PPCcall(SDOperand &Result, SDOperand N);
+SDNode *MySelect_PPCbctrl(SDOperand &Result, SDOperand N);
+SDNode *MySelect_PPCcall(SDOperand &Result, SDOperand N);
   };
 }
 
@@ -900,23 +900,22 @@
 
 // Select - Convert the specified operand from a target-independent to a
 // target-specific node if it hasn't already been changed.
-void PPCDAGToDAGISel::Select(SDOperand &Result, SDOperand Op) {
+SDNode *PPCDAGToDAGISel::Select(SDOperand &Result, SDOperand Op) {
   SDNode *N = Op.Val;
   if (N->getOpcode() >= ISD::BUILTIN_OP_END &&
   N->getOpcode() < PPCISD::FIRST_NUMBER) {
 Result = Op;
-return;   // Already selected.
+return NULL;   // Already selected.
   }
 
   switch (N->getOpcode()) {
   default: break;
   case ISD::SETCC:
 Result = SelectSETCC(Op);
-return;
+return NULL;
   case PPCISD::GlobalBaseReg:
 Result = getGlobalBaseReg();
-ReplaceUses(Op, Result);
-return;
+return Result.Val;
 
   case ISD::FrameIndex: {
 int FI = cast(N)->getIndex();
@@ -925,13 +924,12 @@
 if (N->hasOneUse()) {
   Result = CurDAG->SelectNodeTo(N, Opc, Op.getValueType(), TFI,
 getSmallIPtrImm(0));
-  return;
+  return NULL;
 }
 Result =
   SDOperand(CurDAG->getTargetNode(Opc, Op.getValueType(), TFI,
   getSmallIPtrImm(0)), 0);
-ReplaceUses(Op, Result);
-return;
+return Result.Val;
   }
 
   case PPCISD::MFCR: {
@@ -943,8 +941,7 @@
N->getOperand(0), InFlag), 0);
 else
   Result = SDOperand(CurDAG->getTargetNode(PPC::MFCR, MVT::i32, InFlag), 
0);
-ReplaceUses(Op, Result);
-return;
+return Result.Val;
   }
 
   case ISD::SDIV: {
@@ -973,7 +970,7 @@
 0);
 Result = CurDAG->SelectNodeTo(N, PPC::NEG, MVT::i32, PT);
   }
-  return;
+  return NULL;
 }
 
 // Other cases are autogenerated.
@@ -992,7 +989,7 @@
   } else if (Imm == 0) {
 // AND X, 0 -> 0, not "rlwinm 32".
 AddToQueue(Result, N->getOperand(1));
-return ;
+return NULL;
   } else {
 AddToQueue(Val, N->getOperand(0));
 isRunOfOnes(Imm, MB, ME);
@@ -1001,7 +998,7 @@
   Result = CurDAG->SelectNodeTo(N, PPC::RLWINM, MVT::i32, Val,
 getI32Imm(SH), getI32Imm(MB),
 getI32Imm(ME));
-  return;
+  return NULL;
 }
 // ISD::OR doesn't get all the bitfield insertion fun.
 // (and (or x, c1), c2) where isRunOfOnes(~(c1^c2)) is a bitfield insert
@@ -1018,8 +1015,7 @@
  Tmp1, Tmp2,
  getI32Imm(0), getI32Imm(MB),
  getI32Imm(ME)), 0);
-ReplaceUses(Op, Result);
-return;
+return Result.Val;
   }
 }
 
@@ -1030,8 +1026,7 @@
 if (N->getValueType(0) == MVT::i32)
   if (SDNode *I = SelectBitfieldInsert(N)) {
 Result = SDOperand(I, 0);
-ReplaceUses(Op, Result);
-return;
+return Result.Val;
   }
   
 // Other cases are autogenerated.
@@ -1045,7 +1040,7 @@
   Result = CurDAG->SelectNodeTo(N, PPC::RLWINM, MVT::i32, 
 Val, getI32Imm(SH), getI32Imm(MB),
 getI32Imm(ME));
-  return;
+  return NULL;
 }
 
 // Other cases are autogenerated.
@@ -1060,7 +1055,7 @@
   Result = CurDAG->SelectNodeTo(N, PPC::RLWINM, MVT::i32, 
 Val, getI32Imm(SH), getI32Imm(MB),
 getI32Imm(ME));
-  return;
+  return NULL;
 }
 
 // Other cases are autogenerated.
@@ -1085,7 +1080,7 @@
   

[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp

2006-08-11 Thread Evan Cheng


Changes in directory llvm/lib/Target/Sparc:

SparcISelDAGToDAG.cpp updated: 1.102 -> 1.103
---
Log message:

Match tablegen changes.

---
Diffs of the changes:  (+6 -6)

 SparcISelDAGToDAG.cpp |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)


Index: llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp
diff -u llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.102 
llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.103
--- llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.102   Mon Aug  7 21:23:41 2006
+++ llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp Fri Aug 11 04:08:15 2006
@@ -966,7 +966,7 @@
   Subtarget(TM.getSubtarget()) {
   }
 
-  void Select(SDOperand &Result, SDOperand Op);
+  SDNode *Select(SDOperand &Result, SDOperand Op);
 
   // Complex Pattern Selectors.
   bool SelectADDRrr(SDOperand N, SDOperand &R1, SDOperand &R2);
@@ -1063,12 +1063,12 @@
   return true;
 }
 
-void SparcDAGToDAGISel::Select(SDOperand &Result, SDOperand Op) {
+SDNode *SparcDAGToDAGISel::Select(SDOperand &Result, SDOperand Op) {
   SDNode *N = Op.Val;
   if (N->getOpcode() >= ISD::BUILTIN_OP_END &&
   N->getOpcode() < SPISD::FIRST_NUMBER) {
 Result = Op;
-return;   // Already selected.
+return NULL;   // Already selected.
   }
 
   switch (N->getOpcode()) {
@@ -1094,7 +1094,7 @@
 // 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;
+return NULL;
   }
   case ISD::MULHU:
   case ISD::MULHS: {
@@ -1107,11 +1107,11 @@
 MulLHS, MulRHS);
 // The high part is in the Y register.
 Result = CurDAG->SelectNodeTo(N, SP::RDY, MVT::i32, SDOperand(Mul, 1));
-return;
+return NULL;
   }
   }
   
-  SelectCode(Result, Op);
+  return SelectCode(Result, Op);
 }
 
 



___
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

2006-08-11 Thread Evan Cheng


Changes in directory llvm/lib/Target/Alpha:

AlphaISelDAGToDAG.cpp updated: 1.49 -> 1.50
---
Log message:

Match tablegen changes.

---
Diffs of the changes:  (+17 -22)

 AlphaISelDAGToDAG.cpp |   39 +--
 1 files changed, 17 insertions(+), 22 deletions(-)


Index: llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp
diff -u llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.49 
llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.50
--- llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.49Mon Aug  7 17:23:20 2006
+++ llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp Fri Aug 11 04:07:02 2006
@@ -110,7 +110,7 @@
 
 // Select - Convert the specified operand from a target-independent to a
 // target-specific node if it hasn't already been changed.
-void Select(SDOperand &Result, SDOperand Op);
+SDNode *Select(SDOperand &Result, SDOperand Op);
 
 /// InstructionSelectBasicBlock - This callback is invoked by
 /// SelectionDAGISel when it has created a SelectionDAG for us to codegen.
@@ -181,35 +181,35 @@
 
 // Select - Convert the specified operand from a target-independent to a
 // target-specific node if it hasn't already been changed.
-void AlphaDAGToDAGISel::Select(SDOperand &Result, SDOperand Op) {
+SDNode *AlphaDAGToDAGISel::Select(SDOperand &Result, SDOperand Op) {
   SDNode *N = Op.Val;
   if (N->getOpcode() >= ISD::BUILTIN_OP_END &&
   N->getOpcode() < AlphaISD::FIRST_NUMBER) {
 Result = Op;
-return;   // Already selected.
+return NULL;   // Already selected.
   }
 
   switch (N->getOpcode()) {
   default: break;
   case AlphaISD::CALL:
 Result = SelectCALL(Op);
-return;
+return NULL;
 
   case ISD::FrameIndex: {
 int FI = cast(N)->getIndex();
 Result = CurDAG->SelectNodeTo(N, Alpha::LDA, MVT::i64,
   CurDAG->getTargetFrameIndex(FI, MVT::i32),
   getI64Imm(0));
-return;
+return NULL;
   }
   case AlphaISD::GlobalBaseReg: 
 Result = getGlobalBaseReg();
 ReplaceUses(Op, Result);
-return;
+return NULL;
   case AlphaISD::GlobalRetAddr:
 Result = getGlobalRetAddr();
 ReplaceUses(Op, Result);
-return;
+return NULL;
   
   case AlphaISD::DivCall: {
 SDOperand Chain = CurDAG->getEntryNode();
@@ -229,7 +229,7 @@
 Chain = CurDAG->getCopyFromReg(Chain, Alpha::R27, MVT::i64, 
  SDOperand(CNode, 1));
 Result = CurDAG->SelectNodeTo(N, Alpha::BIS, MVT::i64, Chain, Chain);
-return;
+return NULL;
   }
 
   case ISD::READCYCLECOUNTER: {
@@ -237,9 +237,7 @@
 AddToQueue(Chain, N->getOperand(0)); //Select chain
 Result = SDOperand(CurDAG->getTargetNode(Alpha::RPCC, MVT::i64, MVT::Other,
  Chain), Op.ResNo);
-ReplaceUses(Op.getValue(0), Result.getValue(0));
-ReplaceUses(Op.getValue(1), Result.getValue(1));
-return;
+return Result.Val;
   }
 
   case ISD::Constant: {
@@ -249,7 +247,7 @@
   Result = CurDAG->getCopyFromReg(CurDAG->getEntryNode(), Alpha::R31,
   MVT::i64);
   ReplaceUses(Op, Result);
-  return;
+  return NULL;
 }
 
 int64_t val = (int64_t)uval;
@@ -270,7 +268,7 @@
 getGlobalBaseReg());
 Result = CurDAG->SelectNodeTo(N, Alpha::LDQr, MVT::i64, MVT::Other, 
   CPI, SDOperand(Tmp, 0), 
CurDAG->getEntryNode());
-return;
+return NULL;
   }
   case ISD::TargetConstantFP: {
 ConstantFPSDNode *CN = cast(N);
@@ -280,12 +278,12 @@
   Result = CurDAG->SelectNodeTo(N, isDouble ? Alpha::CPYST : Alpha::CPYSS,
 T, CurDAG->getRegister(Alpha::F31, T),
 CurDAG->getRegister(Alpha::F31, T));
-  return;
+  return NULL;
 } 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;
+  return NULL;
 } else {
   abort();
 }
@@ -335,8 +333,7 @@
   Result = SDOperand(CurDAG->getTargetNode(Alpha::CMPULT, MVT::i64, 
CurDAG->getRegister(Alpha::R31, 
MVT::i64),
LD), 0);
-  ReplaceUses(Op, Result);
-  return;
+  return Result.Val;
 }
 break;
 
@@ -369,8 +366,7 @@
   }
   Result = 
SDOperand(CurDAG->getTargetNode(isDouble?Alpha::FCMOVNET:Alpha::FCMOVNES,
MVT::f64, FV, TV, LD), 0);
-  ReplaceUses(Op, Result);
-  return;
+  return Result.Val;
 }
 break;
 
@@ -401,8 +397,7 @@
getI64Imm(get_zapImm(mask))), 0);
  Result = SDOperand(CurDAG->getTa

[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstrInfo.td

2006-08-11 Thread Evan Cheng


Changes in directory llvm/lib/Target/PowerPC:

PPCInstrInfo.td updated: 1.240 -> 1.241
---
Log message:

CALLSEQ_* produces chain even if that's not needed.

---
Diffs of the changes:  (+4 -2)

 PPCInstrInfo.td |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td
diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.240 
llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.241
--- llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.240   Wed Jul 19 12:15:36 2006
+++ llvm/lib/Target/PowerPC/PPCInstrInfo.td Fri Aug 11 04:02:24 2006
@@ -75,8 +75,10 @@
 def PPCstd_32 : SDNode<"PPCISD::STD_32", SDTStore, [SDNPHasChain]>;
 
 // These are target-independent nodes, but have target-specific formats.
-def callseq_start : SDNode<"ISD::CALLSEQ_START", 
SDT_PPCCallSeq,[SDNPHasChain]>;
-def callseq_end   : SDNode<"ISD::CALLSEQ_END",   
SDT_PPCCallSeq,[SDNPHasChain]>;
+def callseq_start : SDNode<"ISD::CALLSEQ_START", SDT_PPCCallSeq,
+   [SDNPHasChain, SDNPOutFlag]>;
+def callseq_end   : SDNode<"ISD::CALLSEQ_END",   SDT_PPCCallSeq,
+   [SDNPHasChain, SDNPOutFlag]>;
 
 def SDT_PPCCall   : SDTypeProfile<0, -1, [SDTCisInt<0>]>;
 def PPCcall   : SDNode<"PPCISD::CALL", SDT_PPCCall,



___
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/ARMISelDAGToDAG.cpp

2006-08-11 Thread Evan Cheng


Changes in directory llvm/lib/Target/ARM:

ARMISelDAGToDAG.cpp updated: 1.25 -> 1.26
---
Log message:

Match tablegen changes.

---
Diffs of the changes:  (+4 -3)

 ARMISelDAGToDAG.cpp |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)


Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.25 
llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.26
--- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.25Wed Aug  9 11:41:12 2006
+++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Fri Aug 11 04:06:36 2006
@@ -317,7 +317,7 @@
 : SelectionDAGISel(Lowering), Lowering(TM) {
   }
 
-  void Select(SDOperand &Result, SDOperand Op);
+  SDNode *Select(SDOperand &Result, SDOperand Op);
   virtual void InstructionSelectBasicBlock(SelectionDAG &DAG);
   bool SelectAddrRegImm(SDOperand N, SDOperand &Offset, SDOperand &Base);
 
@@ -346,14 +346,15 @@
   return true;  //any address fits in a register
 }
 
-void ARMDAGToDAGISel::Select(SDOperand &Result, SDOperand Op) {
+SDNode *ARMDAGToDAGISel::Select(SDOperand &Result, SDOperand Op) {
   SDNode *N = Op.Val;
 
   switch (N->getOpcode()) {
   default:
-SelectCode(Result, Op);
+return SelectCode(Result, Op);
 break;
   }
+  return NULL;
 }
 
 }  // end anonymous namespace



___
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 X86ISelLowering.cpp

2006-08-11 Thread Evan Cheng


Changes in directory llvm/lib/Target/X86:

X86ISelDAGToDAG.cpp updated: 1.90 -> 1.91
X86ISelLowering.cpp updated: 1.243 -> 1.244
---
Log message:

Match tablegen changes.

---
Diffs of the changes:  (+38 -20)

 X86ISelDAGToDAG.cpp |   26 ++
 X86ISelLowering.cpp |   32 
 2 files changed, 38 insertions(+), 20 deletions(-)


Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.90 
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.91
--- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.90Mon Aug  7 19:31:00 2006
+++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Fri Aug 11 04:05:03 2006
@@ -123,7 +123,7 @@
 #include "X86GenDAGISel.inc"
 
   private:
-void Select(SDOperand &Result, SDOperand N);
+SDNode *Select(SDOperand &Result, SDOperand N);
 
 bool MatchAddress(SDOperand N, X86ISelAddressMode &AM, bool isRoot = true);
 bool SelectAddr(SDOperand N, SDOperand &Base, SDOperand &Scale,
@@ -646,7 +646,7 @@
   return FindCallStartFromCall(Node->getOperand(0).Val);
 }
 
-void X86DAGToDAGISel::Select(SDOperand &Result, SDOperand N) {
+SDNode *X86DAGToDAGISel::Select(SDOperand &Result, SDOperand N) {
   SDNode *Node = N.Val;
   MVT::ValueType NVT = Node->getValueType(0);
   unsigned Opc, MOpc;
@@ -669,15 +669,14 @@
 DEBUG(std::cerr << "\n");
 Indent -= 2;
 #endif
-return;   // Already selected.
+return NULL;   // Already selected.
   }
 
   switch (Opcode) {
 default: break;
 case X86ISD::GlobalBaseReg: 
   Result = getGlobalBaseReg();
-  ReplaceUses(N, Result);
-  return;
+  return Result.Val;
 
 case ISD::ADD: {
   // Turn ADD X, c to MOV32ri X+c. This cannot be done with tblgen'd
@@ -705,12 +704,12 @@
 if (C.Val) {
   if (N.Val->hasOneUse()) {
 Result = CurDAG->SelectNodeTo(N.Val, X86::MOV32ri, MVT::i32, C);
+   return NULL;
   } else {
 SDNode *ResNode = CurDAG->getTargetNode(X86::MOV32ri, MVT::i32, C);
 Result = SDOperand(ResNode, 0);
-ReplaceUses(N, Result);
+   return ResNode;
   }
-  return;
 }
   }
 
@@ -798,7 +797,7 @@
   DEBUG(std::cerr << "\n");
   Indent -= 2;
 #endif
-  return;
+  return NULL;
 }
   
 case ISD::SDIV:
@@ -902,7 +901,8 @@
   DEBUG(std::cerr << "\n");
   Indent -= 2;
 #endif
-  return;
+
+  return NULL;
 }
 
 case ISD::TRUNCATE: {
@@ -927,7 +927,6 @@
 AddToQueue(Tmp0, Node->getOperand(0));
 Tmp1 = SDOperand(CurDAG->getTargetNode(Opc, VT, Tmp0), 0);
 Result = SDOperand(CurDAG->getTargetNode(Opc2, NVT, Tmp1), 0);
-ReplaceUses(N, Result);
   
 #ifndef NDEBUG
 DEBUG(std::cerr << std::string(Indent-2, ' '));
@@ -936,14 +935,15 @@
 DEBUG(std::cerr << "\n");
 Indent -= 2;
 #endif
-return;
+return Result.Val;
   }
 
   break;
 }
   }
 
-  SelectCode(Result, N);
+  SDNode *ResNode = SelectCode(Result, N);
+
 #ifndef NDEBUG
   DEBUG(std::cerr << std::string(Indent-2, ' '));
   DEBUG(std::cerr << "=> ");
@@ -951,6 +951,8 @@
   DEBUG(std::cerr << "\n");
   Indent -= 2;
 #endif
+
+  return ResNode;
 }
 
 bool X86DAGToDAGISel::


Index: llvm/lib/Target/X86/X86ISelLowering.cpp
diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.243 
llvm/lib/Target/X86/X86ISelLowering.cpp:1.244
--- llvm/lib/Target/X86/X86ISelLowering.cpp:1.243   Fri Aug 11 02:35:45 2006
+++ llvm/lib/Target/X86/X86ISelLowering.cpp Fri Aug 11 04:05:03 2006
@@ -2992,9 +2992,14 @@
   }
   Constant *CS = ConstantStruct::get(CV);
   SDOperand CPIdx = DAG.getConstantPool(CS, getPointerTy(), 4);
-  SDOperand Mask 
-= DAG.getNode(X86ISD::LOAD_PACK,
-  VT, DAG.getEntryNode(), CPIdx, DAG.getSrcValue(NULL));
+  std::vector Tys;
+  Tys.push_back(VT);
+  Tys.push_back(MVT::Other);
+  SmallVector Ops;
+  Ops.push_back(DAG.getEntryNode());
+  Ops.push_back(CPIdx);
+  Ops.push_back(DAG.getSrcValue(NULL));
+  SDOperand Mask = DAG.getNode(X86ISD::LOAD_PACK, Tys, &Ops[0], Ops.size());
   return DAG.getNode(X86ISD::FAND, VT, Op.getOperand(0), Mask);
 }
 
@@ -3013,8 +3018,14 @@
   }
   Constant *CS = ConstantStruct::get(CV);
   SDOperand CPIdx = DAG.getConstantPool(CS, getPointerTy(), 4);
-  SDOperand Mask  = DAG.getNode(X86ISD::LOAD_PACK,
-  VT, DAG.getEntryNode(), CPIdx, 
DAG.getSrcValue(NULL));
+  std::vector Tys;
+  Tys.push_back(VT);
+  Tys.push_back(MVT::Other);
+  SmallVector Ops;
+  Ops.push_back(DAG.getEntryNode());
+  Ops.push_back(CPIdx);
+  Ops.push_back(DAG.getSrcValue(NULL));
+  SDOperand Mask = DAG.getNode(X86ISD::LOAD_PACK, Tys, &Ops[0], Ops.size());
   return DAG.getNode(X86ISD::FXOR, VT, Op.getOperand(0), Mask);
 }
 
@@ -4121,10 +4132,15 @@
Base->getOperand(2));
   else {
 // Just use movups, it's shorter.
+std::vector Tys;
+Tys.push_back(MVT::v4f32);
+

[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaInstrInfo.td

2006-08-11 Thread Evan Cheng


Changes in directory llvm/lib/Target/Alpha:

AlphaInstrInfo.td updated: 1.122 -> 1.123
---
Log message:

CALLSEQ_* produces chain even if that's not needed.

---
Diffs of the changes:  (+4 -2)

 AlphaInstrInfo.td |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)


Index: llvm/lib/Target/Alpha/AlphaInstrInfo.td
diff -u llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.122 
llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.123
--- llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.122   Mon Jul 31 13:42:49 2006
+++ llvm/lib/Target/Alpha/AlphaInstrInfo.td Fri Aug 11 04:01:43 2006
@@ -33,8 +33,10 @@
 
 // These are target-independent nodes, but have target-specific formats.
 def SDT_AlphaCallSeq : SDTypeProfile<0, 1, [ SDTCisVT<0, i64> ]>;
-def callseq_start : SDNode<"ISD::CALLSEQ_START", 
SDT_AlphaCallSeq,[SDNPHasChain]>;
-def callseq_end   : SDNode<"ISD::CALLSEQ_END",   
SDT_AlphaCallSeq,[SDNPHasChain]>;
+def callseq_start : SDNode<"ISD::CALLSEQ_START", SDT_AlphaCallSeq,
+  [SDNPHasChain, SDNPOutFlag]>;
+def callseq_end   : SDNode<"ISD::CALLSEQ_END",   SDT_AlphaCallSeq,
+   [SDNPHasChain, SDNPOutFlag]>;
 
 //
 //Paterns for matching



___
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/ARMInstrInfo.td

2006-08-11 Thread Evan Cheng


Changes in directory llvm/lib/Target/ARM:

ARMInstrInfo.td updated: 1.13 -> 1.14
---
Log message:

CALLSEQ_* produces chain even if that's not needed.

---
Diffs of the changes:  (+4 -2)

 ARMInstrInfo.td |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)


Index: llvm/lib/Target/ARM/ARMInstrInfo.td
diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.13 
llvm/lib/Target/ARM/ARMInstrInfo.td:1.14
--- llvm/lib/Target/ARM/ARMInstrInfo.td:1.13Tue Aug  8 15:35:03 2006
+++ llvm/lib/Target/ARM/ARMInstrInfo.td Fri Aug 11 04:01:08 2006
@@ -38,8 +38,10 @@
 }
 
 def SDT_ARMCallSeq : SDTypeProfile<0, 1, [ SDTCisVT<0, i32> ]>;
-def callseq_start  : SDNode<"ISD::CALLSEQ_START", SDT_ARMCallSeq, 
[SDNPHasChain]>;
-def callseq_end: SDNode<"ISD::CALLSEQ_END",   SDT_ARMCallSeq, 
[SDNPHasChain]>;
+def callseq_start  : SDNode<"ISD::CALLSEQ_START", SDT_ARMCallSeq,
+[SDNPHasChain, SDNPOutFlag]>;
+def callseq_end: SDNode<"ISD::CALLSEQ_END",   SDT_ARMCallSeq,
+[SDNPHasChain, SDNPOutFlag]>;
 
 def SDT_ARMcall: SDTypeProfile<0, -1, [SDTCisInt<0>]>;
 def ARMcall: SDNode<"ARMISD::CALL", SDT_ARMcall,



___
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

2006-08-11 Thread Evan Cheng


Changes in directory llvm/utils/TableGen:

DAGISelEmitter.cpp updated: 1.240 -> 1.241
---
Log message:

- Prevent some functions from being inlined to eliminate the code size bloat
  introduced by previous commit.
- SelectCode now returns a SDNode*. If it is not null, the selected node
  produces the same number of results as the input node. The seletion loop
  is responsible for calling ReplaceAllUsesWith() to replace the input node
  with the output target node. For other cases, e.g. when load is folded,
  the selection code is responsible for calling ReplaceAllUsesOfValueWith()
  and SelectCode returns NULL.
- Other clean ups.


---
Diffs of the changes:  (+96 -67)

 DAGISelEmitter.cpp |  163 +++--
 1 files changed, 96 insertions(+), 67 deletions(-)


Index: llvm/utils/TableGen/DAGISelEmitter.cpp
diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.240 
llvm/utils/TableGen/DAGISelEmitter.cpp:1.241
--- llvm/utils/TableGen/DAGISelEmitter.cpp:1.240Wed Aug  9 11:44:44 2006
+++ llvm/utils/TableGen/DAGISelEmitter.cpp  Fri Aug 11 03:59:35 2006
@@ -2397,7 +2397,7 @@
   /// EmitResultCode - Emit the action for a pattern.  Now that it has matched
   /// we actually have to build a DAG!
   std::pair
-  EmitResultCode(TreePatternNode *N, bool LikeLeaf = false,
+  EmitResultCode(TreePatternNode *N, bool &RetSelected, bool LikeLeaf = false,
  bool isRoot = false) {
 // This is something selected from the pattern we matched.
 if (!N->getName().empty()) {
@@ -2489,7 +2489,7 @@
   if (isRoot && N->isLeaf()) {
 emitCode("ReplaceUses(N, Tmp" + utostr(ResNo) + ");");
 emitCode("Result = Tmp" + utostr(ResNo) + ";");
-emitCode("return;");
+emitCode("return NULL;");
   }
 }
   }
@@ -2590,7 +2590,8 @@
   for (unsigned i = 0, e = EmitOrder.size(); i != e; ++i) {
 unsigned OpOrder   = EmitOrder[i].first;
 TreePatternNode *Child = EmitOrder[i].second;
-std::pair NumTemp =  EmitResultCode(Child);
+std::pair NumTemp = 
+  EmitResultCode(Child, RetSelected);
 NumTemps[OpOrder] = NumTemp;
   }
 
@@ -2703,10 +2704,7 @@
 if (!isRoot)
   return std::make_pair(1, ResNo);
 
-for (unsigned i = 0; i < NumResults; i++)
-  emitCode("ReplaceUses(SDOperand(N.Val, " +
-   utostr(i) + "), SDOperand(ResNode, " + utostr(i) + "));");
-
+bool NeedReplace = false;
 if (NodeHasOutFlag)
   emitCode("InFlag = SDOperand(ResNode, " + 
utostr(NumResults + (unsigned)NodeHasChain) + ");");
@@ -2716,11 +2714,6 @@
   NumResults = 1;
 }
 
-if (InputHasChain)
-  emitCode("ReplaceUses(SDOperand(N.Val, " + 
-   utostr(PatResults) + "), SDOperand(" + ChainName + ".Val, " 
+
-   ChainName + ".ResNo" + "));");
-
 if (FoldedChains.size() > 0) {
   std::string Code;
   for (unsigned j = 0, e = FoldedChains.size(); j < e; j++)
@@ -2728,37 +2721,64 @@
  FoldedChains[j].first + ".Val, " + 
  utostr(FoldedChains[j].second) + "), SDOperand(ResNode, " 
+
  utostr(NumResults) + "));");
+  NeedReplace = true;
 }
 
-if (NodeHasOutFlag)
+if (NodeHasOutFlag) {
   emitCode("ReplaceUses(SDOperand(N.Val, " +
utostr(PatResults + (unsigned)InputHasChain) +"), 
InFlag);");
+  NeedReplace = true;
+}
+
+if (NeedReplace) {
+  for (unsigned i = 0; i < NumResults; i++)
+emitCode("ReplaceUses(SDOperand(N.Val, " +
+ utostr(i) + "), SDOperand(ResNode, " + utostr(i) + "));");
+  if (InputHasChain)
+emitCode("ReplaceUses(SDOperand(N.Val, " + 
+ utostr(PatResults) + "), SDOperand(" + ChainName + ".Val, 
" +
+ ChainName + ".ResNo" + "));");
+} else {
+  RetSelected = true;
+}
 
 // User does not expect the instruction would produce a chain!
-bool AddedChain = NodeHasChain && !InputHasChain;
-if (AddedChain && NodeHasOutFlag) {
+if ((!InputHasChain && NodeHasChain) && NodeHasOutFlag) {
   if (PatResults == 0) {
 emitCode("Result = SDOperand(ResNode, N.ResNo+1);");
   } else {
-emitCode("if (N.ResNo < " + utostr(PatResults) + ")");
-emitCode("  Result = SDOperand(ResNode, N.ResNo);");
-emitCode("else");
-emitCode("  Result = SDOperand(ResNode, N.ResNo+1);");
+   assert(PatResults == 1);
+emitCode("Result = (N.ResNo == 0) ? SDOperand(ResNode, 0) :"
+" SDOperand(ResNode, 1);");
   }
 } else if (InputHasChain && !NodeHasChain) {
   // One of the inner node produces a chain.
-  

[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp

2006-08-11 Thread Evan Cheng


Changes in directory llvm/lib/Target/X86:

X86ISelLowering.cpp updated: 1.242 -> 1.243
---
Log message:

Convert more calls of getNode() that takes a vector to pass in the start of an 
array.

---
Diffs of the changes:  (+14 -13)

 X86ISelLowering.cpp |   27 ++-
 1 files changed, 14 insertions(+), 13 deletions(-)


Index: llvm/lib/Target/X86/X86ISelLowering.cpp
diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.242 
llvm/lib/Target/X86/X86ISelLowering.cpp:1.243
--- llvm/lib/Target/X86/X86ISelLowering.cpp:1.242   Mon Aug  7 21:23:41 2006
+++ llvm/lib/Target/X86/X86ISelLowering.cpp Fri Aug 11 02:35:45 2006
@@ -2970,7 +2970,7 @@
   Ops.push_back(Chain);
   Ops.push_back(Value);
   Ops.push_back(StackSlot);
-  SDOperand FIST = DAG.getNode(Opc, MVT::Other, Ops);
+  SDOperand FIST = DAG.getNode(Opc, MVT::Other, &Ops[0], Ops.size());
 
   // Load the result.
   return DAG.getLoad(Op.getValueType(), FIST, StackSlot,
@@ -3126,7 +3126,7 @@
   Ops.push_back(Op.getOperand(1));
   Ops.push_back(CC);
   Ops.push_back(Cond);
-  return DAG.getNode(X86ISD::CMOV, Tys, Ops);
+  return DAG.getNode(X86ISD::CMOV, Tys, &Ops[0], Ops.size());
 }
 
 SDOperand X86TargetLowering::LowerBRCOND(SDOperand Op, SelectionDAG &DAG) {
@@ -3154,7 +3154,7 @@
 std::vector Ops;
 for (unsigned i = 0; i < Cond.getNumOperands(); ++i)
   Ops.push_back(Cond.getOperand(i));
-Cond = DAG.getNode(X86ISD::SETCC, Tys, Ops);
+Cond = DAG.getNode(X86ISD::SETCC, Tys, &Ops[0], Ops.size());
   }
 
   CC   = Cond.getOperand(0);
@@ -3236,7 +3236,7 @@
 std::vector Ops;
 Ops.push_back(Op.getOperand(0));
 Ops.push_back(Op.getOperand(1));
-Copy = DAG.getNode(X86ISD::FP_SET_RESULT, Tys, Ops);
+Copy = DAG.getNode(X86ISD::FP_SET_RESULT, Tys, &Ops[0], Ops.size());
   } else {
 // FP return with ScalarSSE (return on fp-stack).
 if (DAG.getMachineFunction().liveout_empty())
@@ -3266,14 +3266,14 @@
 Ops.push_back(Chain);
 Ops.push_back(MemLoc);
 Ops.push_back(DAG.getValueType(ArgVT));
-Copy = DAG.getNode(X86ISD::FLD, Tys, Ops);
+Copy = DAG.getNode(X86ISD::FLD, Tys, &Ops[0], Ops.size());
 Tys.clear();
 Tys.push_back(MVT::Other);
 Tys.push_back(MVT::Flag);
 Ops.clear();
 Ops.push_back(Copy.getValue(1));
 Ops.push_back(Copy);
-Copy = DAG.getNode(X86ISD::FP_SET_RESULT, Tys, Ops);
+Copy = DAG.getNode(X86ISD::FP_SET_RESULT, Tys, &Ops[0], Ops.size());
   }
   break;
 }
@@ -3396,7 +3396,7 @@
   Ops.push_back(Chain);
   Ops.push_back(DAG.getValueType(AVT));
   Ops.push_back(InFlag);
-  Chain  = DAG.getNode(X86ISD::REP_STOS, Tys, Ops);
+  Chain  = DAG.getNode(X86ISD::REP_STOS, Tys, &Ops[0], Ops.size());
 
   if (TwoRepStos) {
 InFlag = Chain.getValue(1);
@@ -3413,7 +3413,7 @@
 Ops.push_back(Chain);
 Ops.push_back(DAG.getValueType(MVT::i8));
 Ops.push_back(InFlag);
-Chain  = DAG.getNode(X86ISD::REP_STOS, Tys, Ops);
+Chain  = DAG.getNode(X86ISD::REP_STOS, Tys, &Ops[0], Ops.size());
   } else if (BytesLeft) {
 // Issue stores for the last 1 - 3 bytes.
 SDOperand Value;
@@ -3508,7 +3508,7 @@
   Ops.push_back(Chain);
   Ops.push_back(DAG.getValueType(AVT));
   Ops.push_back(InFlag);
-  Chain = DAG.getNode(X86ISD::REP_MOVS, Tys, Ops);
+  Chain = DAG.getNode(X86ISD::REP_MOVS, Tys, &Ops[0], Ops.size());
 
   if (TwoRepMovs) {
 InFlag = Chain.getValue(1);
@@ -3525,7 +3525,7 @@
 Ops.push_back(Chain);
 Ops.push_back(DAG.getValueType(MVT::i8));
 Ops.push_back(InFlag);
-Chain = DAG.getNode(X86ISD::REP_MOVS, Tys, Ops);
+Chain = DAG.getNode(X86ISD::REP_MOVS, Tys, &Ops[0], Ops.size());
   } else if (BytesLeft) {
 // Issue loads and stores for the last 1 - 3 bytes.
 unsigned Offset = I->getValue() - BytesLeft;
@@ -3571,7 +3571,7 @@
   Tys.push_back(MVT::Flag);
   std::vector Ops;
   Ops.push_back(Op.getOperand(0));
-  SDOperand rd = DAG.getNode(X86ISD::RDTSC_DAG, Tys, Ops);
+  SDOperand rd = DAG.getNode(X86ISD::RDTSC_DAG, Tys, &Ops[0], Ops.size());
   Ops.clear();
   Ops.push_back(DAG.getCopyFromReg(rd, X86::EAX, MVT::i32, rd.getValue(1)));
   Ops.push_back(DAG.getCopyFromReg(Ops[0].getValue(1), X86::EDX, 
@@ -3579,7 +3579,7 @@
   Ops.push_back(Ops[1].getValue(1));
   Tys[0] = Tys[1] = MVT::i32;
   Tys.push_back(MVT::Other);
-  return DAG.getNode(ISD::MERGE_VALUES, Tys, Ops);
+  return DAG.getNode(ISD::MERGE_VALUES, Tys, &Ops[0], Ops.size());
 }
 
 SDOperand X86TargetLowering::LowerVASTART(SDOperand Op, SelectionDAG &DAG) {
@@ -4119,12 +4119,13 @@
   if (isAlign16)
 return DAG.getLoad(VT, Base->getOperand(0), Base->getOperand(1),
Base->getOperand(2));
-  else
+  else {
 // Just use movups, it's shorter.
 return DAG.getNode(ISD::BIT_CONVERT, VT,
DAG.getNode(X86ISD::LOAD_UA, MVT::v4f32,
Base->ge

[llvm-commits] CVS: llvm-www/developers.txt

2006-08-11 Thread Owen Anderson


Changes in directory llvm-www:

developers.txt updated: 1.7 -> 1.8
---
Log message:

Add myself to the developers page.


---
Diffs of the changes:  (+1 -0)

 developers.txt |1 +
 1 files changed, 1 insertion(+)


Index: llvm-www/developers.txt
diff -u llvm-www/developers.txt:1.7 llvm-www/developers.txt:1.8
--- llvm-www/developers.txt:1.7 Thu Aug 10 17:15:53 2006
+++ llvm-www/developers.txt Fri Aug 11 02:21:36 2006
@@ -1,4 +1,5 @@
 Vikram Advehref=http://www-sal.cs.uiuc.edu/~vadve/ img=PhotoVikram.jpg 
width=120   height=120  alt=vadve
+Owen   Andersonhref=http://www.silentcentre.net/   
img=PhotoOwen.jpg   width=154   height=175  alt=Resistor
 Henrik Bachhref=mailto:[EMAIL PROTECTED]   img=PhotoHenrik.jpg 
width=156   height=178  alt=Henrik
 Nate   Begeman href=http://sampo.lasthome.net/ img=PhotoNate.jpg   
width=160   height=130  alt=Sampo
 RobBocchino href=http://llvm.cs.uiuc.edu/~bocchino img=PhotoRob.jpg
width=140   height=187  alt=Rob



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm-www/img/PhotoOwen.jpg

2006-08-11 Thread Owen Anderson


Changes in directory llvm-www/img:

PhotoOwen.jpg added (r1.1)
---
Log message:

Add myself to the developers page.


---
Diffs of the changes:  (+0 -0)

 PhotoOwen.jpg |0 
 1 files changed


Index: llvm-www/img/PhotoOwen.jpg



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits