Re: [llvm-commits] CVS: llvm/lib/CodeGen/Selection DAG/DAGCombiner.cpp

2007-06-29 Thread Duncan Sands
Hi,

  It seems like folding undef/X to undef isn't safe either though,

here is my understanding of how to fold undef.  I hope it clarifies
this confusing area.  Of course, I could be confused myself but I
hope not :)

(1) When is it OK to fold y=foo(undef) to y=undef?  I claim that
it is OK if and only if foo is surjective, i.e. if for each possible
value for y there exists a value for x such that y=foo(x).  Surjective
is sometimes called onto.

Before I explain why I think this, an example:
y=(undef == z)
The possible values of y are 0 and 1 because the result of == is
an i1.  Surjectivity means: can I get (undef==z) to produce each of
0 and 1 by plugging in different values for undef?  Obviously I can,
so in this case I can fold to y=undef.

OK, now let me justify my claim.  If foo is surjective then every
possible value of y can be obtained by varying the value of undef
put into foo(undef) so clearly putting y=undef is OK.  More interesting
is why if f is *not* surjective then it is wrong to fold to y=undef:
if f is not surjective then by definition there is some y0 which cannot
be obtained as foo(x) no matter what x you try.  Consider the following
code:
y = foo(undef)
z = (y == y0)
The value of z is deterministic: it is always 0 because it is impossible
to have foo(anything)==y0.  But if we fold to y=undef then this becomes
z = (undef == y0)
which is (correctly) folded to z=undef.  Conclusion: if foo is not surjective
then folding y=foo(undef) to y=undef can result in wrong future deductions,
in this case, z=undef rather than z=0.

Example:
y = undef udiv 2.
Here foo(x)=x udiv 2 is not surjective so it is wrong to fold to y=undef,
as observed by Dan.

Example:
y = undef + 2.
Here, thanks to circular arithmetic, foo(x)=x+2 is surjective so we can
fold to y=undef.

(2) What to do when foo is not surjective?  Choose some value for undef
and fold to y=foo(value_chosen).  In general foo will involve some
other variables, so the trick is to find a constant value for y that is
always obtainable no matter what those other variables are (while it is
logically correct to replace y with a function of those other variables,
which is what foo(0) will give in general for example, it is more efficient
to use a constant value if possible).

Example: folding y=undef udiv x.  This could be folded to 0 or to 1,
since 0 is what you get by substituting undef=0, and 1 is what you get
by substituting undef=x.  (If x=0 then in both cases you get 0/0 which
is, I hear, undefined so you can choose it to be 0 or 1 as you like).
Of course you could also fold it to 1 div x or intmax div x or
(x*x) div x if you really felt like it, but 0 and 1 are the only
constants that can always be obtained regardless of the value of x,
so they are the most efficient choices.

Ciao,

Duncan.

  
  with
  the way it sounds like undef is intended to work. This code:
 
%x = udiv i32 undef, %intmax
%y = udiv i32 %x, 2
 
  will always set %y to 0. Maybe instcombine can fold the second
  udiv by looking through its operands, but it can't safely fold the
  first. The best it could do is try to fold away all of %x's uses so
  that %x isn't needed anymore.
 
 Duncan pointed out that I confused myself.  If something is undef, we  
 can choose to pick any specific value for the undef to pick the  
 cancellation.
 
  Ug, excellent point.  At this point, I'm inclined to just give up
  folding of udiv undefs.  What do you think?
 
  udiv isn't the only one, the way this is going...
 
%x = mul i32 undef, 2
%y = srem i32 %x, 2
 
 This is fine, we fold the mul to 0 (because the undef could be zero).
 
%x = and i32 undef, 0x
%y = and i32 %x,0x
 
  and so on for a lot of others.
 
 For and, we fold undef to 0 (because the undef could be 0)
 For or undef, X, we fold to -1, because the undef could be -1.
 
  Even simple things like undef+X don't seem to be safe to fold.
 
%x = undef;
if (%x = 0)
  %z = %y / (%x + 1); // don't divide by undef!
 
  Fortunately, this isn't a problem.  LLVM has no copy instruction, so
  the code is really this:
 
if (undef = 0)
  %z = %y / (undef + 1); // don't divide by undef!
 
  There is nothing that specifies the two undefs are the same value.
  Also, in C, if you have an undefined variable, you aren't guaranteed
  to get the same undef value each time you read the variable, so
  transforming C into LLVM is ok :)
 
  In C, an uninitialized variable has an indeterminate value, which is
  potentially a trap representation, which can't even be multiplied by
  zero without incurring undefined behavior. I don't know where it
  suggests that a variable with indeterminate value might be different
  on each read though.
 
 There have been discussions about this issue on the GCC list.  I  
 remember the resolution (they take the same basic approach we do),  
 but I don't remember why.  I think a DR may be 

Re: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

2007-06-29 Thread Duncan Sands
Hi Evan,

 +/// propagateEHRegister - The specified EH register is required in a 
 successor
 +/// of the EH landing pad. Propagate it (by adding it to livein) to all the
 +/// blocks in the paths between the landing pad and the specified block.

thanks for this fix.  For the moment we don't really need this much generality:
due to other problems (PR1508) we don't even try to handle the case where the
exception handling intrinsics are neither in the landing pad nor in an immediate
successor of the landing pad (we assert if this occurs).  Thus the attached
minimal fix is good enough until PR1508 is resolved (shall I commit it?).  Also,
I can't help feeling that the right way to solve the problem of reading the 
exception
register in some block potentially far away from the landing pad is: (1) add 
code to
the landing pad that writes the physical register to a virtual register; (2) 
turn
the eh.exception intrinsic into a read from the virtual register.  The problem 
is
that we are in ssa form during codegen, so doing this means inserting phi nodes 
etc
for the virtual register.

Ciao,

Duncan.
Index: lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
===
RCS file: /var/cvs/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp,v
retrieving revision 1.474
diff -u -3 -p -r1.474 SelectionDAGISel.cpp
--- lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp	29 Jun 2007 03:42:22 -	1.474
+++ lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp	29 Jun 2007 08:19:49 -
@@ -2336,25 +2336,6 @@ static void addCatchInfo(CallInst I, Ma
 MMI-addCatchTypeInfo(MBB, TyInfo);
 }
 
-/// propagateEHRegister - The specified EH register is required in a successor
-/// of the EH landing pad. Propagate it (by adding it to livein) to all the
-/// blocks in the paths between the landing pad and the specified block.
-static void propagateEHRegister(MachineBasicBlock *MBB, unsigned EHReg,
-SmallPtrSetMachineBasicBlock*, 8 Visited) {
-  if (MBB-isLandingPad() || !Visited.insert(MBB))
-return;
-
-  MBB-addLiveIn(EHReg);
-  for (MachineBasicBlock::pred_iterator PI = MBB-pred_begin(),
- E = MBB-pred_end(); PI != E; ++PI)
-propagateEHRegister(*PI, EHReg, Visited);
-}
-
-static void propagateEHRegister(MachineBasicBlock *MBB, unsigned EHReg) {
-  SmallPtrSetMachineBasicBlock*, 8 Visited;
-  propagateEHRegister(MBB, EHReg, Visited);
-}
-
 /// visitIntrinsicCall - Lower the call to the specified intrinsic function.  If
 /// we want to emit this as a call to a named external function, return the name
 /// otherwise lower it and return null.
