[llvm-commits] CVS: llvm/include/llvm/System/MappedFile.h

2006-08-27 Thread Chris Lattner


Changes in directory llvm/include/llvm/System:

MappedFile.h updated: 1.12 - 1.13
---
Log message:

make optional pointer really optional


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

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


Index: llvm/include/llvm/System/MappedFile.h
diff -u llvm/include/llvm/System/MappedFile.h:1.12 
llvm/include/llvm/System/MappedFile.h:1.13
--- llvm/include/llvm/System/MappedFile.h:1.12  Fri Aug 25 16:37:17 2006
+++ llvm/include/llvm/System/MappedFile.h   Sun Aug 27 02:11:54 2006
@@ -123,7 +123,7 @@
 /// occurred.
 /// @brief Map the file into memory.
 void* map(
-  std::string* ErrMsg /// Optional error string pointer
+  std::string* ErrMsg = 0/// Optional error string pointer
 );
 
 /// This method causes the size of the file, and consequently the size



___
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-27 Thread Evan Cheng


Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAG.cpp updated: 1.334 - 1.335
---
Log message:

Eliminate SelectNodeTo() and getTargetNode() variants which take more than
3 SDOperand operands. They are replaced by versions which take an array
of SDOperand and the number of operands.


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

 SelectionDAG.cpp |  266 ++-
 1 files changed, 12 insertions(+), 254 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.334 
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.335
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.334Sat Aug 26 
02:56:00 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp  Sun Aug 27 03:08:54 2006
@@ -1908,93 +1908,13 @@
 }
 
 SDNode *SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
-   MVT::ValueType VT, SDOperand Op1,
-   SDOperand Op2, SDOperand Op3,
-   SDOperand Op4) {
+   MVT::ValueType VT, const SDOperand *Ops,
+   unsigned NumOps) {
   // If an identical node already exists, use it.
   SDVTList VTs = getVTList(VT);
   SelectionDAGCSEMap::NodeID ID(ISD::BUILTIN_OP_END+TargetOpc, VTs);
-  ID.AddOperand(Op1);
-  ID.AddOperand(Op2);
-  ID.AddOperand(Op3);
-  ID.AddOperand(Op4);
-  void *IP = 0;
-  if (SDNode *ON = CSEMap.FindNodeOrInsertPos(ID, IP))
-return ON;
-  
-  RemoveNodeFromCSEMaps(N);
-  N-MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc);
-  N-setValueTypes(VTs);
-  N-setOperands(Op1, Op2, Op3, Op4);
-
-  CSEMap.InsertNode(N, IP);   // Memoize the new node.
-  return N;
-}
-
-SDNode *SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
-   MVT::ValueType VT, SDOperand Op1,
-   SDOperand Op2, SDOperand Op3,
-   SDOperand Op4, SDOperand Op5) {
-  SDVTList VTs = getVTList(VT);
-  SelectionDAGCSEMap::NodeID ID(ISD::BUILTIN_OP_END+TargetOpc, VTs);
-  ID.AddOperand(Op1);
-  ID.AddOperand(Op2);
-  ID.AddOperand(Op3);
-  ID.AddOperand(Op4);
-  ID.AddOperand(Op5);
-  void *IP = 0;
-  if (SDNode *ON = CSEMap.FindNodeOrInsertPos(ID, IP))
-return ON;
-   
-  RemoveNodeFromCSEMaps(N);
-  N-MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc);
-  N-setValueTypes(VTs);
-  N-setOperands(Op1, Op2, Op3, Op4, Op5);
-  
-  CSEMap.InsertNode(N, IP);   // Memoize the new node.
-  return N;
-}
-
-SDNode *SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
-   MVT::ValueType VT, SDOperand Op1,
-   SDOperand Op2, SDOperand Op3, SDOperand Op4,
-   SDOperand Op5, SDOperand Op6) {
-  SDVTList VTs = getVTList(VT);
-  SelectionDAGCSEMap::NodeID ID(ISD::BUILTIN_OP_END+TargetOpc, VTs);
-  ID.AddOperand(Op1);
-  ID.AddOperand(Op2);
-  ID.AddOperand(Op3);
-  ID.AddOperand(Op4);
-  ID.AddOperand(Op5);
-  ID.AddOperand(Op6);
-  void *IP = 0;
-  if (SDNode *ON = CSEMap.FindNodeOrInsertPos(ID, IP))
-return ON;
-   
-  RemoveNodeFromCSEMaps(N);
-  N-MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc);
-  N-setValueTypes(VTs);
-  N-setOperands(Op1, Op2, Op3, Op4, Op5, Op6);
-  
-  CSEMap.InsertNode(N, IP);   // Memoize the new node.
-  return N;
-}
-
-SDNode *SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
-   MVT::ValueType VT, SDOperand Op1,
-   SDOperand Op2, SDOperand Op3,SDOperand Op4,
-   SDOperand Op5, SDOperand Op6,
-   SDOperand Op7) {
-  SDVTList VTs = getVTList(VT);
-  // If an identical node already exists, use it.
-  SelectionDAGCSEMap::NodeID ID(ISD::BUILTIN_OP_END+TargetOpc, VTs);
-  ID.AddOperand(Op1);
-  ID.AddOperand(Op2);
-  ID.AddOperand(Op3);
-  ID.AddOperand(Op4);
-  ID.AddOperand(Op5);
-  ID.AddOperand(Op6);
-  ID.AddOperand(Op7);
+  for (unsigned i = 0; i != NumOps; ++i)
+ID.AddOperand(Ops[i]);
   void *IP = 0;
   if (SDNode *ON = CSEMap.FindNodeOrInsertPos(ID, IP))
 return ON;
@@ -2002,35 +1922,7 @@
   RemoveNodeFromCSEMaps(N);
   N-MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc);
   N-setValueTypes(VTs);
-  N-setOperands(Op1, Op2, Op3, Op4, Op5, Op6, Op7);
-  
-  CSEMap.InsertNode(N, IP);   // Memoize the new node.
-  return N;
-}
-SDNode *SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
-   MVT::ValueType VT, SDOperand Op1,
-   SDOperand Op2, SDOperand Op3,SDOperand Op4,
-   SDOperand Op5, SDOperand Op6,
-   SDOperand Op7, SDOperand Op8) {
-  // If an identical node already exists, use it.
-  SDVTList 

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

2006-08-27 Thread Evan Cheng


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAG.h updated: 1.126 - 1.127
SelectionDAGNodes.h updated: 1.143 - 1.144
---
Log message:

Eliminate SelectNodeTo() and getTargetNode() variants which take more than
3 SDOperand operands. They are replaced by versions which take an array
of SDOperand and the number of operands.


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

 SelectionDAG.h  |   76 
 SelectionDAGNodes.h |   82 +---
 2 files changed, 16 insertions(+), 142 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAG.h
diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.126 
llvm/include/llvm/CodeGen/SelectionDAG.h:1.127
--- llvm/include/llvm/CodeGen/SelectionDAG.h:1.126  Sat Aug 26 02:55:35 2006
+++ llvm/include/llvm/CodeGen/SelectionDAG.hSun Aug 27 03:07:55 2006
@@ -311,34 +311,14 @@
SDOperand Op1, SDOperand Op2);
   SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT, 
SDOperand Op1, SDOperand Op2, SDOperand Op3);
-  SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT, 
-   SDOperand Op1, SDOperand Op2, SDOperand Op3, 
-   SDOperand Op4);
-  SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT, 
-   SDOperand Op1, SDOperand Op2, SDOperand Op3,
-   SDOperand Op4, SDOperand Op5);
-  SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT, 
-   SDOperand Op1, SDOperand Op2, SDOperand Op3, 
-   SDOperand Op4, SDOperand Op5, SDOperand Op6);
-  SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT, 
-   SDOperand Op1, SDOperand Op2, SDOperand Op3,
-   SDOperand Op4, SDOperand Op5, SDOperand Op6,
-   SDOperand Op7);
-  SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT, 
-   SDOperand Op1, SDOperand Op2, SDOperand Op3,
-   SDOperand Op4, SDOperand Op5, SDOperand Op6,
-   SDOperand Op7, SDOperand Op8);
+  SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT,
+const SDOperand *Ops, unsigned NumOps);
   SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT1, 
MVT::ValueType VT2, SDOperand Op1, SDOperand Op2);
   SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT1,
MVT::ValueType VT2, SDOperand Op1, SDOperand Op2,
SDOperand Op3);
-  SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT1,
-   MVT::ValueType VT2, SDOperand Op1, SDOperand Op2,
-   SDOperand Op3, SDOperand Op4);
-  SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT1,
-   MVT::ValueType VT2, SDOperand Op1, SDOperand Op2,
-   SDOperand Op3, SDOperand Op4, SDOperand Op5);
+
 
   /// getTargetNode - These are used for target selectors to create a new node
   /// with specified return type(s), target opcode, and operands.
@@ -354,23 +334,6 @@
   SDNode *getTargetNode(unsigned Opcode, MVT::ValueType VT,
 SDOperand Op1, SDOperand Op2, SDOperand Op3);
   SDNode *getTargetNode(unsigned Opcode, MVT::ValueType VT,
-SDOperand Op1, SDOperand Op2, SDOperand Op3,
-SDOperand Op4);
-  SDNode *getTargetNode(unsigned Opcode, MVT::ValueType VT,
-SDOperand Op1, SDOperand Op2, SDOperand Op3,
-SDOperand Op4, SDOperand Op5);
-  SDNode *getTargetNode(unsigned Opcode, MVT::ValueType VT,
-SDOperand Op1, SDOperand Op2, SDOperand Op3,
-SDOperand Op4, SDOperand Op5, SDOperand Op6);
-  SDNode *getTargetNode(unsigned Opcode, MVT::ValueType VT,
-SDOperand Op1, SDOperand Op2, SDOperand Op3,
-SDOperand Op4, SDOperand Op5, SDOperand Op6,
-SDOperand Op7);
-  SDNode *getTargetNode(unsigned Opcode, MVT::ValueType VT,
-SDOperand Op1, SDOperand Op2, SDOperand Op3,
-SDOperand Op4, SDOperand Op5, SDOperand Op6,
-SDOperand Op7, SDOperand Op8);
-  SDNode *getTargetNode(unsigned Opcode, MVT::ValueType VT,
 const SDOperand *Ops, unsigned NumOps);
   SDNode *getTargetNode(unsigned Opcode, MVT::ValueType VT1,
 MVT::ValueType VT2, SDOperand Op1);
@@ -379,39 +342,14 @@
   SDNode *getTargetNode(unsigned Opcode, MVT::ValueType VT1,
 MVT::ValueType VT2, SDOperand Op1, SDOperand Op2,
 SDOperand Op3);
-  SDNode *getTargetNode(unsigned Opcode, 

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

2006-08-27 Thread Evan Cheng


Changes in directory llvm/lib/Target/X86:

X86ISelDAGToDAG.cpp updated: 1.96 - 1.97
---
Log message:

Do not use getTargetNode() and SelectNodeTo() which takes more than 3
SDOperand arguments. Use the variants which take an array and number instead.


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

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


Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.96 
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.97
--- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.96Sat Aug 26 03:00:10 2006
+++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Sun Aug 27 03:14:06 2006
@@ -723,9 +723,9 @@
 AddToISelQueue(Tmp1);
 AddToISelQueue(Tmp2);
 AddToISelQueue(Tmp3);
+SDOperand Ops[] = { Tmp0, Tmp1, Tmp2, Tmp3, Chain, InFlag };
 SDNode *CNode =
-  CurDAG-getTargetNode(MOpc, MVT::Other, MVT::Flag, Tmp0, Tmp1,
-Tmp2, Tmp3, Chain, InFlag);
+  CurDAG-getTargetNode(MOpc, MVT::Other, MVT::Flag, Ops, 6);
 Chain  = SDOperand(CNode, 0);
 InFlag = SDOperand(CNode, 1);
   } else {
@@ -827,9 +827,9 @@
 AddToISelQueue(Tmp1);
 AddToISelQueue(Tmp2);
 AddToISelQueue(Tmp3);
+SDOperand Ops[] = { Tmp0, Tmp1, Tmp2, Tmp3, Chain, InFlag };
 SDNode *CNode =
-  CurDAG-getTargetNode(MOpc, MVT::Other, MVT::Flag, Tmp0, Tmp1,
-Tmp2, Tmp3, Chain, InFlag);
+  CurDAG-getTargetNode(MOpc, MVT::Other, MVT::Flag, Ops, 6);
 Chain  = SDOperand(CNode, 0);
 InFlag = SDOperand(CNode, 1);
   } else {



___
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-27 Thread Evan Cheng


Changes in directory llvm/lib/Target/PowerPC:

PPCISelDAGToDAG.cpp updated: 1.206 - 1.207
---
Log message:

Do not use getTargetNode() and SelectNodeTo() which takes more than 3
SDOperand arguments. Use the variants which take an array and number instead.


---
Diffs of the changes:  (+41 -43)

 PPCISelDAGToDAG.cpp |   84 +---
 1 files changed, 41 insertions(+), 43 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
diff -u llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.206 
llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.207
--- llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.206   Sat Aug 26 02:58:11 2006
+++ llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Sun Aug 27 03:13:45 2006
@@ -457,8 +457,9 @@
   AddToISelQueue(Tmp3);
   AddToISelQueue(Op1);
   SH = 31;
-  return CurDAG-getTargetNode(PPC::RLWIMI, MVT::i32, Tmp3, Op1,
-   getI32Imm(SH), getI32Imm(MB), 
getI32Imm(ME));
+  SDOperand Ops[] = { Tmp3, Op1, getI32Imm(SH), getI32Imm(MB),
+  getI32Imm(ME) };
+  return CurDAG-getTargetNode(PPC::RLWIMI, MVT::i32, Ops, 5);
 }
   }
   return 0;
@@ -809,10 +810,11 @@
   AddToISelQueue(Op);
   switch (CC) {
   default: break;
-  case ISD::SETEQ:
+  case ISD::SETEQ: {
 Op = SDOperand(CurDAG-getTargetNode(PPC::CNTLZW, MVT::i32, Op), 0);
-return CurDAG-SelectNodeTo(N, PPC::RLWINM, MVT::i32, Op, 
getI32Imm(27),
-getI32Imm(5), getI32Imm(31));
+SDOperand Ops[] = { Op, getI32Imm(27), getI32Imm(5), getI32Imm(31) };
+return CurDAG-SelectNodeTo(N, PPC::RLWINM, MVT::i32, Ops, 4);
+  }
   case ISD::SETNE: {
 SDOperand AD =
   SDOperand(CurDAG-getTargetNode(PPC::ADDIC, MVT::i32, MVT::Flag,
@@ -820,15 +822,16 @@
 return CurDAG-SelectNodeTo(N, PPC::SUBFE, MVT::i32, AD, Op, 
 AD.getValue(1));
   }
-  case ISD::SETLT:
-return CurDAG-SelectNodeTo(N, PPC::RLWINM, MVT::i32, Op, getI32Imm(1),
-getI32Imm(31), getI32Imm(31));
+  case ISD::SETLT: {
+SDOperand Ops[] = { Op, getI32Imm(1), getI32Imm(31), getI32Imm(31) };
+return CurDAG-SelectNodeTo(N, PPC::RLWINM, MVT::i32, Ops, 4);
+  }
   case ISD::SETGT: {
 SDOperand T =
   SDOperand(CurDAG-getTargetNode(PPC::NEG, MVT::i32, Op), 0);
 T = SDOperand(CurDAG-getTargetNode(PPC::ANDC, MVT::i32, T, Op), 0);
-return CurDAG-SelectNodeTo(N, PPC::RLWINM, MVT::i32, T, getI32Imm(1),
-getI32Imm(31), getI32Imm(31));
+SDOperand Ops[] = { T, getI32Imm(1), getI32Imm(31), getI32Imm(31) };
+return CurDAG-SelectNodeTo(N, PPC::RLWINM, MVT::i32, Ops, 4);
   }
   }
 } else if (Imm == ~0U) {// setcc op, -1
@@ -855,16 +858,16 @@
getI32Imm(1)), 0);
 SDOperand AN = SDOperand(CurDAG-getTargetNode(PPC::AND, MVT::i32, AD,
Op), 0);
-return CurDAG-SelectNodeTo(N, PPC::RLWINM, MVT::i32, AN, getI32Imm(1),
-getI32Imm(31), getI32Imm(31));
+SDOperand Ops[] = { AN, getI32Imm(1), getI32Imm(31), getI32Imm(31) };
+return CurDAG-SelectNodeTo(N, PPC::RLWINM, MVT::i32, Ops, 4);
   }
-  case ISD::SETGT:
-Op = SDOperand(CurDAG-getTargetNode(PPC::RLWINM, MVT::i32, Op,
- getI32Imm(1), getI32Imm(31),
- getI32Imm(31)), 0);
+  case ISD::SETGT: {
+SDOperand Ops[] = { Op, getI32Imm(1), getI32Imm(31), getI32Imm(31) };
+Op = SDOperand(CurDAG-getTargetNode(PPC::RLWINM, MVT::i32, Ops, 4), 
0);
 return CurDAG-SelectNodeTo(N, PPC::XORI, MVT::i32, Op, 
 getI32Imm(1));
   }
+  }
 }
   }
   
@@ -886,15 +889,13 @@
   else
 IntCR = SDOperand(CurDAG-getTargetNode(PPC::MFCR, MVT::i32, CCReg), 0);
   
+  SDOperand Ops[] = { IntCR, getI32Imm((32-(3-Idx))  31),
+  getI32Imm(31), getI32Imm(31) };
   if (!Inv) {
-return CurDAG-SelectNodeTo(N, PPC::RLWINM, MVT::i32, IntCR,
-getI32Imm((32-(3-Idx))  31),
-getI32Imm(31), getI32Imm(31));
+return CurDAG-SelectNodeTo(N, PPC::RLWINM, MVT::i32, Ops, 4);
   } else {
 SDOperand Tmp =
-  SDOperand(CurDAG-getTargetNode(PPC::RLWINM, MVT::i32, IntCR,
-  getI32Imm((32-(3-Idx))  31),
-  getI32Imm(31),getI32Imm(31)), 0);
+  SDOperand(CurDAG-getTargetNode(PPC::RLWINM, MVT::i32, Ops, 4), 0);
 return CurDAG-SelectNodeTo(N, PPC::XORI, MVT::i32, Tmp, getI32Imm(1));
   }
 }
@@ -990,9 +991,8 @@
 isRunOfOnes(Imm, MB, 

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

2006-08-27 Thread Chris Lattner


Changes in directory llvm/include/llvm/Support:

Compiler.h added (r1.1)
---
Log message:

New place to put compiler-specific functionality.  This replaces Visibility.h,
and provides macros that can be used to make explicit instantiations of
template specializations, which is a gcc-specific feature.


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

 Compiler.h |   40 
 1 files changed, 40 insertions(+)


Index: llvm/include/llvm/Support/Compiler.h
diff -c /dev/null llvm/include/llvm/Support/Compiler.h:1.1
*** /dev/null   Sun Aug 27 07:42:56 2006
--- llvm/include/llvm/Support/Compiler.hSun Aug 27 07:42:45 2006
***
*** 0 
--- 1,40 
+ //===-- llvm/Support/Compiler.h - Compiler abstraction support --*- C++ 
-*-===//
+ //
+ // The LLVM Compiler Infrastructure
+ //
+ // This file was developed by Chris Lattner and is distributed under
+ // the University of Illinois Open Source License. See LICENSE.TXT for 
details.
+ //
+ 
//===--===//
+ //
+ // This file defines several macros, based on the current compiler.  This 
allows
+ // use of compiler-specific features in a way that remains portable.
+ //
+ 
//===--===//
+ 
+ #ifndef LLVM_SUPPORT_COMPILER_H
+ #define LLVM_SUPPORT_COMPILER_H
+ 
+ // The VISIBILITY_HIDDEN macro, used for marking classes with the GCC-specific
+ // visibility(hidden) attribute.
+ #if __GNUC__ = 4
+ #define VISIBILITY_HIDDEN __attribute__ ((visibility(hidden)))
+ #else
+ #define VISIBILITY_HIDDEN
+ #endif
+ 
+ 
+ // C++ doesn't support 'extern template' of template specializations.  GCC 
does,
+ // but requires __extension__ before it.  In the header, use this:
+ //   EXTERN_TEMPLATE_INSTANTIATION(class foobar);
+ // in the .cpp file, use this:
+ //   TEMPLATE_INSTANTIATION(class foobar);
+ #ifdef __GNUC__
+ #define EXTERN_TEMPLATE_INSTANTIATION(X) __extension__ extern template X
+ #define TEMPLATE_INSTANTIATION(X) template X
+ #else
+ #define EXTERN_TEMPLATE_INSTANTIATION(X)
+ #define TEMPLATE_INSTANTIATION(X)
+ #endif
+ 
+ #endif



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

2006-08-27 Thread Chris Lattner


Changes in directory llvm/include/llvm/Support:

CommandLine.h updated: 1.55 - 1.56
---
Log message:

Add external definitions for commonly-used template specializations and add
anchor methods to others.  This eliminates the vtable/template method bloat
in .o files that defining a cl::opt used to impose (~4K per .o file for one
cp::optunsigned).


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

 CommandLine.h |   39 +--
 1 files changed, 37 insertions(+), 2 deletions(-)


Index: llvm/include/llvm/Support/CommandLine.h
diff -u llvm/include/llvm/Support/CommandLine.h:1.55 
llvm/include/llvm/Support/CommandLine.h:1.56
--- llvm/include/llvm/Support/CommandLine.h:1.55Tue Jul 18 18:59:33 2006
+++ llvm/include/llvm/Support/CommandLine.h Sun Aug 27 07:45:46 2006
@@ -22,6 +22,7 @@
 
 #include llvm/Support/type_traits.h
 #include llvm/Support/DataTypes.h
+#include llvm/Support/Compiler.h
 #include string
 #include vector
 #include utility
@@ -509,6 +510,9 @@
 
   // getValueName - Overload in subclass to provide a better default value.
   virtual const char *getValueName() const { return value; }
+
+  // An out-of-line virtual method to provide a 'home' for this class.
+  virtual void anchor();
 };
 
 // basic_parser - The real basic parser is just a template wrapper that 
