Re: [llvm-commits] [llvm] r44687 - in /llvm/trunk: include/llvm/CodeGen/Passes.h lib/CodeGen/LLVMTargetMachine.cpp lib/CodeGen/MachineLICM.cpp lib/Target/PowerPC/PPCInstrInfo.td

2007-12-09 Thread Bill Wendling
On Dec 8, 2007, at 12:33 AM, Duncan Sands wrote:

> Hi Bill, presumably you are using alias analysis at the
> codegen level.  I noticed some time ago that in several
> places code doing multiple stores to successive locations
> does not set the SVOffset value correctly: it used the same
> SVOffset for all the stores.  Probably the same is true for
> loads.  I think this can result in wrong alias analysis
> deductions.  Probably someone should audit code for this...
>
Hi Duncan,

Thanks for pointing this out. I'll go over it when I'm doing the load/ 
store instructions in my pass.

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


Re: [llvm-commits] [llvm] r44729 - /llvm/trunk/tools/Makefile

2007-12-09 Thread Bill Wendling
Sorry :-(

-bw

On Dec 8, 2007, at 4:27 PM, Chris Lattner wrote:

> Author: lattner
> Date: Sat Dec  8 18:27:38 2007
> New Revision: 44729
>
> URL: http://llvm.org/viewvc/llvm-project?rev=44729&view=rev
> Log:
> Fix accidental commit by Bill.
>
> Modified:
> llvm/trunk/tools/Makefile
>
> Modified: llvm/trunk/tools/Makefile
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/Makefile? 
> rev=44729&r1=44728&r2=44729&view=diff
>
> == 
> 
> --- llvm/trunk/tools/Makefile (original)
> +++ llvm/trunk/tools/Makefile Sat Dec  8 18:27:38 2007
> @@ -16,7 +16,7 @@
>   llc llvm-ranlib llvm-ar llvm-nm \
>   llvm-ld llvmc llvm-prof llvm-link \
>lli gccas gccld llvm-extract llvm-db llvm2cpp \
> -  bugpoint llvm-bcanalyzer llvm-stub cfe
> +  bugpoint llvm-bcanalyzer llvm-stub
>
>
>  include $(LEVEL)/Makefile.config
>
>
> ___
> 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] r44738 - /llvm/trunk/test/CodeGen/Generic/GC/alloc_loop.ll

2007-12-09 Thread Gordon Henriksen
Author: gordon
Date: Sun Dec  9 09:03:01 2007
New Revision: 44738

URL: http://llvm.org/viewvc/llvm-project?rev=44738&view=rev
Log:
Upgrading this test to 2.0 .ll syntax.

Modified:
llvm/trunk/test/CodeGen/Generic/GC/alloc_loop.ll

Modified: llvm/trunk/test/CodeGen/Generic/GC/alloc_loop.ll
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/GC/alloc_loop.ll?rev=44738&r1=44737&r2=44738&view=diff

==
--- llvm/trunk/test/CodeGen/Generic/GC/alloc_loop.ll (original)
+++ llvm/trunk/test/CodeGen/Generic/GC/alloc_loop.ll Sun Dec  9 09:03:01 2007
@@ -1,54 +1,53 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc
+; RUN: llvm-as < %s | llc
 
-implementation
 
-declare sbyte* %llvm_gc_allocate(uint)
-declare void %llvm_gc_initialize(uint)
+declare i8* @llvm_gc_allocate(i32)
+declare void @llvm_gc_initialize(i32)
 
-declare void %llvm.gcroot(sbyte**, sbyte*)
-declare void %llvm.gcwrite(sbyte*, sbyte*, sbyte**)
+declare void @llvm.gcroot(i8**, i8*)
+declare void @llvm.gcwrite(i8*, i8*, i8**)
 
-int %main() {
+define i32 @main() {
 entry:
-   %A = alloca sbyte*
-   %B = alloca sbyte**
+   %A = alloca i8*
+   %B = alloca i8**
 
-   call void %llvm_gc_initialize(uint 1048576)  ; Start with 1MB heap
+   call void @llvm_gc_initialize(i32 1048576)  ; Start with 1MB heap
 
 ;; void *A;
-   call void %llvm.gcroot(sbyte** %A, sbyte* null)
+   call void @llvm.gcroot(i8** %A, i8* null)
 
 ;; A = gcalloc(10);
-   %Aptr = call sbyte* %llvm_gc_allocate(uint 10)
-   store sbyte* %Aptr, sbyte** %A
+   %Aptr = call i8* @llvm_gc_allocate(i32 10)
+   store i8* %Aptr, i8** %A
 
 ;; void **B;
-   %tmp.1 = cast sbyte*** %B to sbyte **
-   call void %llvm.gcroot(sbyte** %tmp.1, sbyte* null)
+   %tmp.1 = bitcast i8*** %B to i8**
+   call void @llvm.gcroot(i8** %tmp.1, i8* null)
 
;; B = gcalloc(4);
-   %B = call sbyte* %llvm_gc_allocate(uint 8)
-   %tmp.2 = cast sbyte* %B to sbyte**
-   store sbyte** %tmp.2, sbyte*** %B
+   %B.upgrd.1 = call i8* @llvm_gc_allocate(i32 8)
+   %tmp.2 = bitcast i8* %B.upgrd.1 to i8**
+   store i8** %tmp.2, i8*** %B
 
;; *B = A;
-   %B.1 = load sbyte*** %B
-   %A.1 = load sbyte** %A
-   call void %llvm.gcwrite(sbyte* %A.1, sbyte* %B, sbyte** %B.1)
+   %B.1 = load i8*** %B
+   %A.1 = load i8** %A
+   call void @llvm.gcwrite(i8* %A.1, i8* %B.upgrd.1, i8** %B.1)

br label %AllocLoop
 
 AllocLoop:
-   %i = phi uint [ 0, %entry ], [ %indvar.next, %AllocLoop ]
+   %i = phi i32 [ 0, %entry ], [ %indvar.next, %AllocLoop ]
 ;; Allocated mem: allocated memory is immediately dead.
-   call sbyte* %llvm_gc_allocate(uint 100)
+   call i8* @llvm_gc_allocate(i32 100)

-   %indvar.next = add uint %i, 1
-   %exitcond = seteq uint %indvar.next, 1000
-   br bool %exitcond, label %Exit, label %AllocLoop
+   %indvar.next = add i32 %i, 1
+   %exitcond = icmp eq i32 %indvar.next, 1000
+   br i1 %exitcond, label %Exit, label %AllocLoop
 
 Exit:
-   ret int 0
+   ret i32 0
 }
 
-declare void %__main()
+declare void @__main()


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


[llvm-commits] [llvm] r44740 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesSplit.cpp

2007-12-09 Thread Chris Lattner
Author: lattner
Date: Sun Dec  9 11:56:34 2007
New Revision: 44740

URL: http://llvm.org/viewvc/llvm-project?rev=44740&view=rev
Log:
Duncan points out that the subtraction is unneeded since hte code
knows the vector is not pow2

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

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesSplit.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesSplit.cpp?rev=44740&r1=44739&r2=44740&view=diff

==
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesSplit.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesSplit.cpp Sun Dec  9 
11:56:34 2007
@@ -27,7 +27,7 @@
 NumElements >>= 1;
 Lo = Hi =  MVT::getVectorType(NewEltVT, NumElements);
   } else { // Non-power-of-two vectors.
-unsigned NewNumElts_Lo = 1 << Log2_32(NumElements-1);
+unsigned NewNumElts_Lo = 1 << Log2_32(NumElements);
 unsigned NewNumElts_Hi = NumElements - NewNumElts_Lo;
 Lo = MVT::getVectorType(NewEltVT, NewNumElts_Lo);
 Hi = MVT::getVectorType(NewEltVT, NewNumElts_Hi);


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


Re: [llvm-commits] PR889 final version

2007-12-09 Thread Gordon Henriksen
On Dec 3, 2007, at 17:59, pawel kunio wrote:

> Whoah, pretty strange I get neither of those. I'm using compiler  
> from vs 2008 beta2 'orcas'. What compiler should I use to be more in  
> sync with the one used by You for verification? btw, I had a deeper  
> look into the Value class hierarchy and it seems that to remove all  
> vtables there will be a need to flatten Instruction hierarchy with  
> regard to the clone virtual method as well as Constant   
> destroyConstant,isNullValue,replaceUsesOfWithOnConstant methods) and  
> GlobalValue (isDeclaration method). Those as well as print and dump  
> methods will probably be blocking the Value destructor from being de- 
> virtualized.
>
> Anyway, please find the patch attached with the Value destructor  
> virtualized temporarily and with added 'class' clause to friend  
> Value declarations.