@@ -2465,9 +2446,11 @@ SelectionDAGLowering::visitIntrinsicCall
 
   case Intrinsic::eh_exception: {
 if (ExceptionHandling) {
-  if (!CurMBB-isLandingPad()  TLI.getExceptionAddressRegister())
-  propagateEHRegister(CurMBB, TLI.getExceptionAddressRegister());
-
+  if (!CurMBB-isLandingPad()) {
+// FIXME: Mark exception register as live in.  Hack for PR1508.
+unsigned Reg = TLI.getExceptionAddressRegister();
+if (Reg) CurMBB-addLiveIn(Reg);
+  }
   // Insert the EXCEPTIONADDR instruction.
   SDVTList VTs = DAG.getVTList(TLI.getPointerTy(), MVT::Other);
   SDOperand Ops[1];
@@ -2492,8 +2475,9 @@ SelectionDAGLowering::visitIntrinsicCall
 #ifndef NDEBUG
 FuncInfo.CatchInfoLost.insert(I);
 #endif
-if (TLI.getExceptionSelectorRegister())
-  propagateEHRegister(CurMBB, TLI.getExceptionSelectorRegister());
+// FIXME: Mark exception selector register as live in.  Hack for PR1508.
+unsigned Reg = TLI.getExceptionSelectorRegister();
+if (Reg) CurMBB-addLiveIn(Reg);
   }
 
   // Insert the EHSELECTION instruction.
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

2007-06-29 Thread Gordon Henriksen

On 2007-06-28, at 23:37, David A. Greene wrote:


On Thursday 28 June 2007 21:51, Nick Lewycky wrote:


David Greene wrote:

+// Cray [dag]: Must recompute end() each iteration because  
it may


Please don't mark the comments as being from Cray. Just write the
comment as a standard explanation.


Ok, will fix.  Just wanted to take responsibility for screw-ups.  :)


svn blame will know your name. ;)

— Gordon

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


[llvm-commits] CVS: llvm/Makefile.rules

2007-06-29 Thread Reid Spencer


Changes in directory llvm:

Makefile.rules updated: 1.437 - 1.438
---
Log message:

Add a missing .


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

 Makefile.rules |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/Makefile.rules
diff -u llvm/Makefile.rules:1.437 llvm/Makefile.rules:1.438
--- llvm/Makefile.rules:1.437   Thu Jun 28 22:36:21 2007
+++ llvm/Makefile.rules Fri Jun 29 09:02:07 2007
@@ -38,7 +38,7 @@
 VPATH=$(PROJ_SRC_DIR)
 
 #
-# Reset the list of suffixes we know how to build
+# Reset the list of suffixes we know how to build.
 #
 .SUFFIXES:
 .SUFFIXES: .c .cpp .cc .h .hpp .y .l .lo .o .a .bc .td .ps .dot .ll



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


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

2007-06-29 Thread Chris Lattner
 Add a default parameter to a SmallVector constructor to allow it to
 be called with just an initial length value, just like in std::vector.

Ok.

Should this be marked 'explicit'?

-Chris


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

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


 Index: llvm/include/llvm/ADT/SmallVector.h
 diff -u llvm/include/llvm/ADT/SmallVector.h:1.30 llvm/include/llvm/ 
 ADT/SmallVector.h:1.31
 --- llvm/include/llvm/ADT/SmallVector.h:1.30  Thu May 17 15:01:40 2007
 +++ llvm/include/llvm/ADT/SmallVector.h   Thu Jun 28 15:27:24 2007
 @@ -442,7 +442,7 @@