provides
@@ -519,7 +523,6 @@
   typedef DataType parser_data_type;
 };
 
-
 //--
 // parserbool
 //
@@ -533,10 +536,15 @@
 return ValueOptional;
   }
 
-  // getValueName - Do not print =value at all
+  // getValueName - Do not print =value at all.
   virtual const char *getValueName() const { return 0; }
+  
+  // An out-of-line virtual method to provide a 'home' for this class.
+  virtual void anchor();
 };
 
+EXTERN_TEMPLATE_INSTANTIATION(class basic_parserbool);
+
 
 //--
 // parserint
@@ -549,8 +557,13 @@
 
   // getValueName - Overload in subclass to provide a better default value.
   virtual const char *getValueName() const { return int; }
+
+  // An out-of-line virtual method to provide a 'home' for this class.
+  virtual void anchor();
 };
 
+EXTERN_TEMPLATE_INSTANTIATION(class basic_parserint);
+
 
 //--
 // parserunsigned
@@ -563,8 +576,12 @@
 
   // getValueName - Overload in subclass to provide a better default value.
   virtual const char *getValueName() const { return uint; }
+
+  // An out-of-line virtual method to provide a 'home' for this class.
+  virtual void anchor();
 };
 
+EXTERN_TEMPLATE_INSTANTIATION(class basic_parserunsigned);
 
 //--
 // parserdouble
@@ -577,8 +594,12 @@
 
   // getValueName - Overload in subclass to provide a better default value.
   virtual const char *getValueName() const { return number; }
+
+  // An out-of-line virtual method to provide a 'home' for this class.
+  virtual void anchor();
 };
 
+EXTERN_TEMPLATE_INSTANTIATION(class basic_parserdouble);
 
 //--
 // parserfloat
@@ -591,8 +612,12 @@
 
   // getValueName - Overload in subclass to provide a better default value.
   virtual const char *getValueName() const { return number; }
+
+  // An out-of-line virtual method to provide a 'home' for this class.
+  virtual void anchor();
 };
 
+EXTERN_TEMPLATE_INSTANTIATION(class basic_parserfloat);
 
 //--
 // parserstd::string
@@ -609,8 +634,13 @@
 
   // getValueName - Overload in subclass to provide a better default value.
   virtual const char *getValueName() const { return string; }
+
+  // An out-of-line virtual method to provide a 'home' for this class.
+  virtual void anchor();
 };
 
+EXTERN_TEMPLATE_INSTANTIATION(class basic_parserstd::string);
+
 
//===--===//
 // applicator class - This class is used because we must use partial
 // specialization to handle literal string arguments specially (const char* 
does
@@ -845,6 +875,11 @@
   }
 };
 
+EXTERN_TEMPLATE_INSTANTIATION(class optunsigned);
+EXTERN_TEMPLATE_INSTANTIATION(class optint);
+EXTERN_TEMPLATE_INSTANTIATION(class optstd::string);
+EXTERN_TEMPLATE_INSTANTIATION(class optbool);
+
 
//===--===//
 // list_storage class
 



___
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/PPCAsmPrinter.cpp PPCBranchSelector.cpp PPCCodeEmitter.cpp PPCISelDAGToDAG.cpp PPCMachOWriter.cpp

2006-08-27 Thread Chris Lattner


Changes in directory llvm/lib/Target/PowerPC:

PPCAsmPrinter.cpp updated: 1.191 - 1.192
PPCBranchSelector.cpp updated: 1.27 - 1.28
PPCCodeEmitter.cpp updated: 1.66 - 1.67
PPCISelDAGToDAG.cpp updated: 1.207 - 1.208
PPCMachOWriter.cpp updated: 1.1 - 1.2
---
Log message:

s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|



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

 PPCAsmPrinter.cpp |2 +-
 PPCBranchSelector.cpp |2 +-
 PPCCodeEmitter.cpp|2 +-
 PPCISelDAGToDAG.cpp   |2 +-
 PPCMachOWriter.cpp|2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.191 
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.192
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.191 Fri Aug 25 16:54:44 2006
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp   Sun Aug 27 07:54:01 2006
@@ -33,7 +33,7 @@
 #include llvm/Support/MathExtras.h
 #include llvm/Support/CommandLine.h
 #include llvm/Support/Debug.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 #include llvm/Target/MRegisterInfo.h
 #include llvm/Target/TargetInstrInfo.h
 #include llvm/Target/TargetOptions.h


Index: llvm/lib/Target/PowerPC/PPCBranchSelector.cpp
diff -u llvm/lib/Target/PowerPC/PPCBranchSelector.cpp:1.27 
llvm/lib/Target/PowerPC/PPCBranchSelector.cpp:1.28
--- llvm/lib/Target/PowerPC/PPCBranchSelector.cpp:1.27  Fri Aug 25 18:29:06 2006
+++ llvm/lib/Target/PowerPC/PPCBranchSelector.cpp   Sun Aug 27 07:54:01 2006
@@ -19,7 +19,7 @@
 #include PPCInstrBuilder.h
 #include PPCInstrInfo.h
 #include llvm/CodeGen/MachineFunctionPass.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 #include map
 using namespace llvm;
 


Index: llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp
diff -u llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.66 
llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.67
--- llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.66 Wed Aug 23 16:08:52 2006
+++ llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp  Sun Aug 27 07:54:01 2006
@@ -22,7 +22,7 @@
 #include llvm/CodeGen/MachineInstrBuilder.h
 #include llvm/CodeGen/Passes.h
 #include llvm/Support/Debug.h   
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 #include llvm/Target/TargetOptions.h
 #include iostream
 using namespace llvm;


Index: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
diff -u llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.207 
llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.208
--- llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.207   Sun Aug 27 03:13:45 2006
+++ llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Sun Aug 27 07:54:01 2006
@@ -28,7 +28,7 @@
 #include llvm/Intrinsics.h
 #include llvm/Support/Debug.h
 #include llvm/Support/MathExtras.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 #include iostream
 #include queue
 #include set


Index: llvm/lib/Target/PowerPC/PPCMachOWriter.cpp
diff -u llvm/lib/Target/PowerPC/PPCMachOWriter.cpp:1.1 
llvm/lib/Target/PowerPC/PPCMachOWriter.cpp:1.2
--- llvm/lib/Target/PowerPC/PPCMachOWriter.cpp:1.1  Wed Aug 23 16:08:52 2006
+++ llvm/lib/Target/PowerPC/PPCMachOWriter.cpp  Sun Aug 27 07:54:01 2006
@@ -15,7 +15,7 @@
 #include PPCTargetMachine.h
 #include llvm/PassManager.h
 #include llvm/CodeGen/MachOWriter.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 using namespace llvm;
 
 namespace {



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

2006-08-27 Thread Chris Lattner


Changes in directory llvm/include/llvm/Support:

Visibility.h (r1.1) removed
---
Log message:

s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|



---
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/CodeGen/SelectionDAG/DAGCombiner.cpp LegalizeDAG.cpp ScheduleDAGList.cpp ScheduleDAGRRList.cpp ScheduleDAGSimple.cpp SelectionDAGISel.cpp

2006-08-27 Thread Chris Lattner


Changes in directory llvm/lib/CodeGen/SelectionDAG:

DAGCombiner.cpp updated: 1.182 - 1.183
LegalizeDAG.cpp updated: 1.388 - 1.389
ScheduleDAGList.cpp updated: 1.66 - 1.67
ScheduleDAGRRList.cpp updated: 1.13 - 1.14
ScheduleDAGSimple.cpp updated: 1.17 - 1.18
SelectionDAGISel.cpp updated: 1.270 - 1.271
---
Log message:

s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|



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

 DAGCombiner.cpp   |2 +-
 LegalizeDAG.cpp   |2 +-
 ScheduleDAGList.cpp   |2 +-
 ScheduleDAGRRList.cpp |2 +-
 ScheduleDAGSimple.cpp |2 +-
 SelectionDAGISel.cpp  |2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.182 
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.183
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.182 Fri Aug 11 12:56:38 2006
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp   Sun Aug 27 07:54:01 2006
@@ -35,7 +35,7 @@
 #include llvm/Support/Debug.h
 #include llvm/Support/MathExtras.h
 #include llvm/Target/TargetLowering.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 #include algorithm
 #include cmath
 #include iostream


Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.388 
llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.389
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.388 Mon Aug 21 15:24:53 2006
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp   Sun Aug 27 07:54:01 2006
@@ -21,7 +21,7 @@
 #include llvm/Constants.h
 #include llvm/Support/MathExtras.h
 #include llvm/Support/CommandLine.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 #include llvm/ADT/SmallVector.h
 #include iostream
 #include map


Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp:1.66 
llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp:1.67
--- llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp:1.66  Wed Aug 16 
19:09:56 2006
+++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp   Sun Aug 27 07:54:01 2006
@@ -28,7 +28,7 @@
 #include llvm/Target/TargetMachine.h
 #include llvm/Target/TargetInstrInfo.h
 #include llvm/Support/Debug.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 #include llvm/ADT/Statistic.h
 #include climits
 #include iostream


Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.13 
llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.14
--- llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.13Wed Aug 16 
19:09:56 2006
+++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Sun Aug 27 07:54:01 2006
@@ -24,7 +24,7 @@
 #include llvm/Target/TargetMachine.h
 #include llvm/Target/TargetInstrInfo.h
 #include llvm/Support/Debug.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 #include llvm/ADT/Statistic.h
 #include climits
 #include iostream


Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp:1.17 
llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp:1.18
--- llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp:1.17Thu Aug  3 
15:51:06 2006
+++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp Sun Aug 27 07:54:01 2006
@@ -23,7 +23,7 @@
 #include llvm/Target/TargetMachine.h
 #include llvm/Target/TargetInstrInfo.h
 #include llvm/Support/Debug.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 #include algorithm
 #include iostream
 using namespace llvm;


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.270 
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.271
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.270Wed Aug 16 
17:57:46 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp  Sun Aug 27 07:54:01 2006
@@ -42,7 +42,7 @@
 #include llvm/Transforms/Utils/BasicBlockUtils.h
 #include llvm/Support/MathExtras.h
 #include llvm/Support/Debug.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 #include map
 #include set
 #include iostream



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


[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp LoopStrengthReduce.cpp LowerGC.cpp ScalarReplAggregates.cpp

2006-08-27 Thread Chris Lattner


Changes in directory llvm/lib/Transforms/Scalar:

InstructionCombining.cpp updated: 1.499 - 1.500
LoopStrengthReduce.cpp updated: 1.87 - 1.88
LowerGC.cpp updated: 1.11 - 1.12
ScalarReplAggregates.cpp updated: 1.40 - 1.41
---
Log message:

s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|



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

 InstructionCombining.cpp |2 +-
 LoopStrengthReduce.cpp   |2 +-
 LowerGC.cpp  |2 +-
 ScalarReplAggregates.cpp |2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)


Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.499 
llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.500
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.499   Tue Jul 11 
13:31:26 2006
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Sun Aug 27 07:54:01 2006
@@ -48,7 +48,7 @@
 #include llvm/Support/InstVisitor.h
 #include llvm/Support/MathExtras.h
 #include llvm/Support/PatternMatch.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 #include llvm/ADT/Statistic.h
 #include llvm/ADT/STLExtras.h
 #include algorithm


Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.87 
llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.88
--- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.87  Thu Aug  3 
01:34:50 2006
+++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp   Sun Aug 27 07:54:01 2006
@@ -31,7 +31,7 @@
 #include llvm/Target/TargetData.h
 #include llvm/ADT/Statistic.h
 #include llvm/Support/Debug.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 #include llvm/Target/TargetLowering.h
 #include algorithm
 #include iostream


Index: llvm/lib/Transforms/Scalar/LowerGC.cpp
diff -u llvm/lib/Transforms/Scalar/LowerGC.cpp:1.11 
llvm/lib/Transforms/Scalar/LowerGC.cpp:1.12
--- llvm/lib/Transforms/Scalar/LowerGC.cpp:1.11 Wed Jun 28 17:08:15 2006
+++ llvm/lib/Transforms/Scalar/LowerGC.cpp  Sun Aug 27 07:54:01 2006
@@ -26,7 +26,7 @@
 #include llvm/Instructions.h
 #include llvm/Module.h
 #include llvm/Pass.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 using namespace llvm;
 
 namespace {


Index: llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
diff -u llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.40 
llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.41
--- llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.40Wed Jun 28 
18:17:24 2006
+++ llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp Sun Aug 27 07:54:01 2006
@@ -31,7 +31,7 @@
 #include llvm/Support/Debug.h
 #include llvm/Support/GetElementPtrTypeIterator.h
 #include llvm/Support/MathExtras.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 #include llvm/ADT/Statistic.h
 #include llvm/ADT/StringExtras.h
 #include iostream



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


[llvm-commits] CVS: llvm/lib/VMCore/BasicBlock.cpp ConstantFolding.cpp Constants.cpp LeakDetector.cpp Type.cpp Verifier.cpp

2006-08-27 Thread Chris Lattner


Changes in directory llvm/lib/VMCore:

BasicBlock.cpp updated: 1.72 - 1.73
ConstantFolding.cpp updated: 1.89 - 1.90
Constants.cpp updated: 1.158 - 1.159
LeakDetector.cpp updated: 1.14 - 1.15
Type.cpp updated: 1.143 - 1.144
Verifier.cpp updated: 1.160 - 1.161
---
Log message:

s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|



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

 BasicBlock.cpp  |2 +-
 ConstantFolding.cpp |2 +-
 Constants.cpp   |2 +-
 LeakDetector.cpp|2 +-
 Type.cpp|2 +-
 Verifier.cpp|2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)


Index: llvm/lib/VMCore/BasicBlock.cpp
diff -u llvm/lib/VMCore/BasicBlock.cpp:1.72 llvm/lib/VMCore/BasicBlock.cpp:1.73
--- llvm/lib/VMCore/BasicBlock.cpp:1.72 Wed Jun 28 17:57:00 2006
+++ llvm/lib/VMCore/BasicBlock.cpp  Sun Aug 27 07:54:02 2006
@@ -17,7 +17,7 @@
 #include llvm/Type.h
 #include llvm/Support/CFG.h
 #include llvm/Support/LeakDetector.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 #include SymbolTableListTraitsImpl.h
 #include algorithm
 using namespace llvm;


Index: llvm/lib/VMCore/ConstantFolding.cpp
diff -u llvm/lib/VMCore/ConstantFolding.cpp:1.89 
llvm/lib/VMCore/ConstantFolding.cpp:1.90
--- llvm/lib/VMCore/ConstantFolding.cpp:1.89Wed Jun 28 16:38:54 2006
+++ llvm/lib/VMCore/ConstantFolding.cpp Sun Aug 27 07:54:02 2006
@@ -25,7 +25,7 @@
 #include llvm/Function.h
 #include llvm/Support/GetElementPtrTypeIterator.h
 #include llvm/Support/MathExtras.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 #include limits
 #include cmath
 using namespace llvm;


Index: llvm/lib/VMCore/Constants.cpp
diff -u llvm/lib/VMCore/Constants.cpp:1.158 llvm/lib/VMCore/Constants.cpp:1.159
--- llvm/lib/VMCore/Constants.cpp:1.158 Mon Jul 17 12:38:29 2006
+++ llvm/lib/VMCore/Constants.cpp   Sun Aug 27 07:54:02 2006
@@ -20,7 +20,7 @@
 #include llvm/Module.h
 #include llvm/ADT/StringExtras.h
 #include llvm/Support/MathExtras.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 #include algorithm
 #include iostream
 using namespace llvm;


Index: llvm/lib/VMCore/LeakDetector.cpp
diff -u llvm/lib/VMCore/LeakDetector.cpp:1.14 
llvm/lib/VMCore/LeakDetector.cpp:1.15
--- llvm/lib/VMCore/LeakDetector.cpp:1.14   Wed Jun 28 17:57:00 2006
+++ llvm/lib/VMCore/LeakDetector.cppSun Aug 27 07:54:02 2006
@@ -12,7 +12,7 @@
 
//===--===//
 
 #include llvm/Support/LeakDetector.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 #include llvm/Value.h
 #include iostream
 #include set


Index: llvm/lib/VMCore/Type.cpp
diff -u llvm/lib/VMCore/Type.cpp:1.143 llvm/lib/VMCore/Type.cpp:1.144
--- llvm/lib/VMCore/Type.cpp:1.143  Wed Jul 26 04:59:01 2006
+++ llvm/lib/VMCore/Type.cppSun Aug 27 07:54:02 2006
@@ -20,7 +20,7 @@
 #include llvm/ADT/SCCIterator.h
 #include llvm/ADT/STLExtras.h
 #include llvm/Support/MathExtras.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 #include algorithm
 #include iostream
 using namespace llvm;


Index: llvm/lib/VMCore/Verifier.cpp
diff -u llvm/lib/VMCore/Verifier.cpp:1.160 llvm/lib/VMCore/Verifier.cpp:1.161
--- llvm/lib/VMCore/Verifier.cpp:1.160  Wed Jul 26 11:18:00 2006
+++ llvm/lib/VMCore/Verifier.cppSun Aug 27 07:54:02 2006
@@ -57,7 +57,7 @@
 #include llvm/Support/InstVisitor.h
 #include llvm/ADT/StringExtras.h
 #include llvm/ADT/STLExtras.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 #include algorithm
 #include iostream
 #include sstream



___
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/X86CodeEmitter.cpp X86ELFWriter.cpp X86FloatingPoint.cpp X86ISelDAGToDAG.cpp

2006-08-27 Thread Chris Lattner


Changes in directory llvm/lib/Target/X86:

X86CodeEmitter.cpp updated: 1.113 - 1.114
X86ELFWriter.cpp updated: 1.5 - 1.6
X86FloatingPoint.cpp updated: 1.52 - 1.53
X86ISelDAGToDAG.cpp updated: 1.97 - 1.98
---
Log message:

s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|



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

 X86CodeEmitter.cpp   |2 +-
 X86ELFWriter.cpp |2 +-
 X86FloatingPoint.cpp |2 +-
 X86ISelDAGToDAG.cpp  |2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)


Index: llvm/lib/Target/X86/X86CodeEmitter.cpp
diff -u llvm/lib/Target/X86/X86CodeEmitter.cpp:1.113 
llvm/lib/Target/X86/X86CodeEmitter.cpp:1.114
--- llvm/lib/Target/X86/X86CodeEmitter.cpp:1.113Fri Aug 25 19:47:03 2006
+++ llvm/lib/Target/X86/X86CodeEmitter.cpp  Sun Aug 27 07:54:01 2006
@@ -22,7 +22,7 @@
 #include llvm/CodeGen/Passes.h
 #include llvm/Function.h
 #include llvm/ADT/Statistic.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 #include llvm/Target/TargetOptions.h
 #include iostream
 using namespace llvm;