Thanks Pawel! I've applied your patch as rev 44747 here:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071203/056105.html

Thanks again,
Gordon


P.S. The line endings in your patch were a bit problematic. All of the  
file contents themselves had Unix line endings, but the the diff  
structures (@@ X,Y and Index: etc.) were all in DOS format. It'd help  
save a bit of confusion if you can sort that for future submissions.

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


Re: [llvm-commits] RFC: patch for PR1782 (BasicAliasAnalyis)

2007-12-09 Thread Wojciech Matyjewicz
Chris Lattner wrote:

> Yep, it looks Gordon was right :).  Thanks again Wojtek, I applied the  
> patch.  Please close the PR,

Before I close the PR, I would like to discuss one more issue discovered
while working on it.

Suppose, we have a target with 32-bit pointers and the following
instructions:

%p = getelementptr i32* %x, i32 -1
%q = getelementptr i32* %x, i32 1073741823  ;(1073741823 == 2^30 - 1)

TargetData::getIndexedOffset() uses 64-bit arithmetic to perform offset
computation and return 64-bit values. Hence, it will return -4 as an
offset for %p, and 2^32 - 4 for %q. Based on these offsets, it may seem
that %p and %q point to different memory objects. However, they don't,
taking into account that pointers are 32-bit long.

I guess, such a large positive index in GEP as seen above can be
introduced by -instcombine pass.

BasicAA seems to be affected by the issue. For the attached example opt
-aa-eval says that %p and %q don't alias.

I think, the simplest way to fix it is to truncate the computed offset
to the target pointer size before returning it in
TargetData::getIndexedOffset(). If you think this is the correct
approach, I may prepare a patch.

-Wojtek
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-f80:32:32"

define void @foo(i32* %x) {
entry:
%p = getelementptr i32* %x, i32 -1
%q = getelementptr i32* %x, i32 1073741823
ret void
}
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] Deleting the Value vtable

2007-12-09 Thread Gordon Henriksen

On Dec 9, 2007, at 17:50, Gordon Henriksen wrote:


On Dec 3, 2007, at 17:59, pawel kunio wrote:

Whoah, pretty strange I get neither of those. I'm using compiler  
from vs 2008 beta2 'orcas'. What compiler should I use to be more  
in sync with the one used by You for verification? btw, I had a  
deeper look into the Value class hierarchy and it seems that to  
remove all vtables there will be a need to flatten Instruction  
hierarchy with regard to the clone virtual method as well as  
Constant destroyConstant,isNullValue,replaceUsesOfWithOnConstant  
methods) and GlobalValue (isDeclaration method). Those as well as  
print and dump methods will probably be blocking the Value  
destructor from being de-virtualized.


Anyway, please find the patch attached with the Value destructor  
virtualized temporarily and with added 'class' clause to friend  
Value declarations.


Thanks Pawel! I've applied your patch as rev 44747 here:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071203/056105.html



Since there are some other methods to devirtualize deeper in the class  
hierarchy, I wonder if it might make sense to write the dispatch once  
instead of repeating it several times. Here are some ideas off the top  
of my head…


// Dispatch to static methods.
#define NONVIRTUAL_DISPATCH1(V, F) \
   if (Foo *W = dyn_cast(V)) W->F(); \
  else if (Bar *W = dyn_cast(V)) W->F(); \
  else if (Baz *W = dyn_cast(V)) W->F();


// Dispatch to static methods.
#define NONVIRTUAL_DISPATCH2(V, F) \
   if (Foo *W = dyn_cast(V)) Foo::F(W); \
  else if (Bar *W = dyn_cast(V)) Bar::F(W); \
  else if (Baz *W = dyn_cast(V)) Baz::F(W);


// Dispatch to operator() overloads on a template operand.
template 
void NonvirtualDispatch3(Value *V) {
  Algo A;
  NonvirtualDispatch3(V, A);
};

template 
void NonvirtualDispatch3(Value *V, Algo &A) {
   if (Foo *W = dyn_cast(V)) A(W);
  else if (Bar *W = dyn_cast(V)) A(W);
  else if (Baz *W = dyn_cast(V)) A(W);
};

I don't like promoting methods to classes, so NovirtualDispatch3 is  
initially unattractive to me. However, there are practical benefits.


It allows separate compilation by defining the operator()(Foo*)  
overload in Foo.c. The declarations must be visible for an algorithm  
invoked from Value, though.
It can dispatch algorithms that take arguments by passing an Algo  
instance using the second overload.

Overloads on the V parameter could dispatch over subtypes.
These properties make it applicable for users of Value, not just its  
implementation.


All of these techniques can follow the class hierarchy automatically.  
In the first two cases, a base class will provide a default  
implementation. In the lattermost case, undefined overloads will fall  
back to the base class.


— Gordon

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


Re: [llvm-commits] Deleting the Value vtable

2007-12-09 Thread Chris Lattner

Thanks Pawel! I've applied your patch as rev 44747 here:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071203/056105.html



Since there are some other methods to devirtualize deeper in the  
class hierarchy, I wonder if it might make sense to write the  
dispatch once instead of repeating it several times. Here are some  
ideas off the top of my head…


Why not something like InstVisitor?  Right now it only supports  
instructions, but it could be extended.


-Chris

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


Re: [llvm-commits] Deleting the Value vtable

2007-12-09 Thread Gordon Henriksen

On 2007-12-09, at 19:02, Chris Lattner wrote:


Thanks Pawel! I've applied your patch as rev 44747 here:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071203/056105.html



Since there are some other methods to devirtualize deeper in the  
class hierarchy, I wonder if it might make sense to write the  
dispatch once instead of repeating it several times. Here are some  
ideas off the top of my head…


Why not something like InstVisitor?  Right now it only supports  
instructions, but it could be extended.


Indeed it could. It's isomorphic to the last option minus the sugar of  
dispatch(Value);.


— Gordon

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


[llvm-commits] [llvm] r44755 - /llvm/trunk/lib/VMCore/Value.cpp

2007-12-09 Thread Chris Lattner
Author: lattner
Date: Sun Dec  9 19:48:29 2007
New Revision: 44755

URL: http://llvm.org/viewvc/llvm-project?rev=44755&view=rev
Log:
Fix a big problem in the recent dtor refactoring work, now it passes 
2007-11-19-InlineAsm.ll


Modified:
llvm/trunk/lib/VMCore/Value.cpp

Modified: llvm/trunk/lib/VMCore/Value.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Value.cpp?rev=44755&r1=44754&r2=44755&view=diff

==
--- llvm/trunk/lib/VMCore/Value.cpp (original)
+++ llvm/trunk/lib/VMCore/Value.cpp Sun Dec  9 19:48:29 2007
@@ -137,41 +137,7 @@
 if (BinaryOperator *BO = dyn_cast(this))
   BinaryOperator::destroyThis(BO);
 else if (CallInst *CI = dyn_cast(this))