SmallVector() : SmallVectorImplT(NumTsAvailable) {
}

 -  SmallVector(unsigned Size, const T Value)
 +  SmallVector(unsigned Size, const T Value = T())
  : SmallVectorImplT(NumTsAvailable) {
  this-reserve(Size);
  while (Size--)



 ___
 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


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

2007-06-29 Thread Tanya Lattner
Should this be added as a regression test?

-Tanya

On Jun 27, 2007, at 7:00 PM, Sheng Zhou wrote:

 Chris,

 Attached is the testcase, which will get:

 opt: /developer/home2/zsth/llvm-gcc-dev/HEAD/llvm/llvm/lib/VMCore/ 
 Constants.cpp:1559: static llvm::Constant*  
 llvm::ConstantExpr::getZExt(llvm::Constant*, const llvm::Type*):  
 Assertion `C-getType()-getPrimitiveSizeInBits()  Ty- 
 getPrimitiveSizeInBits() SrcTy must be smaller than DestTy for  
 ZExt!' failed.

 The condition IterationCount-getType() != LargestType doesn't  
 mean the IterationCount-getType's bitwidth  LargestType's
 so, sometimes, (like in this testcase), it need a trunc not ext.  
 This patch is to fix it.

 Sheng



   DOUT  INDVARS: New CanIV:   *IndVar;

if (!isaSCEVCouldNotCompute(IterationCount)) {
 -if (IterationCount-getType() != LargestType)
 +if (IterationCount-getType()-getPrimitiveSizeInBits() 
 +LargestType-getPrimitiveSizeInBits())
IterationCount = SCEVZeroExtendExpr::get(IterationCount,   
 LargestType);
 +else if (IterationCount-getType() != LargestType)
 +  IterationCount = SCEVTruncateExpr::get(IterationCount,   
 LargestType);
  if (Instruction *DI = LinearFunctionTestReplace(L,   
 IterationCount,Rewriter))
DeadInsts.insert(DI);
}


 testcase.bc
 ; ModuleID = 'testcase.bc'
 target datalayout = e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32- 
 i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64
 target triple = i686-pc-linux-gnu

 define i32 @testcase(i5 zext  %k) {
 entry:
   br label %bb2

 bb:   ; preds = %bb2
   %tmp1 = add i32 %tmp2, %result  ; i32 [#uses=1]
   %indvar_next1 = add i5 %k_0, 1  ; i5 [#uses=1]
   br label %bb2

 bb2:  ; preds = %bb, %entry
   %k_0 = phi i5 [ 0, %entry ], [ %indvar_next1, %bb ] ; i5 
 [#uses=2]
   %result = phi i32 [ 0, %entry ], [ %tmp1, %bb ] ; i32 
 [#uses=2]
   %tmp2 = zext i5 %k_0 to i32 ; i32 [#uses=1]
   %exitcond = icmp eq i32 %tmp2, 16   ; i1 [#uses=1]
   br i1 %exitcond, label %bb3, label %bb

 bb3:  ; preds = %bb2
   ret i32 %result
 }
 ___
 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] [java] r20000 - in /java/trunk: include/llvm/Java/Bytecode.h include/llvm/Java/ClassFile.h lib/ClassFile/ClassFile.cpp lib/Compiler/Compiler.cpp lib/Compiler/Locals.cpp lib/Compiler/Ope

2007-06-29 Thread Alkis Evlogimenos
Author: alkis
Date: Wed Feb  2 10:26:54 2005
New Revision: 2

URL: http://llvm.org/viewvc/llvm-project?rev=2view=rev
Log:
Make llvm-java compile on Windows. Patch contributed by Jeff Cohen!

Modified:
java/trunk/include/llvm/Java/Bytecode.h   (contents, props changed)
java/trunk/include/llvm/Java/ClassFile.h   (contents, props changed)
java/trunk/lib/ClassFile/ClassFile.cpp   (contents, props changed)
java/trunk/lib/Compiler/Compiler.cpp   (contents, props changed)
java/trunk/lib/Compiler/Locals.cpp   (contents, props changed)
java/trunk/lib/Compiler/OperandStack.cpp   (contents, props changed)
java/trunk/runtime/runtime.c   (contents, props changed)

Modified: java/trunk/include/llvm/Java/Bytecode.h
URL: 
http://llvm.org/viewvc/llvm-project/java/trunk/include/llvm/Java/Bytecode.h?rev=2r1=1r2=2view=diff
==
--- java/trunk/include/llvm/Java/Bytecode.h (original)
+++ java/trunk/include/llvm/Java/Bytecode.h Wed Feb  2 10:26:54 2005
@@ -14,7 +14,7 @@
 #ifndef LLVM_JAVA_BYTECODE_H
 #define LLVM_JAVA_BYTECODE_H
 
-#include stdint.h
+#include llvm/Support/DataTypes.h
 
 namespace llvm { namespace Java {
 

Propchange: java/trunk/include/llvm/Java/Bytecode.h
--
--- cvs2svn:cvs-rev (original)
+++ cvs2svn:cvs-rev Wed Feb  2 10:26:54 2005
@@ -1 +1 @@
-1.13
+1.14

Modified: java/trunk/include/llvm/Java/ClassFile.h
URL: 
http://llvm.org/viewvc/llvm-project/java/trunk/include/llvm/Java/ClassFile.h?rev=2r1=1r2=2view=diff
==
--- java/trunk/include/llvm/Java/ClassFile.h (original)
+++ java/trunk/include/llvm/Java/ClassFile.h Wed Feb  2 10:26:54 2005
@@ -22,7 +22,7 @@
 #include stdexcept
 #include vector
 
-#include stdint.h
+#include llvm/Support/DataTypes.h
 
 namespace llvm { namespace Java {
 
@@ -193,17 +193,20 @@
 std::ostream dump(std::ostream os) const;
   };
 
-  struct ConstantFieldRef : public ConstantMemberRef {
+  class ConstantFieldRef : public ConstantMemberRef {
+  public:
 ConstantFieldRef(const ConstantPool cp, std::istream is)
   : ConstantMemberRef(cp, is) { }
   };
 
-  struct ConstantMethodRef : public ConstantMemberRef {
+  class ConstantMethodRef : public ConstantMemberRef {
+  public:
 ConstantMethodRef(const ConstantPool cp, std::istream is)
   : ConstantMemberRef(cp, is) { }
   };
 
-  struct ConstantInterfaceMethodRef : public ConstantMemberRef {
+  class ConstantInterfaceMethodRef : public ConstantMemberRef {
+  public:
 ConstantInterfaceMethodRef(const ConstantPool cp, std::istream is)
   : ConstantMemberRef(cp, is) { }
   };

Propchange: java/trunk/include/llvm/Java/ClassFile.h
--
--- cvs2svn:cvs-rev (original)
+++ cvs2svn:cvs-rev Wed Feb  2 10:26:54 2005
@@ -1 +1 @@
-1.27
+1.28

Modified: java/trunk/lib/ClassFile/ClassFile.cpp
URL: 
http://llvm.org/viewvc/llvm-project/java/trunk/lib/ClassFile/ClassFile.cpp?rev=2r1=1r2=2view=diff
==
--- java/trunk/lib/ClassFile/ClassFile.cpp (original)
+++ java/trunk/lib/ClassFile/ClassFile.cpp Wed Feb  2 10:26:54 2005
@@ -18,7 +18,9 @@
 #include llvm/ADT/STLExtras.h
 #include llvm/Support/CommandLine.h
 #include llvm/Support/Debug.h
+#include llvm/Config/alloca.h
 
+#include algorithm
 #include cassert
 #include fstream
 #include functional
@@ -517,7 +519,7 @@
   : Constant(cp)
 {
   uint16_t length = readU2(is);
-  char buf[length];
+  char *buf = (char *)alloca(length);
   std::streamsize s = is.rdbuf()-sgetn(buf, length);
   if (s != length)
 throw ClassFileParseError(

Propchange: java/trunk/lib/ClassFile/ClassFile.cpp
--
--- cvs2svn:cvs-rev (original)
+++ cvs2svn:cvs-rev Wed Feb  2 10:26:54 2005
@@ -1 +1 @@
-1.34
+1.35

Modified: java/trunk/lib/Compiler/Compiler.cpp
URL: 
http://llvm.org/viewvc/llvm-project/java/trunk/lib/Compiler/Compiler.cpp?rev=2r1=1r2=2view=diff
==
--- java/trunk/lib/Compiler/Compiler.cpp (original)
+++ java/trunk/lib/Compiler/Compiler.cpp Wed Feb  2 10:26:54 2005
@@ -206,6 +206,7 @@
 return ConstantFP::get(Type::DoubleTy, d-getValue());
   else
 assert(0  Unknown llvm::Java::Constant!);
+  return 0; // not reached
 }
 
 /// Given a JType returns the appropriate llvm::Type.
@@ -268,6 +269,7 @@
 // FIXME: Throw something
   default:  assert(0  Cannot parse type descriptor!);
   }
+  return 0; // not reached
 }
 
 /// Returns the type of the Java string descriptor for JNI.
@@ -313,6 +315,7 @@
 // FIXME: Throw something
   

[llvm-commits] [llvm] r37807 - /llvm/trunk/CREDITS.TXT

2007-06-29 Thread John Criswell
Author: criswell
Date: Fri Jun 29 13:24:05 2007
New Revision: 37807

URL: http://llvm.org/viewvc/llvm-project?rev=37807view=rev
Log:
Updated my entry as a test commit.
Removed QMTest (it is long gone).
Acknowledge the fleeting'ness of my original autoconf work.
Mention that I fixed some bugs.

Modified:
llvm/trunk/CREDITS.TXT

Modified: llvm/trunk/CREDITS.TXT
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/CREDITS.TXT?rev=37807r1=37806r2=37807view=diff
==
--- llvm/trunk/CREDITS.TXT (original)
+++ llvm/trunk/CREDITS.TXT Fri Jun 29 13:24:05 2007
@@ -62,7 +62,7 @@
 
 N: John T. Criswell
 E: [EMAIL PROTECTED]
-D: Autoconf support, QMTest database, documentation improvements
+D: Original Autoconf support, documentation improvements, bug fixes
 
 N: Rafael Avila de Espindola
 E: [EMAIL PROTECTED]


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


[llvm-commits] [test-suite] r37808 - /test-suite/trunk/README.txt

2007-06-29 Thread Anton Korobeynikov
Author: asl
Date: Fri Jun 29 13:35:56 2007
New Revision: 37808

URL: http://llvm.org/viewvc/llvm-project?rev=37808view=rev
Log:
Test commit

Modified:
test-suite/trunk/README.txt

Modified: test-suite/trunk/README.txt
URL: 
http://llvm.org/viewvc/llvm-project/test-suite/trunk/README.txt?rev=37808r1=37807r2=37808view=diff
==
--- test-suite/trunk/README.txt (original)
+++ test-suite/trunk/README.txt Fri Jun 29 13:35:56 2007
@@ -8,4 +8,3 @@
 
 In the future, given 'make thorough' we can add trace instrumentation and diff
 the trace logs as well.
-


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


[llvm-commits] [llvm] r37809 - /llvm/branches/SVA/README.txt

2007-06-29 Thread John Criswell
Author: criswell
Date: Fri Jun 29 14:04:53 2007
New Revision: 37809

URL: http://llvm.org/viewvc/llvm-project?rev=37809view=rev
Log:
Test commit on SVA branch.

Modified:
llvm/branches/SVA/README.txt

Modified: llvm/branches/SVA/README.txt
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/SVA/README.txt?rev=37809r1=37808r2=37809view=diff
==
--- llvm/branches/SVA/README.txt (original)
+++ llvm/branches/SVA/README.txt Fri Jun 29 14:04:53 2007
@@ -10,3 +10,4 @@
 
 Please see the HTML documentation provided in docs/index.html for further
 assistance with LLVM.
+


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


[llvm-commits] Warnings

2007-06-29 Thread Anton Korobeynikov
Hello, Everyone.

I'm getting these warnings on trunk:

src/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp: In member function
`bool unnamed::bu_ls_rr_sort::operator()(const llvm::SUnit*, const
llvm::SUnit*) const':
src/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:618: warning: unused
variable 'LIsTarget'
src/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:619: warning: unused
variable 'RIsTarget'

-- 
With best regards, Anton Korobeynikov.

Faculty of Mathematics  Mechanics, Saint Petersburg State University.


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


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

2007-06-29 Thread John Criswell
Author: criswell
Date: Fri Jun 29 14:12:31 2007
New Revision: 37811

URL: http://llvm.org/viewvc/llvm-project?rev=37811view=rev
Log:
Applied Reid's patch.  Long live Subversion!

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=37811r1=37810r2=37811view=diff
==
--- llvm/trunk/docs/GettingStarted.html (original)
+++ llvm/trunk/docs/GettingStarted.html Fri Jun 29 14:12:31 2007
@@ -27,7 +27,7 @@
   lia href=#terminologyTerminology and Notation/a
   lia href=#environmentSetting Up Your Environment/a
   lia href=#unpackUnpacking the LLVM Archives/a
-  lia href=#checkoutCheckout LLVM from CVS/a
+  lia href=#checkoutCheckout LLVM from Subversion/a
   lia href=#installcfInstall the GCC Front End/a
   lia href=#configLocal LLVM Configuration/a
   lia href=#compileCompiling the LLVM Suite Source Code/a
@@ -38,7 +38,6 @@
 
   lia href=#layoutProgram layout/a
 ol
-  lia href=#cvsdirttCVS/tt directories/a
   lia href=#examplesttllvm/examples/tt/a
   lia href=#includettllvm/include/tt/a
   lia href=#libttllvm/lib/tt/a
@@ -127,7 +126,7 @@
 
   liGet the LLVM Source Code
   ul
-liWith the distributed files (or use a href=#checkoutCVS/a):
+liWith the distributed files (or use a href=#checkoutSVN/a):
 ol
   littcd iwhere-you-want-llvm-to-live/i/tt
   littgunzip --stdout llvm-iversion/i.tar.gz | tar -xvf -/tt
@@ -137,7 +136,7 @@
 
   lib[Optional]/b Get the Test Suite Source Code 
   ul
-liWith the distributed files (or use a href=#checkoutCVS/a):
+liWith the distributed files (or use a href=#checkoutSVN/a):
 ol
   littcd iwhere-you-want-llvm-to-live/i/tt
   littcd llvm/projects/tt
@@ -385,9 +384,9 @@
 /tr
 
 tr
-  tda href=https://www.cvshome.org/downloads.html;CVS/a/td
-  tdge;1.11/td
-  tdCVS access to LLVMsupa href=#sf22/a/sup/td
+  tda 
href=http://subversion.tigris.org/project_packages.html;SVN/a/td
+  tdge;1.3/td
+  tdSubversion access to LLVMsupa href=#sf22/a/sup/td
 /tr
 
 tr
@@ -446,9 +445,9 @@
 lia name=sf1Only the C and C++ languages are needed so there's no
   need to build the other languages for LLVM's purposes./a See 
   a href=#brokengccbelow/a for specific version info./li
-lia name=sf2You only need CVS if you intend to build from the 
+lia name=sf2You only need Subversion if you intend to build from the 
   latest LLVM sources. If you're working from a release distribution, you
-  don't need CVS./a/li
+  don't need Subversion./a/li
 lia name=sf3Only needed if you want to run the automated test 
   suite in the ttllvm/test/tt directory./a/li
 lia name=sf4If you want to make changes to the configure scripts, 
@@ -681,23 +680,23 @@
 
 !-- === 
--
 div class=doc_subsection
-  a name=checkoutCheckout LLVM from CVS/a
+  a name=checkoutCheckout LLVM from Subversion/a
 /div
 
 div class=doc_text
 
-pIf you have access to our CVS repository, you can get a fresh copy of
-the entire source code.  All you need to do is check it out from CVS as
+pIf you have access to our Subversion repository, you can get a fresh copy of
+the entire source code.  All you need to do is check it out from Subvresion as
 follows:/p
 
 ul
-littcd iwhere-you-want-llvm-to-live/i/tt
-  littcvs -d :pserver:[EMAIL PROTECTED]:/var/cvs/llvm login/tt
-  liHit the return key when prompted for the password.
-  littcvs -z3 -d :pserver:[EMAIL PROTECTED]:/var/cvs/llvm co
-  llvm/tt
+  littcd iwhere-you-want-llvm-to-live/i/tt/li
+  liRead-Only: ttsvn co http://llvm.org/svn/llvm-project/trunk/llvm 
llvm/tt/li
+  liRead-Write:ttsvn co https://[EMAIL 
PROTECTED]/svn/llvm-project/trunk/llvm
+llvm/tt/li
 /ul
 
+
 pThis will create an 'ttllvm/tt' directory in the current
 directory and fully populate it with the LLVM source code, Makefiles,
 test directories, and local copies of documentation files./p
@@ -721,14 +720,14 @@
 /ul
 
 pIf you would like to get the LLVM test suite (a separate package as of 1.4),
-you get it from the CVS repository:/p
+you get it from the Subversion repository:/p
 pre
   cd llvm/projects
-  cvs -z3 -d :pserver:[EMAIL PROTECTED]:/var/cvs/llvm co llvm-test
+  svn so http://llvm.org/svn/llvm-project/test-suite/trunk test-suite
 /pre
 pBy placing it in the ttllvm/projects/tt, it will be automatically
 configured by the LLVM configure script as well as automatically updated when
-you run ttcvs update/tt./p
+you run ttsvn update/tt./p
 
 pIf you would like to get the GCC front end source code, you can also get it 
 and build it yourself.  Please follow a href=CFEBuildInstrs.htmlthese 
@@ -783,7 +782,8 @@
 
 div class=doc_text
 
-pOnce checked out from the CVS repository, the LLVM suite 

[llvm-commits] [llvm] r37812 - /llvm/trunk/utils/NewNightlyTest.pl

2007-06-29 Thread John Criswell
Author: criswell
Date: Fri Jun 29 14:12:50 2007
New Revision: 37812

URL: http://llvm.org/viewvc/llvm-project?rev=37812view=rev
Log:
Applied Reid's patch.  Long live Subversion!

Modified:
llvm/trunk/utils/NewNightlyTest.pl

Modified: llvm/trunk/utils/NewNightlyTest.pl
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/NewNightlyTest.pl?rev=37812r1=37811r2=37812view=diff
==
--- llvm/trunk/utils/NewNightlyTest.pl (original)
+++ llvm/trunk/utils/NewNightlyTest.pl Fri Jun 29 14:12:50 2007
@@ -122,7 +122,7 @@
 $CONFIGUREARGS=;
 $nickname=;
 $NOTEST=0;
-$USESVN=0;
+$USESVN=1;
 $NORUNNINGTESTS=0;
 $MAKECMD=make;
 $SUBMITSERVER = llvm.org;
@@ -170,7 +170,6 @@
   else { $GCCPATH=; }
   if (/^-cvstag/)  { $CVSCOOPT .=  -r $ARGV[0]; shift; next; } 
   else { $CVSCOOPT=;}
-  if (/^-usesvn/)  { $USESVN = 1; }
   if (/^-svnurl/)  { $SVNURL = $ARGV[0]; shift; next; }
   if (/^-target/)  { $CONFIGUREARGS .=  --target=$ARGV[0]; 
  shift; next; }


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


[llvm-commits] [llvm] r37810 - /llvm/branches/SVA/README.txt

2007-06-29 Thread John Criswell
Author: criswell
Date: Fri Jun 29 14:07:03 2007
New Revision: 37810

URL: http://llvm.org/viewvc/llvm-project?rev=37810view=rev
Log:
Undo previous commit.

Modified:
llvm/branches/SVA/README.txt

Modified: llvm/branches/SVA/README.txt
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/SVA/README.txt?rev=37810r1=37809r2=37810view=diff
==
--- llvm/branches/SVA/README.txt (original)
+++ llvm/branches/SVA/README.txt Fri Jun 29 14:07:03 2007
@@ -10,4 +10,3 @@
 
 Please see the HTML documentation provided in docs/index.html for further
 assistance with LLVM.
-


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


Re: [llvm-commits] Warnings

2007-06-29 Thread David A. Greene
On Friday 29 June 2007 14:04, Anton Korobeynikov wrote:
 Hello, Everyone.

 I'm getting these warnings on trunk:

 src/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp: In member function
 `bool unnamed::bu_ls_rr_sort::operator()(const llvm::SUnit*, const
 llvm::SUnit*) const':
 src/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:618: warning: unused
 variable 'LIsTarget'
 src/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:619: warning: unused
 variable 'RIsTarget'

That's probably due to a commit I made yesterday.  I'll take a look as soon as 
I get the svn checked out.

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


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

2007-06-29 Thread Dan Gohman

 I notice that several places use !MVT::isExtendedValueType(VT).
 Please add MVT::isSimpleValueType()

After making a different change to TargetLowering.h following the review 
feedback,
there are fewer of these. Fewer uses of isExtendedVT are negated than not now.
I'd prefer to avoid having two different names to do essentially the same thing.

Dan

-- 
Dan Gohman, Cray Inc.
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] Warnings

2007-06-29 Thread David A. Greene
On Friday 29 June 2007 14:04, Anton Korobeynikov wrote:
 Hello, Everyone.

 I'm getting these warnings on trunk:

 src/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp: In member function
 `bool unnamed::bu_ls_rr_sort::operator()(const llvm::SUnit*, const
 llvm::SUnit*) const':
 src/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:618: warning: unused
 variable 'LIsTarget'
 src/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:619: warning: unused
 variable 'RIsTarget'

That's probably mine.  I'll take a look as soon as I get the svn checked out.

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


Re: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

2007-06-29 Thread Dan Gohman
 Duncan pointed out that I confused myself.  If something is undef, we  
 can choose to pick any specific value for the undef to pick the  
 cancellation.

Thanks Chris and Duncan for explaining this. I'll submit a fix for the
DAGCombiner changes accordingly.

Dan

-- 
Dan Gohman, Cray Inc.
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp LegalizeDAG.cpp SelectionDAG.cpp SelectionDAGISel.cpp TargetLowering.cpp

2007-06-29 Thread Dan Gohman
 Just as there isn't a special ADD node kind for vectors -- just an ADD
 kind with nodes that can have a vector ValueType, ConstantFP can also
 be vectorized. A ConstantFP with a vector ValueType is a vector  
 constant,
 equivalent to what is currently represented as a splat BUILD_VECTOR,
 except that it's easier to work with :).
 
 I'm not opposed to doing this, but I don't think we should overload  
 ConstantFP() and getConstantFP() for this.  Could you make a new  
 VectorConstantFP or something?

We overload ISD::FADD and quite a lot of others. Why not ISD::ConstantFP too?

Dan

-- 
Dan Gohman, Cray Inc.
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


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

2007-06-29 Thread Dan Gohman
 Add a default parameter to a SmallVector constructor to allow it to
 be called with just an initial length value, just like in std::vector.
 
 Ok.
 
 Should this be marked 'explicit'?

Yep. Good catch.

Dan

-- 
Dan Gohman, Cray Inc.
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


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

2007-06-29 Thread Anton Korobeynikov
Author: asl
Date: Fri Jun 29 15:56:49 2007
New Revision: 37813

URL: http://llvm.org/viewvc/llvm-project?rev=37813view=rev
Log:
Fix a typo

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=37813r1=37812r2=37813view=diff
==
--- llvm/trunk/docs/GettingStarted.html (original)
+++ llvm/trunk/docs/GettingStarted.html Fri Jun 29 15:56:49 2007
@@ -691,8 +691,8 @@
 
 ul
   littcd iwhere-you-want-llvm-to-live/i/tt/li
-  liRead-Only: ttsvn co http://llvm.org/svn/llvm-project/trunk/llvm 
llvm/tt/li
-  liRead-Write:ttsvn co https://[EMAIL 
PROTECTED]/svn/llvm-project/trunk/llvm
+  liRead-Only: ttsvn co http://llvm.org/svn/llvm-project/llvm/trunk 
llvm/tt/li
+  liRead-Write:ttsvn co https://[EMAIL 
PROTECTED]/svn/llvm-project/llvm/trunk
 llvm/tt/li
 /ul
 


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


Re: [llvm-commits] [llvm] r37813 - /llvm/trunk/docs/GettingStarted.html

2007-06-29 Thread Chris Lattner

On Jun 29, 2007, at 1:56 PM, Anton Korobeynikov wrote:

 Author: asl
 Date: Fri Jun 29 15:56:49 2007
 New Revision: 37813

 URL: http://llvm.org/viewvc/llvm-project?rev=37813view=rev
 Log:
 Fix a typo

 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=37813r1=37812r2=37813view=diff
 == 
 

Please put a newline between the URL and the  divider line :)

-Chris


 --- llvm/trunk/docs/GettingStarted.html (original)
 +++ llvm/trunk/docs/GettingStarted.html Fri Jun 29 15:56:49 2007
 @@ -691,8 +691,8 @@

  ul
littcd iwhere-you-want-llvm-to-live/i/tt/li
 -  liRead-Only: ttsvn co http://llvm.org/svn/llvm-project/trunk/ 
 llvm llvm/tt/li
 -  liRead-Write:ttsvn co https://[EMAIL PROTECTED]/svn/llvm-project/ 
 trunk/llvm
 +  liRead-Only: ttsvn co http://llvm.org/svn/llvm-project/llvm/ 
 trunk llvm/tt/li
 +  liRead-Write:ttsvn co https://[EMAIL PROTECTED]/svn/llvm-project/ 
 llvm/trunk
  llvm/tt/li
  /ul



 ___
 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] r37814 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