Index: llvm/lib/Target/X86/X86ELFWriter.cpp
diff -u llvm/lib/Target/X86/X86ELFWriter.cpp:1.5 
llvm/lib/Target/X86/X86ELFWriter.cpp:1.6
--- llvm/lib/Target/X86/X86ELFWriter.cpp:1.5Tue Jul 25 15:40:54 2006
+++ llvm/lib/Target/X86/X86ELFWriter.cppSun Aug 27 07:54:01 2006
@@ -16,7 +16,7 @@
 #include X86TargetMachine.h
 #include llvm/PassManager.h
 #include llvm/CodeGen/ELFWriter.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 using namespace llvm;
 
 namespace {


Index: llvm/lib/Target/X86/X86FloatingPoint.cpp
diff -u llvm/lib/Target/X86/X86FloatingPoint.cpp:1.52 
llvm/lib/Target/X86/X86FloatingPoint.cpp:1.53
--- llvm/lib/Target/X86/X86FloatingPoint.cpp:1.52   Wed Jul 19 14:33:08 2006
+++ llvm/lib/Target/X86/X86FloatingPoint.cppSun Aug 27 07:54:01 2006
@@ -38,7 +38,7 @@
 #include llvm/Target/TargetInstrInfo.h
 #include llvm/Target/TargetMachine.h
 #include llvm/Support/Debug.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 #include llvm/ADT/DepthFirstIterator.h
 #include llvm/ADT/Statistic.h
 #include llvm/ADT/STLExtras.h


Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.97 
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.98
--- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.97Sun Aug 27 03:14:06 2006
+++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Sun Aug 27 07:54:01 2006
@@ -31,7 +31,7 @@
 #include llvm/CodeGen/SelectionDAGISel.h
 #include llvm/Target/TargetMachine.h
 #include llvm/Support/Debug.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 #include llvm/ADT/Statistic.h
 #include deque
 #include iostream



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


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

2006-08-27 Thread Chris Lattner


Changes in directory llvm/lib/Analysis:

BasicAliasAnalysis.cpp updated: 1.82 - 1.83
ScalarEvolution.cpp updated: 1.49 - 1.50
---
Log message:

s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|



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

 BasicAliasAnalysis.cpp |2 +-
 ScalarEvolution.cpp|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp
diff -u llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.82 
llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.83
--- llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.82   Wed Jun 28 18:17:23 2006
+++ llvm/lib/Analysis/BasicAliasAnalysis.cppSun Aug 27 07:54:01 2006
@@ -23,7 +23,7 @@
 #include llvm/Pass.h
 #include llvm/Target/TargetData.h
 #include llvm/Support/GetElementPtrTypeIterator.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 #include algorithm
 using namespace llvm;
 


Index: llvm/lib/Analysis/ScalarEvolution.cpp
diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.49 
llvm/lib/Analysis/ScalarEvolution.cpp:1.50
--- llvm/lib/Analysis/ScalarEvolution.cpp:1.49  Wed Jun 28 18:17:23 2006
+++ llvm/lib/Analysis/ScalarEvolution.cpp   Sun Aug 27 07:54:01 2006
@@ -72,7 +72,7 @@
 #include llvm/Support/CommandLine.h
 #include llvm/Support/ConstantRange.h
 #include llvm/Support/InstIterator.h
-#include llvm/Support/Visibility.h
+#include llvm/Support/Compiler.h
 #include llvm/ADT/Statistic.h
 #include cmath
 #include iostream



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

2006-08-27 Thread Chris Lattner


Changes in directory llvm/include/llvm/Support:

Compiler.h updated: 1.1 - 1.2
---
Log message:

add directive to disable inlining


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

 Compiler.h |8 
 1 files changed, 8 insertions(+)


Index: llvm/include/llvm/Support/Compiler.h
diff -u llvm/include/llvm/Support/Compiler.h:1.1 
llvm/include/llvm/Support/Compiler.h:1.2
--- llvm/include/llvm/Support/Compiler.h:1.1Sun Aug 27 07:42:45 2006
+++ llvm/include/llvm/Support/Compiler.hSun Aug 27 08:16:05 2006
@@ -37,4 +37,12 @@
 #define TEMPLATE_INSTANTIATION(X)
 #endif
 
+// DISABLE_INLINE - On compilers where we have a directive to do so, mark a
+// method not for inlining.
+#if (__GNUC__  3 || (__GNUC__ == 3  __GNUC_MINOR__ = 4))
+#define DISABLE_INLINE __attribute__((noinline))
+#else
+#define DISABLE_INLINE
+#endif
+
 #endif



___
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-27 Thread Chris Lattner


Changes in directory llvm/utils/TableGen:

DAGISelEmitter.cpp updated: 1.252 - 1.253
---
Log message:

Use compiler.h instead of hand rolling our own macro


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

 DAGISelEmitter.cpp |   13 -
 1 files changed, 4 insertions(+), 9 deletions(-)


Index: llvm/utils/TableGen/DAGISelEmitter.cpp
diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.252 
llvm/utils/TableGen/DAGISelEmitter.cpp:1.253
--- llvm/utils/TableGen/DAGISelEmitter.cpp:1.252Sun Aug 27 03:11:28 2006
+++ llvm/utils/TableGen/DAGISelEmitter.cpp  Sun Aug 27 08:16:24 2006
@@ -3355,7 +3355,7 @@
 CalleeCode += ) ;
 // Prevent emission routines from being inlined to reduce selection
 // routines stack frame sizes.
-CalleeCode += NOINLINE ;
+CalleeCode += DISABLE_INLINE ;
 CalleeCode += {\n;
 
 for (std::vectorstd::string::const_reverse_iterator
@@ -3565,12 +3565,7 @@
   // *** instruction selector class.  These functions are really 
   methods.\n\n;
   
-  OS  #if defined(__GNUC__)  \\\n;
-  OS  ((__GNUC__  3) || ((__GNUC__ == 3)  (__GNUC_MINOR__ = 4)))\n;
-  OS  #define NOINLINE __attribute__((noinline))\n;
-  OS  #else\n;
-  OS  #define NOINLINE\n;
-  OS  #endif\n\n;
+  OS  #include \llvm/Support/Compiler.h\\n;
 
   OS  // Instruction selector priority queue:\n
   std::vectorSDNode* ISelQueue;\n;
@@ -3603,7 +3598,7 @@
   OSreturn ISelSelected[Id / 8]  (1  (Id % 8));\n;
   OS  }\n\n;
 
-  OS  void AddToISelQueue(SDOperand N) NOINLINE {\n;
+  OS  void AddToISelQueue(SDOperand N) DISABLE_INLINE {\n;
   OSint Id = N.Val-getNodeId();\n;
   OSif (Id != -1  !isQueued(Id)) {\n;
   OS  ISelQueue.push_back(N.Val);\n;
@@ -3624,7 +3619,7 @@
   OS}\n;
   OS  }\n\n;
 
-  OS  void ReplaceUses(SDOperand F, SDOperand T) NOINLINE {\n;
+  OS  void ReplaceUses(SDOperand F, SDOperand T) DISABLE_INLINE {\n;
   OSCurDAG-ReplaceAllUsesOfValueWith(F, T, ISelKilled);\n;
   OSsetSelected(F.Val-getNodeId());\n;
   OSRemoveKilled();\n;



___
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-01-18-InvalidBranchOpcodeAssert.ll

2006-08-27 Thread Chris Lattner


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

2006-01-18-InvalidBranchOpcodeAssert.ll (r1.1) removed
---
Log message:

Move this test from Codegen/PowerPC to CodeGen/Generic.  It fails on ia64,
but that's not the ppc backend's fault.


---
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/tools/opt/Makefile opt.cpp

2006-08-27 Thread Chris Lattner


Changes in directory llvm/tools/opt:

Makefile updated: 1.57 - 1.58
opt.cpp updated: 1.115 - 1.116
---
Log message:

Merge the 'analyze' mode code with the 'opt' mode code.  Eliminate the 
'autodetect .ll files' functionality.


---
Diffs of the changes:  (+26 -76)

 Makefile |2 -
 opt.cpp  |  100 +++
 2 files changed, 26 insertions(+), 76 deletions(-)


Index: llvm/tools/opt/Makefile
diff -u llvm/tools/opt/Makefile:1.57 llvm/tools/opt/Makefile:1.58
--- llvm/tools/opt/Makefile:1.57Fri Aug 18 01:34:30 2006
+++ llvm/tools/opt/Makefile Sun Aug 27 17:07:01 2006
@@ -10,7 +10,7 @@
 TOOLNAME = opt
 REQUIRES_EH := 1
 
-USEDLIBS = LLVMAsmParser.a LLVMBCReader.a LLVMBCWriter.a LLVMInstrumentation.a 
\
+USEDLIBS = LLVMBCReader.a LLVMBCWriter.a LLVMInstrumentation.a \
   LLVMScalarOpts.a LLVMipo.a LLVMipa.a LLVMDataStructure \
   LLVMTransforms.a LLVMTarget.a LLVMTransformUtils.a LLVMAnalysis.a \
   LLVMCore.a LLVMSupport.a LLVMbzip2.a LLVMSystem.a 


Index: llvm/tools/opt/opt.cpp
diff -u llvm/tools/opt/opt.cpp:1.115 llvm/tools/opt/opt.cpp:1.116
--- llvm/tools/opt/opt.cpp:1.115Mon Aug 21 00:34:03 2006
+++ llvm/tools/opt/opt.cpp  Sun Aug 27 17:07:01 2006
@@ -13,7 +13,6 @@
 
//===--===//
 
 #include llvm/Module.h
-#include llvm/Assembly/Parser.h
 #include llvm/PassManager.h
 #include llvm/Bytecode/Reader.h
 #include llvm/Bytecode/WriteBytecodePass.h
@@ -37,9 +36,8 @@
 // The OptimizationList is automatically populated with registered Passes by 
the
 // PassNameParser.
 //
-static cl::listconst PassInfo*, bool,
-FilteredPassNameParserPassInfo::Optimization 
-OptimizationList(cl::desc(Optimizations available:));
+static cl::listconst PassInfo*, bool, PassNameParser
+PassList(cl::desc(Optimizations available:));
 
 
 // Other command line options...
@@ -74,12 +72,6 @@
 static cl::optbool
 AnalyzeOnly(analyze, cl::desc(Only perform analysis, no optimization));
 
-// The AnalysesList is automatically populated with registered Passes by the
-// PassNameParser.
-static 
-  cl::listconst PassInfo*, bool, FilteredPassNameParserPassInfo::Analysis 
-  AnalysesList(cl::desc(Analyses available:));
-
 static Timer BytecodeLoadTimer(Bytecode Loader);
 
 // -- Define Printers for module and function passes 
@@ -166,57 +158,7 @@
llvm .bc - .bc modular optimizer and analysis printer \n);
 sys::PrintStackTraceOnErrorSignal();
 
-if (AnalyzeOnly) {
-  Module *CurMod = 0;
-#if 0
-  TimeRegion RegionTimer(BytecodeLoadTimer);
-#endif
-  CurMod = ParseBytecodeFile(InputFilename);
-  ParseError Err;
-  if (!CurMod  !(CurMod = ParseAssemblyFile(InputFilename,Err))){
-std::cerr  argv[0]  :   Err.getMessage()  \n; 
-return 1;
-  }
-
-  // Create a PassManager to hold and optimize the collection of passes we 
-  // are about to build...
-  PassManager Passes;
-
-  // Add an appropriate TargetData instance for this module...
-  Passes.add(new TargetData(CurMod));
-
-  // Make sure the input LLVM is well formed.
-  if (!NoVerify)
-Passes.add(createVerifierPass());
-
-  // Create a new optimization pass for each one specified on the 
-  // command line
-  for (unsigned i = 0; i  AnalysesList.size(); ++i) {
-const PassInfo *Analysis = AnalysesList[i];
-
-if (Analysis-getNormalCtor()) {
-  Pass *P = Analysis-getNormalCtor()();
-  Passes.add(P);
-
-  if (BasicBlockPass *BBP = dynamic_castBasicBlockPass*(P))
-Passes.add(new BasicBlockPassPrinter(Analysis));
-  else if (FunctionPass *FP = dynamic_castFunctionPass*(P))
-Passes.add(new FunctionPassPrinter(Analysis));
-  else
-Passes.add(new ModulePassPrinter(Analysis));
-
-} else
-  std::cerr  argv[0]  : cannot create pass: 
- Analysis-getPassName()  \n;
-  }
-
-  Passes.run(*CurMod);
-
-  delete CurMod;
-  return 0;
-}
-
-// Allocate a full target machine description only if necessary...
+// Allocate a full target machine description only if necessary.
 // FIXME: The choice of target should be controllable on the command line.
 std::auto_ptrTargetMachine target;
 
@@ -275,22 +217,30 @@
 Passes.add(new TargetData(M.get()));
 
 // Create a new optimization pass for each one specified on the command 
line
-for (unsigned i = 0; i  OptimizationList.size(); ++i) {
-  const PassInfo *Opt = OptimizationList[i];
-
-  if (Opt-getNormalCtor())
-Passes.add(Opt-getNormalCtor()());
-  else if (Opt-getTargetCtor()) {
-#if 0
-if (target.get() == NULL)
-  target.reset(allocateSparcTargetMachine()); // FIXME: target option
-#endif
+for (unsigned i = 0; i  PassList.size(); ++i) {
+  const 

[llvm-commits] CVS: llvm/tools/llvm-ld/Optimize.cpp

2006-08-27 Thread Chris Lattner


Changes in directory llvm/tools/llvm-ld:

Optimize.cpp updated: 1.12 - 1.13
---
Log message:

eliminate only use of FilteredPassNameParser


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

 Optimize.cpp |3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)


Index: llvm/tools/llvm-ld/Optimize.cpp
diff -u llvm/tools/llvm-ld/Optimize.cpp:1.12 
llvm/tools/llvm-ld/Optimize.cpp:1.13
--- llvm/tools/llvm-ld/Optimize.cpp:1.12Sun Aug 20 15:54:38 2006
+++ llvm/tools/llvm-ld/Optimize.cpp Sun Aug 27 17:07:43 2006
@@ -27,8 +27,7 @@
 using namespace llvm;
 
 // Pass Name Options as generated by the PassNameParser
-static cl::listconst PassInfo*, bool, 
-  FilteredPassNameParserPassInfo::Optimization 
+static cl::listconst PassInfo*, bool, PassNameParser
   OptimizationList(cl::desc(Optimizations available:));
 
 // Optimization Enumeration



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


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

2006-08-27 Thread Chris Lattner


Changes in directory llvm/lib/Support:

CommandLine.cpp updated: 1.74 - 1.75
---
Log message:

Minor code cleanups


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

 CommandLine.cpp |   21 ++---
 1 files changed, 10 insertions(+), 11 deletions(-)


Index: llvm/lib/Support/CommandLine.cpp
diff -u llvm/lib/Support/CommandLine.cpp:1.74 
llvm/lib/Support/CommandLine.cpp:1.75
--- llvm/lib/Support/CommandLine.cpp:1.74   Sun Aug 27 07:45:47 2006
+++ llvm/lib/Support/CommandLine.cppSun Aug 27 17:10:29 2006
@@ -214,8 +214,8 @@
 /// using strdup (), so it is the caller's responsibility to free ()
 /// them later.
 ///
-static void ParseCStringVector (std::vectorchar * output,
-const char *input) {
+static void ParseCStringVector(std::vectorchar * output,
+   const char *input) {
   // Characters which will be treated as token separators:
   static const char *delims =  \v\f\t\r\n;
 
@@ -265,26 +265,25 @@
   assert(envVar  Environment variable name missing);
 
   // Get the environment variable they want us to parse options out of.
-  const char *envValue = getenv (envVar);
+  const char *envValue = getenv(envVar);
   if (!envValue)
 return;
 
   // Get program's name, which we wouldn't know without the caller
   // telling us.
-  std::vectorchar * newArgv;
-  newArgv.push_back (strdup (progName));
+  std::vectorchar* newArgv;
+  newArgv.push_back(strdup(progName));
 
   // Parse the value of the environment variable into a command line
   // and hand it off to ParseCommandLineOptions().
-  ParseCStringVector (newArgv, envValue);
-  int newArgc = newArgv.size ();
-  ParseCommandLineOptions (newArgc, newArgv[0], Overview);
+  ParseCStringVector(newArgv, envValue);
+  int newArgc = newArgv.size();
+  ParseCommandLineOptions(newArgc, newArgv[0], Overview);
 
   // Free all the strdup()ed strings.
-  for (std::vectorchar *::iterator i = newArgv.begin (), e = newArgv.end ();
-   i != e; ++i) {
+  for (std::vectorchar*::iterator i = newArgv.begin(), e = newArgv.end();
+   i != e; ++i)
 free (*i);
-  }
 }
 
 /// LookupOption - Lookup the option specified by the specified option on the



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


[llvm-commits] CVS: llvm/include/llvm/PassSupport.h

2006-08-27 Thread Chris Lattner


Changes in directory llvm/include/llvm:

PassSupport.h updated: 1.27 - 1.28
---
Log message:

Eliminate RegisterAnalysis.  RegisterPass now does all that is necessary.


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

 PassSupport.h |   41 +
 1 files changed, 17 insertions(+), 24 deletions(-)


Index: llvm/include/llvm/PassSupport.h
diff -u llvm/include/llvm/PassSupport.h:1.27 
llvm/include/llvm/PassSupport.h:1.28
--- llvm/include/llvm/PassSupport.h:1.27Sun Aug 27 17:21:55 2006
+++ llvm/include/llvm/PassSupport.h Sun Aug 27 17:30:17 2006
@@ -179,24 +179,33 @@
 struct RegisterPass : public RegisterPassBase {
 
   // Register Pass using default constructor...
-  RegisterPass(const char *PassArg, const char *Name)
+  RegisterPass(const char *PassArg, const char *Name, bool CFGOnly = false)
   : RegisterPassBase(Name, PassArg, typeid(PassName),
- callDefaultCtorPassName) {}
+ callDefaultCtorPassName) {
+if (CFGOnly) setOnlyUsesCFG();
+  }
 
   // Register Pass using default constructor explicitly...
   RegisterPass(const char *PassArg, const char *Name,
-   Pass *(*ctor)()) 
-  : RegisterPassBase(Name, PassArg, typeid(PassName), ctor) {}
+   Pass *(*ctor)(), bool CFGOnly = false) 
+  : RegisterPassBase(Name, PassArg, typeid(PassName), ctor) {
+if (CFGOnly) setOnlyUsesCFG();
+  }
 
   // Register Pass using TargetMachine constructor...
   RegisterPass(const char *PassArg, const char *Name, 
-   Pass *(*targetctor)(TargetMachine ))
-  : RegisterPassBase(Name, PassArg, typeid(PassName), 0, targetctor) {}
+   Pass *(*targetctor)(TargetMachine ), bool CFGOnly = false)
+  : RegisterPassBase(Name, PassArg, typeid(PassName), 0, targetctor) {
+if (CFGOnly) setOnlyUsesCFG();
+  }
 
   // Generic constructor version that has an unknown ctor type...
   templatetypename CtorType
-  RegisterPass(const char *PassArg, const char *Name, CtorType *Fn)
-  : RegisterPassBase(Name, PassArg, typeid(PassName), 0) {}
+  RegisterPass(const char *PassArg, const char *Name, CtorType *Fn,
+   bool CFGOnly = false)
+  : RegisterPassBase(Name, PassArg, typeid(PassName), 0) {
+if (CFGOnly) setOnlyUsesCFG();
+  }
 };
 
 /// RegisterOpt - Register something that is to show up in Opt, this is just a
@@ -246,22 +255,6 @@
   }
 };
 
-/// RegisterAnalysis - Register something that is to show up in Analysis, this
-/// is just a shortcut for specifying RegisterPass...  Analyses take a special
-/// argument that, when set to true, tells the system that the analysis ONLY
-/// depends on the shape of the CFG, so if a transformation preserves the CFG
-/// that the analysis is not invalidated.
-///
-templatetypename PassName
-struct RegisterAnalysis : public RegisterPassBase {
-  RegisterAnalysis(const char *PassArg, const char *Name,
-   bool CFGOnly = false)
-  : RegisterPassBase(Name, PassArg, typeid(PassName),
- callDefaultCtorPassName) {
-if (CFGOnly) setOnlyUsesCFG();
-  }
-};
-
 
 /// RegisterAnalysisGroup - Register a Pass as a member of an analysis _group_.
 /// Analysis groups are used to define an interface (which need not derive from



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


[llvm-commits] CVS: llvm/tools/opt/AnalysisWrappers.cpp GraphPrinters.cpp PrintSCC.cpp

2006-08-27 Thread Chris Lattner


Changes in directory llvm/tools/opt:

AnalysisWrappers.cpp updated: 1.18 - 1.19
GraphPrinters.cpp updated: 1.11 - 1.12
PrintSCC.cpp updated: 1.14 - 1.15
---
Log message:

Eliminate RegisterAnalysis.  RegisterPass now does all that is necessary.


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

 AnalysisWrappers.cpp |4 ++--
 GraphPrinters.cpp|4 ++--
 PrintSCC.cpp |4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)


Index: llvm/tools/opt/AnalysisWrappers.cpp
diff -u llvm/tools/opt/AnalysisWrappers.cpp:1.18 
llvm/tools/opt/AnalysisWrappers.cpp:1.19
--- llvm/tools/opt/AnalysisWrappers.cpp:1.18Tue Apr 18 18:45:19 2006
+++ llvm/tools/opt/AnalysisWrappers.cpp Sun Aug 27 17:30:17 2006
@@ -61,7 +61,7 @@
 }
   };
 
-  RegisterAnalysisExternalFunctionsPassedConstants
+  RegisterPassExternalFunctionsPassedConstants
   P1(externalfnconstants, Print external fn callsites passed constants);
   
   struct CallGraphPrinter : public ModulePass {
@@ -76,6 +76,6 @@
 }
   };
   
-  RegisterAnalysisCallGraphPrinter
+  RegisterPassCallGraphPrinter
 P2(callgraph, Print a call graph);
 }


Index: llvm/tools/opt/GraphPrinters.cpp
diff -u llvm/tools/opt/GraphPrinters.cpp:1.11 
llvm/tools/opt/GraphPrinters.cpp:1.12
--- llvm/tools/opt/GraphPrinters.cpp:1.11   Wed May 24 12:04:04 2006
+++ llvm/tools/opt/GraphPrinters.cppSun Aug 27 17:30:17 2006
@@ -72,6 +72,6 @@
 }
   };
 
-  RegisterAnalysisCallGraphPrinter P2(print-callgraph,
-Print Call Graph to 'dot' file);
+  RegisterPassCallGraphPrinter P2(print-callgraph,
+Print Call Graph to 'dot' file);
 }