-{
-  if(IntrinsicInst* II = dyn_cast(this))
-  {
-if(DbgInfoIntrinsic* DII = dyn_cast(this))
-{
-  if(DbgDeclareInst* DDI = dyn_cast(this))
-DbgDeclareInst::destroyThis(DDI);
-  else if(DbgFuncStartInst* DFSI = dyn_cast(this))
-DbgFuncStartInst::destroyThis(DFSI);
-  else if(DbgRegionEndInst* DREI = dyn_cast(this))
-DbgRegionEndInst::destroyThis(DREI);
-  else if(DbgRegionStartInst* DRSI = 
dyn_cast(this))
-DbgRegionStartInst::destroyThis(DRSI);
-  else if(DbgStopPointInst* DSPI = dyn_cast(this))
-DbgStopPointInst::destroyThis(DSPI);
-  else
-assert(0 && "Unknown DbgInfo-inherited class in ~Value.");
-}
-else if(MemIntrinsic* MI = dyn_cast(this))
-{
-  if(MemCpyInst* MCI = dyn_cast(this))
-MemCpyInst::destroyThis(MCI);
-  else if(MemMoveInst* MMI = dyn_cast(this))
-MemMoveInst::destroyThis(MMI);
-  else if(MemSetInst* MSI = dyn_cast(this))
-MemSetInst::destroyThis(MSI);
-  else
-assert(0 && "Unknown MemIntrinsic-inherited class in ~Value.");
-}
-else
-  assert(0 && "Unknown IntrinsicInst-inherited class in ~Value.");
-  }
-  else
-assert(0 && "Unknown CallInst-inherited class in ~Value.");
-}
+  CallInst::destroyThis(CI);
 else if (CmpInst *CI = dyn_cast(this))
 {
   if (FCmpInst *FCI = dyn_cast(this))
@@ -222,32 +188,30 @@
   MallocInst::destroyThis(MI);
 else
   assert(0 && "Unknown AllocationInst-inherited class in ~Value.");
-  }
-  else if(CastInst* CI = dyn_cast(this))
-  {
-if(BitCastInst* BCI = dyn_cast(this))
+  } else if(CastInst* CI = dyn_cast(this)) {
+if(BitCastInst* BCI = dyn_cast(CI))
   BitCastInst::destroyThis(BCI);
-else if(FPExtInst* FPEI = dyn_cast(this))
+else if(FPExtInst* FPEI = dyn_cast(CI))
   FPExtInst::destroyThis(FPEI);
-else if(FPToSIInst* FPSII = dyn_cast(this))
+else if(FPToSIInst* FPSII = dyn_cast(CI))
   FPToSIInst::destroyThis(FPSII);
-else if(FPToUIInst* FPUII = dyn_cast(this))
+else if(FPToUIInst* FPUII = dyn_cast(CI))
   FPToUIInst::destroyThis(FPUII);
-else if(FPTruncInst* FPTI = dyn_cast(this))
+else if(FPTruncInst* FPTI = dyn_cast(CI))
   FPTruncInst::destroyThis(FPTI);
-else if(IntToPtrInst* I2PI = dyn_cast(this))
+else if(IntToPtrInst* I2PI = dyn_cast(CI))
   IntToPtrInst::destroyThis(I2PI);
-else if(PtrToIntInst* P2II = dyn_cast(this))
+else if(PtrToIntInst* P2II = dyn_cast(CI))
   PtrToIntInst::destroyThis(P2II);
-else if(SExtInst* SEI = dyn_cast(this))
+else if(SExtInst* SEI = dyn_cast(CI))
   SExtInst::destroyThis(SEI);
-else if(SIToFPInst* SIFPI = dyn_cast(this))
+else if(SIToFPInst* SIFPI = dyn_cast(CI))
   SIToFPInst::destroyThis(SIFPI);
-else if(TruncInst* TI = dyn_cast(this))
+else if(TruncInst* TI = dyn_cast(CI))
   TruncInst::destroyThis(TI);
-else if(UIToFPInst* UIFPI = dyn_cast(this))
+else if(UIToFPInst* UIFPI = dyn_cast(CI))
   UIToFPInst::destroyThis(UIFPI);
-else if(ZExtInst* ZEI = dyn_cast(this))
+else if(ZExtInst* ZEI = dyn_cast(CI))
   ZExtInst::destroyThis(ZEI);
 else
   assert(0 && "Unknown CastInst-inherited class in ~Value.");


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


[llvm-commits] [llvm] r44756 - /llvm/trunk/lib/VMCore/Value.cpp

2007-12-09 Thread Chris Lattner
Author: lattner
Date: Sun Dec  9 19:51:22 2007
New Revision: 44756

URL: http://llvm.org/viewvc/llvm-project?rev=44756&view=rev
Log:
fix some warnings.

Modified:
llvm/trunk/lib/VMCore/Value.cpp

Modified: llvm/trunk/lib/VMCore/Value.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Value.cpp?rev=44756&r1=44755&r2=44756&view=diff

==
--- llvm/trunk/lib/VMCore/Value.cpp (original)
+++ llvm/trunk/lib/VMCore/Value.cpp Sun Dec  9 19:51:22 2007
@@ -140,9 +140,9 @@
   CallInst::destroyThis(CI);
 else if (CmpInst *CI = dyn_cast(this))
 {
-  if (FCmpInst *FCI = dyn_cast(this))
+  if (FCmpInst *FCI = dyn_cast(CI))
 FCmpInst::destroyThis(FCI);
-  else if (ICmpInst *ICI = dyn_cast(this))
+  else if (ICmpInst *ICI = dyn_cast(CI))
 ICmpInst::destroyThis(ICI);
   else
 assert(0 && "Unknown CmpInst-inherited class in ~Value.");
@@ -163,28 +163,25 @@
   StoreInst::destroyThis(SI);
 else if (TerminatorInst *TI = dyn_cast(this))
 {
-  if (BranchInst* BI = dyn_cast(this))
+  if (BranchInst* BI = dyn_cast(TI))
 BranchInst::destroyThis(BI);
-  else if (InvokeInst* II = dyn_cast(this))
+  else if (InvokeInst* II = dyn_cast(TI))
 InvokeInst::destroyThis(II);
-  else if (ReturnInst* RI = dyn_cast(this))
+  else if (ReturnInst* RI = dyn_cast(TI))
 ReturnInst::destroyThis(RI);
-  else if (SwitchInst *SI = dyn_cast(this))
+  else if (SwitchInst *SI = dyn_cast(TI))
 SwitchInst::destroyThis(SI);
-  else if (UnreachableInst *UI = dyn_cast(this))
+  else if (UnreachableInst *UI = dyn_cast(TI))
 UnreachableInst::destroyThis(UI);
-  else if (UnwindInst *UI = dyn_cast(this))
+  else if (UnwindInst *UI = dyn_cast(TI))
 UnwindInst::destroyThis(UI);
   else
 assert(0 && "Unknown TerminatorInst-inherited class in ~Value.");
-}
-else if(UnaryInstruction* UI = dyn_cast(this))
-{
-  if(AllocationInst* AI = dyn_cast(this))
-  {
-if(AllocaInst* AI = dyn_cast(this))
+} else if(UnaryInstruction* UI = dyn_cast(this)) {
+  if(AllocationInst* AI = dyn_cast(UI)) {
+if(AllocaInst* AI = dyn_cast(UI))
   AllocaInst::destroyThis(AI);
-else if(MallocInst* MI = dyn_cast(this))
+else if(MallocInst* MI = dyn_cast(UI))
   MallocInst::destroyThis(MI);
 else
   assert(0 && "Unknown AllocationInst-inherited class in ~Value.");


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


[llvm-commits] [llvm] r44757 - /llvm/trunk/include/llvm/IntrinsicInst.h

2007-12-09 Thread Chris Lattner
Author: lattner
Date: Sun Dec  9 19:51:38 2007
New Revision: 44757

URL: http://llvm.org/viewvc/llvm-project?rev=44757&view=rev
Log:
remove some dead code. 

Modified:
llvm/trunk/include/llvm/IntrinsicInst.h

Modified: llvm/trunk/include/llvm/IntrinsicInst.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IntrinsicInst.h?rev=44757&r1=44756&r2=44757&view=diff

==
--- llvm/trunk/include/llvm/IntrinsicInst.h (original)
+++ llvm/trunk/include/llvm/IntrinsicInst.h Sun Dec  9 19:51:38 2007
@@ -38,11 +38,6 @@
 IntrinsicInst();  // DO NOT IMPLEMENT
 IntrinsicInst(const IntrinsicInst&);  // DO NOT IMPLEMENT
 void operator=(const IntrinsicInst&); // DO NOT IMPLEMENT
-  protected:
-static void destroyThis(IntrinsicInst* v) {
-  CallInst::destroyThis(v);
-}
-friend class Value;
   public:
 
 /// StripPointerCasts - This static method strips off any unneeded pointer
@@ -90,11 +85,6 @@
 }
 
 static Value *StripCast(Value *C);
-  protected:
-static void destroyThis(DbgInfoIntrinsic* v) {
-  IntrinsicInst::destroyThis(v);
-}
-friend class Value;
   };
 
   /// DbgStopPointInst - This represents the llvm.dbg.stoppoint instruction.
@@ -124,11 +114,6 @@
 static inline bool classof(const Value *V) {
   return isa(V) && classof(cast(V));
 }
-  protected:
-static void destroyThis(DbgStopPointInst* v) {
-  DbgInfoIntrinsic::destroyThis(v);
-}
-friend class Value;  
   };
   
   /// DbgFuncStartInst - This represents the llvm.dbg.func.start instruction.
@@ -144,11 +129,6 @@
 static inline bool classof(const Value *V) {
   return isa(V) && classof(cast(V));
 }
-  protected:
-static void destroyThis(DbgFuncStartInst* v) {
-  DbgInfoIntrinsic::destroyThis(v);
-}
-friend class Value;  
   };
 
   /// DbgRegionStartInst - This represents the llvm.dbg.region.start
@@ -164,11 +144,6 @@
 static inline bool classof(const Value *V) {
   return isa(V) && classof(cast(V));
 }
-  protected:
-static void destroyThis(DbgRegionStartInst* v) {
-  DbgInfoIntrinsic::destroyThis(v);
-}
-friend class Value;  
   };
 
   /// DbgRegionEndInst - This represents the llvm.dbg.region.end instruction.