2007-06-29 Thread Evan Cheng
Author: evancheng
Date: Fri Jun 29 16:36:04 2007
New Revision: 37814

URL: http://llvm.org/viewvc/llvm-project?rev=37814view=rev
Log:
Fix a vector FP constant CSE bug.

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

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=37814r1=37813r2=37814view=diff
==
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Fri Jun 29 16:36:04 
2007
@@ -686,11 +686,16 @@
   AddNodeIDNode(ID, Opc, getVTList(EltVT), 0, 0);
   ID.AddDouble(Val);
   void *IP = 0;
-  if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP))
-return SDOperand(E, 0);
-  SDNode *N = new ConstantFPSDNode(isTarget, Val, EltVT);
-  CSEMap.InsertNode(N, IP);
-  AllNodes.push_back(N);
+  SDNode *N = NULL;
+  if ((N = CSEMap.FindNodeOrInsertPos(ID, IP)))
+if (!MVT::isVector(VT))
+  return SDOperand(N, 0);
+  if (!N) {
+N = new ConstantFPSDNode(isTarget, Val, EltVT);
+CSEMap.InsertNode(N, IP);
+AllNodes.push_back(N);
+  }
+
   SDOperand Result(N, 0);
   if (MVT::isVector(VT)) {
 SmallVectorSDOperand, 8 Ops;


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


[llvm-commits] [llvm] r37815 - /llvm/trunk/test/CodeGen/X86/2007-06-29-VecFPConstantCSEBug.ll

2007-06-29 Thread Evan Cheng
Author: evancheng
Date: Fri Jun 29 16:40:30 2007
New Revision: 37815

URL: http://llvm.org/viewvc/llvm-project?rev=37815view=rev
Log:
New test.

Added:
llvm/trunk/test/CodeGen/X86/2007-06-29-VecFPConstantCSEBug.ll

Added: llvm/trunk/test/CodeGen/X86/2007-06-29-VecFPConstantCSEBug.ll
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2007-06-29-VecFPConstantCSEBug.ll?rev=37815view=auto
==
--- llvm/trunk/test/CodeGen/X86/2007-06-29-VecFPConstantCSEBug.ll (added)
+++ llvm/trunk/test/CodeGen/X86/2007-06-29-VecFPConstantCSEBug.ll Fri Jun 29 
16:40:30 2007
@@ -0,0 +1,11 @@
+; RUN: llvm-as  %s | | llc -march=x86 -mattr=+sse2
+
+define void @test(4 x float* %arg) {
+   %tmp89 = getelementptr 4 x float* %arg, i64 3
+   %tmp1144 = sub 4 x float  float -0.00e+00, float -0.00e+00, 
float -0.00e+00, float -0.00e+00 , zeroinitializer
+   store 4 x float %tmp1144, 4 x float* null
+   %tmp1149 = load 4 x float* %tmp89
+   %tmp1150 = sub 4 x float  float -0.00e+00, float -0.00e+00, 
float -0.00e+00, float -0.00e+00 , %tmp1149
+   store 4 x float %tmp1150, 4 x float* %tmp89
+   ret void
+}


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


[llvm-commits] [llvm] r37816 - /llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp

2007-06-29 Thread David Greene
Author: greened
Date: Fri Jun 29 16:42:03 2007
New Revision: 37816

URL: http://llvm.org/viewvc/llvm-project?rev=37816view=rev
Log:
Remove unused variables.


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

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp?rev=37816r1=37815r2=37816view=diff
==
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Fri Jun 29 
16:42:03 2007
@@ -615,9 +615,6 @@
 
 // Bottom up
 bool bu_ls_rr_sort::operator()(const SUnit *left, const SUnit *right) const {
-  bool LIsTarget = left-Node-isTargetOpcode();
-  bool RIsTarget = right-Node-isTargetOpcode();
-
   // There used to be a special tie breaker here that looked for
   // two-address instructions and preferred the instruction with a
   // defuse operand.  The special case triggered diagnostics when


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


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

2007-06-29 Thread Anton Korobeynikov
Author: asl
Date: Fri Jun 29 16:44:14 2007
New Revision: 37817

URL: http://llvm.org/viewvc/llvm-project?rev=37817view=rev
Log:
Another typo

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=37817r1=37816r2=37817view=diff
==
--- llvm/trunk/docs/GettingStarted.html (original)
+++ llvm/trunk/docs/GettingStarted.html Fri Jun 29 16:44:14 2007
@@ -723,7 +723,7 @@
 you get it from the Subversion repository:/p
 pre
   cd llvm/projects
-  svn so http://llvm.org/svn/llvm-project/test-suite/trunk test-suite
+  svn co http://llvm.org/svn/llvm-project/test-suite/trunk test-suite
 /pre
 pBy placing it in the ttllvm/projects/tt, it will be automatically
 configured by the LLVM configure script as well as automatically updated when


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


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

2007-06-29 Thread Evan Cheng
Author: evancheng
Date: Fri Jun 29 16:44:35 2007
New Revision: 37818

URL: http://llvm.org/viewvc/llvm-project?rev=37818view=rev
Log:
Only do FNEG xform when the vector type is a floating point type.

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=37818r1=37817r2=37818view=diff
==
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Fri Jun 29 
16:44:35 2007
@@ -1798,13 +1798,15 @@
 if (ConstantVector *CV = dyn_castConstantVector(I.getOperand(0))) {
   const VectorType *DestTy = castVectorType(I.getType());
   const Type *ElTy = DestTy-getElementType();
-  unsigned VL = DestTy-getNumElements();
-  std::vectorConstant* NZ(VL, ConstantFP::get(ElTy, -0.0));
-  Constant *CNZ = ConstantVector::get(NZ[0], NZ.size());
-  if (CV == CNZ) {
-SDOperand Op2 = getValue(I.getOperand(1));
-setValue(I, DAG.getNode(ISD::FNEG, Op2.getValueType(), Op2));
-return;
+  if (ElTy-isFloatingPoint()) {
+unsigned VL = DestTy-getNumElements();
+std::vectorConstant* NZ(VL, ConstantFP::get(ElTy, -0.0));
+Constant *CNZ = ConstantVector::get(NZ[0], NZ.size());
+if (CV == CNZ) {
+  SDOperand Op2 = getValue(I.getOperand(1));
+  setValue(I, DAG.getNode(ISD::FNEG, Op2.getValueType(), Op2));
+  return;
+}
   }
 }
   }


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


[llvm-commits] [llvm] r37819 - /llvm/trunk/include/llvm/ADT/SmallVector.h

2007-06-29 Thread Dan Gohman
Author: djg
Date: Fri Jun 29 17:16:25 2007
New Revision: 37819

URL: http://llvm.org/viewvc/llvm-project?rev=37819view=rev
Log:
Add an explicit keyword. Thanks Chris!

Modified:
llvm/trunk/include/llvm/ADT/SmallVector.h

Modified: llvm/trunk/include/llvm/ADT/SmallVector.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallVector.h?rev=37819r1=37818r2=37819view=diff
==
--- llvm/trunk/include/llvm/ADT/SmallVector.h (original)
+++ llvm/trunk/include/llvm/ADT/SmallVector.h Fri Jun 29 17:16:25 2007
@@ -442,7 +442,7 @@
   SmallVector() : SmallVectorImplT(NumTsAvailable) {
   }
   
-  SmallVector(unsigned Size, const T Value = T())
+  explicit SmallVector(unsigned Size, const T Value = T())
 : SmallVectorImplT(NumTsAvailable) {
 this-reserve(Size);
 while (Size--)


___
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

2007-06-29 Thread Anton Korobeynikov


Changes in directory llvm-www:

header.incl updated: 1.60 - 1.61
---
Log message:

Switch from cvsweb to ViewVC


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

 header.incl |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm-www/header.incl
diff -u llvm-www/header.incl:1.60 llvm-www/header.incl:1.61
--- llvm-www/header.incl:1.60   Fri Jun  1 11:23:59 2007
+++ llvm-www/header.inclFri Jun 29 18:05:26 2007
@@ -113,7 +113,7 @@
 
   span style=font-size:smallerDev. Resources:/spanbr
   a href=/doxygen/doxygen/a
-  a href=/cvsweb/cvsweb.cgi/llvmcvsweb/abr
+  a href=/viewvc/llvm-project/llvm/ViewVC/abr
   a href=/nightlytest/Nightly Tester/abr
   a href=/bugs/LLVM Bugzilla/a
 /div



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


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

2007-06-29 Thread Anton Korobeynikov


Changes in directory llvm-www:

www-index.html updated: 1.143 - 1.144
---
Log message:

Remove cvsweb link from here. SVNify it.


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

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


Index: llvm-www/www-index.html
diff -u llvm-www/www-index.html:1.143 llvm-www/www-index.html:1.144
--- llvm-www/www-index.html:1.143   Fri Jun  1 11:15:46 2007
+++ llvm-www/www-index.html Fri Jun 29 18:07:24 2007
@@ -69,7 +69,7 @@
 href=http://www-faculty.cs.uiuc.edu/~vadve/;Vikram Adve/a at the a
 href=http://www.uiuc.edu/;University of Illinois, Urbana-Champaign/a.  
Since
 the first public release, LLVM has grown to include contributions from a
-href=/cvsweb/cvsweb.cgi/llvm/CREDITS.TXT?rev=HEADamp;content-type=text/x-cvsweb-markupseveral/a
+href=/svn/llvm-project/llvm/trunk/CREDITS.TXTseveral/a
 a href=developers.cgiother people/a!  We welcome external contributions, 
 so please send e-mail to
 a href=mailto:[EMAIL PROTECTED][EMAIL PROTECTED]/a if you are



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


[llvm-commits] [llvm] r37820 - /llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp

2007-06-29 Thread Devang Patel
Author: dpatel
Date: Fri Jun 29 18:11:49 2007
New Revision: 37820

URL: http://llvm.org/viewvc/llvm-project?rev=37820view=rev
Log:
Preserve DominanceFrontier.

Modified:
llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp?rev=37820r1=37819r2=37820view=diff
==
--- llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp Fri Jun 29 18:11:49 2007
@@ -84,6 +84,7 @@
   AU.addRequiredID(LoopSimplifyID);
   AU.addPreservedID(LoopSimplifyID);
   AU.addPreservedDominatorTree();
+  AU.addPreservedDominanceFrontier();
   AU.addRequiredLoopInfo();
   AU.addPreservedLoopInfo();
   AU.addRequiredID(LCSSAID);
@@ -415,6 +416,9 @@
 
   if (DominatorTree *DT = getAnalysisToUpdateDominatorTree())
 DT-addNewBlock(New, Old);
+
+  if (DominanceFrontier *DF = getAnalysisToUpdateDominanceFrontier())
+DF-splitBlock(Old);
 
   return New;
 }
@@ -471,7 +475,7 @@
 // If Orig is in Loop then find and use Orig dominator's cloned block as NewBB 
 // dominator.
 void CloneDomInfo(BasicBlock *NewBB, BasicBlock *Orig, Loop *L, 
-  DominatorTree *DT, 
+  DominatorTree *DT, DominanceFrontier *DF,
   DenseMapconst Value*, Value* VM) {
 
   DomTreeNode *OrigNode = DT-getNode(Orig);
@@ -481,7 +485,7 @@
   BasicBlock *NewIDom = OrigIDom;
   if (L-contains(OrigIDom)) {
 if (!DT-getNode(OrigIDom))
-  CloneDomInfo(NewIDom, OrigIDom, L, DT, VM);
+  CloneDomInfo(NewIDom, OrigIDom, L, DT, DF, VM);
 NewIDom = castBasicBlock(VM[OrigIDom]);
   }
   if (NewBB == NewIDom) {
@@ -489,6 +493,23 @@
 DT-changeImmediateDominator(NewBB, NewIDom);
   } else
 DT-addNewBlock(NewBB, NewIDom);
+
+  DominanceFrontier::DomSetType NewDFSet;
+  if (DF) {
+DominanceFrontier::iterator DFI = DF-find(Orig);
+if ( DFI != DF-end()) {
+  DominanceFrontier::DomSetType S = DFI-second;
+  for (DominanceFrontier::DomSetType::iterator I = S.begin(), E = S.end();
+   I != E; ++I) {
+BasicBlock *BB = *I;
+if (L-contains(BB)) 
+  NewDFSet.insert(castBasicBlock(VM[Orig]));
+else
+  NewDFSet.insert(BB);
+  }
+}
+DF-addBasicBlock(NewBB, NewDFSet);
+  }
 }
 
 /// CloneLoop - Recursively clone the specified loop and all of its children,
@@ -532,12 +553,14 @@
   BranchInst *BRI = new BranchInst(TrueDest, FalseDest, BranchVal, InsertPt);
 
   // Update dominator info.
+  // BranchVal is a new preheader so it dominates true and false destination
+  // loop headers.
   if (DominatorTree *DT = getAnalysisToUpdateDominatorTree()) {
-// BranchVal is a new preheader so it dominates true and false destination
-// loop headers.
 DT-changeImmediateDominator(TrueDest, BRI-getParent());
 DT-changeImmediateDominator(FalseDest, BRI-getParent());
   }
+  // No need to update DominanceFrontier. BRI-getParent() dominated TrueDest
+  // and FalseDest anyway. Now it immediately dominates them.
 }
 
 
@@ -679,11 +702,12 @@
   }
 
   // Update dominator info
