[llvm-commits] [llvm] r46960 - /llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h

2008-02-11 Thread Dan Gohman
Author: djg
Date: Mon Feb 11 12:56:50 2008
New Revision: 46960

URL: http://llvm.org/viewvc/llvm-project?rev=46960view=rev
Log:
From Chris' review: change MemOperandSDNode's constructor to pass its
argument by reference, rather than by value. 

Modified:
llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h

Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h?rev=46960r1=46959r2=46960view=diff

==
--- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h Mon Feb 11 12:56:50 2008
@@ -1425,7 +1425,7 @@
 protected:
   friend class SelectionDAG;
   /// Create a MemOperand node
-  explicit MemOperandSDNode(MemOperand mo)
+  explicit MemOperandSDNode(const MemOperand mo)
 : SDNode(ISD::MEMOPERAND, getSDVTList(MVT::Other)), MO(mo) {}
 
 public:


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


Re: [llvm-commits] [llvm-gcc-4.2] r46966 - in /llvm-gcc-4.2/trunk/gcc: config/i386/i386.h config/rs6000/rs6000.h llvm-abi.h

2008-02-11 Thread Dale Johannesen

On Feb 11, 2008, at 12:10 PM, Duncan Sands wrote:

 Hi Dale,

 Treat struct { long long: 29; }; as int sized and
 aligned, rather than long long.  ABI issue.

 if you look at the DECL_SIZE of the bitfield, rather than
 the type size, I think it gives you 29.  If so, DECL_SIZE
 should simplify things for you.  In fact as far as I can
 see you should never use the type size for a record field.
 For example the struct conversion stuff uses DECL_SIZE everywhere
 (except at one point in the field indexing - I have a patch to fix
 that which I'll apply at some point).  Not using the type size
 makes all these it's a big type shoved in a small place problems
 magically go away.

I'm not sure what your suggestion is exactly; the issue isn't the  
size, it is
that the code in HandleArgument for general RECORD_TYPEs is looking
at getDeclaredType, not the type in the field.  (So what this patch  
does is
use the INTEGER_REGS case instead.)  The wide use of getDeclaredType
and the comments describing it make me think it would be unsafe in  
general
to change that.  It would certainly be more elegant if it works, though.

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


[llvm-commits] [llvm] r46967 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

2008-02-11 Thread Duncan Sands
Author: baldrick
Date: Mon Feb 11 14:58:28 2008
New Revision: 46967

URL: http://llvm.org/viewvc/llvm-project?rev=46967view=rev
Log:
Generalize the handling of call and return arguments,
in preparation for apint support.  These changes are
intended to have no functional effect.

Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=46967r1=46966r2=46967view=diff

==
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon Feb 11 
14:58:28 2008
@@ -620,14 +620,19 @@
 } // end namespace llvm
 
 
-/// getCopyFromParts - Create a value that contains the
-/// specified legal parts combined into the value they represent.
+/// getCopyFromParts - Create a value that contains the specified legal parts
+/// combined into the value they represent.  If the parts combine to a type
+/// larger then ValueVT then AssertOp can be used to specify whether the extra
+/// bits are known to be zero (ISD::AssertZext) or sign extended from ValueVT
+/// (ISD::AssertSext).  Likewise TruncExact is used for floating point types to
+/// indicate that the extra bits can be discarded without losing precision.
 static SDOperand getCopyFromParts(SelectionDAG DAG,
   const SDOperand *Parts,
   unsigned NumParts,
   MVT::ValueType PartVT,
   MVT::ValueType ValueVT,
-  ISD::NodeType AssertOp = ISD::DELETED_NODE) {
+  ISD::NodeType AssertOp = ISD::DELETED_NODE,
+  bool TruncExact = false) {
   if (!MVT::isVector(ValueVT) || NumParts == 1) {
 SDOperand Val = Parts[0];
 
@@ -675,7 +680,8 @@
 }
   
 if (MVT::isFloatingPoint(PartVT)  MVT::isFloatingPoint(ValueVT))
-  return DAG.getNode(ISD::FP_ROUND, ValueVT, Val, 
DAG.getIntPtrConstant(0));
+  return DAG.getNode(ISD::FP_ROUND, ValueVT, Val,
+ DAG.getIntPtrConstant(TruncExact));
 
 if (MVT::getSizeInBits(PartVT) == MVT::getSizeInBits(ValueVT))
   return DAG.getNode(ISD::BIT_CONVERT, ValueVT, Val);
@@ -723,13 +729,15 @@
  ValueVT, Ops[0], NumIntermediates);
 }
 