@@ -200,11 +175,6 @@
 static inline bool classof(const Value *V) {
   return isa(V) && classof(cast(V));
 }
-  protected:
-static void destroyThis(DbgDeclareInst* v) {
-  DbgInfoIntrinsic::destroyThis(v);
-}
-friend class Value;
   };
 
   /// MemIntrinsic - This is the common base class for memset/memcpy/memmove.
@@ -258,11 +228,6 @@
 static inline bool classof(const Value *V) {
   return isa(V) && classof(cast(V));
 }
-  protected:
-static void destroyThis(MemIntrinsic* v) {
-  IntrinsicInst::destroyThis(v);
-}
-friend class Value;  
   };
 
 
@@ -294,11 +259,6 @@
 static inline bool classof(const Value *V) {
   return isa(V) && classof(cast(V));
 }
-  protected:
-static void destroyThis(MemCpyInst* v) {
-  MemIntrinsic::destroyThis(v);
-}
-friend class Value;  
   };
 
   /// MemMoveInst - This class wraps the llvm.memmove intrinsic.
@@ -328,11 +288,6 @@
 static inline bool classof(const Value *V) {
   return isa(V) && classof(cast(V));
 }
-  protected:
-static void destroyThis(MemMoveInst* v) {
-  MemIntrinsic::destroyThis(v);
-}
-friend class Value;  
   };
 
   /// MemSetInst - This class wraps the llvm.memset intrinsic.
@@ -357,11 +312,6 @@
 static inline bool classof(const Value *V) {
   return isa(V) && classof(cast(V));
 }
-  protected:
-static void destroyThis(MemSetInst* v) {
-  MemIntrinsic::destroyThis(v);
-}
-friend class Value;  
   };
 
 }


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


[llvm-commits] [llvm] r44760 - in /llvm/trunk: include/llvm/ lib/VMCore/

2007-12-09 Thread Gordon Henriksen
Author: gordon
Date: Sun Dec  9 20:14:30 2007
New Revision: 44760

URL: http://llvm.org/viewvc/llvm-project?rev=44760&view=rev
Log:
Reverting dtor devirtualization patch.
_sabre_: it has a major problem: by the time ~Value is run, all of the "parts" 
of the derived classes have been destroyed
_sabre_: the vtable lives to fight another day

Modified:
llvm/trunk/include/llvm/Argument.h
llvm/trunk/include/llvm/BasicBlock.h
llvm/trunk/include/llvm/Constant.h
llvm/trunk/include/llvm/Constants.h
llvm/trunk/include/llvm/Function.h
llvm/trunk/include/llvm/GlobalAlias.h
llvm/trunk/include/llvm/GlobalValue.h
llvm/trunk/include/llvm/GlobalVariable.h
llvm/trunk/include/llvm/InlineAsm.h
llvm/trunk/include/llvm/InstrTypes.h
llvm/trunk/include/llvm/Instruction.h
llvm/trunk/include/llvm/Instructions.h
llvm/trunk/include/llvm/User.h
llvm/trunk/include/llvm/Value.h
llvm/trunk/lib/VMCore/BasicBlock.cpp
llvm/trunk/lib/VMCore/Constants.cpp
llvm/trunk/lib/VMCore/Function.cpp
llvm/trunk/lib/VMCore/InlineAsm.cpp
llvm/trunk/lib/VMCore/Instruction.cpp
llvm/trunk/lib/VMCore/Instructions.cpp
llvm/trunk/lib/VMCore/Value.cpp

Modified: llvm/trunk/include/llvm/Argument.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Argument.h?rev=44760&r1=44759&r2=44760&view=diff

==
--- llvm/trunk/include/llvm/Argument.h (original)
+++ llvm/trunk/include/llvm/Argument.h Sun Dec  9 20:14:30 2007
@@ -35,11 +35,6 @@
   friend class SymbolTableListTraits;
   void setParent(Function *parent);
 
-protected:
-  static void destroyThis(Argument*v) {
-Value::destroyThis(v);
-  }
-  friend class Value;
 public:
   /// Argument ctor - If Function argument is specified, this argument is
   /// inserted at the end of the argument list for the function.

Modified: llvm/trunk/include/llvm/BasicBlock.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/BasicBlock.h?rev=44760&r1=44759&r2=44760&view=diff

==
--- llvm/trunk/include/llvm/BasicBlock.h (original)
+++ llvm/trunk/include/llvm/BasicBlock.h Sun Dec  9 20:14:30 2007
@@ -65,9 +65,6 @@
   BasicBlock(const BasicBlock &); // Do not implement
   void operator=(const BasicBlock &); // Do not implement
 
-protected:
-  static void destroyThis(BasicBlock*);
-  friend class Value;
 public:
   /// Instruction iterators...
   typedef InstListType::iterator  iterator;
@@ -79,6 +76,7 @@
   ///
   explicit BasicBlock(const std::string &Name = "", Function *Parent = 0,
   BasicBlock *InsertBefore = 0);
+  ~BasicBlock();
 
   /// getParent - Return the enclosing method, or null if none
   ///
@@ -208,33 +206,6 @@
   const BasicBlock *getPrev() const { return Prev; }
 };
 