+  DominanceFrontier *DF = getAnalysisToUpdateDominanceFrontier();
   if (DominatorTree *DT = getAnalysisToUpdateDominatorTree())
 for (unsigned i = 0, e = LoopBlocks.size(); i != e; ++i) {
   BasicBlock *LBB = LoopBlocks[i];
   BasicBlock *NBB = NewBlocks[i];
-  CloneDomInfo(NBB, LBB, L, DT, ValueMap);
+  CloneDomInfo(NBB, LBB, L, DT, DF, ValueMap);
 }
   
   // Splice the newly inserted blocks into the function right before the


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


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

2007-06-29 Thread Anton Korobeynikov
Author: asl
Date: Fri Jun 29 18:13:42 2007
New Revision: 37821

URL: http://llvm.org/viewvc/llvm-project?rev=37821view=rev
Log:
Change CVS-style 'labels' to SVN 'tags' directory.

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=37821r1=37820r2=37821view=diff
==
--- llvm/trunk/docs/GettingStarted.html (original)
+++ llvm/trunk/docs/GettingStarted.html Fri Jun 29 18:13:42 2007
@@ -702,8 +702,8 @@
 test directories, and local copies of documentation files./p
 
 pIf you want to get a specific release (as opposed to the most recent
-revision), you can specify a label.  The following releases have the following
-labels:/p
+revision), you can checkout it from the 'tttags/tt' directory (instead of
+'tttrunk/tt'). The following releases have the following labels:/p
 
 ul
 liRelease 2.0: bRELEASE_20/b/li


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