Index: llvm/tools/opt/PrintSCC.cpp
diff -u llvm/tools/opt/PrintSCC.cpp:1.14 llvm/tools/opt/PrintSCC.cpp:1.15
--- llvm/tools/opt/PrintSCC.cpp:1.14Thu Apr 21 16:08:44 2005
+++ llvm/tools/opt/PrintSCC.cpp Sun Aug 27 17:30:17 2006
@@ -57,10 +57,10 @@
 }
   };
 
-  RegisterAnalysisCFGSCC
+  RegisterPassCFGSCC
   Y(cfgscc, Print SCCs of each function CFG);
 
-  RegisterAnalysisCallGraphSCC
+  RegisterPassCallGraphSCC
   Z(callscc, Print SCCs of the Call Graph);
 }
 



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


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

2006-08-27 Thread Chris Lattner


Changes in directory llvm/lib/Analysis/DataStructure:

CallTargets.cpp updated: 1.3 - 1.4
---
Log message:

Fit to 80 cols


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

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


Index: llvm/lib/Analysis/DataStructure/CallTargets.cpp
diff -u llvm/lib/Analysis/DataStructure/CallTargets.cpp:1.3 
llvm/lib/Analysis/DataStructure/CallTargets.cpp:1.4
--- llvm/lib/Analysis/DataStructure/CallTargets.cpp:1.3 Sun Aug 27 17:30:17 2006
+++ llvm/lib/Analysis/DataStructure/CallTargets.cpp Sun Aug 27 17:31:12 2006
@@ -58,8 +58,10 @@
   } 
   if (N-isComplete()  !IndMap[cs].size()) {
 ++CompleteEmpty;
-std::cerr  Call site empty: '  
cs.getInstruction()-getName() 
-   ' In '  
cs.getInstruction()-getParent()-getParent()-getName()
+std::cerr  Call site empty: '
+ cs.getInstruction()-getName() 
+   ' In '
+ cs.getInstruction()-getParent()-getParent()-getName()
'\n;
   }
 } else {
@@ -74,7 +76,8 @@
 {
   return;
   O  [* = incomplete] CS: func list\n;
-  for (std::mapCallSite, std::vectorFunction* ::const_iterator ii = 
IndMap.begin(),
+  for (std::mapCallSite, std::vectorFunction* ::const_iterator ii =
+   IndMap.begin(),
  ee = IndMap.end(); ii != ee; ++ii) {
 if (!ii-first.getCalledFunction()) { //only print indirect
   if (!isComplete(ii-first)) {



___
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/DSAnalysis/arraymerge.ll arraytest.ll badcases.ll basictest.ll fieldmerge.ll goodcases.ll indcalltest.ll misctests.ll physicalsubtype.ll recursion.

2006-08-27 Thread Chris Lattner


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

arraymerge.ll updated: 1.3 - 1.4
arraytest.ll updated: 1.3 - 1.4
badcases.ll updated: 1.3 - 1.4
basictest.ll updated: 1.3 - 1.4
fieldmerge.ll updated: 1.3 - 1.4
goodcases.ll updated: 1.3 - 1.4
indcalltest.ll updated: 1.3 - 1.4
misctests.ll updated: 1.3 - 1.4
physicalsubtype.ll updated: 1.3 - 1.4
recursion.ll updated: 1.3 - 1.4
simplest-test.ll updated: 1.3 - 1.4
simpletest.ll updated: 1.3 - 1.4
structpadding.ll updated: 1.3 - 1.4
---
Log message:

opt no longer reads .ll files.  Run llvm-as explicitly.


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

 arraymerge.ll  |2 +-
 arraytest.ll   |2 +-
 badcases.ll|2 +-
 basictest.ll   |2 +-
 fieldmerge.ll  |2 +-
 goodcases.ll   |2 +-
 indcalltest.ll |2 +-
 misctests.ll   |2 +-
 physicalsubtype.ll |2 +-
 recursion.ll   |2 +-
 simplest-test.ll   |2 +-
 simpletest.ll  |2 +-
 structpadding.ll   |2 +-
 13 files changed, 13 insertions(+), 13 deletions(-)


Index: llvm/test/Regression/Transforms/DSAnalysis/arraymerge.ll
diff -u llvm/test/Regression/Transforms/DSAnalysis/arraymerge.ll:1.3 
llvm/test/Regression/Transforms/DSAnalysis/arraymerge.ll:1.4
--- llvm/test/Regression/Transforms/DSAnalysis/arraymerge.ll:1.3Fri Aug 
18 01:34:30 2006
+++ llvm/test/Regression/Transforms/DSAnalysis/arraymerge.llSun Aug 27 
17:41:58 2006
@@ -2,7 +2,7 @@
 ; folded completely away if possible.  This is a very common case, so it should
 ; be efficient.
 ;
-; RUN: opt -analyze %s -tddatastructure
+; RUN: llvm-as  %s | opt -analyze -tddatastructure
 ;
 implementation
 


Index: llvm/test/Regression/Transforms/DSAnalysis/arraytest.ll
diff -u llvm/test/Regression/Transforms/DSAnalysis/arraytest.ll:1.3 
llvm/test/Regression/Transforms/DSAnalysis/arraytest.ll:1.4
--- llvm/test/Regression/Transforms/DSAnalysis/arraytest.ll:1.3 Fri Aug 18 
01:34:30 2006
+++ llvm/test/Regression/Transforms/DSAnalysis/arraytest.ll Sun Aug 27 
17:41:58 2006
@@ -1,5 +1,5 @@
 ;
-; RUN: opt -analyze %s -tddatastructure
+; RUN: llvm-as  %s | opt -analyze -tddatastructure
 %crazy = type [2 x { [2 x sbyte], short } ]
 
 implementation


Index: llvm/test/Regression/Transforms/DSAnalysis/badcases.ll
diff -u llvm/test/Regression/Transforms/DSAnalysis/badcases.ll:1.3 
llvm/test/Regression/Transforms/DSAnalysis/badcases.ll:1.4
--- llvm/test/Regression/Transforms/DSAnalysis/badcases.ll:1.3  Fri Aug 18 
01:34:30 2006
+++ llvm/test/Regression/Transforms/DSAnalysis/badcases.ll  Sun Aug 27 
17:41:58 2006
@@ -1,6 +1,6 @@
 ; This file contains a list of situations where node folding should happen...
 ;
-; RUN: opt -analyze %s -tddatastructure
+; RUN: llvm-as  %s | opt -analyze -tddatastructure
 
 implementation
 


Index: llvm/test/Regression/Transforms/DSAnalysis/basictest.ll
diff -u llvm/test/Regression/Transforms/DSAnalysis/basictest.ll:1.3 
llvm/test/Regression/Transforms/DSAnalysis/basictest.ll:1.4
--- llvm/test/Regression/Transforms/DSAnalysis/basictest.ll:1.3 Fri Aug 18 
01:34:30 2006
+++ llvm/test/Regression/Transforms/DSAnalysis/basictest.ll Sun Aug 27 
17:41:58 2006
@@ -1,6 +1,6 @@
 ; very simple test
 ;
-; RUN: opt -analyze %s -tddatastructure
+; RUN: llvm-as  %s | opt -analyze -tddatastructure
 
 implementation
 


Index: llvm/test/Regression/Transforms/DSAnalysis/fieldmerge.ll
diff -u llvm/test/Regression/Transforms/DSAnalysis/fieldmerge.ll:1.3 
llvm/test/Regression/Transforms/DSAnalysis/fieldmerge.ll:1.4
--- llvm/test/Regression/Transforms/DSAnalysis/fieldmerge.ll:1.3Fri Aug 
18 01:34:30 2006
+++ llvm/test/Regression/Transforms/DSAnalysis/fieldmerge.llSun Aug 27 
17:41:58 2006
@@ -1,5 +1,5 @@
 ;
-; RUN: opt -analyze %s -tddatastructure
+; RUN: llvm-as  %s | opt -analyze -tddatastructure
 
 %str = type { int*, int* }
 


Index: llvm/test/Regression/Transforms/DSAnalysis/goodcases.ll
diff -u llvm/test/Regression/Transforms/DSAnalysis/goodcases.ll:1.3 
llvm/test/Regression/Transforms/DSAnalysis/goodcases.ll:1.4
--- llvm/test/Regression/Transforms/DSAnalysis/goodcases.ll:1.3 Fri Aug 18 
01:34:30 2006
+++ llvm/test/Regression/Transforms/DSAnalysis/goodcases.ll Sun Aug 27 
17:41:58 2006
@@ -1,6 +1,6 @@
 ; This file contains a list of cases where node folding should NOT happen
 ;
-; RUN: opt -analyze %s -tddatastructure
+; RUN: llvm-as  %s | opt -analyze -tddatastructure
 ;
 
 implementation


Index: llvm/test/Regression/Transforms/DSAnalysis/indcalltest.ll
diff -u llvm/test/Regression/Transforms/DSAnalysis/indcalltest.ll:1.3 
llvm/test/Regression/Transforms/DSAnalysis/indcalltest.ll:1.4
--- llvm/test/Regression/Transforms/DSAnalysis/indcalltest.ll:1.3   Fri Aug 
18 01:34:30 2006
+++ llvm/test/Regression/Transforms/DSAnalysis/indcalltest.ll   Sun Aug 27 
17:41:58 2006
@@ -1,5 +1,5 @@
 ;
-; RUN: opt -analyze %s -tddatastructure
+; RUN: llvm-as  %s | opt -analyze -tddatastructure
 
 %G = global int 2  ; int* [#uses=1]
 %H 

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

2006-08-27 Thread Chris Lattner


Changes in directory llvm/lib/Transforms/Hello:

Hello.cpp updated: 1.7 - 1.8
---
Log message:

eliminate RegisterOpt.  It does the same thing as RegisterPass.


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

 Hello.cpp |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


Index: llvm/lib/Transforms/Hello/Hello.cpp
diff -u llvm/lib/Transforms/Hello/Hello.cpp:1.7 
llvm/lib/Transforms/Hello/Hello.cpp:1.8
--- llvm/lib/Transforms/Hello/Hello.cpp:1.7 Mon Aug  7 18:17:24 2006
+++ llvm/lib/Transforms/Hello/Hello.cpp Sun Aug 27 17:42:52 2006
@@ -34,7 +34,7 @@
   return false;
 }
   };
-  RegisterOptHello X(hello, Hello World Pass);
+  RegisterPassHello X(hello, Hello World Pass);
 
   // Hello2 - The second implementation with getAnalysisUsage implemented.
   struct Hello2 : public FunctionPass {
@@ -52,5 +52,6 @@
   AU.setPreservesAll();
 };
   };
-  RegisterOptHello2 Y(hello2, Hello World Pass (with getAnalysisUsage 
implemented));
+  RegisterPassHello2 Y(hello2,
+Hello World Pass (with getAnalysisUsage 
implemented));
 }



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


[llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp Verifier.cpp

2006-08-27 Thread Chris Lattner


Changes in directory llvm/lib/VMCore:

AsmWriter.cpp updated: 1.202 - 1.203
Verifier.cpp updated: 1.161 - 1.162
---
Log message:

eliminate RegisterOpt.  It does the same thing as RegisterPass.


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

 AsmWriter.cpp |4 ++--
 Verifier.cpp  |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)


Index: llvm/lib/VMCore/AsmWriter.cpp
diff -u llvm/lib/VMCore/AsmWriter.cpp:1.202 llvm/lib/VMCore/AsmWriter.cpp:1.203
--- llvm/lib/VMCore/AsmWriter.cpp:1.202 Mon Aug 21 12:20:01 2006
+++ llvm/lib/VMCore/AsmWriter.cpp   Sun Aug 27 17:42:52 2006
@@ -162,9 +162,9 @@
 
 }  // end namespace llvm
 
-static RegisterOptPrintModulePass
+static RegisterPassPrintModulePass
 X(printm, Print module to stderr);
-static RegisterOptPrintFunctionPass
+static RegisterPassPrintFunctionPass
 Y(print,Print function to stderr);
 
 static void WriteAsOperandInternal(std::ostream Out, const Value *V,


Index: llvm/lib/VMCore/Verifier.cpp
diff -u llvm/lib/VMCore/Verifier.cpp:1.161 llvm/lib/VMCore/Verifier.cpp:1.162
--- llvm/lib/VMCore/Verifier.cpp:1.161  Sun Aug 27 07:54:02 2006
+++ llvm/lib/VMCore/Verifier.cppSun Aug 27 17:42:52 2006
@@ -239,7 +239,7 @@
 }
   };
 
-  RegisterOptVerifier X(verify, Module Verifier);
+  RegisterPassVerifier X(verify, Module Verifier);
 } // 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/Analysis/IPA/Andersens.cpp CallGraph.cpp GlobalsModRef.cpp

2006-08-27 Thread Chris Lattner


Changes in directory llvm/lib/Analysis/IPA:

Andersens.cpp updated: 1.30 - 1.31
CallGraph.cpp updated: 1.55 - 1.56
GlobalsModRef.cpp updated: 1.19 - 1.20
---
Log message:

eliminate RegisterOpt.  It does the same thing as RegisterPass.


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

 Andersens.cpp |4 ++--
 CallGraph.cpp |2 +-
 GlobalsModRef.cpp |4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)


Index: llvm/lib/Analysis/IPA/Andersens.cpp
diff -u llvm/lib/Analysis/IPA/Andersens.cpp:1.30 
llvm/lib/Analysis/IPA/Andersens.cpp:1.31
--- llvm/lib/Analysis/IPA/Andersens.cpp:1.30Tue Jul 11 13:25:13 2006
+++ llvm/lib/Analysis/IPA/Andersens.cpp Sun Aug 27 17:42:51 2006
@@ -336,8 +336,8 @@
 void visitInstruction(Instruction I);
   };
 
-  RegisterOptAndersens X(anders-aa,
-   Andersen's Interprocedural Alias Analysis);
+  RegisterPassAndersens X(anders-aa,
+Andersen's Interprocedural Alias Analysis);
   RegisterAnalysisGroupAliasAnalysis, Andersens Y;
 }
 


Index: llvm/lib/Analysis/IPA/CallGraph.cpp
diff -u llvm/lib/Analysis/IPA/CallGraph.cpp:1.55 
llvm/lib/Analysis/IPA/CallGraph.cpp:1.56
--- llvm/lib/Analysis/IPA/CallGraph.cpp:1.55Wed Jul 12 13:29:36 2006
+++ llvm/lib/Analysis/IPA/CallGraph.cpp Sun Aug 27 17:42:51 2006
@@ -182,7 +182,7 @@
 };
 
 RegisterAnalysisGroupCallGraph X(Call Graph);
-RegisterOptBasicCallGraph Y(basiccg, Basic CallGraph Construction);
+RegisterPassBasicCallGraph Y(basiccg, Basic CallGraph Construction);
 RegisterAnalysisGroupCallGraph, BasicCallGraph, true Z;
 
 } //End anonymous namespace


Index: llvm/lib/Analysis/IPA/GlobalsModRef.cpp
diff -u llvm/lib/Analysis/IPA/GlobalsModRef.cpp:1.19 
llvm/lib/Analysis/IPA/GlobalsModRef.cpp:1.20
--- llvm/lib/Analysis/IPA/GlobalsModRef.cpp:1.19Wed Jul 12 13:29:36 2006
+++ llvm/lib/Analysis/IPA/GlobalsModRef.cpp Sun Aug 27 17:42:51 2006
@@ -135,8 +135,8 @@
  std::vectorFunction* Writers);
   };
 
-  RegisterOptGlobalsModRef X(globalsmodref-aa,
-   Simple mod/ref analysis for globals);
+  RegisterPassGlobalsModRef X(globalsmodref-aa,
+Simple mod/ref analysis for globals);
   RegisterAnalysisGroupAliasAnalysis, GlobalsModRef Y;
 }
 



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


[llvm-commits] CVS: llvm/lib/Analysis/AliasAnalysisCounter.cpp AliasAnalysisEvaluator.cpp AliasSetTracker.cpp BasicAliasAnalysis.cpp LoadValueNumbering.cpp ProfileInfo.cpp ProfileInfoLoaderPass.cpp Va

2006-08-27 Thread Chris Lattner


Changes in directory llvm/lib/Analysis:

AliasAnalysisCounter.cpp updated: 1.13 - 1.14
AliasAnalysisEvaluator.cpp updated: 1.27 - 1.28
AliasSetTracker.cpp updated: 1.40 - 1.41
BasicAliasAnalysis.cpp updated: 1.83 - 1.84
LoadValueNumbering.cpp updated: 1.34 - 1.35
ProfileInfo.cpp updated: 1.7 - 1.8
ProfileInfoLoaderPass.cpp updated: 1.13 - 1.14
ValueNumbering.cpp updated: 1.19 - 1.20
---
Log message:

eliminate RegisterOpt.  It does the same thing as RegisterPass.


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

 AliasAnalysisCounter.cpp   |2 +-
 AliasAnalysisEvaluator.cpp |2 +-
 AliasSetTracker.cpp|2 +-
 BasicAliasAnalysis.cpp |4 ++--
 LoadValueNumbering.cpp |2 +-
 ProfileInfo.cpp|2 +-
 ProfileInfoLoaderPass.cpp  |2 +-
 ValueNumbering.cpp |2 +-
 8 files changed, 9 insertions(+), 9 deletions(-)


Index: llvm/lib/Analysis/AliasAnalysisCounter.cpp
diff -u llvm/lib/Analysis/AliasAnalysisCounter.cpp:1.13 
llvm/lib/Analysis/AliasAnalysisCounter.cpp:1.14
--- llvm/lib/Analysis/AliasAnalysisCounter.cpp:1.13 Thu Apr 21 16:04:58 2005
+++ llvm/lib/Analysis/AliasAnalysisCounter.cpp  Sun Aug 27 17:42:51 2006
@@ -109,7 +109,7 @@
 }
   };
 
-  RegisterOptAliasAnalysisCounter
+  RegisterPassAliasAnalysisCounter
   X(count-aa, Count Alias Analysis Query Responses);
   RegisterAnalysisGroupAliasAnalysis, AliasAnalysisCounter Y;
 }


Index: llvm/lib/Analysis/AliasAnalysisEvaluator.cpp
diff -u llvm/lib/Analysis/AliasAnalysisEvaluator.cpp:1.27 
llvm/lib/Analysis/AliasAnalysisEvaluator.cpp:1.28
--- llvm/lib/Analysis/AliasAnalysisEvaluator.cpp:1.27   Thu Apr 21 16:04:58 2005
+++ llvm/lib/Analysis/AliasAnalysisEvaluator.cppSun Aug 27 17:42:51 2006
@@ -70,7 +70,7 @@
 bool doFinalization(Module M);
   };
 
-  RegisterOptAAEval
+  RegisterPassAAEval
   X(aa-eval, Exhaustive Alias Analysis Precision Evaluator);
 }
 


Index: llvm/lib/Analysis/AliasSetTracker.cpp
diff -u llvm/lib/Analysis/AliasSetTracker.cpp:1.40 
llvm/lib/Analysis/AliasSetTracker.cpp:1.41
--- llvm/lib/Analysis/AliasSetTracker.cpp:1.40  Tue Jun 27 18:56:13 2006
+++ llvm/lib/Analysis/AliasSetTracker.cpp   Sun Aug 27 17:42:51 2006
@@ -568,5 +568,5 @@
   return false;
 }
   };
-  RegisterOptAliasSetPrinter X(print-alias-sets, Alias Set Printer);
+  RegisterPassAliasSetPrinter X(print-alias-sets, Alias Set Printer);
 }


Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp
diff -u llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.83 
llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.84
--- llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.83   Sun Aug 27 07:54:01 2006
+++ llvm/lib/Analysis/BasicAliasAnalysis.cppSun Aug 27 17:42:51 2006
@@ -72,7 +72,7 @@
   };
 
   // Register this pass...
-  RegisterOptNoAA
+  RegisterPassNoAA
   U(no-aa, No Alias Analysis (always returns 'may' alias));
 
   // Declare that we implement the AliasAnalysis interface
@@ -117,7 +117,7 @@
   };
 
   // Register this pass...
-  RegisterOptBasicAliasAnalysis
+  RegisterPassBasicAliasAnalysis
   X(basicaa, Basic Alias Analysis (default AA impl));
 
   // Declare that we implement the AliasAnalysis interface


Index: llvm/lib/Analysis/LoadValueNumbering.cpp
diff -u llvm/lib/Analysis/LoadValueNumbering.cpp:1.34 
llvm/lib/Analysis/LoadValueNumbering.cpp:1.35
--- llvm/lib/Analysis/LoadValueNumbering.cpp:1.34   Sun Jan  8 03:10:04 2006
+++ llvm/lib/Analysis/LoadValueNumbering.cppSun Aug 27 17:42:51 2006
@@ -81,7 +81,7 @@
   };
 
   // Register this pass...
-  RegisterOptLoadVN X(load-vn, Load Value Numbering);
+  RegisterPassLoadVN X(load-vn, Load Value Numbering);
 
   // Declare that we implement the ValueNumbering interface
   RegisterAnalysisGroupValueNumbering, LoadVN Y;