-/// DummyInst - An instance of this class is used to mark the end of the
-/// instruction list.  This is not a real instruction.
-class DummyInst : public Instruction {
-protected:
-  static void destroyThis(DummyInst* v) {
-Instruction::destroyThis(v);
-  }
-  friend class Value;
-public:
-  DummyInst();
-
-  Instruction *clone() const {
-assert(0 && "Cannot clone EOL");abort();
-return 0;
-  }
-  const char *getOpcodeName() const { return "*end-of-list-inst*"; }
-
-  // Methods for support type inquiry through isa, cast, and dyn_cast...
-  static inline bool classof(const DummyInst *) { return true; }
-  static inline bool classof(const Instruction *I) {
-return I->getOpcode() == OtherOpsEnd;
-  }
-  static inline bool classof(const Value *V) {
-return isa(V) && classof(cast(V));
-  }
-};
-
 inline int 
 ilist_traits::getListOffset() {
   return BasicBlock::getInstListOffset();

Modified: llvm/trunk/include/llvm/Constant.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Constant.h?rev=44760&r1=44759&r2=44760&view=diff

==
--- llvm/trunk/include/llvm/Constant.h (original)
+++ llvm/trunk/include/llvm/Constant.h Sun Dec  9 20:14:30 2007
@@ -43,10 +43,6 @@
 : User(Ty, vty, Ops, NumOps) {}
 
   void destroyConstantImpl();
-  static void destroyThis(Constant*v) {
-User::destroyThis(v);
-  }
-  friend class Value;
 public:
   /// Static constructor to get a '0' constant of arbitrary type...
   ///

Modified: llvm/trunk/include/llvm/Constants.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Constants.h?rev=44760&r1=44759&r2=44760&view=diff

==
--- llvm/trunk/include/llvm/Constants.h (original)
+++ llvm/trunk/include/llvm/Constants.h Sun Dec  9 20:14:30 2007
@@ -46,11 +46,6 @@
   ConstantInt(const ConstantInt &);  // DO NOT IMPLEMENT
   ConstantInt(const IntegerType *Ty, const APInt& V);
   APInt Val;
-protected:
-  static void

[llvm-commits] [support] r44764 - in /support/trunk/make: Makefile.common Makefile.top

2007-12-09 Thread Reid Spencer
Author: reid
Date: Sun Dec  9 21:14:08 2007
New Revision: 44764

URL: http://llvm.org/viewvc/llvm-project?rev=44764&view=rev
Log:
Split this spotless target out into the Makefile.top file since it is only
relevant at the top level directory.

Allow the top level directory to be used as an include file source for projects
like HLVM.

Added:
support/trunk/make/Makefile.top
Modified:
support/trunk/make/Makefile.common

Modified: support/trunk/make/Makefile.common
URL: 
http://llvm.org/viewvc/llvm-project/support/trunk/make/Makefile.common?rev=44764&r1=44763&r2=44764&view=diff

==
--- support/trunk/make/Makefile.common (original)
+++ support/trunk/make/Makefile.common Sun Dec  9 21:14:08 2007
@@ -90,29 +90,6 @@
-$(Verb) $(RM) -f $(BUILT_SOURCES)
 endif
 
-ifneq ($(OBJ_ROOT),$(SRC_ROOT))
-spotless:
-   $(Verb) if test -x config.status ; then \
- $(EchoCmd) Wiping out $(OBJ_ROOT) ; \
- $(MKDIR) .spotless.save ; \
- $(MV) config.status .spotless.save ; \
- $(MV) mklib  .spotless.save ; \
- $(MV) projects  .spotless.save ; \
- $(RM) -rf * ; \
- $(MV) .spotless.save/config.status . ; \
- $(MV) .spotless.save/mklib . ; \
- $(MV) .spotless.save/projects . ; \
- $(RM) -rf .spotless.save ; \
- $(EchoCmd) Rebuilding configuration of $(OBJ_ROOT) ; \
- $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
- $(ConfigStatusScript) ; \
-   else \
- $(EchoCmd) "make spotless" can only be run from $(OBJ_ROOT); \
-   fi
-else
-spotless:
-   $(EchoCmd) "spotless target not supported for objdir == srcdir"
-endif
 
 $(BUILT_SOURCES) : $(ObjMakefiles)
 
@@ -446,8 +423,9 @@
 CPP.BaseFlags += -D_GNU_SOURCE -D__STDC_LIMIT_MACROS
 # All -I flags should go here, so that they don't confuse llvm-config.
 CPP.Flags += -I$(OBJ_DIR) -I$(SRC_DIR) \
--I$(OBJ_ROOT)/include \
--I$(SRC_ROOT)/include \
+ -I$(OBJ_ROOT)/include -I$(SRC_ROOT)/include \
+-I$(OBJ_ROOT) -I$(SRC_ROOT) \
+ $(patsubst %,-I$(LLVM_TOP)/%/include 
-I$(LLVM_TOP)/%,$(LLVM_MODULE_DEPENDS_ON)) \
 $(CPP.BaseFlags)
 
 Compile.C = $(CC) $(CPP.Flags) $(C.Flags) $(CompileCommonOpts) -c

Added: support/trunk/make/Makefile.top
URL: 
http://llvm.org/viewvc/llvm-project/support/trunk/make/Makefile.top?rev=44764&view=auto

==
--- support/trunk/make/Makefile.top (added)
+++ support/trunk/make/Makefile.top Sun Dec  9 21:14:08 2007
@@ -0,0 +1,43 @@
+#===-- Makefile.top - Rules for top level directory *- Makefile 
-*--===#
+#
+# The LLVM Compiler Infrastructure
+#
+# This file was developed by Reid Spencer group and is distributed under the
+# University of Illinois Open Source License. See LICENSE.TXT for details.
+# 
+#======#
+#
+# This file is used by all top level directories of LLVM modules. It provides
+# the targets that only occur at the top level in addition to Makefile.common
+#
+#===---#
+
+include $(LLVM_TOP)/support/make/Makefile.compile
+
+#---
+# Provide a spotless target to really blow things away and start from scratch
+#---
+
+ifneq ($(OBJ_ROOT),$(SRC_ROOT))
+spotless:
+   $(Verb) if test -x config.status ; then \
+ $(EchoCmd) Wiping out $(OBJ_ROOT) ; \
+ $(MKDIR) .spotless.save ; \
+ $(MV) config.status .spotless.save ; \
+ $(MV) mklib  .spotless.save ; \
+ $(MV) projects  .spotless.save ; \
+ $(RM) -rf * ; \
+ $(MV) .spotless.save/config.status . ; \
+ $(MV) .spotless.save/mklib . ; \
+ $(MV) .spotless.save/projects . ; \
+ $(RM) -rf .spotless.save ; \
+ $(EchoCmd) Rebuilding configuration of $(OBJ_ROOT) ; \
+ $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
+ $(ConfigStatusScript) ; \
+   else \
+ $(EchoCmd) "make spotless" can only be run from $(OBJ_ROOT); \
+   fi
+else
+spotless:
+   $(EchoCmd) "spotless target not supported for objdir == srcdir"
+endif


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


[llvm-commits] [support] r44765 - /support/trunk/Makefile.common.in

2007-12-09 Thread Reid Spencer
Author: reid
Date: Sun Dec  9 21:14:50 2007
New Revision: 44765

URL: http://llvm.org/viewvc/llvm-project?rev=44765&view=rev
Log:
Make WANT_PROFILING use an immediate assignment like the other variables in this
file.

Modified:
support/trunk/Makefile.common.in

Modified: support/trunk/Makefile.common.in
URL: 
http://llvm.org/viewvc/llvm-project/support/trunk/Makefile.common.in?rev=44765&r1=44764&r2=44765&view=diff

==
--- support/trunk/Makefile.common.in (original)
+++ support/trunk/Makefile.common.in Sun Dec  9 21:14:50 2007
@@ -173,7 +173,7 @@
 
 # When ENABLE_PROFILING is enabled, the llvm source base is built with profile
 # information to allow gprof to be used to get execution frequencies.
-WANT_PROFILING = @WANT_PROFILING@
+WANT_PROFILING := @WANT_PROFILING@
 
 # When WANT_STRIPPED is enabled, executables and libraries will be
 # stripped of debug symbols


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


[llvm-commits] [support] r44766 - in /support/trunk/autoconf/m4: want_feature.m4 want_level.m4

2007-12-09 Thread Reid Spencer
Author: reid
Date: Sun Dec  9 21:15:53 2007
New Revision: 44766

URL: http://llvm.org/viewvc/llvm-project?rev=44766&view=rev
Log:
Move the WANT_LEVEL macro to its own file.

Added:
support/trunk/autoconf/m4/want_level.m4
Modified:
support/trunk/autoconf/m4/want_feature.m4

Modified: support/trunk/autoconf/m4/want_feature.m4
URL: 
http://llvm.org/viewvc/llvm-project/support/trunk/autoconf/m4/want_feature.m4?rev=44766&r1=44765&r2=44766&view=diff

==
--- support/trunk/autoconf/m4/want_feature.m4 (original)
+++ support/trunk/autoconf/m4/want_feature.m4 Sun Dec  9 21:15:53 2007
@@ -21,35 +21,3 @@
   want_var=[WANT_]allcapsname()
   AC_DEFINE_UNQUOTED($want_var,$enableval,[$2])
 ])