[llvm-commits] [llvm] r37822 - in /llvm/trunk: include/llvm/Analysis/LoopPass.h lib/Analysis/LoopPass.cpp

2007-06-29 Thread Devang Patel
Author: dpatel
Date: Fri Jun 29 18:13:42 2007
New Revision: 37822

URL: http://llvm.org/viewvc/llvm-project?rev=37822view=rev
Log:
Add loop info verification mechanism.


Modified:
llvm/trunk/include/llvm/Analysis/LoopPass.h
llvm/trunk/lib/Analysis/LoopPass.cpp

Modified: llvm/trunk/include/llvm/Analysis/LoopPass.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LoopPass.h?rev=37822r1=37821r2=37822view=diff
==
--- llvm/trunk/include/llvm/Analysis/LoopPass.h (original)
+++ llvm/trunk/include/llvm/Analysis/LoopPass.h Fri Jun 29 18:13:42 2007
@@ -114,6 +114,11 @@
   // queue. This allows LoopPass to change loop nest for the loop. This
   // utility may send LPPassManager into infinite loops so use caution.
   void redoLoop(Loop *L);
+
+private:
+  /// verifyLoopInfo - Verify loop nest.
+  void verifyLoopInfo();
+
 private:
   std::dequeLoop * LQ;
   bool skipThisLoop;