Index: llvm/lib/Analysis/ProfileInfo.cpp
diff -u llvm/lib/Analysis/ProfileInfo.cpp:1.7 
llvm/lib/Analysis/ProfileInfo.cpp:1.8
--- llvm/lib/Analysis/ProfileInfo.cpp:1.7   Thu Apr 21 16:04:58 2005
+++ llvm/lib/Analysis/ProfileInfo.cpp   Sun Aug 27 17:42:51 2006
@@ -85,7 +85,7 @@
   struct NoProfileInfo : public ImmutablePass, public ProfileInfo {};
 
   // Register this pass...
-  RegisterOptNoProfileInfo
+  RegisterPassNoProfileInfo
   X(no-profile, No Profile Information);
 
   // Declare that we implement the ProfileInfo interface


Index: llvm/lib/Analysis/ProfileInfoLoaderPass.cpp
diff -u llvm/lib/Analysis/ProfileInfoLoaderPass.cpp:1.13 
llvm/lib/Analysis/ProfileInfoLoaderPass.cpp:1.14
--- llvm/lib/Analysis/ProfileInfoLoaderPass.cpp:1.13Mon Aug 21 12:20:01 2006
+++ llvm/lib/Analysis/ProfileInfoLoaderPass.cpp Sun Aug 27 17:42:51 2006
@@ -49,7 +49,7 @@
 virtual bool runOnModule(Module M);
   };
 
-  RegisterOptLoaderPass
+  RegisterPassLoaderPass
   X(profile-loader, Load profile information from llvmprof.out);
 
   RegisterAnalysisGroupProfileInfo, LoaderPass Y;


Index: llvm/lib/Analysis/ValueNumbering.cpp
diff -u llvm/lib/Analysis/ValueNumbering.cpp:1.19 
llvm/lib/Analysis/ValueNumbering.cpp:1.20
--- 

[llvm-commits] CVS: llvm/tools/bugpoint/ExtractFunction.cpp

2006-08-27 Thread Chris Lattner


Changes in directory llvm/tools/bugpoint:

ExtractFunction.cpp updated: 1.50 - 1.51
---
Log message:

eliminate RegisterOpt.  It does the same thing as RegisterPass.


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

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


Index: llvm/tools/bugpoint/ExtractFunction.cpp
diff -u llvm/tools/bugpoint/ExtractFunction.cpp:1.50 
llvm/tools/bugpoint/ExtractFunction.cpp:1.51
--- llvm/tools/bugpoint/ExtractFunction.cpp:1.50Fri Jul 28 13:03:01 2006
+++ llvm/tools/bugpoint/ExtractFunction.cpp Sun Aug 27 17:42:52 2006
@@ -420,7 +420,7 @@
   class BlockExtractorPass : public ModulePass {
 bool runOnModule(Module M);
   };
-  RegisterOptBlockExtractorPass
+  RegisterPassBlockExtractorPass
   XX(extract-bbs, Extract Basic Blocks From Module (for bugpoint use));
 }
 



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


[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructureAA.cpp DataStructureOpt.cpp Steensgaard.cpp

2006-08-27 Thread Chris Lattner


Changes in directory llvm/lib/Analysis/DataStructure:

DataStructureAA.cpp updated: 1.38 - 1.39
DataStructureOpt.cpp updated: 1.12 - 1.13
Steensgaard.cpp updated: 1.62 - 1.63
---
Log message:

eliminate RegisterOpt.  It does the same thing as RegisterPass.


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

 DataStructureAA.cpp  |2 +-
 DataStructureOpt.cpp |2 +-
 Steensgaard.cpp  |4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)


Index: llvm/lib/Analysis/DataStructure/DataStructureAA.cpp
diff -u llvm/lib/Analysis/DataStructure/DataStructureAA.cpp:1.38 
llvm/lib/Analysis/DataStructure/DataStructureAA.cpp:1.39
--- llvm/lib/Analysis/DataStructure/DataStructureAA.cpp:1.38Thu Apr 21 
16:07:28 2005
+++ llvm/lib/Analysis/DataStructure/DataStructureAA.cpp Sun Aug 27 17:42:51 2006
@@ -96,7 +96,7 @@
   };
 
   // Register the pass...
-  RegisterOptDSAA X(ds-aa, Data Structure Graph Based Alias Analysis);
+  RegisterPassDSAA X(ds-aa, Data Structure Graph Based Alias Analysis);
 
   // Register as an implementation of AliasAnalysis
   RegisterAnalysisGroupAliasAnalysis, DSAA Y;


Index: llvm/lib/Analysis/DataStructure/DataStructureOpt.cpp
diff -u llvm/lib/Analysis/DataStructure/DataStructureOpt.cpp:1.12 
llvm/lib/Analysis/DataStructure/DataStructureOpt.cpp:1.13
--- llvm/lib/Analysis/DataStructure/DataStructureOpt.cpp:1.12   Thu Apr 21 
16:07:28 2005
+++ llvm/lib/Analysis/DataStructure/DataStructureOpt.cppSun Aug 27 
17:42:51 2006
@@ -47,7 +47,7 @@
 bool OptimizeGlobals(Module M);
   };
 
-  RegisterOptDSOpt X(ds-opt, DSA-based simple optimizations);
+  RegisterPassDSOpt X(ds-opt, DSA-based simple optimizations);
 }
 
 ModulePass *llvm::createDSOptPass() { return new DSOpt(); }


Index: llvm/lib/Analysis/DataStructure/Steensgaard.cpp
diff -u llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.62 
llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.63
--- llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.62Sun Jan 22 
16:52:03 2006
+++ llvm/lib/Analysis/DataStructure/Steensgaard.cpp Sun Aug 27 17:42:51 2006
@@ -73,8 +73,8 @@
   };
 
   // Register the pass...
-  RegisterOptSteens X(steens-aa,
-Steensgaard's alias analysis (DSGraph based));
+  RegisterPassSteens X(steens-aa,
+ Steensgaard's alias analysis (DSGraph based));
 
   // Register as an implementation of AliasAnalysis
   RegisterAnalysisGroupAliasAnalysis, Steens Y;



___
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/BreakCriticalEdges.cpp LCSSA.cpp LoopSimplify.cpp LowerAllocations.cpp LowerInvoke.cpp LowerSelect.cpp LowerSwitch.cpp Mem2Reg.cpp UnifyFunctionExitNodes

2006-08-27 Thread Chris Lattner


Changes in directory llvm/lib/Transforms/Utils:

BreakCriticalEdges.cpp updated: 1.31 - 1.32
LCSSA.cpp updated: 1.27 - 1.28
LoopSimplify.cpp updated: 1.73 - 1.74
LowerAllocations.cpp updated: 1.60 - 1.61
LowerInvoke.cpp updated: 1.38 - 1.39
LowerSelect.cpp updated: 1.6 - 1.7
LowerSwitch.cpp updated: 1.23 - 1.24
Mem2Reg.cpp updated: 1.19 - 1.20
UnifyFunctionExitNodes.cpp updated: 1.35 - 1.36
---
Log message:

eliminate RegisterOpt.  It does the same thing as RegisterPass.


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

 BreakCriticalEdges.cpp |2 +-
 LCSSA.cpp  |2 +-
 LoopSimplify.cpp   |2 +-
 LowerAllocations.cpp   |2 +-
 LowerInvoke.cpp|2 +-
 LowerSelect.cpp|2 +-
 LowerSwitch.cpp|2 +-
 Mem2Reg.cpp|2 +-
 UnifyFunctionExitNodes.cpp |2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)


Index: llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
diff -u llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.31 
llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.32
--- llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.31   Sun Aug 27 
07:54:02 2006
+++ llvm/lib/Transforms/Utils/BreakCriticalEdges.cppSun Aug 27 17:42:52 2006
@@ -47,7 +47,7 @@
 }
   };
 
-  RegisterOptBreakCriticalEdges X(break-crit-edges,
+  RegisterPassBreakCriticalEdges X(break-crit-edges,
 Break critical edges in CFG);
 }
 


Index: llvm/lib/Transforms/Utils/LCSSA.cpp
diff -u llvm/lib/Transforms/Utils/LCSSA.cpp:1.27 
llvm/lib/Transforms/Utils/LCSSA.cpp:1.28
--- llvm/lib/Transforms/Utils/LCSSA.cpp:1.27Tue Aug  1 19:16:47 2006
+++ llvm/lib/Transforms/Utils/LCSSA.cpp Sun Aug 27 17:42:52 2006
@@ -80,7 +80,7 @@
 }
   };
   
-  RegisterOptLCSSA X(lcssa, Loop-Closed SSA Form Pass);
+  RegisterPassLCSSA X(lcssa, Loop-Closed SSA Form Pass);
 }
 
 FunctionPass *llvm::createLCSSAPass() { return new LCSSA(); }


Index: llvm/lib/Transforms/Utils/LoopSimplify.cpp
diff -u llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.73 
llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.74
--- llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.73 Sun Aug 27 07:54:02 2006
+++ llvm/lib/Transforms/Utils/LoopSimplify.cpp  Sun Aug 27 17:42:52 2006
@@ -89,7 +89,7 @@
  std::vectorBasicBlock* PredBlocks);
   };
 
-  RegisterOptLoopSimplify
+  RegisterPassLoopSimplify
   X(loopsimplify, Canonicalize natural loops, true);
 }
 


Index: llvm/lib/Transforms/Utils/LowerAllocations.cpp
diff -u llvm/lib/Transforms/Utils/LowerAllocations.cpp:1.60 
llvm/lib/Transforms/Utils/LowerAllocations.cpp:1.61
--- llvm/lib/Transforms/Utils/LowerAllocations.cpp:1.60 Sun Aug 27 07:54:02 2006
+++ llvm/lib/Transforms/Utils/LowerAllocations.cpp  Sun Aug 27 17:42:52 2006
@@ -65,7 +65,7 @@
 bool runOnBasicBlock(BasicBlock BB);
   };
 
-  RegisterOptLowerAllocations
+  RegisterPassLowerAllocations
   X(lowerallocs, Lower allocations from instructions to calls);
 }
 


Index: llvm/lib/Transforms/Utils/LowerInvoke.cpp
diff -u llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.38 
llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.39
--- llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.38  Sun Aug 27 07:54:02 2006
+++ llvm/lib/Transforms/Utils/LowerInvoke.cpp   Sun Aug 27 17:42:52 2006
@@ -94,7 +94,7 @@
 unsigned JumpBufAlign;
   };
 
-  RegisterOptLowerInvoke
+  RegisterPassLowerInvoke
   X(lowerinvoke, Lower invoke and unwind, for unwindless code generators);
 }
 


Index: llvm/lib/Transforms/Utils/LowerSelect.cpp
diff -u llvm/lib/Transforms/Utils/LowerSelect.cpp:1.6 
llvm/lib/Transforms/Utils/LowerSelect.cpp:1.7
--- llvm/lib/Transforms/Utils/LowerSelect.cpp:1.6   Wed May 17 16:05:27 2006
+++ llvm/lib/Transforms/Utils/LowerSelect.cpp   Sun Aug 27 17:42:52 2006
@@ -50,7 +50,7 @@
 bool runOnFunction(Function F);
   };
 
-  RegisterOptLowerSelect
+  RegisterPassLowerSelect
   X(lowerselect, Lower select instructions to branches);
 }
 


Index: llvm/lib/Transforms/Utils/LowerSwitch.cpp
diff -u llvm/lib/Transforms/Utils/LowerSwitch.cpp:1.23 
llvm/lib/Transforms/Utils/LowerSwitch.cpp:1.24
--- llvm/lib/Transforms/Utils/LowerSwitch.cpp:1.23  Sun Aug 27 07:54:02 2006
+++ llvm/lib/Transforms/Utils/LowerSwitch.cpp   Sun Aug 27 17:42:52 2006
@@ -68,7 +68,7 @@
 }
   };
 
-  RegisterOptLowerSwitch
+  RegisterPassLowerSwitch
   X(lowerswitch, Lower SwitchInst's to branches);
 }
 


Index: llvm/lib/Transforms/Utils/Mem2Reg.cpp
diff -u llvm/lib/Transforms/Utils/Mem2Reg.cpp:1.19 
llvm/lib/Transforms/Utils/Mem2Reg.cpp:1.20
--- llvm/lib/Transforms/Utils/Mem2Reg.cpp:1.19  Sun Aug 27 07:54:02 2006
+++ llvm/lib/Transforms/Utils/Mem2Reg.cpp   Sun Aug 27 17:42:52 2006
@@ -48,7 +48,7 @@
 }
   };
 
-  RegisterOptPromotePass X(mem2reg, Promote Memory to Register);
+  RegisterPassPromotePass X(mem2reg, Promote Memory to Register);
 }  // end of anonymous namespace
 
 bool PromotePass::runOnFunction(Function F) {


Index: 

[llvm-commits] CVS: llvm/include/llvm/PassSupport.h

2006-08-27 Thread Chris Lattner


Changes in directory llvm/include/llvm:

PassSupport.h updated: 1.28 - 1.29
---
Log message:

eliminate RegisterOpt.  It does the same thing as RegisterPass.


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

 PassSupport.h |   47 ---
 1 files changed, 47 deletions(-)


Index: llvm/include/llvm/PassSupport.h
diff -u llvm/include/llvm/PassSupport.h:1.28 
llvm/include/llvm/PassSupport.h:1.29
--- llvm/include/llvm/PassSupport.h:1.28Sun Aug 27 17:30:17 2006
+++ llvm/include/llvm/PassSupport.h Sun Aug 27 17:42:51 2006
@@ -208,53 +208,6 @@
   }
 };
 
-/// RegisterOpt - Register something that is to show up in Opt, this is just a
-/// shortcut for specifying RegisterPass...
-///
-templatetypename PassName
-struct RegisterOpt : public RegisterPassBase {
-  RegisterOpt(const char *PassArg, const char *Name, bool CFGOnly = false)
-  : RegisterPassBase(Name, PassArg, typeid(PassName),
- callDefaultCtorPassName) {
-if (CFGOnly) setOnlyUsesCFG();
-  }
-
-  /// Register Pass using default constructor explicitly...
-  ///
-  RegisterOpt(const char *PassArg, const char *Name, Pass *(*ctor)(),
-  bool CFGOnly = false) 
-  : RegisterPassBase(Name, PassArg, typeid(PassName), ctor) {
-if (CFGOnly) setOnlyUsesCFG();
-  }
-
-  /// Register FunctionPass using default constructor explicitly...
-  ///
-  RegisterOpt(const char *PassArg, const char *Name, FunctionPass *(*ctor)(),
-  bool CFGOnly = false)
-  : RegisterPassBase(Name, PassArg, typeid(PassName),
- static_castPass*(*)()(ctor)) {
-if (CFGOnly) setOnlyUsesCFG();
-  }
-
-  /// Register Pass using TargetMachine constructor...
-  ///
-  RegisterOpt(const char *PassArg, const char *Name,
-   Pass *(*targetctor)(TargetMachine ), bool CFGOnly = false)
-  : RegisterPassBase(Name, PassArg, typeid(PassName), 0, targetctor) {
-if (CFGOnly) setOnlyUsesCFG();
-  }
-
-  /// Register FunctionPass using TargetMachine constructor...
-  ///
-  RegisterOpt(const char *PassArg, const char *Name,
-  FunctionPass *(*targetctor)(TargetMachine ),
-  bool CFGOnly = false)
-  : RegisterPassBase(Name, PassArg, typeid(PassName), 0,
- static_castPass*(*)(TargetMachine)(targetctor)) {
-if (CFGOnly) setOnlyUsesCFG();
-  }
-};
-
 
 /// RegisterAnalysisGroup - Register a Pass as a member of an analysis _group_.
 /// Analysis groups are used to define an interface (which need not derive from



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


[llvm-commits] CVS: llvm/lib/Transforms/Scalar/ADCE.cpp BasicBlockPlacement.cpp CondPropagate.cpp ConstantProp.cpp CorrelatedExprs.cpp DCE.cpp DeadStoreElimination.cpp GCSE.cpp IndVarSimplify.cpp Inst

2006-08-27 Thread Chris Lattner


Changes in directory llvm/lib/Transforms/Scalar:

ADCE.cpp updated: 1.97 - 1.98
BasicBlockPlacement.cpp updated: 1.5 - 1.6
CondPropagate.cpp updated: 1.5 - 1.6
ConstantProp.cpp updated: 1.51 - 1.52
CorrelatedExprs.cpp updated: 1.33 - 1.34
DCE.cpp updated: 1.58 - 1.59
DeadStoreElimination.cpp updated: 1.13 - 1.14
GCSE.cpp updated: 1.47 - 1.48
IndVarSimplify.cpp updated: 1.93 - 1.94
InstructionCombining.cpp updated: 1.500 - 1.501
LICM.cpp updated: 1.77 - 1.78
LoopStrengthReduce.cpp updated: 1.88 - 1.89
LoopUnroll.cpp updated: 1.25 - 1.26
LoopUnswitch.cpp updated: 1.45 - 1.46
LowerGC.cpp updated: 1.12 - 1.13
LowerPacked.cpp updated: 1.8 - 1.9
Reassociate.cpp updated: 1.61 - 1.62
Reg2Mem.cpp updated: 1.6 - 1.7
SCCP.cpp updated: 1.130 - 1.131
ScalarReplAggregates.cpp updated: 1.41 - 1.42
SimplifyCFG.cpp updated: 1.14 - 1.15
TailDuplication.cpp updated: 1.29 - 1.30
TailRecursionElimination.cpp updated: 1.22 - 1.23
---
Log message:

eliminate RegisterOpt.  It does the same thing as RegisterPass.


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

 ADCE.cpp |2 +-
 BasicBlockPlacement.cpp  |4 ++--
 CondPropagate.cpp|2 +-
 ConstantProp.cpp |3 ++-
 CorrelatedExprs.cpp  |2 +-
 DCE.cpp  |4 ++--
 DeadStoreElimination.cpp |2 +-
 GCSE.cpp |2 +-
 IndVarSimplify.cpp   |2 +-
 InstructionCombining.cpp |2 +-
 LICM.cpp |2 +-
 LoopStrengthReduce.cpp   |3 +--
 LoopUnroll.cpp   |2 +-
 LoopUnswitch.cpp |2 +-
 LowerGC.cpp  |2 +-
 LowerPacked.cpp  |2 +-
 Reassociate.cpp  |2 +-
 Reg2Mem.cpp  |2 +-
 SCCP.cpp |4 ++--
 ScalarReplAggregates.cpp |2 +-
 SimplifyCFG.cpp  |2 +-
 TailDuplication.cpp  |2 +-
 TailRecursionElimination.cpp |2 +-
 23 files changed, 27 insertions(+), 27 deletions(-)


Index: llvm/lib/Transforms/Scalar/ADCE.cpp
diff -u llvm/lib/Transforms/Scalar/ADCE.cpp:1.97 
llvm/lib/Transforms/Scalar/ADCE.cpp:1.98
--- llvm/lib/Transforms/Scalar/ADCE.cpp:1.97Fri Jun  2 14:11:46 2006
+++ llvm/lib/Transforms/Scalar/ADCE.cpp Sun Aug 27 17:42:52 2006
@@ -102,7 +102,7 @@
   }
 };
 
-  RegisterOptADCE X(adce, Aggressive Dead Code Elimination);
+  RegisterPassADCE X(adce, Aggressive Dead Code Elimination);
 } // End of anonymous namespace
 
 FunctionPass *llvm::createAggressiveDCEPass() { return new ADCE(); }


Index: llvm/lib/Transforms/Scalar/BasicBlockPlacement.cpp
diff -u llvm/lib/Transforms/Scalar/BasicBlockPlacement.cpp:1.5 
llvm/lib/Transforms/Scalar/BasicBlockPlacement.cpp:1.6
--- llvm/lib/Transforms/Scalar/BasicBlockPlacement.cpp:1.5  Thu Apr 21 
18:45:12 2005
+++ llvm/lib/Transforms/Scalar/BasicBlockPlacement.cpp  Sun Aug 27 17:42:52 2006
@@ -68,8 +68,8 @@
 void PlaceBlocks(BasicBlock *BB);
   };
 
-  RegisterOptBlockPlacement X(block-placement,
-Profile Guided Basic Block Placement);
+  RegisterPassBlockPlacement X(block-placement,
+ Profile Guided Basic Block Placement);
 }
 
 FunctionPass *llvm::createBlockPlacementPass() { return new BlockPlacement(); }


Index: llvm/lib/Transforms/Scalar/CondPropagate.cpp
diff -u llvm/lib/Transforms/Scalar/CondPropagate.cpp:1.5 
llvm/lib/Transforms/Scalar/CondPropagate.cpp:1.6
--- llvm/lib/Transforms/Scalar/CondPropagate.cpp:1.5Mon Aug 14 16:38:05 2006
+++ llvm/lib/Transforms/Scalar/CondPropagate.cppSun Aug 27 17:42:52 2006
@@ -46,7 +46,7 @@
 void SimplifyPredecessors(SwitchInst *SI);
 void RevectorBlockTo(BasicBlock *FromBB, BasicBlock *ToBB);
   };
-  RegisterOptCondProp X(condprop, Conditional Propagation);
+  RegisterPassCondProp X(condprop, Conditional Propagation);
 }
 
 FunctionPass *llvm::createCondPropagationPass() {


Index: llvm/lib/Transforms/Scalar/ConstantProp.cpp
diff -u llvm/lib/Transforms/Scalar/ConstantProp.cpp:1.51 
llvm/lib/Transforms/Scalar/ConstantProp.cpp:1.52
--- llvm/lib/Transforms/Scalar/ConstantProp.cpp:1.51Thu Apr 21 18:45:12 2005
+++ llvm/lib/Transforms/Scalar/ConstantProp.cpp Sun Aug 27 17:42:52 2006
@@ -39,7 +39,8 @@
 }
   };
 