-
-dnl Make it easier to use the AC_ARG_ENABLE macro for certain numeric switches
-dnl that turn specify levels of support as integer values. The arguments are:
-dnl   1 - feature name
-dnl   2 - feature description
-dnl   3 - default value
-dnl   4 - min value (default 0)
-dnl   5 - max value (default 100)
-AC_DEFUN([LLVM_WANT_LEVEL],[
-  m4_define([allcapsname],translit($1,a-z-,A-Z_))
-  AC_ARG_ENABLE([$1],
-AS_HELP_STRING([--enable-$1],[$2 ($3)]),,enableval="$3")
-  digits=`echo "$enableval" | sed 's/[^0-9]//'`
-  if test -z "$digits" ; then
-AC_MSG_ERROR([Expected numeric value for --enable-$1.])
-  fi
-  min="$4"
-  max="$5"
-  if test -z "$min" ; then min="0" ; fi
-  if test -z "$max" ; then max="100" ; fi
-  if test "$enableval" -lt "$min" ; then
-AC_MSG_ERROR(
-  [Value for --enable-$1 ($enableval) is less than minimum ($min)])
-  fi
-  if test "$enableval" -gt "$max" ; then
-AC_MSG_ERROR(
-  [Value for --enable-$1 ($enableval) is greater than maximum ($max)])
-  fi
-  AC_SUBST([WANT_]allcapsname(),$enableval)
-  want_var=[WANT_]allcapsname()
-  AC_DEFINE_UNQUOTED($want_var,$enableval,[$2])
-])

Added: support/trunk/autoconf/m4/want_level.m4
URL: 
http://llvm.org/viewvc/llvm-project/support/trunk/autoconf/m4/want_level.m4?rev=44766&view=auto

==
--- support/trunk/autoconf/m4/want_level.m4 (added)
+++ support/trunk/autoconf/m4/want_level.m4 Sun Dec  9 21:15:53 2007
@@ -0,0 +1,31 @@
+dnl Make it easier to use the AC_ARG_ENABLE macro for certain numeric switches
+dnl that return levels of support as integer values. The arguments are:
+dnl   1 - feature name
+dnl   2 - feature description
+dnl   3 - default value
+dnl   4 - min value (default 0)
+dnl   5 - max value (default 100)
+AC_DEFUN([LLVM_WANT_LEVEL],[
+  m4_define([allcapsname],translit($1,a-z-,A-Z_))
+  AC_ARG_ENABLE([$1],
+AS_HELP_STRING([--enable-$1],[$2 ($3)]),,enableval="$3")
+  digits=`echo "$enableval" | sed 's/[^0-9]//'`
+  if test -z "$digits" ; then
+AC_MSG_ERROR([Expected numeric value for --enable-$1.])
+  fi
+  min="$4"
+  max="$5"
+  if test -z "$min" ; then min="0" ; fi
+  if test -z "$max" ; then max="100" ; fi
+  if test "$enableval" -lt "$min" ; then
+AC_MSG_ERROR(
+  [Value for --enable-$1 ($enableval) is less than minimum ($min)])
+  fi
+  if test "$enableval" -gt "$max" ; then
+AC_MSG_ERROR(
+  [Value for --enable-$1 ($enableval) is greater than maximum ($max)])
+  fi
+  AC_SUBST([WANT_]allcapsname(),$enableval)
+  want_var=[WANT_]allcapsname()
+  AC_DEFINE_UNQUOTED($want_var,$enableval,[$2])
+])


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


[llvm-commits] [support] r44767 - /support/trunk/autoconf/configure.ac

2007-12-09 Thread Reid Spencer
Author: reid
Date: Sun Dec  9 21:16:43 2007
New Revision: 44767

URL: http://llvm.org/viewvc/llvm-project?rev=44767&view=rev
Log:
1. Update the version number to 2.2svn
2. Make DESTDIR not be defined as '' by using ''!

Modified:
support/trunk/autoconf/configure.ac

Modified: support/trunk/autoconf/configure.ac
URL: 
http://llvm.org/viewvc/llvm-project/support/trunk/autoconf/configure.ac?rev=44767&r1=44766&r2=44767&view=diff

==
--- support/trunk/autoconf/configure.ac (original)
+++ support/trunk/autoconf/configure.ac Sun Dec  9 21:16:43 2007
@@ -33,7 +33,7 @@
 
dnl===---===
 dnl Initialize autoconf and define the package name, version number and
 dnl email address for reporting bugs.
-AC_INIT([[LLVM Support 
Module]],[[2.1svn]],[http://llvm.org/bugs],[llvm-support])
+AC_INIT([[LLVM Support 
Module]],[[2.2svn]],[http://llvm.org/bugs],[llvm-support])
 THIS_IS_LLVM_MODULE([support])
 
 dnl Verify that the source directory is valid. This makes sure that we are
@@ -253,7 +253,7 @@
   AS_HELP_STRING([--with-destdir],
  [Specify the install destination directory]),,withval=default)
 case "$withval" in
-  default)  DESTDIR="" ;;
+  default)  DESTDIR='' ;;
   *)DESTDIR=$withval ;;
 esac
 AC_SUBST(DESTDIR,$DESTDIR)


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


[llvm-commits] [support] r44768 - /support/trunk/configure

2007-12-09 Thread Reid Spencer
Author: reid
Date: Sun Dec  9 21:17:09 2007
New Revision: 44768

URL: http://llvm.org/viewvc/llvm-project?rev=44768&view=rev
Log:
Regenerate.

Modified:
support/trunk/configure

Modified: support/trunk/configure
URL: 
http://llvm.org/viewvc/llvm-project/support/trunk/configure?rev=44768&r1=44767&r2=44768&view=diff

==
--- support/trunk/configure (original)
+++ support/trunk/configure Sun Dec  9 21:17:09 2007
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for LLVM Support Module 2.1svn.
+# Generated by GNU Autoconf 2.61 for LLVM Support Module 2.2svn.
 #
 # Report bugs to .
 #
@@ -730,8 +730,8 @@
 # Identity of this package.
 PACKAGE_NAME='LLVM Support Module'
 PACKAGE_TARNAME='llvm-support'
-PACKAGE_VERSION='2.1svn'
-PACKAGE_STRING='LLVM Support Module 2.1svn'
+PACKAGE_VERSION='2.2svn'
+PACKAGE_STRING='LLVM Support Module 2.2svn'
 PACKAGE_BUGREPORT='http://llvm.org/bugs'
 
 ac_unique_file=""