-/// getCopyToParts - Create a series of nodes that contain the
-/// specified value split into legal parts.
+/// getCopyToParts - Create a series of nodes that contain the specified value
+/// split into legal parts.  If the parts contain more bits than Val, then, for
+/// integers, ExtendKind can be used to specify how to generate the extra bits.
 static void getCopyToParts(SelectionDAG DAG,
SDOperand Val,
SDOperand *Parts,
unsigned NumParts,
-   MVT::ValueType PartVT) {
+   MVT::ValueType PartVT,
+   ISD::NodeType ExtendKind = ISD::ANY_EXTEND) {
   TargetLowering TLI = DAG.getTargetLoweringInfo();
   MVT::ValueType PtrVT = TLI.getPointerTy();
   MVT::ValueType ValueVT = Val.getValueType();
@@ -763,7 +771,7 @@
 if (PartVT  ValueVT)
   Val = DAG.getNode(ISD::TRUNCATE, PartVT, Val);
 else
-  Val = DAG.getNode(ISD::ANY_EXTEND, PartVT, Val);
+  Val = DAG.getNode(ExtendKind, PartVT, Val);
   } else if (MVT::isFloatingPoint(PartVT) 
  MVT::isFloatingPoint(ValueVT)) {
 Val = DAG.getNode(ISD::FP_EXTEND, PartVT, Val);
@@ -919,38 +927,32 @@
   NewValues.push_back(getRoot());
   for (unsigned i = 0, e = I.getNumOperands(); i != e; ++i) {
 SDOperand RetOp = getValue(I.getOperand(i));
-
-// If this is an integer return value, we need to promote it ourselves to
-// the full width of a register, since getCopyToParts and Legalize will use
-// ANY_EXTEND rather than sign/zero.
+MVT::ValueType VT = RetOp.getValueType();
+
 // FIXME: C calling convention requires the return type to be promoted to
 // at least 32-bit. But this is not necessary for non-C calling 
conventions.
-if (MVT::isInteger(RetOp.getValueType())  
-RetOp.getValueType()  MVT::i64) {
-  MVT::ValueType TmpVT;
-  if (TLI.getTypeAction(MVT::i32) == TargetLowering::Promote)
-TmpVT = TLI.getTypeToTransformTo(MVT::i32);
-  else
-TmpVT = MVT::i32;
-  const Function *F = I.getParent()-getParent();
-  ISD::NodeType ExtendKind = ISD::ANY_EXTEND;
-  if (F-paramHasAttr(0, ParamAttr::SExt))
-ExtendKind = ISD::SIGN_EXTEND;
-  if (F-paramHasAttr(0, ParamAttr::ZExt))
-ExtendKind = ISD::ZERO_EXTEND;
-  RetOp = DAG.getNode(ExtendKind, TmpVT, RetOp);
-  

[llvm-commits] [llvm] r46968 - /llvm/trunk/docs/ReleaseNotes.html

2008-02-11 Thread Scott Michel
Author: pingbak
Date: Mon Feb 11 15:05:47 2008
New Revision: 46968

URL: http://llvm.org/viewvc/llvm-project?rev=46968view=rev
Log:
Added blurb for CellSPU progress

Modified:
llvm/trunk/docs/ReleaseNotes.html

Modified: llvm/trunk/docs/ReleaseNotes.html
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=46968r1=46967r2=46968view=diff

==
--- llvm/trunk/docs/ReleaseNotes.html (original)
+++ llvm/trunk/docs/ReleaseNotes.html Mon Feb 11 15:05:47 2008
@@ -124,8 +124,13 @@
 pLLVM 2.2 includes several major new capabilities:/p
 
 ul
-liScott Michel contributed an SPU backend, which generates code for the
-vector coprocessors on the Cell processor.  (Status?)/li
+liA research team led by Scott Michel in the Computer Systems Research
+Department at The Aerospace Corporation contributed the CellSPU backend, which
+generates code for the vector coprocessors on the Sony/Toshiba/IBM Cell BE
+processor. llvm-gcc 4.2 supports CellSPU as a 'configure' target and progress
+is being made so that libgcc.a compiles cleanly. Notable pieces still in
+development include full 64-bit integer and full double precision floating
+point support./li
 
 liAnton and Duncan significantly improved llvm-gcc 4.2 support for the GCC 
Ada
 (GNAT) and Fortran (gfortran) front-ends.  These front-ends should still be 
considered


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


Re: [llvm-commits] [llvm-gcc-4.2] r46966 - in /llvm-gcc-4.2/trunk/gcc: config/i386/i386.h config/rs6000/rs6000.h llvm-abi.h

2008-02-11 Thread Duncan Sands
Hi Dale,

 Treat struct { long long: 29; }; as int sized and
 aligned, rather than long long.  ABI issue.

if you look at the DECL_SIZE of the bitfield, rather than
the type size, I think it gives you 29.  If so, DECL_SIZE
should simplify things for you.  In fact as far as I can
see you should never use the type size for a record field.
For example the struct conversion stuff uses DECL_SIZE everywhere
(except at one point in the field indexing - I have a patch to fix
that which I'll apply at some point).  Not using the type size
makes all these it's a big type shoved in a small place problems
magically go away.

Ciao,

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


[llvm-commits] [llvm] r46961 - /llvm/trunk/lib/CodeGen/PseudoSourceValue.cpp

2008-02-11 Thread Dan Gohman
Author: djg
Date: Mon Feb 11 12:57:43 2008
New Revision: 46961

URL: http://llvm.org/viewvc/llvm-project?rev=46961view=rev
Log:
From Chris' review: fix 80 column violations

Modified:
llvm/trunk/lib/CodeGen/PseudoSourceValue.cpp

Modified: llvm/trunk/lib/CodeGen/PseudoSourceValue.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PseudoSourceValue.cpp?rev=46961r1=46960r2=46961view=diff

==
--- llvm/trunk/lib/CodeGen/PseudoSourceValue.cpp (original)
+++ llvm/trunk/lib/CodeGen/PseudoSourceValue.cpp Mon Feb 11 12:57:43 2008
@@ -18,11 +18,16 @@
 namespace llvm {
   static ManagedStaticPseudoSourceValue[5] PSVs;
 
-  const PseudoSourceValue *PseudoSourceValue::getFixedStack() { return 
(*PSVs)[0]; }
-  const PseudoSourceValue *PseudoSourceValue::getStack() { return (*PSVs)[1]; 
}
-  const PseudoSourceValue *PseudoSourceValue::getGOT() { return (*PSVs)[2]; }
-  const PseudoSourceValue *PseudoSourceValue::getConstantPool() { return 
(*PSVs)[3]; }
-  const PseudoSourceValue *PseudoSourceValue::getJumpTable() { return 
(*PSVs)[4]; }
+  const PseudoSourceValue *PseudoSourceValue::getFixedStack()
+  { return (*PSVs)[0]; }
+  const PseudoSourceValue *PseudoSourceValue::getStack()
+  { return (*PSVs)[1]; }
+  const PseudoSourceValue *PseudoSourceValue::getGOT()
+  { return (*PSVs)[2]; }
+  const PseudoSourceValue *PseudoSourceValue::getConstantPool()
+  { return (*PSVs)[3]; }
+  const PseudoSourceValue *PseudoSourceValue::getJumpTable()
+  { return (*PSVs)[4]; }
 
   static const char *PSVNames[] = {
 FixedStack,


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


[llvm-commits] [llvm] r46964 - /llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp

2008-02-11 Thread Dan Gohman
Author: djg
Date: Mon Feb 11 13:00:34 2008
New Revision: 46964

URL: http://llvm.org/viewvc/llvm-project?rev=46964view=rev
Log:
From Chris' review: use isa instead of explicitly using classof.

Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp?rev=46964r1=46963r2=46964view=diff

==
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Mon Feb 11 13:00:34 2008
@@ -287,7 +287,7 @@
 --N;
   if (N  Node-getOperand(N - 1).getValueType() == MVT::Other)
 --N; // Ignore chain if it exists.
-  while (N  MemOperandSDNode::classof(Node-getOperand(N - 1).Val))
+  while (N  isaMemOperandSDNode(Node-getOperand(N - 1).Val))
 --N; // Ignore MemOperand nodes
   return N;
 }


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


[llvm-commits] [llvm] r46963 - /llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp

2008-02-11 Thread Dan Gohman
Author: djg
Date: Mon Feb 11 13:00:03 2008
New Revision: 46963

URL: http://llvm.org/viewvc/llvm-project?rev=46963view=rev
Log:
From Chris' review: minor corrections in comments.

Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp?rev=46963r1=46962r2=46963view=diff

==
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Mon Feb 11 13:00:03 2008
@@ -267,7 +267,7 @@
 
 /// CountResults - The results of target nodes have register or immediate
 /// operands first, then an optional chain, and optional flag operands (which 
do
-/// not go into the machine instrs.)
+/// not go into the resulting MachineInstr).
 unsigned ScheduleDAG::CountResults(SDNode *Node) {
   unsigned N = Node-getNumValues();
   while (N  Node-getValueType(N - 1) == MVT::Flag)
@@ -279,7 +279,8 @@
 
 /// CountOperands - The inputs to target nodes have any actual inputs first,
 /// followed by optional memory operands chain operand, then flag operands.
-/// Compute the number of actual operands that  will go into the machine istr.
+/// Compute the number of actual operands that will go into the resulting
+/// MachineInstr.
 unsigned ScheduleDAG::CountOperands(SDNode *Node) {
   unsigned N = Node-getNumOperands();
   while (N  Node-getOperand(N - 1).getValueType() == MVT::Flag)


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


[llvm-commits] [llvm] r46975 - in /llvm/trunk/include/llvm/ADT: ImmutableMap.h ImmutableSet.h

2008-02-11 Thread Ted Kremenek
Author: kremenek
Date: Mon Feb 11 17:11:12 2008
New Revision: 46975

URL: http://llvm.org/viewvc/llvm-project?rev=46975view=rev
Log:
The factories for ImutAVLTree/ImmutableSet/ImmutableMap now take an (optional)
BumpPtrAllocator argument to their constructors.  This BumpPtrAllocator
will be used to allocate trees.  If no BumpPtrAllocator is provided, one
is created (as before).

Modified:
llvm/trunk/include/llvm/ADT/ImmutableMap.h
llvm/trunk/include/llvm/ADT/ImmutableSet.h

Modified: llvm/trunk/include/llvm/ADT/ImmutableMap.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableMap.h?rev=46975r1=46974r2=46975view=diff

==
--- llvm/trunk/include/llvm/ADT/ImmutableMap.h (original)
+++ llvm/trunk/include/llvm/ADT/ImmutableMap.h Mon Feb 11 17:11:12 2008
@@ -84,6 +84,9 @@
   public:
 Factory() {}
 
+Factory(BumpPtrAllocator Alloc)
+  : F(Alloc) {}
+
 ImmutableMap GetEmptyMap() { return ImmutableMap(F.GetEmptyTree()); }
 
 ImmutableMap Add(ImmutableMap Old, key_type_ref K, data_type_ref D) {

Modified: llvm/trunk/include/llvm/ADT/ImmutableSet.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableSet.h?rev=46975r1=46974r2=46975view=diff

==
--- llvm/trunk/include/llvm/ADT/ImmutableSet.h (original)
+++ llvm/trunk/include/llvm/ADT/ImmutableSet.h Mon Feb 11 17:11:12 2008
@@ -16,6 +16,7 @@
 
 #include llvm/Support/Allocator.h
 #include llvm/ADT/FoldingSet.h
+#include llvm/Support/DataTypes.h
 #include cassert
 
 namespace llvm {
@@ -334,15 +335,31 @@
   
   typedef FoldingSetTreeTy CacheTy;
   
-  CacheTy Cache;  
-  BumpPtrAllocator Allocator;
+  CacheTy Cache;
+  uintptr_t Allocator;
+  
+  bool ownsAllocator() const {
+return Allocator  0x1 ? false : true;
+  }
+
+  BumpPtrAllocator getAllocator() const { 
+return *reinterpret_castBumpPtrAllocator*(Allocator  ~0x1);
+  }
   
   //===--===//
   // Public interface.
   //===--===//
   
 public:
-  ImutAVLFactory() {}
+  ImutAVLFactory()
+: Allocator(reinterpret_castuintptr_t(new BumpPtrAllocator())) {}
+  
+  ImutAVLFactory(BumpPtrAllocator Alloc)
+: Allocator(reinterpret_castuintptr_t(Alloc) | 0x1) {}
+  
+  ~ImutAVLFactory() {
+if (ownsAllocator()) delete getAllocator();
+  }
   
   TreeTy* Add(TreeTy* T, value_type_ref V) {
 T = Add_internal(V,T);
@@ -358,8 +375,6 @@
   
   TreeTy* GetEmptyTree() const { return NULL; }
   
-  BumpPtrAllocator getAllocator() { return Allocator; }
-  
   //===--===//
   // A bunch of quick helper functions used for reasoning
   // about the properties of trees and their children.
@@ -450,7 +465,8 @@
 // Create it.
 
 // Allocate the new tree node and insert it into the cache.
-TreeTy* T = (TreeTy*) Allocator.AllocateTreeTy();
+BumpPtrAllocator A = getAllocator();
+TreeTy* T = (TreeTy*) A.AllocateTreeTy();
 new (T) TreeTy(L,R,V,IncrementHeight(L,R));
 
 // We do not insert 'T' into the FoldingSet here.  This is because
@@ -930,6 +946,9 @@
   public:
 Factory() {}
 
+Factory(BumpPtrAllocator Alloc)
+  : F(Alloc) {}
+
 /// GetEmptySet - Returns an immutable set that contains no elements.
 ImmutableSet GetEmptySet() { return ImmutableSet(F.GetEmptyTree()); }
 


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


[llvm-commits] [llvm-gcc-4.2] r46971 - in /llvm-gcc-4.2/trunk/gcc: config/i386/llvm-i386-target.h llvm-types.cpp

2008-02-11 Thread Dale Johannesen
Author: johannes
Date: Mon Feb 11 15:53:29 2008
New Revision: 46971

URL: http://llvm.org/viewvc/llvm-project?rev=46971view=rev
Log:
Revert 46958 for the moment; it broke things, and
there's a better way to solve the problem.


Modified:
llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h
llvm-gcc-4.2/trunk/gcc/llvm-types.cpp

Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h?rev=46971r1=46970r2=46971view=diff

==
--- llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h Mon Feb 11 15:53:29 
2008
@@ -83,15 +83,6 @@
 }   \
   }
 
-/* Aggregates containing SSE vectors are aligned at 16 bytes as parameters;
-   while long double has GCC alignment of 16 bytes (correct for struct layout)
-   but is only 4 byte aligned as a parameter.  So if a union type contains an
-   SSE vector, use that as the basis for the constructed LLVM struct. */
-#define TARGET_LLVM_COMPARE_UNION_FIELDS(curType, newType, curAlign, newAlign) 
\
-  (newAlign==curAlign  TARGET_SSE  
\
-   TheTarget-getTargetLowering()-getByValTypeAlignment(newType) 
\
-   TheTarget-getTargetLowering()-getByValTypeAlignment(curType))
-
 #ifdef LLVM_ABI_H
 extern bool llvm_x86_should_pass_aggregate_in_memory(tree, const Type *);
 

Modified: llvm-gcc-4.2/trunk/gcc/llvm-types.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-types.cpp?rev=46971r1=46970r2=46971view=diff

==
--- llvm-gcc-4.2/trunk/gcc/llvm-types.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Mon Feb 11 15:53:29 2008
@@ -33,7 +33,6 @@
 #include llvm/TypeSymbolTable.h
 #include llvm/Target/TargetData.h
 #include llvm/Target/TargetMachine.h
-#include llvm/Target/TargetLowering.h
 #include llvm/Assembly/Writer.h
 #include llvm/ADT/DenseMap.h
 #include llvm/ADT/StringExtras.h
@@ -1138,7 +1137,7 @@
   // 'sret' functions cannot be 'readnone' or 'readonly'.
   if (ABIConverter.isStructReturn())
 RAttributes = ~(ParamAttr::ReadNone|ParamAttr::ReadOnly);
-
+  
   // Compute whether the result needs to be zext or sext'd.
   RAttributes |= HandleArgumentExtension(TREE_TYPE(type));
 
@@ -2125,8 +2124,6 @@
 
 /// ConvertUNION - We know that 'type' is a UNION_TYPE or a QUAL_UNION_TYPE:
 /// convert it to an LLVM type.
-/// This involves creating a struct with the right size and alignment. In
-/// some cases this is target dependent.
 const Type *TypeConverter::ConvertUNION(tree type, tree orig_type) {
   if (const Type *Ty = GET_TYPE_LLVM(type)) {
 // If we already compiled this type, and if it was not a forward
@@ -2173,25 +2170,17 @@
 // Select TheTy as union type if it meets one of the following criteria
 // 1) UnionTy is 0
 // 2) TheTy alignment is more then UnionTy
-// 3) TheTy size is greater than UnionTy size and TheTy alignment is equal
-//to UnionTy
+// 3) TheTy size is greater than UnionTy size and TheTy alignment is equal 
to UnionTy
 // 4) TheTy size is greater then UnionTy size and TheTy is packed
-//FIXME there is no check for packed?
 bool useTheTy = false;
 if (UnionTy == 0)
   useTheTy = true;
 else if (Align  MaxAlign)
   useTheTy = true;
-#ifdef TARGET_LLVM_COMPARE_UNION_FIELDS
-else
-  useTheTy = TARGET_LLVM_COMPARE_UNION_FIELDS(UnionTy, TheTy,
-   Align, MaxAlign);
-#else
 else if (MaxAlign == Align  Size  MaxSize)
   useTheTy = true;
-else if (Size  MaxSize)// FIXME really?  Seems wrong to lower 
alignment
+else if (Size  MaxSize)
   useTheTy = true;
-#endif
 
 if (useTheTy) {
   UnionTy = TheTy;


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


[llvm-commits] CVS: llvm-www/releases/2.2/docs/CommandGuide/index.html

2008-02-11 Thread Tanya Lattner


Changes in directory llvm-www/releases/2.2/docs/CommandGuide:

index.html updated: 1.2 - 1.3
---
Log message:

Fix broken links.


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

 index.html |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm-www/releases/2.2/docs/CommandGuide/index.html
diff -u llvm-www/releases/2.2/docs/CommandGuide/index.html:1.2 
llvm-www/releases/2.2/docs/CommandGuide/index.html:1.3
--- llvm-www/releases/2.2/docs/CommandGuide/index.html:1.2  Tue Feb 12 
00:20:24 2008
+++ llvm-www/releases/2.2/docs/CommandGuide/index.html  Tue Feb 12 00:23:26 2008
@@ -118,7 +118,7 @@
 lia 
href=/releases/2.2/docs/CommandGuide/html/bugpoint.htmlbbugpoint/b/a -
 automatic test-case reducer/li
 
-lia 
href=/releases/2.2/docs/CommandGuide/htmlllvm-extract.htmlbllvm-extract/b/a
 -
+lia 
href=/releases/2.2/docs/CommandGuide/html/llvm-extract.htmlbllvm-extract/b/a
 -
 extract a function from an LLVM bytecode file/li
 
 lia 
href=/releases/2.2/docs/CommandGuide/html/llvm-bcanalyzer.htmlbllvm-bcanalyzer/b/a
 -
@@ -153,7 +153,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: 2008/02/12 06:20:24 $
+  Last modified: $Date: 2008/02/12 06:23:26 $
 /address
 
 /body



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


[llvm-commits] CVS: llvm-www/releases/2.2/docs/index.html

2008-02-11 Thread Tanya Lattner


Changes in directory llvm-www/releases/2.2/docs:

index.html updated: 1.1 - 1.2
---
Log message:

Fix broken links.


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

 index.html |   40 
 1 files changed, 20 insertions(+), 20 deletions(-)


Index: llvm-www/releases/2.2/docs/index.html
diff -u llvm-www/releases/2.2/docs/index.html:1.1 
llvm-www/releases/2.2/docs/index.html:1.2
--- llvm-www/releases/2.2/docs/index.html:1.1   Tue Feb 12 00:05:03 2008
+++ llvm-www/releases/2.2/docs/index.html   Tue Feb 12 00:20:21 2008
@@ -69,27 +69,27 @@
 lia href=DeveloperPolicy.htmlDeveloper Policy/a - The LLVM project's
 policy towards developers and their contributions./li
 
-lia href=/docs/CommandGuide/index.htmlLLVM Command Guide/a - A 
reference
+lia href=/releases/2.2/docs/CommandGuide/index.htmlLLVM Command 
Guide/a - A reference
 manual for the LLVM command line utilities (man pages for LLVM tools).br/
 Current tools:
- a href=/cmds/llvm-ar.htmlllvm-ar/a,
- a href=/cmds/llvm-as.htmlllvm-as/a,
- a href=/cmds/llvm-dis.htmlllvm-dis/a,
- a href=/cmds/llvm-extract.htmlllvm-extract/a,
- a href=/cmds/llvm-ld.htmlllvm-ld/a,
- a href=/cmds/llvm-link.htmlllvm-link/a,
- a href=/cmds/llvm-nm.htmlllvm-nm/a,
- a href=/cmds/llvm-prof.htmlllvm-prof/a,
- a href=/cmds/llvm-ranlib.htmlllvm-ranlib/a,
- a href=/cmds/opt.htmlopt/a,
- a href=/cmds/llc.htmlllc/a,
- a href=/cmds/lli.htmllli/a,
- a href=/cmds/llvmc.htmlllvmc/a
- a href=/cmds/llvmgcc.htmlllvm-gcc/a,
- a href=/cmds/llvmgxx.htmlllvm-g++/a,
- a href=/cmds/stkrc.htmlstkrc/a,
- a href=/cmds/bugpoint.htmlbugpoint/a,
- a href=/cmds/llvm-bcanalyzer.htmlllvm-bcanalyzer/a,
+ a href=/releases/2.2/docs/CommandGuide/html/llvm-ar.htmlllvm-ar/a,
+ a href=/releases/2.2/docs/CommandGuide/html/llvm-as.htmlllvm-as/a,
+ a href=/releases/2.2/docs/CommandGuide/html/llvm-dis.htmlllvm-dis/a,
+ a 
href=/releases/2.2/docs/CommandGuide/html/llvm-extract.htmlllvm-extract/a,
+ a href=/releases/2.2/docs/CommandGuide/html/llvm-ld.htmlllvm-ld/a,
+ a href=/releases/2.2/docs/CommandGuide/html/llvm-link.htmlllvm-link/a,
+ a href=/releases/2.2/docs/CommandGuide/html/llvm-nm.htmlllvm-nm/a,
+ a href=/releases/2.2/docs/CommandGuide/html/llvm-prof.htmlllvm-prof/a,
+ a 
href=/releases/2.2/docs/CommandGuide/html/llvm-ranlib.htmlllvm-ranlib/a,
+ a href=/releases/2.2/docs/CommandGuide/html/opt.htmlopt/a,
+ a href=/releases/2.2/docs/CommandGuide/html/llc.htmlllc/a,
+ a href=/releases/2.2/docs/CommandGuide/html/lli.htmllli/a,
+ a href=/releases/2.2/docs/CommandGuide/html/llvmc.htmlllvmc/a
+ a href=/releases/2.2/docs/CommandGuide/html/llvmgcc.htmlllvm-gcc/a,
+ a href=/releases/2.2/docs/CommandGuide/html/llvmgxx.htmlllvm-g++/a,
+ a href=/releases/2.2/docs/CommandGuide/html/stkrc.htmlstkrc/a,
+ a href=/releases/2.2/docs/CommandGuide/html/bugpoint.htmlbugpoint/a,
+ a 
href=/releases/2.2/docs/CommandGuide/html/llvm-bcanalyzer.htmlllvm-bcanalyzer/a,
 /li
 
 lia href=FAQ.htmlFrequently Asked Questions/a - A list of common
@@ -270,7 +270,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: 2008/02/12 06:05:03 $
+  Last modified: $Date: 2008/02/12 06:20:21 $
 /address
 /body/html
 



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


[llvm-commits] CVS: llvm-www/releases/2.2/docs/CommandGuide/index.html

2008-02-11 Thread Tanya Lattner


Changes in directory llvm-www/releases/2.2/docs/CommandGuide:

index.html updated: 1.1 - 1.2
---
Log message:

Fix broken links.



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

 index.html |   46 +++---
 1 files changed, 23 insertions(+), 23 deletions(-)


Index: llvm-www/releases/2.2/docs/CommandGuide/index.html
diff -u llvm-www/releases/2.2/docs/CommandGuide/index.html:1.1 
llvm-www/releases/2.2/docs/CommandGuide/index.html:1.2
--- llvm-www/releases/2.2/docs/CommandGuide/index.html:1.1  Tue Feb 12 
00:05:11 2008
+++ llvm-www/releases/2.2/docs/CommandGuide/index.html  Tue Feb 12 00:20:24 2008
@@ -32,50 +32,50 @@
 
 ul
 
-lia href=/cmds/llvm-as.htmlbllvm-as/b/a - 
+lia 
href=/releases/2.2/docs/CommandGuide/html/llvm-as.htmlbllvm-as/b/a - 
 assemble a human-readable .ll file into bytecode/li
 
-lia href=/cmds/llvm-dis.htmlbllvm-dis/b/a -
+lia 
href=/releases/2.2/docs/CommandGuide/html/llvm-dis.htmlbllvm-dis/b/a -
 disassemble a bytecode file into a human-readable .ll file/li
 
-lia href=/cmds/llvm-upgrade.htmlbllvm-upgrade/b/a -
+lia 
href=/releases/2.2/docs/CommandGuide/html/llvm-upgrade.htmlbllvm-upgrade/b/a
 -
 upgrade LLVM assembly from previous version/li
 
-lia href=/cmds/opt.htmlbopt/b/a -
+lia href=/releases/2.2/docs/CommandGuide/html/opt.htmlbopt/b/a -
 run a series of LLVM-to-LLVM optimizations on a bytecode file/li
 
-lia href=/cmds/llc.htmlbllc/b/a - 
+lia href=/releases/2.2/docs/CommandGuide/html/llc.htmlbllc/b/a - 
 generate native machine code for a bytecode file/li
 
-lia href=/cmds/lli.htmlblli/b/a - 
+lia href=/releases/2.2/docs/CommandGuide/html/lli.htmlblli/b/a - 
 directly run a program compiled to bytecode using a JIT compiler or 
 interpreter/li
 
-lia href=/cmds/llvm-link.htmlbllvm-link/b/a -
+lia 
href=/releases/2.2/docs/CommandGuide/html/llvm-link.htmlbllvm-link/b/a 
-
 link several bytecode files into one/li
 
-lia href=/cmds/llvm-ar.htmlbllvm-ar/b/a - 
+lia 
href=/releases/2.2/docs/CommandGuide/html/llvm-ar.htmlbllvm-ar/b/a - 
 archive bytecode files/li
 
-lia href=/cmds/llvm-ranlib.htmlbllvm-ranlib/b/a - 
+lia 
href=/releases/2.2/docs/CommandGuide/html/llvm-ranlib.htmlbllvm-ranlib/b/a
 - 
 create an index for archives made with llvm-ar/li
 
-lia href=/cmds/llvm-nm.htmlbllvm-nm/b/a -
+lia 
href=/releases/2.2/docs/CommandGuide/html/llvm-nm.htmlbllvm-nm/b/a -
 print out the names and types of symbols in a bytecode file/li
 
-lia href=/cmds/llvm-prof.htmlbllvm-prof/b/a -
+lia 
href=/releases/2.2/docs/CommandGuide/html/llvm-prof.htmlbllvm-prof/b/a 
-
 format raw `ttllvmprof.out/tt' data into a human-readable report/li
 
-lia href=/cmds/llvmc.htmlbllvmc/b/a -
+lia href=/releases/2.2/docs/CommandGuide/html/llvmc.htmlbllvmc/b/a 
-
   generic and configurable compiler driver/li
 
-lia href=/cmds/llvm-ld.htmlbllvm-ld/b/a -
+lia 
href=/releases/2.2/docs/CommandGuide/html/llvm-ld.htmlbllvm-ld/b/a -
   general purpose linker with loadable runtime optimization support/li
 
-lia href=/cmds/llvm-config.htmlbllvm-config/b/a - 
+lia 
href=/releases/2.2/docs/CommandGuide/html/llvm-config.htmlbllvm-config/b/a
 - 
   print out LLVM compilation options, libraries, etc. as configured./li
 
-  lia href=/cmds/llvm2cpp.htmlbllvm2cpp/b/a - convert LLVM assembly
+  lia 
href=/releases/2.2/docs/CommandGuide/html/llvm2cpp.htmlbllvm2cpp/b/a - 
convert LLVM assembly
   into the corresponding LLVM C++ API calls to produce it/li
 /ul
 
@@ -90,13 +90,13 @@
 div class=doc_text
 ul
 
-lia href=/cmds/llvmgcc.htmlbllvmgcc/b/a -
+lia 
href=/releases/2.2/docs/CommandGuide/html/llvmgcc.htmlbllvmgcc/b/a -
 GCC-based C front-end for LLVM
 
-lia href=/cmds/llvmgxx.htmlbllvmg++/b/a -
+lia 
href=/releases/2.2/docs/CommandGuide/html/llvmgxx.htmlbllvmg++/b/a -
 GCC-based C++ front-end for LLVM/li
 
-lia href=/cmds/stkrc.htmlbstkrc/b/a -
+lia href=/releases/2.2/docs/CommandGuide/html/stkrc.htmlbstkrc/b/a 
-
 front-end compiler for the a href=../Stacker.htmlStacker/a 
 language/li
 
@@ -115,13 +115,13 @@
 
 ul
 
-lia href=/cmds/bugpoint.htmlbbugpoint/b/a -
+lia 
href=/releases/2.2/docs/CommandGuide/html/bugpoint.htmlbbugpoint/b/a -
 automatic test-case reducer/li
 
-lia href=/cmds/llvm-extract.htmlbllvm-extract/b/a -
+lia 
href=/releases/2.2/docs/CommandGuide/htmlllvm-extract.htmlbllvm-extract/b/a
 -
 extract a function from an LLVM bytecode file/li
 
-lia href=/cmds/llvm-bcanalyzer.htmlbllvm-bcanalyzer/b/a -
+lia 
href=/releases/2.2/docs/CommandGuide/html/llvm-bcanalyzer.htmlbllvm-bcanalyzer/b/a
 -
 bytecode analyzer (analyzes the binary encoding itself, not the program it
 represents)/li
 
@@ -137,7 +137,7 @@
 div class=doc_text
 ul
 
-lia href=/cmds/tblgen.htmlbtblgen/b/a -
+lia 
href=/releases/2.2/docs/CommandGuide/html/tblgen.htmlbtblgen/b/a -
 target description reader and generator/li
 
 /ul
@@ -153,7 +153,7 @@
   src=http://www.w3.org/Icons/valid-html401; alt=Valid HTML 4.01!/a
 
   a 

[llvm-commits] CVS: llvm-www/releases/2.2/LICENSE.TXT index.html llvm-2.2.tar.gz llvm-gcc4.0-2.2-ppc-darwin8.11.0.tar.gz llvm-gcc4.0-2.2-x86-darwin8.tar.gz llvm-gcc4.0-2.2-x86-linux-RHEL4.tar.gz llvm-

2008-02-11 Thread Tanya Lattner


Changes in directory llvm-www/releases/2.2:

LICENSE.TXT added (r1.1)
index.html added (r1.1)
llvm-2.2.tar.gz added (r1.1)
llvm-gcc4.0-2.2-ppc-darwin8.11.0.tar.gz added (r1.1)
llvm-gcc4.0-2.2-x86-darwin8.tar.gz added (r1.1)
llvm-gcc4.0-2.2-x86-linux-RHEL4.tar.gz added (r1.1)
llvm-gcc4.0-2.2.source.tar.gz added (r1.1)
llvm-gcc4.2-2.2-ppc-darwin8.11.0.tar.gz added (r1.1)
llvm-gcc4.2-2.2-x86-darwin8.tar.gz added (r1.1)
llvm-gcc4.2-2.2-x86-linux-RHEL4.tar.gz added (r1.1)
llvm-gcc4.2-2.2.source.tar.gz added (r1.1)
llvm-test-2.2.tar.gz added (r1.1)
---
Log message:

Release 2.2


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

 LICENSE.TXT |   72 
 index.html  |7 +++
 llvm-2.2.tar.gz |0 
 llvm-gcc4.0-2.2-ppc-darwin8.11.0.tar.gz |0 
 llvm-gcc4.0-2.2-x86-darwin8.tar.gz  |0 
 llvm-gcc4.0-2.2-x86-linux-RHEL4.tar.gz  |0 
 llvm-gcc4.0-2.2.source.tar.gz   |0 
 llvm-gcc4.2-2.2-ppc-darwin8.11.0.tar.gz |0 
 llvm-gcc4.2-2.2-x86-darwin8.tar.gz  |0 
 llvm-gcc4.2-2.2-x86-linux-RHEL4.tar.gz  |0 
 llvm-gcc4.2-2.2.source.tar.gz   |0 
 llvm-test-2.2.tar.gz|0 
 12 files changed, 79 insertions(+)


Index: llvm-www/releases/2.2/LICENSE.TXT
diff -c /dev/null llvm-www/releases/2.2/LICENSE.TXT:1.1
*** /dev/null   Tue Feb 12 00:05:45 2008
--- llvm-www/releases/2.2/LICENSE.TXT   Tue Feb 12 00:03:54 2008
***
*** 0 
--- 1,72 
+ ==
+ LLVM Release License
+ ==
+ University of Illinois/NCSA
+ Open Source License
+ 
+ Copyright (c) 2003-2008 University of Illinois at Urbana-Champaign.
+ All rights reserved.
+ 
+ Developed by:
+ 
+ LLVM Team
+ 
+ University of Illinois at Urbana-Champaign
+ 
+ http://llvm.org
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy 
of
+ this software and associated documentation files (the Software), to deal 
with
+ the Software without restriction, including without limitation the rights to
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ of the Software, and to permit persons to whom the Software is furnished to do
+ so, subject to the following conditions:
+ 
+ * Redistributions of source code must retain the above copyright notice,
+   this list of conditions and the following disclaimers.
+ 
+ * Redistributions in binary form must reproduce the above copyright 
notice,
+   this list of conditions and the following disclaimers in the
+   documentation and/or other materials provided with the distribution.
+ 
+ * Neither the names of the LLVM Team, University of Illinois at
+   Urbana-Champaign, nor the names of its contributors may be used to
+   endorse or promote products derived from this Software without specific
+   prior written permission.
+ 
+ THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
FITNESS
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+ CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH 
THE
+ SOFTWARE.
+ 
+ ==
+ Copyrights and Licenses for Third Party Software Distributed with LLVM:
+ ==
+ The LLVM software contains code written by third parties.  Such software will
+ have its own individual LICENSE.TXT file in the directory in which it appears.
+ This file will describe the copyrights, license, and restrictions which apply
+ to that code.
+ 
+ The disclaimer of warranty in the University of Illinois Open Source License
+ applies to all code in the LLVM Distribution, and nothing in any of the
+ other licenses gives permission to use the names of the LLVM Team or the
+ University of Illinois to endorse or promote products derived from this
+ Software.
+ 
+ The following pieces of software have additional or alternate copyrights,
+ licenses, and/or restrictions:
+ 
+ Program Directory
+ --- -
+ System Library  llvm/lib/System
+ Compiler Driver llvm/tools/llvmc
+ Autoconfllvm/autoconf
+ llvm/projects/ModuleMaker/autoconf
+ llvm/projects/sample/autoconf
+ Boost C++ Libraries llvm/include : docs/BOOST_LICENSE_1_0.txt
+ CellSPU backend llvm/lib/Target/CellSPU/README.txt
+ 
+ 


Index: llvm-www/releases/2.2/index.html
diff -c /dev/null llvm-www/releases/2.2/index.html:1.1
*** 

[llvm-commits] CVS: llvm-www/releases/2.2/docs/img/Debugging.gif libdeps.gif lines.gif objdeps.gif venusflytrap.jpg

2008-02-11 Thread Tanya Lattner


Changes in directory llvm-www/releases/2.2/docs/img:

Debugging.gif added (r1.1)
libdeps.gif added (r1.1)
lines.gif added (r1.1)
objdeps.gif added (r1.1)
venusflytrap.jpg added (r1.1)
---
Log message:

Release 2.2









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

 Debugging.gif|0 
 libdeps.gif  |0 
 lines.gif|0 
 objdeps.gif  |0 
 venusflytrap.jpg |0 
 5 files changed


Index: llvm-www/releases/2.2/docs/img/Debugging.gif


Index: llvm-www/releases/2.2/docs/img/libdeps.gif


Index: llvm-www/releases/2.2/docs/img/lines.gif


Index: llvm-www/releases/2.2/docs/img/objdeps.gif


Index: llvm-www/releases/2.2/docs/img/venusflytrap.jpg



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


[llvm-commits] CVS: llvm-www/releases/download.html

2008-02-11 Thread Tanya Lattner


Changes in directory llvm-www/releases:

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

2.2 release


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

 download.html |   23 +++
 1 files changed, 23 insertions(+)


Index: llvm-www/releases/download.html
diff -u llvm-www/releases/download.html:1.47 
llvm-www/releases/download.html:1.48
--- llvm-www/releases/download.html:1.47Tue Oct 16 11:28:11 2007
+++ llvm-www/releases/download.html Tue Feb 12 00:59:04 2008
@@ -30,6 +30,29 @@
 /div
 
 table class=rel_section
+trtda name=2.2Download LLVM 2.2/a/td/tr
+/table
+
+div class=rel_boxtext
+
+pPlease read the a href=2.2/docs/ReleaseNotes.htmlRelease Notes/a 
before
+downloading:/p
+
+ul
+  lia href=2.2/llvm-2.2.tar.gzLLVM source code/a (5.4M)/li
+  lia href=2.2/llvm-test-2.2.tar.gzLLVM Test Suite/a (53M)/li
+  lia href=2.2/llvm-gcc4.2-2.2-x86-darwin8.tar.gzLLVM-GCC 4.2 Front End 
Binaries for MacOS X/x86/a (50M)/li
+  lia href=2.2/llvm-gcc4.2-2.2-ppc-darwin8.11.0.tar.gzLLVM-GCC 4.2 Front 
End Binaries for MacOS X/PowerPC/a (49M)/li
+  lia href=2.2/llvm-gcc4.2-2.2-x86-linux-RHEL4.tar.gzLLVM-GCC 4.2 Front 
End Binaries for Red Hat Enterprise Linux4/x86/a (42M)/li
+  lia href=2.2/llvm-gcc4.0-2.2-x86-darwin8.tar.gzLLVM-GCC 4.0 Front End 
Binaries for MacOS X/x86/a (41M)/li
+  lia href=2.2/llvm-gcc4.0-2.2-ppc-darwin8.10.0.tar.gzLLVM-GCC 4.0 Front 
End Binaries for MacOS X/PowerPC/a (39M)/li
+  lia href=2.2/llvm-gcc4.0-2.2-x86-linux-RHEL4.tar.gzLLVM-GCC 4.0 Front 
End Binaries for Red Hat Enterprise Linux4/x86/a (31M)/li
+  lia href=2.2/llvm-gcc4.2-2.2.source.tar.gzLLVM-GCC 4.2 Front End 
Source Code/a (49M)/li
+  lia href=2.2/llvm-gcc4.0-2.2.source.tar.gzLLVM-GCC 4.0 Front End 
Source Code/a (36M)/li
+/ul
+/div
+
+table class=rel_section
 trtda name=2.1Download LLVM 2.1/a/td/tr
 /table
 



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


[llvm-commits] [llvm] r46993 - /llvm/trunk/docs/ReleaseNotes.html

2008-02-11 Thread Chris Lattner
Author: lattner
Date: Tue Feb 12 00:29:45 2008
New Revision: 46993

URL: http://llvm.org/viewvc/llvm-project?rev=46993view=rev
Log:
rip out llvm 2.2 stuff in preparation for llvm 2.3

Modified:
llvm/trunk/docs/ReleaseNotes.html

Modified: llvm/trunk/docs/ReleaseNotes.html
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=46993r1=46992r2=46993view=diff

==
--- llvm/trunk/docs/ReleaseNotes.html (original)
+++ llvm/trunk/docs/ReleaseNotes.html Tue Feb 12 00:29:45 2008
@@ -4,11 +4,11 @@
 head
   meta http-equiv=Content-Type content=text/html; charset=utf-8
   link rel=stylesheet href=llvm.css type=text/css
-  titleLLVM 2.2 Release Notes/title
+  titleLLVM 2.3 Release Notes/title
 /head
 body
 
-div class=doc_titleLLVM 2.2 Release Notes/div
+div class=doc_titleLLVM 2.3 Release Notes/div
  
 ol
   lia href=#introIntroduction/a/li
@@ -23,6 +23,8 @@
   pWritten by the a href=http://llvm.org;LLVM Team/ap
 /div
 
+h1font color=redTHIS IS A WORK IN PROGRESS FOR LLVM 2.3 (currently in
+progress on SVN HEAD)/font/h1
 
 !-- *** 
--
 div class=doc_section
@@ -33,7 +35,7 @@
 div class=doc_text
 
 pThis document contains the release notes for the LLVM compiler
-infrastructure, release 2.2.  Here we describe the status of LLVM, including
+infrastructure, release 2.3.  Here we describe the status of LLVM, including
 major improvements from the previous release and any known problems.  All LLVM
 releases may be downloaded from the a href=http://llvm.org/releases/;LLVM
 releases web site/a./p
@@ -59,12 +61,12 @@
 
 div class=doc_text
 
-pThis is the thirteenth public release of the LLVM Compiler Infrastructure. 
-It includes many features and refinements from LLVM 2.1./p
+pThis is the fourteenth public release of the LLVM Compiler Infrastructure. 
+It includes many features and refinements from LLVM 2.2./p
 
 /div
 
-!-- Unfinished features in 2.2:
+!-- Unfinished features in 2.3:
   Index Set Splitting not enabled by default
   Machine LICM
   Machine Sinking
@@ -73,35 +75,26 @@
 
 
!--=--
 div class=doc_subsection
-a name=deprecationDeprecated features in LLVM 2.2/a
+a name=deprecationRemoved features in LLVM 2.3/a
 /div
 
 div class=doc_text
 
-pThis is the last LLVM release to support llvm-gcc 4.0, llvm-upgrade, and
-llvmc in its current form.  llvm-gcc 4.0 has been replaced with llvm-gcc 4.2.
-llvm-upgrade is useful for upgrading llvm 1.9 files to llvm 2.x syntax, but you
-can always use an old release to do this.  llvmc is currently mostly useless in
-llvm 2.2, and will be redesigned or removed in llvm 2.3./p
+pLLVM 2.2 was the last LLVM release to support llvm-gcc 4.0 and llvm-upgrade.
+llvm-gcc 4.0 has been replaced with llvm-gcc 4.2.  llvm-upgrade was useful for
+upgrading llvm 1.9 files to llvm 2.x syntax, but you can always use a previous
+llvm release to do this./p
 
 /div
 
 
!--=--
 div class=doc_subsection
-a name=frontendsllvm-gcc 4.0, llvm-gcc 4.2, and clang/a
+a name=frontendsllvm-gcc 4.2 and clang/a
 /div
 
 div class=doc_text
 
-pLLVM 2.2 fully supports both the llvm-gcc 4.0 and llvm-gcc 4.2 front-ends 
(in
-LLVM 2.1, llvm-gcc 4.2 was beta).  Since LLVM 2.1, the llvm-gcc 4.2 front-end
-has made leaps and bounds and is now at least as good as 4.0 in virtually every
-area, and is better in several areas (for example, exception handling
-correctness, support for Ada and Fortran, better ABI compatibility, etc).  We 
-strongly recommend that you
-migrate from llvm-gcc 4.0 to llvm-gcc 4.2 in this release cycle because
-bLLVM 2.2 is the last release that will support llvm-gcc 4.0/b:  LLVM 2.3
-will only support the llvm-gcc 4.2 front-end./p
+pLLVM 2.3 fully supports llvm-gcc 4.2 front-end. /p
 
 pThe a href=http://clang.llvm.org/;clang project/a is an effort to build
 a set of new 'llvm native' front-end technologies for the LLVM optimizer
@@ -109,7 +102,7 @@
 nicely, and it has advanced source-to-source analysis and transformation
 capabilities.  If you are interested in building source-level tools for C and
 Objective-C (and eventually C++), you should take a look.  However, note that
-clang is not an official part of the LLVM 2.2 release.  If you are interested 
in
+clang is not an official part of the LLVM 2.3 release.  If you are interested 
in
 this project, please see its a href=http://clang.llvm.org/;web site/a./p
 
 /div
@@ -121,41 +114,9 @@
 
 div class=doc_text
 
-pLLVM 2.2 includes several major new capabilities:/p
+pLLVM 2.3 includes several major new capabilities:/p
 
 ul
-liA research team led by Scott Michel in the Computer Systems Research
-Department at The Aerospace Corporation contributed the CellSPU backend, which
-generates code for the vector coprocessors on the 

[llvm-commits] CVS: llvm-www/releases/2.2/docs/CommandGuide/man/man1/

2008-02-11 Thread Tanya Lattner


Changes in directory llvm-www/releases/2.2/docs/CommandGuide/man/man1:

---
Log message:

Directory /var/cvs/llvm/llvm-www/releases/2.2/docs/CommandGuide/man/man1 added 
to the repository


---
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-www/releases/2.2/docs/CommandGuide/html/

2008-02-11 Thread Tanya Lattner


Changes in directory llvm-www/releases/2.2/docs/CommandGuide/html:

---
Log message:

Directory /var/cvs/llvm/llvm-www/releases/2.2/docs/CommandGuide/html added to 
the repository


---
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] [test-suite] r46990 - /test-suite/tags/RELEASE_22/

2008-02-11 Thread Tanya Lattner
Author: tbrethou
Date: Mon Feb 11 23:20:47 2008
New Revision: 46990

URL: http://llvm.org/viewvc/llvm-project?rev=46990view=rev
Log:
Tag release 2.2

Added:
test-suite/tags/RELEASE_22/
  - copied from r46989, test-suite/branches/release_22/

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


[llvm-commits] [llvm] r46987 - /llvm/tags/RELEASE_22/

2008-02-11 Thread Tanya Lattner
Author: tbrethou
Date: Mon Feb 11 23:19:29 2008
New Revision: 46987

URL: http://llvm.org/viewvc/llvm-project?rev=46987view=rev
Log:
Tagging release 2.2.

Added:
llvm/tags/RELEASE_22/
  - copied from r46986, llvm/branches/release_22/

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


[llvm-commits] [llvm] r46986 - /llvm/branches/release_22/docs/ReleaseNotes.html

2008-02-11 Thread Tanya Lattner
Author: tbrethou
Date: Mon Feb 11 23:16:42 2008
New Revision: 46986

URL: http://llvm.org/viewvc/llvm-project?rev=46986view=rev
Log:
Merge release notes from mainline.

Modified:
llvm/branches/release_22/docs/ReleaseNotes.html

Modified: llvm/branches/release_22/docs/ReleaseNotes.html
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_22/docs/ReleaseNotes.html?rev=46986r1=46985r2=46986view=diff

==
--- llvm/branches/release_22/docs/ReleaseNotes.html (original)
+++ llvm/branches/release_22/docs/ReleaseNotes.html Mon Feb 11 23:16:42 2008
@@ -4,11 +4,11 @@
 head
   meta http-equiv=Content-Type content=text/html; charset=utf-8
   link rel=stylesheet href=llvm.css type=text/css
-  titleLLVM 2.1 Release Notes/title
+  titleLLVM 2.2 Release Notes/title
 /head
 body
 
-div class=doc_titleLLVM 2.1 Release Notes/div
+div class=doc_titleLLVM 2.2 Release Notes/div
  
 ol
   lia href=#introIntroduction/a/li
@@ -23,6 +23,7 @@
   pWritten by the a href=http://llvm.org;LLVM Team/ap
 /div
 
+
 !-- *** 
--
 div class=doc_section
   a name=introIntroduction/a
@@ -32,7 +33,7 @@
 div class=doc_text
 
 pThis document contains the release notes for the LLVM compiler
-infrastructure, release 2.1.  Here we describe the status of LLVM, including
+infrastructure, release 2.2.  Here we describe the status of LLVM, including
 major improvements from the previous release and any known problems.  All LLVM
 releases may be downloaded from the a href=http://llvm.org/releases/;LLVM
 releases web site/a./p
@@ -58,122 +59,110 @@
 
 div class=doc_text
 
-pThis is the twelfth public release of the LLVM Compiler Infrastructure. 
-It includes many features and refinements from LLVM 2.0./p
+pThis is the thirteenth public release of the LLVM Compiler Infrastructure. 
+It includes many features and refinements from LLVM 2.1./p
 
 /div
 
+!-- Unfinished features in 2.2:
+  Index Set Splitting not enabled by default
+  Machine LICM
+  Machine Sinking
+  LegalizeDAGTypes
+ --
+
 
!--=--
 div class=doc_subsection
-a name=frontendsNew Frontends/a
+a name=deprecationDeprecated features in LLVM 2.2/a
 /div
 
 div class=doc_text
 
-pLLVM 2.1 brings two new beta C front-ends.  First, a new version of llvm-gcc
-based on GCC 4.2, innovatively called llvm-gcc-4.2.  This promises to bring
-FORTRAN and Ada support to LLVM as well as features like atomic builtins and
-OpenMP.  None of these actually work yet, but don't let that stop you checking
-it out!/p
-
-pSecond, LLVM now includes its own native C and Objective-C front-end (C++ is
-in progress, but is not very far along) code named a
-href=http://clang.llvm.org/;clang/a.  This front-end has a number of great
-features, primarily aimed at source-level analysis and speeding up 
compile-time.
-At this point though, the LLVM Code Generator component is still very early in
-development, so it's mostly useful for people looking to build source-level
-analysis tools or source-to-source translators./p
+pThis is the last LLVM release to support llvm-gcc 4.0, llvm-upgrade, and
+llvmc in its current form.  llvm-gcc 4.0 has been replaced with llvm-gcc 4.2.
+llvm-upgrade is useful for upgrading llvm 1.9 files to llvm 2.x syntax, but you
+can always use an old release to do this.  llvmc is currently mostly useless in
+llvm 2.2, and will be redesigned or removed in llvm 2.3./p
 
 /div
 
 
!--=--
 div class=doc_subsection
-a name=optimizerOptimizer Improvements/a
+a name=frontendsllvm-gcc 4.0, llvm-gcc 4.2, and clang/a
 /div
 
 div class=doc_text
 
-pSome of the most noticable feature improvements this release have been in 
the
-optimizer, speeding it up and making it more aggressive.  For example:/p
-
-ul
-
-liOwen Anderson wrote the new MemoryDependenceAnalysis pass, which provides 
-a lazy, caching layer on top of a 
-href=AliasAnalysis.htmlAliasAnalysis/a.  He then used it to rewrite
-DeadStoreElimination which resulted in significantly better compile time 
in 
-common cases, /li
-liOwen implemented the new GVN pass, which is also based on 
-MemoryDependenceAnalysis.  This pass replaces GCSE/LoadVN in the standard
-set of passes, providing more aggressive optimization at a some-what 
-improved compile-time cost./li
-liOwen implemented GVN-PRE, a partial redundancy elimination algorithm that
-shares some details with the new GVN pass.  It is still in need of compile
-time tuning, and is not turned on by default./li
-liDevang merged ETForest and DomTree into a single easier to use data
-structure.  This makes it more obvious which datastructure to choose
-(because there is only one) and makes the compiler more memory and time
-efficient (less stuff to keep up-to-date)./li

[llvm-commits] CVS: llvm-www/releases/index.html

2008-02-11 Thread Tanya Lattner


Changes in directory llvm-www/releases:

index.html updated: 1.41 - 1.42
---
Log message:

2.2 release


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

 index.html |5 -
 1 files changed, 4 insertions(+), 1 deletion(-)


Index: llvm-www/releases/index.html
diff -u llvm-www/releases/index.html:1.41 llvm-www/releases/index.html:1.42
--- llvm-www/releases/index.html:1.41   Fri Sep 28 10:42:04 2007
+++ llvm-www/releases/index.htmlTue Feb 12 01:01:28 2008
@@ -15,7 +15,7 @@
 
 div class=rel_boxtext
 
-pLLVM is distributed under the a href=2.1/LICENSE.TXTUniversity of
+pLLVM is distributed under the a href=2.2/LICENSE.TXTUniversity of
 Illinois Open Source License/a, an a
 href=http://www.opensource.org/licenses/UoI-NCSA.php;OSI-approved/a
 license./p
@@ -39,6 +39,8 @@
 ul
 liAlways - a href=download.html#svnAnonymous SVN access/a; a
 href=../docs/ReleaseNotes.htmlrelease notes/a./li
+li11 Feb 2008 - 2.2 release a href=download.html#2.2download/a; a
+href=2.2/docs/ReleaseNotes.htmlrelease notes/a./li
 li26 Sep 2007 - 2.1 release a href=download.html#2.1download/a; a
 href=2.1/docs/ReleaseNotes.htmlrelease notes/a./li
 li23 May 2007 - 2.0 release a href=download.html#2.0download/a; a
@@ -76,6 +78,7 @@
 
 ul
 lia href=http://llvm.org/docs/;Current LLVM SVN HEAD 
documentation/a/li
+lia href=2.2/docs/index.htmlDocumentation for LLVM 2.2/a/li
 lia href=2.1/docs/index.htmlDocumentation for LLVM 2.1/a/li
 lia href=2.0/docs/index.htmlDocumentation for LLVM 2.0/a/li
 lia href=1.9/docs/index.htmlDocumentation for LLVM 1.9/a/li



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


[llvm-commits] CVS: llvm-www/releases/download.html

2008-02-11 Thread Tanya Lattner


Changes in directory llvm-www/releases:

download.html updated: 1.48 - 1.49
---
Log message:

Fix typo.


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

 download.html |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm-www/releases/download.html
diff -u llvm-www/releases/download.html:1.48 
llvm-www/releases/download.html:1.49
--- llvm-www/releases/download.html:1.48Tue Feb 12 00:59:04 2008
+++ llvm-www/releases/download.html Tue Feb 12 01:01:14 2008
@@ -45,7 +45,7 @@
   lia href=2.2/llvm-gcc4.2-2.2-ppc-darwin8.11.0.tar.gzLLVM-GCC 4.2 Front 
End Binaries for MacOS X/PowerPC/a (49M)/li
   lia href=2.2/llvm-gcc4.2-2.2-x86-linux-RHEL4.tar.gzLLVM-GCC 4.2 Front 
End Binaries for Red Hat Enterprise Linux4/x86/a (42M)/li
   lia href=2.2/llvm-gcc4.0-2.2-x86-darwin8.tar.gzLLVM-GCC 4.0 Front End 
Binaries for MacOS X/x86/a (41M)/li
-  lia href=2.2/llvm-gcc4.0-2.2-ppc-darwin8.10.0.tar.gzLLVM-GCC 4.0 Front 
End Binaries for MacOS X/PowerPC/a (39M)/li
+  lia href=2.2/llvm-gcc4.0-2.2-ppc-darwin8.11.0.tar.gzLLVM-GCC 4.0 Front 
End Binaries for MacOS X/PowerPC/a (39M)/li
   lia href=2.2/llvm-gcc4.0-2.2-x86-linux-RHEL4.tar.gzLLVM-GCC 4.0 Front 
End Binaries for Red Hat Enterprise Linux4/x86/a (31M)/li
   lia href=2.2/llvm-gcc4.2-2.2.source.tar.gzLLVM-GCC 4.2 Front End 
Source Code/a (49M)/li
   lia href=2.2/llvm-gcc4.0-2.2.source.tar.gzLLVM-GCC 4.0 Front End 
Source Code/a (36M)/li



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


[llvm-commits] [llvm-gcc-4.2] r46983 - in /llvm-gcc-4.2/trunk/gcc: builtin-types.def builtins.def llvm-convert.cpp

2008-02-11 Thread Tanya Lattner
Author: tbrethou
Date: Mon Feb 11 20:50:24 2008
New Revision: 46983

URL: http://llvm.org/viewvc/llvm-project?rev=46983view=rev
Log:
Port __builtin_annotation from llvm-gcc4.0. This is similar to 
llvm.var.annotation but is applied to expressions.

Modified:
llvm-gcc-4.2/trunk/gcc/builtin-types.def
llvm-gcc-4.2/trunk/gcc/builtins.def
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Modified: llvm-gcc-4.2/trunk/gcc/builtin-types.def
URL: 
http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/builtin-types.def?rev=46983r1=46982r2=46983view=diff

==
--- llvm-gcc-4.2/trunk/gcc/builtin-types.def (original)
+++ llvm-gcc-4.2/trunk/gcc/builtin-types.def Mon Feb 11 20:50:24 2008
@@ -303,6 +303,10 @@
 DEF_FUNCTION_TYPE_2 (BT_FN_I16_VPTR_I16, BT_I16, BT_VOLATILE_PTR, BT_I16)
 DEF_FUNCTION_TYPE_2 (BT_FN_BOOL_LONGPTR_LONGPTR,
 BT_BOOL, BT_PTR_LONG, BT_PTR_LONG)
+/* APPLE LOCAL begin LLVM */
+DEF_FUNCTION_TYPE_2 (BT_FN_UINT_UINT_CONST_STRING,
+ BT_UINT, BT_UINT, BT_CONST_STRING)
+/* APPLE LOCAL end LLVM */   
 
 DEF_FUNCTION_TYPE_3 (BT_FN_STRING_STRING_CONST_STRING_SIZE,
 BT_STRING, BT_STRING, BT_CONST_STRING, BT_SIZE)

Modified: llvm-gcc-4.2/trunk/gcc/builtins.def
URL: 
http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/builtins.def?rev=46983r1=46982r2=46983view=diff

==
--- llvm-gcc-4.2/trunk/gcc/builtins.def (original)
+++ llvm-gcc-4.2/trunk/gcc/builtins.def Mon Feb 11 20:50:24 2008
@@ -691,6 +691,10 @@
 DEF_EXT_LIB_BUILTIN(BUILT_IN__EXIT, _exit, BT_FN_VOID_INT, 
ATTR_NORETURN_NOTHROW_LIST)
 DEF_C99_BUILTIN(BUILT_IN__EXIT2, _Exit, BT_FN_VOID_INT, 
ATTR_NORETURN_NOTHROW_LIST)
 
+/* APPLE LOCAL begin LLVM */
+DEF_GCC_BUILTIN(BUILT_IN_ANNOTATION, annotation, 
BT_FN_UINT_UINT_CONST_STRING, ATTR_NULL)
+/* APPLE LOCAL end LLVM */
+
 /* Implementing nested functions.  */
 DEF_BUILTIN_STUB (BUILT_IN_INIT_TRAMPOLINE, __builtin_init_trampoline)
 /* LLVM local deleted 1 line */

Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=46983r1=46982r2=46983view=diff

==
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Mon Feb 11 20:50:24 2008
@@ -4259,7 +4259,38 @@
 Builder.CreateUnreachable();
 EmitBlock(new BasicBlock());
 return true;
-  
+   
+  // Convert annotation built-in to llvm.annotation intrinsic.
+  case BUILT_IN_ANNOTATION: {
+
+// Get file and line number
+location_t locus = EXPR_LOCATION (exp);
+Constant *lineNo = ConstantInt::get(Type::Int32Ty, locus.line);
+Constant *file = ConvertMetadataStringToGV(locus.file);
+const Type *SBP= PointerType::getUnqual(Type::Int8Ty);
+file = ConstantExpr::getBitCast(file, SBP);
+
+// Get arguments.
+tree arglist = TREE_OPERAND(exp, 1);
+Value *ExprVal = Emit(TREE_VALUE(arglist), 0);
+const Type *Ty = ExprVal-getType();
+Value *StrVal = Emit(TREE_VALUE(TREE_CHAIN(arglist)), 0);
+
+SmallVectorValue *, 4 Args;
+Args.push_back(ExprVal);
+Args.push_back(StrVal);
+Args.push_back(file);
+Args.push_back(lineNo);
+
+assert(Ty  llvm.annotation arg type may not be null);
+Result = Builder.CreateCall(Intrinsic::getDeclaration(TheModule, 
+  
Intrinsic::annotation, 
+  Ty, 
+  1),
+Args.begin(), Args.end());
+return true;
+  }
+
 #if 1  // FIXME: Should handle these GCC extensions eventually.
 case BUILT_IN_APPLY_ARGS:
 case BUILT_IN_APPLY:


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


[llvm-commits] [llvm] r46982 - /llvm/branches/release_22/docs/GettingStarted.html

2008-02-11 Thread Tanya Lattner
Author: tbrethou
Date: Mon Feb 11 20:43:50 2008
New Revision: 46982

URL: http://llvm.org/viewvc/llvm-project?rev=46982view=rev
Log:
release tag.

Modified:
llvm/branches/release_22/docs/GettingStarted.html

Modified: llvm/branches/release_22/docs/GettingStarted.html
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_22/docs/GettingStarted.html?rev=46982r1=46981r2=46982view=diff

==
--- llvm/branches/release_22/docs/GettingStarted.html (original)
+++ llvm/branches/release_22/docs/GettingStarted.html Mon Feb 11 20:43:50 2008
@@ -710,6 +710,7 @@
   subdirectories of the 'tttags/tt' directory:/p
 
 ul
+liRelease 2.2: bRELEASE_22/b/li
 liRelease 2.1: bRELEASE_21/b/li
 liRelease 2.0: bRELEASE_20/b/li
 liRelease 1.9: bRELEASE_19/b/li


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


[llvm-commits] [llvm] r46996 - /llvm/trunk/docs/TableGenFundamentals.html

2008-02-11 Thread Bill Wendling
Author: void
Date: Tue Feb 12 01:09:05 2008
New Revision: 46996

URL: http://llvm.org/viewvc/llvm-project?rev=46996view=rev
Log:
Fix validation errors: di - dt.

Modified:
llvm/trunk/docs/TableGenFundamentals.html

Modified: llvm/trunk/docs/TableGenFundamentals.html
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/TableGenFundamentals.html?rev=46996r1=46995r2=46996view=diff

==
--- llvm/trunk/docs/TableGenFundamentals.html (original)
+++ llvm/trunk/docs/TableGenFundamentals.html Tue Feb 12 01:09:05 2008
@@ -304,36 +304,36 @@
 ul
 dl
 
-dittbbit/b/tt/di
+dtttbbit/b/tt/dt
   ddA 'bit' is a boolean value that can hold either 0 or 1./dd
 
-dittbint/b/tt/di
+dtttbint/b/tt/dt
   ddThe 'int' type represents a simple 32-bit integer value, such as 5./dd
 
-dittbstring/b/tt/di
+dtttbstring/b/tt/dt
   ddThe 'string' type represents an ordered sequence of characters of
   arbitrary length./dd
 
-dittbbits/blt;ngt;/tt/di
+dtttbbits/blt;ngt;/tt/dt
   ddA 'bits' type is an arbitrary, but fixed, size integer that is broken up
   into individual bits.  This type is useful because it can handle some bits
   being defined while others are undefined./dd
 
-dittblist/blt;tygt;/tt/di
+dtttblist/blt;tygt;/tt/dt
   ddThis type represents a list whose elements are some other type.  The
   contained type is arbitrary: it can even be another list type./dd
 
-diClass type/di
+dtClass type/dt
   ddSpecifying a class name in a type context means that the defined value
   must be a subclass of the specified class.  This is useful in conjunction 
with
   the bttlist/tt/b type, for example, to constrain the elements of the
   list to a common base class (e.g., a ttblist/blt;Registergt;/tt can
   only contain definitions derived from the ttRegister/tt class)./dd
 
-dittbdag/b/tt/di
+dtttbdag/b/tt/dt
   ddThis type represents a nestable directed graph of elements./dd
 
-dittbcode/b/tt/di
+dtttbcode/b/tt/dt
   ddThis represents a big hunk of text. NOTE: I don't remember why this is
   distinct from string!/dd
 /dl
@@ -359,45 +359,45 @@
 
 ul
 dl
-ditt?/tt/di
+dttt?/tt/dt
   dduninitialized field/dd
-ditt0b1001011/tt/di
+dttt0b1001011/tt/dt
   ddbinary integer value/dd
-ditt07654321/tt/di
+dttt07654321/tt/dt
   ddoctal integer value (indicated by a leading 0)/dd
-ditt7/tt/di
+dttt7/tt/dt
   dddecimal integer value/dd
-ditt0x7F/tt/di
+dttt0x7F/tt/dt
   ddhexadecimal integer value/dd
-dittfoo/tt/di
+dtttfoo/tt/dt
   ddstring value/dd
-ditt[{ ... }]/tt/di
+dttt[{ ... }]/tt/dt
   ddcode fragment/dd
-ditt[ X, Y, Z ]/tt/di
+dttt[ X, Y, Z ]/tt/dt
   ddlist value./dd
-ditt{ a, b, c }/tt/di
+dttt{ a, b, c }/tt/dt
   ddinitializer for a bitslt;3gt; value/dd
-dittvalue/tt/di
+dtttvalue/tt/dt
   ddvalue reference/dd
-dittvalue{17}/tt/di
+dtttvalue{17}/tt/dt
   ddaccess to one bit of a value/dd
-dittvalue{15-17}/tt/di
+dtttvalue{15-17}/tt/dt
   ddaccess to multiple bits of a value/dd
-dittDEF/tt/di
+dtttDEF/tt/dt
   ddreference to a record definition/dd
-dittCLASSlt;val listgt;/tt/di
+dtttCLASSlt;val listgt;/tt/dt
   ddreference to a new anonymous definition of CLASS with the specified
   template arguments./dd
-dittX.Y/tt/di
+dtttX.Y/tt/dt
   ddreference to the subfield of a value/dd
-dittlist[4-7,17,2-3]/tt/di
+dtttlist[4-7,17,2-3]/tt/dt
   ddA slice of the 'list' list, including elements 4,5,6,7,17,2, and 3 from
   it.  Elements may be included multiple times./dd
-ditt(DEF a, b)/tt/di
+dttt(DEF a, b)/tt/dt
   dda dag value.  The first element is required to be a record definition, 
the
   remaining elements in the list may be arbitrary other values, including 
nested
   `ttdag/tt' values./dd
-ditt!strconcat(a, b)/tt/di
+dttt!strconcat(a, b)/tt/dt
   ddA string value that is the result of concatenating the 'a' and 'b'
   strings./dd
 /dl
@@ -747,7 +747,7 @@
   a href=http://jigsaw.w3.org/css-validator/check/referer;img
   src=http://jigsaw.w3.org/css-validator/images/vcss; alt=Valid CSS!/a
   a href=http://validator.w3.org/check/referer;img
-  src=http://www.w3.org/Icons/valid-html401; alt=Valid HTML 4.01! //a
+  src=http://www.w3.org/Icons/valid-html401; alt=Valid HTML 4.01!/a
 
   a href=mailto:[EMAIL PROTECTED]Chris Lattner/abr
   a href=http://llvm.org;LLVM Compiler Infrastructure/abr


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


[llvm-commits] [llvm] r46979 - /llvm/trunk/lib/Target/IA64/README

2008-02-11 Thread Nate Begeman
Author: sampo
Date: Mon Feb 11 17:47:56 2008
New Revision: 46979

URL: http://llvm.org/viewvc/llvm-project?rev=46979view=rev
Log:
Stuff noticed while grepping code


Modified:
llvm/trunk/lib/Target/IA64/README

Modified: llvm/trunk/lib/Target/IA64/README
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/IA64/README?rev=46979r1=46978r2=46979view=diff

==
--- llvm/trunk/lib/Target/IA64/README (original)
+++ llvm/trunk/lib/Target/IA64/README Mon Feb 11 17:47:56 2008
@@ -1,59 +1,11 @@
-*** README for the LLVM IA64 Backend Version 0.01 - March 18, 2005
-*** Quote for this version:
-
-  Kaori and Hitomi are naughty!!
-
-
-Congratulations, you have found:
-
- 
-* @@@   @@@   @@@  @@@  @@ *
-* @@@   @@@   @@@  @@@  @@@*
-* @@!   @@!   @@!  @@@  @@! @@! @@!*
-* [EMAIL PROTECTED]   [EMAIL PROTECTED]   [EMAIL PROTECTED]  @!@  
[EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]*
-* @!!   @!!   @!@  [EMAIL PROTECTED]  @!! !!@ @!@*
-* !!!   !!!   [EMAIL PROTECTED]  !!!  [EMAIL PROTECTED]   ! [EMAIL 
PROTECTED]*
-* !!:   !!:   :!:  !!:  !!: !!:*
-*  :!:   :!:   ::!!:!   :!: :!:*
-*  ::    :: ::: :: *
-* : :: : :  : :: : : :   :  :  *
-*  *
-*  *
-*  @@   @@@  @@@   @@@   @@ @@   @@@   *
-*    @@@   @@@     @@@     *
-* @@!  @@@  @@[EMAIL PROTECTED]@@@   @@!  @@!  @@@  !@@  @@[EMAIL 
PROTECTED]   *
-* [EMAIL PROTECTED]  @!@  [EMAIL PROTECTED]@[EMAIL PROTECTED]   [EMAIL 
PROTECTED]  [EMAIL PROTECTED]  @!@  [EMAIL PROTECTED] [EMAIL 
PROTECTED]@!   *
-* @!@  [EMAIL PROTECTED]  @!@ [EMAIL PROTECTED]   !!@  @[EMAIL 
PROTECTED]@[EMAIL PROTECTED]  !!@@[EMAIL PROTECTED]@!! @!!   *
-* [EMAIL PROTECTED]  !!!  [EMAIL PROTECTED]  !!!   !!!  [EMAIL PROTECTED]  
@[EMAIL PROTECTED]  !!!  [EMAIL PROTECTED]   *
-* !!:  !!!  !!:  !!!   !!:  !!:  !!!  !:!  !:!  :!!:!:!!:  *
-* :!:  !:!  :!:  !:!   :!:  :!:  !:!  :!:  !:!  !:::!!:::  *
-* : ::   ::   ::::  ::   :::   :::   :::   *
-*  : :  :   :::: :   : :   :: : ::::   *
-*  *
-
-* Bow down, bow down, before the power of IA64! Or be crushed, *
-* be crushed, by its jolly registers of doom!! *
-
-
-DEVELOPMENT PLAN:
-
-   _  you are   2005   maybe 2005   20062006 and
-  /   here|   |  |   beyond 
- vv   v  v|
-  v
-CLEAN UPADD INSTRUCTION  ADD  PLAY WITH
-INSTRUCTION -- SCHEDULING AND  --  JIT--DYNAMIC -- FUTURE WORK
-SELECTION   BUNDLINGSUPPORT REOPTIMIZATION
-
-DISCLAIMER AND PROMISE:
-
-As of the time of this release, you are probably better off using Intel C/C++
-or GCC. The performance of the code emitted right now is, in a word,
-terrible. Check back in a few months - the story will be different then,
-I guarantee it.
-
 TODO:
-
+  - Un-bitrot ISel
+  - Hook up If-Conversion a la ARM target
+  - Hook up all branch analysis functions
+  - Instruction scheduling
+  - Bundling
+  - Dynamic Optimization
+  - Testing and bugfixing
   - stop passing FP args in both FP *and* integer regs when not required
   - allocate low (nonstacked) registers more aggressively
   - clean up and thoroughly test the isel patterns.
@@ -65,14 +17,11 @@
 (we will avoid the mess that is:
  http://gcc.gnu.org/ml/gcc/2003-12/msg00832.html )
   - instruction scheduling (h! ;)
-  - write truly inspirational documentation
-  - if-conversion (predicate database/knowledge? etc etc)
   - counted loop support
   - make integer + FP mul/div more clever (we have fixed pseudocode atm)
   - track and use comparison complements
 
 INFO:
-
   - we are strictly LP64 here, no support for ILP32 on HP-UX. Linux users
 don't need to worry about this.
   - i have instruction scheduling/bundling pseudocode, that really works
@@ -80,7 +29,6 @@
 so, before you go write your own, send me an email!
 
 KNOWN DEFECTS AT THE CURRENT TIME:
-
   - C++ vtables contain naked function pointers, not function descriptors,
   which is 

[llvm-commits] [llvm] r46998 - in /llvm/trunk/test/CodeGen/X86: fold-mul-lohi.ll stride-nine-with-base-reg.ll stride-reuse.ll

2008-02-11 Thread Evan Cheng
Author: evancheng
Date: Tue Feb 12 01:22:46 2008
New Revision: 46998

URL: http://llvm.org/viewvc/llvm-project?rev=46998view=rev
Log:
Fix some test cases.

Modified:
llvm/trunk/test/CodeGen/X86/fold-mul-lohi.ll
llvm/trunk/test/CodeGen/X86/stride-nine-with-base-reg.ll
llvm/trunk/test/CodeGen/X86/stride-reuse.ll

Modified: llvm/trunk/test/CodeGen/X86/fold-mul-lohi.ll
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fold-mul-lohi.ll?rev=46998r1=46997r2=46998view=diff

==
--- llvm/trunk/test/CodeGen/X86/fold-mul-lohi.ll (original)
+++ llvm/trunk/test/CodeGen/X86/fold-mul-lohi.ll Tue Feb 12 01:22:46 2008
@@ -1,5 +1,5 @@
 ; RUN: llvm-as  %s | llc -march=x86 | not grep lea
-; RUN: llvm-as  %s | llc -march=x86-64 | not grep lea
+; RUN: llvm-as  %s | llc -march=x86-64 -relocation-model=pic | not grep lea
 
 @B = external global [1000 x i8], align 32
 @A = external global [1000 x i8], align 32

Modified: llvm/trunk/test/CodeGen/X86/stride-nine-with-base-reg.ll
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/stride-nine-with-base-reg.ll?rev=46998r1=46997r2=46998view=diff

==
--- llvm/trunk/test/CodeGen/X86/stride-nine-with-base-reg.ll (original)
+++ llvm/trunk/test/CodeGen/X86/stride-nine-with-base-reg.ll Tue Feb 12 
01:22:46 2008
@@ -1,5 +1,5 @@
 ; RUN: llvm-as  %s | llc -march=x86 -relocation-model=static | grep lea | 
count 1
-; RUN: llvm-as  %s | llc -march=x86-64 | not grep lea
+; RUN: llvm-as  %s | llc -march=x86-64 -relocation-model=pic | not grep lea
 
 ; For x86 there's an lea above the loop. In both cases, there shouldn't
 ; be any lea instructions inside the loop.

Modified: llvm/trunk/test/CodeGen/X86/stride-reuse.ll
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/stride-reuse.ll?rev=46998r1=46997r2=46998view=diff

==
--- llvm/trunk/test/CodeGen/X86/stride-reuse.ll (original)
+++ llvm/trunk/test/CodeGen/X86/stride-reuse.ll Tue Feb 12 01:22:46 2008
@@ -1,5 +1,5 @@
 ; RUN: llvm-as  %s | llc -march=x86 | not grep lea
-; RUN: llvm-as  %s | llc -march=x86-64 | not grep lea
+; RUN: llvm-as  %s | llc -march=x86-64 -relocation-model=pic | not grep lea
 
 @B = external global [1000 x float], align 32
 @A = external global [1000 x float], align 32


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


[llvm-commits] CVS: llvm-www/demo/index.cgi

2008-02-11 Thread Tanya Lattner


Changes in directory llvm-www/demo:

index.cgi updated: 1.81 - 1.82
---
Log message:

2.2 release.


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

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


Index: llvm-www/demo/index.cgi
diff -u llvm-www/demo/index.cgi:1.81 llvm-www/demo/index.cgi:1.82
--- llvm-www/demo/index.cgi:1.81Mon Oct  1 17:52:08 2007
+++ llvm-www/demo/index.cgi Tue Feb 12 01:25:41 2008
@@ -26,8 +26,8 @@
 
 my @PREPENDPATHDIRS =
   (  
-'/home/vadve/shared/llvm-gcc4.0-2.1/bin/',
-'/home/vadve/shared/llvm-2.1/Release/bin');
+'/home/vadve/shared/llvm-gcc4.2/bin/',
+'/home/vadve/shared/llvm-2.2/Release/bin');
 
 my $defaultsrc = #include stdio.h\n#include stdlib.h\n\n .
  int power(int X) {\n  if (X == 0) return 1;\n .



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


Re: [llvm-commits] Fix for PR1798 (ScalarEvolution)

2008-02-11 Thread Wojciech Matyjewicz
Nick Lewycky wrote:
 After your question, I have realized that 32 bits for the divisor may be
 too much... Using only 16 bits would allow us to handle AddRecs up to
 length 8. If you agree 16 is a safe bitwidth, I'll change it. However,
 the maximum operation you ask about will still be necessary.
 
 Optimally, we'd use APInt and get the right length up front, but there's 
 no need for that to hold up this patch.

Ok. I've added a comment for that.

I've also lifted the restriction that the dividend should be at least 32
bits wide. Currently, the dividend is computed with the minimum
necessary bitwidth and extended, if needed, just before the division.

The patch is here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080211/058097.html

I think it's a good idea to keep the PR open. It will prevent us from
forgetting to turn off the hack in future...

Wojtek

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


[llvm-commits] [llvm] r46956 - /llvm/trunk/include/llvm/Target/TargetLowering.h

2008-02-11 Thread Duncan Sands
Author: baldrick
Date: Mon Feb 11 05:09:23 2008
New Revision: 46956

URL: http://llvm.org/viewvc/llvm-project?rev=46956view=rev
Log:
Add arbitrary integer support to getRegisterType and
getNumRegisters.  This is needed for calling functions
with apint parameters or return values.

Modified:
llvm/trunk/include/llvm/Target/TargetLowering.h

Modified: llvm/trunk/include/llvm/Target/TargetLowering.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=46956r1=46955r2=46956view=diff

==
--- llvm/trunk/include/llvm/Target/TargetLowering.h (original)
+++ llvm/trunk/include/llvm/Target/TargetLowering.h Mon Feb 11 05:09:23 2008
@@ -434,13 +434,18 @@
   (void)getVectorTypeBreakdown(VT, VT1, NumIntermediates, RegisterVT);
   return RegisterVT;
 }
+if (MVT::isInteger(VT)) {
+  return getRegisterType(getTypeToTransformTo(VT));
+}
 assert(0  Unsupported extended type!);
   }
 
   /// getNumRegisters - Return the number of registers that this ValueType will
   /// eventually require.  This is one for any types promoted to live in larger
   /// registers, but may be more than one for types (like i64) that are split
-  /// into pieces.
+  /// into pieces.  For types like i140, which are first promoted then 
expanded,
+  /// it is the number of registers needed to hold all the bits of the original
+  /// type.  For an i140 on a 32 bit machine this means 5 registers.
   unsigned getNumRegisters(MVT::ValueType VT) const {
 if (!MVT::isExtendedVT(VT)) {
   assert(VT  array_lengthof(NumRegistersForVT));
@@ -451,6 +456,11 @@
   unsigned NumIntermediates;
   return getVectorTypeBreakdown(VT, VT1, NumIntermediates, VT2);
 }
+if (MVT::isInteger(VT)) {
+  unsigned BitWidth = MVT::getSizeInBits(VT);
+  unsigned RegWidth = MVT::getSizeInBits(getRegisterType(VT));
+  return (BitWidth + RegWidth - 1) / RegWidth;
+}
 assert(0  Unsupported extended type!);
   }
 


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


[llvm-commits] CVS: llvm-www/releases/2.2/docs/HistoricalNotes/

2008-02-11 Thread Tanya Lattner


Changes in directory llvm-www/releases/2.2/docs/HistoricalNotes:

---
Log message:

Directory /var/cvs/llvm/llvm-www/releases/2.2/docs/HistoricalNotes added to the 
repository


---
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-www/releases/2.2/docs/img/

2008-02-11 Thread Tanya Lattner


Changes in directory llvm-www/releases/2.2/docs/img:

---
Log message:

Directory /var/cvs/llvm/llvm-www/releases/2.2/docs/img added to the repository


---
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-www/releases/2.2/docs/CommandGuide/ps/

2008-02-11 Thread Tanya Lattner


Changes in directory llvm-www/releases/2.2/docs/CommandGuide/ps:

---
Log message:

Directory /var/cvs/llvm/llvm-www/releases/2.2/docs/CommandGuide/ps added to the 
repository


---
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-www/releases/2.2/docs/

2008-02-11 Thread Tanya Lattner


Changes in directory llvm-www/releases/2.2/docs:

---
Log message:

Directory /var/cvs/llvm/llvm-www/releases/2.2/docs added to the repository


---
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] [llvm] r46953 - in /llvm/trunk: lib/CodeGen/RegAllocLocal.cpp test/CodeGen/PowerPC/2008-02-09-LocalRegAllocAssert.ll

2008-02-11 Thread Evan Cheng
Author: evancheng
Date: Mon Feb 11 02:30:52 2008
New Revision: 46953

URL: http://llvm.org/viewvc/llvm-project?rev=46953view=rev
Log:
Determine whether a spill kills the register it's spilling before insertion 
rather than trying to undo the kill marker afterwards.

Added:
llvm/trunk/test/CodeGen/PowerPC/2008-02-09-LocalRegAllocAssert.ll
Modified:
llvm/trunk/lib/CodeGen/RegAllocLocal.cpp

Modified: llvm/trunk/lib/CodeGen/RegAllocLocal.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocLocal.cpp?rev=46953r1=46952r2=46953view=diff

==
--- llvm/trunk/lib/CodeGen/RegAllocLocal.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocLocal.cpp Mon Feb 11 02:30:52 2008
@@ -303,17 +303,12 @@
 const TargetRegisterClass *RC = MF-getRegInfo().getRegClass(VirtReg);
 int FrameIndex = getStackSpaceFor(VirtReg, RC);
 DOUT   to stack slot #  FrameIndex;
-TII-storeRegToStackSlot(MBB, I, PhysReg, true, FrameIndex, RC);
-
 // If the instruction reads the register that's spilled, (e.g. this can
 // happen if it is a move to a physical register), then the spill
 // instruction is not a kill.
-if (I != MBB.end()  I-findRegisterUseOperandIdx(PhysReg) != -1) {
-  MachineBasicBlock::iterator StoreMI = prior(I);
-  int Idx = StoreMI-findRegisterUseOperandIdx(PhysReg, true);
-  assert(Idx != -1  Unrecognized spill instruction!);
-  StoreMI-getOperand(Idx).setIsKill(false);
-}
+bool isKill = !(I != MBB.end() 
+I-findRegisterUseOperandIdx(PhysReg) != -1);
+TII-storeRegToStackSlot(MBB, I, PhysReg, isKill, FrameIndex, RC);
 ++NumStores;   // Update statistics
   }
 

Added: llvm/trunk/test/CodeGen/PowerPC/2008-02-09-LocalRegAllocAssert.ll
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/2008-02-09-LocalRegAllocAssert.ll?rev=46953view=auto

==
--- llvm/trunk/test/CodeGen/PowerPC/2008-02-09-LocalRegAllocAssert.ll (added)
+++ llvm/trunk/test/CodeGen/PowerPC/2008-02-09-LocalRegAllocAssert.ll Mon Feb 
11 02:30:52 2008
@@ -0,0 +1,10 @@
+; RUN: llvm-as  %s | llc -mtriple=powerpc-apple-darwin -regalloc=local
+
+define i32 @bork(i64 %foo, i64 %bar) {
+entry:
+%tmp = load i64* null, align 8  ; i64 [#uses=2]
+%tmp2 = icmp ule i64 %tmp, 0; i1 [#uses=1]
+%min = select i1 %tmp2, i64 %tmp, i64 0   ; i64 [#uses=1]
+store i64 %min, i64* null, align 8
+ret i32 0
+}


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


Re: [llvm-commits] [llvm-gcc-4.2] r46726 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

2008-02-11 Thread Duncan Sands
  the current LLVM implementation means that anyone using threading  
  needs
  to not do bitfield accesses, since the compiler generated code could
  cause trouble.
 
 This is not handled by LLVM, this is handled by FE that is translating  
 source code into LLVM IR. Unless all front-ends enforce this, we can  
 not claim that LLVM guarantees bit-field thread safety (I do think, it  
 is convenient if tools support bit-field thread safety). If you are  
 suggesting to handle this some how inside LLVM itself then I mis- 
 understood your comment.

I was talking about how llvm-gcc handles bitfields.  Sorry for the confusion.

Ciao,

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


[llvm-commits] [llvm-gcc-4.2] r46989 - /llvm-gcc-4.2/tags/RELEASE_22/

2008-02-11 Thread Tanya Lattner
Author: tbrethou
Date: Mon Feb 11 23:20:15 2008
New Revision: 46989

URL: http://llvm.org/viewvc/llvm-project?rev=46989view=rev
Log:
Tag release 2.2.

Added:
llvm-gcc-4.2/tags/RELEASE_22/
  - copied from r46988, llvm-gcc-4.2/branches/release_22/

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


[llvm-commits] [llvm] r46995 - /llvm/trunk/docs/TableGenFundamentals.html

2008-02-11 Thread Bill Wendling
Author: void
Date: Tue Feb 12 01:06:19 2008
New Revision: 46995

URL: http://llvm.org/viewvc/llvm-project?rev=46995view=rev
Log:
Reformatting. Adding doc_code divisions for code examples. Updated some
of the examples to reflect the current .TD files.

Modified:
llvm/trunk/docs/TableGenFundamentals.html

Modified: llvm/trunk/docs/TableGenFundamentals.html
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/TableGenFundamentals.html?rev=46995r1=46994r2=46995view=diff

==
--- llvm/trunk/docs/TableGenFundamentals.html (original)
+++ llvm/trunk/docs/TableGenFundamentals.html Tue Feb 12 01:06:19 2008
@@ -68,8 +68,8 @@
 of TableGen is the a href=CodeGenerator.htmlLLVM code generator/a./p
 
 pNote that if you work on TableGen much, and use emacs or vim, that you can
-find an emacs TableGen mode and a vim language file in
-ttllvm/utils/emacs/tt and ttllvm/utils/vim/tt directory of your LLVM
+find an emacs TableGen mode and a vim language file in the
+ttllvm/utils/emacs/tt and ttllvm/utils/vim/tt directories of your LLVM
 distribution, respectively./p
 
 /div
@@ -83,11 +83,11 @@
 of which are considered 'records'./p
 
 pbTableGen records/b have a unique name, a list of values, and a list of
-superclasses.  The list of values is main data that TableGen builds for each
-record, it is this that holds the domain specific information for the
+superclasses.  The list of values is the main data that TableGen builds for 
each
+record; it is this that holds the domain specific information for the
 application.  The interpretation of this data is left to a specific a
 href=#backendsTableGen backend/a, but the structure and format rules are
-taken care of and fixed by TableGen./p
+taken care of and are fixed by TableGen./p
 
 pbTableGen definitions/b are the concrete form of 'records'.  These
 generally do not have any undefined values, and are marked with the
@@ -95,7 +95,7 @@
 
 pbTableGen classes/b are abstract records that are used to build and
 describe other records.  These 'classes' allow the end-user to build
-abstractions for either the domain they are targetting (such as Register,
+abstractions for either the domain they are targeting (such as Register,
 RegisterClass, and Instruction in the LLVM code generator) or for the
 implementor to help factor out common properties of records (such as FPInst,
 which is used to represent floating point instructions in the X86 backend).
@@ -119,42 +119,71 @@
 the various definitions expand to fully.  Running this on the ttX86.td/tt
 file prints this (at the time of this writing):/p
 
+div class=doc_code
 pre
 ...
-bdef/b ADDrr8 {i// Instruction X86Inst I2A8 Pattern/i
-  bstring/b Name = add;
+bdef/b ADD32rr {   i// Instruction X86Inst I/i
   bstring/b Namespace = X86;
+  bdag/b OutOperandList = (outs GR32:$dst);
+  bdag/b InOperandList = (ins GR32:$src1, GR32:$src2);
+  bstring/b AsmString = add{l}\t{$src2, $dst|$dst, $src2};
+  blist/blt;daggt; Pattern = [(set GR32:$dst, (add GR32:$src1, 
GR32:$src2))];
   blist/blt;Registergt; Uses = [];
-  blist/blt;Registergt; Defs = [];
+  blist/blt;Registergt; Defs = [EFLAGS];
+  blist/blt;Predicategt; Predicates = [];
+  bint/b CodeSize = 3;
+  bint/b AddedComplexity = 0;
   bbit/b isReturn = 0;
   bbit/b isBranch = 0;
+  bbit/b isIndirectBranch = 0;
+  bbit/b isBarrier = 0;
   bbit/b isCall = 0;
+  bbit/b isSimpleLoad = 0;
+  bbit/b mayLoad = 0;
+  bbit/b mayStore = 0;
+  bbit/b isImplicitDef = 0;
   bbit/b isTwoAddress = 1;
+  bbit/b isConvertibleToThreeAddress = 1;
+  bbit/b isCommutable = 1;
   bbit/b isTerminator = 0;
-  bdag/b Pattern = (set R8, (plus R8, R8));
-  bbits/blt;8gt; Opcode = { 0, 0, 0, 0, 0, 0, 0, 0 };
+  bbit/b isReMaterializable = 0;
+  bbit/b isPredicable = 0;
+  bbit/b hasDelaySlot = 0;
+  bbit/b usesCustomDAGSchedInserter = 0;
+  bbit/b hasCtrlDep = 0;
+  bbit/b isNotDuplicable = 0;
+  bbit/b hasSideEffects = 0;
+  bbit/b mayHaveSideEffects = 0;
+  bbit/b neverHasSideEffects = 0;
+  InstrItinClass Itinerary = NoItinerary;
+  bstring/b Constraints = ;
+  bstring/b DisableEncoding = ;
+  bbits/blt;8gt; Opcode = { 0, 0, 0, 0, 0, 0, 0, 1 };
   Format Form = MRMDestReg;
-  bbits/blt;5gt; FormBits = { 0, 0, 0, 1, 1 };
-  ArgType Type = Arg8;
-  bbits/blt;3gt; TypeBits = { 0, 0, 1 };
+  bbits/blt;6gt; FormBits = { 0, 0, 0, 0, 1, 1 };
+  ImmType ImmT = NoImm;
+  bbits/blt;3gt; ImmTypeBits = { 0, 0, 0 };
   bbit/b hasOpSizePrefix = 0;
-  bbit/b printImplicitUses = 0;
+  bbit/b hasAdSizePrefix = 0;
   bbits/blt;4gt; Prefix = { 0, 0, 0, 0 };
+  bbit/b hasREX_WPrefix = 0;
   FPFormat FPForm = ?;
   bbits/blt;3gt; FPFormBits = { 0, 0, 0 };
 }
 ...
 /pre
+/div
 
-pThis definition corresponds to an 8-bit register-register add instruction in
+pThis definition corresponds to a 32-bit register-register add instruction in
 the X86.  The string after the 'ttdef/tt' string indicates the name of the
-record (ttADDrr8/tt in this case), and the 

[llvm-commits] [llvm] r46959 - in /llvm/trunk: lib/Analysis/ScalarEvolution.cpp test/Analysis/ScalarEvolution/2008-02-11-ReversedCondition.ll

2008-02-11 Thread Wojciech Matyjewicz
Author: wmat
Date: Mon Feb 11 12:37:34 2008
New Revision: 46959

URL: http://llvm.org/viewvc/llvm-project?rev=46959view=rev
Log:
If the LHS of the comparison is a loop-invariant we also want to move it 
to the RHS. This simple change allows to compute loop iteration count 
for loops with condition similar to the one in the testcase (which seems 
to be quite common).

Added:
llvm/trunk/test/Analysis/ScalarEvolution/2008-02-11-ReversedCondition.ll
Modified:
llvm/trunk/lib/Analysis/ScalarEvolution.cpp

Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=46959r1=46958r2=46959view=diff

==
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Mon Feb 11 12:37:34 2008
@@ -1819,8 +1819,8 @@
 
   // At this point, we would like to compute how many iterations of the 
   // loop the predicate will return true for these inputs.
-  if (isaSCEVConstant(LHS)  !isaSCEVConstant(RHS)) {
-// If there is a constant, force it into the RHS.
+  if (LHS-isLoopInvariant(L)  !RHS-isLoopInvariant(L)) {
+// If there is a loop-invariant, force it into the RHS.
 std::swap(LHS, RHS);
 Cond = ICmpInst::getSwappedPredicate(Cond);
   }

Added: llvm/trunk/test/Analysis/ScalarEvolution/2008-02-11-ReversedCondition.ll
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/ScalarEvolution/2008-02-11-ReversedCondition.ll?rev=46959view=auto

==
--- llvm/trunk/test/Analysis/ScalarEvolution/2008-02-11-ReversedCondition.ll 
(added)
+++ llvm/trunk/test/Analysis/ScalarEvolution/2008-02-11-ReversedCondition.ll 
Mon Feb 11 12:37:34 2008
@@ -0,0 +1,15 @@
+; RUN: llvm-as  %s | opt -scalar-evolution -analyze | not grep Unpredictable
+
+define void @foo(i32 %n) {
+entry:
+   br label %header
+header:
+   %i = phi i32 [ 0, %entry ], [ %i.inc, %next ]
+   %cond = icmp sgt i32 %n, %i
+   br i1 %cond, label %next, label %return
+next:
+%i.inc = add i32 %i, 1
+   br label %header
+return:
+   ret void
+}


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


[llvm-commits] [llvm] r46981 - /llvm/trunk/docs/GettingStarted.html

2008-02-11 Thread Tanya Lattner
Author: tbrethou
Date: Mon Feb 11 20:42:55 2008
New Revision: 46981

URL: http://llvm.org/viewvc/llvm-project?rev=46981view=rev
Log:
Add 2.2 release tag.

Modified:
llvm/trunk/docs/GettingStarted.html

Modified: llvm/trunk/docs/GettingStarted.html
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/GettingStarted.html?rev=46981r1=46980r2=46981view=diff

==
--- llvm/trunk/docs/GettingStarted.html (original)
+++ llvm/trunk/docs/GettingStarted.html Mon Feb 11 20:42:55 2008
@@ -710,6 +710,7 @@
   subdirectories of the 'tttags/tt' directory:/p
 
 ul
+liRelease 2.2: bRELEASE_22/b/li
 liRelease 2.1: bRELEASE_21/b/li
 liRelease 2.0: bRELEASE_20/b/li
 liRelease 1.9: bRELEASE_19/b/li


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


[llvm-commits] CVS: llvm-www/header.incl

2008-02-11 Thread Tanya Lattner


Changes in directory llvm-www:

header.incl updated: 1.64 - 1.65
---
Log message:

2.2 release.


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

 header.incl |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm-www/header.incl
diff -u llvm-www/header.incl:1.64 llvm-www/header.incl:1.65
--- llvm-www/header.incl:1.64   Wed Jan  9 12:37:54 2008
+++ llvm-www/header.inclTue Feb 12 01:07:40 2008
@@ -39,7 +39,7 @@
 bDownload!/b
 div class=www_sidebar
 span style=font-size:smallerDownload now:/span
-a href=/releases/bLLVMnbsp;2.1/b/abr/
+a href=/releases/bLLVMnbsp;2.2/b/abr/
 
 br/
 span style=font-size:smallerTry the/spanbr/
@@ -47,7 +47,7 @@
 br/
 
 span style=font-size:smallerView the open-source/spanbr/
-a href=/releases/2.1/LICENSE.TXTblicense/b/a
+a href=/releases/2.2/LICENSE.TXTblicense/b/a
 /div
 
 br/



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


[llvm-commits] [llvm-gcc-4.2] r46958 - in /llvm-gcc-4.2/trunk/gcc: config/i386/llvm-i386-target.h llvm-types.cpp

2008-02-11 Thread Dale Johannesen
Author: johannes
Date: Mon Feb 11 12:03:06 2008
New Revision: 46958

URL: http://llvm.org/viewvc/llvm-project?rev=46958view=rev
Log:
Choose an SSE vector-containing type for the constructed
type that represents a union, if the union contains such
a type.


Modified:
llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h
llvm-gcc-4.2/trunk/gcc/llvm-types.cpp

Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h?rev=46958r1=46957r2=46958view=diff

==
--- llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h Mon Feb 11 12:03:06 
2008
@@ -83,6 +83,15 @@
 }   \
   }
 
+/* Aggregates containing SSE vectors are aligned at 16 bytes as parameters;
+   while long double has GCC alignment of 16 bytes (correct for struct layout)
+   but is only 4 byte aligned as a parameter.  So if a union type contains an
+   SSE vector, use that as the basis for the constructed LLVM struct. */
+#define TARGET_LLVM_COMPARE_UNION_FIELDS(curType, newType, curAlign, newAlign) 
\
+  (newAlign==curAlign  TARGET_SSE  
\
+   TheTarget-getTargetLowering()-getByValTypeAlignment(newType) 
\
+   TheTarget-getTargetLowering()-getByValTypeAlignment(curType))
+
 #ifdef LLVM_ABI_H
 extern bool llvm_x86_should_pass_aggregate_in_memory(tree, const Type *);
 

Modified: llvm-gcc-4.2/trunk/gcc/llvm-types.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-types.cpp?rev=46958r1=46957r2=46958view=diff

==
--- llvm-gcc-4.2/trunk/gcc/llvm-types.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Mon Feb 11 12:03:06 2008
@@ -33,6 +33,7 @@
 #include llvm/TypeSymbolTable.h
 #include llvm/Target/TargetData.h
 #include llvm/Target/TargetMachine.h
+#include llvm/Target/TargetLowering.h
 #include llvm/Assembly/Writer.h
 #include llvm/ADT/DenseMap.h
 #include llvm/ADT/StringExtras.h
@@ -1137,7 +1138,7 @@
   // 'sret' functions cannot be 'readnone' or 'readonly'.
   if (ABIConverter.isStructReturn())
 RAttributes = ~(ParamAttr::ReadNone|ParamAttr::ReadOnly);
-  
+
   // Compute whether the result needs to be zext or sext'd.
   RAttributes |= HandleArgumentExtension(TREE_TYPE(type));
 
@@ -2124,6 +2125,8 @@
 
 /// ConvertUNION - We know that 'type' is a UNION_TYPE or a QUAL_UNION_TYPE:
 /// convert it to an LLVM type.
+/// This involves creating a struct with the right size and alignment. In
+/// some cases this is target dependent.
 const Type *TypeConverter::ConvertUNION(tree type, tree orig_type) {
   if (const Type *Ty = GET_TYPE_LLVM(type)) {
 // If we already compiled this type, and if it was not a forward
@@ -2170,17 +2173,25 @@
 // Select TheTy as union type if it meets one of the following criteria
 // 1) UnionTy is 0
 // 2) TheTy alignment is more then UnionTy
-// 3) TheTy size is greater than UnionTy size and TheTy alignment is equal 
to UnionTy
+// 3) TheTy size is greater than UnionTy size and TheTy alignment is equal
+//to UnionTy
 // 4) TheTy size is greater then UnionTy size and TheTy is packed
+//FIXME there is no check for packed?
 bool useTheTy = false;
 if (UnionTy == 0)
   useTheTy = true;
 else if (Align  MaxAlign)
   useTheTy = true;
+#ifdef TARGET_LLVM_COMPARE_UNION_FIELDS
+else
+  useTheTy = TARGET_LLVM_COMPARE_UNION_FIELDS(UnionTy, TheTy,
+   Align, MaxAlign);
+#else
 else if (MaxAlign == Align  Size  MaxSize)
   useTheTy = true;
-else if (Size  MaxSize)
+else if (Size  MaxSize)// FIXME really?  Seems wrong to lower 
alignment
   useTheTy = true;
+#endif
 
 if (useTheTy) {
   UnionTy = TheTy;


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


[llvm-commits] [llvm] r46999 - /llvm/trunk/test/CFrontend/2008-02-11-AnnotateBuiltin.c

2008-02-11 Thread Tanya Lattner
Author: tbrethou
Date: Tue Feb 12 01:46:33 2008
New Revision: 46999

URL: http://llvm.org/viewvc/llvm-project?rev=46999view=rev
Log:
Test case for annotate builtin.

Added:
llvm/trunk/test/CFrontend/2008-02-11-AnnotateBuiltin.c

Added: llvm/trunk/test/CFrontend/2008-02-11-AnnotateBuiltin.c
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/2008-02-11-AnnotateBuiltin.c?rev=46999view=auto

==
--- llvm/trunk/test/CFrontend/2008-02-11-AnnotateBuiltin.c (added)
+++ llvm/trunk/test/CFrontend/2008-02-11-AnnotateBuiltin.c Tue Feb 12 01:46:33 
2008
@@ -0,0 +1,7 @@
+// RUN: %llvmgcc %s -S -o - | llvm-as | llvm-dis | grep llvm.annotation
+
+int main() {
+  int x = 0;
+  return __builtin_annotation(x, annotate);
+}
+


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


[llvm-commits] [llvm] r46957 - in /llvm/trunk: include/llvm/ADT/APFloat.h include/llvm/ADT/FoldingSet.h include/llvm/Support/AlignOf.h lib/CodeGen/SelectionDAG/SelectionDAG.cpp lib/Support/APFloat.cpp

2008-02-11 Thread Ted Kremenek
Author: kremenek
Date: Mon Feb 11 11:24:50 2008
New Revision: 46957

URL: http://llvm.org/viewvc/llvm-project?rev=46957view=rev
Log:
Added Profile method to APFloat for use with FoldingSet.

Added member template Add to FoldingSetNodeID that allows adding arbitrary
objects to a profile via dispatch to FoldingSetTraitT::Profile().

Removed FoldingSetNodeID::AddAPFloat and FoldingSetNodeID::APInt, as their
functionality is now replaced using the above mentioned member template.

Modified:
llvm/trunk/include/llvm/ADT/APFloat.h
llvm/trunk/include/llvm/ADT/FoldingSet.h
llvm/trunk/include/llvm/Support/AlignOf.h
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/trunk/lib/Support/APFloat.cpp
llvm/trunk/lib/Support/FoldingSet.cpp

Modified: llvm/trunk/include/llvm/ADT/APFloat.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/APFloat.h?rev=46957r1=46956r2=46957view=diff

==
--- llvm/trunk/include/llvm/ADT/APFloat.h (original)
+++ llvm/trunk/include/llvm/ADT/APFloat.h Mon Feb 11 11:24:50 2008
@@ -181,6 +181,10 @@
 APFloat(const APFloat );
 ~APFloat();
 
+/// Profile - Used to insert APFloat objects, or objects that contain
+///  APFloat objects, into FoldingSets.
+void Profile(FoldingSetNodeID NID) const;
+
 /// @brief Used by the Bitcode serializer to emit APInts to Bitcode.
 void Emit(Serializer S) const;
 

Modified: llvm/trunk/include/llvm/ADT/FoldingSet.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/FoldingSet.h?rev=46957r1=46956r2=46957view=diff

==
--- llvm/trunk/include/llvm/ADT/FoldingSet.h (original)
+++ llvm/trunk/include/llvm/ADT/FoldingSet.h Mon Feb 11 11:24:50 2008
@@ -178,6 +178,19 @@
   virtual void GetNodeProfile(FoldingSetNodeID ID, Node *N) const = 0;
 };
 
+//===--===//
+/// FoldingSetTrait - This trait class is used to define behavior of how
+///  to profile (in the FoldingSet parlance) an object of a given type.
+///  The default behavior is to invoke a 'Profile' method on an object, but
+///  through template specialization the behavior can be tailored for specific
+///  types.  Combined with the FoldingSetNodeWrapper classs, one can add 
objects
+///  to FoldingSets that were not originally designed to have that behavior.
+///
+templatetypename T struct FoldingSetTrait {
+  static inline void Profile(const T X, FoldingSetNodeID ID) { 
X.Profile(ID);}
+  static inline void Profile(T X, FoldingSetNodeID ID) { X.Profile(ID); }
+};
+  
 //======//
 /// FoldingSetNodeID - This class is used to gather all the unique data bits of
 /// a node.  When all the bits are gathered this class is used to produce a
@@ -206,10 +219,11 @@
   void AddInteger(uint64_t I);
   void AddFloat(float F);
   void AddDouble(double D);
-  void AddAPFloat(const APFloat apf);
-  void AddAPInt(const APInt api);
   void AddString(const std::string String);
   
+  template typename T
+  inline void Add(const T x) { FoldingSetTraitT::Profile(x, *this); }
+  
   /// clear - Clear the accumulated profile, allowing this FoldingSetNodeID
   ///  object to be used to compute a new profile.
   inline void clear() { Bits.clear(); }
@@ -227,19 +241,6 @@
 typedef FoldingSetImpl::Node FoldingSetNode;
 templateclass T class FoldingSetIterator;
 templateclass T class FoldingSetBucketIterator;
-
-//===--===//
-/// FoldingSetTrait - This trait class is used to define behavior of how
-///  to profile (in the FoldingSet parlance) an object of a given type.
-///  The default behavior is to invoke a 'Profile' method on an object, but
-///  through template specialization the behavior can be tailored for specific
-///  types.  Combined with the FoldingSetNodeWrapper classs, one can add 
objects
-///  to FoldingSets that were not originally designed to have that behavior.
-///
-templatetypename T struct FoldingSetTrait {
-  static inline void Profile(const T X, FoldingSetNodeID ID) { 
X.Profile(ID);}
-  static inline void Profile(T X, FoldingSetNodeID ID) { X.Profile(ID); }
-};
   
 
//===--===//
 /// FoldingSet - This template class is used to instantiate a specialized

Modified: llvm/trunk/include/llvm/Support/AlignOf.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/AlignOf.h?rev=46957r1=46956r2=46957view=diff

==
--- llvm/trunk/include/llvm/Support/AlignOf.h (original)
+++ llvm/trunk/include/llvm/Support/AlignOf.h Mon Feb 11 11:24:50 2008
@@ -35,6 +35,10 @@
 template typename T
 struct AlignOf {
   enum { 

[llvm-commits] [llvm-gcc-4.0] r47000 - /llvm-gcc-4.0/trunk/gcc/builtins.def

2008-02-11 Thread Tanya Lattner
Author: tbrethou
Date: Tue Feb 12 01:47:45 2008
New Revision: 47000

URL: http://llvm.org/viewvc/llvm-project?rev=47000view=rev
Log:
Remove extra underscore.

Modified:
llvm-gcc-4.0/trunk/gcc/builtins.def

Modified: llvm-gcc-4.0/trunk/gcc/builtins.def
URL: 
http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/builtins.def?rev=47000r1=46999r2=47000view=diff

==
--- llvm-gcc-4.0/trunk/gcc/builtins.def (original)
+++ llvm-gcc-4.0/trunk/gcc/builtins.def Tue Feb 12 01:47:45 2008
@@ -634,7 +634,7 @@
 DEF_C99_BUILTIN(BUILT_IN__EXIT2, _Exit, BT_FN_VOID_INT, 
ATTR_NORETURN_NOTHROW_LIST)
 
 /* APPLE LOCAL begin LLVM */
-DEF_GCC_BUILTIN(BUILT_IN_ANNOTATION, _annotation, 
BT_FN_UINT_UINT_CONST_STRING, ATTR_NULL)
+DEF_GCC_BUILTIN(BUILT_IN_ANNOTATION, annotation, 
BT_FN_UINT_UINT_CONST_STRING, ATTR_NULL)
 /* APPLE LOCAL end LLVM */
 
 /* Implementing nested functions.  */


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


Re: [llvm-commits] [llvm-gcc-4.2] r46958 - in /llvm-gcc-4.2/trunk/gcc: config/i386/llvm-i386-target.h llvm-types.cpp

2008-02-11 Thread Dale Johannesen
This fixes an ABI issue with unions on i386 (Darwin for sure, and I  
hope Linux as well).
I believe the FIXMEs I added indicate a latent bug, but I'm not sure  
what the intent was, so could whoever wrote this code originally take  
a look?
(As an aside, assuming that there is a struct type that gets passed  
the same way as any union type strikes me as dangerous.  I don't think  
there's any reason such a struct needs to exist.)

On Feb 11, 2008, at 10:03 AM, Dale Johannesen wrote:

 Author: johannes
 Date: Mon Feb 11 12:03:06 2008
 New Revision: 46958

 URL: http://llvm.org/viewvc/llvm-project?rev=46958view=rev
 Log:
 Choose an SSE vector-containing type for the constructed
 type that represents a union, if the union contains such
 a type.


 Modified:
llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h
llvm-gcc-4.2/trunk/gcc/llvm-types.cpp

 Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h
 URL: 
 http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h?rev=46958r1=46957r2=46958view=diff

 = 
 = 
 = 
 = 
 = 
 = 
 = 
 = 
 ==
 --- llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h (original)
 +++ llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h Mon Feb 11  
 12:03:06 2008
 @@ -83,6 +83,15 @@
 }   \
   }

 +/* Aggregates containing SSE vectors are aligned at 16 bytes as  
 parameters;
 +   while long double has GCC alignment of 16 bytes (correct for  
 struct layout)
 +   but is only 4 byte aligned as a parameter.  So if a union type  
 contains an
 +   SSE vector, use that as the basis for the constructed LLVM  
 struct. */
 +#define TARGET_LLVM_COMPARE_UNION_FIELDS(curType, newType,  
 curAlign, newAlign) \
 +  (newAlign==curAlign  TARGET_SSE  
  \
 +   TheTarget-getTargetLowering()-getByValTypeAlignment(newType)  
 \
 +   TheTarget-getTargetLowering()-getByValTypeAlignment(curType))
 +
 #ifdef LLVM_ABI_H
 extern bool llvm_x86_should_pass_aggregate_in_memory(tree, const  
 Type *);


 Modified: llvm-gcc-4.2/trunk/gcc/llvm-types.cpp
 URL: 
 http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-types.cpp?rev=46958r1=46957r2=46958view=diff

 = 
 = 
 = 
 = 
 = 
 = 
 = 
 = 
 ==
 --- llvm-gcc-4.2/trunk/gcc/llvm-types.cpp (original)
 +++ llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Mon Feb 11 12:03:06 2008
 @@ -33,6 +33,7 @@
 #include llvm/TypeSymbolTable.h
 #include llvm/Target/TargetData.h
 #include llvm/Target/TargetMachine.h
 +#include llvm/Target/TargetLowering.h
 #include llvm/Assembly/Writer.h
 #include llvm/ADT/DenseMap.h
 #include llvm/ADT/StringExtras.h
 @@ -1137,7 +1138,7 @@
   // 'sret' functions cannot be 'readnone' or 'readonly'.
   if (ABIConverter.isStructReturn())
 RAttributes = ~(ParamAttr::ReadNone|ParamAttr::ReadOnly);
 -
 +
   // Compute whether the result needs to be zext or sext'd.
   RAttributes |= HandleArgumentExtension(TREE_TYPE(type));

 @@ -2124,6 +2125,8 @@

 /// ConvertUNION - We know that 'type' is a UNION_TYPE or a  
 QUAL_UNION_TYPE:
 /// convert it to an LLVM type.
 +/// This involves creating a struct with the right size and  
 alignment. In
 +/// some cases this is target dependent.
 const Type *TypeConverter::ConvertUNION(tree type, tree orig_type) {
   if (const Type *Ty = GET_TYPE_LLVM(type)) {
 // If we already compiled this type, and if it was not a forward
 @@ -2170,17 +2173,25 @@
 // Select TheTy as union type if it meets one of the following  
 criteria
 // 1) UnionTy is 0
 // 2) TheTy alignment is more then UnionTy
 -// 3) TheTy size is greater than UnionTy size and TheTy  
 alignment is equal to UnionTy
 +// 3) TheTy size is greater than UnionTy size and TheTy  
 alignment is equal
 +//to UnionTy
 // 4) TheTy size is greater then UnionTy size and TheTy is packed
 +//FIXME there is no check for packed?
 bool useTheTy = false;
 if (UnionTy == 0)
   useTheTy = true;
 else if (Align  MaxAlign)
   useTheTy = true;
 +#ifdef TARGET_LLVM_COMPARE_UNION_FIELDS
 +else
 +  useTheTy = TARGET_LLVM_COMPARE_UNION_FIELDS(UnionTy, TheTy,
 +   Align, MaxAlign);
 +#else
 else if (MaxAlign == Align  Size  MaxSize)
   useTheTy = true;
 -else if (Size  MaxSize)
 +else if (Size  MaxSize)// FIXME really?  Seems wrong to  
 lower alignment
   useTheTy = true;
 +#endif

 if (useTheTy) {
   UnionTy = TheTy;


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

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


[llvm-commits] [llvm-gcc-4.0] r46988 - /llvm-gcc-4.0/tags/RELEASE_22/

2008-02-11 Thread Tanya Lattner
Author: tbrethou
Date: Mon Feb 11 23:19:58 2008
New Revision: 46988

URL: http://llvm.org/viewvc/llvm-project?rev=46988view=rev
Log:
Tag release 2.2

Added:
llvm-gcc-4.0/tags/RELEASE_22/
  - copied from r46987, llvm-gcc-4.0/branches/release_22/

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


[llvm-commits] [llvm] r46955 - in /llvm/trunk: include/llvm/Analysis/ScalarEvolution.h include/llvm/Analysis/ScalarEvolutionExpander.h include/llvm/Analysis/ScalarEvolutionExpressions.h lib/Analysis/S

2008-02-11 Thread Wojciech Matyjewicz
Author: wmat
Date: Mon Feb 11 05:03:14 2008
New Revision: 46955

URL: http://llvm.org/viewvc/llvm-project?rev=46955view=rev
Log:
Fix PR1798 - an error in the evaluation of SCEVAddRecExpr at an 
arbitrary iteration.

The patch:
1) changes SCEVSDivExpr into SCEVUDivExpr,
2) replaces PartialFact() function with BinomialCoefficient(); the 
computations (essentially, the division) in BinomialCoefficient() are 
performed with the apprioprate bitwidth necessary to avoid overflow; 
unsigned division is used instead of the signed one.

Computations in BinomialCoefficient() require support from the code 
generator for APInts. Currently, we use a hack rounding up the 
neccessary bitwidth to the nearest power of 2. The hack is easy to turn 
off in future.

One remaining issue: we assume the divisor of the binomial coefficient 
formula can be computed accurately using 16 bits. It means we can handle 
AddRecs of length up to 9. In future, we should use APInts to evaluate 
the divisor.

Thanks to Nicholas for cooperation!

Modified:
llvm/trunk/include/llvm/Analysis/ScalarEvolution.h
llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h
llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h
llvm/trunk/lib/Analysis/ScalarEvolution.cpp
llvm/trunk/test/Analysis/ScalarEvolution/2007-11-14-SignedAddRec.ll

Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolution.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolution.h?rev=46955r1=46954r2=46955view=diff

==
--- llvm/trunk/include/llvm/Analysis/ScalarEvolution.h (original)
+++ llvm/trunk/include/llvm/Analysis/ScalarEvolution.h Mon Feb 11 05:03:14 2008
@@ -225,7 +225,7 @@
   Ops.push_back(RHS);
   return getMulExpr(Ops);
 }
-SCEVHandle getSDivExpr(const SCEVHandle LHS, const SCEVHandle RHS);
+SCEVHandle getUDivExpr(const SCEVHandle LHS, const SCEVHandle RHS);
 SCEVHandle getAddRecExpr(const SCEVHandle Start, const SCEVHandle Step,
  const Loop *L);
 SCEVHandle getAddRecExpr(std::vectorSCEVHandle Operands,

Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h?rev=46955r1=46954r2=46955view=diff

==
--- llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h (original)
+++ llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h Mon Feb 11 
05:03:14 2008
@@ -126,10 +126,10 @@
 
 Value *visitMulExpr(SCEVMulExpr *S);
 
-Value *visitSDivExpr(SCEVSDivExpr *S) {
+Value *visitUDivExpr(SCEVUDivExpr *S) {
   Value *LHS = expand(S-getLHS());
   Value *RHS = expand(S-getRHS());
-  return InsertBinop(Instruction::SDiv, LHS, RHS, InsertPt);
+  return InsertBinop(Instruction::UDiv, LHS, RHS, InsertPt);
 }
 
 Value *visitAddRecExpr(SCEVAddRecExpr *S);

Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h?rev=46955r1=46954r2=46955view=diff

==
--- llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h (original)
+++ llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h Mon Feb 11 
05:03:14 2008
@@ -25,7 +25,7 @@
 // These should be ordered in terms of increasing complexity to make the
 // folders simpler.
 scConstant, scTruncate, scZeroExtend, scSignExtend, scAddExpr, scMulExpr,
-scSDivExpr, scAddRecExpr, scSMaxExpr, scUnknown, scCouldNotCompute
+scUDivExpr, scAddRecExpr, scSMaxExpr, scUnknown, scCouldNotCompute
   };
 
   
//======//
@@ -322,16 +322,16 @@
 
 
   
//======//
-  /// SCEVSDivExpr - This class represents a binary signed division operation.
+  /// SCEVUDivExpr - This class represents a binary unsigned division 
operation.
   ///
-  class SCEVSDivExpr : public SCEV {
+  class SCEVUDivExpr : public SCEV {
 friend class ScalarEvolution;
 
 SCEVHandle LHS, RHS;
-SCEVSDivExpr(const SCEVHandle lhs, const SCEVHandle rhs)
-  : SCEV(scSDivExpr), LHS(lhs), RHS(rhs) {}
+SCEVUDivExpr(const SCEVHandle lhs, const SCEVHandle rhs)
+  : SCEV(scUDivExpr), LHS(lhs), RHS(rhs) {}
 
-virtual ~SCEVSDivExpr();
+virtual ~SCEVUDivExpr();
   public:
 const SCEVHandle getLHS() const { return LHS; }
 const SCEVHandle getRHS() const { return RHS; }
@@ -353,7 +353,7 @@
   if (L == LHS  R == RHS)
 return this;
   else
-return SE.getSDivExpr(L, R);
+return SE.getUDivExpr(L, R);
 }
 
 
@@ -363,9 +363,9 @@
 void print(std::ostream *OS) const { if 

[llvm-commits] [llvm] r46997 - /llvm/trunk/docs/TableGenFundamentals.html

2008-02-11 Thread Bill Wendling
Author: void
Date: Tue Feb 12 01:12:46 2008
New Revision: 46997

URL: http://llvm.org/viewvc/llvm-project?rev=46997view=rev
Log:
More violation fixes.

Modified:
llvm/trunk/docs/TableGenFundamentals.html

Modified: llvm/trunk/docs/TableGenFundamentals.html
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/TableGenFundamentals.html?rev=46997r1=46996r2=46997view=diff

==
--- llvm/trunk/docs/TableGenFundamentals.html (original)
+++ llvm/trunk/docs/TableGenFundamentals.html Tue Feb 12 01:12:46 2008
@@ -301,9 +301,7 @@
 allows it to describe a wide range of information conveniently and compactly.
 The TableGen types are:/p
 
-ul
 dl
-
 dtttbbit/b/tt/dt
   ddA 'bit' is a boolean value that can hold either 0 or 1./dd
 
@@ -337,7 +335,6 @@
   ddThis represents a big hunk of text. NOTE: I don't remember why this is
   distinct from string!/dd
 /dl
-/ul
 
 pTo date, these types have been sufficient for describing things that
 TableGen has been used for, but it is straight-forward to extend this list if
@@ -357,7 +354,6 @@
 natural syntax and flavor for the application.  The current expression forms
 supported include:/p
 
-ul
 dl
 dttt?/tt/dt
   dduninitialized field/dd
@@ -401,7 +397,6 @@
   ddA string value that is the result of concatenating the 'a' and 'b'
   strings./dd
 /dl
-/ul
 
 pNote that all of the values have rules specifying how they convert to values
 for different types.  These rules allow you to assign a value like tt7/tt


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


[llvm-commits] [llvm] r46954 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/DAGCombiner.cpp lib/CodeGen/SelectionDAG/LegalizeDAG.cpp lib/CodeGen/SelectionDAG/LegalizeT

2008-02-11 Thread Duncan Sands
Author: baldrick
Date: Mon Feb 11 04:37:04 2008
New Revision: 46954

URL: http://llvm.org/viewvc/llvm-project?rev=46954view=rev
Log:
Add a isBigEndian method to complement isLittleEndian.

Modified:
llvm/trunk/include/llvm/Target/TargetLowering.h
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesExpand.cpp

Modified: llvm/trunk/include/llvm/Target/TargetLowering.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=46954r1=46953r2=46954view=diff

==
--- llvm/trunk/include/llvm/Target/TargetLowering.h (original)
+++ llvm/trunk/include/llvm/Target/TargetLowering.h Mon Feb 11 04:37:04 2008
@@ -85,6 +85,7 @@
   TargetMachine getTargetMachine() const { return TM; }
   const TargetData *getTargetData() const { return TD; }
 
+  bool isBigEndian() const { return !IsLittleEndian; }
   bool isLittleEndian() const { return IsLittleEndian; }
   MVT::ValueType getPointerTy() const { return PointerTy; }
   MVT::ValueType getShiftAmountTy() const { return ShiftAmountTy; }

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=46954r1=46953r2=46954view=diff

==
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon Feb 11 04:37:04 2008
@@ -1739,7 +1739,7 @@
 unsigned PtrOff = LVTStoreBytes - EVTStoreBytes;
 unsigned Alignment = LN0-getAlignment();
 SDOperand NewPtr = LN0-getBasePtr();
-if (!TLI.isLittleEndian()) {
+if (TLI.isBigEndian()) {
   NewPtr = DAG.getNode(ISD::ADD, PtrType, NewPtr,
DAG.getConstant(PtrOff, PtrType));
   Alignment = MinAlign(Alignment, PtrOff);
@@ -3086,7 +3086,7 @@
 MVT::ValueType PtrType = N0.getOperand(1).getValueType();
 // For big endian targets, we need to adjust the offset to the pointer to
 // load the correct bytes.
-if (!TLI.isLittleEndian()) {
+if (TLI.isBigEndian()) {
   unsigned LVTStoreBits = MVT::getStoreSizeInBits(N0.getValueType());
   unsigned EVTStoreBits = MVT::getStoreSizeInBits(EVT);
   ShAmt = LVTStoreBits - EVTStoreBits - ShAmt;
@@ -3460,7 +3460,7 @@
 }
 
 // For big endian targets, swap the order of the pieces of each element.
-if (!TLI.isLittleEndian())
+if (TLI.isBigEndian())
   std::reverse(Ops.end()-NumOutputsPerInput, Ops.end());
   }
   MVT::ValueType VT = MVT::getVectorType(DstEltVT, Ops.size());
@@ -4386,7 +4386,7 @@
   uint64_t Val = CFP-getValueAPF().convertToAPInt().getZExtValue();
   SDOperand Lo = DAG.getConstant(Val  0x, MVT::i32);
   SDOperand Hi = DAG.getConstant(Val  32, MVT::i32);
-  if (!TLI.isLittleEndian()) std::swap(Lo, Hi);
+  if (TLI.isBigEndian()) std::swap(Lo, Hi);
 
   int SVOffset = ST-getSrcValueOffset();
   unsigned Alignment = ST-getAlignment();

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=46954r1=46953r2=46954view=diff

==
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Feb 11 04:37:04 2008
@@ -2117,7 +2117,7 @@
   ExpandOp(Tmp2, Lo, Hi);
 
   // Big endian systems want the hi reg first.
-  if (!TLI.isLittleEndian())
+  if (TLI.isBigEndian())
 std::swap(Lo, Hi);
   
   if (Hi.Val)
@@ -2256,7 +2256,7 @@
 uint64_t IntVal 
=CFP-getValueAPF().convertToAPInt().getZExtValue();
 SDOperand Lo = DAG.getConstant(uint32_t(IntVal), MVT::i32);
 SDOperand Hi = DAG.getConstant(uint32_t(IntVal 32), MVT::i32);
-if (!TLI.isLittleEndian()) std::swap(Lo, Hi);
+if (TLI.isBigEndian()) std::swap(Lo, Hi);
 
 Lo = DAG.getStore(Tmp1, Lo, Tmp2, ST-getSrcValue(),
   SVOffset, isVolatile, Alignment);
@@ -2356,7 +2356,7 @@
   ExpandOp(Node-getOperand(1), Lo, Hi);
   IncrementSize = Hi.Val ? MVT::getSizeInBits(Hi.getValueType())/8 : 0;
 
-  if (!TLI.isLittleEndian())
+  if (TLI.isBigEndian())
 std::swap(Lo, Hi);
 }
 
@@ -5766,7 +5766,7 @@
 // Remember that we legalized the chain.
 Hi = LegalizeOp(Hi);
 AddLegalizedOperand(Op.getValue(1), Hi.getValue(1));
-if (!TLI.isLittleEndian())
+if (TLI.isBigEndian())
   std::swap(Lo, Hi);
 break;
   }
@@ -5809,7 +5809,7 @@
 
   // Remember that we 

Re: [llvm-commits] [llvm] r46850 - in /llvm/trunk: lib/Target/X86/X86ISelDAGToDAG.cpp lib/Target/X86/X86Instr64bit.td lib/Target/X86/X86InstrInfo.td lib/Target/X86/X86Subtarget.cpp lib/Target/X86/X86S

2008-02-11 Thread Dan Gohman
Hi Evan,

This breaks these:

test/CodeGen/X86/fold-mul-lohi.ll
test/CodeGen/X86/stride-nine-with-base-reg.ll
test/CodeGen/X86/stride-reuse.ll

on Linux. These tests should probably explicitly set the relocation  
model to
static so that they always test what they're intended to test.

Dan

On Feb 7, 2008, at 12:53 AM, Evan Cheng wrote:

 Author: evancheng
 Date: Thu Feb  7 02:53:49 2008
 New Revision: 46850

 URL: http://llvm.org/viewvc/llvm-project?rev=46850view=rev
 Log:
 Fix a x86-64 codegen deficiency. Allow gv + offset when using rip  
 addressing mode.
 Before:
 _main:
subq$8, %rsp
leaq_X(%rip), %rax
movsd   8(%rax), %xmm1
movss   _X(%rip), %xmm0
call_t
xorl%ecx, %ecx
movl%ecx, %eax
addq$8, %rsp
ret
 Now:
 _main:
subq$8, %rsp
movsd   _X+8(%rip), %xmm1
movss   _X(%rip), %xmm0
call_t
xorl%ecx, %ecx
movl%ecx, %eax
addq$8, %rsp
ret

 Notice there is another idiotic codegen issue that needs to be fixed  
 asap:
 xorl%ecx, %ecx
 movl%ecx, %eax

 Added:
llvm/trunk/test/CodeGen/X86/x86-64-gv-offset.ll
 Modified:
llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
llvm/trunk/lib/Target/X86/X86Instr64bit.td
llvm/trunk/lib/Target/X86/X86InstrInfo.td
llvm/trunk/lib/Target/X86/X86Subtarget.cpp
llvm/trunk/lib/Target/X86/X86Subtarget.h
llvm/trunk/test/CodeGen/X86/pic_jumptable.ll

 Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
 URL: 
 http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=46850r1=46849r2=46850view=diff

 = 
 = 
 = 
 = 
 = 
 = 
 = 
 = 
 ==
 --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original)
 +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Thu Feb  7  
 02:53:49 2008
 @@ -63,7 +63,7 @@
   int FrameIndex;
 } Base;

 -bool isRIPRel; // RIP relative?
 +bool isRIPRel; // RIP as base?
 unsigned Scale;
 SDOperand IndexReg;
 unsigned Disp;
 @@ -664,7 +664,9 @@
   case X86ISD::Wrapper: {
 bool is64Bit = Subtarget-is64Bit();
 // Under X86-64 non-small code model, GV (and friends) are 64- 
 bits.
 -if (is64Bit  TM.getCodeModel() != CodeModel::Small)
 +// Also, base and index reg must be 0 in order to use rip as  
 base.
 +if (is64Bit  (TM.getCodeModel() != CodeModel::Small ||
 +AM.Base.Reg.Val || AM.IndexReg.Val))
   break;
 if (AM.GV != 0 || AM.CP != 0 || AM.ES != 0 || AM.JT != -1)
   break;
 @@ -672,39 +674,27 @@
 // been picked, we can't fit the result available in the  
 register in the
 // addressing mode. Duplicate GlobalAddress or ConstantPool as  
 displacement.
 if (!AlreadySelected || (AM.Base.Reg.Val  AM.IndexReg.Val)) {
 -  bool isStatic = TM.getRelocationModel() == Reloc::Static;
   SDOperand N0 = N.getOperand(0);
 -  // Mac OS X X86-64 lower 4G address is not available.
 -  bool isAbs32 = !is64Bit ||
 -(isStatic  Subtarget-hasLow4GUserSpaceAddress());
   if (GlobalAddressSDNode *G =  
 dyn_castGlobalAddressSDNode(N0)) {
 GlobalValue *GV = G-getGlobal();
 -if (isAbs32 || isRoot) {
 -  AM.GV = GV;
 -  AM.Disp += G-getOffset();
 -  AM.isRIPRel = !isAbs32;
 -  return false;
 -}
 +AM.GV = GV;
 +AM.Disp += G-getOffset();
 +AM.isRIPRel = is64Bit;
 +return false;
   } else if (ConstantPoolSDNode *CP =  
 dyn_castConstantPoolSDNode(N0)) {
 -if (isAbs32 || isRoot) {
 -  AM.CP = CP-getConstVal();
 -  AM.Align = CP-getAlignment();
 -  AM.Disp += CP-getOffset();
 -  AM.isRIPRel = !isAbs32;
 -  return false;
 -}
 +AM.CP = CP-getConstVal();
 +AM.Align = CP-getAlignment();
 +AM.Disp += CP-getOffset();
 +AM.isRIPRel = is64Bit;
 +return false;
   } else if (ExternalSymbolSDNode *S  
 =dyn_castExternalSymbolSDNode(N0)) {
 -if (isAbs32 || isRoot) {
 -  AM.ES = S-getSymbol();
 -  AM.isRIPRel = !isAbs32;
 -  return false;
 -}
 +AM.ES = S-getSymbol();
 +AM.isRIPRel = is64Bit;
 +return false;
   } else if (JumpTableSDNode *J = dyn_castJumpTableSDNode(N0)) {
 -if (isAbs32 || isRoot) {
 -  AM.JT = J-getIndex();
 -  AM.isRIPRel = !isAbs32;
 -  return false;
 -}
 +AM.JT = J-getIndex();
 +AM.isRIPRel = is64Bit;
 +return false;
   }
 }
 break;
 @@ -719,7 +709,7 @@
 break;

   case ISD::SHL:
 -if (AlreadySelected || AM.IndexReg.Val != 0 || AM.Scale != 1)
 +if (AlreadySelected || AM.IndexReg.Val != 0 || AM.Scale != 1 ||  
 AM.isRIPRel)
   break;

 if (ConstantSDNode *CN = dyn_castConstantSDNode(N.Val- 
 getOperand(1))) {
 @@ 

[llvm-commits] [llvm] r46991 - /llvm/trunk/docs/CommandGuide/Makefile

2008-02-11 Thread Chris Lattner
Author: lattner
Date: Tue Feb 12 00:07:47 2008
New Revision: 46991

URL: http://llvm.org/viewvc/llvm-project?rev=46991view=rev
Log:
heavily  refactor this to have less duplication between BUILD_FOR_WEBSITE mode 
and not.

Modified:
llvm/trunk/docs/CommandGuide/Makefile

Modified: llvm/trunk/docs/CommandGuide/Makefile
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CommandGuide/Makefile?rev=46991r1=46990r2=46991view=diff

==
--- llvm/trunk/docs/CommandGuide/Makefile (original)
+++ llvm/trunk/docs/CommandGuide/Makefile Tue Feb 12 00:07:47 2008
@@ -8,67 +8,59 @@
 
##===--===##
 
 ifdef BUILD_FOR_WEBSITE
-
 # This special case is for keeping the CommandGuide on the LLVM web site
 # up to date automatically as the documents are checked in. It must build
 # the POD files to HTML only and keep them in the src directories. It must also
 # build in an unconfigured tree, hence the ifdef. To use this, run
 # make -s BUILD_FOR_WEBSITE=1 inside the cvs commit script.
+SRC_DOC_DIR=
+DST_HTML_DIR=html/
+DST_MAN_DIR=man/man1/
+DST_PS_DIR=ps/
 
-POD  := $(wildcard *.pod)
-HTML := $(patsubst %.pod, html/%.html, $(POD))
-MAN  := $(patsubst %.pod, man/man1/%.1, $(POD))
-PS   := $(patsubst %.pod, ps/%.ps, $(POD))
-
-all: $(HTML) $(MAN) $(PS)
-
-.SUFFIXES:
-.SUFFIXES: .html .pod .1 .ps
-
-html/%.html: %.pod
-   pod2html --css=manpage.css --htmlroot=. \
- --podpath=. --noindex --infile=$ --outfile=$@ --title=$*
-
-man/man1/%.1: %.pod
-   pod2man --release=CVS --center=LLVM Command Guide $ $@
-
-ps/%.ps: man/man1/%.1
-   groff -Tps -man $  $@
+# If we are in BUILD_FOR_WEBSITE mode, default to the all target.
+all:: html man ps
 
 clean:
rm -f pod2htm*.*~~ $(HTML) $(MAN) $(PS)
+else
 
-else 
-
+# Otherwise, if not in BUILD_FOR_WEBSITE mode, use the project info.
 LEVEL := ../..
-
 include $(LEVEL)/Makefile.common
 
-POD := $(wildcard $(PROJ_SRC_DIR)/*.pod)
+SRC_DOC_DIR=$(PROJ_SRC_DIR)/
+DST_HTML_DIR=$(PROJ_OBJ_DIR)/
+DST_MAN_DIR=$(PROJ_OBJ_DIR)/
+DST_PS_DIR=$(PROJ_OBJ_DIR)/
 
-EXTRA_DIST := $(POD) index.html
+endif
 
-HTML = $(patsubst $(PROJ_SRC_DIR)/%.pod, $(PROJ_OBJ_DIR)/%.html, $(POD))
-MAN = $(patsubst $(PROJ_SRC_DIR)/%.pod, $(PROJ_OBJ_DIR)/%.1, $(POD))
-PS = $(patsubst $(PROJ_SRC_DIR)/%.pod, $(PROJ_OBJ_DIR)/%.ps, $(POD))
+
+POD  := $(wildcard $(SRC_DOC_DIR)*.pod)
+HTML := $(patsubst $(SRC_DOC_DIR)%.pod, $(DST_HTML_DIR)%.html, $(POD))
+MAN  := $(patsubst $(SRC_DOC_DIR)%.pod, $(DST_MAN_DIR)%.1, $(POD))
+PS   := $(patsubst $(SRC_DOC_DIR)%.pod, $(DST_PS_DIR)%.ps, $(POD))
 
 .SUFFIXES:
 .SUFFIXES: .html .pod .1 .ps
 
-$(HTML) : html/.dir man/.dir man/man1/.dir ps/.dir
+$(DST_HTML_DIR)%.html: %.pod $(DST_HTML_DIR)/.dir
+   pod2html --css=manpage.css --htmlroot=. \
+ --podpath=. --noindex --infile=$ --outfile=$@ --title=$*
 
-html: $(HTML)
+$(DST_MAN_DIR)%.1: %.pod $(DST_MAN_DIR)/.dir
+   pod2man --release=CVS --center=LLVM Command Guide $ $@
+
+$(DST_PS_DIR)%.ps: $(DST_MAN_DIR)%.1 $(DST_PS_DIR)/.dir
+   groff -Tps -man $  $@
 
-$(PROJ_OBJ_DIR)/%.html: %.pod
-   $(POD2HTML) --css=manpage.css --htmlroot=. --podpath=. \
- --noindex --infile=$ --outfile=$@ --title=$*
-
-$(PROJ_OBJ_DIR)/%.1: %.pod
-   $(POD2MAN) --release=$(LLVMVersion) \
- --center=LLVM Command Guide $ $@
 
-$(PROJ_OBJ_DIR)/%.ps: $(PROJ_OBJ_DIR)/%.1
-   $(GROFF) -Tps -man $  $@
+html: $(HTML)
+man: $(MAN)
+ps: $(PS)
+
+EXTRA_DIST := $(POD) index.html
 
 clean-local::
$(Verb) $(RM) -f pod2htm*.*~~ $(HTML) $(MAN) $(PS)
@@ -97,5 +89,3 @@
 printvars::
$(Echo) POD:  '$(POD)'
$(Echo) HTML   :  '$(HTML)'
-
-endif


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


[llvm-commits] CVS: llvm-www/releases/2.2/docs/tutorial/

2008-02-11 Thread Tanya Lattner


Changes in directory llvm-www/releases/2.2/docs/tutorial:

---
Log message:

Directory /var/cvs/llvm/llvm-www/releases/2.2/docs/tutorial added to the 
repository


---
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-www/releases/2.2/docs/CommandGuide/

2008-02-11 Thread Tanya Lattner


Changes in directory llvm-www/releases/2.2/docs/CommandGuide:

---
Log message:

Directory /var/cvs/llvm/llvm-www/releases/2.2/docs/CommandGuide added to the 
repository


---
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-www/releases/2.2/docs/CommandGuide/man/

2008-02-11 Thread Tanya Lattner


Changes in directory llvm-www/releases/2.2/docs/CommandGuide/man:

---
Log message:

Directory /var/cvs/llvm/llvm-www/releases/2.2/docs/CommandGuide/man added to 
the repository


---
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