-  RegisterOptConstantPropagation X(constprop,Simple constant 
propagation);
+  RegisterPassConstantPropagation X(constprop,
+  Simple constant propagation);
 }
 
 FunctionPass *llvm::createConstantPropagationPass() {


Index: llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp
diff -u llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.33 
llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.34
--- llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.33 Sun Mar 19 13:37:24 2006
+++ llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp  Sun Aug 27 17:42:52 2006
@@ -286,7 +286,7 @@
 bool SimplifyBasicBlock(BasicBlock BB, const RegionInfo RI);
 bool 

[llvm-commits] CVS: llvm/lib/Transforms/IPO/ArgumentPromotion.cpp ConstantMerge.cpp DeadArgumentElimination.cpp DeadTypeElimination.cpp FunctionResolution.cpp GlobalDCE.cpp GlobalOpt.cpp IPConstantPro

2006-08-27 Thread Chris Lattner


Changes in directory llvm/lib/Transforms/IPO:

ArgumentPromotion.cpp updated: 1.21 - 1.22
ConstantMerge.cpp updated: 1.31 - 1.32
DeadArgumentElimination.cpp updated: 1.27 - 1.28
DeadTypeElimination.cpp updated: 1.55 - 1.56
FunctionResolution.cpp updated: 1.59 - 1.60
GlobalDCE.cpp updated: 1.37 - 1.38
GlobalOpt.cpp updated: 1.62 - 1.63
IPConstantPropagation.cpp updated: 1.18 - 1.19
IndMemRemoval.cpp updated: 1.2 - 1.3
InlineSimple.cpp updated: 1.72 - 1.73
Internalize.cpp updated: 1.34 - 1.35
LoopExtractor.cpp updated: 1.18 - 1.19
LowerSetJmp.cpp updated: 1.28 - 1.29
PruneEH.cpp updated: 1.23 - 1.24
RaiseAllocations.cpp updated: 1.29 - 1.30
SimplifyLibCalls.cpp updated: 1.67 - 1.68
StripSymbols.cpp updated: 1.8 - 1.9
---
Log message:

eliminate RegisterOpt.  It does the same thing as RegisterPass.


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

 ArgumentPromotion.cpp   |4 ++--
 ConstantMerge.cpp   |2 +-
 DeadArgumentElimination.cpp |2 +-
 DeadTypeElimination.cpp |2 +-
 FunctionResolution.cpp  |8 +---
 GlobalDCE.cpp   |2 +-
 GlobalOpt.cpp   |7 ---
 IPConstantPropagation.cpp   |6 +++---
 IndMemRemoval.cpp   |2 +-
 InlineSimple.cpp|2 +-
 Internalize.cpp |2 +-
 LoopExtractor.cpp   |6 +++---
 LowerSetJmp.cpp |2 +-
 PruneEH.cpp |2 +-
 RaiseAllocations.cpp|2 +-
 SimplifyLibCalls.cpp|4 ++--
 StripSymbols.cpp|5 +++--
 17 files changed, 32 insertions(+), 28 deletions(-)


Index: llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
diff -u llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.21 
llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.22
--- llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.21  Sun Jan 22 17:32:06 2006
+++ llvm/lib/Transforms/IPO/ArgumentPromotion.cpp   Sun Aug 27 17:42:52 2006
@@ -72,8 +72,8 @@
 Function *DoPromotion(Function *F, std::vectorArgument* ArgsToPromote);
   };
 
-  RegisterOptArgPromotion X(argpromotion,
-  Promote 'by reference' arguments to scalars);
+  RegisterPassArgPromotion X(argpromotion,
+   Promote 'by reference' arguments to scalars);
 }
 
 ModulePass *llvm::createArgumentPromotionPass() {


Index: llvm/lib/Transforms/IPO/ConstantMerge.cpp
diff -u llvm/lib/Transforms/IPO/ConstantMerge.cpp:1.31 
llvm/lib/Transforms/IPO/ConstantMerge.cpp:1.32
--- llvm/lib/Transforms/IPO/ConstantMerge.cpp:1.31  Tue Mar  7 11:56:59 2006
+++ llvm/lib/Transforms/IPO/ConstantMerge.cpp   Sun Aug 27 17:42:52 2006
@@ -33,7 +33,7 @@
 bool runOnModule(Module M);
   };
 
-  RegisterOptConstantMerge X(constmerge,Merge Duplicate Global 
Constants);
+  RegisterPassConstantMergeX(constmerge,Merge Duplicate Global 
Constants);
 }
 
 ModulePass *llvm::createConstantMergePass() { return new ConstantMerge(); }


Index: llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
diff -u llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:1.27 
llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:1.28
--- llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:1.27Tue Jun 27 
16:05:04 2006
+++ llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp Sun Aug 27 17:42:52 2006
@@ -93,7 +93,7 @@
 
 void RemoveDeadArgumentsFromFunction(Function *F);
   };
-  RegisterOptDAE X(deadargelim, Dead Argument Elimination);
+  RegisterPassDAE X(deadargelim, Dead Argument Elimination);
 
   /// DAH - DeadArgumentHacking pass - Same as dead argument elimination, but
   /// deletes arguments to functions which are external.  This is only for use


Index: llvm/lib/Transforms/IPO/DeadTypeElimination.cpp
diff -u llvm/lib/Transforms/IPO/DeadTypeElimination.cpp:1.55 
llvm/lib/Transforms/IPO/DeadTypeElimination.cpp:1.56
--- llvm/lib/Transforms/IPO/DeadTypeElimination.cpp:1.55Thu Apr 21 
18:39:37 2005
+++ llvm/lib/Transforms/IPO/DeadTypeElimination.cpp Sun Aug 27 17:42:52 2006
@@ -36,7 +36,7 @@
   AU.addRequiredFindUsedTypes();
 }
   };
-  RegisterOptDTE X(deadtypeelim, Dead Type Elimination);
+  RegisterPassDTE X(deadtypeelim, Dead Type Elimination);
   Statistic
   NumKilled(deadtypeelim, Number of unused typenames removed from symtab);
 }


Index: llvm/lib/Transforms/IPO/FunctionResolution.cpp
diff -u llvm/lib/Transforms/IPO/FunctionResolution.cpp:1.59 
llvm/lib/Transforms/IPO/FunctionResolution.cpp:1.60
--- llvm/lib/Transforms/IPO/FunctionResolution.cpp:1.59 Sun Jan 22 17:32:06 2006
+++ llvm/lib/Transforms/IPO/FunctionResolution.cpp  Sun Aug 27 17:42:52 2006
@@ -43,7 +43,7 @@
 
 bool runOnModule(Module M);
   };
-  RegisterOptFunctionResolvingPass X(funcresolve, Resolve Functions);
+  RegisterPassFunctionResolvingPass X(funcresolve, Resolve Functions);
 }
 
 ModulePass *llvm::createFunctionResolvingPass() {
@@ -314,7 +314,8 @@
   Globals[F-getName()].push_back(F);
   }
 
-  for (Module::global_iterator I = M.global_begin(), E = M.global_end(); I 

[llvm-commits] CVS: llvm/test/Regression/Analysis/LoopInfo/2003-05-15-NestingProblem.ll

2006-08-27 Thread Chris Lattner


Changes in directory llvm/test/Regression/Analysis/LoopInfo:

2003-05-15-NestingProblem.ll updated: 1.3 - 1.4
---
Log message:

Update tests now that opt no longer reads .ll files


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

 2003-05-15-NestingProblem.ll |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/test/Regression/Analysis/LoopInfo/2003-05-15-NestingProblem.ll
diff -u llvm/test/Regression/Analysis/LoopInfo/2003-05-15-NestingProblem.ll:1.3 
llvm/test/Regression/Analysis/LoopInfo/2003-05-15-NestingProblem.ll:1.4
--- llvm/test/Regression/Analysis/LoopInfo/2003-05-15-NestingProblem.ll:1.3 
Fri Aug 18 01:34:30 2006
+++ llvm/test/Regression/Analysis/LoopInfo/2003-05-15-NestingProblem.ll Sun Aug 
27 17:47:14 2006
@@ -1,7 +1,7 @@
 ; This testcase was incorrectly computing that the loopentry.7 loop was
 ; not a child of the loopentry.6 loop.
 ;
-; RUN: opt -analyze %s -loops | grep ^Loop Containing:  
%loopentry.7
+; RUN: llvm-as  %s | opt -analyze -loops | grep ^Loop 
Containing:  %loopentry.7
 
 void %getAndMoveToFrontDecode() {  ; No predecessors!
br label %endif.2



___
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-27 Thread Chris Lattner


Changes in directory llvm/docs:

WritingAnLLVMPass.html updated: 1.47 - 1.48
---
Log message:

update doc: analyze is gone and passes should just use RegisterPass


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

 WritingAnLLVMPass.html |   63 +++--
 1 files changed, 20 insertions(+), 43 deletions(-)


Index: llvm/docs/WritingAnLLVMPass.html
diff -u llvm/docs/WritingAnLLVMPass.html:1.47 
llvm/docs/WritingAnLLVMPass.html:1.48
--- llvm/docs/WritingAnLLVMPass.html:1.47   Fri Aug 11 11:37:02 2006
+++ llvm/docs/WritingAnLLVMPass.htmlSun Aug 27 18:18:52 2006
@@ -18,8 +18,7 @@
 ul
 lia href=#makefileSetting up the build environment/a/li
 lia href=#basiccodeBasic code required/a/li
-lia href=#runningRunning a pass with ttopt/tt
- or ttanalyze/tt/a/li
+lia href=#runningRunning a pass with ttopt/tt/a/li
 /ul/li
   lia href=#passtypePass classes and requirements/a
  ul
@@ -194,7 +193,7 @@
 pThis makefile specifies that all of the tt.cpp/tt files in the current
 directory are to be compiled and linked together into a
 ttDebug/lib/Hello.so/tt shared object that can be dynamically loaded by
-the ttopt/tt or ttanalyze/tt tools via their tt-load/tt options.  
+the ttopt/tt or ttbugpoint/tt tools via their tt-load/tt options.  
 If your operating system uses a suffix other than .so (such as windows or 
 Mac OS/X), the appropriate extension will be used./p
 
@@ -271,15 +270,13 @@
 function./p
 
 div class=doc_codepre
-  RegisterOptlt;Hellogt; X(ihello/i, iHello World Pass/i);
+  RegisterPasslt;Hellogt; X(ihello/i, iHello World Pass/i);
 }  i// end of anonymous namespace/i
 /pre/div
 
-pLastly, we register our class ttHello/tt, giving it a command line
-argument tthello/tt, and a name ttHello World Pass/tt.  There are
-several different ways of a href=#registrationregistering your pass/a,
-depending on what it is to be used for.  For optimizations we use the
-ttRegisterOpt/tt template./p
+pLastly, we a href=#registrationregister our class/a ttHello/tt, 
+giving it a command line
+argument tthello/tt, and a name ttHello World Pass/tt./p
 
 pAs a whole, the tt.cpp/tt file looks like:/p
 
@@ -297,7 +294,7 @@
 }
   };
   
-  RegisterOptlt;Hellogt; X(ihello/i, iHello World Pass/i);
+  RegisterPasslt;Hellogt; X(ihello/i, iHello World Pass/i);
 }
 /pre/div
 
@@ -312,14 +309,14 @@
 
 !-- === 
--
 div class=doc_subsection
-  a name=runningRunning a pass with ttopt/tt or ttanalyze/tt/a
+  a name=runningRunning a pass with ttopt/tt/a
 /div
 
 div class=doc_text
 
 pNow that you have a brand new shiny shared object file, we can use the
 ttopt/tt command to run an LLVM program through your pass.  Because you
-registered your pass with the ttRegisterOpt/tt template, you will be able 
to
+registered your pass with the ttRegisterPass/tt template, you will be able 
to
 use the ttopt/tt tool to access it, once loaded./p
 
 pTo test it, follow the example at the end of the a
@@ -844,37 +841,17 @@
 pass registration works, and discussed some of the reasons that it is used and
 what it does.  Here we discuss how and why passes are registered./p
 
-pPasses can be registered in several different ways.  Depending on the 
general
-classification of the pass, you should use one of the following templates to
-register the pass:/p
-
-ul
-libttRegisterOpt/tt/b - This template should be used when you are
-registering a pass that logically should be available for use in the
-'ttopt/tt' utility./li
-
-libttRegisterAnalysis/tt/b - This template should be used when you 
are
-registering a pass that logically should be available for use in the
-'ttanalyze/tt' utility./li
-
-libttRegisterPass/tt/b - This is the generic form of the
-ttRegister*/tt templates that should be used if you want your pass listed 
by
-multiple or no utilities.  This template takes an extra third argument that
-specifies which tools it should be listed in.  See the a
-href=http://llvm.org/doxygen/PassSupport_8h-source.html;PassSupport.h/a
-file for more information./li
-
-/ul
-
-pRegardless of how you register your pass, you must specify at least two
+pAs we saw above, passes are registered with the bttRegisterPass/tt/b
+template, which requires you to pass at least two
 parameters.  The first parameter is the name of the pass that is to be used on
 the command line to specify that the pass should be added to a program (for
-example ttopt/tt or ttanalyze/tt).  The second argument is the name of
-the pass, which is to be used for the tt--help/tt output of programs, as
+example, with ttopt/tt or ttbugpoint/tt).  The second argument is the
+name of the pass, which is to be used for the tt--help/tt output of
+programs, as
 well as for debug output generated by the tt--debug-pass/tt option./p
 
-pIf a pass is registered to be used by the ttanalyze/tt utility, you
-should implement the virtual ttprint/tt method:/p
+pIf you want your 

[llvm-commits] CVS: llvm/lib/VMCore/PassManagerT.h

2006-08-27 Thread Chris Lattner


Changes in directory llvm/lib/VMCore:

PassManagerT.h updated: 1.67 - 1.68
---
Log message:

Silence -Woverloaded-virtual warnings.


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

 PassManagerT.h |   12 +++-
 1 files changed, 11 insertions(+), 1 deletion(-)


Index: llvm/lib/VMCore/PassManagerT.h
diff -u llvm/lib/VMCore/PassManagerT.h:1.67 llvm/lib/VMCore/PassManagerT.h:1.68
--- llvm/lib/VMCore/PassManagerT.h:1.67 Thu Jan 12 10:48:23 2006
+++ llvm/lib/VMCore/PassManagerT.h  Sun Aug 27 19:08:25 2006
@@ -720,6 +720,10 @@
 PassManagerTBBTraits(BBPM-Parent) {
   }
   
+  virtual bool runPass(Module M) { return false; }
+
+  virtual bool runPass(BasicBlock BB) { return BasicBlockPass::runPass(BB); }
+
   // runPass - Specify how the pass should be run on the UnitType
   virtual bool runPass(BBTraits::PassClass *P, BasicBlock *M) {
 // TODO: init and finalize
@@ -790,6 +794,9 @@
 AU.setPreservesAll();
   }
   