@@ -1451,7 +1451,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures LLVM Support Module 2.1svn to adapt to many kinds of 
systems.
+\`configure' configures LLVM Support Module 2.2svn to adapt to many kinds of 
systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1517,7 +1517,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
- short | recursive ) echo "Configuration of LLVM Support Module 2.1svn:";;
+ short | recursive ) echo "Configuration of LLVM Support Module 2.2svn:";;
esac
   cat <<\_ACEOF
 
@@ -1644,7 +1644,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-LLVM Support Module configure 2.1svn
+LLVM Support Module configure 2.2svn
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1660,7 +1660,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by LLVM Support Module $as_me 2.1svn, which was
+It was created by LLVM Support Module $as_me 2.2svn, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
@@ -2092,13 +2092,13 @@
 
   LLVM_MODULE_FULLNAME="LLVM Support Module"
   LLVM_MODULE_TARNAME="llvm-support"
-  LLVM_MODULE_VERSION="2.1svn"
+  LLVM_MODULE_VERSION="2.2svn"
   LLVM_MODULE_BUGREPORT="http://llvm.org/bugs";
   LLVM_MODULE_FULLNAME="LLVM Support Module"
 
   LLVM_MODULE_TARNAME="llvm-support"
 
-  LLVM_MODULE_VERSION="2.1svn"
+  LLVM_MODULE_VERSION="2.2svn"
 
   LLVM_MODULE_BUGREPORT="http://llvm.org/bugs";
 
@@ -4772,7 +4772,7 @@
 fi
 
 case "$withval" in
-  default)  DESTDIR="" ;;
+  default)  DESTDIR='' ;;
   *)DESTDIR=$withval ;;
 esac
 DESTDIR=$DESTDIR
@@ -31997,7 +31997,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by LLVM Support Module $as_me 2.1svn, which was
+This file was extended by LLVM Support Module $as_me 2.2svn, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES= $CONFIG_FILES
@@ -32050,7 +32050,7 @@
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-LLVM Support Module config.status 2.1svn
+LLVM Support Module config.status 2.2svn
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/&/g'`\\"
 


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


[llvm-commits] [support] r44770 - in /support/trunk: include/llvm/ADT/ include/llvm/Config/ include/llvm/Support/ include/llvm/System/ lib/Support/ lib/System/

2007-12-09 Thread Reid Spencer
Author: reid
Date: Sun Dec  9 21:22:30 2007
New Revision: 44770

URL: http://llvm.org/viewvc/llvm-project?rev=44770&view=rev
Log:
Remove code in preparation for an update via svn copy.

Removed:
support/trunk/include/llvm/ADT/
support/trunk/include/llvm/Config/
support/trunk/include/llvm/Support/
support/trunk/include/llvm/System/
support/trunk/lib/Support/
support/trunk/lib/System/

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


Re: [llvm-commits] [llvm] r44769 - in /llvm/trunk: bindings/ocaml/llvm/ docs/ include/llvm-c/ include/llvm/ include/llvm/Bitcode/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/Transforms/

2007-12-09 Thread Nick Lewycky
Gordon Henriksen wrote:
> ==
> --- llvm/trunk/docs/LangRef.html (original)
> +++ llvm/trunk/docs/LangRef.html Sun Dec  9 21:18:06 2007
> @@ -26,6 +26,7 @@
>Functions
>Aliases
>Parameter Attributes
> +  Garbage Collector Names
>Module-Level Inline Assembly
>Data Layout
>  
> @@ -702,15 +703,16 @@
>  parameter attribute for the return type, a 
> function 
>  name, a (possibly empty) argument list (each with optional 
>  parameter attributes), an optional section, an
> -optional alignment, an opening curly brace, a list of basic blocks, and a
> -closing curly brace.  
> +optional alignment, an optional garbage collector name, an

You mean 

> +opening curly brace, a list of basic blocks, and a closing curly brace.
>  
>  LLVM function declarations consist of the "declare" keyword, an
>  optional linkage type, an optional
>  visibility style, an optional 
>  calling convention, a return type, an optional
>  parameter attribute for the return type, a 
> function 
> -name, a possibly empty list of arguments, and an optional alignment.
> +name, a possibly empty list of arguments, an optional alignment, and an 
> optional
> +garbage collector name.

Again.