Modified: llvm/trunk/lib/Analysis/LoopPass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopPass.cpp?rev=37822r1=37821r2=37822view=diff
==
--- llvm/trunk/lib/Analysis/LoopPass.cpp (original)
+++ llvm/trunk/lib/Analysis/LoopPass.cpp Fri Jun 29 18:13:42 2007
@@ -157,6 +157,18 @@
   Info.setPreservesAll();
 }
 
+/// verifyLoopInfo - Verify loop nest.
+void LPPassManager::verifyLoopInfo() {
+  assert (LI  Loop Info is missing);
+
+  for (LoopInfo::iterator I = LI-begin(), E = LI-end(); I != E; ++I) {
+Loop *L = *I;
+assert (L-getHeader()  Loop header is missing);
+assert (L-getLoopPreheader()  Loop preheader is missing);
+assert (L-getLoopLatch()  Loop latch is missing);
+  }
+}
+
 /// run - Execute all of the passes scheduled for execution.  Keep track of
 /// whether any of the passes modifies the function, and if so, return true.
 bool LPPassManager::runOnFunction(Function F) {
@@ -202,6 +214,7 @@
   LoopPass *LP = dynamic_castLoopPass *(P);
   assert (LP  Invalid LPPassManager member);
   LP-runOnLoop(CurrentLoop, *this);
+  verifyLoopInfo();
   StopPassTimer(P);
 
   if (Changed)
@@ -302,4 +315,3 @@
 
   LPPM-add(this);
 }
