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

2005-11-14 Thread Misha Brukman


Changes in directory llvm-www:

www-index.html updated: 1.124 -> 1.125
---
Log message:

Fix broken link to list of developers (it's now a CGI script, not static page)


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

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


Index: llvm-www/www-index.html
diff -u llvm-www/www-index.html:1.124 llvm-www/www-index.html:1.125
--- llvm-www/www-index.html:1.124   Tue Nov  8 14:30:03 2005
+++ llvm-www/www-index.html Mon Nov 14 11:58:57 2005
@@ -70,7 +70,7 @@
 href="http://www.uiuc.edu/";>University of Illinois, Urbana-Champaign.  
Since
 the first public release, LLVM has grown to include contributions from several
-other people!  We welcome external 
contributions, 
+other people!  We welcome external contributions, 
 so please send e-mail to
 mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED] if you are
 interested in contributing code to the LLVM infrastructure.



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


[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp

2005-11-14 Thread Chris Lattner


Changes in directory llvm/lib/Target/PowerPC:

PPCAsmPrinter.cpp updated: 1.106 -> 1.107
---
Log message:

Teach the PPC asmwriter to honor globals with explicit section requests.


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

 PPCAsmPrinter.cpp |   54 --
 1 files changed, 32 insertions(+), 22 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.106 
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.107
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.106 Thu Nov 10 15:59:25 2005
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp   Mon Nov 14 12:52:46 2005
@@ -43,9 +43,11 @@
 namespace {
   Statistic<> EmittedInsts("asm-printer", "Number of machine instrs printed");
 
-  struct PPCAsmPrinter : public AsmPrinter {
+  class PPCAsmPrinter : public AsmPrinter {
+std::string CurSection;
+  public:
 std::set FnStubs, GVStubs, LinkOnceStubs;
-
+
 PPCAsmPrinter(std::ostream &O, TargetMachine &TM)
   : AsmPrinter(O, TM), FunctionNumber(0) {}
 
@@ -61,6 +63,25 @@
   return static_cast(TM);
 }
 
+/// SwitchSection - Switch to the specified section of the executable if we
+/// are not already in it!
+///
+void SwitchSection(const char *NewSection, const GlobalValue *GV) {
+  std::string NS;
+  
+  if (GV && GV->hasSection())
+NS = ".section " + GV->getSection();
+  else
+NS = NewSection;
+  
+  
+  if (CurSection != NS) {
+CurSection = NS;
+if (!CurSection.empty())
+  O << "\t" << CurSection << "\n";
+  }
+}
+
 unsigned enumRegToMachineReg(unsigned enumReg) {
   switch (enumReg) {
   default: assert(0 && "Unhandled register!"); break;
@@ -227,18 +248,6 @@
   };
 } // end of anonymous namespace
 
-// SwitchSection - Switch to the specified section of the executable if we are
-// not already in it!
-//
-static void SwitchSection(std::ostream &OS, std::string &CurSection,
-  const char *NewSection) {
-  if (CurSection != NewSection) {
-CurSection = NewSection;
-if (!CurSection.empty())
-  OS << "\t" << NewSection << "\n";
-  }
-}
-
 /// createDarwinAsmPrinterPass - Returns a pass that prints the PPC assembly
 /// code for a MachineFunction to the given output stream, in a format that the
 /// Darwin assembler can deal with.
@@ -387,9 +396,10 @@
   printConstantPool(MF.getConstantPool());
 
   // Print out labels for the function.
-  O << "\t.text\n";
+  const Function *F = MF.getFunction();
+  SwitchSection(".text", F);
   emitAlignment(4);
-  if (!MF.getFunction()->hasInternalLinkage())
+  if (!F->hasInternalLinkage())
 O << "\t.globl\t" << CurrentFnName << "\n";
   O << CurrentFnName << ":\n";
 
@@ -444,6 +454,7 @@
 bool DarwinAsmPrinter::doInitialization(Module &M) {
   if (TM.getSubtarget().isGigaProcessor())
 O << "\t.machine ppc970\n";
+  SwitchSection("", 0);
   AsmPrinter::doInitialization(M);
   
   // Darwin wants symbols to be quoted if they have complex names.
@@ -453,7 +464,6 @@
 
 bool DarwinAsmPrinter::doFinalization(Module &M) {
   const TargetData &TD = TM.getTargetData();
-  std::string CurSection;
 
   // Print out module-level global variables here.
   for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); 
I != E; ++I)
@@ -467,7 +477,7 @@
   if (C->isNullValue() && /* FIXME: Verify correct */
   (I->hasInternalLinkage() || I->hasWeakLinkage() ||
I->hasLinkOnceLinkage())) {
-SwitchSection(O, CurSection, ".data");
+SwitchSection(".data", I);
 if (Size == 0) Size = 1;   // .comm Foo, 0 is undefined, avoid it.
 if (I->hasInternalLinkage())
   O << ".lcomm " << name << "," << Size << "," << Align;
@@ -495,10 +505,10 @@
   O << "\t.globl " << name << "\n";
   // FALL THROUGH
 case GlobalValue::InternalLinkage:
-  SwitchSection(O, CurSection, ".data");
+  SwitchSection(".data", I);
   break;
-case GlobalValue::GhostLinkage:
-  std::cerr << "Error: unmaterialized (GhostLinkage) function in asm!";
+default:
+  std::cerr << "Unknown linkage type!";
   abort();
 }
 
@@ -649,8 +659,8 @@
 }
 
 bool AIXAsmPrinter::doInitialization(Module &M) {
+  SwitchSection("", 0);
   const TargetData &TD = TM.getTargetData();
-  std::string CurSection;
 
   O << "\t.machine \"ppc64\"\n"
 << "\t.toc\n"



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


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

2005-11-14 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.14 -> 1.15
---
Log message:

Teach emitAlignment to handle explicit alignment requests by globals.


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

 AsmPrinter.h |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.14 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.15
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.14 Thu Nov 10 12:05:57 2005
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Mon Nov 14 12:59:42 2005
@@ -137,8 +137,9 @@
 
 /// emitAlignment - Emit an alignment directive to the specified power of
 /// two boundary.  For example, if you pass in 3 here, you will get an 8
-/// byte alignment.
-void emitAlignment(unsigned NumBits) const;
+/// byte alignment.  If a global value is specified, and if that global has
+/// an explicit alignment requested, it will override the alignment 
request.
+void emitAlignment(unsigned NumBits, const GlobalValue *GV = 0) const;
 
 /// emitZeros - Emit a block of zeros.
 ///



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


[llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp

2005-11-14 Thread Chris Lattner


Changes in directory llvm/lib/CodeGen:

AsmPrinter.cpp updated: 1.23 -> 1.24
---
Log message:

Teach emitAlignment to handle explicit alignment requests by globals.


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

 AsmPrinter.cpp |4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)


Index: llvm/lib/CodeGen/AsmPrinter.cpp
diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.23 
llvm/lib/CodeGen/AsmPrinter.cpp:1.24
--- llvm/lib/CodeGen/AsmPrinter.cpp:1.23Thu Nov 10 12:36:17 2005
+++ llvm/lib/CodeGen/AsmPrinter.cpp Mon Nov 14 13:00:06 2005
@@ -35,7 +35,9 @@
 }
 
 // emitAlignment - Emit an alignment directive to the specified power of two.
-void AsmPrinter::emitAlignment(unsigned NumBits) const {
+void AsmPrinter::emitAlignment(unsigned NumBits, const GlobalValue *GV) const {
+  if (GV && GV->getAlignment())
+NumBits = Log2_32(GV->getAlignment());
   if (NumBits == 0) return;   // No need to emit alignment.
   if (AlignmentIsInBytes) NumBits = 1 << NumBits;
   O << AlignDirective << NumBits << "\n";



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


[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp

2005-11-14 Thread Chris Lattner


Changes in directory llvm/lib/Target/PowerPC:

PPCAsmPrinter.cpp updated: 1.107 -> 1.108
---
Log message:

Handle globals with explicit alignment requests


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

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


Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.107 
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.108
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.107 Mon Nov 14 12:52:46 2005
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp   Mon Nov 14 13:00:30 2005
@@ -74,7 +74,6 @@
   else
 NS = NewSection;
   
-  
   if (CurSection != NS) {
 CurSection = NS;
 if (!CurSection.empty())
@@ -398,7 +397,7 @@
   // Print out labels for the function.
   const Function *F = MF.getFunction();
   SwitchSection(".text", F);
-  emitAlignment(4);
+  emitAlignment(4, F);
   if (!F->hasInternalLinkage())
 O << "\t.globl\t" << CurrentFnName << "\n";
   O << CurrentFnName << ":\n";
@@ -466,7 +465,8 @@
   const TargetData &TD = TM.getTargetData();
 
   // Print out module-level global variables here.
-  for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); 
I != E; ++I)
+  for (Module::const_global_iterator I = M.global_begin(), E = M.global_end();
+   I != E; ++I)
 if (I->hasInitializer()) {   // External global require no code
   O << '\n';
   std::string name = Mang->getValueName(I);
@@ -512,7 +512,7 @@
   abort();
 }
 
-emitAlignment(Align);
+emitAlignment(Align, I);
 O << name << ":\t\t\t\t; '" << I->getName() << "'\n";
 emitGlobalConstant(C);
   }



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


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

2005-11-14 Thread Andrew Lenharth


Changes in directory llvm/docs:

CommandLine.html updated: 1.38 -> 1.39
---
Log message:

this file moved

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

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


Index: llvm/docs/CommandLine.html
diff -u llvm/docs/CommandLine.html:1.38 llvm/docs/CommandLine.html:1.39
--- llvm/docs/CommandLine.html:1.38 Fri Aug 26 04:25:54 2005
+++ llvm/docs/CommandLine.html  Mon Nov 14 13:32:05 2005
@@ -195,7 +195,7 @@
 program:
 
 
-  #include "Support/CommandLine.h"
+  #include "llvm/Support/CommandLine.h"
 
 
 Additionally, you need to add this as the first line of your main
@@ -1900,7 +1900,7 @@
 
   mailto:[EMAIL PROTECTED]">Chris Lattner
   http://llvm.cs.uiuc.edu";>LLVM Compiler Infrastructure
-  Last modified: $Date: 2005/08/26 09:25:54 $
+  Last modified: $Date: 2005/11/14 19:32:05 $
 
 
 



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


[llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp

2005-11-14 Thread Chris Lattner


Changes in directory llvm/lib/CodeGen:

AsmPrinter.cpp updated: 1.24 -> 1.25
---
Log message:

Remove extraneous parents around constants when using a constant expr cast.


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

 AsmPrinter.cpp |2 --
 1 files changed, 2 deletions(-)


Index: llvm/lib/CodeGen/AsmPrinter.cpp
diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.24 
llvm/lib/CodeGen/AsmPrinter.cpp:1.25
--- llvm/lib/CodeGen/AsmPrinter.cpp:1.24Mon Nov 14 13:00:06 2005
+++ llvm/lib/CodeGen/AsmPrinter.cpp Mon Nov 14 18:03:16 2005
@@ -118,9 +118,7 @@
   || (((TD.getTypeSize(Ty) >= TD.getTypeSize(OpTy))
&& OpTy->isLosslesslyConvertibleTo(Ty
  && "FIXME: Don't yet support this kind of constant cast expr");
-  O << "(";
   emitConstantValueOnly(Op);
-  O << ")";
   break;
 }
 case Instruction::Add:



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


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

2005-11-14 Thread Chris Lattner


Changes in directory llvm/lib/VMCore:

Mangler.cpp updated: 1.25 -> 1.26
---
Log message:

Fix handling of multiple unnamed globals with the same type


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

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


Index: llvm/lib/VMCore/Mangler.cpp
diff -u llvm/lib/VMCore/Mangler.cpp:1.25 llvm/lib/VMCore/Mangler.cpp:1.26
--- llvm/lib/VMCore/Mangler.cpp:1.25Thu Nov 10 17:24:26 2005
+++ llvm/lib/VMCore/Mangler.cpp Mon Nov 14 19:32:03 2005
@@ -132,6 +132,11 @@
   // - Otherwise, mangling occurs if global collides with existing name.
   if (isa(GV) && cast(GV)->getIntrinsicID()) {
 Name = GV->getName(); // Is an intrinsic function
+  } else if (!GV->hasName()) {
+// Must mangle the global into a unique ID.
+unsigned TypeUniqueID = getTypeID(GV->getType());
+static unsigned GlobalID = 0;
+Name = "__unnamed_" + utostr(TypeUniqueID) + "_" + utostr(GlobalID++);
   } else if (!MangledGlobals.count(GV)) {
 Name = makeNameProper(GV->getName(), Prefix);
   } else {
@@ -144,10 +149,8 @@
 
 void Mangler::InsertName(GlobalValue *GV,
  std::map &Names) {
-  if (!GV->hasName()) {   // We must mangle unnamed globals.
-MangledGlobals.insert(GV);
+  if (!GV->hasName())   // We must mangle unnamed globals.
 return;
-  }
 
   // Figure out if this is already used.
   GlobalValue *&ExistingValue = Names[GV->getName()];



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


[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp

2005-11-14 Thread Chris Lattner


Changes in directory llvm/lib/Target/PowerPC:

PPCAsmPrinter.cpp updated: 1.108 -> 1.109
---
Log message:

Make sure to use SwitchSection to switch sections so that we don't accidentally 
emit
functions into the .const section.  Whoops.


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

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


Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.108 
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.109
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.108 Mon Nov 14 13:00:30 2005
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp   Mon Nov 14 19:45:01 2005
@@ -437,7 +437,7 @@
   if (CP.empty()) return;
 
   for (unsigned i = 0, e = CP.size(); i != e; ++i) {
-O << "\t.const\n";
+SwitchSection(".const", 0);
 // FIXME: force doubles to be naturally aligned.  We should handle this
 // more correctly in the future.
 if (Type::DoubleTy == CP[i]->getType())
@@ -487,6 +487,7 @@
   } else {
 switch (I->getLinkage()) {
 case GlobalValue::LinkOnceLinkage:
+  SwitchSection("", 0);
   O << ".section __TEXT,__textcoal_nt,coalesced,no_toc\n"
 << ".weak_definition " << name << '\n'
 << ".private_extern " << name << '\n'
@@ -649,7 +650,7 @@
   if (CP.empty()) return;
 
   for (unsigned i = 0, e = CP.size(); i != e; ++i) {
-O << "\t.const\n";
+SwitchSection(".const", 0);
 O << "\t.align " << (unsigned)TD.getTypeAlignment(CP[i]->getType())
   << "\n";
 O << "LCPI" << FunctionNumber << '_' << i << ":\t\t\t\t\t;"



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


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

2005-11-14 Thread Chris Lattner


Changes in directory llvm/docs:

LangRef.html updated: 1.118 -> 1.119
---
Log message:

Fix some typos noticed by Gabor Greif!


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

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


Index: llvm/docs/LangRef.html
diff -u llvm/docs/LangRef.html:1.118 llvm/docs/LangRef.html:1.119
--- llvm/docs/LangRef.html:1.118Fri Nov 11 18:45:07 2005
+++ llvm/docs/LangRef.html  Tue Nov 15 00:07:55 2005
@@ -2799,7 +2799,7 @@
 code to simulators and other tools.  The method is target specific, but it is 
 expected that the marker will use exported symbols to transmit the PC of the 
marker.
 The marker makes no guarantees that it will remain with any specific 
instruction 
-after optimizations.  It is possible that the presense of a marker will 
inhibit 
+after optimizations.  It is possible that the presence of a marker will 
inhibit 
 optimizations.  The intended use is to be inserted after optmizations to allow
 correlations of simulation runs.
 
@@ -3429,7 +3429,7 @@
 
   mailto:[EMAIL PROTECTED]">Chris Lattner
   http://llvm.cs.uiuc.edu";>The LLVM Compiler Infrastructure
-  Last modified: $Date: 2005/11/12 00:45:07 $
+  Last modified: $Date: 2005/11/15 06:07:55 $
 
 
 



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


[llvm-commits] CVS: llvm/utils/NightlyTest.gnuplot

2005-11-14 Thread Chris Lattner


Changes in directory llvm/utils:

NightlyTest.gnuplot updated: 1.14 -> 1.15
---
Log message:

remove these labels, there are now bigger jumps in the graph that are unlabeled


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

 NightlyTest.gnuplot |9 -
 1 files changed, 9 deletions(-)


Index: llvm/utils/NightlyTest.gnuplot
diff -u llvm/utils/NightlyTest.gnuplot:1.14 llvm/utils/NightlyTest.gnuplot:1.15
--- llvm/utils/NightlyTest.gnuplot:1.14 Fri Oct 28 11:35:18 2005
+++ llvm/utils/NightlyTest.gnuplot  Tue Nov 15 00:44:15 2005
@@ -8,15 +8,6 @@
 set timefmt "%Y-%m-%d-%H:%M:%S:"
 set format x "%b %d, %Y"
 
-## Various labels for the graph
-set label "Reoptimizer\n checkins" at "2003-02-18:", 114000
-set label "Modulo Sched\n   checkin" at "2003-03-28:", 119500
-set label "Reoptimizer\n checkins" at "2003-06-01:", 134000
-set label "'dummy'\nfunction" at "2003-07-20:", 15
-set label "Reoptimizer\n removal" at "2003-08-10:", 132000
-set label "llvm-db\ncheckin" at "2004-01-04:", 145000
-set label "llvm/projects" at "2004-01-04:", 151000
-
 set size .75,.75
 set xtics rotate
 set xlabel 0,-1



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