>  A function definition contains a list of basic blocks, forming the CFG for
>  the function.  Each basic block may optionally start with a label (giving the
> @@ -826,6 +828,23 @@
>  
>  
>  
> +  Garbage Collector Names

Again.

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


[llvm-commits] [support] r44772 - in /support/trunk/lib: Support/Makefile System/Makefile

2007-12-09 Thread Reid Spencer
Author: reid
Date: Sun Dec  9 21:28:51 2007
New Revision: 44772

URL: http://llvm.org/viewvc/llvm-project?rev=44772&view=rev
Log:
Add back the previous Makefiles.

Added:
support/trunk/lib/Support/Makefile
  - copied unchanged from r44769, support/trunk/lib/Support/Makefile
support/trunk/lib/System/Makefile
  - copied unchanged from r44769, support/trunk/lib/System/Makefile

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


[llvm-commits] [support] r44773 - in /support/trunk/include/llvm: ADT/ Config/ Support/ System/

2007-12-09 Thread Reid Spencer
Author: reid
Date: Sun Dec  9 21:30:13 2007
New Revision: 44773

URL: http://llvm.org/viewvc/llvm-project?rev=44773&view=rev
Log:
Update all "support" header files to be the latest versions from the llvm
module.

Added:
support/trunk/include/llvm/ADT/
  - copied from r44703, llvm/trunk/include/llvm/ADT/
support/trunk/include/llvm/Config/
  - copied from r44703, llvm/trunk/include/llvm/Config/
support/trunk/include/llvm/Support/
  - copied from r44703, llvm/trunk/include/llvm/Support/
support/trunk/include/llvm/System/
  - copied from r44703, llvm/trunk/include/llvm/System/

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


[llvm-commits] [llvm] r44774 - /llvm/trunk/docs/LangRef.html

2007-12-09 Thread Gordon Henriksen
Author: gordon
Date: Sun Dec  9 21:30:21 2007
New Revision: 44774

URL: http://llvm.org/viewvc/llvm-project?rev=44774&view=rev
Log:
Fix a typo spotted by Nick Lewycky.

Modified:
llvm/trunk/docs/LangRef.html

Modified: llvm/trunk/docs/LangRef.html
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=44774&r1=44773&r2=44774&view=diff

==
--- llvm/trunk/docs/LangRef.html (original)
+++ llvm/trunk/docs/LangRef.html Sun Dec  9 21:30:21 2007
@@ -703,7 +703,7 @@
 parameter attribute for the return type, a function 
 name, a (possibly empty) argument list (each with optional 
 parameter attributes), an optional section, an
-optional alignment, an optional garbage collector name, an
+optional alignment, an optional garbage collector name, an
 opening curly brace, a list of basic blocks, and a closing curly brace.
 
 LLVM function declarations consist of the "declare" keyword, an
@@ -712,7 +712,7 @@
 calling convention, a return type, an optional
 parameter attribute for the return type, a function 
 name, a possibly empty list of arguments, an optional alignment, and an 
optional
-garbage collector name.
+garbage collector name.
 
 A function definition contains a list of basic blocks, forming the CFG for
 the function.  Each basic block may optionally start with a label (giving the


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


Re: [llvm-commits] [llvm] r44769 - in /llvm/trunk: bindings/ocaml/llvm/ docs/ include/llvm-c/ include/llvm/ include/llvm/Bitcode/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/Transforms/

2007-12-09 Thread Gordon Henriksen
On 2007-12-09, at 22:25, Nick Lewycky wrote:

> Gordon Henriksen wrote:
>
>> +optional alignment, an optional garbage collector  
>> name, an
>
> You mean 

Yes.

>> +garbage collector name.
>
> Again.

Yes.

>> +  Garbage Collector Names
>
> Again.

No.

Thanks for catching that. Fixed.

— Gordon


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


[llvm-commits] [support] r44771 - in /support/trunk/lib: Support/ Support/Makefile System/ System/Makefile

2007-12-09 Thread Reid Spencer
Author: reid
Date: Sun Dec  9 21:27:41 2007
New Revision: 44771

URL: http://llvm.org/viewvc/llvm-project?rev=44771&view=rev
Log:
Update with fresh copies.

Added:
support/trunk/lib/Support/
  - copied from r44703, llvm/trunk/lib/Support/
support/trunk/lib/System/
  - copied from r44703, llvm/trunk/lib/System/
Removed:
support/trunk/lib/Support/Makefile
support/trunk/lib/System/Makefile

Removed: support/trunk/lib/Support/Makefile
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Makefile?rev=44703&view=auto

==
--- support/trunk/lib/Support/Makefile (original)
+++ support/trunk/lib/Support/Makefile (removed)
@@ -1,17 +0,0 @@
-##===- lib/Support/Makefile *- Makefile 
-*-===##
-# 
-# The LLVM Compiler Infrastructure
-#
-# This file was developed by the LLVM research group and is distributed under
-# the University of Illinois Open Source License. See LICENSE.TXT for details.
-# 
-##===--===##
-
-LEVEL = ../..
-LIBRARYNAME = LLVMSupport
-BUILD_ARCHIVE = 1
-
-## FIXME: This only requires RTTI because tblgen uses it.  Fix that.
-REQUIRES_RTTI = 1
-
-include $(LEVEL)/Makefile.common

Removed: support/trunk/lib/System/Makefile
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Makefile?rev=44703&view=auto

==
--- support/trunk/lib/System/Makefile (original)
+++ support/trunk/lib/System/Makefile (removed)
@@ -1,19 +0,0 @@
-##===- lib/System/Makefile -*- Makefile 
-*-===##
-# 
-# The LLVM Compiler Infrastructure
-#
-# This file was developed by Reid Spencer and is distributed under the 
-# University of Illinois Open Source License. See LICENSE.TXT for details.
-# 
-##===--===##
-
-LEVEL = ../..
-LIBRARYNAME = LLVMSystem
-BUILD_ARCHIVE = 1
-
-EXTRA_DIST = Unix Win32 README.txt
-
-include $(LEVEL)/Makefile.common
-
-CompileCommonOpts := $(filter-out -pedantic,$(CompileCommonOpts))
-CompileCommonOpts := $(filter-out -Wno-long-long,$(CompileCommonOpts))


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


[llvm-commits] [llvm] r44775 - in /llvm/trunk: include/llvm/Support/StringPool.h lib/VMCore/Function.cpp

2007-12-09 Thread Gordon Henriksen
Author: gordon
Date: Sun Dec  9 21:35:18 2007
New Revision: 44775

URL: http://llvm.org/viewvc/llvm-project?rev=44775&view=rev
Log:
Delete the CollectorNamePool if it should become empty.

Modified:
llvm/trunk/include/llvm/Support/StringPool.h
llvm/trunk/lib/VMCore/Function.cpp

Modified: llvm/trunk/include/llvm/Support/StringPool.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/StringPool.h?rev=44775&r1=44774&r2=44775&view=diff

==
--- llvm/trunk/include/llvm/Support/StringPool.h (original)
+++ llvm/trunk/include/llvm/Support/StringPool.h Sun Dec  9 21:35:18 2007
@@ -70,6 +70,10 @@
 /// reference-counted pointer to it. No additional memory is allocated if
 /// the string already exists in the pool.
 inline PooledStringPtr intern(const char *Str);
+
+/// empty - Checks whether the pool is empty. Returns true if so.
+/// 
+inline bool empty() const { return InternTable.empty(); }
   };
   
   /// PooledStringPtr - A pointer to an interned string. Use operator bool to

Modified: llvm/trunk/lib/VMCore/Function.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Function.cpp?rev=44775&r1=44774&r2=44775&view=diff

==
--- llvm/trunk/lib/VMCore/Function.cpp (original)
+++ llvm/trunk/lib/VMCore/Function.cpp Sun Dec  9 21:35:18 2007
@@ -414,6 +414,10 @@
 if (CollectorNames->empty()) {
   delete CollectorNames;
   CollectorNames = 0;
+  if (CollectorNamePool->empty()) {
+delete CollectorNamePool;
+CollectorNamePool = 0;
+  }
 }
   }
 }


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


[llvm-commits] Another GC patch for review

2007-12-09 Thread Gordon Henriksen
Here's the next patch. This jiggers around the GC data structures, but the compiler still doesn't call into them, so they're inert.gc-6-redux.patch (+424 -295):  include/llvm/CodeGen/Passes.h (+18)  include/llvm/CodeGen/Collector.h (+43 -43)  include/llvm/CodeGen/CollectorMetadata.h (+30 -31)  include/llvm/CodeGen/Collectors.h (+3)  lib/CodeGen/Collector.cpp (+125 -80)  lib/CodeGen/CollectorMetadata.cpp (+61 -31)  docs/GarbageCollection.html (+144 -110)CollectorMetadata and Collector are rejiggered to get along with per-function collector model. Collector is now the factory for CollectorMetadata, so the latter may be subclassed.— Gordon

gc-6-redux.patch
Description: Binary data
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] [llvm] r44785 - in /llvm/trunk: lib/CodeGen/BranchFolding.cpp test/CodeGen/X86/2007-06-14-branchfold.ll

2007-12-09 Thread Christopher Lamb
Author: clamb
Date: Mon Dec 10 01:24:06 2007
New Revision: 44785

URL: http://llvm.org/viewvc/llvm-project?rev=44785&view=rev
Log:
Improve branch folding by recgonizing that explict successor relationships 
impact the value of fall-through choices.

Modified:
llvm/trunk/lib/CodeGen/BranchFolding.cpp
llvm/trunk/test/CodeGen/X86/2007-06-14-branchfold.ll

Modified: llvm/trunk/lib/CodeGen/BranchFolding.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/BranchFolding.cpp?rev=44785&r1=44784&r2=44785&view=diff

==
--- llvm/trunk/lib/CodeGen/BranchFolding.cpp (original)
+++ llvm/trunk/lib/CodeGen/BranchFolding.cpp Mon Dec 10 01:24:06 2007
@@ -775,6 +775,11 @@
   // optimize branches that branch to either a return block or an assert block
   // into a fallthrough to the return.
   if (MBB1->empty() || MBB2->empty()) return false;
+ 
+  // If there is a clear successor ordering we make sure that one block
+  // will fall through to the next
+  if (MBB1->isSuccessor(MBB2)) return true;
+  if (MBB2->isSuccessor(MBB1)) return false;
 
   MachineInstr *MBB1I = --MBB1->end();
   MachineInstr *MBB2I = --MBB2->end();

Modified: llvm/trunk/test/CodeGen/X86/2007-06-14-branchfold.ll
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2007-06-14-branchfold.ll?rev=44785&r1=44784&r2=44785&view=diff

==
--- llvm/trunk/test/CodeGen/X86/2007-06-14-branchfold.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2007-06-14-branchfold.ll Mon Dec 10 01:24:06 
2007
@@ -1,7 +1,5 @@
-; RUN: llvm-as < %s | llc -mcpu=i686 | grep jmp | count 1
+; RUN: llvm-as < %s | llc -mcpu=i686 | not grep jmp
 ; check that branch folding understands FP_REG_KILL is not a branch
-; the remaining jmp can be removed if we take advantage of knowing
-; abort does not return
 
 ; ModuleID = 'g.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"


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