-


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


[llvm-commits] [llvm] r37823 - /llvm/trunk/test/CodeGen/X86/2007-06-29-DAGCombinerBug.ll

2007-06-29 Thread Evan Cheng
Author: evancheng
Date: Fri Jun 29 18:17:15 2007
New Revision: 37823

URL: http://llvm.org/viewvc/llvm-project?rev=37823view=rev
Log:
New test.

Added:
llvm/trunk/test/CodeGen/X86/2007-06-29-DAGCombinerBug.ll

Added: llvm/trunk/test/CodeGen/X86/2007-06-29-DAGCombinerBug.ll
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2007-06-29-DAGCombinerBug.ll?rev=37823view=auto
==
--- llvm/trunk/test/CodeGen/X86/2007-06-29-DAGCombinerBug.ll (added)
+++ llvm/trunk/test/CodeGen/X86/2007-06-29-DAGCombinerBug.ll Fri Jun 29 
18:17:15 2007
@@ -0,0 +1,50 @@
+; RUN: llvm-as  %s | | llc -march=x86 -mattr=+sse2
+
+define void @test() {
+entry:
+   br i1 false, label %bb13944.preheader, label %cond_true418
+
+cond_true418:  ; preds = %entry
+   ret void
+
+bb13944.preheader: ; preds = %entry
+   br i1 false, label %bb3517, label %bb13968.preheader
+
+bb3517:; preds = %bb13944.preheader
+   br i1 false, label %cond_false7408, label %cond_next11422
+
+cond_false7408:; preds = %bb3517
+   switch i32 0, label %cond_false10578 [
+i32 7, label %cond_next11422
+i32 6, label %cond_true7828
+i32 1, label %cond_true10095
+i32 3, label %cond_true10095
+i32 5, label %cond_true10176
+i32 24, label %cond_true10176
+   ]
+
+cond_true7828: ; preds = %cond_false7408
+   br i1 false, label %cond_next8191, label %cond_true8045
+
+cond_true8045: ; preds = %cond_true7828
+   ret void
+
+cond_next8191: ; preds = %cond_true7828
+   %tmp8234 = sub 4 x i32  i32 939524096, i32 939524096, i32 939524096, 
i32 939524096 , zeroinitializer; 4 x i32 [#uses=0]
+   ret void
+
+cond_true10095:; preds = %cond_false7408, %cond_false7408
+   ret void
+
+cond_true10176:; preds = %cond_false7408, %cond_false7408
+   ret void
+
+cond_false10578:   ; preds = %cond_false7408
+   ret void
+
+cond_next11422:; preds = %cond_false7408, %bb3517
+   ret void
+
+bb13968.preheader: ; preds = %bb13944.preheader
+   ret void
+}


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


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

2007-06-29 Thread Anton Korobeynikov
Author: asl
Date: Fri Jun 29 19:00:57 2007
New Revision: 37824

URL: http://llvm.org/viewvc/llvm-project?rev=37824view=rev
Log:
Remove labels again

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=37824r1=37823r2=37824view=diff
==
--- llvm/trunk/docs/GettingStarted.html (original)
+++ llvm/trunk/docs/GettingStarted.html Fri Jun 29 19:00:57 2007
@@ -703,7 +703,8 @@
 
 pIf you want to get a specific release (as opposed to the most recent
 revision), you can checkout it from the 'tttags/tt' directory (instead of
-'tttrunk/tt'). The following releases have the following labels:/p
+'tttrunk/tt'). The following releases are located in the following
+  subdirectories of the 'tttags/tt' directory:/p
 
 ul
 liRelease 2.0: bRELEASE_20/b/li


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


[llvm-commits] [llvm] r37825 - /llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp

2007-06-29 Thread Evan Cheng
Author: evancheng
Date: Fri Jun 29 19:10:37 2007
New Revision: 37825

URL: http://llvm.org/viewvc/llvm-project?rev=37825view=rev
Log:
(For Chris): Fix failure where we rejected compiling stubs when lazy 
compilation is disabled.

Modified:
llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp

Modified: llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp?rev=37825r1=37824r2=37825view=diff
==
--- llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp Fri Jun 29 19:10:37 2007
@@ -618,25 +618,32 @@
  This is not a known stub!);
   Function *F = (--I)-second;
 
-  // If disabled, emit a useful error message and abort.
-  if (TheJIT-isLazyCompilationDisabled()) {
-cerr  LLVM JIT requested to do lazy compilation of function '
-  F-getName()  ' when lazy compiles are disabled!\n;
-abort();
-  }
+  // If we have already code generated the function, just return the address.
+  void *Result = TheJIT-getPointerToGlobalIfAvailable(F);
+  
+  if (!Result) {
+// Otherwise we don't have it, do lazy compilation now.
+
+// If lazy compilation is disabled, emit a useful error message and abort.
+if (TheJIT-isLazyCompilationDisabled()) {
+  cerr  LLVM JIT requested to do lazy compilation of function '
+   F-getName()  ' when lazy compiles are disabled!\n;
+  abort();
+}
   
-  // We might like to remove the stub from the StubToFunction map.
-  // We can't do that! Multiple threads could be stuck, waiting to acquire the
-  // lock above. As soon as the 1st function finishes compiling the function,
-  // the next one will be released, and needs to be able to find the function 
it
-  // needs to call.
-  //JR.state.getStubToFunctionMap(locked).erase(I);
-
-  DOUT  JIT: Lazily resolving function '  F-getName()
-' In stub ptr =   Stub   actual ptr = 
-I-first  \n;
+// We might like to remove the stub from the StubToFunction map.
+// We can't do that! Multiple threads could be stuck, waiting to acquire 
the
+// lock above. As soon as the 1st function finishes compiling the function,
+// the next one will be released, and needs to be able to find the function
+// it needs to call.
+//JR.state.getStubToFunctionMap(locked).erase(I);
+
+DOUT  JIT: Lazily resolving function '  F-getName()
+  ' In stub ptr =   Stub   actual ptr = 
+  I-first  \n;
 
-  void *Result = TheJIT-getPointerToFunction(F);
+Result = TheJIT-getPointerToFunction(F);
+  }
 
   // We don't need to reuse this stub in the future, as F is now compiled.
   JR.state.getFunctionToStubMap(locked).erase(F);


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