Re: [llvm-commits] [llvm] r40453 - /llvm/trunk/lib/VMCore/Verifier.cpp

2007-07-24 Thread Duncan Sands
> +Assert(!Attrs->paramHasAttr(0, ParamAttr::InReg),
> +   "Attribute SRet should not apply to functions!");

I think you mean InReg in the second line.

Ciao,

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


[llvm-commits] [llvm-gcc-4.0] r40463 - /llvm-gcc-4.0/trunk/gcc/c-typeck.c

2007-07-24 Thread Duncan Sands
Author: baldrick
Date: Tue Jul 24 04:30:28 2007
New Revision: 40463

URL: http://llvm.org/viewvc/llvm-project?rev=40463&view=rev
Log:
Silence a warning.

Modified:
llvm-gcc-4.0/trunk/gcc/c-typeck.c

Modified: llvm-gcc-4.0/trunk/gcc/c-typeck.c
URL: 
http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/c-typeck.c?rev=40463&r1=40462&r2=40463&view=diff

==
--- llvm-gcc-4.0/trunk/gcc/c-typeck.c (original)
+++ llvm-gcc-4.0/trunk/gcc/c-typeck.c Tue Jul 24 04:30:28 2007
@@ -2925,7 +2925,7 @@
  return build_binary_op (PLUS_EXPR, TREE_OPERAND (arg, 0),
  TREE_OPERAND (arg, 1), 1);
}
-#endif ENABLE_LLVM
+#endif
   /* APPLE LOCAL end LLVM */
 
   /* Anything not already handled and not a true memory reference


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


[llvm-commits] [llvm] r40464 - /llvm/trunk/lib/VMCore/Verifier.cpp

2007-07-24 Thread Reid Spencer
Author: reid
Date: Tue Jul 24 09:35:44 2007
New Revision: 40464

URL: http://llvm.org/viewvc/llvm-project?rev=40464&view=rev
Log:
Make output match actual condition tested. Thanks, Duncan.

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

Modified: llvm/trunk/lib/VMCore/Verifier.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=40464&r1=40463&r2=40464&view=diff

==
--- llvm/trunk/lib/VMCore/Verifier.cpp (original)
+++ llvm/trunk/lib/VMCore/Verifier.cpp Tue Jul 24 09:35:44 2007
@@ -367,7 +367,7 @@
 Assert1(!Attrs->paramHasAttr(0, ParamAttr::StructRet),
 "Attribute SRet should not apply to functions!", &F);
 Assert1(!Attrs->paramHasAttr(0, ParamAttr::InReg),
-"Attribute SRet should not apply to functions!", &F);
+"Attribute InReg should not apply to functions!", &F);
 
 for (FunctionType::param_iterator I = FT->param_begin(), 
  E = FT->param_end(); I != E; ++I, ++Idx) {


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


[llvm-commits] [llvm-gcc-4.2] r40467 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

2007-07-24 Thread Duncan Sands
Author: baldrick
Date: Tue Jul 24 12:35:25 2007
New Revision: 40467

URL: http://llvm.org/viewvc/llvm-project?rev=40467&view=rev
Log:
Make sure the terminator terminates the basic block.

Modified:
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

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

==
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Tue Jul 24 12:35:25 2007
@@ -4698,6 +4698,7 @@
Intrinsic::eh_return),
  Offset, Handler);
   Result = Builder.CreateUnreachable();
+  EmitBlock(new BasicBlock(""));
 
   return true;
 }


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


[llvm-commits] [llvm-gcc-4.0] r40468 - /llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp

2007-07-24 Thread Duncan Sands
Author: baldrick
Date: Tue Jul 24 12:38:48 2007
New Revision: 40468

URL: http://llvm.org/viewvc/llvm-project?rev=40468&view=rev
Log:
Make sure the terminator terminates the basic block.

Modified:
llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp

Modified: llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp?rev=40468&r1=40467&r2=40468&view=diff

==
--- llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp Tue Jul 24 12:38:48 2007
@@ -4679,6 +4679,7 @@
Intrinsic::eh_return),
  Offset, Handler);
   Result = Builder.CreateUnreachable();
+  EmitBlock(new BasicBlock(""));
 
   return true;
 }


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


[llvm-commits] [llvm] r40469 - in /llvm/trunk: include/llvm/LinkAllPasses.h include/llvm/Transforms/Scalar.h lib/Transforms/Scalar/GVN.cpp test/Transforms/GVN/ test/Transforms/GVN/basic.ll test/Transf

2007-07-24 Thread Owen Anderson
Author: resistor
Date: Tue Jul 24 12:55:58 2007
New Revision: 40469

URL: http://llvm.org/viewvc/llvm-project?rev=40469&view=rev
Log:
Add a GVN pass, using the value numbering code I developed for GVNPRE and the
load elimination code from RedundantLoadElimination.

Added:
llvm/trunk/lib/Transforms/Scalar/GVN.cpp
llvm/trunk/test/Transforms/GVN/
llvm/trunk/test/Transforms/GVN/basic.ll
llvm/trunk/test/Transforms/GVN/dg.exp
llvm/trunk/test/Transforms/GVN/mixed.ll
Modified:
llvm/trunk/include/llvm/LinkAllPasses.h
llvm/trunk/include/llvm/Transforms/Scalar.h

Modified: llvm/trunk/include/llvm/LinkAllPasses.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/LinkAllPasses.h?rev=40469&r1=40468&r2=40469&view=diff

==
--- llvm/trunk/include/llvm/LinkAllPasses.h (original)
+++ llvm/trunk/include/llvm/LinkAllPasses.h Tue Jul 24 12:55:58 2007
@@ -114,6 +114,7 @@
   (void) llvm::createInstCountPass();
   (void) llvm::createPredicateSimplifierPass();
   (void) llvm::createCodeGenPreparePass();
+  (void) llvm::createGVNPass();
 
   (void)new llvm::IntervalPartition();
   (void)new llvm::FindUsedTypes();

Modified: llvm/trunk/include/llvm/Transforms/Scalar.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Scalar.h?rev=40469&r1=40468&r2=40469&view=diff

==
--- llvm/trunk/include/llvm/Transforms/Scalar.h (original)
+++ llvm/trunk/include/llvm/Transforms/Scalar.h Tue Jul 24 12:55:58 2007
@@ -339,6 +339,13 @@
 
 
//===--===//
 //
+// GVN - This pass performs global value numbering and redundant load 
+// elimination cotemporaneously.
+//
+FunctionPass *createGVNPass();
+
+//===--===//
+//
 // CodeGenPrepare - This pass prepares a function for instruction selection.
 //
 FunctionPass *createCodeGenPreparePass(const TargetLowering *TLI = 0);

Added: llvm/trunk/lib/Transforms/Scalar/GVN.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=40469&view=auto

==
--- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (added)
+++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Tue Jul 24 12:55:58 2007
@@ -0,0 +1,816 @@
+//===- GVN.cpp - Eliminate redundant values and loads ===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file was developed by the Owen Anderson and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+//
+//===--===//
+//
+// This pass performs global value numbering to eliminate fully redundant
+// instructions.  It also performs simple dead load elimination.
+//
+//===--===//
+
+#define DEBUG_TYPE "gvn"
+#include "llvm/Value.h"
+#include "llvm/Transforms/Scalar.h"
+#include "llvm/Instructions.h"
+#include "llvm/Function.h"
+#include "llvm/DerivedTypes.h"
+#include "llvm/Analysis/Dominators.h"
+#include "llvm/ADT/BitVector.h"
+#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/DepthFirstIterator.h"
+#include "llvm/ADT/SmallPtrSet.h"
+#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/Statistic.h"
+#include "llvm/Analysis/MemoryDependenceAnalysis.h"
+#include "llvm/Support/CFG.h"
+#include "llvm/Support/Compiler.h"
+using namespace llvm;
+
+//===--===//
+// ValueTable Class
+//===--===//
+
+/// This class holds the mapping between values and value numbers.  It is used
+/// as an efficient mechanism to determine the expression-wise equivalence of
+/// two values.
+namespace {
+  struct VISIBILITY_HIDDEN Expression {
+enum ExpressionOpcode { ADD, SUB, MUL, UDIV, SDIV, FDIV, UREM, SREM, 
+FREM, SHL, LSHR, ASHR, AND, OR, XOR, ICMPEQ, 
+ICMPNE, ICMPUGT, ICMPUGE, ICMPULT, ICMPULE, 
+ICMPSGT, ICMPSGE, ICMPSLT, ICMPSLE, FCMPOEQ, 
+FCMPOGT, FCMPOGE, FCMPOLT, FCMPOLE, FCMPONE, 
+FCMPORD, FCMPUNO, FCMPUEQ, FCMPUGT, FCMPUGE, 
+FCMPULT, FCMPULE, FCMPUNE, EXTRACT, INSERT,
+SHUFFLE, SELECT, TRUNC, ZEXT, SEXT, FPTOUI,
+FPTOSI, UITOFP, SITOFP, FPTRUNC, FPEXT, 
+PTRTOINT, INTTOPTR, BITCAST, GEP, EMPTY,
+TOMBSTONE };
+
+ExpressionOpcode opcode;
+const Type* type;
+uint32_t firstVN;
+uint32

[llvm-commits] [llvm] r40472 - /llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp

2007-07-24 Thread Anton Korobeynikov
Author: asl
Date: Tue Jul 24 16:07:39 2007
New Revision: 40472

URL: http://llvm.org/viewvc/llvm-project?rev=40472&view=rev
Log:
Heal EH handling stuff by emitting correct offsets to callee-saved registers.

Pretty hackish, but code itself is dirty mess, so we won't make anything worse. 
:)

Modified:
llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp

Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp?rev=40472&r1=40471&r2=40472&view=diff

==
--- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Tue Jul 24 16:07:39 2007
@@ -1297,9 +1297,21 @@
 
 // Add callee saved registers to move list.
 const std::vector &CSI = MFI->getCalleeSavedInfo();
-for (unsigned I = 0, E = CSI.size(); I != E; ++I) {
+
+// FIXME: This is dirty hack. The code itself is pretty mess right now.
+// It should be rewritten from scratch and generalized sometimes.
+
+// Determine maximum offset (minumum due to stack growth)
+int64_t MaxOffset = 0;
+for (unsigned I = 0, E = CSI.size(); I!=E; ++I)
+  MaxOffset = std::min(MaxOffset,
+   MFI->getObjectOffset(CSI[I].getFrameIdx()));
+
+// Calculate offsets
+for (unsigned I = 0, E = CSI.size(); I!=E; ++I) {
   int64_t Offset = MFI->getObjectOffset(CSI[I].getFrameIdx());
   unsigned Reg = CSI[I].getReg();
+  Offset = (MaxOffset-Offset+3*stackGrowth);
   MachineLocation CSDst(MachineLocation::VirtualFP, Offset);
   MachineLocation CSSrc(Reg);
   Moves.push_back(MachineMove(FrameLabelId, CSDst, CSSrc));


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


[llvm-commits] [poolalloc] r40473 - /poolalloc/branches/SVA/lib/DSA/Local.cpp

2007-07-24 Thread Andrew Lenharth
Author: alenhar2
Date: Tue Jul 24 16:26:20 2007
New Revision: 40473

URL: http://llvm.org/viewvc/llvm-project?rev=40473&view=rev
Log:
last of llva functions, I hope

Modified:
poolalloc/branches/SVA/lib/DSA/Local.cpp

Modified: poolalloc/branches/SVA/lib/DSA/Local.cpp
URL: 
http://llvm.org/viewvc/llvm-project/poolalloc/branches/SVA/lib/DSA/Local.cpp?rev=40473&r1=40472&r2=40473&view=diff

==
--- poolalloc/branches/SVA/lib/DSA/Local.cpp (original)
+++ poolalloc/branches/SVA/lib/DSA/Local.cpp Tue Jul 24 16:26:20 2007
@@ -50,6 +50,7 @@
 static cl::opt
 CrashAt("dsa-crashat", cl::Hidden,
  cl::desc("Crash on unknowns"));
+static bool DebugUnknown = false;
 static int CrashCur = 0;
 DSNode *DSNode::setUnknownNodeMarker() { 
   if (Crash && CrashCur == CrashAt) assert(0); 
@@ -1124,14 +1125,81 @@
 N->setReadMarker();
 return true;
 #ifdef LLVA_KERNEL
-//TODO: 
-//state.c:
-//llva_ipush_function0,1,3 llva_push_function1 llva_push_syscall
-//llva_set_integer_stackp, llva_load_integer 
-//llva_load_stackp
-//llva_load_invoke llva_save_invoke llva_icontext_save_retvalue
-//llva_get_icontext_stackp llva_set_icontext_stackp
-//llva_iset_privileged
+  } else if (F->getName() == "llva_print_icontext") {
+DSNodeHandle RetNH = getValueDest(**(CS.arg_begin()));
+RetNH.getNode()->setReadMarker();
+return true;
+  } else if (F->getName() == "llva_ipush_function0" ||
+ F->getName() == "llva_ipush_function1" ||
+ F->getName() == "llva_ipush_function3" ||
+ F->getName() == "llva_push_function1") {
+DSNodeHandle RetNH = getValueDest(**(CS.arg_begin()));
+DSNodeHandle FP = getValueDest(**(CS.arg_begin() + 1));
+
RetNH.getNode()->setModifiedMarker()->setReadMarker()->foldNodeCompletely();
+RetNH.addEdgeTo(FP);
+return true;
+  } else if (F->getName() == "llva_push_syscall" ) {
+DSNodeHandle RetNH = getValueDest(**(CS.arg_begin() + 1));
+DSNodeHandle FP = getValueDest(**(CS.arg_begin() + 2));
+
RetNH.getNode()->setModifiedMarker()->setReadMarker()->foldNodeCompletely();
+RetNH.addEdgeTo(FP);
+return true;
+  } else if (F->getName() == "llva_config_ldt" ||
+ F->getName() == "llva_mm_flush_tlb" ||
+ F->getName() == "llva_register_syscall_cleaner") {
+return true;
+  } else if (F->getName() == "llva_iset_privileged") {
+DSNodeHandle RetNH = getValueDest(**(CS.arg_begin()));
+RetNH.getNode()->setModifiedMarker();
+return true;
+  } else if (F->getName() == "llva_load_invoke") {
+Value* GV = F->getParent()->getNamedGlobal("llva.invoke");
+DSNodeHandle Dest = getValueDest(*GV);
+Dest.getNode()->setModifiedMarker();
+Dest.getNode()->mergeTypeInfo((*CS.arg_begin())->getType(), 
Dest.getOffset());
+Dest.addEdgeTo(getValueDest(**CS.arg_begin()));
+return true;
+  } else if (F->getName() == "llva_save_invoke") {
+Value* GV = F->getParent()->getNamedGlobal("llva.invoke");
+DSNodeHandle Ptr = getValueDest(*GV);
+if (Ptr.isNull())
+  Ptr = createNode();
+Ptr.getNode()->setReadMarker();
+Ptr.getNode()->mergeTypeInfo(CS.getInstruction()->getType(), 
Ptr.getOffset(), false);
+setDestTo(*CS.getInstruction(), getLink(Ptr));
+return true;
+  } else if (F->getName() == "llva_mm_load_pgtable") {
+  Value* GV = F->getParent()->getNamedGlobal("llva.pgtable");
+  DSNodeHandle Dest = getValueDest(*GV);
+  Dest.getNode()->setModifiedMarker();
+  Dest.getNode()->mergeTypeInfo((*CS.arg_begin())->getType(), 
Dest.getOffset());
+  Dest.addEdgeTo(getValueDest(**CS.arg_begin()));
+  return true;
+  } else if (F->getName() == "llva_mm_save_pgtable") {
+Value* GV = F->getParent()->getNamedGlobal("llva.pgtable");
+DSNodeHandle Ptr = getValueDest(*GV);
+if (Ptr.isNull())
+  Ptr = createNode();
+Ptr.getNode()->setReadMarker();
+Ptr.getNode()->mergeTypeInfo(CS.getInstruction()->getType(), 
Ptr.getOffset(), false);
+setDestTo(*CS.getInstruction(), getLink(Ptr));
+return true;
+  } else if (F->getName() == "llva_load_kstackp") {
+  Value* GV = F->getParent()->getNamedGlobal("llva.kstackp");
+  DSNodeHandle Dest = getValueDest(*GV);
+  Dest.getNode()->setModifiedMarker();
+  Dest.getNode()->mergeTypeInfo((*CS.arg_begin())->getType(), 
Dest.getOffset());
+  Dest.addEdgeTo(getValueDest(**CS.arg_begin()));
+  return true;
+  } else if (F->getName() == "llva_save_kstackp") {
+Value* GV = F->getParent()->getNamedGlobal("llva.kstackp");
+DSNodeHandle Ptr = getValueDest(*GV);
+if (Ptr.isNull())
+  Ptr = createNode();
+Ptr.getNode()->setReadMarker();
+Ptr.getNode()->mergeTypeInfo(CS.getInstruction()->getType(), 
Ptr.getOffset(), false);
+setDestTo(*CS.getInstruction(), getLink(Ptr));
+return true;
   } else if (F->getName() == "llva_icontext_save_retvalue") 

[llvm-commits] [llvm] r40474 - /llvm/trunk/lib/Support/SmallPtrSet.cpp

2007-07-24 Thread Owen Anderson
Author: resistor
Date: Tue Jul 24 16:31:23 2007
New Revision: 40474

URL: http://llvm.org/viewvc/llvm-project?rev=40474&view=rev
Log:
Make the copy constructor of SmallPtrSet much faster.

Modified:
llvm/trunk/lib/Support/SmallPtrSet.cpp

Modified: llvm/trunk/lib/Support/SmallPtrSet.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/SmallPtrSet.cpp?rev=40474&r1=40473&r2=40474&view=diff

==
--- llvm/trunk/lib/Support/SmallPtrSet.cpp (original)
+++ llvm/trunk/lib/Support/SmallPtrSet.cpp Tue Jul 24 16:31:23 2007
@@ -149,33 +149,23 @@
 }
 
 SmallPtrSetImpl::SmallPtrSetImpl(const SmallPtrSetImpl& that) {
-  NumElements = that.NumElements;
-  NumTombstones = 0;
+  // If we're becoming small, prepare to insert into our stack space
   if (that.isSmall()) {
-CurArraySize = that.CurArraySize;
 CurArray = &SmallArray[0];
-// Copy the entire contents of the array, including the -1's and the null
-// terminator.
-memcpy(CurArray, that.CurArray, sizeof(void*)*(CurArraySize+1));
+  // Otherwise, allocate new heap space (unless we were the same size)
   } else {
-CurArraySize = that.NumElements < 64 ? 128 : that.CurArraySize*2;
-CurArray = (void**)malloc(sizeof(void*) * (CurArraySize+1));
+CurArray = (void**)malloc(sizeof(void*) * (that.CurArraySize+1));
 assert(CurArray && "Failed to allocate memory?");
-memset(CurArray, -1, CurArraySize*sizeof(void*));
-
-// The end pointer, always valid, is set to a valid element to help the
-// iterator.
-CurArray[CurArraySize] = 0;
-
-// Copy over all valid entries.
-for (void **BucketPtr = that.CurArray, **E = 
that.CurArray+that.CurArraySize;
- BucketPtr != E; ++BucketPtr) {
-  // Copy over the element if it is valid.
-  void *Elt = *BucketPtr;
-  if (Elt != getTombstoneMarker() && Elt != getEmptyMarker())
-*const_cast(FindBucketFor(Elt)) = Elt;
-}
   }
+  
+  // Copy over the new array size
+  CurArraySize = that.CurArraySize;
+
+  // Copy over the contents from the other set
+  memcpy(CurArray, that.CurArray, sizeof(void*)*(CurArraySize+1));
+  
+  NumElements = that.NumElements;
+  NumTombstones = that.NumTombstones;
 }
 
 /// CopyFrom - implement operator= from a smallptrset that has the same pointer


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


[llvm-commits] [llvm] r40476 - in /llvm/trunk: include/llvm/Analysis/MemoryDependenceAnalysis.h lib/Analysis/MemoryDependenceAnalysis.cpp

2007-07-24 Thread Owen Anderson
Author: resistor
Date: Tue Jul 24 16:52:37 2007
New Revision: 40476

URL: http://llvm.org/viewvc/llvm-project?rev=40476&view=rev
Log:
Add initial support for non-local memory dependence analysis.
NOTE: This has only been cursorily tested.  Expected improvements soon.

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

Modified: llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h?rev=40476&r1=40475&r2=40476&view=diff

==
--- llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h (original)
+++ llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h Tue Jul 24 
16:52:37 2007
@@ -20,6 +20,7 @@
 #include "llvm/Pass.h"
 #include "llvm/Support/CallSite.h"
 #include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/Support/Compiler.h"
 #include 
 
@@ -37,6 +38,7 @@
   
 Instruction* getCallSiteDependency(CallSite C, Instruction* start,
bool local = true);
+SmallPtrSet nonLocalHelper(Instruction* query, 
BasicBlock* block);
   public:
 
 static Instruction* NonLocal;
@@ -63,7 +65,9 @@
 /// getDependency - Return the instruction on which a memory operation
 /// depends, starting with start.
 Instruction* getDependency(Instruction* query, Instruction* start = 0,
-   bool local = true);
+   BasicBlock* block = 0);
+
+SmallPtrSet getNonLocalDependency(Instruction* query);
 
 /// removeInstruction - Remove an instruction from the dependence analysis,
 /// updating the dependence of instructions that previously depended on it.

Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=40476&r1=40475&r2=40476&view=diff

==
--- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Tue Jul 24 16:52:37 
2007
@@ -19,6 +19,7 @@
 #include "llvm/Instructions.h"
 #include "llvm/Function.h"
 #include "llvm/Analysis/AliasAnalysis.h"
+#include "llvm/Support/CFG.h"
 #include "llvm/Target/TargetData.h"
 
 using namespace llvm;
@@ -26,7 +27,7 @@
 char MemoryDependenceAnalysis::ID = 0;
   
 Instruction* MemoryDependenceAnalysis::NonLocal = (Instruction*)0;
-Instruction* MemoryDependenceAnalysis::None = (Instruction*)~0;
+Instruction* MemoryDependenceAnalysis::None = (Instruction*)(~0 - 1);
   
 // Register this pass...
 static RegisterPass X("memdep",
@@ -100,15 +101,60 @@
   return NonLocal;
 }
 
+SmallPtrSet 
MemoryDependenceAnalysis::nonLocalHelper(Instruction* query,
+  
BasicBlock* block) {
+  SmallPtrSet ret;
+  
+  Instruction* localDep = getDependency(query, block->end(), block);
+  if (localDep != NonLocal) {
+ret.insert(localDep);
+return ret;
+  }
+  
+  for (pred_iterator PI = pred_begin(block), PE = pred_end(block);
+   PI != PE; ++PI) {
+SmallPtrSet pred_deps = nonLocalHelper(query, *PI);
+for (SmallPtrSet::iterator I = pred_deps.begin(),
+ E = pred_deps.end(); I != E; ++I)
+  ret.insert(*I);
+  }
+  
+  if (ret.empty())
+ret.insert(None);
+  
+  return ret;
+}
+
+SmallPtrSet 
MemoryDependenceAnalysis::getNonLocalDependency(Instruction* query) {
+  SmallPtrSet ret;
+  
+  Instruction* localDep = getDependency(query);
+  if (localDep != NonLocal) {
+ret.insert(localDep);
+return ret;
+  }
+  
+  BasicBlock* parent = query->getParent();
+  for (pred_iterator PI = pred_begin(parent), PE = pred_end(parent);
+   PI != PE; ++PI) {
+SmallPtrSet pred_deps = nonLocalHelper(query, *PI);
+for (SmallPtrSet::iterator I = pred_deps.begin(),
+ E = pred_deps.end(); I != E; ++I)
+  ret.insert(*I);
+  }
+  
+  if (ret.empty())
+ret.insert(None);
+  
+  return ret;
+}
+
 /// getDependency - Return the instruction on which a memory operation
 /// depends.  The local paramter indicates if the query should only
 /// evaluate dependencies within the same basic block.
 Instruction* MemoryDependenceAnalysis::getDependency(Instruction* query,
  Instruction* start,
- bool local) {
-  if (!local)
-assert(0 && "Non-local memory dependence is not yet supported.");
-  
+ BasicBlock* block) {
   // Start looking for dependencies with the queried inst
   BasicBlock::iterator QI = query;
   
@@ -154,7 +200,8 @@
   else
 return None;
   
-  BasicBlock::iterator blockBegin = query->

Re: [llvm-commits] [llvm] r40474 - /llvm/trunk/lib/Support/SmallPtrSet.cpp

2007-07-24 Thread Reid Spencer
All,

It would help me out a lot if you'd merge changes to lib/Support,
lib/System, include/llvm/Support and include/llvm/System into the
"support" module. I've been doing these as they come up but I might miss
some. 

In the near future, the directories just mentioned will be moved out of
the "llvm" module and into the "support" module. The only thing needing
to be finished for this to happen is ensuring the makefile system in
support can be used by llvm. In the mean time, please use the "svn
merge" command to apply your changes to the support module as well.

Thanks,

Reid.

On Tue, 2007-07-24 at 21:31 +, Owen Anderson wrote:
> Author: resistor
> Date: Tue Jul 24 16:31:23 2007
> New Revision: 40474
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=40474&view=rev
> Log:
> Make the copy constructor of SmallPtrSet much faster.
> 
> Modified:
> llvm/trunk/lib/Support/SmallPtrSet.cpp
> 
> Modified: llvm/trunk/lib/Support/SmallPtrSet.cpp
> URL: 
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/SmallPtrSet.cpp?rev=40474&r1=40473&r2=40474&view=diff
> 
> ==
> --- llvm/trunk/lib/Support/SmallPtrSet.cpp (original)
> +++ llvm/trunk/lib/Support/SmallPtrSet.cpp Tue Jul 24 16:31:23 2007
> @@ -149,33 +149,23 @@
>  }
>  
>  SmallPtrSetImpl::SmallPtrSetImpl(const SmallPtrSetImpl& that) {
> -  NumElements = that.NumElements;
> -  NumTombstones = 0;
> +  // If we're becoming small, prepare to insert into our stack space
>if (that.isSmall()) {
> -CurArraySize = that.CurArraySize;
>  CurArray = &SmallArray[0];
> -// Copy the entire contents of the array, including the -1's and the null
> -// terminator.
> -memcpy(CurArray, that.CurArray, sizeof(void*)*(CurArraySize+1));
> +  // Otherwise, allocate new heap space (unless we were the same size)
>} else {
> -CurArraySize = that.NumElements < 64 ? 128 : that.CurArraySize*2;
> -CurArray = (void**)malloc(sizeof(void*) * (CurArraySize+1));
> +CurArray = (void**)malloc(sizeof(void*) * (that.CurArraySize+1));
>  assert(CurArray && "Failed to allocate memory?");
> -memset(CurArray, -1, CurArraySize*sizeof(void*));
> -
> -// The end pointer, always valid, is set to a valid element to help the
> -// iterator.
> -CurArray[CurArraySize] = 0;
> -
> -// Copy over all valid entries.
> -for (void **BucketPtr = that.CurArray, **E = 
> that.CurArray+that.CurArraySize;
> - BucketPtr != E; ++BucketPtr) {
> -  // Copy over the element if it is valid.
> -  void *Elt = *BucketPtr;
> -  if (Elt != getTombstoneMarker() && Elt != getEmptyMarker())
> -*const_cast(FindBucketFor(Elt)) = Elt;
> -}
>}
> +  
> +  // Copy over the new array size
> +  CurArraySize = that.CurArraySize;
> +
> +  // Copy over the contents from the other set
> +  memcpy(CurArray, that.CurArray, sizeof(void*)*(CurArraySize+1));
> +  
> +  NumElements = that.NumElements;
> +  NumTombstones = that.NumTombstones;
>  }
>  
>  /// CopyFrom - implement operator= from a smallptrset that has the same 
> pointer
> 
> 
> ___
> 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] [support] r40477 - /support/trunk/lib/Support/SmallPtrSet.cpp

2007-07-24 Thread Owen Anderson
Author: resistor
Date: Tue Jul 24 17:45:36 2007
New Revision: 40477

URL: http://llvm.org/viewvc/llvm-project?rev=40477&view=rev
Log:
Merge patch from mainline.

Modified:
support/trunk/lib/Support/SmallPtrSet.cpp

Modified: support/trunk/lib/Support/SmallPtrSet.cpp
URL: 
http://llvm.org/viewvc/llvm-project/support/trunk/lib/Support/SmallPtrSet.cpp?rev=40477&r1=40476&r2=40477&view=diff

==
--- support/trunk/lib/Support/SmallPtrSet.cpp (original)
+++ support/trunk/lib/Support/SmallPtrSet.cpp Tue Jul 24 17:45:36 2007
@@ -149,33 +149,23 @@
 }
 
 SmallPtrSetImpl::SmallPtrSetImpl(const SmallPtrSetImpl& that) {
-  NumElements = that.NumElements;
-  NumTombstones = 0;
+  // If we're becoming small, prepare to insert into our stack space
   if (that.isSmall()) {
-CurArraySize = that.CurArraySize;
 CurArray = &SmallArray[0];
-// Copy the entire contents of the array, including the -1's and the null
-// terminator.
-memcpy(CurArray, that.CurArray, sizeof(void*)*(CurArraySize+1));
+  // Otherwise, allocate new heap space (unless we were the same size)
   } else {
-CurArraySize = that.NumElements < 64 ? 128 : that.CurArraySize*2;
-CurArray = (void**)malloc(sizeof(void*) * (CurArraySize+1));
+CurArray = (void**)malloc(sizeof(void*) * (that.CurArraySize+1));
 assert(CurArray && "Failed to allocate memory?");
-memset(CurArray, -1, CurArraySize*sizeof(void*));
-
-// The end pointer, always valid, is set to a valid element to help the
-// iterator.
-CurArray[CurArraySize] = 0;
-
-// Copy over all valid entries.
-for (void **BucketPtr = that.CurArray, **E = 
that.CurArray+that.CurArraySize;
- BucketPtr != E; ++BucketPtr) {
-  // Copy over the element if it is valid.
-  void *Elt = *BucketPtr;
-  if (Elt != getTombstoneMarker() && Elt != getEmptyMarker())
-*const_cast(FindBucketFor(Elt)) = Elt;
-}
   }
+  
+  // Copy over the new array size
+  CurArraySize = that.CurArraySize;
+
+  // Copy over the contents from the other set
+  memcpy(CurArray, that.CurArray, sizeof(void*)*(CurArraySize+1));
+  
+  NumElements = that.NumElements;
+  NumTombstones = that.NumTombstones;
 }
 
 /// CopyFrom - implement operator= from a smallptrset that has the same pointer


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


[llvm-commits] [llvm] r40478 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/v4f32-immediate.ll

2007-07-24 Thread Dan Gohman
Author: djg
Date: Tue Jul 24 17:55:08 2007
New Revision: 40478

URL: http://llvm.org/viewvc/llvm-project?rev=40478&view=rev
Log:
Use movaps to load a v4f32 build_vector of all-constant values into a
register instead of loading each element individually.

Added:
llvm/trunk/test/CodeGen/X86/v4f32-immediate.ll
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp

Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=40478&r1=40477&r2=40478&view=diff

==
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Jul 24 17:55:08 2007
@@ -2495,6 +2495,7 @@
   unsigned NumZero  = 0;
   unsigned NumNonZero = 0;
   unsigned NonZeros = 0;
+  unsigned NumNonZeroImms = 0;
   std::set Values;
   for (unsigned i = 0; i < NumElems; ++i) {
 SDOperand Elt = Op.getOperand(i);
@@ -2505,6 +2506,9 @@
   else {
 NonZeros |= (1 << i);
 NumNonZero++;
+if (Elt.getOpcode() == ISD::Constant ||
+Elt.getOpcode() == ISD::ConstantFP)
+  NumNonZeroImms++;
   }
 }
   }
@@ -2548,6 +2552,11 @@
 }
   }
 
+  // A vector full of immediates; various special cases are already
+  // handled, so this is best done with a single constant-pool load.
+  if (NumNonZero == NumNonZeroImms)
+return SDOperand();
+
   // Let legalizer expand 2-wide build_vectors.
   if (EVTBits == 64)
 return SDOperand();

Added: llvm/trunk/test/CodeGen/X86/v4f32-immediate.ll
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/v4f32-immediate.ll?rev=40478&view=auto

==
--- llvm/trunk/test/CodeGen/X86/v4f32-immediate.ll (added)
+++ llvm/trunk/test/CodeGen/X86/v4f32-immediate.ll Tue Jul 24 17:55:08 2007
@@ -0,0 +1,5 @@
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse | grep movaps
+
+define <4 x float> @foo() {
+  ret <4 x float> 
+}


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


[llvm-commits] [llvm] r40479 - /llvm/trunk/utils/TableGen/DAGISelEmitter.cpp

2007-07-24 Thread Dan Gohman
Author: djg
Date: Tue Jul 24 17:58:00 2007
New Revision: 40479

URL: http://llvm.org/viewvc/llvm-project?rev=40479&view=rev
Log:
A minor simplication in the generated code.

Modified:
llvm/trunk/utils/TableGen/DAGISelEmitter.cpp

Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=40479&r1=40478&r2=40479&view=diff

==
--- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Tue Jul 24 17:58:00 2007
@@ -2875,7 +2875,7 @@
 std::string NodeName;
 if (!isRoot) {
   NodeName = "Tmp" + utostr(ResNo);
-  Code2 = "SDOperand " + NodeName + " = SDOperand(";
+  Code2 = "SDOperand " + NodeName + "(";
 } else {
   NodeName = "ResNode";
   if (!ResNodeDecled) {
@@ -2991,7 +2991,7 @@
 bool NeedReplace = false;
 if (NodeHasOutFlag) {
   if (!InFlagDecled) {
-emitCode("SDOperand InFlag = SDOperand(ResNode, " + 
+emitCode("SDOperand InFlag(ResNode, " + 
  utostr(NumResults + (unsigned)NodeHasChain) + ");");
 InFlagDecled = true;
   } else


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


[llvm-commits] [llvm] r40480 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGISel.h lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp lib/Target/X86/X86ISelDAGToDAG.cpp

2007-07-24 Thread Dan Gohman
Author: djg
Date: Tue Jul 24 18:00:27 2007
New Revision: 40480

URL: http://llvm.org/viewvc/llvm-project?rev=40480&view=rev
Log:
Add const to CanBeFoldedBy, CheckAndMask, and CheckOrMask.

Modified:
llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp

Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h?rev=40480&r1=40479&r2=40480&view=diff

==
--- llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h Tue Jul 24 18:00:27 2007
@@ -74,7 +74,9 @@
 
   /// CanBeFoldedBy - Returns true if the specific operand node N of U can be
   /// folded during instruction selection that starts at Root?
-  virtual bool CanBeFoldedBy(SDNode *N, SDNode *U, SDNode *Root) { return 
true;}
+  virtual bool CanBeFoldedBy(SDNode *N, SDNode *U, SDNode *Root) const {
+return true;
+  }
   
   /// CreateTargetHazardRecognizer - Return a newly allocated hazard recognizer
   /// to use for this target when scheduling the DAG.
@@ -164,8 +166,10 @@
  SelectionDAG &DAG);
 
   // Calls to these predicates are generated by tblgen.
-  bool CheckAndMask(SDOperand LHS, ConstantSDNode *RHS, int64_t DesiredMaskS); 
 
-  bool CheckOrMask(SDOperand LHS, ConstantSDNode *RHS, int64_t DesiredMaskS);  
+  bool CheckAndMask(SDOperand LHS, ConstantSDNode *RHS,
+int64_t DesiredMaskS) const;
+  bool CheckOrMask(SDOperand LHS, ConstantSDNode *RHS,
+int64_t DesiredMaskS) const;
   
 private:
   void SelectBasicBlock(BasicBlock *BB, MachineFunction &MF,

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

==
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Jul 24 
18:00:27 2007
@@ -4799,7 +4799,7 @@
 /// actual value in the DAG on the RHS of an AND, and DesiredMaskS is the value
 /// specified in the .td file (e.g. 255).
 bool SelectionDAGISel::CheckAndMask(SDOperand LHS, ConstantSDNode *RHS, 
-int64_t DesiredMaskS) {
+int64_t DesiredMaskS) const {
   uint64_t ActualMask = RHS->getValue();
   uint64_t DesiredMask =DesiredMaskS & 
MVT::getIntVTBitMask(LHS.getValueType());
   
@@ -4828,7 +4828,7 @@
 /// actual value in the DAG on the RHS of an OR, and DesiredMaskS is the value
 /// specified in the .td file (e.g. 255).
 bool SelectionDAGISel::CheckOrMask(SDOperand LHS, ConstantSDNode *RHS, 
-int64_t DesiredMaskS) {
+int64_t DesiredMaskS) const {
   uint64_t ActualMask = RHS->getValue();
   uint64_t DesiredMask =DesiredMaskS & 
MVT::getIntVTBitMask(LHS.getValueType());
   

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

==
--- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Tue Jul 24 18:00:27 2007
@@ -132,7 +132,7 @@
 
 virtual void EmitFunctionEntryCode(Function &Fn, MachineFunction &MF);
 
-virtual bool CanBeFoldedBy(SDNode *N, SDNode *U, SDNode *Root);
+virtual bool CanBeFoldedBy(SDNode *N, SDNode *U, SDNode *Root) const;
 
 // Include the pieces autogenerated from the target description.
 #include "X86GenDAGISel.inc"
@@ -272,7 +272,7 @@
 }
 
 
-bool X86DAGToDAGISel::CanBeFoldedBy(SDNode *N, SDNode *U, SDNode *Root) {
+bool X86DAGToDAGISel::CanBeFoldedBy(SDNode *N, SDNode *U, SDNode *Root) const {
   if (FastISel) return false;
 
   // If U use can somehow reach N through another path then U can't fold N or


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


[llvm-commits] [llvm] r40481 - in /llvm/trunk/lib: CodeGen/DwarfWriter.cpp Target/X86/X86TargetAsmInfo.cpp

2007-07-24 Thread Anton Korobeynikov
Author: asl
Date: Tue Jul 24 19:06:28 2007
New Revision: 40481

URL: http://llvm.org/viewvc/llvm-project?rev=40481&view=rev
Log:
Minor cleanup:
 - Split EH and debug infiormation
 - Make DwarfWriter more verbose in some cases

Modified:
llvm/trunk/lib/CodeGen/DwarfWriter.cpp
llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp

Modified: llvm/trunk/lib/CodeGen/DwarfWriter.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/DwarfWriter.cpp?rev=40481&r1=40480&r2=40481&view=diff

==
--- llvm/trunk/lib/CodeGen/DwarfWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/DwarfWriter.cpp Tue Jul 24 19:06:28 2007
@@ -1041,7 +1041,7 @@
   Asm->EOL("Offset");
 } else if (Reg < 64) {
   Asm->EmitInt8(DW_CFA_offset + Reg);
-  Asm->EOL("DW_CFA_offset + Reg");
+  Asm->EOL("DW_CFA_offset + Reg (" + utostr(Reg) + ")");
   Asm->EmitULEB128Bytes(Offset);
   Asm->EOL("Offset");
 } else {

Modified: llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp?rev=40481&r1=40480&r2=40481&view=diff

==
--- llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp Tue Jul 24 19:06:28 2007
@@ -110,8 +110,9 @@
 
 // Set up DWARF directives
 HasLEB128 = true;  // Target asm supports leb128 directives (little-endian)
+
+// Debug Information
 AbsoluteDebugSectionOffsets = true;
-AbsoluteEHSectionOffsets = false;
 SupportsDebugInformation = true;
 DwarfAbbrevSection =  "\t.section\t.debug_abbrev,\"\",@progbits";
 DwarfInfoSection ="\t.section\t.debug_info,\"\",@progbits";
@@ -125,8 +126,10 @@
 DwarfRangesSection =  "\t.section\t.debug_ranges,\"\",@progbits";
 DwarfMacInfoSection = "\t.section\t.debug_macinfo,\"\",@progbits";
 
+// Exceptions handling
 if (!Subtarget->is64Bit())
   SupportsExceptionHandling = true;
+AbsoluteEHSectionOffsets = false;
 DwarfEHFrameSection = "\t.section\t.eh_frame,\"aw\",@progbits";
 DwarfExceptionSection = "\t.section\t.gcc_except_table,\"a\",@progbits";
 break;


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


[llvm-commits] [llvm] r40483 - in /llvm/trunk/lib/Target/PowerPC: PPCAsmPrinter.cpp PPCTargetAsmInfo.cpp

2007-07-24 Thread Nick Lewycky
Author: nicholas
Date: Tue Jul 24 22:48:45 2007
New Revision: 40483

URL: http://llvm.org/viewvc/llvm-project?rev=40483&view=rev
Log:
Fix debug info and globals filled with zeros.

Modified:
llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp
llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp

Modified: llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp?rev=40483&r1=40482&r2=40483&view=diff

==
--- llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp Tue Jul 24 22:48:45 2007
@@ -668,8 +668,8 @@
   if (I->hasExternalLinkage()) {
 O << "\t.global " << name << '\n';
 O << "\t.type " << name << ", @object\n";
-//O << "\t.zerofill __DATA, __common, " << name << ", "
-//  << Size << ", " << Align;
+O << name << ":\n";
+O << "\t.zero " << Size << "\n";
   } else if (I->hasInternalLinkage()) {
 SwitchToDataSection("\t.data", I);
 O << TAI->getLCOMMDirective() << name << "," << Size;

Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp?rev=40483&r1=40482&r2=40483&view=diff

==
--- llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp Tue Jul 24 22:48:45 2007
@@ -30,17 +30,6 @@
   
   NeedsSet = true;
   AddressSize = isPPC64 ? 8 : 4;
-  DwarfAbbrevSection = ".section __DWARF,__debug_abbrev,regular,debug";
-  DwarfInfoSection = ".section __DWARF,__debug_info,regular,debug";
-  DwarfLineSection = ".section __DWARF,__debug_line,regular,debug";
-  DwarfFrameSection = ".section __DWARF,__debug_frame,regular,debug";
-  DwarfPubNamesSection = ".section __DWARF,__debug_pubnames,regular,debug";
-  DwarfPubTypesSection = ".section __DWARF,__debug_pubtypes,regular,debug";
-  DwarfStrSection = ".section __DWARF,__debug_str,regular,debug";
-  DwarfLocSection = ".section __DWARF,__debug_loc,regular,debug";
-  DwarfARangesSection = ".section __DWARF,__debug_aranges,regular,debug";
-  DwarfRangesSection = ".section __DWARF,__debug_ranges,regular,debug";
-  DwarfMacInfoSection = ".section __DWARF,__debug_macinfo,regular,debug";
   DwarfEHFrameSection =
   ".section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support";
   DwarfExceptionSection = ".section __DATA,__gcc_except_tab";
@@ -71,6 +60,18 @@
   WeakRefDirective = "\t.weak_reference\t";
   HiddenDirective = "\t.private_extern\t";
   SupportsExceptionHandling = true;
+
+  DwarfAbbrevSection = ".section __DWARF,__debug_abbrev,regular,debug";
+  DwarfInfoSection = ".section __DWARF,__debug_info,regular,debug";
+  DwarfLineSection = ".section __DWARF,__debug_line,regular,debug";
+  DwarfFrameSection = ".section __DWARF,__debug_frame,regular,debug";
+  DwarfPubNamesSection = ".section __DWARF,__debug_pubnames,regular,debug";
+  DwarfPubTypesSection = ".section __DWARF,__debug_pubtypes,regular,debug";
+  DwarfStrSection = ".section __DWARF,__debug_str,regular,debug";
+  DwarfLocSection = ".section __DWARF,__debug_loc,regular,debug";
+  DwarfARangesSection = ".section __DWARF,__debug_aranges,regular,debug";
+  DwarfRangesSection = ".section __DWARF,__debug_ranges,regular,debug";
+  DwarfMacInfoSection = ".section __DWARF,__debug_macinfo,regular,debug";
   
   // In non-PIC modes, emit a special label before jump tables so that the
   // linker can perform more accurate dead code stripping.
@@ -93,4 +94,16 @@
   StaticDtorsSection = ".section\t.dtors,\"aw\",@progbits";
   UsedDirective = "\t# .no_dead_strip\t";
   WeakRefDirective = "\t.weak\t";
+
+  DwarfAbbrevSection =  "\t.section\t.debug_abbrev,\"\",@progbits";
+  DwarfInfoSection ="\t.section\t.debug_info,\"\",@progbits";
+  DwarfLineSection ="\t.section\t.debug_line,\"\",@progbits";
+  DwarfFrameSection =   "\t.section\t.debug_frame,\"\",@progbits";
+  DwarfPubNamesSection ="\t.section\t.debug_pubnames,\"\",@progbits";
+  DwarfPubTypesSection ="\t.section\t.debug_pubtypes,\"\",@progbits";
+  DwarfStrSection = "\t.section\t.debug_str,\"\",@progbits";
+  DwarfLocSection = "\t.section\t.debug_loc,\"\",@progbits";
+  DwarfARangesSection = "\t.section\t.debug_aranges,\"\",@progbits";
+  DwarfRangesSection =  "\t.section\t.debug_ranges,\"\",@progbits";
+  DwarfMacInfoSection = "\t.section\t.debug_macinfo,\"\",@progbits";
 }


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


[llvm-commits] [llvm] r40484 - /llvm/trunk/docs/HowToReleaseLLVM.html

2007-07-24 Thread Chris Lattner
Author: lattner
Date: Wed Jul 25 01:15:23 2007
New Revision: 40484

URL: http://llvm.org/viewvc/llvm-project?rev=40484&view=rev
Log:
test commit

Modified:
llvm/trunk/docs/HowToReleaseLLVM.html

Modified: llvm/trunk/docs/HowToReleaseLLVM.html
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/HowToReleaseLLVM.html?rev=40484&r1=40483&r2=40484&view=diff

==
--- llvm/trunk/docs/HowToReleaseLLVM.html (original)
+++ llvm/trunk/docs/HowToReleaseLLVM.html Wed Jul 25 01:15:23 2007
@@ -438,7 +438,7 @@
 that has the name of the release (LLVM-M.m in our current
 case). This is the directory that will get tar'd. It contains all the
 software that needs to be in the distribution. During the copying
-process, it omits generated files, CVS directories, and any other
+process, it omits generated files, SVN directories, and any other
 "cruft" that's in your build tree. This is done to eliminate the
 possibility of huge distribution tarballs that include useless or
 irrelevant stuff in them. This is the trickiest part of making the


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