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

2006-09-07 Thread Bill Wendling


Changes in directory llvm/docs:

CodeGenerator.html updated: 1.38 - 1.39
---
Log message:



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

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


Index: llvm/docs/CodeGenerator.html
diff -u llvm/docs/CodeGenerator.html:1.38 llvm/docs/CodeGenerator.html:1.39
--- llvm/docs/CodeGenerator.html:1.38   Thu Sep  7 03:36:28 2006
+++ llvm/docs/CodeGenerator.htmlThu Sep  7 03:39:35 2006
@@ -1169,7 +1169,7 @@
 pLive Intervals are the ranges (intervals) where a variable is ilive/i.
 They are used by some a href=#regallocregister allocator/a passes to
 determine if two or more virtual registers which require the same physical
-register are live at the same point in the program (i.e., theyconflict).  When
+register are live at the same point in the program (i.e., they conflict).  When
 this situation occurs, one virtual register must be ispilled/i./p
 
 /div
@@ -1702,7 +1702,7 @@
 
   a href=mailto:[EMAIL PROTECTED]Chris Lattner/abr
   a href=http://llvm.org;The LLVM Compiler Infrastructure/abr
-  Last modified: $Date: 2006/09/07 08:36:28 $
+  Last modified: $Date: 2006/09/07 08:39:35 $
 /address
 
 /body



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


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

2006-09-07 Thread Bill Wendling


Changes in directory llvm/docs:

CodeGenerator.html updated: 1.37 - 1.38
---
Log message:

Fixed my rotten Engrish grammar.


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

 CodeGenerator.html |   14 +++---
 1 files changed, 7 insertions(+), 7 deletions(-)


Index: llvm/docs/CodeGenerator.html
diff -u llvm/docs/CodeGenerator.html:1.37 llvm/docs/CodeGenerator.html:1.38
--- llvm/docs/CodeGenerator.html:1.37   Wed Sep  6 13:42:41 2006
+++ llvm/docs/CodeGenerator.htmlThu Sep  7 03:36:28 2006
@@ -1168,9 +1168,9 @@
 
 pLive Intervals are the ranges (intervals) where a variable is ilive/i.
 They are used by some a href=#regallocregister allocator/a passes to
-determine if two or more virtual registers which require the same register are
-live at the same point in the program (conflict).  When this situation occurs,
-one virtual register must be ispilled/i./p
+determine if two or more virtual registers which require the same physical
+register are live at the same point in the program (i.e., theyconflict).  When
+this situation occurs, one virtual register must be ispilled/i./p
 
 /div
 
@@ -1186,10 +1186,10 @@
 instruction (i.e., the instruction calculates the value, but it is
 never used) and the set of registers that are used by the instruction,
 but are never used after the instruction (i.e., they are killed). Live
-variable information is computed for each ivirtual/i and
+variable information is computed for each ivirtual/i register and
 iregister allocatable/i physical register in the function.  This
 is done in a very efficient manner because it uses SSA to sparsely