+  virtual bool runPass(Module M) { return FunctionPass::runPass(M); }
+  virtual bool runPass(BasicBlock BB) { return FunctionPass::runPass(BB); }
+
   // runPass - Specify how the pass should be run on the UnitType
   virtual bool runPass(FTraits::PassClass *P, Function *F) {
 return P-runOnFunction(*F);
@@ -831,7 +838,10 @@
   
   // runOnModule - Implement the PassManager interface.
   virtual bool runOnModule(Module M);
-  
+
+  virtual bool runPass(Module M) { return ModulePass::runPass(M); }
+  virtual bool runPass(BasicBlock BB) { return ModulePass::runPass(BB); }
+
   // runPass - Specify how the pass should be run on the UnitType
   virtual bool runPass(MTraits::PassClass *P, Module *M) {
 return P-runOnModule(*M);



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


[llvm-commits] CVS: llvm/include/llvm/Pass.h

2006-08-27 Thread Chris Lattner


Changes in directory llvm/include/llvm:

Pass.h updated: 1.53 - 1.54
---
Log message:

Silence -Woverloaded-virtual warnings.


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

 Pass.h |5 -
 1 files changed, 4 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/Pass.h
diff -u llvm/include/llvm/Pass.h:1.53 llvm/include/llvm/Pass.h:1.54
--- llvm/include/llvm/Pass.h:1.53   Wed Jan  4 11:21:23 2006
+++ llvm/include/llvm/Pass.hSun Aug 27 19:09:00 2006
@@ -290,7 +290,7 @@
   ///
   bool run(Function F);
 
-private:
+protected:
   templatetypename Trait friend class PassManagerT;
   friend class ModulePassManager;
   friend class FunctionPassManagerT;
@@ -354,6 +354,9 @@
   templatetypename Trait friend class PassManagerT;
   friend class FunctionPassManagerT;
   friend class BasicBlockPassManager;
+  virtual void addToPassManager(ModulePassManager *PM, AnalysisUsage AU) {
+FunctionPass::addToPassManager(PM, AU);
+  }
   virtual void addToPassManager(FunctionPassManagerT *PM, AnalysisUsage AU);
   virtual void addToPassManager(BasicBlockPassManager *PM,AnalysisUsage AU);
 };



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


[llvm-commits] CVS: llvm/utils/TableGen/Record.h

2006-08-27 Thread Reid Spencer


Changes in directory llvm/utils/TableGen:

Record.h updated: 1.57 - 1.58
---
Log message:

Add virtual methods to all subclasses so they are not overloaded.


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

 Record.h |7 +++
 1 files changed, 7 insertions(+)


Index: llvm/utils/TableGen/Record.h
diff -u llvm/utils/TableGen/Record.h:1.57 llvm/utils/TableGen/Record.h:1.58
--- llvm/utils/TableGen/Record.h:1.57   Fri Mar 31 15:53:49 2006
+++ llvm/utils/TableGen/Record.hSun Aug 27 19:12:25 2006
@@ -122,6 +122,7 @@
   virtual Init *convertValue(VarBitInit *VB) { return (Init*)VB; }
   virtual Init *convertValue(   DefInit *DI) { return 0; }
   virtual Init *convertValue(   DagInit *DI) { return 0; }
+  virtual Init *convertValue( BinOpInit *UI) { return 0; }
   virtual Init *convertValue( TypedInit *TI);
   virtual Init *convertValue(   VarInit *VI) { return RecTy::convertValue(VI);}
   virtual Init *convertValue( FieldInit *FI) { return RecTy::convertValue(FI);}
@@ -163,6 +164,7 @@
   virtual Init *convertValue(VarBitInit *VB) { return 0; }
   virtual Init *convertValue(   DefInit *DI) { return 0; }
   virtual Init *convertValue(   DagInit *DI) { return 0; }
+  virtual Init *convertValue( BinOpInit *UI) { return 0; }
   virtual Init *convertValue( TypedInit *TI);
   virtual Init *convertValue(   VarInit *VI) { return RecTy::convertValue(VI);}
   virtual Init *convertValue( FieldInit *FI) { return RecTy::convertValue(FI);}
@@ -201,6 +203,7 @@
   virtual Init *convertValue(VarBitInit *VB) { return 0; }
   virtual Init *convertValue(   DefInit *DI) { return 0; }
   virtual Init *convertValue(   DagInit *DI) { return 0; }
+  virtual Init *convertValue( BinOpInit *UI) { return 0; }
   virtual Init *convertValue( TypedInit *TI);
   virtual Init *convertValue(   VarInit *VI) { return RecTy::convertValue(VI);}
   virtual Init *convertValue( FieldInit *FI) { return RecTy::convertValue(FI);}
@@ -280,6 +283,7 @@
   virtual Init *convertValue(VarBitInit *VB) { return 0; }
   virtual Init *convertValue(   DefInit *DI) { return 0; }
   virtual Init *convertValue(   DagInit *DI) { return 0; }
+  virtual Init *convertValue( BinOpInit *UI) { return 0; }
   virtual Init *convertValue( TypedInit *TI);
   virtual Init *convertValue(   VarInit *VI) { return RecTy::convertValue(VI);}
   virtual Init *convertValue( FieldInit *FI) { return RecTy::convertValue(FI);}
@@ -316,6 +320,7 @@
   virtual Init *convertValue(VarBitInit *VB) { return 0; }
   virtual Init *convertValue(   DefInit *DI) { return 0; }
   virtual Init *convertValue(   DagInit *DI) { return 0; }
+  virtual Init *convertValue( BinOpInit *UI) { return 0; }
   virtual Init *convertValue( TypedInit *TI);
   virtual Init *convertValue(   VarInit *VI) { return RecTy::convertValue(VI);}
   virtual Init *convertValue( FieldInit *FI) { return RecTy::convertValue(FI);}
@@ -349,6 +354,7 @@
   virtual Init *convertValue(  CodeInit *CI) { return 0; }
   virtual Init *convertValue(VarBitInit *VB) { return 0; }
   virtual Init *convertValue(   DefInit *DI) { return 0; }
+  virtual Init *convertValue( BinOpInit *UI) { return 0; }
   virtual Init *convertValue(   DagInit *CI) { return (Init*)CI; }
   virtual Init *convertValue( TypedInit *TI);
   virtual Init *convertValue(   VarInit *VI) { return RecTy::convertValue(VI);}
@@ -389,6 +395,7 @@
   virtual Init *convertValue(  ListInit *LI) { return 0; }
   virtual Init *convertValue(  CodeInit *CI) { return 0; }
   virtual Init *convertValue(VarBitInit *VB) { return 0; }
+  virtual Init *convertValue( BinOpInit *UI) { return 0; }
   virtual Init *convertValue(   DefInit *DI);
   virtual Init *convertValue(   DagInit *DI) { return 0; }
   virtual Init *convertValue( TypedInit *VI);



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


[llvm-commits] CVS: llvm/docs/Bugpoint.html GettingStarted.html HowToSubmitABug.html index.html

2006-08-27 Thread Reid Spencer


Changes in directory llvm/docs:

Bugpoint.html updated: 1.8 - 1.9
GettingStarted.html updated: 1.143 - 1.144
HowToSubmitABug.html updated: 1.26 - 1.27
index.html updated: 1.57 - 1.58
---
Log message:

Excise references to the now defunct analyze tool. Merge descriptions
where appropriate.


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

 Bugpoint.html|4 ++--
 GettingStarted.html  |   21 +
 HowToSubmitABug.html |6 +++---
 index.html   |3 +--
 4 files changed, 15 insertions(+), 19 deletions(-)


Index: llvm/docs/Bugpoint.html
diff -u llvm/docs/Bugpoint.html:1.8 llvm/docs/Bugpoint.html:1.9
--- llvm/docs/Bugpoint.html:1.8 Tue Aug 15 12:38:36 2006
+++ llvm/docs/Bugpoint.html Sun Aug 27 19:34:18 2006
@@ -124,7 +124,7 @@
 ttbugpoint/tt deletes any individual LLVM instructions whose absence does
 not eliminate the failure.  At the end, ttbugpoint/tt should tell you what
 passes crash, give you a bytecode file, and give you instructions on how to
-reproduce the failure with ttopt/tt, ttanalyze/tt, or ttllc/tt./p
+reproduce the failure with ttopt/tt or ttllc/tt./p
 
 /div
 
@@ -237,7 +237,7 @@
 
   a href=mailto:[EMAIL PROTECTED]Chris Lattner/abr
   a href=http://llvm.org;LLVM Compiler Infrastructure/abr
-  Last modified: $Date: 2006/08/15 17:38:36 $
+  Last modified: $Date: 2006/08/28 00:34:18 $
 /address
 
 /body


Index: llvm/docs/GettingStarted.html
diff -u llvm/docs/GettingStarted.html:1.143 llvm/docs/GettingStarted.html:1.144
--- llvm/docs/GettingStarted.html:1.143 Mon Aug 14 15:51:35 2006
+++ llvm/docs/GettingStarted.html   Sun Aug 27 19:34:18 2006
@@ -81,7 +81,7 @@
 pFirst, LLVM comes in two pieces. The first piece is the LLVM suite. This
 contains all of the tools, libraries, and header files needed to use the low
 level virtual machine.  It contains an assembler, disassembler, bytecode
-analyzer, and bytecode optimizer.  It also contains a test suite that can be
+analyzer and bytecode optimizer.  It also contains a test suite that can be
 used to test the LLVM tools and the GCC front end./p
 
 pThe second piece is the GCC front end.  This component provides a version of
@@ -1299,11 +1299,6 @@
 information is in the a href=CommandGuide/index.htmlCommand Guide/a./p
 
 dl
-  dtttbanalyze/b/tt/dt
-  ddttanalyze/tt is used to run a specific
-  analysis on an input LLVM bytecode file and print out the results.  It is
-  primarily useful for debugging analyses, or familiarizing yourself with
-  what an analysis does./dd
 
   dtttbbugpoint/b/tt/dt
   ddttbugpoint/tt is used to debug
@@ -1395,11 +1390,13 @@
   /dd
 
   dtttbopt/b/tt/dt
-  ddttopt/tt reads LLVM bytecode, applies a
-  series of LLVM to LLVM transformations (which are specified on the command
-  line), and then outputs the resultant bytecode.  The 'ttopt --help/tt'
-  command is a good way to get a list of the program transformations
-  available in LLVM./dd
+  ddttopt/tt reads LLVM bytecode, applies a series of LLVM to LLVM 
+  transformations (which are specified on the command line), and then outputs 
+  the resultant bytecode.  The 'ttopt --help/tt' command is a good way to 
+  get a list of the program transformations available in LLVM.br/
+  ddttopt/tt can also be used to run a specific analysis on an input 
+  LLVM bytecode file and print out the results.  It is primarily useful for 
+  debugging analyses, or familiarizing yourself with what an analysis 
does./dd
 /dl
 /div
 
@@ -1677,7 +1674,7 @@
   a href=mailto:[EMAIL PROTECTED]Chris Lattner/abr
   a href=http://llvm.x10sys.com/rspencer/;Reid Spencer/abr
   a href=http://llvm.org;The LLVM Compiler Infrastructure/abr
-  Last modified: $Date: 2006/08/14 20:51:35 $
+  Last modified: $Date: 2006/08/28 00:34:18 $
 /address
 /body
 /html


Index: llvm/docs/HowToSubmitABug.html
diff -u llvm/docs/HowToSubmitABug.html:1.26 llvm/docs/HowToSubmitABug.html:1.27
--- llvm/docs/HowToSubmitABug.html:1.26 Mon Mar 13 23:39:39 2006
+++ llvm/docs/HowToSubmitABug.html  Sun Aug 27 19:34:18 2006
@@ -82,8 +82,8 @@
 div class=doc_text
 
 pMore often than not, bugs in the compiler cause it to crash - often due to 
an
-assertion failure of some sort.  If you are running ttbopt/b/tt or
-ttbanalyze/b/tt directly, and something crashes, jump to the section on
+assertion failure of some sort.  If you are running ttbopt/b/tt 
+directly, and something crashes, jump to the section on
 a href=#passesbugs in LLVM passes/a.  Otherwise, the most important
 piece of the puzzle is to figure out if it is the GCC-based front-end that is
 buggy or if it's one of the LLVM tools that has problems./p
@@ -352,7 +352,7 @@
   a href=mailto:[EMAIL PROTECTED]Chris Lattner/abr
   a href=http://llvm.org;The LLVM Compiler Infrastructure/a
   br
-  Last modified: $Date: 2006/03/14 05:39:39 $
+  Last modified: $Date: 2006/08/28 00:34:18 $
 /address
 
 /body


Index: llvm/docs/index.html
diff -u llvm/docs/index.html:1.57 llvm/docs/index.html:1.58
--- llvm/docs/index.html:1.57   Mon Aug 14 

[llvm-commits] CVS: llvm/docs/CommandGuide/bugpoint.pod index.html opt.pod analyze.pod

2006-08-27 Thread Reid Spencer


Changes in directory llvm/docs/CommandGuide:

bugpoint.pod updated: 1.8 - 1.9
index.html updated: 1.28 - 1.29
opt.pod updated: 1.3 - 1.4
analyze.pod (r1.3) removed
---
Log message:

Excise references to the now defunct analyze tool. Merge descriptions
where appropriate.


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

 bugpoint.pod |2 +-
 index.html   |5 +
 opt.pod  |   40 ++--
 3 files changed, 24 insertions(+), 23 deletions(-)


Index: llvm/docs/CommandGuide/bugpoint.pod
diff -u llvm/docs/CommandGuide/bugpoint.pod:1.8 
llvm/docs/CommandGuide/bugpoint.pod:1.9
--- llvm/docs/CommandGuide/bugpoint.pod:1.8 Tue Aug 15 12:39:40 2006
+++ llvm/docs/CommandGuide/bugpoint.pod Sun Aug 27 19:34:19 2006
@@ -114,7 +114,7 @@
 
 =head1 SEE ALSO
 
-Lopt|opt, Lanalyze|analyze
+Lopt|opt
 
 =head1 AUTHOR
 


Index: llvm/docs/CommandGuide/index.html
diff -u llvm/docs/CommandGuide/index.html:1.28 
llvm/docs/CommandGuide/index.html:1.29
--- llvm/docs/CommandGuide/index.html:1.28  Fri Jun  2 12:43:38 2006
+++ llvm/docs/CommandGuide/index.html   Sun Aug 27 19:34:19 2006
@@ -51,9 +51,6 @@
 lia href=html/llvm-link.htmlbllvm-link/b/a -
 link several bytecode files into one/li
 
-lia href=html/analyze.htmlbanalyze/b/a -
-run LLVM analyses on a bytecode file and print the results/li
-
 lia href=html/llvm-ar.htmlbllvm-ar/b/a - 
 archive bytecode files/li
 
@@ -159,7 +156,7 @@
   src=http://www.w3.org/Icons/valid-html401; alt=Valid HTML 4.01!/a
 
   a href=http://llvm.org;LLVM Compiler Infrastructure/abr
-  Last modified: $Date: 2006/06/02 17:43:38 $
+  Last modified: $Date: 2006/08/28 00:34:19 $
 /address
 
 /body


Index: llvm/docs/CommandGuide/opt.pod
diff -u llvm/docs/CommandGuide/opt.pod:1.3 llvm/docs/CommandGuide/opt.pod:1.4
--- llvm/docs/CommandGuide/opt.pod:1.3  Mon Mar 13 23:42:07 2006
+++ llvm/docs/CommandGuide/opt.pod  Sun Aug 27 19:34:19 2006
@@ -10,17 +10,25 @@
 
 =head1 DESCRIPTION
 
-The Bopt command is the modular LLVM optimizer.  It takes LLVM
-bytecode as input, runs the specified optimizations on it, and then
-outputs the optimized LLVM bytecode.
-
-The optimizations available via Bopt depend upon what libraries
-were linked into it as well as any additional libraries that have
-been loaded with the B-load option.  Use the B-help option to
-determine what optimizations you can use.
+The Bopt command is the modular LLVM optimizer and analyzer.  It takes LLVM 
+bytecode as input, runs the specified optimizations or analyses on it, and then
+outputs the optimized LLVM bytecode or the analysis results.  The function of 
+Bopt depends on whether the B-analyze option is given. 
+
+When B-analyze is specified, Bopt performs various analyses of LLVM 
+bytecode.  It will usually print the results on standard output, but in a few 
+cases, it will print output to standard error or generate a file with the 
+analysis output, which is usually done when the output is meant for another 
+program.  
+
+While B-analyze is Inot given, Bopt attempts to produce an optimized 
+bytecode file.  The optimizations available via Bopt depend upon what 
+libraries were linked into it as well as any additional libraries that have 
+been loaded with the B-load option.  Use the B-help option to determine 
+what optimizations you can use.
 
-If no filename is specified on the command line, Bopt reads its
-input from standard input.
+If Ifilename is omitted from the command line or is I-, Bopt reads its
+input from standard input. The input must be an LLVM bytecode file.
 
 If an output filename is not specified with the B-o option, Bopt
 writes its output to the standard output.
@@ -64,10 +72,10 @@
 
 =item B-load=Iplugin
 
-Load the dynamic object Iplugin.  This object should register new
-optimization passes.  Once loaded, the object will add new command line
-options to enable various optimizations.  To see the new complete list
-of optimizations, use the B-help and B-load options together:
+Load the dynamic object Iplugin.  This object should register new 
optimization
+or analysis passes. Once loaded, the object will add new command line options 
to
+enable various optimizations or analyses.  To see the new complete list of 
+optimizations, use the B-help and B-load options together. For example:
 
 =over
 
@@ -86,10 +94,6 @@
 If Bopt succeeds, it will exit with 0.  Otherwise, if an error
 occurs, it will exit with a non-zero value.
 
-=head1 SEE ALSO
-
-Lanalyze|analyze
-
 =head1 AUTHORS
 
 Maintained by the LLVM Team (Lhttp://llvm.org).



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


[llvm-commits] CVS: llvm/lib/System/Mutex.cpp

2006-08-27 Thread Chris Lattner


Changes in directory llvm/lib/System:

Mutex.cpp updated: 1.8 - 1.9
---
Log message:

simplify AnalysisGroup registration, eliminating one typeid call.


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

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


Index: llvm/lib/System/Mutex.cpp
diff -u llvm/lib/System/Mutex.cpp:1.8 llvm/lib/System/Mutex.cpp:1.9
--- llvm/lib/System/Mutex.cpp:1.8   Wed Jul 26 11:18:00 2006
+++ llvm/lib/System/Mutex.cpp   Sun Aug 27 19:42:29 2006
@@ -53,7 +53,7 @@
 //   is configured into the LIBS variable.
 // Note: this line of code generates a warning if pthread_mutex_init is not
 //   declared with weak linkage. It's safe to ignore the warning.
-static const bool pthread_enabled = static_castbool(pthread_mutex_init);
+static const bool pthread_enabled = true;
 
 // Construct a Mutex using pthread calls
 Mutex::Mutex( bool recursive)



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


[llvm-commits] CVS: llvm/lib/Analysis/AliasAnalysisCounter.cpp BasicAliasAnalysis.cpp LoadValueNumbering.cpp ProfileInfo.cpp ProfileInfoLoaderPass.cpp ValueNumbering.cpp

2006-08-27 Thread Chris Lattner


Changes in directory llvm/lib/Analysis:

AliasAnalysisCounter.cpp updated: 1.14 - 1.15
BasicAliasAnalysis.cpp updated: 1.84 - 1.85
LoadValueNumbering.cpp updated: 1.35 - 1.36
ProfileInfo.cpp updated: 1.8 - 1.9
ProfileInfoLoaderPass.cpp updated: 1.14 - 1.15
ValueNumbering.cpp updated: 1.20 - 1.21
---
Log message:

simplify AnalysisGroup registration, eliminating one typeid call.


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

 AliasAnalysisCounter.cpp  |2 +-
 BasicAliasAnalysis.cpp|4 ++--
 LoadValueNumbering.cpp|2 +-
 ProfileInfo.cpp   |2 +-
 ProfileInfoLoaderPass.cpp |2 +-
 ValueNumbering.cpp|2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)


Index: llvm/lib/Analysis/AliasAnalysisCounter.cpp
diff -u llvm/lib/Analysis/AliasAnalysisCounter.cpp:1.14 
llvm/lib/Analysis/AliasAnalysisCounter.cpp:1.15
--- llvm/lib/Analysis/AliasAnalysisCounter.cpp:1.14 Sun Aug 27 17:42:51 2006
+++ llvm/lib/Analysis/AliasAnalysisCounter.cpp  Sun Aug 27 19:42:29 2006
@@ -111,7 +111,7 @@
 
   RegisterPassAliasAnalysisCounter
   X(count-aa, Count Alias Analysis Query Responses);
-  RegisterAnalysisGroupAliasAnalysis, AliasAnalysisCounter Y;
+  RegisterAnalysisGroupAliasAnalysis Y(X);
 }
 
 ModulePass *llvm::createAliasAnalysisCounterPass() {


Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp
diff -u llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.84 
llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.85
--- llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.84   Sun Aug 27 17:42:51 2006
+++ llvm/lib/Analysis/BasicAliasAnalysis.cppSun Aug 27 19:42:29 2006
@@ -76,7 +76,7 @@
   U(no-aa, No Alias Analysis (always returns 'may' alias));
 
   // Declare that we implement the AliasAnalysis interface
-  RegisterAnalysisGroupAliasAnalysis, NoAA V;
+  RegisterAnalysisGroupAliasAnalysis V(U);
 }  // End of anonymous namespace
 
 ImmutablePass *llvm::createNoAAPass() { return new NoAA(); }
@@ -121,7 +121,7 @@
   X(basicaa, Basic Alias Analysis (default AA impl));
 
   // Declare that we implement the AliasAnalysis interface
-  RegisterAnalysisGroupAliasAnalysis, BasicAliasAnalysis, true Y;
+  RegisterAnalysisGroupAliasAnalysis, true Y(X);
 }  // End of anonymous namespace
 
 ImmutablePass *llvm::createBasicAliasAnalysisPass() {


Index: llvm/lib/Analysis/LoadValueNumbering.cpp
diff -u llvm/lib/Analysis/LoadValueNumbering.cpp:1.35 
llvm/lib/Analysis/LoadValueNumbering.cpp:1.36
--- llvm/lib/Analysis/LoadValueNumbering.cpp:1.35   Sun Aug 27 17:42:51 2006
+++ llvm/lib/Analysis/LoadValueNumbering.cppSun Aug 27 19:42:29 2006
@@ -84,7 +84,7 @@
   RegisterPassLoadVN X(load-vn, Load Value Numbering);
 
   // Declare that we implement the ValueNumbering interface
-  RegisterAnalysisGroupValueNumbering, LoadVN Y;
+  RegisterAnalysisGroupValueNumbering Y(X);
 }
 
 FunctionPass *llvm::createLoadValueNumberingPass() { return new LoadVN(); }


Index: llvm/lib/Analysis/ProfileInfo.cpp
diff -u llvm/lib/Analysis/ProfileInfo.cpp:1.8 
llvm/lib/Analysis/ProfileInfo.cpp:1.9
--- llvm/lib/Analysis/ProfileInfo.cpp:1.8   Sun Aug 27 17:42:51 2006
+++ llvm/lib/Analysis/ProfileInfo.cpp   Sun Aug 27 19:42:29 2006
@@ -89,7 +89,7 @@
   X(no-profile, No Profile Information);
 
   // Declare that we implement the ProfileInfo interface
-  RegisterAnalysisGroupProfileInfo, NoProfileInfo, true Y;
+  RegisterAnalysisGroupProfileInfo, true Y(X);
 }  // End of anonymous namespace
 
 ImmutablePass *llvm::createNoProfileInfoPass() { return new NoProfileInfo(); }


Index: llvm/lib/Analysis/ProfileInfoLoaderPass.cpp
diff -u llvm/lib/Analysis/ProfileInfoLoaderPass.cpp:1.14 
llvm/lib/Analysis/ProfileInfoLoaderPass.cpp:1.15
--- llvm/lib/Analysis/ProfileInfoLoaderPass.cpp:1.14Sun Aug 27 17:42:51 2006
+++ llvm/lib/Analysis/ProfileInfoLoaderPass.cpp Sun Aug 27 19:42:29 2006
@@ -52,7 +52,7 @@
   RegisterPassLoaderPass
   X(profile-loader, Load profile information from llvmprof.out);
 
-  RegisterAnalysisGroupProfileInfo, LoaderPass Y;
+  RegisterAnalysisGroupProfileInfo Y(X);
 }  // End of anonymous namespace
 
 ModulePass *llvm::createProfileLoaderPass() { return new LoaderPass(); }


Index: llvm/lib/Analysis/ValueNumbering.cpp
diff -u llvm/lib/Analysis/ValueNumbering.cpp:1.20 
llvm/lib/Analysis/ValueNumbering.cpp:1.21
--- llvm/lib/Analysis/ValueNumbering.cpp:1.20   Sun Aug 27 17:42:51 2006
+++ llvm/lib/Analysis/ValueNumbering.cppSun Aug 27 19:42:29 2006
@@ -64,7 +64,7 @@
   X(basicvn, Basic Value Numbering (default GVN impl));
 
   // Declare that we implement the ValueNumbering interface
-  RegisterAnalysisGroupValueNumbering, BasicVN, true Y;
+  RegisterAnalysisGroupValueNumbering, true Y(X);
 
   /// BVNImpl - Implement BasicVN in terms of a visitor class that
   /// handles the different types of instructions as appropriate.



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


[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructureAA.cpp Steensgaard.cpp

2006-08-27 Thread Chris Lattner


Changes in directory llvm/lib/Analysis/DataStructure:

DataStructureAA.cpp updated: 1.39 - 1.40
Steensgaard.cpp updated: 1.63 - 1.64
---
Log message:

simplify AnalysisGroup registration, eliminating one typeid call.


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

 DataStructureAA.cpp |2 +-
 Steensgaard.cpp |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/lib/Analysis/DataStructure/DataStructureAA.cpp
diff -u llvm/lib/Analysis/DataStructure/DataStructureAA.cpp:1.39 
llvm/lib/Analysis/DataStructure/DataStructureAA.cpp:1.40
--- llvm/lib/Analysis/DataStructure/DataStructureAA.cpp:1.39Sun Aug 27 
17:42:51 2006
+++ llvm/lib/Analysis/DataStructure/DataStructureAA.cpp Sun Aug 27 19:42:29 2006
@@ -99,7 +99,7 @@
   RegisterPassDSAA X(ds-aa, Data Structure Graph Based Alias Analysis);
 
   // Register as an implementation of AliasAnalysis
-  RegisterAnalysisGroupAliasAnalysis, DSAA Y;
+  RegisterAnalysisGroupAliasAnalysis Y(X);
 }
 
 ModulePass *llvm::createDSAAPass() { return new DSAA(); }


Index: llvm/lib/Analysis/DataStructure/Steensgaard.cpp
diff -u llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.63 
llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.64
--- llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.63Sun Aug 27 
17:42:51 2006
+++ llvm/lib/Analysis/DataStructure/Steensgaard.cpp Sun Aug 27 19:42:29 2006
@@ -77,7 +77,7 @@
  Steensgaard's alias analysis (DSGraph based));
 
   // Register as an implementation of AliasAnalysis
-  RegisterAnalysisGroupAliasAnalysis, Steens Y;
+  RegisterAnalysisGroupAliasAnalysis Y(X);
 }
 
 ModulePass *llvm::createSteensgaardPass() { return new Steens(); }



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


[llvm-commits] CVS: llvm/include/llvm/PassSupport.h

2006-08-27 Thread Chris Lattner


Changes in directory llvm/include/llvm:

PassSupport.h updated: 1.29 - 1.30
---
Log message:

simplify AnalysisGroup registration, eliminating one typeid call.


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

 PassSupport.h |   18 +-
 1 files changed, 5 insertions(+), 13 deletions(-)


Index: llvm/include/llvm/PassSupport.h
diff -u llvm/include/llvm/PassSupport.h:1.29 
llvm/include/llvm/PassSupport.h:1.30
--- llvm/include/llvm/PassSupport.h:1.29Sun Aug 27 17:42:51 2006
+++ llvm/include/llvm/PassSupport.h Sun Aug 27 19:42:29 2006
@@ -241,23 +241,15 @@
   ~RegisterAGBase();
 };
 
-
-templatetypename Interface, typename DefaultImplementationPass = void,
- bool Default = false
+templatetypename Interface, bool Default = false
 struct RegisterAnalysisGroup : public RegisterAGBase {
-  RegisterAnalysisGroup() : RegisterAGBase(typeid(Interface),
-   typeid(DefaultImplementationPass),
-   Default) {
+  RegisterAnalysisGroup(RegisterPassBase RPB)
+: RegisterAGBase(typeid(Interface), RPB.getPassInfo()-getTypeInfo(), 
+ Default) {
   }
-};
 
-/// Define a specialization of RegisterAnalysisGroup that is used to set the
-/// name for the analysis group.
-///
-templatetypename Interface
-struct RegisterAnalysisGroupInterface, void, false : public RegisterAGBase {
   RegisterAnalysisGroup(const char *Name)
-: RegisterAGBase(typeid(Interface)) {
+  : RegisterAGBase(typeid(Interface)) {
 setGroupName(Name);
   }
 };



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


[llvm-commits] CVS: llvm/lib/Analysis/IPA/Andersens.cpp CallGraph.cpp GlobalsModRef.cpp

2006-08-27 Thread Chris Lattner


Changes in directory llvm/lib/Analysis/IPA:

Andersens.cpp updated: 1.31 - 1.32
CallGraph.cpp updated: 1.56 - 1.57
GlobalsModRef.cpp updated: 1.20 - 1.21
---
Log message:

simplify AnalysisGroup registration, eliminating one typeid call.


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

 Andersens.cpp |2 +-
 CallGraph.cpp |2 +-
 GlobalsModRef.cpp |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)


Index: llvm/lib/Analysis/IPA/Andersens.cpp
diff -u llvm/lib/Analysis/IPA/Andersens.cpp:1.31 
llvm/lib/Analysis/IPA/Andersens.cpp:1.32
--- llvm/lib/Analysis/IPA/Andersens.cpp:1.31Sun Aug 27 17:42:51 2006
+++ llvm/lib/Analysis/IPA/Andersens.cpp Sun Aug 27 19:42:29 2006
@@ -338,7 +338,7 @@
 
   RegisterPassAndersens X(anders-aa,
 Andersen's Interprocedural Alias Analysis);
-  RegisterAnalysisGroupAliasAnalysis, Andersens Y;
+  RegisterAnalysisGroupAliasAnalysis Y(X);
 }
 
 ModulePass *llvm::createAndersensPass() { return new Andersens(); }


Index: llvm/lib/Analysis/IPA/CallGraph.cpp
diff -u llvm/lib/Analysis/IPA/CallGraph.cpp:1.56 
llvm/lib/Analysis/IPA/CallGraph.cpp:1.57
--- llvm/lib/Analysis/IPA/CallGraph.cpp:1.56Sun Aug 27 17:42:51 2006
+++ llvm/lib/Analysis/IPA/CallGraph.cpp Sun Aug 27 19:42:29 2006
@@ -183,7 +183,7 @@
 
 RegisterAnalysisGroupCallGraph X(Call Graph);
 RegisterPassBasicCallGraph Y(basiccg, Basic CallGraph Construction);
-RegisterAnalysisGroupCallGraph, BasicCallGraph, true Z;
+RegisterAnalysisGroupCallGraph, true Z(Y);
 
 } //End anonymous namespace
 


Index: llvm/lib/Analysis/IPA/GlobalsModRef.cpp
diff -u llvm/lib/Analysis/IPA/GlobalsModRef.cpp:1.20 
llvm/lib/Analysis/IPA/GlobalsModRef.cpp:1.21
--- llvm/lib/Analysis/IPA/GlobalsModRef.cpp:1.20Sun Aug 27 17:42:51 2006
+++ llvm/lib/Analysis/IPA/GlobalsModRef.cpp Sun Aug 27 19:42:29 2006
@@ -137,7 +137,7 @@
 
   RegisterPassGlobalsModRef X(globalsmodref-aa,
 Simple mod/ref analysis for globals);
-  RegisterAnalysisGroupAliasAnalysis, GlobalsModRef Y;
+  RegisterAnalysisGroupAliasAnalysis Y(X);
 }
 
 Pass *llvm::createGlobalsModRefPass() { return new GlobalsModRef(); }



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


[llvm-commits] CVS: llvm/include/llvm/Assembly/Writer.h

2006-08-27 Thread Reid Spencer


Changes in directory llvm/include/llvm/Assembly:

Writer.h updated: 1.32 - 1.33
---
Log message:

For PR387: http://llvm.org/PR387 :
Close out this long standing bug by removing the remaining overloaded
virtual functions in LLVM. The -Woverloaded-virtual option is now turned on.


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

 Writer.h |4 
 1 files changed, 4 insertions(+)


Index: llvm/include/llvm/Assembly/Writer.h
diff -u llvm/include/llvm/Assembly/Writer.h:1.32 
llvm/include/llvm/Assembly/Writer.h:1.33
--- llvm/include/llvm/Assembly/Writer.h:1.32Thu Apr 21 22:27:03 2005
+++ llvm/include/llvm/Assembly/Writer.h Sun Aug 27 20:02:49 2006
@@ -43,6 +43,10 @@
 std::ostream WriteAsOperand(std::ostream, const Type*, bool PrintTy = true,
  bool PrintName = true, const Module* Context = 0);
 
+#ifndef NDEBUG
+void dumpType(const Type* Ty);
+void dumpValue(const Value* Val);
+#endif
 } // End llvm namespace
 
 #endif



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


[llvm-commits] CVS: llvm/tools/opt/GraphPrinters.cpp

2006-08-27 Thread Reid Spencer


Changes in directory llvm/tools/opt:

GraphPrinters.cpp updated: 1.12 - 1.13
---
Log message:

For PR387: http://llvm.org/PR387 :
Close out this long standing bug by removing the remaining overloaded
virtual functions in LLVM. The -Woverloaded-virtual option is now turned on.


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

 GraphPrinters.cpp |1 +
 1 files changed, 1 insertion(+)


Index: llvm/tools/opt/GraphPrinters.cpp
diff -u llvm/tools/opt/GraphPrinters.cpp:1.12 
llvm/tools/opt/GraphPrinters.cpp:1.13
--- llvm/tools/opt/GraphPrinters.cpp:1.12   Sun Aug 27 17:30:17 2006
+++ llvm/tools/opt/GraphPrinters.cppSun Aug 27 20:02:49 2006
@@ -65,6 +65,7 @@
 }
 
 void print(std::ostream OS) const {}
+void print(std::ostream OS, const llvm::Module*) const {}
 
 virtual void getAnalysisUsage(AnalysisUsage AU) const {
   AU.addRequiredCallGraph();



___
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 PPCISelLowering.h

2006-08-27 Thread Reid Spencer


Changes in directory llvm/lib/Target/PowerPC:

PPCISelLowering.cpp updated: 1.204 - 1.205
PPCISelLowering.h updated: 1.51 - 1.52
---
Log message:

For PR387: http://llvm.org/PR387 :
Close out this long standing bug by removing the remaining overloaded
virtual functions in LLVM. The -Woverloaded-virtual option is now turned on.


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

 PPCISelLowering.cpp |4 
 PPCISelLowering.h   |1 +
 2 files changed, 5 insertions(+)


Index: llvm/lib/Target/PowerPC/PPCISelLowering.cpp
diff -u llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.204 
llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.205
--- llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.204   Sat Aug 12 02:20:05 2006
+++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp Sun Aug 27 20:02:49 2006
@@ -2691,3 +2691,7 @@
   // PPC allows a sign-extended 16-bit immediate field.
   return (V  -(1  16)  V  (1  16)-1);
 }
+
+bool PPCTargetLowering::isLegalAddressImmediate(llvm::GlobalValue* GV) const {
+  return TargetLowering::isLegalAddressImmediate(GV); 
+}


Index: llvm/lib/Target/PowerPC/PPCISelLowering.h
diff -u llvm/lib/Target/PowerPC/PPCISelLowering.h:1.51 
llvm/lib/Target/PowerPC/PPCISelLowering.h:1.52
--- llvm/lib/Target/PowerPC/PPCISelLowering.h:1.51  Mon Jul 10 15:56:58 2006
+++ llvm/lib/Target/PowerPC/PPCISelLowering.h   Sun Aug 27 20:02:49 2006
@@ -199,6 +199,7 @@
 /// isLegalAddressImmediate - Return true if the integer value can be used
 /// as the offset of the target addressing mode.
 virtual bool isLegalAddressImmediate(int64_t V) const;
+virtual bool isLegalAddressImmediate(llvm::GlobalValue*) const;
   };
 }
 



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


[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnroll.cpp

2006-08-27 Thread Owen Anderson


Changes in directory llvm/lib/Transforms/Scalar:

LoopUnroll.cpp updated: 1.26 - 1.27
---
Log message:

Make LoopUnroll fold excessive BasicBlocks.  This results in a significant 
speedup of
gccas on 252.eon


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

 LoopUnroll.cpp |   98 +++--
 1 files changed, 89 insertions(+), 9 deletions(-)


Index: llvm/lib/Transforms/Scalar/LoopUnroll.cpp
diff -u llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.26 
llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.27
--- llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.26  Sun Aug 27 17:42:52 2006
+++ llvm/lib/Transforms/Scalar/LoopUnroll.cpp   Sun Aug 27 21:09:46 2006
@@ -25,6 +25,7 @@
 #include llvm/Analysis/LoopInfo.h
 #include llvm/Transforms/Utils/Cloning.h
 #include llvm/Transforms/Utils/Local.h
+#include llvm/Support/CFG.h
 #include llvm/Support/CommandLine.h
 #include llvm/Support/Debug.h
 #include llvm/ADT/Statistic.h
@@ -48,6 +49,7 @@
   public:
 virtual bool runOnFunction(Function F);
 bool visitLoop(Loop *L);
+BasicBlock* FoldBlockIntoPredecessor(BasicBlock* BB);
 
 /// This transformation requires natural loop information  requires that
 /// loop preheaders be inserted into the CFG...
@@ -118,6 +120,76 @@
   }
 }
 
+// FoldBlockIntoPredecessor - Folds a basic block into its predecessor if it
+// only has one predecessor, and that predecessor only has one successor.
+// Returns the new combined block.
+BasicBlock* LoopUnroll::FoldBlockIntoPredecessor(BasicBlock* BB) {
+  // Merge basic blocks into their predecessor if there is only one distinct
+  // pred, and if there is only one distinct successor of the predecessor, and
+  // if there are no PHI nodes.
+  //
+  pred_iterator PI(pred_begin(BB)), PE(pred_end(BB));
+  BasicBlock *OnlyPred = *PI++;
+  for (; PI != PE; ++PI)  // Search all predecessors, see if they are all same
+if (*PI != OnlyPred) {
+  OnlyPred = 0;   // There are multiple different predecessors...
+  break;
+}
+
+  BasicBlock *OnlySucc = 0;
+  if (OnlyPred  OnlyPred != BB // Don't break self loops
+  OnlyPred-getTerminator()-getOpcode() != Instruction::Invoke) {
+// Check to see if there is only one distinct successor...
+succ_iterator SI(succ_begin(OnlyPred)), SE(succ_end(OnlyPred));
+OnlySucc = BB;
+for (; SI != SE; ++SI)
+  if (*SI != OnlySucc) {
+OnlySucc = 0; // There are multiple distinct successors!
+break;
+  }
+  }
+
+  if (OnlySucc) {
+DEBUG(std::cerr  Merging:   *BB  into:   *OnlyPred);
+TerminatorInst *Term = OnlyPred-getTerminator();
+
+// Resolve any PHI nodes at the start of the block.  They are all
+// guaranteed to have exactly one entry if they exist, unless there are
+// multiple duplicate (but guaranteed to be equal) entries for the
+// incoming edges.  This occurs when there are multiple edges from
+// OnlyPred to OnlySucc.
+//
+while (PHINode *PN = dyn_castPHINode(BB-front())) {
+  PN-replaceAllUsesWith(PN-getIncomingValue(0));
+  BB-getInstList().pop_front();  // Delete the phi node...
+}
+
+// Delete the unconditional branch from the predecessor...
+OnlyPred-getInstList().pop_back();
+
+// Move all definitions in the successor to the predecessor...
+OnlyPred-getInstList().splice(OnlyPred-end(), BB-getInstList());
+
+// Make all PHI nodes that referred to BB now refer to Pred as their
+// source...
+BB-replaceAllUsesWith(OnlyPred);
+
+std::string OldName = BB-getName();
+
+// Erase basic block from the function...
+LI-removeBlock(BB);
+BB-eraseFromParent();
+
+// Inherit predecessors name if it exists...
+if (!OldName.empty()  !OnlyPred-hasName())
+  OnlyPred-setName(OldName);
+
+return OnlyPred;
+  }
+  
+  return 0;
+}
+
 bool LoopUnroll::visitLoop(Loop *L) {
   bool Changed = false;
 
@@ -247,13 +319,7 @@
 RemapInstruction(I, LastValueMap);
   }
 
-  //  Insert the branches that link the different iterations together
-  for (unsigned i = 0; i  Latches.size()-1; ++i)
-new BranchInst(Headers[i+1], Latches[i]);
   
-  // Finally, add an unconditional branch to the block to continue into the 
exit
-  // block.
-  new BranchInst(LoopExit, Latches[Latches.size()-1]);
  
   // Update PHI nodes that reference the final latch block
   if (TripCount  1) {
@@ -281,14 +347,28 @@
 PHINode *PN = OrigPHINode[i];
 PN-replaceAllUsesWith(PN-getIncomingValueForBlock(Preheader));
 Header-getInstList().erase(PN);
-  }  
-
+  }
+  
+  //  Insert the branches that link the different iterations together
+  for (unsigned i = 0; i  Latches.size()-1; ++i) {
+new BranchInst(Headers[i+1], Latches[i]);
+if(BasicBlock* Fold = FoldBlockIntoPredecessor(Headers[i+1])) {
+  std::replace(Latches.begin(), Latches.end(), Headers[i+1], Fold);
+  std::replace(Headers.begin(), Headers.end(), Headers[i+1], Fold);
+}
+  }
+  
+  // Finally, 

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

2006-08-27 Thread Bill Wendling


Changes in directory llvm/docs:

CodeGenerator.html updated: 1.30 - 1.31
---
Log message:

Added some preliminary text to the TargetJITInfo class section.
Fixed some inconsistencies with format. Corrected some of the text.
Put code inside of code div tags.


---
Diffs of the changes:  (+306 -304)

 CodeGenerator.html |  610 ++---
 1 files changed, 306 insertions(+), 304 deletions(-)


Index: llvm/docs/CodeGenerator.html
diff -u llvm/docs/CodeGenerator.html:1.30 llvm/docs/CodeGenerator.html:1.31
--- llvm/docs/CodeGenerator.html:1.30   Thu Apr 20 12:42:23 2006
+++ llvm/docs/CodeGenerator.htmlSun Aug 27 21:26:32 2006
@@ -74,7 +74,8 @@
 /ol
 
 div class=doc_author
-  pWritten by a href=mailto:[EMAIL PROTECTED]Chris Lattner/a/p
+  pWritten by a href=mailto:[EMAIL PROTECTED]Chris Lattner/a amp;
+  a href=mailto:[EMAIL PROTECTED]Bill Wendling/a/p
 /div
 
 div class=doc_warning
@@ -91,9 +92,10 @@
 
 pThe LLVM target-independent code generator is a framework that provides a
 suite of reusable components for translating the LLVM internal representation 
to
-the machine code for a specified target -- either in assembly form (suitable 
for
-a static compiler) or in binary machine code format (usable for a JIT 
compiler).
-The LLVM target-independent code generator consists of five main 
components:/p
+the machine code for a specified targetmdash;either in assembly form (suitable
+for a static compiler) or in binary machine code format (usable for a JIT
+compiler). The LLVM target-independent code generator consists of five main
+components:/p
 
 ol
 lia href=#targetdescAbstract target description/a interfaces which
@@ -166,7 +168,7 @@
 implement radically different code generators in the LLVM system that do not
 make use of any of the built-in components.  Doing so is not recommended at 
all,
 but could be required for radically different targets that do not fit into the
-LLVM machine description model: programmable FPGAs for example./p
+LLVM machine description model: FPGAs for example./p
 
 /div
 
@@ -228,23 +230,20 @@
 
 /ol
 
-p
-The code generator is based on the assumption that the instruction selector 
will
-use an optimal pattern matching selector to create high-quality sequences of
+pThe code generator is based on the assumption that the instruction selector
+will use an optimal pattern matching selector to create high-quality sequences 
of
 native instructions.  Alternative code generator designs based on pattern 
-expansion and
-aggressive iterative peephole optimization are much slower.  This design 
-permits efficient compilation (important for JIT environments) and
+expansion and aggressive iterative peephole optimization are much slower.  This
+design permits efficient compilation (important for JIT environments) and
 aggressive optimization (used when generating code offline) by allowing 
 components of varying levels of sophistication to be used for any step of 
 compilation./p
 
-p
-In addition to these stages, target implementations can insert arbitrary
+pIn addition to these stages, target implementations can insert arbitrary
 target-specific passes into the flow.  For example, the X86 target uses a
 special pass to handle the 80x87 floating point stack architecture.  Other
-targets with unusual requirements can be supported with custom passes as 
needed.
-/p
+targets with unusual requirements can be supported with custom passes as
+needed./p
 
 /div
 
@@ -264,18 +263,17 @@
 code generator uses the a href=TableGenFundamentals.htmlTableGen/a tool 
to
 describe big chunks of the target machine, which allows the use of
 domain-specific and target-specific abstractions to reduce the amount of 
-repetition.
-/p
+repetition./p
 
 pAs LLVM continues to be developed and refined, we plan to move more and more
-of the target description to be in tt.td/tt form.  Doing so gives us a
+of the target description to the tt.td/tt form.  Doing so gives us a
 number of advantages.  The most important is that it makes it easier to port
-LLVM, because it reduces the amount of C++ code that has to be written and the
+LLVM because it reduces the amount of C++ code that has to be written, and the
 surface area of the code generator that needs to be understood before someone
-can get in an get something working.  Second, it is also important to us 
because
-it makes it easier to change things: in particular, if tables and other things
-are all emitted by tblgen, we only need to change one place (tblgen) to update
-all of the targets to a new interface./p
+can get something working.  Second, it makes it easier to change things. In
+particular, if tables and other things are all emitted by tttblgen/tt, we
+only need a change in one place (tttblgen/tt) to update all of the targets
+to a new interface./p
 
 /div
 
@@ -287,9 +285,9 @@
 
 div class=doc_text
 
-pThe LLVM target description classes (which are located in the
+pThe LLVM target description classes (located in 

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

2006-08-27 Thread Bill Wendling


Changes in directory llvm/docs:

CodeGenerator.html updated: 1.32 - 1.33
---
Log message:

Spell naively with the i-Umlaut...


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

 CodeGenerator.html |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Index: llvm/docs/CodeGenerator.html
diff -u llvm/docs/CodeGenerator.html:1.32 llvm/docs/CodeGenerator.html:1.33
--- llvm/docs/CodeGenerator.html:1.32   Sun Aug 27 21:57:41 2006
+++ llvm/docs/CodeGenerator.htmlSun Aug 27 22:04:05 2006
@@ -850,8 +850,8 @@
 
 div class=doc_text
 
-pThe initial SelectionDAG is naively peephole expanded from the LLVM input by
-the ttSelectionDAGLowering/tt class in the
+pThe initial SelectionDAG is naiuml;vely peephole expanded from the LLVM
+input by the ttSelectionDAGLowering/tt class in the
 ttlib/CodeGen/SelectionDAG/SelectionDAGISel.cpp/tt file.  The intent of 
this
 pass is to expose as much low-level, target-specific details to the 
SelectionDAG
 as possible.  This pass is mostly hard-coded (e.g. an LLVM ttadd/tt turns
@@ -1287,7 +1287,7 @@
 
   a href=mailto:[EMAIL PROTECTED]Chris Lattner/abr
   a href=http://llvm.org;The LLVM Compiler Infrastructure/abr
-  Last modified: $Date: 2006/08/28 02:57:41 $
+  Last modified: $Date: 2006/08/28 03:04:05 $
 /address
 
 /body



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