-computer lifetime information for virtual registers (which are in SSA
+compute lifetime information for virtual registers (which are in SSA
 form) and only has to track physical registers within a block.  Before
 register allocation, LLVM can assume that physical registers are only
 live within a single basic block.  This allows it to do a single,
@@ -1200,7 +1200,7 @@
 pPhysical registers may be live in to or out of a function. Live in values
 are typically arguments in registers. Live out values are typically return
 values in registers. Live in values are marked as such, and are given a dummy
-defining instruction during live interval analysis. If the last basic block
+defining instruction during live intervals analysis. If the last basic block
 of a function is a ttreturn/tt, then it's marked as using all live out
 values in the function./p
 
@@ -1702,7 +1702,7 @@
 
   a href=mailto:[EMAIL PROTECTED]Chris Lattner/abr
   a href=http://llvm.org;The LLVM Compiler Infrastructure/abr
-  Last modified: $Date: 2006/09/06 18:42:41 $
+  Last modified: $Date: 2006/09/07 08:36:28 $
 /address
 
 /body



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


[llvm-commits] CVS: llvm/lib/Target/X86/X86AsmPrinter.cpp X86Subtarget.h X86Subtarget.cpp

2006-09-07 Thread Jim Laskey


Changes in directory llvm/lib/Target/X86:

X86AsmPrinter.cpp updated: 1.193 - 1.194
X86Subtarget.h updated: 1.13 - 1.14
X86Subtarget.cpp updated: 1.28 - 1.29
---
Log message:

Make the x86 asm flavor part of the subtarget info.


---
Diffs of the changes:  (+34 -24)

 X86AsmPrinter.cpp |   29 ++---
 X86Subtarget.cpp  |   16 
 X86Subtarget.h|   13 -
 3 files changed, 34 insertions(+), 24 deletions(-)


Index: llvm/lib/Target/X86/X86AsmPrinter.cpp
diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.193 
llvm/lib/Target/X86/X86AsmPrinter.cpp:1.194
--- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.193 Wed Sep  6 13:34:40 2006
+++ llvm/lib/Target/X86/X86AsmPrinter.cpp   Thu Sep  7 07:23:47 2006
@@ -23,28 +23,11 @@
 #include llvm/Type.h
 #include llvm/Assembly/Writer.h
 #include llvm/Support/Mangler.h
-#include llvm/Support/CommandLine.h
 using namespace llvm;
 
-enum AsmWriterFlavorTy { att, intel };
-
 Statistic llvm::EmittedInsts(asm-printer,
Number of machine instrs printed);
 
-cl::optAsmWriterFlavorTy
-AsmWriterFlavor(x86-asm-syntax,
-cl::desc(Choose style of code to emit from X86 backend:),
-cl::values(
-   clEnumVal(att, Emit ATT-style assembly),
-   clEnumVal(intel,   Emit Intel-style assembly),
-   clEnumValEnd),
-#ifdef _MSC_VER
-cl::init(intel)
-#else
-cl::init(att)
-#endif
-);
-
 X86TargetAsmInfo::X86TargetAsmInfo(X86TargetMachine TM) {
   const X86Subtarget *Subtarget = TM.getSubtargetX86Subtarget();
   
@@ -97,7 +80,7 @@
   default: break;
   }
   
-  if (AsmWriterFlavor == intel) {
+  if (Subtarget-isFlavorIntel()) {
 GlobalPrefix = _;
 CommentString = ;;
   
@@ -271,12 +254,12 @@
 ///
 FunctionPass *llvm::createX86CodePrinterPass(std::ostream o,
  X86TargetMachine tm) {
+  const X86Subtarget *Subtarget = tm.getSubtargetX86Subtarget();
   TargetAsmInfo *TAI = new X86TargetAsmInfo(tm);
 
-  switch (AsmWriterFlavor) {
-  default:
-assert(0  Unknown asm flavor!);
-  case intel: return new X86IntelAsmPrinter(o, tm, TAI);
-  case att: return new X86ATTAsmPrinter(o, tm, TAI);
+  if (Subtarget-isFlavorIntel()) {
+return new X86IntelAsmPrinter(o, tm, TAI);
+  } else {
+return new X86ATTAsmPrinter(o, tm, TAI);
   }
 }


Index: llvm/lib/Target/X86/X86Subtarget.h
diff -u llvm/lib/Target/X86/X86Subtarget.h:1.13 
llvm/lib/Target/X86/X86Subtarget.h:1.14
--- llvm/lib/Target/X86/X86Subtarget.h:1.13 Sun Sep  3 23:08:58 2006
+++ llvm/lib/Target/X86/X86Subtarget.h  Thu Sep  7 07:23:47 2006
@@ -22,6 +22,11 @@
 class Module;
 
 class X86Subtarget : public TargetSubtarget {
+public:
+  enum AsmWriterFlavorTy {
+att, intel
+  };
+
 protected:
   enum X86SSEEnum {
 NoMMXSSE, MMX, SSE1, SSE2, SSE3
@@ -31,12 +36,15 @@
 NoThreeDNow, ThreeDNow, ThreeDNowA
   };
 
+  /// AsmFlavor - Which x86 asm dialect to use.
+  AsmWriterFlavorTy AsmFlavor;
+
   /// X86SSELevel - MMX, SSE1, SSE2, SSE3, or none supported.
   X86SSEEnum X86SSELevel;
 
   /// X863DNowLevel - 3DNow or 3DNow Athlon, or none supported.
   X863DNowEnum X863DNowLevel;
-
+  
   /// Is64Bit - True if the processor supports Em64T.
   bool Is64Bit;
 
@@ -80,6 +88,9 @@
   bool hasSSE3() const { return X86SSELevel = SSE3; }
   bool has3DNow() const { return X863DNowLevel = ThreeDNow; }
   bool has3DNowA() const { return X863DNowLevel = ThreeDNowA; }
+  
+  bool isFlavorAtt() const { return AsmFlavor == att; }
+  bool isFlavorIntel() const { return AsmFlavor == intel; }
 
   bool isTargetDarwin() const { return TargetType == isDarwin; }
   bool isTargetELF() const { return TargetType == isELF; }


Index: llvm/lib/Target/X86/X86Subtarget.cpp
diff -u llvm/lib/Target/X86/X86Subtarget.cpp:1.28 
llvm/lib/Target/X86/X86Subtarget.cpp:1.29
--- llvm/lib/Target/X86/X86Subtarget.cpp:1.28   Fri Jun 16 16:58:49 2006
+++ llvm/lib/Target/X86/X86Subtarget.cppThu Sep  7 07:23:47 2006
@@ -13,9 +13,24 @@
 
 #include X86Subtarget.h
 #include llvm/Module.h
+#include llvm/Support/CommandLine.h
 #include X86GenSubtarget.inc
 using namespace llvm;
 
+cl::optX86Subtarget::AsmWriterFlavorTy
+AsmWriterFlavor(x86-asm-syntax,
+  cl::desc(Choose style of code to emit from X86 backend:),
+  cl::values(
+clEnumValN(X86Subtarget::att,   att, Emit ATT-style assembly),
+clEnumValN(X86Subtarget::intel, intel,   Emit Intel-style assembly),
+clEnumValEnd),
+#ifdef _MSC_VER
+  cl::init(X86Subtarget::intel)
+#else
+  cl::init(X86Subtarget::att)
+#endif
+);
+
 /// GetCpuIDAndInfo - Execute the specified cpuid and return the 4 values in 
the
 /// specified arguments.  If we can't run cpuid on the host, return true.
 static bool GetCpuIDAndInfo(unsigned value, unsigned *rEAX, unsigned *rEBX,
@@ -151,6 +166,7 @@
   MinRepStrSizeThreshold = 128;
   X86SSELevel 

[llvm-commits] CVS: llvm/test/Regression/CodeGen/ARM/select.ll

2006-09-07 Thread Chris Lattner


Changes in directory llvm/test/Regression/CodeGen/ARM:

select.ll updated: 1.5 - 1.6
---
Log message:

This fails


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

 select.ll |1 +
 1 files changed, 1 insertion(+)


Index: llvm/test/Regression/CodeGen/ARM/select.ll
diff -u llvm/test/Regression/CodeGen/ARM/select.ll:1.5 
llvm/test/Regression/CodeGen/ARM/select.ll:1.6
--- llvm/test/Regression/CodeGen/ARM/select.ll:1.5  Tue Aug 22 11:19:54 2006
+++ llvm/test/Regression/CodeGen/ARM/select.ll  Thu Sep  7 12:43:59 2006
@@ -1,4 +1,5 @@
 ; RUN: llvm-as  %s | llc -march=arm
+; XFAIL: *
 
 int %f(int %a) {
 entry:



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


[llvm-commits] CVS: llvm/include/llvm/Support/Mangler.h

2006-09-07 Thread Chris Lattner


Changes in directory llvm/include/llvm/Support:

Mangler.h updated: 1.21 - 1.22
---
Log message:

Add new option to leave asm names alone


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

 Mangler.h |8 
 1 files changed, 8 insertions(+)


Index: llvm/include/llvm/Support/Mangler.h
diff -u llvm/include/llvm/Support/Mangler.h:1.21 
llvm/include/llvm/Support/Mangler.h:1.22
--- llvm/include/llvm/Support/Mangler.h:1.21Wed Jul 26 11:18:00 2006
+++ llvm/include/llvm/Support/Mangler.h Thu Sep  7 13:20:41 2006
@@ -35,6 +35,10 @@
   /// the space character.  By default, this is false.
   bool UseQuotes;
   
+  /// PreserveAsmNames - If this is set, the asm escape character is not 
removed
+  /// from names with 'asm' specifiers. 
+  bool PreserveAsmNames;
+  
   /// Memo - This is used to remember the name that we assign a value.
   ///
   std::mapconst Value*, std::string Memo;
@@ -66,6 +70,10 @@
   /// strings for assembler labels.
   void setUseQuotes(bool Val) { UseQuotes = Val; }
   
+  /// setPreserveAsmNames - If the mangler should not strip off the asm name
+  /// identifier (\001), this should be set.
+  void setPreserveAsmNames(bool Val) { PreserveAsmNames = Val; }
+  
   /// Acceptable Characters - This allows the target to specify which 
characters
   /// are acceptable to the assembler without being mangled.  By default we
   /// allow letters, numbers, '_', '$', and '.', which is what GAS accepts.



___
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

2006-09-07 Thread Evan Cheng


Changes in directory llvm/lib/CodeGen:

AsmPrinter.cpp updated: 1.91 - 1.92
---
Log message:

Fix pasto that was breaking x86 tests.

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

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


Index: llvm/lib/CodeGen/AsmPrinter.cpp
diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.91 
llvm/lib/CodeGen/AsmPrinter.cpp:1.92
--- llvm/lib/CodeGen/AsmPrinter.cpp:1.91Wed Sep  6 13:34:40 2006
+++ llvm/lib/CodeGen/AsmPrinter.cpp Thu Sep  7 13:50:20 2006
@@ -132,10 +132,10 @@
 if (TAI-getFourByteConstantSection() 
 TM.getTargetData()-getTypeSize(Ty) == 4)
   FourByteCPs.push_back(std::make_pair(CPE, i));
-else if (TAI-getSectionEndDirectiveSuffix() 
+else if (TAI-getEightByteConstantSection() 
  TM.getTargetData()-getTypeSize(Ty) == 8)
   EightByteCPs.push_back(std::make_pair(CPE, i));
-else if (TAI-getSectionEndDirectiveSuffix() 
+else if (TAI-getSixteenByteConstantSection() 
  TM.getTargetData()-getTypeSize(Ty) == 16)
   SixteenByteCPs.push_back(std::make_pair(CPE, i));
 else



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


[llvm-commits] CVS: llvm/tools/bugpoint/Miscompilation.cpp

2006-09-07 Thread Chris Lattner


Changes in directory llvm/tools/bugpoint:

Miscompilation.cpp updated: 1.76 - 1.77
---
Log message:

Change DisambiguateGlobalSymbols to not rename asm globals, which breaks
bugpoint on leopard.


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

 Miscompilation.cpp |1 +
 1 files changed, 1 insertion(+)


Index: llvm/tools/bugpoint/Miscompilation.cpp
diff -u llvm/tools/bugpoint/Miscompilation.cpp:1.76 
llvm/tools/bugpoint/Miscompilation.cpp:1.77
--- llvm/tools/bugpoint/Miscompilation.cpp:1.76 Wed Aug 23 15:34:57 2006
+++ llvm/tools/bugpoint/Miscompilation.cpp  Thu Sep  7 13:21:07 2006
@@ -234,6 +234,7 @@
   Mangler Mang(*M);
   // Agree with the CBE on symbol naming
   Mang.markCharUnacceptable('.');
+  Mang.setPreserveAsmNames(true);
   for (Module::global_iterator I = M-global_begin(), E = M-global_end();
I != E; ++I)
 I-setName(Mang.getValueName(I));



___
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

2006-09-07 Thread Chris Lattner


Changes in directory llvm/lib/VMCore:

Mangler.cpp updated: 1.28 - 1.29
---
Log message:

Add new option to leave asm names alone


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

 Mangler.cpp |7 ++-
 1 files changed, 6 insertions(+), 1 deletion(-)


Index: llvm/lib/VMCore/Mangler.cpp
diff -u llvm/lib/VMCore/Mangler.cpp:1.28 llvm/lib/VMCore/Mangler.cpp:1.29
--- llvm/lib/VMCore/Mangler.cpp:1.28Wed Jun  7 18:03:13 2006
+++ llvm/lib/VMCore/Mangler.cpp Thu Sep  7 13:20:41 2006
@@ -33,6 +33,10 @@
   std::string Result;
   if (X.empty()) return X;  // Empty names are uniqued by the caller.
   
+  // If PreserveAsmNames is set, names with asm identifiers are not modified. 
+  if (PreserveAsmNames  X[0] == 1)
+return X;
+  
   if (!UseQuotes) {
 // If X does not start with (char)1, add the prefix.
 std::string::const_iterator I = X.begin();
@@ -174,7 +178,8 @@
 
 
 Mangler::Mangler(Module M, const char *prefix)
-  : Prefix(prefix), UseQuotes(false), Count(0), TypeCounter(0) {
+  : Prefix(prefix), UseQuotes(false), PreserveAsmNames(false),
+Count(0), TypeCounter(0) {
   std::fill(AcceptableChars, 
   AcceptableChars+sizeof(AcceptableChars)/sizeof(AcceptableChars[0]),
 0);



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


[llvm-commits] CVS: llvm/lib/Target/X86/X86InstrInfo.td

2006-09-07 Thread Evan Cheng


Changes in directory llvm/lib/Target/X86:

X86InstrInfo.td updated: 1.282 - 1.283
---
Log message:

Consistency.

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

 X86InstrInfo.td |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Target/X86/X86InstrInfo.td
diff -u llvm/lib/Target/X86/X86InstrInfo.td:1.282 
llvm/lib/Target/X86/X86InstrInfo.td:1.283
--- llvm/lib/Target/X86/X86InstrInfo.td:1.282   Fri Aug 11 04:03:33 2006
+++ llvm/lib/Target/X86/X86InstrInfo.td Thu Sep  7 14:03:48 2006
@@ -383,7 +383,7 @@
 Iopcode, RawFrm, ops, asm, pattern;
 
 // Indirect branches
-let isBarrier = 1 in
+let isBranch = 1, isBarrier = 1 in
   def JMP : IBr0xE9, (ops brtarget:$dst), jmp $dst, [(br bb:$dst)];
 
 let isBranch = 1, isTerminator = 1, noResults = 1, isBarrier = 1 in {



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


[llvm-commits] CVS: llvm/tools/lto/lto.cpp

2006-09-07 Thread Devang Patel


Changes in directory llvm/tools/lto:

lto.cpp updated: 1.12 - 1.13
---
Log message:

Use addPassesToEmitWholeFile() instead of addPassesToEmitFile()


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

 lto.cpp |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/tools/lto/lto.cpp
diff -u llvm/tools/lto/lto.cpp:1.12 llvm/tools/lto/lto.cpp:1.13
--- llvm/tools/lto/lto.cpp:1.12 Wed Sep  6 15:16:28 2006
+++ llvm/tools/lto/lto.cpp  Thu Sep  7 15:20:56 2006
@@ -282,7 +282,7 @@
   // Make sure everything is still good.
   Passes.add(createVerifierPass());
 
-  Target.addPassesToEmitFile(Passes, Out, TargetMachine::AssemblyFile, true);
+  Target.addPassesToEmitWholeFile(Passes, Out, TargetMachine::AssemblyFile, 
true);
 
   // Run our queue of passes all at once now, efficiently.
   Passes.run(*M);



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


[llvm-commits] CVS: llvm/tools/Makefile

2006-09-07 Thread Devang Patel


Changes in directory llvm/tools:

Makefile updated: 1.54 - 1.55
---
Log message:

Add lto into the list of PARALLEL_DIRS


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

 Makefile |3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


Index: llvm/tools/Makefile
diff -u llvm/tools/Makefile:1.54 llvm/tools/Makefile:1.55
--- llvm/tools/Makefile:1.54Tue Aug 22 19:12:11 2006
+++ llvm/tools/Makefile Thu Sep  7 15:21:58 2006
@@ -18,6 +18,7 @@
 bugpoint llvm-db llvm-extract \
  gccas llvm-bcanalyzer llvm-stub \
 gccld llvm2cpp \
- llvm-ld llvmc llvm-prof
+ llvm-ld llvmc llvm-prof \
+ lto
 
 include $(LEVEL)/Makefile.common



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


[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp X86InstrInfo.td

2006-09-07 Thread Chris Lattner


Changes in directory llvm/lib/Target/X86:

X86ISelLowering.cpp updated: 1.250 - 1.251
X86InstrInfo.td updated: 1.283 - 1.284
---
Log message:

Eliminate X86ISD::TEST, using X86ISD::CMP instead.  Match X86ISD::CMP patterns
using test, which provides nice simplifications like:

-   movl %edi, %ecx
-   andl $2, %ecx
-   cmpl $0, %ecx
+   testl $2, %edi
je LBB1_11  #cond_next90

There are a couple of dagiselemitter deficiencies that this exposes, they will
be handled later.



---
Diffs of the changes:  (+35 -29)

 X86ISelLowering.cpp |   14 +-
 X86InstrInfo.td |   50 ++
 2 files changed, 35 insertions(+), 29 deletions(-)


Index: llvm/lib/Target/X86/X86ISelLowering.cpp
diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.250 
llvm/lib/Target/X86/X86ISelLowering.cpp:1.251
--- llvm/lib/Target/X86/X86ISelLowering.cpp:1.250   Thu Aug 17 13:43:24 2006
+++ llvm/lib/Target/X86/X86ISelLowering.cpp Thu Sep  7 15:33:45 2006
@@ -2836,8 +2836,11 @@
   Tmp3 = DAG.getNode(isSRA ? ISD::SRA : ISD::SRL, MVT::i32, ShOpHi, ShAmt);
 }
 
-SDOperand InFlag = DAG.getNode(X86ISD::TEST, MVT::Flag,
-   ShAmt, DAG.getConstant(32, MVT::i8));
+SDOperand InFlag =
+  DAG.getNode(X86ISD::CMP, MVT::Flag,
+  DAG.getNode(ISD::AND, MVT::i8, 
+  ShAmt, DAG.getConstant(32, MVT::i8)),
+  DAG.getConstant(0, MVT::i8));
 
 SDOperand Hi, Lo;
 SDOperand CC = DAG.getConstant(X86ISD::COND_NE, MVT::i8);
@@ -3134,7 +3137,8 @@
 
   if (addTest) {
 CC = DAG.getConstant(X86ISD::COND_NE, MVT::i8);
-Cond = DAG.getNode(X86ISD::TEST, MVT::Flag, Op0, Op0);
+Cond = DAG.getNode(X86ISD::CMP, MVT::Flag, Op0,
+   DAG.getConstant(0, MVT::i8));
   }
 
   std::vectorMVT::ValueType Tys;
@@ -3190,7 +3194,8 @@
 
   if (addTest) {
 CC = DAG.getConstant(X86ISD::COND_NE, MVT::i8);
-Cond = DAG.getNode(X86ISD::TEST, MVT::Flag, Cond, Cond);
+Cond = DAG.getNode(X86ISD::CMP, MVT::Flag, Cond,
+   DAG.getConstant(0, MVT::i8));
   }
   return DAG.getNode(X86ISD::BRCOND, Op.getValueType(),
  Op.getOperand(0), Op.getOperand(2), CC, Cond);
@@ -3774,7 +3779,6 @@
   case X86ISD::TAILCALL:   return X86ISD::TAILCALL;
   case X86ISD::RDTSC_DAG:  return X86ISD::RDTSC_DAG;
   case X86ISD::CMP:return X86ISD::CMP;
-  case X86ISD::TEST:   return X86ISD::TEST;
   case X86ISD::COMI:   return X86ISD::COMI;
   case X86ISD::UCOMI:  return X86ISD::UCOMI;
   case X86ISD::SETCC:  return X86ISD::SETCC;


Index: llvm/lib/Target/X86/X86InstrInfo.td
diff -u llvm/lib/Target/X86/X86InstrInfo.td:1.283 
llvm/lib/Target/X86/X86InstrInfo.td:1.284
--- llvm/lib/Target/X86/X86InstrInfo.td:1.283   Thu Sep  7 14:03:48 2006
+++ llvm/lib/Target/X86/X86InstrInfo.td Thu Sep  7 15:33:45 2006
@@ -52,8 +52,6 @@
 
 def X86cmp : SDNodeX86ISD::CMP , SDTX86CmpTest,
 [SDNPOutFlag];
-def X86test: SDNodeX86ISD::TEST, SDTX86CmpTest,
-[SDNPOutFlag];
 
 def X86cmov: SDNodeX86ISD::CMOV, SDTX86Cmov,
 [SDNPInFlag, SDNPOutFlag];
@@ -2073,60 +2071,54 @@
 let isCommutable = 1 in {   // TEST X, Y   -- TEST Y, X
 def TEST8rr  : I0x84, MRMDestReg, (ops GR8:$src1, GR8:$src2),
  test{b} {$src2, $src1|$src1, $src2},
- [(X86test GR8:$src1, GR8:$src2)];
+ [(X86cmp (and GR8:$src1, GR8:$src2), 0)];
 def TEST16rr : I0x85, MRMDestReg, (ops GR16:$src1, GR16:$src2),
  test{w} {$src2, $src1|$src1, $src2},
- [(X86test GR16:$src1, GR16:$src2)], OpSize;
+ [(X86cmp (and GR16:$src1, GR16:$src2), 0)], OpSize;
 def TEST32rr : I0x85, MRMDestReg, (ops GR32:$src1, GR32:$src2),
  test{l} {$src2, $src1|$src1, $src2},
- [(X86test GR32:$src1, GR32:$src2)];
+ [(X86cmp (and GR32:$src1, GR32:$src2), 0)];
 }
-def TEST8mr  : I0x84, MRMDestMem, (ops i8mem :$src1, GR8 :$src2),
- test{b} {$src2, $src1|$src1, $src2},
- [(X86test (loadi8 addr:$src1), GR8:$src2)];
-def TEST16mr : I0x85, MRMDestMem, (ops i16mem:$src1, GR16:$src2),
- test{w} {$src2, $src1|$src1, $src2},
- [(X86test (loadi16 addr:$src1), GR16:$src2)],
-   OpSize;
-def TEST32mr : I0x85, MRMDestMem, (ops i32mem:$src1, GR32:$src2),
- test{l} {$src2, $src1|$src1, $src2},
- [(X86test (loadi32 addr:$src1), GR32:$src2)];
+// FIXME: These patterns are disabled until isel issue surrounding
+//CodeGen/X86/test-load-fold.ll is fixed.
 def TEST8rm  : I0x84, MRMSrcMem, (ops GR8 :$src1, i8mem :$src2),
  test{b} {$src2, $src1|$src1, $src2},
- [(X86test GR8:$src1, (loadi8 

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

2006-09-07 Thread Chris Lattner


Changes in directory llvm/lib/Transforms/Scalar:

TailDuplication.cpp updated: 1.30 - 1.31
---
Log message:

Throttle back tail duplication to avoid creating really ugly sequences of code.
For Transforms/TailDup/if-tail-dup.ll, f.e., it produces:

_foo:
movl 8(%esp), %eax
movl 4(%esp), %ecx
testl $1, %ecx
je LBB1_2   #cond_next
LBB1_1: #cond_true
movl $1, (%eax)
LBB1_2: #cond_next
testl $2, %ecx
je LBB1_4   #cond_next10
LBB1_3: #cond_true6
movl $1, 4(%eax)
LBB1_4: #cond_next10
testl $4, %ecx
je LBB1_6   #cond_next18
LBB1_5: #cond_true14
movl $1, 8(%eax)
LBB1_6: #cond_next18
testl $8, %ecx
je LBB1_8   #return
LBB1_7: #cond_true22
movl $1, 12(%eax)
ret
LBB1_8: #return
ret

instead of:

_foo:
movl 4(%esp), %eax
testl $2, %eax
sete %cl
movl 8(%esp), %edx
testl $1, %eax
je LBB1_2   #cond_next
LBB1_1: #cond_true
movl $1, (%edx)
testb %cl, %cl
jne LBB1_4  #cond_next10
jmp LBB1_3  #cond_true6
LBB1_2: #cond_next
testb %cl, %cl
jne LBB1_4  #cond_next10
LBB1_3: #cond_true6
movl $1, 4(%edx)
testl $4, %eax
je LBB1_6   #cond_next18
jmp LBB1_5  #cond_true14
LBB1_4: #cond_next10
testl $4, %eax
je LBB1_6   #cond_next18
LBB1_5: #cond_true14
movl $1, 8(%edx)
testl $8, %eax
je LBB1_8   #return
jmp LBB1_7  #cond_true22
LBB1_6: #cond_next18
testl $8, %eax
je LBB1_8   #return
LBB1_7: #cond_true22
movl $1, 12(%edx)
ret
LBB1_8: #return
ret



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

 TailDuplication.cpp |   19 +++
 1 files changed, 19 insertions(+)


Index: llvm/lib/Transforms/Scalar/TailDuplication.cpp
diff -u llvm/lib/Transforms/Scalar/TailDuplication.cpp:1.30 
llvm/lib/Transforms/Scalar/TailDuplication.cpp:1.31
--- llvm/lib/Transforms/Scalar/TailDuplication.cpp:1.30 Sun Aug 27 17:42:52 2006
+++ llvm/lib/Transforms/Scalar/TailDuplication.cpp  Thu Sep  7 16:30:15 2006
@@ -127,6 +127,25 @@
 for (; PI != PE; ++PI)
   if (TooMany-- == 0) return false;
   }
+  
+  // Finally, if this unconditional branch is a fall-through, be careful about
+  // tail duplicating it.  In particular, we don't want to taildup it if the
+  // original block will still be there after taildup is completed: doing so
+  // would eliminate the fall-through, requiring unconditional branches.
+  Function::iterator DestI = Dest;
+  if (*--DestI == BI-getParent()) {
+// The uncond branch is a fall-through.  Tail duplication of the block is
+// will eliminate the fall-through-ness and end up cloning the terminator
+// at the end of the Dest block.  Since the original Dest block will
+// continue to exist, this means that one or the other will not be able to
+// fall through.  One typical example that this helps with is code like:
+// if (a)
+//   foo();
+// if (b)
+//   foo();
+// Cloning the 'if b' block into the end of the first foo block is messy.
+return false;
+  }
 
   return true;
 }



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


[llvm-commits] CVS: llvm/test/Regression/Transforms/TailDup/if-tail-dup.ll

2006-09-07 Thread Chris Lattner


Changes in directory llvm/test/Regression/Transforms/TailDup:

if-tail-dup.ll added (r1.1)
---
Log message:

new testcase


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

 if-tail-dup.ll |   57 +
 1 files changed, 57 insertions(+)


Index: llvm/test/Regression/Transforms/TailDup/if-tail-dup.ll
diff -c /dev/null llvm/test/Regression/Transforms/TailDup/if-tail-dup.ll:1.1
*** /dev/null   Thu Sep  7 16:29:42 2006
--- llvm/test/Regression/Transforms/TailDup/if-tail-dup.ll  Thu Sep  7 
16:29:32 2006
***
*** 0 
--- 1,57 
+ ; RUN: llvm-as  %s | opt -tailduplicate | llc -march=x86 | grep 'je ' 
+ ; RUN: llvm-as  %s | opt -tailduplicate | llc -march=x86 | not grep jmp
+ ; This should have no unconditional jumps in it.  The C source is:
+ 
+ ;void foo(int c, int* P) {
+ ;  if (c  1)  P[0] = 1;
+ ;  if (c  2)  P[1] = 1;
+ ;  if (c  4)  P[2] = 1;
+ ;  if (c  8)  P[3] = 1;
+ ;}
+ 
+ 
+ void %foo(int %c, int* %P) {
+ entry:
+ %tmp1 = and int %c, 1   ; int [#uses=1]
+ %tmp1 = seteq int %tmp1, 0  ; bool [#uses=1]
+ br bool %tmp1, label %cond_next, label %cond_true
+ 
+ cond_true:  ; preds = %entry
+ store int 1, int* %P
+ br label %cond_next
+ 
+ cond_next:  ; preds = %entry, %cond_true
+ %tmp5 = and int %c, 2   ; int [#uses=1]
+ %tmp5 = seteq int %tmp5, 0  ; bool [#uses=1]
+ br bool %tmp5, label %cond_next10, label %cond_true6
+ 
+ cond_true6: ; preds = %cond_next
+ %tmp8 = getelementptr int* %P, int 1; int* [#uses=1]
+ store int 1, int* %tmp8
+ br label %cond_next10
+ 
+ cond_next10:; preds = %cond_next, %cond_true6
+ %tmp13 = and int %c, 4  ; int [#uses=1]
+ %tmp13 = seteq int %tmp13, 0; bool [#uses=1]
+ br bool %tmp13, label %cond_next18, label %cond_true14
+ 
+ cond_true14:; preds = %cond_next10
+ %tmp16 = getelementptr int* %P, int 2   ; int* [#uses=1]
+ store int 1, int* %tmp16
+ br label %cond_next18
+ 
+ cond_next18:; preds = %cond_next10, %cond_true14
+ %tmp21 = and int %c, 8  ; int [#uses=1]
+ %tmp21 = seteq int %tmp21, 0; bool [#uses=1]
+ br bool %tmp21, label %return, label %cond_true22
+ 
+ cond_true22:; preds = %cond_next18
+ %tmp24 = getelementptr int* %P, int 3   ; int* [#uses=1]
+ store int 1, int* %tmp24
+ ret void
+ 
+ return: ; preds = %cond_next18
+ ret void
+ }
+ 
+ 



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


[llvm-commits] CVS: llvm/tools/lto/lto.cpp

2006-09-07 Thread Devang Patel


Changes in directory llvm/tools/lto:

lto.cpp updated: 1.13 - 1.14
---
Log message:

Using addPassesToEmitWholeFile is not a good idea here.
Use FunctionPassManager to do the job.


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

 lto.cpp |   15 ++-
 1 files changed, 14 insertions(+), 1 deletion(-)


Index: llvm/tools/lto/lto.cpp
diff -u llvm/tools/lto/lto.cpp:1.13 llvm/tools/lto/lto.cpp:1.14
--- llvm/tools/lto/lto.cpp:1.13 Thu Sep  7 15:20:56 2006
+++ llvm/tools/lto/lto.cpp  Thu Sep  7 16:41:11 2006
@@ -282,11 +282,24 @@
   // Make sure everything is still good.
   Passes.add(createVerifierPass());
 
-  Target.addPassesToEmitWholeFile(Passes, Out, TargetMachine::AssemblyFile, 
true);
+  FunctionPassManager *CodeGenPasses =
+new FunctionPassManager(new ExistingModuleProvider(M));
+
+  CodeGenPasses-add(new TargetData(*Target.getTargetData()));
+  Target.addPassesToEmitFile(*CodeGenPasses, Out, TargetMachine::AssemblyFile, 
+true);
 
   // Run our queue of passes all at once now, efficiently.
   Passes.run(*M);
 
+  // Run the code generator, if present.
+  CodeGenPasses-doInitialization();
+  for (Module::iterator I = M-begin(), E = M-end(); I != E; ++I) {
+if (!I-isExternal())
+  CodeGenPasses-run(*I);
+  }
+  CodeGenPasses-doFinalization();
+
   return LTO_OPT_SUCCESS;
 }
 



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


[llvm-commits] CVS: llvm/tools/lto/Makefile

2006-09-07 Thread Devang Patel


Changes in directory llvm/tools/lto:

Makefile updated: 1.5 - 1.6
---
Log message:

Add linker into list of LINK_COMPONENTS.


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

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


Index: llvm/tools/lto/Makefile
diff -u llvm/tools/lto/Makefile:1.5 llvm/tools/lto/Makefile:1.6
--- llvm/tools/lto/Makefile:1.5 Mon Sep  4 00:59:09 2006
+++ llvm/tools/lto/Makefile Thu Sep  7 16:36:55 2006
@@ -20,7 +20,7 @@
 # early so we can set up LINK_COMPONENTS before includeing Makefile.rules
 include $(LEVEL)/Makefile.config
 
-LINK_COMPONENTS := $(TARGETS_TO_BUILD) ipo scalaropts bcreader bcwriter
+LINK_COMPONENTS := $(TARGETS_TO_BUILD) ipo scalaropts linker bcreader bcwriter
 
 include $(LEVEL)/Makefile.common
 



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


[llvm-commits] CVS: llvm/lib/Target/X86/X86TargetAsmInfo.cpp X86TargetAsmInfo.h

2006-09-07 Thread Jim Laskey


Changes in directory llvm/lib/Target/X86:

X86TargetAsmInfo.cpp added (r1.1)
X86TargetAsmInfo.h added (r1.1)
---
Log message:

Break out target asm info into separate files.


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

 X86TargetAsmInfo.cpp |   95 +++
 X86TargetAsmInfo.h   |   31 
 2 files changed, 126 insertions(+)


Index: llvm/lib/Target/X86/X86TargetAsmInfo.cpp
diff -c /dev/null llvm/lib/Target/X86/X86TargetAsmInfo.cpp:1.1
*** /dev/null   Thu Sep  7 17:05:12 2006
--- llvm/lib/Target/X86/X86TargetAsmInfo.cppThu Sep  7 17:05:02 2006
***
*** 0 
--- 1,95 
+ //===-- X86TargetAsmInfo.cpp - X86 asm properties ---*- C++ 
-*-===//
+ //
+ // The LLVM Compiler Infrastructure
+ //
+ // This file was developed by James M. Laskey and is distributed under the
+ // University of Illinois Open Source License. See LICENSE.TXT for details.
+ //
+ 
//===--===//
+ //
+ // This file contains the declarations of the X86TargetAsmInfo properties.
+ //
+ 
//===--===//
+ 
+ #include X86TargetAsmInfo.h
+ #include X86TargetMachine.h
+ #include X86Subtarget.h
+ 
+ using namespace llvm;
+ 
+ X86TargetAsmInfo::X86TargetAsmInfo(const X86TargetMachine TM) {
+   const X86Subtarget *Subtarget = TM.getSubtargetX86Subtarget();
+   
+   //FIXME - Should to be simplified.
+
+   switch (Subtarget-TargetType) {
+   case X86Subtarget::isDarwin:
+ AlignmentIsInBytes = false;
+ GlobalPrefix = _;
+ Data64bitsDirective = 0;   // we can't emit a 64-bit unit
+ ZeroDirective = \t.space\t;  // .space N emits N zeros.
+ PrivateGlobalPrefix = L; // Marker for constant pool idxs
+ ConstantPoolSection = \t.const\n;
+ JumpTableDataSection = \t.const\n; // FIXME: depends on PIC mode
+ FourByteConstantSection = \t.literal4\n;
+ EightByteConstantSection = \t.literal8\n;
+ LCOMMDirective = \t.lcomm\t;
+ COMMDirectiveTakesAlignment = false;
+ HasDotTypeDotSizeDirective = false;
+ StaticCtorsSection = .mod_init_func;
+ StaticDtorsSection = .mod_term_func;
+ InlineAsmStart = # InlineAsm Start;
+ InlineAsmEnd = # InlineAsm End;
+ SetDirective = \t.set;
+ 
+ NeedsSet = 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;
+ break;
+   case X86Subtarget::isCygwin:
+ GlobalPrefix = _;
+ COMMDirectiveTakesAlignment = false;
+ HasDotTypeDotSizeDirective = false;
+ StaticCtorsSection = \t.section .ctors,\aw\;
+ StaticDtorsSection = \t.section .dtors,\aw\;
+ break;
+   case X86Subtarget::isWindows:
+ GlobalPrefix = _;
+ HasDotTypeDotSizeDirective = false;
+ break;
+   default: break;
+   }
+   
+   if (Subtarget-isFlavorIntel()) {
+ GlobalPrefix = _;
+ CommentString = ;;
+   
+ PrivateGlobalPrefix = $;
+ AlignDirective = \talign\t;
+ ZeroDirective = \tdb\t;
+ ZeroDirectiveSuffix =  dup(0);
+ AsciiDirective = \tdb\t;
+ AscizDirective = 0;
+ Data8bitsDirective = \tdb\t;
+ Data16bitsDirective = \tdw\t;
+ Data32bitsDirective = \tdd\t;
+ Data64bitsDirective = \tdq\t;
+ HasDotTypeDotSizeDirective = false;
+ 
+ TextSection = _text;
+ DataSection = _data;
+ SwitchToSectionDirective = ;
+ TextSectionStartSuffix = \tsegment 'CODE';
+ DataSectionStartSuffix = \tsegment 'DATA';
+ SectionEndDirectiveSuffix = \tends\n;
+   }
+ }


Index: llvm/lib/Target/X86/X86TargetAsmInfo.h
diff -c /dev/null llvm/lib/Target/X86/X86TargetAsmInfo.h:1.1
*** /dev/null   Thu Sep  7 17:05:20 2006
--- llvm/lib/Target/X86/X86TargetAsmInfo.h  Thu Sep  7 17:05:02 2006
***
*** 0 
--- 1,31 
+ //=-- X86TargetAsmInfo.h - X86 asm properties -*- C++ 
-*--//
+ //
+ // The LLVM Compiler Infrastructure
+ //
+ // This file was developed by James M. Laskey and is distributed under the
+ // University of Illinois Open Source License. See LICENSE.TXT for details.
+ //
+ 
//===--===//
+ //
+ // This 

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

2006-09-07 Thread Jim Laskey


Changes in directory llvm/lib/Target/PowerPC:

PPCTargetAsmInfo.cpp added (r1.1)
PPCTargetAsmInfo.h added (r1.1)
---
Log message:

Break out target asm info into separate files.


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

 PPCTargetAsmInfo.cpp |   51 +++
 PPCTargetAsmInfo.h   |   31 +++
 2 files changed, 82 insertions(+)


Index: llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
diff -c /dev/null llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.1
*** /dev/null   Thu Sep  7 17:05:12 2006
--- llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cppThu Sep  7 17:05:02 2006
***
*** 0 
--- 1,51 
+ //===-- PPCTargetAsmInfo.cpp - PPC asm properties ---*- C++ 
-*-===//
+ //
+ // The LLVM Compiler Infrastructure
+ //
+ // This file was developed by James M. Laskey and is distributed under the
+ // University of Illinois Open Source License. See LICENSE.TXT for details.
+ //
+ 
//===--===//
+ //
+ // This file contains the declarations of the DarwinTargetAsmInfo properties.
+ //
+ 
//===--===//
+ 
+ #include PPCTargetAsmInfo.h
+ #include PPCTargetMachine.h
+ 
+ using namespace llvm;
+ 
+ DarwinTargetAsmInfo::DarwinTargetAsmInfo(const PPCTargetMachine TM) {
+   bool isPPC64 = TM.getSubtargetImpl()-isPPC64();
+ 
+   CommentString = ;;
+   GlobalPrefix = _;
+   PrivateGlobalPrefix = L;
+   ZeroDirective = \t.space\t;
+   SetDirective = \t.set;
+   Data64bitsDirective = isPPC64 ? .quad\t : 0;  
+   AlignmentIsInBytes = false;
+   ConstantPoolSection = \t.const\t;
+   JumpTableDataSection = .const;
+   JumpTableTextSection = \t.text;
+   LCOMMDirective = \t.lcomm\t;
+   StaticCtorsSection = .mod_init_func;
+   StaticDtorsSection = .mod_term_func;
+   InlineAsmStart = # InlineAsm Start;
+   InlineAsmEnd = # InlineAsm End;
+   
+   NeedsSet = true;
+   AddressSize = isPPC64 ? 8 : 4;
+   DwarfAbbrevSection = .section __DWARF,__debug_abbrev;
+   DwarfInfoSection = .section __DWARF,__debug_info;
+   DwarfLineSection = .section __DWARF,__debug_line;
+   DwarfFrameSection = .section __DWARF,__debug_frame;
+   DwarfPubNamesSection = .section __DWARF,__debug_pubnames;
+   DwarfPubTypesSection = .section __DWARF,__debug_pubtypes;
+   DwarfStrSection = .section __DWARF,__debug_str;
+   DwarfLocSection = .section __DWARF,__debug_loc;
+   DwarfARangesSection = .section __DWARF,__debug_aranges;
+   DwarfRangesSection = .section __DWARF,__debug_ranges;
+   DwarfMacInfoSection = .section __DWARF,__debug_macinfo;
+ }


Index: llvm/lib/Target/PowerPC/PPCTargetAsmInfo.h
diff -c /dev/null llvm/lib/Target/PowerPC/PPCTargetAsmInfo.h:1.1
*** /dev/null   Thu Sep  7 17:05:24 2006
--- llvm/lib/Target/PowerPC/PPCTargetAsmInfo.h  Thu Sep  7 17:05:02 2006
***
*** 0 
--- 1,31 
+ //=-- PPCTargetAsmInfo.h - PPC asm properties -*- C++ 
-*--//
+ //
+ // The LLVM Compiler Infrastructure
+ //
+ // This file was developed by James M. Laskey and is distributed under the
+ // University of Illinois Open Source License. See LICENSE.TXT for details.
+ //
+ 
//===--===//
+ //
+ // This file contains the declaration of the DarwinTargetAsmInfo class.
+ //
+ 
//===--===//
+ 
+ #ifndef PPCTARGETASMINFO_H
+ #define PPCTARGETASMINFO_H
+ 
+ #include llvm/Target/TargetAsmInfo.h
+ 
+ namespace llvm {
+ 
+   // Forward declaration.
+   class PPCTargetMachine;
+ 
+   struct DarwinTargetAsmInfo : public TargetAsmInfo {
+ DarwinTargetAsmInfo(const PPCTargetMachine TM);
+   };
+ 
+ 
+ } // namespace llvm
+ 
+ #endif



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


[llvm-commits] CVS: llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp ARMTargetAsmInfo.h

2006-09-07 Thread Jim Laskey


Changes in directory llvm/lib/Target/ARM:

ARMTargetAsmInfo.cpp added (r1.1)
ARMTargetAsmInfo.h added (r1.1)
---
Log message:

Break out target asm info into separate files.


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

 ARMTargetAsmInfo.cpp |   26 ++
 ARMTargetAsmInfo.h   |   31 +++
 2 files changed, 57 insertions(+)


Index: llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp
diff -c /dev/null llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp:1.1
*** /dev/null   Thu Sep  7 17:05:12 2006
--- llvm/lib/Target/ARM/ARMTargetAsmInfo.cppThu Sep  7 17:05:01 2006
***
*** 0 
--- 1,26 
+ //===-- ARMTargetAsmInfo.cpp - ARM asm properties ---*- C++ 
-*-===//
+ //
+ // The LLVM Compiler Infrastructure
+ //
+ // This file was developed by James M. Laskey and is distributed under the
+ // University of Illinois Open Source License. See LICENSE.TXT for details.
+ //
+ 
//===--===//
+ //
+ // This file contains the declarations of the ARMTargetAsmInfo properties.
+ //
+ 
//===--===//
+ 
+ #include ARMTargetAsmInfo.h
+ 
+ using namespace llvm;
+ 
+ ARMTargetAsmInfo::ARMTargetAsmInfo(const ARMTargetMachine TM) {
+   Data16bitsDirective = \t.half\t;
+   Data32bitsDirective = \t.word\t;
+   Data64bitsDirective = 0;
+   ZeroDirective = \t.skip\t;
+   CommentString = @;
+   ConstantPoolSection = \t.text\n;
+   AlignmentIsInBytes = false;
+ }


Index: llvm/lib/Target/ARM/ARMTargetAsmInfo.h
diff -c /dev/null llvm/lib/Target/ARM/ARMTargetAsmInfo.h:1.1
*** /dev/null   Thu Sep  7 17:05:23 2006
--- llvm/lib/Target/ARM/ARMTargetAsmInfo.h  Thu Sep  7 17:05:01 2006
***
*** 0 
--- 1,31 
+ //=-- ARMTargetAsmInfo.h - ARM asm properties -*- C++ 
-*--//
+ //
+ // The LLVM Compiler Infrastructure
+ //
+ // This file was developed by James M. Laskey and is distributed under the
+ // University of Illinois Open Source License. See LICENSE.TXT for details.
+ //
+ 
//===--===//
+ //
+ // This file contains the declaration of the ARMTargetAsmInfo class.
+ //
+ 
//===--===//
+ 
+ #ifndef ARMTARGETASMINFO_H
+ #define ARMTARGETASMINFO_H
+ 
+ #include llvm/Target/TargetAsmInfo.h
+ 
+ namespace llvm {
+ 
+   // Forward declaration.
+   class ARMTargetMachine;
+ 
+   struct ARMTargetAsmInfo : public TargetAsmInfo {
+ ARMTargetAsmInfo(const ARMTargetMachine TM);
+   };
+ 
+ 
+ } // namespace llvm
+ 
+ #endif



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


[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcAsmPrinter.cpp SparcTargetMachine.h

2006-09-07 Thread Jim Laskey


Changes in directory llvm/lib/Target/Sparc:

SparcAsmPrinter.cpp updated: 1.67 - 1.68
SparcTargetMachine.h updated: 1.15 - 1.16
---
Log message:

Make target asm info a property of the target machine.


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

 SparcAsmPrinter.cpp  |   16 ++--
 SparcTargetMachine.h |4 
 2 files changed, 6 insertions(+), 14 deletions(-)


Index: llvm/lib/Target/Sparc/SparcAsmPrinter.cpp
diff -u llvm/lib/Target/Sparc/SparcAsmPrinter.cpp:1.67 
llvm/lib/Target/Sparc/SparcAsmPrinter.cpp:1.68
--- llvm/lib/Target/Sparc/SparcAsmPrinter.cpp:1.67  Wed Sep  6 13:34:40 2006
+++ llvm/lib/Target/Sparc/SparcAsmPrinter.cpp   Thu Sep  7 17:06:40 2006
@@ -37,19 +37,8 @@
 namespace {
   Statistic EmittedInsts(asm-printer, Number of machine instrs printed);
 
-  struct VISIBILITY_HIDDEN SparcTargetAsmInfo : public TargetAsmInfo {
-SparcTargetAsmInfo() {
-  Data16bitsDirective = \t.half\t;
-  Data32bitsDirective = \t.word\t;
-  Data64bitsDirective = 0;  // .xword is only supported by V9.
-  ZeroDirective = \t.skip\t;
-  CommentString = !;
-  ConstantPoolSection = \t.section \.rodata\,#alloc\n;
-}
-  };
-
   struct VISIBILITY_HIDDEN SparcAsmPrinter : public AsmPrinter {
-SparcAsmPrinter(std::ostream O, TargetMachine TM, TargetAsmInfo *T)
+SparcAsmPrinter(std::ostream O, TargetMachine TM, const TargetAsmInfo *T)
   : AsmPrinter(O, TM, T) {
 }
 
@@ -85,8 +74,7 @@
 ///
 FunctionPass *llvm::createSparcCodePrinterPass(std::ostream o,
TargetMachine tm) {
-  SparcTargetAsmInfo *TAI = new SparcTargetAsmInfo();
-  return new SparcAsmPrinter(o, tm, TAI);
+  return new SparcAsmPrinter(o, tm, tm.getTargetAsmInfo());
 }
 
 /// runOnMachineFunction - This uses the printMachineInstruction()


Index: llvm/lib/Target/Sparc/SparcTargetMachine.h
diff -u llvm/lib/Target/Sparc/SparcTargetMachine.h:1.15 
llvm/lib/Target/Sparc/SparcTargetMachine.h:1.16
--- llvm/lib/Target/Sparc/SparcTargetMachine.h:1.15 Sun Sep  3 23:14:57 2006
+++ llvm/lib/Target/Sparc/SparcTargetMachine.h  Thu Sep  7 17:06:40 2006
@@ -19,6 +19,7 @@
 #include llvm/Target/TargetFrameInfo.h
 #include SparcInstrInfo.h
 #include SparcSubtarget.h
+#include SparcTargetAsmInfo.h
 
 namespace llvm {
 
@@ -41,6 +42,9 @@
   virtual const TargetData   *getTargetData() const { return DataLayout; }
   static unsigned getModuleMatchQuality(const Module M);
 
+  virtual const TargetAsmInfo *createTargetAsmInfo() const {
+return static_castconst TargetAsmInfo *(new SparcTargetAsmInfo(*this));
+  }
   
   // Pass Pipeline Configuration
   virtual bool addInstSelector(FunctionPassManager PM, bool Fast);



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


[llvm-commits] CVS: llvm/lib/Target/IA64/IA64AsmPrinter.cpp IA64TargetMachine.h

2006-09-07 Thread Jim Laskey


Changes in directory llvm/lib/Target/IA64:

IA64AsmPrinter.cpp updated: 1.34 - 1.35
IA64TargetMachine.h updated: 1.13 - 1.14
---
Log message:

Make target asm info a property of the target machine.


---
Diffs of the changes:  (+8 -24)

 IA64AsmPrinter.cpp  |   27 +++
 IA64TargetMachine.h |5 +
 2 files changed, 8 insertions(+), 24 deletions(-)


Index: llvm/lib/Target/IA64/IA64AsmPrinter.cpp
diff -u llvm/lib/Target/IA64/IA64AsmPrinter.cpp:1.34 
llvm/lib/Target/IA64/IA64AsmPrinter.cpp:1.35
--- llvm/lib/Target/IA64/IA64AsmPrinter.cpp:1.34Wed Sep  6 13:34:40 2006
+++ llvm/lib/Target/IA64/IA64AsmPrinter.cpp Thu Sep  7 17:06:40 2006
@@ -23,8 +23,8 @@
 #include llvm/Assembly/Writer.h
 #include llvm/CodeGen/AsmPrinter.h
 #include llvm/CodeGen/MachineFunctionPass.h
-#include llvm/Target/TargetMachine.h
 #include llvm/Target/TargetAsmInfo.h
+#include llvm/Target/TargetMachine.h
 #include llvm/Support/Mangler.h
 #include llvm/ADT/Statistic.h
 #include iostream
@@ -32,31 +32,11 @@
 
 namespace {
   Statistic EmittedInsts(asm-printer, Number of machine instrs printed);
-
-  struct VISIBILITY_HIDDEN IA64TargetAsmInfo : public TargetAsmInfo {
-IA64TargetAsmInfo() {
-  CommentString = //;
-  Data8bitsDirective = \tdata1\t; // FIXME: check that we are
-  Data16bitsDirective = \tdata2.ua\t; // disabling auto-alignment
-  Data32bitsDirective = \tdata4.ua\t; // properly
-  Data64bitsDirective = \tdata8.ua\t;
-  ZeroDirective = \t.skip\t;
-  AsciiDirective = \tstring\t;
-
-  GlobalVarAddrPrefix=;
-  GlobalVarAddrSuffix=;
-  FunctionAddrPrefix=@fptr(;
-  FunctionAddrSuffix=);
-  
-  // FIXME: would be nice to have rodata (no 'w') when appropriate?
-  ConstantPoolSection = \n\t.section .data, \aw\, \progbits\\n;
-}
-  };
   
   struct IA64AsmPrinter : public AsmPrinter {
 std::setstd::string ExternalFunctionNames, ExternalObjectNames;
 
-IA64AsmPrinter(std::ostream O, TargetMachine TM, TargetAsmInfo *T)
+IA64AsmPrinter(std::ostream O, TargetMachine TM, const TargetAsmInfo *T)
   : AsmPrinter(O, TM, T) {
 }
 
@@ -366,8 +346,7 @@
 ///
 FunctionPass *llvm::createIA64CodePrinterPass(std::ostream o,
   IA64TargetMachine tm) {
-  IA64TargetAsmInfo *TAI = new IA64TargetAsmInfo();
-  return new IA64AsmPrinter(o, tm, TAI);
+  return new IA64AsmPrinter(o, tm, tm.getTargetAsmInfo());
 }
 
 


Index: llvm/lib/Target/IA64/IA64TargetMachine.h
diff -u llvm/lib/Target/IA64/IA64TargetMachine.h:1.13 
llvm/lib/Target/IA64/IA64TargetMachine.h:1.14
--- llvm/lib/Target/IA64/IA64TargetMachine.h:1.13   Sun Sep  3 23:14:57 2006
+++ llvm/lib/Target/IA64/IA64TargetMachine.hThu Sep  7 17:06:40 2006
@@ -19,6 +19,7 @@
 #include llvm/Target/TargetFrameInfo.h
 #include IA64InstrInfo.h
 #include IA64ISelLowering.h
+#include IA64TargetAsmInfo.h
 
 namespace llvm {
 
@@ -40,6 +41,10 @@
 return InstrInfo.getRegisterInfo();
   }
   virtual const TargetData   *getTargetData() const { return DataLayout; }
+  
+  virtual const TargetAsmInfo *createTargetAsmInfo() const {
+return static_castconst TargetAsmInfo *(new IA64TargetAsmInfo(*this));
+  }
 
   static unsigned getModuleMatchQuality(const Module M);
 



___
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 PPCTargetMachine.h

2006-09-07 Thread Jim Laskey


Changes in directory llvm/lib/Target/PowerPC:

PPCAsmPrinter.cpp updated: 1.193 - 1.194
PPCTargetMachine.h updated: 1.23 - 1.24
---
Log message:

Make target asm info a property of the target machine.


---
Diffs of the changes:  (+8 -40)

 PPCAsmPrinter.cpp  |   44 
 PPCTargetMachine.h |4 
 2 files changed, 8 insertions(+), 40 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.193 
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.194
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.193 Wed Sep  6 13:34:40 2006
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp   Thu Sep  7 17:06:40 2006
@@ -50,7 +50,7 @@
   struct VISIBILITY_HIDDEN PPCAsmPrinter : public AsmPrinter {
 std::setstd::string FnStubs, GVStubs;
 
-PPCAsmPrinter(std::ostream O, TargetMachine TM, TargetAsmInfo *T)
+PPCAsmPrinter(std::ostream O, TargetMachine TM, const TargetAsmInfo *T)
   : AsmPrinter(O, TM, T) {}
 
 virtual const char *getPassName() const {
@@ -239,49 +239,14 @@
 
   };
 
-  struct VISIBILITY_HIDDEN DarwinTargetAsmInfo : public TargetAsmInfo {
-DarwinTargetAsmInfo(PPCTargetMachine TM) {
-  bool isPPC64 = TM.getSubtargetImpl()-isPPC64();
-
-  CommentString = ;;
-  GlobalPrefix = _;
-  PrivateGlobalPrefix = L;
-  ZeroDirective = \t.space\t;
-  SetDirective = \t.set;
-  Data64bitsDirective = isPPC64 ? .quad\t : 0;  
-  AlignmentIsInBytes = false;
-  ConstantPoolSection = \t.const\t;
-  JumpTableDataSection = .const;
-  JumpTableTextSection = \t.text;
-  LCOMMDirective = \t.lcomm\t;
-  StaticCtorsSection = .mod_init_func;
-  StaticDtorsSection = .mod_term_func;
-  InlineAsmStart = # InlineAsm Start;
-  InlineAsmEnd = # InlineAsm End;
-  
-  NeedsSet = true;
-  AddressSize = isPPC64 ? 8 : 4;
-  DwarfAbbrevSection = .section __DWARF,__debug_abbrev;
-  DwarfInfoSection = .section __DWARF,__debug_info;
-  DwarfLineSection = .section __DWARF,__debug_line;
-  DwarfFrameSection = .section __DWARF,__debug_frame;
-  DwarfPubNamesSection = .section __DWARF,__debug_pubnames;
-  DwarfPubTypesSection = .section __DWARF,__debug_pubtypes;
-  DwarfStrSection = .section __DWARF,__debug_str;
-  DwarfLocSection = .section __DWARF,__debug_loc;
-  DwarfARangesSection = .section __DWARF,__debug_aranges;
-  DwarfRangesSection = .section __DWARF,__debug_ranges;
-  DwarfMacInfoSection = .section __DWARF,__debug_macinfo;
-}
-  };
-
   /// DarwinAsmPrinter - PowerPC assembly printer, customized for Darwin/Mac OS
   /// X
   struct VISIBILITY_HIDDEN DarwinAsmPrinter : public PPCAsmPrinter {
   
 DwarfWriter DW;
 
-DarwinAsmPrinter(std::ostream O, PPCTargetMachine TM, TargetAsmInfo *T)
+DarwinAsmPrinter(std::ostream O, PPCTargetMachine TM,
+ const TargetAsmInfo *T)
   : PPCAsmPrinter(O, TM, T), DW(O, this, T) {
   bool isPPC64 = TM.getSubtargetImpl()-isPPC64();
 }
@@ -309,8 +274,7 @@
 ///
 FunctionPass *llvm::createDarwinCodePrinterPass(std::ostream o,
 PPCTargetMachine tm) {
-  TargetAsmInfo *TAI = new DarwinTargetAsmInfo(tm);
-  return new DarwinAsmPrinter(o, tm, TAI);
+  return new DarwinAsmPrinter(o, tm, tm.getTargetAsmInfo());
 }
 
 // Include the auto-generated portion of the assembly writer


Index: llvm/lib/Target/PowerPC/PPCTargetMachine.h
diff -u llvm/lib/Target/PowerPC/PPCTargetMachine.h:1.23 
llvm/lib/Target/PowerPC/PPCTargetMachine.h:1.24
--- llvm/lib/Target/PowerPC/PPCTargetMachine.h:1.23 Sun Sep  3 23:14:57 2006
+++ llvm/lib/Target/PowerPC/PPCTargetMachine.h  Thu Sep  7 17:06:40 2006
@@ -19,6 +19,7 @@
 #include PPCJITInfo.h
 #include PPCInstrInfo.h
 #include PPCISelLowering.h
+#include PPCTargetAsmInfo.h
 #include llvm/Target/TargetMachine.h
 #include llvm/Target/TargetData.h
 
@@ -55,6 +56,9 @@
 return InstrItins;
   }
   
+  virtual const TargetAsmInfo *createTargetAsmInfo() const {
+return static_castconst TargetAsmInfo *(new DarwinTargetAsmInfo(*this));
+  }
   
   // Pass Pipeline Configuration
   virtual bool addInstSelector(FunctionPassManager PM, bool Fast);



___
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 DwarfWriter.cpp

2006-09-07 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen:

AsmPrinter.cpp updated: 1.92 - 1.93
DwarfWriter.cpp updated: 1.74 - 1.75
---
Log message:

Make target asm info a property of the target machine.


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

 AsmPrinter.cpp  |3 ++-
 DwarfWriter.cpp |   35 ++-
 2 files changed, 20 insertions(+), 18 deletions(-)


Index: llvm/lib/CodeGen/AsmPrinter.cpp
diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.92 
llvm/lib/CodeGen/AsmPrinter.cpp:1.93
--- llvm/lib/CodeGen/AsmPrinter.cpp:1.92Thu Sep  7 13:50:20 2006
+++ llvm/lib/CodeGen/AsmPrinter.cpp Thu Sep  7 17:06:40 2006
@@ -27,7 +27,8 @@
 #include cerrno
 using namespace llvm;
 
-AsmPrinter::AsmPrinter(std::ostream o, TargetMachine tm, TargetAsmInfo *T)
+AsmPrinter::AsmPrinter(std::ostream o, TargetMachine tm,
+   const TargetAsmInfo *T)
 : FunctionNumber(0), O(o), TM(tm), TAI(T)
 {}
 


Index: llvm/lib/CodeGen/DwarfWriter.cpp
diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.74 
llvm/lib/CodeGen/DwarfWriter.cpp:1.75
--- llvm/lib/CodeGen/DwarfWriter.cpp:1.74   Wed Sep  6 13:34:40 2006
+++ llvm/lib/CodeGen/DwarfWriter.cppThu Sep  7 17:06:40 2006
@@ -574,24 +574,24 @@
 }
 
 #ifndef NDEBUG
-  void DIEAbbrev::print(std::ostream O) {
-O  Abbreviation @
-   std::hex  (intptr_t)this  std::dec
+void DIEAbbrev::print(std::ostream O) {
+  O  Abbreviation @
+ std::hex  (intptr_t)this  std::dec
+   
+ TagString(Tag)
+  
+ ChildrenString(ChildrenFlag)
+ \n;
+  
+  for (unsigned i = 0, N = Data.size(); i  N; ++i) {
+O
+   AttributeString(Data[i].getAttribute())
  
-   TagString(Tag)
-
-   ChildrenString(ChildrenFlag)
+   FormEncodingString(Data[i].getForm())
\n;
-
-for (unsigned i = 0, N = Data.size(); i  N; ++i) {
-  O
- AttributeString(Data[i].getAttribute())
-   
- FormEncodingString(Data[i].getForm())
- \n;
-}
   }
-  void DIEAbbrev::dump() { print(std::cerr); }
+}
+void DIEAbbrev::dump() { print(std::cerr); }
 #endif
 
 
//===--===//
@@ -1160,7 +1160,7 @@
 /// is an option (needsSet) to use an intermediary 'set' expression.
 void DwarfWriter::EmitDifference(const char *TagHi, unsigned NumberHi,
  const char *TagLo, unsigned NumberLo) const {
-  if (TAI-getNeedsSet()) {
+  if (TAI-needsSet()) {
 static unsigned SetCounter = 0;
 
 O  \t.set\t;
@@ -2467,7 +2467,8 @@
 // Main entry points.
 //
   
-DwarfWriter::DwarfWriter(std::ostream OS, AsmPrinter *A, TargetAsmInfo *T)
+DwarfWriter::DwarfWriter(std::ostream OS, AsmPrinter *A,
+  const TargetAsmInfo *T)
 : O(OS)
 , Asm(A)
 , TAI(T)



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


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

2006-09-07 Thread Jim Laskey


Changes in directory llvm/lib/Target:

TargetMachine.cpp updated: 1.53 - 1.54
---
Log message:

Make target asm info a property of the target machine.


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

 TargetMachine.cpp |2 ++
 1 files changed, 2 insertions(+)


Index: llvm/lib/Target/TargetMachine.cpp
diff -u llvm/lib/Target/TargetMachine.cpp:1.53 
llvm/lib/Target/TargetMachine.cpp:1.54
--- llvm/lib/Target/TargetMachine.cpp:1.53  Sun Sep  3 23:06:01 2006
+++ llvm/lib/Target/TargetMachine.cpp   Thu Sep  7 17:06:40 2006
@@ -11,6 +11,7 @@
 //
 
//===--===//
 
+#include llvm/Target/TargetAsmInfo.h
 #include llvm/Target/TargetMachine.h
 #include llvm/Target/TargetOptions.h
 #include llvm/Support/CommandLine.h
@@ -95,6 +96,7 @@
 //
 
 TargetMachine::~TargetMachine() {
+  if (AsmInfo) delete AsmInfo;
 }
 
 /// getRelocationModel - Returns the code generation relocation model. The



___
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 DwarfWriter.h

2006-09-07 Thread Jim Laskey


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.46 - 1.47
DwarfWriter.h updated: 1.39 - 1.40
---
Log message:

Make target asm info a property of the target machine.


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

 AsmPrinter.h  |4 ++--
 DwarfWriter.h |6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.46 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.47
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.46 Wed Sep  6 13:34:40 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Thu Sep  7 17:06:40 2006
@@ -49,7 +49,7 @@
 
 /// Target Asm Printer information.
 ///
-TargetAsmInfo *TAI;
+const TargetAsmInfo *TAI;
 
 /// Name-mangler for global names.
 ///
@@ -65,7 +65,7 @@
 std::string CurrentSection;
   
   protected:
-AsmPrinter(std::ostream o, TargetMachine TM, TargetAsmInfo *T);
+AsmPrinter(std::ostream o, TargetMachine TM, const TargetAsmInfo *T);
 
   public:
 /// SwitchToTextSection - Switch to the specified section of the executable


Index: llvm/include/llvm/CodeGen/DwarfWriter.h
diff -u llvm/include/llvm/CodeGen/DwarfWriter.h:1.39 
llvm/include/llvm/CodeGen/DwarfWriter.h:1.40
--- llvm/include/llvm/CodeGen/DwarfWriter.h:1.39Wed Sep  6 13:34:40 2006
+++ llvm/include/llvm/CodeGen/DwarfWriter.h Thu Sep  7 17:06:40 2006
@@ -88,7 +88,7 @@
   AsmPrinter *Asm;
   
   /// TAI - Target Asm Printer.
-  TargetAsmInfo *TAI;
+  const TargetAsmInfo *TAI;
   
   /// TD - Target data.
   const TargetData *TD;
@@ -387,12 +387,12 @@
 
 public:
   
-  DwarfWriter(std::ostream OS, AsmPrinter *A, TargetAsmInfo *T);
+  DwarfWriter(std::ostream OS, AsmPrinter *A, const TargetAsmInfo *T);
   virtual ~DwarfWriter();
   
   // Accessors.
   //
-  TargetAsmInfo *getTargetAsmInfo() const { return TAI; }
+  const TargetAsmInfo *getTargetAsmInfo() const { return TAI; }
   
   /// SetDebugInfo - Set DebugInfo when it's known that pass manager has
   /// created it.  Set by the target AsmPrinter.



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


[llvm-commits] CVS: llvm/Xcode/LLVM.xcodeproj/project.pbxproj

2006-09-07 Thread Jim Laskey


Changes in directory llvm/Xcode/LLVM.xcodeproj:

project.pbxproj updated: 1.23 - 1.24
---
Log message:

Adding new files.


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

 project.pbxproj |   24 
 1 files changed, 24 insertions(+)


Index: llvm/Xcode/LLVM.xcodeproj/project.pbxproj
diff -u llvm/Xcode/LLVM.xcodeproj/project.pbxproj:1.23 
llvm/Xcode/LLVM.xcodeproj/project.pbxproj:1.24
--- llvm/Xcode/LLVM.xcodeproj/project.pbxproj:1.23  Wed Sep  6 13:38:54 2006
+++ llvm/Xcode/LLVM.xcodeproj/project.pbxproj   Thu Sep  7 17:07:57 2006
@@ -41,6 +41,18 @@
 /* Begin PBXFileReference section */
CF1ACC9709C9DE4400D3C5EB /* IntrinsicInst.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = IntrinsicInst.cpp; path = ../lib/VMCore/IntrinsicInst.cpp; sourceTree = 
group; };
CF26835B09178F5500C5F253 /* TargetInstrItineraries.h */ = {isa 
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path 
= TargetInstrItineraries.h; sourceTree = group; };
+   CF341DAD0AB07A8B0099B064 /* AlphaTargetAsmInfo.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
AlphaTargetAsmInfo.h; sourceTree = group; };
+   CF341DAE0AB07A8B0099B064 /* AlphaTargetAsmInfo.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = AlphaTargetAsmInfo.cpp; sourceTree = group; };
+   CF341DC30AB07E6B0099B064 /* ARMTargetAsmInfo.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
ARMTargetAsmInfo.h; sourceTree = group; };
+   CF341DC40AB07E6B0099B064 /* ARMTargetAsmInfo.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = ARMTargetAsmInfo.cpp; sourceTree = group; };
+   CF341DE80AB07F890099B064 /* IA64TargetAsmInfo.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
IA64TargetAsmInfo.h; sourceTree = group; };
+   CF341DE90AB07F890099B064 /* IA64TargetAsmInfo.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = IA64TargetAsmInfo.cpp; sourceTree = group; };
+   CF341E010AB080220099B064 /* PPCTargetAsmInfo.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
PPCTargetAsmInfo.h; sourceTree = group; };
+   CF341E020AB080220099B064 /* PPCTargetAsmInfo.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = PPCTargetAsmInfo.cpp; sourceTree = group; };
+   CF341E220AB0814B0099B064 /* SparcTargetAsmInfo.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
SparcTargetAsmInfo.h; sourceTree = group; };
+   CF341E230AB0814B0099B064 /* SparcTargetAsmInfo.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = SparcTargetAsmInfo.cpp; sourceTree = group; };
+   CF341E320AB082D60099B064 /* X86TargetAsmInfo.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
X86TargetAsmInfo.h; sourceTree = group; };
+   CF341E330AB082D60099B064 /* X86TargetAsmInfo.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = X86TargetAsmInfo.cpp; sourceTree = group; };
CF47BD380AAF40BC00A8B13E /* TargetAsmInfo.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
TargetAsmInfo.h; sourceTree = group; };
CF47BD860AAF487E00A8B13E /* TargetAsmInfo.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = TargetAsmInfo.cpp; sourceTree = group; };
CF490D14090541D30072DB1C /* TargetSchedule.td */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = 
TargetSchedule.td; sourceTree = group; };
@@ -938,6 +950,8 @@
CF9720490A9F3BBC002CEEDD /* ARMRegisterInfo.cpp 
*/,
CF97204A0A9F3BBC002CEEDD /* ARMRegisterInfo.h 
*/,
CF97204B0A9F3BBC002CEEDD /* ARMRegisterInfo.td 
*/,
+   CF341DC40AB07E6B0099B064 /* 
ARMTargetAsmInfo.cpp */,
+   CF341DC30AB07E6B0099B064 /* ARMTargetAsmInfo.h 
*/,
CF97204C0A9F3BBC002CEEDD /* 
ARMTargetMachine.cpp */,
CF97204D0A9F3BBC002CEEDD /* ARMTargetMachine.h 
*/,
);
@@ -1394,6 +1408,8 @@
DE66EEAC08ABEE5E00323D32 /* AlphaRegisterInfo.h 
*/,
DE66EEAD08ABEE5E00323D32 /* 
AlphaRegisterInfo.td */,
DE66EEAE08ABEE5E00323D32 /* 

[llvm-commits] CVS: llvm/lib/Target/ARM/ARMAsmPrinter.cpp ARMTargetMachine.h

2006-09-07 Thread Jim Laskey


Changes in directory llvm/lib/Target/ARM:

ARMAsmPrinter.cpp updated: 1.15 - 1.16
ARMTargetMachine.h updated: 1.3 - 1.4
---
Log message:

Make target asm info a property of the target machine.


---
Diffs of the changes:  (+7 -15)

 ARMAsmPrinter.cpp  |   17 ++---
 ARMTargetMachine.h |5 +
 2 files changed, 7 insertions(+), 15 deletions(-)


Index: llvm/lib/Target/ARM/ARMAsmPrinter.cpp
diff -u llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.15 
llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.16
--- llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.15  Wed Sep  6 13:34:40 2006
+++ llvm/lib/Target/ARM/ARMAsmPrinter.cpp   Thu Sep  7 17:06:40 2006
@@ -38,20 +38,8 @@
 namespace {
   Statistic EmittedInsts(asm-printer, Number of machine instrs printed);
 
-  struct VISIBILITY_HIDDEN ARMTargetAsmInfo : public TargetAsmInfo {
-ARMTargetAsmInfo() {
-  Data16bitsDirective = \t.half\t;
-  Data32bitsDirective = \t.word\t;
-  Data64bitsDirective = 0;
-  ZeroDirective = \t.skip\t;
-  CommentString = @;
-  ConstantPoolSection = \t.text\n;
-  AlignmentIsInBytes = false;
-}
-  };
-
   struct VISIBILITY_HIDDEN ARMAsmPrinter : public AsmPrinter {
-ARMAsmPrinter(std::ostream O, TargetMachine TM, TargetAsmInfo *T)
+ARMAsmPrinter(std::ostream O, TargetMachine TM, const TargetAsmInfo *T)
   : AsmPrinter(O, TM, T) {
 }
 
@@ -113,8 +101,7 @@
 ///
 FunctionPass *llvm::createARMCodePrinterPass(std::ostream o,
TargetMachine tm) {
-  ARMTargetAsmInfo *TAI = new ARMTargetAsmInfo();
-  return new ARMAsmPrinter(o, tm, TAI);
+  return new ARMAsmPrinter(o, tm, tm.getTargetAsmInfo());
 }
 
 /// runOnMachineFunction - This uses the printMachineInstruction()


Index: llvm/lib/Target/ARM/ARMTargetMachine.h
diff -u llvm/lib/Target/ARM/ARMTargetMachine.h:1.3 
llvm/lib/Target/ARM/ARMTargetMachine.h:1.4
--- llvm/lib/Target/ARM/ARMTargetMachine.h:1.3  Sun Sep  3 23:14:57 2006
+++ llvm/lib/Target/ARM/ARMTargetMachine.h  Thu Sep  7 17:06:40 2006
@@ -20,6 +20,7 @@
 #include llvm/Target/TargetFrameInfo.h
 #include ARMInstrInfo.h
 #include ARMFrameInfo.h
+#include ARMTargetAsmInfo.h
 
 namespace llvm {
 
@@ -40,6 +41,10 @@
   virtual const TargetData   *getTargetData() const { return DataLayout; }
   static unsigned getModuleMatchQuality(const Module M);
 
+  virtual const TargetAsmInfo *createTargetAsmInfo() const {
+return static_castconst TargetAsmInfo *(new ARMTargetAsmInfo(*this));
+  }
+
   // Pass Pipeline Configuration
   virtual bool addInstSelector(FunctionPassManager PM, bool Fast);
   virtual bool addAssemblyEmitter(FunctionPassManager PM, bool Fast, 



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


[llvm-commits] CVS: llvm/include/llvm/Target/TargetAsmInfo.h TargetMachine.h

2006-09-07 Thread Jim Laskey


Changes in directory llvm/include/llvm/Target:

TargetAsmInfo.h updated: 1.1 - 1.2
TargetMachine.h updated: 1.69 - 1.70
---
Log message:

Make target asm info a property of the target machine.


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

 TargetAsmInfo.h |5 -
 TargetMachine.h |   20 +++-
 2 files changed, 23 insertions(+), 2 deletions(-)


Index: llvm/include/llvm/Target/TargetAsmInfo.h
diff -u llvm/include/llvm/Target/TargetAsmInfo.h:1.1 
llvm/include/llvm/Target/TargetAsmInfo.h:1.2
--- llvm/include/llvm/Target/TargetAsmInfo.h:1.1Wed Sep  6 13:35:33 2006
+++ llvm/include/llvm/Target/TargetAsmInfo.hThu Sep  7 17:06:40 2006
@@ -21,6 +21,9 @@
 
 namespace llvm {
 
+  // Forward declaration.
+  class TargetMachine;
+
   /// TargetAsmInfo - This class is intended to be used as a base class for asm
   /// properties and features specific to the target.
   class TargetAsmInfo {
@@ -266,7 +269,7 @@
 unsigned getAddressSize() const {
   return AddressSize;
 }
-bool getNeedsSet() const {
+bool needsSet() const {
   return NeedsSet;
 }
 const char *getCommentString() const {


Index: llvm/include/llvm/Target/TargetMachine.h
diff -u llvm/include/llvm/Target/TargetMachine.h:1.69 
llvm/include/llvm/Target/TargetMachine.h:1.70
--- llvm/include/llvm/Target/TargetMachine.h:1.69   Sun Sep  3 23:14:57 2006
+++ llvm/include/llvm/Target/TargetMachine.hThu Sep  7 17:06:40 2006
@@ -20,6 +20,7 @@
 
 namespace llvm {
 
+class TargetAsmInfo;
 class TargetData;
 class TargetSubtarget;
 class TargetInstrInfo;
@@ -65,11 +66,16 @@
   TargetMachine(const TargetMachine );   // DO NOT IMPLEMENT
   void operator=(const TargetMachine );  // DO NOT IMPLEMENT
 protected: // Can only create subclasses.
-  TargetMachine() { }
+  TargetMachine() : AsmInfo(NULL) { }
 
   /// getSubtargetImpl - virtual method implemented by subclasses that returns
   /// a reference to that target's TargetSubtarget-derived member variable.
   virtual const TargetSubtarget *getSubtargetImpl() const { return 0; }
+  
+  /// AsmInfo - Contains target specific asm information.
+  ///
+  mutable const TargetAsmInfo *AsmInfo;
+  
 public:
   virtual ~TargetMachine();
 
@@ -96,6 +102,18 @@
   virtual const TargetFrameInfo*getFrameInfo() const { return 0; }
   virtual   TargetLowering*getTargetLowering() const { return 0; }
   virtual const TargetData*getTargetData() const { return 0; }
+  
+  
+  /// getTargetAsmInfo - Return target specific asm information.
+  ///
+  const TargetAsmInfo *getTargetAsmInfo() const {
+if (!AsmInfo) AsmInfo = createTargetAsmInfo();
+return AsmInfo;
+  }
+  
+  /// createTargetAsmInfo - Create a new instance of target specific asm
+  /// information.
+  virtual const TargetAsmInfo *createTargetAsmInfo() const { return NULL; }
 
   /// getSubtarget - This method returns a pointer to the specified type of
   /// TargetSubtarget.  In debug builds, it verifies that the object being



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


[llvm-commits] CVS: llvm/lib/Target/IA64/IA64TargetAsmInfo.cpp IA64TargetAsmInfo.h

2006-09-07 Thread Jim Laskey


Changes in directory llvm/lib/Target/IA64:

IA64TargetAsmInfo.cpp added (r1.1)
IA64TargetAsmInfo.h added (r1.1)
---
Log message:

Break out target asm info into separate files.


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

 IA64TargetAsmInfo.cpp |   34 ++
 IA64TargetAsmInfo.h   |   31 +++
 2 files changed, 65 insertions(+)


Index: llvm/lib/Target/IA64/IA64TargetAsmInfo.cpp
diff -c /dev/null llvm/lib/Target/IA64/IA64TargetAsmInfo.cpp:1.1
*** /dev/null   Thu Sep  7 17:05:12 2006
--- llvm/lib/Target/IA64/IA64TargetAsmInfo.cpp  Thu Sep  7 17:05:02 2006
***
*** 0 
--- 1,34 
+ //===-- IA64TargetAsmInfo.cpp - IA64 asm properties -*- C++ 
-*-===//
+ //
+ // The LLVM Compiler Infrastructure
+ //
+ // This file was developed by James M. Laskey and is distributed under the
+ // University of Illinois Open Source License. See LICENSE.TXT for details.
+ //
+ 
//===--===//
+ //
+ // This file contains the declarations of the IA64TargetAsmInfo properties.
+ //
+ 
//===--===//
+ 
+ #include IA64TargetAsmInfo.h
+ 
+ using namespace llvm;
+ 
+ IA64TargetAsmInfo::IA64TargetAsmInfo(const IA64TargetMachine TM) {
+   CommentString = //;
+   Data8bitsDirective = \tdata1\t; // FIXME: check that we are
+   Data16bitsDirective = \tdata2.ua\t; // disabling auto-alignment
+   Data32bitsDirective = \tdata4.ua\t; // properly
+   Data64bitsDirective = \tdata8.ua\t;
+   ZeroDirective = \t.skip\t;
+   AsciiDirective = \tstring\t;
+ 
+   GlobalVarAddrPrefix=;
+   GlobalVarAddrSuffix=;
+   FunctionAddrPrefix=@fptr(;
+   FunctionAddrSuffix=);
+   
+   // FIXME: would be nice to have rodata (no 'w') when appropriate?
+   ConstantPoolSection = \n\t.section .data, \aw\, \progbits\\n;
+ }


Index: llvm/lib/Target/IA64/IA64TargetAsmInfo.h
diff -c /dev/null llvm/lib/Target/IA64/IA64TargetAsmInfo.h:1.1
*** /dev/null   Thu Sep  7 17:05:23 2006
--- llvm/lib/Target/IA64/IA64TargetAsmInfo.hThu Sep  7 17:05:02 2006
***
*** 0 
--- 1,31 
+ //=-- IA64TargetAsmInfo.h - IA64 asm properties ---*- C++ 
-*--//
+ //
+ // The LLVM Compiler Infrastructure
+ //
+ // This file was developed by James M. Laskey and is distributed under the
+ // University of Illinois Open Source License. See LICENSE.TXT for details.
+ //
+ 
//===--===//
+ //
+ // This file contains the declaration of the IA64TargetAsmInfo class.
+ //
+ 
//===--===//
+ 
+ #ifndef IA64TARGETASMINFO_H
+ #define IA64TARGETASMINFO_H
+ 
+ #include llvm/Target/TargetAsmInfo.h
+ 
+ namespace llvm {
+ 
+   // Forward declaration.
+   class IA64TargetMachine;
+ 
+   struct IA64TargetAsmInfo : public TargetAsmInfo {
+ IA64TargetAsmInfo(const IA64TargetMachine TM);
+   };
+ 
+ 
+ } // namespace llvm
+ 
+ #endif



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


[llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp X86ATTAsmPrinter.h X86AsmPrinter.cpp X86AsmPrinter.h X86IntelAsmPrinter.cpp X86IntelAsmPrinter.h X86TargetMachine.h

2006-09-07 Thread Jim Laskey


Changes in directory llvm/lib/Target/X86:

X86ATTAsmPrinter.cpp updated: 1.59 - 1.60
X86ATTAsmPrinter.h updated: 1.14 - 1.15
X86AsmPrinter.cpp updated: 1.194 - 1.195
X86AsmPrinter.h updated: 1.28 - 1.29
X86IntelAsmPrinter.cpp updated: 1.53 - 1.54
X86IntelAsmPrinter.h updated: 1.22 - 1.23
X86TargetMachine.h updated: 1.38 - 1.39
---
Log message:

Make target asm info a property of the target machine.


---
Diffs of the changes:  (+15 -88)

 X86ATTAsmPrinter.cpp   |2 +
 X86ATTAsmPrinter.h |2 -
 X86AsmPrinter.cpp  |   83 +
 X86AsmPrinter.h|7 
 X86IntelAsmPrinter.cpp |2 +
 X86IntelAsmPrinter.h   |3 +
 X86TargetMachine.h |4 ++
 7 files changed, 15 insertions(+), 88 deletions(-)


Index: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp
diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.59 
llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.60
--- llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.59   Wed Sep  6 13:34:40 2006
+++ llvm/lib/Target/X86/X86ATTAsmPrinter.cppThu Sep  7 17:06:40 2006
@@ -16,8 +16,10 @@
 #include X86ATTAsmPrinter.h
 #include X86.h
 #include X86TargetMachine.h
+#include X86TargetAsmInfo.h
 #include llvm/Module.h
 #include llvm/Support/Mangler.h
+#include llvm/Target/TargetAsmInfo.h
 #include llvm/Target/TargetOptions.h
 #include iostream
 using namespace llvm;


Index: llvm/lib/Target/X86/X86ATTAsmPrinter.h
diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.h:1.14 
llvm/lib/Target/X86/X86ATTAsmPrinter.h:1.15
--- llvm/lib/Target/X86/X86ATTAsmPrinter.h:1.14 Wed Sep  6 13:34:40 2006
+++ llvm/lib/Target/X86/X86ATTAsmPrinter.h  Thu Sep  7 17:06:40 2006
@@ -20,7 +20,7 @@
 namespace llvm {
 
 struct X86ATTAsmPrinter : public X86SharedAsmPrinter {
- X86ATTAsmPrinter(std::ostream O, X86TargetMachine TM, TargetAsmInfo *T)
+ X86ATTAsmPrinter(std::ostream O, X86TargetMachine TM, const TargetAsmInfo 
*T)
 : X86SharedAsmPrinter(O, TM, T) { }
 
   virtual const char *getPassName() const {


Index: llvm/lib/Target/X86/X86AsmPrinter.cpp
diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.194 
llvm/lib/Target/X86/X86AsmPrinter.cpp:1.195
--- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.194 Thu Sep  7 07:23:47 2006
+++ llvm/lib/Target/X86/X86AsmPrinter.cpp   Thu Sep  7 17:06:40 2006
@@ -23,88 +23,12 @@
 #include llvm/Type.h
 #include llvm/Assembly/Writer.h
 #include llvm/Support/Mangler.h
+#include llvm/Target/TargetAsmInfo.h
 using namespace llvm;
 
 Statistic llvm::EmittedInsts(asm-printer,
Number of machine instrs printed);
 
-X86TargetAsmInfo::X86TargetAsmInfo(X86TargetMachine TM) {
-  const X86Subtarget *Subtarget = TM.getSubtargetX86Subtarget();
-  
-  //FIXME - Should to be simplified.
-   
-  switch (Subtarget-TargetType) {
-  case X86Subtarget::isDarwin:
-AlignmentIsInBytes = false;
-GlobalPrefix = _;
-Data64bitsDirective = 0;   // we can't emit a 64-bit unit
-ZeroDirective = \t.space\t;  // .space N emits N zeros.
-PrivateGlobalPrefix = L; // Marker for constant pool idxs
-ConstantPoolSection = \t.const\n;
-JumpTableDataSection = \t.const\n; // FIXME: depends on PIC mode
-FourByteConstantSection = \t.literal4\n;
-EightByteConstantSection = \t.literal8\n;
-LCOMMDirective = \t.lcomm\t;
-COMMDirectiveTakesAlignment = false;
-HasDotTypeDotSizeDirective = false;
-StaticCtorsSection = .mod_init_func;
-StaticDtorsSection = .mod_term_func;
-InlineAsmStart = # InlineAsm Start;
-InlineAsmEnd = # InlineAsm End;
-SetDirective = \t.set;
-
-NeedsSet = 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;
-break;
-  case X86Subtarget::isCygwin:
-GlobalPrefix = _;
-COMMDirectiveTakesAlignment = false;
-HasDotTypeDotSizeDirective = false;
-StaticCtorsSection = \t.section .ctors,\aw\;
-StaticDtorsSection = \t.section .dtors,\aw\;
-break;
-  case X86Subtarget::isWindows:
-GlobalPrefix = _;
-HasDotTypeDotSizeDirective = false;
-break;
-  default: break;
-  }
-  
-  if (Subtarget-isFlavorIntel()) {
-GlobalPrefix = _;
-CommentString = ;;
-  
-PrivateGlobalPrefix = $;
-AlignDirective = \talign\t;
-ZeroDirective = \tdb\t;
-

[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp AlphaTargetMachine.cpp AlphaTargetMachine.h

2006-09-07 Thread Jim Laskey


Changes in directory llvm/lib/Target/Alpha:

AlphaAsmPrinter.cpp updated: 1.47 - 1.48
AlphaTargetMachine.cpp updated: 1.29 - 1.30
AlphaTargetMachine.h updated: 1.15 - 1.16
---
Log message:

Make target asm info a property of the target machine.


---
Diffs of the changes:  (+13 -11)

 AlphaAsmPrinter.cpp|   12 ++--
 AlphaTargetMachine.cpp |3 ++-
 AlphaTargetMachine.h   |9 +
 3 files changed, 13 insertions(+), 11 deletions(-)


Index: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp
diff -u llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.47 
llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.48
--- llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.47  Wed Sep  6 13:34:40 2006
+++ llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp   Thu Sep  7 17:06:40 2006
@@ -29,20 +29,13 @@
 namespace {
   Statistic EmittedInsts(asm-printer, Number of machine instrs printed);
   
-  struct VISIBILITY_HIDDEN AlphaTargetAsmInfo : public TargetAsmInfo {
-AlphaTargetAsmInfo() {
-  AlignmentIsInBytes = false;
-  PrivateGlobalPrefix = $;
-}
-  };
-
   struct VISIBILITY_HIDDEN AlphaAsmPrinter : public AsmPrinter {
 
 /// Unique incrementer for label values for referencing Global values.
 ///
 unsigned LabelNumber;
 
-AlphaAsmPrinter(std::ostream o, TargetMachine tm, TargetAsmInfo *T)
+AlphaAsmPrinter(std::ostream o, TargetMachine tm, const TargetAsmInfo *T)
: AsmPrinter(o, tm, T), LabelNumber(0) {
 }
 
@@ -82,8 +75,7 @@
 ///
 FunctionPass *llvm::createAlphaCodePrinterPass (std::ostream o,
   TargetMachine tm) {
-  AlphaTargetAsmInfo *TAI = new AlphaTargetAsmInfo();
-  return new AlphaAsmPrinter(o, tm, TAI);
+  return new AlphaAsmPrinter(o, tm, tm.getTargetAsmInfo());
 }
 
 #include AlphaGenAsmWriter.inc


Index: llvm/lib/Target/Alpha/AlphaTargetMachine.cpp
diff -u llvm/lib/Target/Alpha/AlphaTargetMachine.cpp:1.29 
llvm/lib/Target/Alpha/AlphaTargetMachine.cpp:1.30
--- llvm/lib/Target/Alpha/AlphaTargetMachine.cpp:1.29   Sun Sep  3 23:14:57 2006
+++ llvm/lib/Target/Alpha/AlphaTargetMachine.cppThu Sep  7 17:06:40 2006
@@ -53,7 +53,8 @@
   : DataLayout(e),
 FrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0),
 JITInfo(*this),
-Subtarget(M, FS) {
+Subtarget(M, FS),
+AsmInfo(NULL) {
 }
 
 


Index: llvm/lib/Target/Alpha/AlphaTargetMachine.h
diff -u llvm/lib/Target/Alpha/AlphaTargetMachine.h:1.15 
llvm/lib/Target/Alpha/AlphaTargetMachine.h:1.16
--- llvm/lib/Target/Alpha/AlphaTargetMachine.h:1.15 Sun Sep  3 23:14:57 2006
+++ llvm/lib/Target/Alpha/AlphaTargetMachine.h  Thu Sep  7 17:06:40 2006
@@ -20,6 +20,7 @@
 #include AlphaInstrInfo.h
 #include AlphaJITInfo.h
 #include AlphaSubtarget.h
+#include AlphaTargetAsmInfo.h
 
 namespace llvm {
 
@@ -31,9 +32,13 @@
   TargetFrameInfo FrameInfo;
   AlphaJITInfo JITInfo;
   AlphaSubtarget Subtarget;
+  AlphaTargetAsmInfo *AsmInfo;
   
 public:
   AlphaTargetMachine(const Module M, const std::string FS);
+  ~AlphaTargetMachine() {
+if (AsmInfo) delete AsmInfo;
+  }
 
   virtual const AlphaInstrInfo *getInstrInfo() const { return InstrInfo; }
   virtual const TargetFrameInfo  *getFrameInfo() const { return FrameInfo; }
@@ -46,6 +51,10 @@
 return JITInfo;
   }
 
+  virtual const TargetAsmInfo *createTargetAsmInfo() const {
+return static_castconst TargetAsmInfo *(new AlphaTargetAsmInfo(*this));
+  }
+
   static unsigned getJITMatchQuality();
   static unsigned getModuleMatchQuality(const Module M);
   



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


[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaTargetAsmInfo.cpp AlphaTargetAsmInfo.h

2006-09-07 Thread Jim Laskey


Changes in directory llvm/lib/Target/Alpha:

AlphaTargetAsmInfo.cpp added (r1.1)
AlphaTargetAsmInfo.h added (r1.1)
---
Log message:

Break out target asm info into separate files.


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

 AlphaTargetAsmInfo.cpp |   21 +
 AlphaTargetAsmInfo.h   |   30 ++
 2 files changed, 51 insertions(+)


Index: llvm/lib/Target/Alpha/AlphaTargetAsmInfo.cpp
diff -c /dev/null llvm/lib/Target/Alpha/AlphaTargetAsmInfo.cpp:1.1
*** /dev/null   Thu Sep  7 17:05:12 2006
--- llvm/lib/Target/Alpha/AlphaTargetAsmInfo.cppThu Sep  7 17:05:02 2006
***
*** 0 
--- 1,21 
+ //===-- AlphaTargetAsmInfo.cpp - Alpha asm properties ---*- C++ 
-*-===//
+ //
+ // The LLVM Compiler Infrastructure
+ //
+ // This file was developed by James M. Laskey and is distributed under the
+ // University of Illinois Open Source License. See LICENSE.TXT for details.
+ //
+ 
//===--===//
+ //
+ // This file contains the declarations of the AlphaTargetAsmInfo properties.
+ //
+ 
//===--===//
+ 
+ #include AlphaTargetAsmInfo.h
+ 
+ using namespace llvm;
+ 
+ AlphaTargetAsmInfo::AlphaTargetAsmInfo(const AlphaTargetMachine TM) {
+   AlignmentIsInBytes = false;
+   PrivateGlobalPrefix = $;
+ }


Index: llvm/lib/Target/Alpha/AlphaTargetAsmInfo.h
diff -c /dev/null llvm/lib/Target/Alpha/AlphaTargetAsmInfo.h:1.1
*** /dev/null   Thu Sep  7 17:05:23 2006
--- llvm/lib/Target/Alpha/AlphaTargetAsmInfo.h  Thu Sep  7 17:05:02 2006
***
*** 0 
--- 1,30 
+ //=-- AlphaTargetAsmInfo.h - Alpha asm properties -*- C++ 
-*--//
+ //
+ // The LLVM Compiler Infrastructure
+ //
+ // This file was developed by James M. Laskey and is distributed under the
+ // University of Illinois Open Source License. See LICENSE.TXT for details.
+ //
+ 
//===--===//
+ //
+ // This file contains the declaration of the AlphaTargetAsmInfo class.
+ //
+ 
//===--===//
+ 
+ #ifndef ALPHATARGETASMINFO_H
+ #define ALPHATARGETASMINFO_H
+ 
+ #include llvm/Target/TargetAsmInfo.h
+ 
+ namespace llvm {
+ 
+   // Forward declaration.
+   class AlphaTargetMachine;
+ 
+   struct AlphaTargetAsmInfo : public TargetAsmInfo {
+ AlphaTargetAsmInfo(const AlphaTargetMachine TM);
+   };
+ 
+ } // namespace llvm
+ 
+ #endif



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


[llvm-commits] CVS: llvm/lib/Target/X86/X86Subtarget.h

2006-09-07 Thread Chris Lattner


Changes in directory llvm/lib/Target/X86:

X86Subtarget.h updated: 1.14 - 1.15
---
Log message:

add a new value for the command line optn



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

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


Index: llvm/lib/Target/X86/X86Subtarget.h
diff -u llvm/lib/Target/X86/X86Subtarget.h:1.14 
llvm/lib/Target/X86/X86Subtarget.h:1.15
--- llvm/lib/Target/X86/X86Subtarget.h:1.14 Thu Sep  7 07:23:47 2006
+++ llvm/lib/Target/X86/X86Subtarget.h  Thu Sep  7 17:32:28 2006
@@ -24,7 +24,7 @@
 class X86Subtarget : public TargetSubtarget {
 public:
   enum AsmWriterFlavorTy {
-att, intel
+att, intel, unset
   };
 
 protected:



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


[llvm-commits] CVS: llvm/lib/Target/X86/X86Subtarget.cpp

2006-09-07 Thread Chris Lattner


Changes in directory llvm/lib/Target/X86:

X86Subtarget.cpp updated: 1.29 - 1.30
---
Log message:

Fix a cross-build issue.  The asmsyntax shouldn't be affected by the build 
host, it should be affected by the target.  Allow the command line option to
override in either case.


---
Diffs of the changes:  (+12 -8)

 X86Subtarget.cpp |   20 
 1 files changed, 12 insertions(+), 8 deletions(-)


Index: llvm/lib/Target/X86/X86Subtarget.cpp
diff -u llvm/lib/Target/X86/X86Subtarget.cpp:1.29 
llvm/lib/Target/X86/X86Subtarget.cpp:1.30
--- llvm/lib/Target/X86/X86Subtarget.cpp:1.29   Thu Sep  7 07:23:47 2006
+++ llvm/lib/Target/X86/X86Subtarget.cppThu Sep  7 17:29:41 2006
@@ -18,18 +18,12 @@
 using namespace llvm;
 
 cl::optX86Subtarget::AsmWriterFlavorTy
-AsmWriterFlavor(x86-asm-syntax,
+AsmWriterFlavor(x86-asm-syntax, cl::init(X86Subtarget::unset),
   cl::desc(Choose style of code to emit from X86 backend:),
   cl::values(
 clEnumValN(X86Subtarget::att,   att, Emit ATT-style assembly),
 clEnumValN(X86Subtarget::intel, intel,   Emit Intel-style assembly),
-clEnumValEnd),
-#ifdef _MSC_VER
-  cl::init(X86Subtarget::intel)
-#else
-  cl::init(X86Subtarget::att)
-#endif
-);
+clEnumValEnd));
 
 /// GetCpuIDAndInfo - Execute the specified cpuid and return the 4 values in 
the
 /// specified arguments.  If we can't run cpuid on the host, return true.
@@ -199,6 +193,16 @@
 #endif
   }
 
+  // If the asm syntax hasn't been overridden on the command line, use whatever
+  // the target wants.
+  if (AsmFlavor == X86Subtarget::unset) {
+if (TargetType == isWindows) {
+  AsmFlavor = X86Subtarget::intel;
+} else {
+  AsmFlavor = X86Subtarget::att;
+}
+  }
+
   if (TargetType == isDarwin || TargetType == isCygwin)
 stackAlignment = 16;
 }



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


[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/471.omnetpp/Makefile

2006-09-07 Thread Bill Wendling


Changes in directory llvm-test/External/SPEC/CINT2006/471.omnetpp:

Makefile updated: 1.3 - 1.4
---
Log message:

Added support for multi-directories: go benchmark and omnetpp (whatever
that is)


---
Diffs of the changes:  (+50 -7)

 Makefile |   57 ++---
 1 files changed, 50 insertions(+), 7 deletions(-)


Index: llvm-test/External/SPEC/CINT2006/471.omnetpp/Makefile
diff -u llvm-test/External/SPEC/CINT2006/471.omnetpp/Makefile:1.3 
llvm-test/External/SPEC/CINT2006/471.omnetpp/Makefile:1.4
--- llvm-test/External/SPEC/CINT2006/471.omnetpp/Makefile:1.3   Wed Sep  6 
15:41:12 2006
+++ llvm-test/External/SPEC/CINT2006/471.omnetpp/Makefile   Thu Sep  7 
18:17:18 2006
@@ -9,7 +9,8 @@
 FP_TOLERANCE= 0.1
 FP_ABSTOLERANCE = 0.01
 
-Source = $(addprefix $(SPEC_BENCH_DIR)/src/,   
\
+TOPSources:= \
+ $(addprefix $(SPEC_BENCH_DIR)/src/,   
\
EtherAppCli.cc EtherAppCli_n.cc EtherAppSrv.cc EtherAppSrv_n.cc 
\
EtherApp_m.cc EtherBus.cc EtherBus_n.cc EtherCtrl_m.cc  
\
EtherEncap.cc EtherEncap_n.cc EtherFrame_m.cc EtherHost_n.cc
\
@@ -17,12 +18,15 @@
EtherMAC_n.cc EtherSwitch_n.cc LargeNet_n.cc MACAddress.cc  
\
MACAddress_m.cc MACRelayUnitBase.cc MACRelayUnitNP.cc   
\
MACRelayUnitNP_n.cc MACRelayUnitPP.cc MACRelayUnitPP_n.cc   
\
-   MACRelayUnit_n.cc Networks_n.cc eth-index_n.cc utils.cc)
\
+   MACRelayUnit_n.cc Networks_n.cc eth-index_n.cc utils.cc)
+CMDENVSources := \
  $(addprefix $(SPEC_BENCH_DIR)/src/libs/cmdenv/,   
\
-   cmdenv.cc enumstr.cc heap.cc)   
\
+   cmdenv.cc enumstr.cc heap.cc)
+ENVIRSources  := \
  $(addprefix $(SPEC_BENCH_DIR)/src/libs/envir/,
\
akoutvectormgr.cc args.cc cenvir.cc cinifile.cc filemgrs.cc main.cc 
\
-   omnetapp.cc patmatch.cc platdep.cc seeds.cc slaveapp.cc 
speedmtr.cc)\
+   omnetapp.cc patmatch.cc platdep.cc seeds.cc slaveapp.cc speedmtr.cc)
+SIMSources:= \
  $(addprefix $(SPEC_BENCH_DIR)/src/libs/sim/,  
\
carray.cc cexception.cc cmessage.cc cpar.cc ctypes.cc task.cc   
\
cchannel.cc cfsm.cc cmodule.cc cpsquare.cc cvarhist.cc util.cc  
\
@@ -30,12 +34,24 @@
chead.cc cnetmod.cc csimul.cc distrib.cc cdetect.cc chist.cc
\
cobject.cc cstat.cc errmsg.cc cdispstr.cc cksplit.cc coutvect.cc
\
cstruct.cc onstartup.cc cenum.cc cllist.cc cpacket.cc ctopo.cc  
\
-   random.cc std/netpack.cc)   
\
-   $(SPEC_BENCH_DIR)/src/libs/spec/spec_qsort.cc
+   random.cc std/netpack.cc)
+SPECSources   := \
+ $(SPEC_BENCH_DIR)/src/libs/spec/spec_qsort.cc
+
+Source := $(notdir $(TOPSources))   \
+  $(addprefix cmdenv_,$(notdir $(CMDENVSources)))   \
+  $(addprefix envir_,$(notdir $(ENVIRSources))) \
+  $(addprefix sim_,$(notdir $(SIMSources))) \
+  $(addprefix spec_,$(notdir $(SPECSources)))
 
 CPPFLAGS += -DNDEBUG=1\
 -I$(SPEC_BENCH_DIR)/src/omnet_include \
--I$(SPEC_BENCH_DIR)/src/libs/envir
+-I$(SPEC_BENCH_DIR)/src/libs/cmdenv   \
+-I$(SPEC_BENCH_DIR)/src/libs/envir\
+-I$(SPEC_BENCH_DIR)/src/libs/sim  \
+-I$(SPEC_BENCH_DIR)/src/libs/spec \
+-I$(SPEC_BENCH_DIR)/src   \
+-I$(SPEC_BENCH_DIR)/src/include
 
 include ../../Makefile.spec2006
 
@@ -44,3 +60,30 @@
 
 LDFLAGS = -lstdc++ -lm
 LIBS= -lstdc++ -lm
+
+##===--===##
+# Copy the source files to the working directory. Some files may have
+# the same names but are in different directories, so we add a prefix
+# to the filenames to prevent overwriting files.
+##===--===##
+
+$(notdir $(TOPSources)) : % : $(SPEC_BENCH_DIR)/src/%
+   cp $ $@
+$(addprefix cmdenv_,$(notdir $(CMDENVSources))) : cmdenv_% : \
+$(SPEC_BENCH_DIR)/src/libs/cmdenv/%
+   cp $ $@
+$(addprefix envir_,$(notdir $(ENVIRSources))) : envir_% : \
+$(SPEC_BENCH_DIR)/src/libs/envir/%
+   cp $ $@
+$(addprefix sim_,$(notdir $(SIMSources))) : sim_% : \
+$(SPEC_BENCH_DIR)/src/libs/sim/%
+   cp $ $@
+$(notdir $(SPECSources)) : % : $(SPEC_BENCH_DIR)/src/libs/spec/%
+   cp $ $@
+
+##===--===##
+# Clean up all of the copied source files.
+##===--===##
+
+clean::
+   $(RM) -f 

[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/Makefile

2006-09-07 Thread Bill Wendling


Changes in directory llvm-test/External/SPEC/CINT2006:

Makefile updated: 1.2 - 1.3
---
Log message:

Added support for multi-directories: go benchmark and omnetpp (whatever
that is)


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

 Makefile |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)


Index: llvm-test/External/SPEC/CINT2006/Makefile
diff -u llvm-test/External/SPEC/CINT2006/Makefile:1.2 
llvm-test/External/SPEC/CINT2006/Makefile:1.3
--- llvm-test/External/SPEC/CINT2006/Makefile:1.2   Wed Sep  6 16:55:34 2006
+++ llvm-test/External/SPEC/CINT2006/Makefile   Thu Sep  7 18:17:18 2006
@@ -7,17 +7,17 @@
 LEVEL = ../../..
 PARALLEL_DIRS := \
 400.perlbench  \
-   401.bzip2  \
-   403.gcc\
-   429.mcf\
+401.bzip2  \
+403.gcc\
+429.mcf\
+445.gobmk  \
 456.hmmer  \
 458.sjeng  \
 462.libquantum \
 464.h264ref\
+471.omnetpp\
 473.astar
 
-# 445.gobmk -- Multiple Dirs
-# 471.omnetpp   -- Multiple Dirs
 # 483.xalancbmk -- Needs C++ Exceptions
 
 # Get the $(ARCH) setting



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


[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/445.gobmk/Makefile

2006-09-07 Thread Bill Wendling


Changes in directory llvm-test/External/SPEC/CINT2006/445.gobmk:

Makefile updated: 1.2 - 1.3
---
Log message:

Added support for multi-directories: go benchmark and omnetpp (whatever
that is)


---
Diffs of the changes:  (+55 -8)

 Makefile |   63 +++
 1 files changed, 55 insertions(+), 8 deletions(-)


Index: llvm-test/External/SPEC/CINT2006/445.gobmk/Makefile
diff -u llvm-test/External/SPEC/CINT2006/445.gobmk/Makefile:1.2 
llvm-test/External/SPEC/CINT2006/445.gobmk/Makefile:1.3
--- llvm-test/External/SPEC/CINT2006/445.gobmk/Makefile:1.2 Fri Sep  1 
20:31:50 2006
+++ llvm-test/External/SPEC/CINT2006/445.gobmk/Makefile Thu Sep  7 18:17:18 2006
@@ -6,30 +6,48 @@
 
 LEVEL = ../../../..
 
-Source = $(addprefix $(SPEC_BENCH_DIR)/src/sgf/,   
\
-   sgf_utils.c sgftree.c sgfnode.c)
\
+include $(LEVEL)/Makefile.config
+
+SGFSources   := \
+ $(addprefix $(SPEC_BENCH_DIR)/src/sgf/,   
\
+   sgf_utils.c sgftree.c sgfnode.c)
+ENGINESources:= \
  $(addprefix $(SPEC_BENCH_DIR)/src/engine/,
\
aftermath.c board.c cache.c combination.c dragon.c filllib.c
\
fuseki.c genmove.c hash.c influence.c interface.c matchpat.c
\
move_reasons.c movelist.c optics.c owl.c printutils.c readconnect.c 
\
reading.c score.c semeai.c sgfdecide.c sgffile.c shapes.c   
\
showbord.c utils.c value_moves.c worm.c globals.c persistent.c  
\
-   handicap.c surround.c)  
\
+   handicap.c surround.c)
+INTERFACESources := \
  $(addprefix $(SPEC_BENCH_DIR)/src/interface/, 
\
-   gtp.c main.c play_ascii.c play_gtp.c play_solo.c play_test.c)   
\
+   gtp.c main.c play_ascii.c play_gtp.c play_solo.c play_test.c)
+PATTERNSSources  := \
  $(addprefix $(SPEC_BENCH_DIR)/src/patterns/,  
\
connections.c dfa.c helpers.c transform.c owl_attackpat.c conn.c
\
patterns.c apatterns.c dpatterns.c owl_vital_apat.c eyes.c  
\
influence.c barriers.c endgame.c aa_attackpat.c owl_defendpat.c 
\
-   fusekipat.c fuseki9.c fuseki13.c fuseki19.c josekidb.c handipat.c)  
\
+   fusekipat.c fuseki9.c fuseki13.c fuseki19.c josekidb.c handipat.c)
+UTILSSources := \
  $(addprefix $(SPEC_BENCH_DIR)/src/utils/, 
\
getopt.c getopt1.c gg_utils.c random.c)
 
-include ../../Makefile.spec2006
+Source := $(addprefix sgf_,$(notdir $(SGFSources))) \
+  $(addprefix engine_,$(notdir $(ENGINESources)))   \
+  $(addprefix interface_,$(notdir $(INTERFACESources))) \
+  $(addprefix patterns_,$(notdir $(PATTERNSSources)))   \
+  $(addprefix utils_,$(notdir $(UTILSSources)))
 
-CPPFLAGS += -DHAVE_CONFIG_H
+CPPFLAGS += -DHAVE_CONFIG_H   \
+-I$(SPEC_BENCH_DIR)/src/sgf   \
+-I$(SPEC_BENCH_DIR)/src/engine\
+-I$(SPEC_BENCH_DIR)/src/interface \
+-I$(SPEC_BENCH_DIR)/src/patterns  \
+-I$(SPEC_BENCH_DIR)/src/utils \
+-I$(SPEC_BENCH_DIR)/src   \
+-I$(SPEC_BENCH_DIR)/src/include 
 
-## FIXME: Multiple *.tst files
+include ../../Makefile.spec2006
 
 ifeq ($(RUN_TYPE),test)
   RUN_OPTIONS := --quiet --mode gtp
@@ -40,3 +58,32 @@
   STDIN_FILENAME  := arb.tst
   STDOUT_FILENAME := arb.out
 endif
+
+##===--===##
+# Copy the source files to the working directory. Some files have the
+# same names but are in different directories, so we add a prefix to
+# the filenames to prevent overwriting files.
+##===--===##
+
+$(addprefix sgf_,$(notdir $(SGFSources))) : sgf_% : \
+$(SPEC_BENCH_DIR)/src/sgf/%
+   cp $ $@
+$(addprefix engine_,$(notdir $(ENGINESources))) : engine_% : \
+$(SPEC_BENCH_DIR)/src/engine/%
+   cp $ $@
+$(addprefix interface_,$(notdir $(INTERFACESources))) : interface_% : \
+$(SPEC_BENCH_DIR)/src/interface/%
+   cp $ $@
+$(addprefix patterns_,$(notdir $(PATTERNSSources))) : patterns_% : \
+$(SPEC_BENCH_DIR)/src/patterns/%
+   cp $ $@
+$(addprefix utils_,$(notdir $(UTILSSources))) : utils_% : \
+$(SPEC_BENCH_DIR)/src/utils/%
+   cp $ $@
+
+##===--===##
+# Clean up all of the copied source files.
+##===--===##
+
+clean::
+   $(RM) -f $(Source)



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu

[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/400.perlbench/Makefile

2006-09-07 Thread Bill Wendling


Changes in directory llvm-test/External/SPEC/CINT2006/400.perlbench:

Makefile updated: 1.4 - 1.5
---
Log message:

Added support for multi-directories: go benchmark and omnetpp (whatever
that is)


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

 Makefile |4 
 1 files changed, 4 insertions(+)


Index: llvm-test/External/SPEC/CINT2006/400.perlbench/Makefile
diff -u llvm-test/External/SPEC/CINT2006/400.perlbench/Makefile:1.4 
llvm-test/External/SPEC/CINT2006/400.perlbench/Makefile:1.5
--- llvm-test/External/SPEC/CINT2006/400.perlbench/Makefile:1.4 Wed Sep  6 
19:08:49 2006
+++ llvm-test/External/SPEC/CINT2006/400.perlbench/Makefile Thu Sep  7 
18:17:18 2006
@@ -7,14 +7,18 @@
 
 LEVEL = ../../../..
 
+include $(LEVEL)/Makefile.config
+
 CPPFLAGS += -DPERL_CORE
 
+ifeq ($(OS),Darwin)
 ifeq ($(ARCH),PowerPC)
   CPPFLAGS += -DSPEC_CPU_MACOSX_PPC
 endif
 ifeq ($(ARCH),x86)
   CPPFLAGS += -DSPEC_CPU_MACOSX_IA32
 endif
+endif
 
 ifeq ($(ENDIAN),little)
   CPPFLAGS += -D__LITTLE_ENDIAN__



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


[llvm-commits] CVS: llvm/lib/Analysis/PostDominators.cpp

2006-09-07 Thread Devang Patel


Changes in directory llvm/lib/Analysis:

PostDominators.cpp updated: 1.58 - 1.59
---
Log message:

Use iterative do-while loop instead of recursive DFSPass calls to
reduce amount of stack space used at runtime.


---
Diffs of the changes:  (+29 -16)

 PostDominators.cpp |   45 +
 1 files changed, 29 insertions(+), 16 deletions(-)


Index: llvm/lib/Analysis/PostDominators.cpp
diff -u llvm/lib/Analysis/PostDominators.cpp:1.58 
llvm/lib/Analysis/PostDominators.cpp:1.59
--- llvm/lib/Analysis/PostDominators.cpp:1.58   Sun Aug 27 17:30:17 2006
+++ llvm/lib/Analysis/PostDominators.cppThu Sep  7 18:22:37 2006
@@ -28,23 +28,36 @@
 
 unsigned ImmediatePostDominators::DFSPass(BasicBlock *V, InfoRec VInfo,
   unsigned N) {
-  VInfo.Semi = ++N;
-  VInfo.Label = V;
-  
-  Vertex.push_back(V);// Vertex[n] = V;
-  //Info[V].Ancestor = 0; // Ancestor[n] = 0
-  //Child[V] = 0; // Child[v] = 0
-  VInfo.Size = 1; // Size[v] = 1
-  
-  // For PostDominators, we want to walk predecessors rather than successors
-  // as we do in forward Dominators.
-  for (pred_iterator PI = pred_begin(V), PE = pred_end(V); PI != PE; ++PI) {
-InfoRec SuccVInfo = Info[*PI];
-if (SuccVInfo.Semi == 0) {
-  SuccVInfo.Parent = V;
-  N = DFSPass(*PI, SuccVInfo, N);
+
+  std::vectorstd::pairBasicBlock *, InfoRec *  workStack;
+  workStack.push_back(std::make_pair(V, VInfo));
+
+  do {
+BasicBlock *currentBB = workStack.back().first; 
+InfoRec *currentVInfo = workStack.back().second;
+workStack.pop_back();
+
+currentVInfo-Semi = ++N;
+currentVInfo-Label = currentBB;
+
+Vertex.push_back(currentBB);  // Vertex[n] = current;
+  // Info[currentBB].Ancestor = 0; 
+  // Ancestor[n] = 0
+  // Child[currentBB] = 0;
+currentVInfo-Size = 1;   // Size[currentBB] = 1
+
+// For PostDominators, we want to walk predecessors rather than successors
+// as we do in forward Dominators.
+for (pred_iterator PI = pred_begin(currentBB), PE = pred_end(currentBB); 
+PI != PE; ++PI) {
+  InfoRec SuccVInfo = Info[*PI];
+  if (SuccVInfo.Semi == 0) {
+   SuccVInfo.Parent = currentBB;
+
+   workStack.push_back(std::make_pair(*PI, SuccVInfo));   
+  }
 }
-  }
+  } while (!workStack.empty());
   return N;
 }
 



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


[llvm-commits] CVS: llvm/lib/Analysis/PostDominators.cpp

2006-09-07 Thread Devang Patel


Changes in directory llvm/lib/Analysis:

PostDominators.cpp updated: 1.59 - 1.60
---
Log message:

Untabify.


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

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


Index: llvm/lib/Analysis/PostDominators.cpp
diff -u llvm/lib/Analysis/PostDominators.cpp:1.59 
llvm/lib/Analysis/PostDominators.cpp:1.60
--- llvm/lib/Analysis/PostDominators.cpp:1.59   Thu Sep  7 18:22:37 2006
+++ llvm/lib/Analysis/PostDominators.cppThu Sep  7 18:29:19 2006
@@ -49,12 +49,12 @@
 // For PostDominators, we want to walk predecessors rather than successors
 // as we do in forward Dominators.
 for (pred_iterator PI = pred_begin(currentBB), PE = pred_end(currentBB); 
-PI != PE; ++PI) {
+ PI != PE; ++PI) {
   InfoRec SuccVInfo = Info[*PI];
   if (SuccVInfo.Semi == 0) {
-   SuccVInfo.Parent = currentBB;
+SuccVInfo.Parent = currentBB;
 
-   workStack.push_back(std::make_pair(*PI, SuccVInfo));   
+workStack.push_back(std::make_pair(*PI, SuccVInfo));   
   }
 }
   } while (!workStack.empty());



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


[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaTargetMachine.cpp AlphaTargetMachine.h

2006-09-07 Thread Jim Laskey


Changes in directory llvm/lib/Target/Alpha:

AlphaTargetMachine.cpp updated: 1.30 - 1.31
AlphaTargetMachine.h updated: 1.16 - 1.17
---
Log message:

1. Remove condition on delete.

2. Protect and outline createTargetAsmInfo.

3. Misc. kruft.


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

 AlphaTargetMachine.cpp |8 ++--
 AlphaTargetMachine.h   |   12 +++-
 2 files changed, 9 insertions(+), 11 deletions(-)


Index: llvm/lib/Target/Alpha/AlphaTargetMachine.cpp
diff -u llvm/lib/Target/Alpha/AlphaTargetMachine.cpp:1.30 
llvm/lib/Target/Alpha/AlphaTargetMachine.cpp:1.31
--- llvm/lib/Target/Alpha/AlphaTargetMachine.cpp:1.30   Thu Sep  7 17:06:40 2006
+++ llvm/lib/Target/Alpha/AlphaTargetMachine.cppThu Sep  7 18:39:26 2006
@@ -12,6 +12,7 @@
 
 #include Alpha.h
 #include AlphaJITInfo.h
+#include AlphaTargetAsmInfo.h
 #include AlphaTargetMachine.h
 #include llvm/Module.h
 #include llvm/PassManager.h
@@ -24,6 +25,10 @@
   RegisterTargetAlphaTargetMachine X(alpha,   Alpha (incomplete));
 }
 
+const TargetAsmInfo *AlphaTargetMachine::createTargetAsmInfo() const {
+  return new AlphaTargetAsmInfo(*this);
+}
+
 unsigned AlphaTargetMachine::getModuleMatchQuality(const Module M) {
   // We strongly match alpha*.
   std::string TT = M.getTargetTriple();
@@ -53,8 +58,7 @@
   : DataLayout(e),
 FrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0),
 JITInfo(*this),
-Subtarget(M, FS),
-AsmInfo(NULL) {
+Subtarget(M, FS) {
 }
 
 


Index: llvm/lib/Target/Alpha/AlphaTargetMachine.h
diff -u llvm/lib/Target/Alpha/AlphaTargetMachine.h:1.16 
llvm/lib/Target/Alpha/AlphaTargetMachine.h:1.17
--- llvm/lib/Target/Alpha/AlphaTargetMachine.h:1.16 Thu Sep  7 17:06:40 2006
+++ llvm/lib/Target/Alpha/AlphaTargetMachine.h  Thu Sep  7 18:39:26 2006
@@ -20,7 +20,6 @@
 #include AlphaInstrInfo.h
 #include AlphaJITInfo.h
 #include AlphaSubtarget.h
-#include AlphaTargetAsmInfo.h
 
 namespace llvm {
 
@@ -32,13 +31,12 @@
   TargetFrameInfo FrameInfo;
   AlphaJITInfo JITInfo;
   AlphaSubtarget Subtarget;
-  AlphaTargetAsmInfo *AsmInfo;
+  
+protected:
+  virtual const TargetAsmInfo *createTargetAsmInfo() const;
   
 public:
   AlphaTargetMachine(const Module M, const std::string FS);
-  ~AlphaTargetMachine() {
-if (AsmInfo) delete AsmInfo;
-  }
 
   virtual const AlphaInstrInfo *getInstrInfo() const { return InstrInfo; }
   virtual const TargetFrameInfo  *getFrameInfo() const { return FrameInfo; }
@@ -51,10 +49,6 @@
 return JITInfo;
   }
 
-  virtual const TargetAsmInfo *createTargetAsmInfo() const {
-return static_castconst TargetAsmInfo *(new AlphaTargetAsmInfo(*this));
-  }
-
   static unsigned getJITMatchQuality();
   static unsigned getModuleMatchQuality(const Module M);
   



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


[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcTargetMachine.cpp SparcTargetMachine.h

2006-09-07 Thread Jim Laskey


Changes in directory llvm/lib/Target/Sparc:

SparcTargetMachine.cpp updated: 1.50 - 1.51
SparcTargetMachine.h updated: 1.16 - 1.17
---
Log message:

1. Remove condition on delete.

2. Protect and outline createTargetAsmInfo.

3. Misc. kruft.


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

 SparcTargetMachine.cpp |5 +
 SparcTargetMachine.h   |9 -
 2 files changed, 9 insertions(+), 5 deletions(-)


Index: llvm/lib/Target/Sparc/SparcTargetMachine.cpp
diff -u llvm/lib/Target/Sparc/SparcTargetMachine.cpp:1.50 
llvm/lib/Target/Sparc/SparcTargetMachine.cpp:1.51
--- llvm/lib/Target/Sparc/SparcTargetMachine.cpp:1.50   Sun Sep  3 23:14:57 2006
+++ llvm/lib/Target/Sparc/SparcTargetMachine.cppThu Sep  7 18:39:26 2006
@@ -10,6 +10,7 @@
 //
 
//===--===//
 
+#include SparcTargetAsmInfo.h
 #include SparcTargetMachine.h
 #include Sparc.h
 #include llvm/Module.h
@@ -23,6 +24,10 @@
   RegisterTargetSparcTargetMachine X(sparc,   SPARC);
 }
 
+const TargetAsmInfo *SparcTargetMachine::createTargetAsmInfo() const {
+  return new SparcTargetAsmInfo(*this);
+}
+
 /// SparcTargetMachine ctor - Create an ILP32 architecture model
 ///
 SparcTargetMachine::SparcTargetMachine(const Module M, const std::string FS)


Index: llvm/lib/Target/Sparc/SparcTargetMachine.h
diff -u llvm/lib/Target/Sparc/SparcTargetMachine.h:1.16 
llvm/lib/Target/Sparc/SparcTargetMachine.h:1.17
--- llvm/lib/Target/Sparc/SparcTargetMachine.h:1.16 Thu Sep  7 17:06:40 2006
+++ llvm/lib/Target/Sparc/SparcTargetMachine.h  Thu Sep  7 18:39:26 2006
@@ -19,7 +19,6 @@
 #include llvm/Target/TargetFrameInfo.h
 #include SparcInstrInfo.h
 #include SparcSubtarget.h
-#include SparcTargetAsmInfo.h
 
 namespace llvm {
 
@@ -30,6 +29,10 @@
   SparcSubtarget Subtarget;
   SparcInstrInfo InstrInfo;
   TargetFrameInfo FrameInfo;
+  
+protected:
+  virtual const TargetAsmInfo *createTargetAsmInfo() const;
+  
 public:
   SparcTargetMachine(const Module M, const std::string FS);
 
@@ -42,10 +45,6 @@
   virtual const TargetData   *getTargetData() const { return DataLayout; }
   static unsigned getModuleMatchQuality(const Module M);
 
-  virtual const TargetAsmInfo *createTargetAsmInfo() const {
-return static_castconst TargetAsmInfo *(new SparcTargetAsmInfo(*this));
-  }
-  
   // Pass Pipeline Configuration
   virtual bool addInstSelector(FunctionPassManager PM, bool Fast);
   virtual bool addPreEmitPass(FunctionPassManager PM, bool Fast);



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


[llvm-commits] CVS: llvm/lib/Target/IA64/IA64TargetMachine.cpp IA64TargetMachine.h

2006-09-07 Thread Jim Laskey


Changes in directory llvm/lib/Target/IA64:

IA64TargetMachine.cpp updated: 1.20 - 1.21
IA64TargetMachine.h updated: 1.14 - 1.15
---
Log message:

1. Remove condition on delete.

2. Protect and outline createTargetAsmInfo.

3. Misc. kruft.


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

 IA64TargetMachine.cpp |5 +
 IA64TargetMachine.h   |9 -
 2 files changed, 9 insertions(+), 5 deletions(-)


Index: llvm/lib/Target/IA64/IA64TargetMachine.cpp
diff -u llvm/lib/Target/IA64/IA64TargetMachine.cpp:1.20 
llvm/lib/Target/IA64/IA64TargetMachine.cpp:1.21
--- llvm/lib/Target/IA64/IA64TargetMachine.cpp:1.20 Sun Sep  3 23:14:57 2006
+++ llvm/lib/Target/IA64/IA64TargetMachine.cpp  Thu Sep  7 18:39:26 2006
@@ -11,6 +11,7 @@
 //
 
//===--===//
 
+#include IA64TargetAsmInfo.h
 #include IA64TargetMachine.h
 #include IA64.h
 #include llvm/Module.h
@@ -29,6 +30,10 @@
   RegisterTargetIA64TargetMachine X(ia64,   IA-64 (Itanium));
 }
 
+const TargetAsmInfo *IA64TargetMachine::createTargetAsmInfo() const {
+  return new IA64TargetAsmInfo(*this);
+}
+
 unsigned IA64TargetMachine::getModuleMatchQuality(const Module M) {
   // we match [iI][aA]*64
   bool seenIA64=false;


Index: llvm/lib/Target/IA64/IA64TargetMachine.h
diff -u llvm/lib/Target/IA64/IA64TargetMachine.h:1.14 
llvm/lib/Target/IA64/IA64TargetMachine.h:1.15
--- llvm/lib/Target/IA64/IA64TargetMachine.h:1.14   Thu Sep  7 17:06:40 2006
+++ llvm/lib/Target/IA64/IA64TargetMachine.hThu Sep  7 18:39:26 2006
@@ -19,7 +19,6 @@
 #include llvm/Target/TargetFrameInfo.h
 #include IA64InstrInfo.h
 #include IA64ISelLowering.h
-#include IA64TargetAsmInfo.h
 
 namespace llvm {
 
@@ -29,6 +28,10 @@
   TargetFrameInfoFrameInfo;
   //IA64JITInfo  JITInfo;
   IA64TargetLowering TLInfo;
+  
+protected:
+  virtual const TargetAsmInfo *createTargetAsmInfo() const;
+
 public:
   IA64TargetMachine(const Module M, const std::string FS);
 
@@ -42,10 +45,6 @@
   }
   virtual const TargetData   *getTargetData() const { return DataLayout; }
   
-  virtual const TargetAsmInfo *createTargetAsmInfo() const {
-return static_castconst TargetAsmInfo *(new IA64TargetAsmInfo(*this));
-  }
-
   static unsigned getModuleMatchQuality(const Module M);
 
   // Pass Pipeline Configuration



___
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/PPCTargetMachine.cpp PPCTargetMachine.h

2006-09-07 Thread Jim Laskey


Changes in directory llvm/lib/Target/PowerPC:

PPCTargetMachine.cpp updated: 1.104 - 1.105
PPCTargetMachine.h updated: 1.24 - 1.25
---
Log message:

1. Remove condition on delete.

2. Protect and outline createTargetAsmInfo.

3. Misc. kruft.


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

 PPCTargetMachine.cpp |5 +
 PPCTargetMachine.h   |9 -
 2 files changed, 9 insertions(+), 5 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
diff -u llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.104 
llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.105
--- llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.104  Wed Sep  6 13:34:40 2006
+++ llvm/lib/Target/PowerPC/PPCTargetMachine.cppThu Sep  7 18:39:26 2006
@@ -12,6 +12,7 @@
 
//===--===//
 
 #include PPC.h
+#include PPCTargetAsmInfo.h
 #include PPCTargetMachine.h
 #include llvm/Module.h
 #include llvm/PassManager.h
@@ -26,6 +27,10 @@
   Y(ppc64,   PowerPC 64);
 }
 
+const TargetAsmInfo *PPCTargetMachine::createTargetAsmInfo() const {
+  return new DarwinTargetAsmInfo(*this);
+}
+
 unsigned PPC32TargetMachine::getJITMatchQuality() {
 #if defined(__POWERPC__) || defined (__ppc__) || defined(_POWER)
   if (sizeof(void*) == 4)


Index: llvm/lib/Target/PowerPC/PPCTargetMachine.h
diff -u llvm/lib/Target/PowerPC/PPCTargetMachine.h:1.24 
llvm/lib/Target/PowerPC/PPCTargetMachine.h:1.25
--- llvm/lib/Target/PowerPC/PPCTargetMachine.h:1.24 Thu Sep  7 17:06:40 2006
+++ llvm/lib/Target/PowerPC/PPCTargetMachine.h  Thu Sep  7 18:39:26 2006
@@ -19,7 +19,6 @@
 #include PPCJITInfo.h
 #include PPCInstrInfo.h
 #include PPCISelLowering.h
-#include PPCTargetAsmInfo.h
 #include llvm/Target/TargetMachine.h
 #include llvm/Target/TargetData.h
 
@@ -37,6 +36,10 @@
   PPCJITInfo  JITInfo;
   PPCTargetLowering   TLInfo;
   InstrItineraryData  InstrItins;
+  
+protected:
+  virtual const TargetAsmInfo *createTargetAsmInfo() const;
+  
 public:
   PPCTargetMachine(const Module M, const std::string FS, bool is64Bit);
 
@@ -56,10 +59,6 @@
 return InstrItins;
   }
   
-  virtual const TargetAsmInfo *createTargetAsmInfo() const {
-return static_castconst TargetAsmInfo *(new DarwinTargetAsmInfo(*this));
-  }
-  
   // Pass Pipeline Configuration
   virtual bool addInstSelector(FunctionPassManager PM, bool Fast);
   virtual bool addPreEmitPass(FunctionPassManager PM, bool Fast);



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


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

2006-09-07 Thread Jim Laskey


Changes in directory llvm/lib/Target:

TargetMachine.cpp updated: 1.54 - 1.55
---
Log message:

1. Remove condition on delete.

2. Protect and outline createTargetAsmInfo.

3. Misc. kruft.


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

 TargetMachine.cpp |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Target/TargetMachine.cpp
diff -u llvm/lib/Target/TargetMachine.cpp:1.54 
llvm/lib/Target/TargetMachine.cpp:1.55
--- llvm/lib/Target/TargetMachine.cpp:1.54  Thu Sep  7 17:06:40 2006
+++ llvm/lib/Target/TargetMachine.cpp   Thu Sep  7 18:39:26 2006
@@ -96,7 +96,7 @@
 //
 
 TargetMachine::~TargetMachine() {
-  if (AsmInfo) delete AsmInfo;
+  delete AsmInfo;
 }
 
 /// getRelocationModel - Returns the code generation relocation model. The



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


[llvm-commits] CVS: llvm/lib/Target/X86/X86TargetMachine.cpp X86TargetMachine.h

2006-09-07 Thread Jim Laskey


Changes in directory llvm/lib/Target/X86:

X86TargetMachine.cpp updated: 1.125 - 1.126
X86TargetMachine.h updated: 1.39 - 1.40
---
Log message:

1. Remove condition on delete.

2. Protect and outline createTargetAsmInfo.

3. Misc. kruft.


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

 X86TargetMachine.cpp |5 +
 X86TargetMachine.h   |9 -
 2 files changed, 9 insertions(+), 5 deletions(-)


Index: llvm/lib/Target/X86/X86TargetMachine.cpp
diff -u llvm/lib/Target/X86/X86TargetMachine.cpp:1.125 
llvm/lib/Target/X86/X86TargetMachine.cpp:1.126
--- llvm/lib/Target/X86/X86TargetMachine.cpp:1.125  Mon Sep  4 13:48:41 2006
+++ llvm/lib/Target/X86/X86TargetMachine.cppThu Sep  7 18:39:26 2006
@@ -11,6 +11,7 @@
 //
 
//===--===//
 
+#include X86TargetAsmInfo.h
 #include X86TargetMachine.h
 #include X86.h
 #include llvm/Module.h
@@ -35,6 +36,10 @@
   RegisterTargetX86TargetMachine X(x86,   IA-32 (Pentium and above));
 }
 
+const TargetAsmInfo *X86TargetMachine::createTargetAsmInfo() const {
+  return new X86TargetAsmInfo(*this);
+}
+
 unsigned X86TargetMachine::getJITMatchQuality() {
 #if defined(i386) || defined(__i386__) || defined(__x86__) || defined(_M_IX86)
   return 10;


Index: llvm/lib/Target/X86/X86TargetMachine.h
diff -u llvm/lib/Target/X86/X86TargetMachine.h:1.39 
llvm/lib/Target/X86/X86TargetMachine.h:1.40
--- llvm/lib/Target/X86/X86TargetMachine.h:1.39 Thu Sep  7 17:06:40 2006
+++ llvm/lib/Target/X86/X86TargetMachine.h  Thu Sep  7 18:39:26 2006
@@ -21,7 +21,6 @@
 #include X86InstrInfo.h
 #include X86JITInfo.h
 #include X86Subtarget.h
-#include X86TargetAsmInfo.h
 #include X86ISelLowering.h
 
 namespace llvm {
@@ -33,6 +32,10 @@
   X86InstrInfo  InstrInfo;
   X86JITInfoJITInfo;
   X86TargetLowering TLInfo;
+
+protected:
+  virtual const TargetAsmInfo *createTargetAsmInfo() const;
+  
 public:
   X86TargetMachine(const Module M, const std::string FS);
 
@@ -51,10 +54,6 @@
   static unsigned getModuleMatchQuality(const Module M);
   static unsigned getJITMatchQuality();
   
-  virtual const TargetAsmInfo *createTargetAsmInfo() const {
-return static_castconst TargetAsmInfo *(new X86TargetAsmInfo(*this));
-  }
-  
   // Set up the pass pipeline.
   virtual bool addInstSelector(FunctionPassManager PM, bool Fast);  
   virtual bool addPostRegAlloc(FunctionPassManager PM, bool Fast);



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


[llvm-commits] CVS: llvm/lib/Target/ARM/ARMTargetMachine.cpp ARMTargetMachine.h

2006-09-07 Thread Jim Laskey


Changes in directory llvm/lib/Target/ARM:

ARMTargetMachine.cpp updated: 1.8 - 1.9
ARMTargetMachine.h updated: 1.4 - 1.5
---
Log message:

1. Remove condition on delete.

2. Protect and outline createTargetAsmInfo.

3. Misc. kruft.


---
Diffs of the changes:  (+11 -5)

 ARMTargetMachine.cpp |7 +++
 ARMTargetMachine.h   |9 -
 2 files changed, 11 insertions(+), 5 deletions(-)


Index: llvm/lib/Target/ARM/ARMTargetMachine.cpp
diff -u llvm/lib/Target/ARM/ARMTargetMachine.cpp:1.8 
llvm/lib/Target/ARM/ARMTargetMachine.cpp:1.9
--- llvm/lib/Target/ARM/ARMTargetMachine.cpp:1.8Sun Sep  3 23:14:57 2006
+++ llvm/lib/Target/ARM/ARMTargetMachine.cppThu Sep  7 18:39:26 2006
@@ -11,6 +11,7 @@
 //
 
//===--===//
 
+#include ARMTargetAsmInfo.h
 #include ARMTargetMachine.h
 #include ARMFrameInfo.h
 #include ARM.h
@@ -24,6 +25,12 @@
   RegisterTargetARMTargetMachine X(arm,   ARM);
 }
 
+
+const TargetAsmInfo *ARMTargetMachine::createTargetAsmInfo() const {
+  return new ARMTargetAsmInfo(*this);
+}
+
+
 /// TargetMachine ctor - Create an ILP32 architecture model
 ///
 ARMTargetMachine::ARMTargetMachine(const Module M, const std::string FS)


Index: llvm/lib/Target/ARM/ARMTargetMachine.h
diff -u llvm/lib/Target/ARM/ARMTargetMachine.h:1.4 
llvm/lib/Target/ARM/ARMTargetMachine.h:1.5
--- llvm/lib/Target/ARM/ARMTargetMachine.h:1.4  Thu Sep  7 17:06:40 2006
+++ llvm/lib/Target/ARM/ARMTargetMachine.h  Thu Sep  7 18:39:26 2006
@@ -20,7 +20,6 @@
 #include llvm/Target/TargetFrameInfo.h
 #include ARMInstrInfo.h
 #include ARMFrameInfo.h
-#include ARMTargetAsmInfo.h
 
 namespace llvm {
 
@@ -30,6 +29,10 @@
   const TargetData DataLayout;   // Calculates type size  alignment
   ARMInstrInfo InstrInfo;
   ARMFrameInfo FrameInfo;
+  
+protected:
+  virtual const TargetAsmInfo *createTargetAsmInfo() const;
+
 public:
   ARMTargetMachine(const Module M, const std::string FS);
 
@@ -41,10 +44,6 @@
   virtual const TargetData   *getTargetData() const { return DataLayout; }
   static unsigned getModuleMatchQuality(const Module M);
 
-  virtual const TargetAsmInfo *createTargetAsmInfo() const {
-return static_castconst TargetAsmInfo *(new ARMTargetAsmInfo(*this));
-  }
-
   // Pass Pipeline Configuration
   virtual bool addInstSelector(FunctionPassManager PM, bool Fast);
   virtual bool addAssemblyEmitter(FunctionPassManager PM, bool Fast, 



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


[llvm-commits] CVS: llvm/include/llvm/Target/TargetMachine.h

2006-09-07 Thread Jim Laskey


Changes in directory llvm/include/llvm/Target:

TargetMachine.h updated: 1.70 - 1.71
---
Log message:

1. Remove condition on delete.

2. Protect and outline createTargetAsmInfo.

3. Misc. kruft.


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

 TargetMachine.h |8 
 1 files changed, 4 insertions(+), 4 deletions(-)


Index: llvm/include/llvm/Target/TargetMachine.h
diff -u llvm/include/llvm/Target/TargetMachine.h:1.70 
llvm/include/llvm/Target/TargetMachine.h:1.71
--- llvm/include/llvm/Target/TargetMachine.h:1.70   Thu Sep  7 17:06:40 2006
+++ llvm/include/llvm/Target/TargetMachine.hThu Sep  7 18:39:26 2006
@@ -76,6 +76,10 @@
   ///
   mutable const TargetAsmInfo *AsmInfo;
   
+  /// createTargetAsmInfo - Create a new instance of target specific asm
+  /// information.
+  virtual const TargetAsmInfo *createTargetAsmInfo() const { return NULL; }
+
 public:
   virtual ~TargetMachine();
 
@@ -111,10 +115,6 @@
 return AsmInfo;
   }
   
-  /// createTargetAsmInfo - Create a new instance of target specific asm
-  /// information.
-  virtual const TargetAsmInfo *createTargetAsmInfo() const { return NULL; }
-
   /// getSubtarget - This method returns a pointer to the specified type of
   /// TargetSubtarget.  In debug builds, it verifies that the object being
   /// returned is of the correct type.



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


[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/481.wrf/Makefile

2006-09-07 Thread Bill Wendling


Changes in directory llvm-test/External/SPEC/CFP2006/481.wrf:

Makefile updated: 1.2 - 1.3
---
Log message:

Added support for SPEC benchmarks with mutiple directories. Stolen from the
POVRay way of doing things.


---
Diffs of the changes:  (+36 -5)

 Makefile |   41 -
 1 files changed, 36 insertions(+), 5 deletions(-)


Index: llvm-test/External/SPEC/CFP2006/481.wrf/Makefile
diff -u llvm-test/External/SPEC/CFP2006/481.wrf/Makefile:1.2 
llvm-test/External/SPEC/CFP2006/481.wrf/Makefile:1.3
--- llvm-test/External/SPEC/CFP2006/481.wrf/Makefile:1.2Wed Sep  6 
15:41:12 2006
+++ llvm-test/External/SPEC/CFP2006/481.wrf/MakefileThu Sep  7 19:59:14 2006
@@ -9,7 +9,8 @@
 FP_TOLERANCE= 5e-2
 FP_ABSTOLERANCE = 1.0e-2
 
-Source = wrf_num_bytes_between.c pack_utils.c module_driver_constants.F90  
\
+TOPSources := \
+ wrf_num_bytes_between.c pack_utils.c module_driver_constants.F90  
\
  module_domain.F90 module_integrate.F90 module_timing.F90  
\
  module_configure.F90 module_tiles.F90 module_machine.F90  
\
  module_nesting.F90 module_wrf_error.F90 module_state_description.F90  
\
@@ -51,7 +52,8 @@
  module_cumulus_driver.F90 module_microphysics_driver.F90  
\
  solve_em.F90 start_em.F90 internal_header_util.F90 io_int.F90 
\
  init_modules_em.F90 init_modules.F90 wrf_io.f90 field_routines.f90
\
- wrf.F90   
\
+ wrf.F90
+NETCDFSources := \
  $(addprefix $(SPEC_BENCH_DIR)/src/netcdf/,
\
attr.c dim.c error.c fort-attio.c fort-control.c fort-dim.c 
\
fort-genatt.c fort-geninq.c fort-genvar.c fort-lib.c fort-misc.c
\
@@ -59,8 +61,9 @@
fort-varmio.c fort-varsio.c libvers.c nc.c ncx.c posixio.c putget.c 
\
string.c v1hpg.c v2i.c var.c typeSizes.f90 netcdf.f90)
 
-include ../../Makefile.spec2006
-include $(PROJ_SRC_ROOT)/Makefile.FORTRAN
+Source := \
+ $(notdir $(TOPSources)) \
+ $(addprefix netcdf_,$(notdir $(NETCDFSources)))
 
 FPPFLAGS += -w -m literal.pm   
\
 -DINTIO -DIWORDSIZE=4 -DDWORDSIZE=8 -DRWORDSIZE=4 -DLWORDSIZE=4
\
@@ -68,6 +71,34 @@
 -DNMM_MAX_DIM=1000 -DCOAMPS_CORE=0  -DEXP_CORE=0 -DF90_STANDALONE  
\
 -DCONFIG_BUF_LEN=8192 -DMAX_DOMAINS_F=21 -DNO_NAMELIST_PRINT
 
-CPPFLAGS += -I$(SPEC_BENCH_DIR)/src/netcdf/include
+CPPFLAGS += \
+ -I$(SPEC_BENCH_DIR)/src/netcdf \
+ -I$(SPEC_BENCH_DIR)/src/netcdf/include \
+ -I$(SPEC_BENCH_DIR)/src\
+ -I$(SPEC_BENCH_DIR)/src/include 
+
+
+include ../../Makefile.spec2006
+include $(PROJ_SRC_ROOT)/Makefile.FORTRAN
 
 STDOUT_FILENAME := rsl.out.
+
+##===--===##
+# Copy the source files to the working directory. Some files may have the
+# same names but are in different directories, so we add a prefix to
+# the filenames to prevent overwriting files.
+##===--===##
+
+$(notdir $(TOPSources)) : % : \
+$(SPEC_BENCH_DIR)/src/%
+   cp $ $@
+$(addprefix netcdf_,$(notdir $(NETCDFSources))) : netcdf_% : \
+$(SPEC_BENCH_DIR)/src/netcdf/%
+   cp $ $@
+
+##===--===##
+# Clean up all of the copied source files.
+##===--===##
+
+clean::
+   $(RM) -f $(Source)



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


[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/454.calculix/Makefile

2006-09-07 Thread Bill Wendling


Changes in directory llvm-test/External/SPEC/CFP2006/454.calculix:

Makefile updated: 1.2 - 1.3
---
Log message:

Added support for SPEC benchmarks with mutiple directories. Stolen from the
POVRay way of doing things.


---
Diffs of the changes:  (+248 -35)

 Makefile |  283 +++
 1 files changed, 248 insertions(+), 35 deletions(-)


Index: llvm-test/External/SPEC/CFP2006/454.calculix/Makefile
diff -u llvm-test/External/SPEC/CFP2006/454.calculix/Makefile:1.2 
llvm-test/External/SPEC/CFP2006/454.calculix/Makefile:1.3
--- llvm-test/External/SPEC/CFP2006/454.calculix/Makefile:1.2   Wed Sep  6 
15:41:12 2006
+++ llvm-test/External/SPEC/CFP2006/454.calculix/Makefile   Thu Sep  7 
19:59:14 2006
@@ -9,7 +9,8 @@
 FP_TOLERANCE= 1.0e-9
 FP_ABSTOLERANCE = 1.0e-9
 
-Source = CalculiX.c add_pr.f add_sm_ei.f add_sm_st.f allocation.f amplitudes.f 
\
+TOPSources := \
+ CalculiX.c add_pr.f add_sm_ei.f add_sm_st.f allocation.f amplitudes.f 
\
  anisotropic.f beamsections.f bounadd.f boundaries.f buckles.f 
\
  calinput.f cfluxes.f changedepterm.f cloads.f conductivities.f
\
  controlss.f couptempdisps.f creeps.f cychards.f cycsymmods.f dasol.f  
\
@@ -45,102 +46,204 @@
  viscos.f wcoef.f writebv.f writeev.f writeevcs.f writempc.f   
\
  writesummary.f cascade.c frdcyc.c insert.c mastruct.c mastructcs.c
\
  nonlingeo.c pcgsolver.c preiter.c prespooles.c profile.c remastruct.c 
\
- spooles.c strcmp1.c strcpy1.c u_calloc.c  
\
+ spooles.c strcmp1.c strcpy1.c u_calloc.c
+A2Sources := \
  $(addprefix $(SPEC_BENCH_DIR)/src/SPOOLES/A2/src/,
\
A2_IO.c A2_basics.c A2_init.c A2_instance.c A2_norms.c A2_sort.c
\
-   A2_util.c)  
\
+   A2_util.c)
+BKLSources := \
  $(addprefix $(SPEC_BENCH_DIR)/src/SPOOLES/BKL/src/,   
\
BKL_basics.c BKL_evalfcn.c BKL_exhSearch.c BKL_fidmat.c BKL_init.c  
\
-   BKL_util.c) 
\
+   BKL_util.c)
+BPGSources := \
  $(addprefix $(SPEC_BENCH_DIR)/src/SPOOLES/BPG/src/,   
\
-   BPG_IO.c BPG_basics.c BPG_init.c BPG_makeGraphs.c BPG_pseudo.c) 
\
+   BPG_IO.c BPG_basics.c BPG_init.c BPG_makeGraphs.c BPG_pseudo.c)
+CHVSources := \
  $(addprefix $(SPEC_BENCH_DIR)/src/SPOOLES/Chv/src/,   
\
Chv_IO.c Chv_assemble.c Chv_basics.c Chv_copy.c Chv_factor.c
\
Chv_findPivot.c Chv_init.c Chv_instance.c Chv_search.c Chv_swap.c   
\
-   Chv_update.c Chv_util.c)
\
+   Chv_update.c Chv_util.c)
+CHVLISTSources := \
  $(addprefix $(SPEC_BENCH_DIR)/src/SPOOLES/ChvList/src/,   
\
-   ChvList_basics.c ChvList_init.c ChvList_util.c) 
\
+   ChvList_basics.c ChvList_init.c ChvList_util.c)
+CHVMANAGERSources := \
  $(addprefix $(SPEC_BENCH_DIR)/src/SPOOLES/ChvManager/src/,
\
-   ChvManager_basics.c ChvManager_init.c ChvManager_util.c)
\
+   ChvManager_basics.c ChvManager_init.c ChvManager_util.c)
+DSTREESources := \
  $(addprefix $(SPEC_BENCH_DIR)/src/SPOOLES/DSTree/src/,
\
DSTree_basics.c DSTree_init.c DSTree_instance.c DSTree_stages.c 
\
-   DSTree_util.c)  
\
+   DSTree_util.c)
+DVSources := \
  $(addprefix $(SPEC_BENCH_DIR)/src/SPOOLES/DV/src/,
\
-   DV_IO.c DV_basics.c DV_init.c DV_instance.c DV_util.c)  
\
+   DV_IO.c DV_basics.c DV_init.c DV_instance.c DV_util.c)
+DENSEMTXSources := \
  $(addprefix $(SPEC_BENCH_DIR)/src/SPOOLES/DenseMtx/src/,  
\
DenseMtx_IO.c DenseMtx_basics.c DenseMtx_init.c DenseMtx_instance.c 
\
-   DenseMtx_permute.c DenseMtx_util.c) 
\
+   DenseMtx_permute.c DenseMtx_util.c)
+DRANDSources := \
  $(addprefix $(SPEC_BENCH_DIR)/src/SPOOLES/Drand/src/, 
\
-   Drand_basics.c Drand_init.c Drand_util.c)   
\
+   Drand_basics.c Drand_init.c Drand_util.c)
+ETREESources := \
  $(addprefix $(SPEC_BENCH_DIR)/src/SPOOLES/ETree/src/, 
\
ETree_IO.c ETree_basics.c ETree_compress.c ETree_init.c 
\
-   ETree_instance.c ETree_permute.c ETree_transform.c ETree_util.c)
\
+   ETree_instance.c ETree_permute.c ETree_transform.c ETree_util.c)
+FRONTMTXSources := \
  $(addprefix $(SPEC_BENCH_DIR)/src/SPOOLES/FrontMtx/src/,  
\
FrontMtx_IO.c FrontMtx_basics.c 

[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/Makefile

2006-09-07 Thread Bill Wendling


Changes in directory llvm-test/External/SPEC/CFP2006:

Makefile updated: 1.2 - 1.3
---
Log message:

Added support for SPEC benchmarks with mutiple directories. Stolen from the
POVRay way of doing things.


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

 Makefile |   30 +++---
 1 files changed, 15 insertions(+), 15 deletions(-)


Index: llvm-test/External/SPEC/CFP2006/Makefile
diff -u llvm-test/External/SPEC/CFP2006/Makefile:1.2 
llvm-test/External/SPEC/CFP2006/Makefile:1.3
--- llvm-test/External/SPEC/CFP2006/Makefile:1.2Wed Sep  6 15:41:12 2006
+++ llvm-test/External/SPEC/CFP2006/MakefileThu Sep  7 19:59:14 2006
@@ -6,27 +6,27 @@
 
 LEVEL = ../../..
 
-PARALLEL_DIRS := \
-410.bwaves   \
-416.gamess   \
-433.milc \
-434.zeusmp   \
-435.gromacs  \
-437.leslie3d \
-444.namd \
-447.dealII   \
-459.GemsFDTD \
-470.lbm
+PARALLEL_DIRS :=  \
+410.bwaves\
+416.gamess\
+433.milc  \
+434.zeusmp\
+435.gromacs   \
+436.cactusADM \
+437.leslie3d  \
+444.namd  \
+447.dealII\
+454.calculix  \
+459.GemsFDTD  \
+470.lbm   \
+481.wrf
+
 
 # These compile but need other things to run:
 #   450.soplex- enter.cc:535, works at -O0, not at -O2
 #   453.povray- c++ exceptions
 #   465.tonto - infinite loop, works at -O0, not at -O2
 #   482.sphinx3   - generates control file at run time
-# These don't compile
-#   436.cactusADM - multiple dirs
-#   454.calculix  - multiple dirs
-#   481.wrf   - multiple dirs
 
 # Get the $(ARCH) setting
 include $(LEVEL)/Makefile.config



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


[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/436.cactusADM/Makefile

2006-09-07 Thread Bill Wendling


Changes in directory llvm-test/External/SPEC/CFP2006/436.cactusADM:

Makefile updated: 1.2 - 1.3
---
Log message:

Added support for SPEC benchmarks with mutiple directories. Stolen from the
POVRay way of doing things.


---
Diffs of the changes:  (+124 -17)

 Makefile |  141 +++
 1 files changed, 124 insertions(+), 17 deletions(-)


Index: llvm-test/External/SPEC/CFP2006/436.cactusADM/Makefile
diff -u llvm-test/External/SPEC/CFP2006/436.cactusADM/Makefile:1.2 
llvm-test/External/SPEC/CFP2006/436.cactusADM/Makefile:1.3
--- llvm-test/External/SPEC/CFP2006/436.cactusADM/Makefile:1.2  Wed Sep  6 
15:41:12 2006
+++ llvm-test/External/SPEC/CFP2006/436.cactusADM/Makefile  Thu Sep  7 
19:59:14 2006
@@ -6,14 +6,18 @@
 
 LEVEL = ../../../..
 
-Source = PreLoop.F StaggeredLeapfrog1a.F StaggeredLeapfrog1a_TS.F  
\
- StaggeredLeapfrog2.F planewaves.F teukwaves.F datestamp.c regex.c 
\
+TOPSources:= \
+ PreLoop.F StaggeredLeapfrog1a.F StaggeredLeapfrog1a_TS.F  
\
+ StaggeredLeapfrog2.F planewaves.F teukwaves.F datestamp.c regex.c
+PUGHSources   := \
  $(addprefix $(SPEC_BENCH_DIR)/src/PUGH/,  
\
GHExtension.c FinishReceiveGA.c Startup.c Evolve.c Storage.c
\
SetupGroup.c PostSendGA.c SetupPGH.c SetupPGV.c LoadAware.c Comm.c  
\
-   cctk_ThornBindings.c Overloadables.c PughUtils.c PostReceiveGA.c)   
\
+   cctk_ThornBindings.c Overloadables.c PughUtils.c PostReceiveGA.c)
+TIMESources   := \
  $(addprefix $(SPEC_BENCH_DIR)/src/Time/,  
\
-   Courant.c Initialise.c cctk_ThornBindings.c Given.c Simple.c)   
\
+   Courant.c Initialise.c cctk_ThornBindings.c Given.c Simple.c)
+CACTUSSources := \
  $(addprefix $(SPEC_BENCH_DIR)/src/Cactus/,
\
ScheduleTraverse.c Groups.c Dummies.c File.c CactusDefaultEvolve.c  
\
BinaryTree.c Hash.c Malloc.c CactusTimers.c CallStartupFunctions.c  
\
@@ -32,13 +36,17 @@
SetParams.c cctk_ThornBindings.c OverloadComm.c Names.c 
\
InitialiseDataStructures.c StringList.c DefaultTimers.c 
\
StoreNamedData.c ScheduleSorter.c Complex.c OverloadMain.c  
\
-   Traverse.c SKBinTree.c snprintf.c)  
\
+   Traverse.c SKBinTree.c snprintf.c)
+IOUTILSources := \
  $(addprefix $(SPEC_BENCH_DIR)/src/IOUtil/,
\
CheckpointRecovery.c Utils.c AdvertisedFiles.c Startup.c
\
-   cctk_ThornBindings.c)   
\
- $(SPEC_BENCH_DIR)/src/IDLinearWaves/cctk_ThornBindings.c  
\
+   cctk_ThornBindings.c)
+IDLINEARWAVESSources  := \
+ $(SPEC_BENCH_DIR)/src/IDLinearWaves/cctk_ThornBindings.c
+BENCHADMSRCSources:= \
  $(addprefix $(SPEC_BENCH_DIR)/src/BenchADMsrc/,   
\
-   Startup.c ParamCheck.c cctk_ThornBindings.c)
\
+   Startup.c ParamCheck.c cctk_ThornBindings.c)
+CACTUSBINDINGSSources := \
  $(addprefix $(SPEC_BENCH_DIR)/src/CactusBindings/,
\
ParameterRecoveryEinstein.c ParameterRecoveryCactus.c   
\
TIME_private.c OverloadThorns.c Cactus.c PUGH_Register.c
\
@@ -80,36 +88,135 @@
ImplementationBindings.c DRIVER_restricted.c
\
IOUtil_FortranWrapper.c ScheduleCartGrid3D.c
\
FortranThornFunctions.c GRID_restricted.c   
\
-   ParameterRecoveryBoundary.c)
\
+   ParameterRecoveryBoundary.c)
+CARTGRID3DSources := \
  $(addprefix $(SPEC_BENCH_DIR)/src/CartGrid3D/,
\
SymmetryWrappers.c GHExtension.c DecodeSymParameters.c  
\
SetSymmetry.c Startup.c CartGrid3D.c Symmetry.c ParamCheck.c
\
-   cctk_ThornBindings.c)   
\
+   cctk_ThornBindings.c)
+EINSTEINSources   := \
  $(addprefix $(SPEC_BENCH_DIR)/src/Einstein/,  
\
Courant.c InitialEinstein.c MaskInit.c Slicing.c InitialFlat.c  
\
carttosphere.c InitSymBound.c LapseInits.c cctk_ThornBindings.c 
\
-   ShiftInits.c evaltrK.c ConfPhys.c)  
\
+   ShiftInits.c evaltrK.c ConfPhys.c)
+PUGHREDUCESources := \
  $(addprefix $(SPEC_BENCH_DIR)/src/PUGHReduce/,
\
ReductionNormInf.c ReductionMax.c ReductionMin.c ReductionSum.c 
\
Startup.c Reduction.c 

[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp

2006-09-07 Thread Evan Cheng


Changes in directory llvm/lib/Target/X86:

X86ISelLowering.cpp updated: 1.251 - 1.252
---
Log message:

- Identify a vector_shuffle that can be turned into an undef, e.g.
  shuffle V1, undef, undef, undef, 4, 5
- Fix some suspicious logic into LowerVectorShuffle that cause less than
  optimal code by failing to identify MOVL (move to lowest element of a
  vector).


---
Diffs of the changes:  (+41 -15)

 X86ISelLowering.cpp |   56 ++--
 1 files changed, 41 insertions(+), 15 deletions(-)


Index: llvm/lib/Target/X86/X86ISelLowering.cpp
diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.251 
llvm/lib/Target/X86/X86ISelLowering.cpp:1.252
--- llvm/lib/Target/X86/X86ISelLowering.cpp:1.251   Thu Sep  7 15:33:45 2006
+++ llvm/lib/Target/X86/X86ISelLowering.cpp Thu Sep  7 20:50:06 2006
@@ -1719,7 +1719,8 @@
 /// isCommutedMOVL - Returns true if the shuffle mask is except the reverse
 /// of what x86 movss want. X86 movs requires the lowest  element to be lowest
 /// element of vector 2 and the other elements to come from vector 1 in order.
-static bool isCommutedMOVL(std::vectorSDOperand Ops, bool V2IsSplat = 
false) {
+static bool isCommutedMOVL(std::vectorSDOperand Ops, bool V2IsSplat = false,
+   bool V2IsUndef = false) {
   unsigned NumElems = Ops.size();
   if (NumElems != 2  NumElems != 4  NumElems != 8  NumElems != 16)
 return false;
@@ -1729,22 +1730,20 @@
 
   for (unsigned i = 1; i  NumElems; ++i) {
 SDOperand Arg = Ops[i];
-if (V2IsSplat) {
-  if (!isUndefOrEqual(Arg, NumElems))
-return false;
-} else {
-  if (!isUndefOrEqual(Arg, i+NumElems))
-return false;
-}
+if (!(isUndefOrEqual(Arg, i+NumElems) ||
+  (V2IsUndef  isUndefOrInRange(Arg, NumElems, NumElems*2)) ||
+  (V2IsSplat  isUndefOrEqual(Arg, NumElems
+  return false;
   }
 
   return true;
 }
 
-static bool isCommutedMOVL(SDNode *N, bool V2IsSplat = false) {
+static bool isCommutedMOVL(SDNode *N, bool V2IsSplat = false,
+   bool V2IsUndef = false) {
   assert(N-getOpcode() == ISD::BUILD_VECTOR);
   std::vectorSDOperand Ops(N-op_begin(), N-op_end());
-  return isCommutedMOVL(Ops, V2IsSplat);
+  return isCommutedMOVL(Ops, V2IsSplat, V2IsUndef);
 }
 
 /// isMOVSHDUPMask - Return true if the specified VECTOR_SHUFFLE operand
@@ -2034,6 +2033,29 @@
   return true;
 }
 
+/// isUndefShuffle - Returns true if N is a VECTOR_SHUFFLE that can be resolved
+/// to an undef.
+static bool isUndefShuffle(SDNode *N) {
+  if (N-getOpcode() != ISD::BUILD_VECTOR)
+return false;
+
+  SDOperand V1 = N-getOperand(0);
+  SDOperand V2 = N-getOperand(1);
+  SDOperand Mask = N-getOperand(2);
+  unsigned NumElems = Mask.getNumOperands();
+  for (unsigned i = 0; i != NumElems; ++i) {
+SDOperand Arg = Mask.getOperand(i);
+if (Arg.getOpcode() != ISD::UNDEF) {
+  unsigned Val = castConstantSDNode(Arg)-getValue();
+  if (Val  NumElems  V1.getOpcode() != ISD::UNDEF)
+return false;
+  else if (Val = NumElems  V2.getOpcode() != ISD::UNDEF)
+return false;
+}
+  }
+  return true;
+}
+
 /// NormalizeMask - V2 is a splat, modify the mask (if needed) so all elements
 /// that point to V2 points to its first element.
 static SDOperand NormalizeMask(SDOperand Mask, SelectionDAG DAG) {
@@ -2402,6 +2424,9 @@
   bool V1IsUndef = V1.getOpcode() == ISD::UNDEF;
   bool V2IsUndef = V2.getOpcode() == ISD::UNDEF;
 
+  if (isUndefShuffle(Op.Val))
+return DAG.getNode(ISD::UNDEF, VT);
+
   if (isSplatMask(PermMask.Val)) {
 if (NumElems = 4) return Op;
 // Promote it to a v4i32 splat.
@@ -2422,17 +2447,18 @@
   ShouldXformToMOVLP(V1.Val, PermMask.Val))
 return CommuteVectorShuffle(Op, DAG);
 
-  bool V1IsSplat = isSplatVector(V1.Val) || V1.getOpcode() == ISD::UNDEF;
-  bool V2IsSplat = isSplatVector(V2.Val) || V2.getOpcode() == ISD::UNDEF;
-  if (V1IsSplat  !V2IsSplat) {
+  bool V1IsSplat = isSplatVector(V1.Val);
+  bool V2IsSplat = isSplatVector(V2.Val);
+  if ((V1IsSplat || V1IsUndef)  !(V2IsSplat || V2IsUndef)) {
 Op = CommuteVectorShuffle(Op, DAG);
 V1 = Op.getOperand(0);
 V2 = Op.getOperand(1);
 PermMask = Op.getOperand(2);
-V2IsSplat = true;
+std::swap(V1IsSplat, V2IsSplat);
+std::swap(V1IsUndef, V2IsUndef);
   }
 
-  if (isCommutedMOVL(PermMask.Val, V2IsSplat)) {
+  if (isCommutedMOVL(PermMask.Val, V2IsSplat, V2IsUndef)) {
 if (V2IsUndef) return V1;
 Op = CommuteVectorShuffle(Op, DAG);
 V1 = Op.getOperand(0);



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


[llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/vec_shuffle-8.ll

2006-09-07 Thread Evan Cheng


Changes in directory llvm/test/Regression/CodeGen/X86:

vec_shuffle-8.ll added (r1.1)
---
Log message:

Add a new test case for 'undef' shuffles.


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

 vec_shuffle-8.ll |9 +
 1 files changed, 9 insertions(+)


Index: llvm/test/Regression/CodeGen/X86/vec_shuffle-8.ll
diff -c /dev/null llvm/test/Regression/CodeGen/X86/vec_shuffle-8.ll:1.1
*** /dev/null   Thu Sep  7 20:54:42 2006
--- llvm/test/Regression/CodeGen/X86/vec_shuffle-8.ll   Thu Sep  7 20:54:32 2006
***
*** 0 
--- 1,9 
+ ; RUN: llvm-as  %s | llc -march=x86 -mattr=+sse2 
+ ; RUN: llvm-as  %s | llc -march=x86 -mattr=+sse2 | not grep shufps
+ 
+ void %test(4 x float* %res, 4 x float* %A) {
+   %tmp1 = load 4 x float* %A
+   %tmp2 = shufflevector 4 x float %tmp1, 4 x float undef, 4 x uint 
 uint 0, uint 5, uint 6, uint 7 
+   store 4 x float %tmp2, 4 x float* %res
+   ret void
+ }



___
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/PPCTargetMachine.cpp

2006-09-07 Thread Nate Begeman


Changes in directory llvm/lib/Target/PowerPC:

PPCTargetMachine.cpp updated: 1.105 - 1.106
---
Log message:

We actually do support object file writing, so don't return true (error)


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

 PPCTargetMachine.cpp |4 +---
 1 files changed, 1 insertion(+), 3 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
diff -u llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.105 
llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.106
--- llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.105  Thu Sep  7 18:39:26 2006
+++ llvm/lib/Target/PowerPC/PPCTargetMachine.cppThu Sep  7 22:42:15 2006
@@ -130,7 +130,7 @@
std::ostream Out) {
   // FIXME: support PPC ELF files at some point
   addPPCMachOObjectWriterPass(PM, Out, *this);
-  return true;
+  return false;
 }
 
 bool PPCTargetMachine::addCodeEmitter(FunctionPassManager PM, bool Fast,
@@ -138,8 +138,6 @@
   // The JIT should use the static relocation model.
   // FIXME: This should be moved to TargetJITInfo!!
   setRelocationModel(Reloc::Static);
-
-  
   
   // Machine code emitter pass for PowerPC.
   PM.add(createPPCCodeEmitterPass(*this, MCE));



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