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

2005-11-10 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

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

add support for .asciz, and enable it by default.  If your target assembler
doesn't support .asciz, just set AscizDirective to null in your asmprinter.

This compiles C strings to:

l1__2E_str_1:   ; '.str_1'
.asciz  "foo"

instead of:

l1__2E_str_1:   ; '.str_1'
.ascii  "foo\000"



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

 AsmPrinter.h |8 +++-
 1 files changed, 7 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.13 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.14
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.13 Thu Apr 21 15:38:00 2005
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Thu Nov 10 12:05:57 2005
@@ -77,7 +77,12 @@
 
 /// AsciiDirective - This directive allows emission of an ascii string with
 /// the standard C escape characters embedded into it.
-const char *AsciiDirective;
+const char *AsciiDirective;  // Defaults to "\t.ascii\t"
+
+/// AscizDirective - If not null, this allows for special handling of
+/// zero terminated strings on this target.  This is commonly supported as
+/// ".asciz".  If a target doesn't support this, it can be set to null.
+const char *AscizDirective;  // Defaults to "\t.asciz\t"
 
 /// DataDirectives - These directives are used to output some unit of
 /// integer data to the current section.  If a data directive is set to
@@ -108,6 +113,7 @@
 FunctionAddrSuffix(""),
 ZeroDirective("\t.zero\t"),
 AsciiDirective("\t.ascii\t"),
+AscizDirective("\t.asciz\t"),
 Data8bitsDirective("\t.byte\t"),
 Data16bitsDirective("\t.short\t"),
 Data32bitsDirective("\t.long\t"),



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


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

2005-11-14 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

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

Teach emitAlignment to handle explicit alignment requests by globals.


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

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


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



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


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

2005-11-20 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

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

Add a new option.


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

 AsmPrinter.h |6 ++
 1 files changed, 6 insertions(+)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.15 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.16
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.15 Mon Nov 14 12:59:42 2005
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Mon Nov 21 00:41:08 2005
@@ -54,6 +54,11 @@
 /// onto all global symbols.  This is often used for "_" or ".".
 const char *GlobalPrefix;// Defaults to ""
 
+/// PrivateGlobalPrefix - This prefix is used for globals like constant
+/// pool entries that are completely private to the .o file and should not
+/// have names in the .o file.  This is often "." or "L".
+const char *PrivateGlobalPrefix;   // Defaults to "."
+
 /// GlobalVarAddrPrefix/Suffix - If these are nonempty, these strings
 /// will enclose any GlobalVariable (that isn't a function)
 ///
@@ -107,6 +112,7 @@
   : O(o), TM(tm),
 CommentString("#"),
 GlobalPrefix(""),
+PrivateGlobalPrefix("."),
 GlobalVarAddrPrefix(""),
 GlobalVarAddrSuffix(""),
 FunctionAddrPrefix(""),



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


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

2005-11-20 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.16 -> 1.17
---
Log message:

Add section switching to to common AsmPrinter code.


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

 AsmPrinter.h |   13 +
 1 files changed, 13 insertions(+)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.16 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.17
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.16 Mon Nov 21 00:41:08 2005
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Mon Nov 21 01:05:42 2005
@@ -24,6 +24,9 @@
   class Mangler;
 
   class AsmPrinter : public MachineFunctionPass {
+/// CurrentSection - The current section we are emitting to.  This is
+/// controlled and used by the SwitchSection method.
+std::string CurrentSection;
   protected:
 /// Output stream on which we're printing assembly code.
 ///
@@ -128,6 +131,16 @@
 AlignmentIsInBytes(true) {
 }
 
+/// SwitchSection - Switch to the specified section of the executable if we
+/// are not already in it!  If GV is non-null and if the global has an
+/// explicitly requested section, we switch to the section indicated for 
the
+/// global instead of NewSection.
+///
+/// If the new section is an empty string, this method forgets what the
+/// current section is, but does not emit a .section directive.
+///
+void SwitchSection(const char *NewSection, const GlobalValue *GV);
+  
 /// doInitialization - Set up the AsmPrinter when we are working on a new
 /// module.  If your pass overrides this, it must make sure to explicitly
 /// call this implementation.



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


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

2005-11-20 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.17 -> 1.18
---
Log message:

Capitalize methods for better consistency


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

 AsmPrinter.h |   20 ++--
 1 files changed, 10 insertions(+), 10 deletions(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.17 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.18
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.17 Mon Nov 21 01:05:42 2005
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Mon Nov 21 01:51:06 2005
@@ -150,27 +150,27 @@
 /// pass, you must make sure to call it explicitly.
 bool doFinalization(Module &M);
 
-/// setupMachineFunction - This should be called when a new MachineFunction
+/// SetupMachineFunction - This should be called when a new MachineFunction
 /// is being processed from runOnMachineFunction.
-void setupMachineFunction(MachineFunction &MF);
+void SetupMachineFunction(MachineFunction &MF);
 
-/// emitAlignment - Emit an alignment directive to the specified power of
+/// EmitAlignment - Emit an alignment directive to the specified power of
 /// two boundary.  For example, if you pass in 3 here, you will get an 8
 /// byte alignment.  If a global value is specified, and if that global has
 /// an explicit alignment requested, it will override the alignment 
request.
-void emitAlignment(unsigned NumBits, const GlobalValue *GV = 0) const;
+void EmitAlignment(unsigned NumBits, const GlobalValue *GV = 0) const;
 
-/// emitZeros - Emit a block of zeros.
+/// EmitZeros - Emit a block of zeros.
 ///
-void emitZeros(uint64_t NumZeros) const;
+void EmitZeros(uint64_t NumZeros) const;
 
-/// emitConstantValueOnly - Print out the specified constant, without a
+/// EmitConstantValueOnly - Print out the specified constant, without a
 /// storage class.  Only constants of first-class type are allowed here.
-void emitConstantValueOnly(const Constant *CV);
+void EmitConstantValueOnly(const Constant *CV);
 
-/// emitGlobalConstant - Print a general LLVM constant to the .s file.
+/// EmitGlobalConstant - Print a general LLVM constant to the .s file.
 ///
-void emitGlobalConstant(const Constant* CV);
+void EmitGlobalConstant(const Constant* CV);
   };
 }
 



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


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

2005-11-21 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.18 -> 1.19
---
Log message:

Make the AsmPrinter keep track of the notion of a function number.


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

 AsmPrinter.h |   21 +++--
 1 files changed, 19 insertions(+), 2 deletions(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.18 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.19
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.18 Mon Nov 21 01:51:06 2005
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Mon Nov 21 02:12:47 2005
@@ -27,6 +27,14 @@
 /// CurrentSection - The current section we are emitting to.  This is
 /// controlled and used by the SwitchSection method.
 std::string CurrentSection;
+
+/// FunctionNumber - This provides a unique ID for each function emitted in
+/// this translation unit.  It is autoincremented by SetupMachineFunction,
+/// and can be accessed with getFunctionNumber() and 
+/// IncrementFunctionNumber().
+///
+unsigned FunctionNumber;
+
   protected:
 /// Output stream on which we're printing assembly code.
 ///
@@ -112,7 +120,7 @@
 bool AlignmentIsInBytes;  // Defaults to true
 
 AsmPrinter(std::ostream &o, TargetMachine &tm)
-  : O(o), TM(tm),
+  : FunctionNumber(0), O(o), TM(tm),
 CommentString("#"),
 GlobalPrefix(""),
 PrivateGlobalPrefix("."),
@@ -140,7 +148,16 @@
 /// current section is, but does not emit a .section directive.
 ///
 void SwitchSection(const char *NewSection, const GlobalValue *GV);
-  
+
+/// getFunctionNumber - Return a unique ID for the current function.
+///
+unsigned getFunctionNumber() const { return FunctionNumber; }
+
+/// IncrementFunctionNumber - Increase Function Number.  AsmPrinters should
+/// not normally call this, as the counter is automatically bumped by
+/// SetupMachineFunction.
+void IncrementFunctionNumber() { FunctionNumber++; }
+
 /// doInitialization - Set up the AsmPrinter when we are working on a new
 /// module.  If your pass overrides this, it must make sure to explicitly
 /// call this implementation.



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


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

2005-11-21 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.19 -> 1.20
---
Log message:

add two more config directives, add method for printing constant pool


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

 AsmPrinter.h |   21 -
 1 files changed, 20 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.19 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.20
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.19 Mon Nov 21 02:12:47 2005
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Mon Nov 21 02:24:11 2005
@@ -85,6 +85,8 @@
 const char *FunctionAddrPrefix;   // Defaults to ""
 const char *FunctionAddrSuffix;   // Defaults to ""
 
+//===--- Data Emission Directives 
-===//
+
 /// ZeroDirective - this should be set to the directive used to get some
 /// number of zero bytes emitted to the current section.  Common cases are
 /// "\t.zero\t" and "\t.space\t".  If this is set to null, the
@@ -108,6 +110,8 @@
 const char *Data32bitsDirective;  // Defaults to "\t.long\t"
 const char *Data64bitsDirective;  // Defaults to "\t.quad\t"
 
+//===--- Alignment Information 
===//
+
 /// AlignDirective - The directive used to emit round up to an alignment
 /// boundary.
 ///
@@ -118,6 +122,17 @@
 /// Otherwise, it emits ".align log2(N)", e.g. 3 to align to an 8 byte
 /// boundary.
 bool AlignmentIsInBytes;  // Defaults to true
+
+//===--- Section Switching Directives 
-===//
+
+/// SwitchToSectionDirective - This is the directive used when we want to
+/// emit a global to an arbitrary section.  The section name is emited 
after
+/// this.
+const char *SwitchToSectionDirective;  // Defaults to "\t.section\t"
+
+/// ConstantPoolSection - This is the section that we SwitchToSection right
+/// before emitting the constant pool for a function.
+const char *ConstantPoolSection; // Defaults to "\t.section .rodata\n"
 
 AsmPrinter(std::ostream &o, TargetMachine &tm)
   : FunctionNumber(0), O(o), TM(tm),
@@ -136,7 +151,9 @@
 Data32bitsDirective("\t.long\t"),
 Data64bitsDirective("\t.quad\t"),
 AlignDirective("\t.align\t"),
-AlignmentIsInBytes(true) {
+AlignmentIsInBytes(true),
+SwitchToSectionDirective("\t.section\t"),
+ConstantPoolSection("\t.section .rodata\n") {
 }
 
 /// SwitchSection - Switch to the specified section of the executable if we
@@ -170,6 +187,8 @@
 /// SetupMachineFunction - This should be called when a new MachineFunction
 /// is being processed from runOnMachineFunction.
 void SetupMachineFunction(MachineFunction &MF);
+
+void EmitConstantPool(MachineConstantPool *MCP);
 
 /// EmitAlignment - Emit an alignment directive to the specified power of
 /// two boundary.  For example, if you pass in 3 here, you will get an 8



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


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

2005-11-21 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.20 -> 1.21
---
Log message:

Add some more directives


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

 AsmPrinter.h |   19 ++-
 1 files changed, 18 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.20 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.21
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.20 Mon Nov 21 02:24:11 2005
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Mon Nov 21 13:51:51 2005
@@ -134,6 +134,20 @@
 /// before emitting the constant pool for a function.
 const char *ConstantPoolSection; // Defaults to "\t.section .rodata\n"
 
+//===--- Global Variable Emission Directives 
--===//
+
+/// LCOMMDirective - This is the name of a directive (if supported) that 
can
+/// be used to efficiently declare a local (internal) block of zero
+/// initialized data in the .bss/.data section.  The syntax expected is:
+/// SYMBOLNAME LENGTHINBYTES, ALIGNMENT
+const char *LCOMMDirective;  // Defaults to null.
+
+const char *COMMDirective;   // Defaults to "\t.comm\t".
+
+/// COMMDirectiveTakesAlignment - True if COMMDirective take a third
+/// argument that specifies the alignment of the declaration.
+bool COMMDirectiveTakesAlignment;// Defaults to true.
+
 AsmPrinter(std::ostream &o, TargetMachine &tm)
   : FunctionNumber(0), O(o), TM(tm),
 CommentString("#"),
@@ -153,7 +167,10 @@
 AlignDirective("\t.align\t"),
 AlignmentIsInBytes(true),
 SwitchToSectionDirective("\t.section\t"),
-ConstantPoolSection("\t.section .rodata\n") {
+ConstantPoolSection("\t.section .rodata\n"),
+LCOMMDirective(0),
+COMMDirective("\t.comm\t"),
+COMMDirectiveTakesAlignment(true) {
 }
 
 /// SwitchSection - Switch to the specified section of the executable if we



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


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

2005-11-21 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.21 -> 1.22
---
Log message:

Add a new flag


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

 AsmPrinter.h |7 ++-
 1 files changed, 6 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.21 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.22
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.21 Mon Nov 21 13:51:51 2005
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Mon Nov 21 17:06:08 2005
@@ -147,6 +147,10 @@
 /// COMMDirectiveTakesAlignment - True if COMMDirective take a third
 /// argument that specifies the alignment of the declaration.
 bool COMMDirectiveTakesAlignment;// Defaults to true.
+
+/// HasDotTypeDotSizeDirective - True if the target has .type and .size
+/// directives, this is true for most ELF targets.
+bool HasDotTypeDotSizeDirective; // Defaults to true.
 
 AsmPrinter(std::ostream &o, TargetMachine &tm)
   : FunctionNumber(0), O(o), TM(tm),
@@ -170,7 +174,8 @@
 ConstantPoolSection("\t.section .rodata\n"),
 LCOMMDirective(0),
 COMMDirective("\t.comm\t"),
-COMMDirectiveTakesAlignment(true) {
+COMMDirectiveTakesAlignment(true),
+HasDotTypeDotSizeDirective(true) {
 }
 
 /// SwitchSection - Switch to the specified section of the executable if we



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


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

2005-12-12 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.22 -> 1.23
---
Log message:

Add a couple more fields, move ctor init list to .cpp file, add support
for emitting the ctor/dtor list for common targets.


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

 AsmPrinter.h |   52 ++--
 1 files changed, 26 insertions(+), 26 deletions(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.22 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.23
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.22 Mon Nov 21 17:06:08 2005
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Tue Dec 13 00:31:41 2005
@@ -22,6 +22,7 @@
 namespace llvm {
   class Constant;
   class Mangler;
+  class GlobalVariable;
 
   class AsmPrinter : public MachineFunctionPass {
 /// CurrentSection - The current section we are emitting to.  This is
@@ -134,6 +135,16 @@
 /// before emitting the constant pool for a function.
 const char *ConstantPoolSection; // Defaults to "\t.section .rodata\n"
 
+/// StaticCtorsSection - This is the directive that is emitted to switch to
+/// a section to emit the static constructor list.
+/// Defaults to "\t.section .ctors,\"aw\",@progbits".
+const char *StaticCtorsSection;
+
+/// StaticDtorsSection - This is the directive that is emitted to switch to
+/// a section to emit the static destructor list.
+/// Defaults to "\t.section .dtors,\"aw\",@progbits".
+const char *StaticDtorsSection;
+
 //===--- Global Variable Emission Directives 
--===//
 
 /// LCOMMDirective - This is the name of a directive (if supported) that 
can
@@ -152,32 +163,8 @@
 /// directives, this is true for most ELF targets.
 bool HasDotTypeDotSizeDirective; // Defaults to true.
 
-AsmPrinter(std::ostream &o, TargetMachine &tm)
-  : FunctionNumber(0), O(o), TM(tm),
-CommentString("#"),
-GlobalPrefix(""),
-PrivateGlobalPrefix("."),
-GlobalVarAddrPrefix(""),
-GlobalVarAddrSuffix(""),
-FunctionAddrPrefix(""),
-FunctionAddrSuffix(""),
-ZeroDirective("\t.zero\t"),
-AsciiDirective("\t.ascii\t"),
-AscizDirective("\t.asciz\t"),
-Data8bitsDirective("\t.byte\t"),
-Data16bitsDirective("\t.short\t"),
-Data32bitsDirective("\t.long\t"),
-Data64bitsDirective("\t.quad\t"),
-AlignDirective("\t.align\t"),
-AlignmentIsInBytes(true),
-SwitchToSectionDirective("\t.section\t"),
-ConstantPoolSection("\t.section .rodata\n"),
-LCOMMDirective(0),
-COMMDirective("\t.comm\t"),
-COMMDirectiveTakesAlignment(true),
-HasDotTypeDotSizeDirective(true) {
-}
-
+AsmPrinter(std::ostream &o, TargetMachine &TM);
+
 /// SwitchSection - Switch to the specified section of the executable if we
 /// are not already in it!  If GV is non-null and if the global has an
 /// explicitly requested section, we switch to the section indicated for 
the
@@ -210,8 +197,18 @@
 /// is being processed from runOnMachineFunction.
 void SetupMachineFunction(MachineFunction &MF);
 
+/// EmitConstantPool - Print to the current output stream assembly
+/// representations of the constants in the constant pool MCP. This is
+/// used to print out constants which have been "spilled to memory" by
+/// the code generator.
+///
 void EmitConstantPool(MachineConstantPool *MCP);
 
+/// EmitSpecialLLVMGlobal - Check to see if the specified global is a
+/// special global used by LLVM.  If so, emit it and return true, otherwise
+/// do nothing and return false.
+bool EmitSpecialLLVMGlobal(const GlobalVariable *GV);
+
 /// EmitAlignment - Emit an alignment directive to the specified power of
 /// two boundary.  For example, if you pass in 3 here, you will get an 8
 /// byte alignment.  If a global value is specified, and if that global has
@@ -229,6 +226,9 @@
 /// EmitGlobalConstant - Print a general LLVM constant to the .s file.
 ///
 void EmitGlobalConstant(const Constant* CV);
+
+  private:
+void EmitXXStructorList(Constant *List);
   };
 }
 



___
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

2006-01-26 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.25 -> 1.26
---
Log message:

add a method


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

 AsmPrinter.h |3 +++
 1 files changed, 3 insertions(+)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.25 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.26
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.25 Wed Jan  4 16:28:25 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Thu Jan 26 20:09:16 2006
@@ -230,6 +230,9 @@
 ///
 void EmitGlobalConstant(const Constant* CV);
 
+/// printInlineAsm - This method formats and prints the specified machine
+/// instruction that is an inline asm.
+void printInlineAsm(const MachineInstr *MI) const;
   private:
 void EmitXXStructorList(Constant *List);
 



___
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

2006-02-01 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.26 -> 1.27
---
Log message:

add a new PrintAsmOperand method, move some stuff around for ease of reading.


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

 AsmPrinter.h |   25 -
 1 files changed, 16 insertions(+), 9 deletions(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.26 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.27
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.26 Thu Jan 26 20:09:16 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Wed Feb  1 16:39:30 2006
@@ -178,15 +178,6 @@
 void SwitchSection(const char *NewSection, const GlobalValue *GV);
 
   protected:
-/// getFunctionNumber - Return a unique ID for the current function.
-///
-unsigned getFunctionNumber() const { return FunctionNumber; }
-
-/// IncrementFunctionNumber - Increase Function Number.  AsmPrinters should
-/// not normally call this, as the counter is automatically bumped by
-/// SetupMachineFunction.
-void IncrementFunctionNumber() { FunctionNumber++; }
-
 /// doInitialization - Set up the AsmPrinter when we are working on a new
 /// module.  If your pass overrides this, it must make sure to explicitly
 /// call this implementation.
@@ -195,11 +186,27 @@
 /// doFinalization - Shut down the asmprinter.  If you override this in 
your
 /// pass, you must make sure to call it explicitly.
 bool doFinalization(Module &M);
+
+/// PrintAsmOperand - Print the specified operand of MI, an INLINEASM
+/// instruction, using the specified assembler variant.  Targets should
+/// overried this to format as appropriate.  This method can return true if
+/// the operand is erroneous.
+virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
+ unsigned AsmVariant);
 
 /// SetupMachineFunction - This should be called when a new MachineFunction
 /// is being processed from runOnMachineFunction.
 void SetupMachineFunction(MachineFunction &MF);
 
+/// getFunctionNumber - Return a unique ID for the current function.
+///
+unsigned getFunctionNumber() const { return FunctionNumber; }
+
+/// IncrementFunctionNumber - Increase Function Number.  AsmPrinters should
+/// not normally call this, as the counter is automatically bumped by
+/// SetupMachineFunction.
+void IncrementFunctionNumber() { FunctionNumber++; }
+
 /// EmitConstantPool - Print to the current output stream assembly
 /// representations of the constants in the constant pool MCP. This is
 /// used to print out constants which have been "spilled to memory" by



___
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

2006-02-04 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.27 -> 1.28
---
Log message:

add a new method, getPreferredAlignmentLog.


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

 AsmPrinter.h |4 
 1 files changed, 4 insertions(+)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.27 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.28
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.27 Wed Feb  1 16:39:30 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Sat Feb  4 19:24:06 2006
@@ -177,6 +177,10 @@
 ///
 void SwitchSection(const char *NewSection, const GlobalValue *GV);
 
+/// getPreferredAlignmentLog - Return the preferred alignment of the
+/// specified global, returned in log form.  This includes an explicitly
+/// requested alignment (if the global has one).
+unsigned getPreferredAlignmentLog(const GlobalVariable *GV) const;
   protected:
 /// doInitialization - Set up the AsmPrinter when we are working on a new
 /// module.  If your pass overrides this, it must make sure to explicitly



___
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

2006-02-06 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.28 -> 1.29
---
Log message:

Change the prototype of PrintAsmOperand



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

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


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.28 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.29
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.28 Sat Feb  4 19:24:06 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Mon Feb  6 16:16:41 2006
@@ -196,7 +196,7 @@
 /// overried this to format as appropriate.  This method can return true if
 /// the operand is erroneous.
 virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
- unsigned AsmVariant);
+ unsigned AsmVariant, const char *ExtraCode);
 
 /// SetupMachineFunction - This should be called when a new MachineFunction
 /// is being processed from runOnMachineFunction.



___
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

2006-02-08 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.29 -> 1.30
---
Log message:

Add support for assembler directives that wrap inline asm


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

 AsmPrinter.h |5 +
 1 files changed, 5 insertions(+)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.29 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.30
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.29 Mon Feb  6 16:16:41 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Wed Feb  8 17:41:34 2006
@@ -86,6 +86,11 @@
 const char *FunctionAddrPrefix;   // Defaults to ""
 const char *FunctionAddrSuffix;   // Defaults to ""
 
+/// InlineAsmStart/End - If these are nonempty, they contain a directive to
+/// emit before and after an inline assmebly statement.
+const char *InlineAsmStart;   // Defaults to "#APP\n"
+const char *InlineAsmEnd; // Defaults to "#NO_APP\n"
+
 //===--- Data Emission Directives 
-===//
 
 /// ZeroDirective - this should be set to the directive used to get some



___
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

2006-02-24 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.30 -> 1.31
---
Log message:

Add a PrintAsmMemoryOperand method for printing addresses


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

 AsmPrinter.h |   10 +-
 1 files changed, 9 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.30 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.31
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.30 Wed Feb  8 17:41:34 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Fri Feb 24 14:21:12 2006
@@ -198,11 +198,19 @@
 
 /// PrintAsmOperand - Print the specified operand of MI, an INLINEASM
 /// instruction, using the specified assembler variant.  Targets should
-/// overried this to format as appropriate.  This method can return true if
+/// override this to format as appropriate.  This method can return true if
 /// the operand is erroneous.
 virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
  unsigned AsmVariant, const char *ExtraCode);
 
+/// PrintAsmMemoryOperand - Print the specified operand of MI, an INLINEASM
+/// instruction, using the specified assembler variant as an address.
+/// Targets should override this to format as appropriate.  This method can
+/// return true if the operand is erroneous.
+virtual bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
+   unsigned AsmVariant, 
+   const char *ExtraCode);
+
 /// SetupMachineFunction - This should be called when a new MachineFunction
 /// is being processed from runOnMachineFunction.
 void SetupMachineFunction(MachineFunction &MF);



___
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

2006-10-30 Thread Anton Korobeynikov


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.55 -> 1.56
---
Log message:

Unbreaking static ctors patch.
Defaulting second arguments of SwitchTo*Section, this should make things 
somehow clearer.


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

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


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.55 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.56
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.55 Tue Oct 24 15:32:14 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Tue Oct 31 00:11:06 2006
@@ -79,7 +79,7 @@
 ///
 /// This method is used when about to emit executable code.
 ///
-void SwitchToTextSection(const char *NewSection, const GlobalValue *GV);
+void SwitchToTextSection(const char *NewSection, const GlobalValue *GV = 
NULL);
 
 /// SwitchToDataSection - Switch to the specified section of the executable
 /// if we are not already in it!  If GV is non-null and if the global has 
an
@@ -93,7 +93,7 @@
 /// is the same as the SwitchToTextSection method, but not all assemblers
 /// are the same.
 ///
-void SwitchToDataSection(const char *NewSection, const GlobalValue *GV);
+void SwitchToDataSection(const char *NewSection, const GlobalValue *GV = 
NULL);
 
 /// getGlobalLinkName - Returns the asm/link name of of the specified
 /// global variable.  Should be overridden by each target asm printer to



___
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

2006-11-01 Thread Evan Cheng


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.56 -> 1.57
---
Log message:

Add a printSetLabel that takes two id's.

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

 AsmPrinter.h |2 ++
 1 files changed, 2 insertions(+)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.56 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.57
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.56 Tue Oct 31 00:11:06 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Wed Nov  1 03:22:43 2006
@@ -206,6 +206,8 @@
 /// printSetLabel - This method prints a set label for the specified
 /// MachineBasicBlock
 void printSetLabel(unsigned uid, const MachineBasicBlock *MBB) const;
+void printSetLabel(unsigned uid, unsigned uid2,
+   const MachineBasicBlock *MBB) const;
 
 /// printDataDirective - This method prints the asm directive for the
 /// specified type.



___
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

2006-12-17 Thread Rafael Espindola


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.57 -> 1.58
---
Log message:

move ExtWeakSymbols to AsmPrinter


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

 AsmPrinter.h |5 +
 1 files changed, 5 insertions(+)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.57 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.58
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.57 Wed Nov  1 03:22:43 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Sun Dec 17 21:37:18 2006
@@ -18,6 +18,7 @@
 
 #include "llvm/CodeGen/MachineFunctionPass.h"
 #include "llvm/Support/DataTypes.h"
+#include 
 
 namespace llvm {
   class Constant;
@@ -39,6 +40,10 @@
 ///
 unsigned FunctionNumber;
 
+  protected:
+// Necessary for external weak linkage support
+std::set ExtWeakSymbols;
+
   public:
 /// Output stream on which we're printing assembly code.
 ///



___
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

2007-01-24 Thread Jim Laskey


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.58 -> 1.59
---
Log message:

Use asm printer to emit alignment

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

 AsmPrinter.h |2 ++
 1 files changed, 2 insertions(+)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.58 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.59
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.58 Sun Dec 17 21:37:18 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Wed Jan 24 07:12:32 2007
@@ -174,12 +174,14 @@
 /// do nothing and return false.
 bool EmitSpecialLLVMGlobal(const GlobalVariable *GV);
 
+  public:
 /// EmitAlignment - Emit an alignment directive to the specified power of
 /// two boundary.  For example, if you pass in 3 here, you will get an 8
 /// byte alignment.  If a global value is specified, and if that global has
 /// an explicit alignment requested, it will override the alignment 
request.
 void EmitAlignment(unsigned NumBits, const GlobalValue *GV = 0) const;
 
+  protected:
 /// EmitZeros - Emit a block of zeros.
 ///
 void EmitZeros(uint64_t NumZeros) const;



___
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

2007-01-25 Thread Jim Laskey


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.59 -> 1.60
---
Log message:

Migrate print routines to asm to be shared by exception handling.


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

 AsmPrinter.h |   62 +++
 1 files changed, 62 insertions(+)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.59 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.60
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.59 Wed Jan 24 07:12:32 2007
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Thu Jan 25 09:12:02 2007
@@ -175,6 +175,68 @@
 bool EmitSpecialLLVMGlobal(const GlobalVariable *GV);
 
   public:
+
//===--===//
+/// LEB 128 number encoding.
+
+/// PrintULEB128 - Print a series of hexidecimal values(separated by 
commas)
+/// representing an unsigned leb128 value.
+void PrintULEB128(unsigned Value) const;
+
+/// SizeULEB128 - Compute the number of bytes required for an unsigned
+/// leb128 value.
+static unsigned SizeULEB128(unsigned Value);
+
+/// PrintSLEB128 - Print a series of hexidecimal values(separated by 
commas)
+/// representing a signed leb128 value.
+void PrintSLEB128(int Value) const;
+
+/// SizeSLEB128 - Compute the number of bytes required for a signed leb128
+/// value.
+static unsigned SizeSLEB128(int Value);
+
+
//===--===//
+// Emission and print routines
+//
+
+/// PrintHex - Print a value as a hexidecimal value.
+///
+void PrintHex(int Value) const;
+
+/// EOL - Print a newline character to asm stream.  If a comment is present
+/// then it will be printed first.  Comments should not contain '\n'.
+void EOL(const std::string &Comment) const;
+
+/// EmitULEB128Bytes - Emit an assembler byte data directive to compose an
+/// unsigned leb128 value.
+void EmitULEB128Bytes(unsigned Value) const;
+
+/// EmitSLEB128Bytes - print an assembler byte data directive to compose a
+/// signed leb128 value.
+void EmitSLEB128Bytes(int Value) const;
+
+/// EmitInt8 - Emit a byte directive and value.
+///
+void EmitInt8(int Value) const;
+
+/// EmitInt16 - Emit a short directive and value.
+///
+void EmitInt16(int Value) const;
+
+/// EmitInt32 - Emit a long directive and value.
+///
+void EmitInt32(int Value) const;
+
+/// EmitInt64 - Emit a long long directive and value.
+///
+void EmitInt64(uint64_t Value) const;
+
+/// EmitString - Emit a string with quotes and a null terminator.
+/// Special characters are emitted properly.
+/// \literal (Eg. '\t') \endliteral
+void EmitString(const std::string &String) const;
+
+
//===--===//
+
 /// EmitAlignment - Emit an alignment directive to the specified power of
 /// two boundary.  For example, if you pass in 3 here, you will get an 8
 /// byte alignment.  If a global value is specified, and if that global has



___
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

2007-02-21 Thread Jim Laskey


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.61 -> 1.62
---
Log message:

Add support for changes in DwarfWriter.

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

 AsmPrinter.h |5 +
 1 files changed, 5 insertions(+)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.61 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.62
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.61 Fri Jan 26 08:34:51 2007
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Wed Feb 21 16:47:38 2007
@@ -105,6 +105,10 @@
 /// generate the appropriate value.
 virtual const std::string getGlobalLinkName(const GlobalVariable *GV) 
const;
 
+/// EmitExternalGlobal - Emit the external reference to a global variable.
+/// Should be overridden if an indirect reference should be used.
+virtual void EmitExternalGlobal(const GlobalVariable *GV);
+
   protected:
 /// doInitialization - Set up the AsmPrinter when we are working on a new
 /// module.  If your pass overrides this, it must make sure to explicitly
@@ -204,6 +208,7 @@
 
 /// EOL - Print a newline character to asm stream.  If a comment is present
 /// then it will be printed first.  Comments should not contain '\n'.
+void EOL() const;
 void EOL(const std::string &Comment) const;
 
 /// EmitULEB128Bytes - Emit an assembler byte data directive to compose an



___
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

2006-05-01 Thread Jeff Cohen


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.32 -> 1.33
---
Log message:

Make Intel syntax mode friendlier to Microsoft ML assembler (still needs more 
work).

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

 AsmPrinter.h |7 ++-
 1 files changed, 6 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.32 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.33
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.32 Sat Apr 22 13:53:45 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Mon May  1 20:16:28 2006
@@ -21,6 +21,7 @@
 
 namespace llvm {
   class Constant;
+  class ConstantArray;
   class Mangler;
   class GlobalVariable;
 
@@ -253,7 +254,11 @@
 
 /// EmitZeros - Emit a block of zeros.
 ///
-void EmitZeros(uint64_t NumZeros) const;
+virtual void EmitZeros(uint64_t NumZeros) const;
+
+/// EmitString - Emit a zero-byte-terminated string constant.
+///
+virtual void EmitString(const ConstantArray *CVA) const;
 
 /// EmitConstantValueOnly - Print out the specified constant, without a
 /// storage class.  Only constants of first-class type are allowed here.



___
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

2006-05-01 Thread Jeff Cohen


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.33 -> 1.34
---
Log message:

Finish support for Microsoft ML/MASM.  May still be a few rough edges.

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

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


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.33 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.34
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.33 Mon May  1 20:16:28 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Mon May  1 22:11:50 2006
@@ -26,10 +26,12 @@
   class GlobalVariable;
 
   class AsmPrinter : public MachineFunctionPass {
+  protected:
 /// CurrentSection - The current section we are emitting to.  This is
 /// controlled and used by the SwitchSection method.
 std::string CurrentSection;
 
+  private:
 /// FunctionNumber - This provides a unique ID for each function emitted in
 /// this translation unit.  It is autoincremented by SetupMachineFunction,
 /// and can be accessed with getFunctionNumber() and 
@@ -185,7 +187,7 @@
 /// If the new section is an empty string, this method forgets what the
 /// current section is, but does not emit a .section directive.
 ///
-void SwitchSection(const char *NewSection, const GlobalValue *GV);
+virtual void SwitchSection(const char *NewSection, const GlobalValue *GV);
 
 /// getPreferredAlignmentLog - Return the preferred alignment of the
 /// specified global, returned in log form.  This includes an explicitly



___
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

2006-05-01 Thread Jeff Cohen


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.34 -> 1.35
---
Log message:

De-virtualize EmitZeroes.

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

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


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.34 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.35
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.34 Mon May  1 22:11:50 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Mon May  1 22:46:13 2006
@@ -101,6 +101,7 @@
 /// "\t.zero\t" and "\t.space\t".  If this is set to null, the
 /// Data*bitsDirective's will be used to emit zero bytes.
 const char *ZeroDirective;   // Defaults to "\t.zero\t"
+const char *ZeroDirectiveSuffix;  // Defaults to ""
 
 /// AsciiDirective - This directive allows emission of an ascii string with
 /// the standard C escape characters embedded into it.
@@ -256,7 +257,7 @@
 
 /// EmitZeros - Emit a block of zeros.
 ///
-virtual void EmitZeros(uint64_t NumZeros) const;
+void EmitZeros(uint64_t NumZeros) const;
 
 /// EmitString - Emit a zero-byte-terminated string constant.
 ///



___
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

2006-05-01 Thread Jeff Cohen


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.35 -> 1.36
---
Log message:

De-virtualize SwitchSection.

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

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


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.35 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.36
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.35 Mon May  1 22:46:13 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Mon May  1 22:58:45 2006
@@ -26,12 +26,10 @@
   class GlobalVariable;
 
   class AsmPrinter : public MachineFunctionPass {
-  protected:
 /// CurrentSection - The current section we are emitting to.  This is
 /// controlled and used by the SwitchSection method.
 std::string CurrentSection;
 
-  private:
 /// FunctionNumber - This provides a unique ID for each function emitted in
 /// this translation unit.  It is autoincremented by SetupMachineFunction,
 /// and can be accessed with getFunctionNumber() and 
@@ -139,6 +137,7 @@
 /// emit a global to an arbitrary section.  The section name is emited 
after
 /// this.
 const char *SwitchToSectionDirective;  // Defaults to "\t.section\t"
+bool MLSections;  // True if Microsoft ML assembler is targetted
 
 /// ConstantPoolSection - This is the section that we SwitchToSection right
 /// before emitting the constant pool for a function.
@@ -188,7 +187,7 @@
 /// If the new section is an empty string, this method forgets what the
 /// current section is, but does not emit a .section directive.
 ///
-virtual void SwitchSection(const char *NewSection, const GlobalValue *GV);
+void SwitchSection(const char *NewSection, const GlobalValue *GV);
 
 /// getPreferredAlignmentLog - Return the preferred alignment of the
 /// specified global, returned in log form.  This includes an explicitly



___
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

2006-05-01 Thread Nate Begeman


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.36 -> 1.37
---
Log message:

Extend printBasicBlockLabel a bit so that it can be used to print all 
basic block labels, consolidating the code to do so in one place for each
target.


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

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


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.36 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.37
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.36 Mon May  1 22:58:45 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Tue May  2 00:37:32 2006
@@ -276,7 +276,9 @@
 
 /// printBasicBlockLabel - This method prints the label for the specified
 /// MachineBasicBlock
-virtual void printBasicBlockLabel(const MachineBasicBlock *MBB) const;
+virtual void printBasicBlockLabel(const MachineBasicBlock *MBB,
+  bool printColon = false,
+  bool printComment = true) const;
 
   private:
 void EmitXXStructorList(Constant *List);



___
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

2006-05-08 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.37 -> 1.38
---
Log message:

Split SwitchSection into the SwitchTo{Text|Data}Section functions, to better
support assemblers that distinguish the two.


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

 AsmPrinter.h |   22 +++---
 1 files changed, 19 insertions(+), 3 deletions(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.37 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.38
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.37 Tue May  2 00:37:32 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Mon May  8 23:59:30 2006
@@ -179,16 +179,32 @@
 AsmPrinter(std::ostream &o, TargetMachine &TM);
 
   public:
-/// SwitchSection - Switch to the specified section of the executable if we
-/// are not already in it!  If GV is non-null and if the global has an
+/// SwitchToTextSection - Switch to the specified section of the executable
+/// if we are not already in it!  If GV is non-null and if the global has 
an
 /// explicitly requested section, we switch to the section indicated for 
the
 /// global instead of NewSection.
 ///
 /// If the new section is an empty string, this method forgets what the
 /// current section is, but does not emit a .section directive.
 ///
-void SwitchSection(const char *NewSection, const GlobalValue *GV);
+/// This method is used when about to emit executable code.
+///
+void SwitchToTextSection(const char *NewSection, const GlobalValue *GV);
 
+/// SwitchToDataSection - Switch to the specified section of the executable
+/// if we are not already in it!  If GV is non-null and if the global has 
an
+/// explicitly requested section, we switch to the section indicated for 
the
+/// global instead of NewSection.
+///
+/// If the new section is an empty string, this method forgets what the
+/// current section is, but does not emit a .section directive.
+///
+/// This method is used when about to emit data.  For most assemblers, this
+/// is the same as the SwitchToTextSection method, but not all assemblers
+/// are the same.
+///
+void SwitchToDataSection(const char *NewSection, const GlobalValue *GV);
+
 /// getPreferredAlignmentLog - Return the preferred alignment of the
 /// specified global, returned in log form.  This includes an explicitly
 /// requested alignment (if the global has one).



___
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

2006-05-08 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.38 -> 1.39
---
Log message:

Implement MASM sections correctly, without a "has masm sections flag" and a 
bunch of special case code.


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

 AsmPrinter.h |   13 -
 1 files changed, 12 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.38 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.39
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.38 Mon May  8 23:59:30 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Tue May  9 00:33:28 2006
@@ -137,7 +137,18 @@
 /// emit a global to an arbitrary section.  The section name is emited 
after
 /// this.
 const char *SwitchToSectionDirective;  // Defaults to "\t.section\t"
-bool MLSections;  // True if Microsoft ML assembler is targetted
+
+/// TextSectionStartSuffix - This is printed after each start of section
+/// directive for text sections.
+const char *TextSectionStartSuffix;// Defaults to "".
+
+/// DataSectionStartSuffix - This is printed after each start of section
+/// directive for data sections.
+const char *DataSectionStartSuffix;// Defaults to "".
+
+/// SectionEndDirectiveSuffix - If non-null, the asm printer will close 
each
+/// section with the section name and this suffix printed.
+const char *SectionEndDirectiveSuffix; // Defaults to null.
 
 /// ConstantPoolSection - This is the section that we SwitchToSection right
 /// before emitting the constant pool for a function.



___
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

2006-06-27 Thread Evan Cheng


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.41 -> 1.42
---
Log message:

Allow EmitConstantPool to be redefined by derived classes.

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

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


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.41 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.42
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.41 Fri Jun 23 07:51:53 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Tue Jun 27 19:52:32 2006
@@ -265,7 +265,7 @@
 /// used to print out constants which have been "spilled to memory" by
 /// the code generator.
 ///
-void EmitConstantPool(MachineConstantPool *MCP);
+virtual void EmitConstantPool(MachineConstantPool *MCP);
 
 /// EmitJumpTableInfo - Print assembly representations of the jump tables 
 /// used by the current function to the current output stream.  



___
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

2006-06-28 Thread Evan Cheng


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.42 -> 1.43
---
Log message:

Add support to print 4-, 8-, and 16- byte constant literals in special
sections. e.g. On Darwin that would be .literal4 and .literal8.


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

 AsmPrinter.h |   12 +++-
 1 files changed, 11 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.42 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.43
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.42 Tue Jun 27 19:52:32 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Wed Jun 28 19:26:09 2006
@@ -24,6 +24,7 @@
   class ConstantArray;
   class Mangler;
   class GlobalVariable;
+  class MachineConstantPoolEntry;
 
   class AsmPrinter : public MachineFunctionPass {
 /// FunctionNumber - This provides a unique ID for each function emitted in
@@ -168,6 +169,13 @@
 /// a section to emit the static destructor list.
 /// Defaults to "\t.section .dtors,\"aw\",@progbits".
 const char *StaticDtorsSection;
+
+/// FourByteConstantSection, EightByteConstantSection,
+/// SixteenByteConstantSection - These are special sections where we place
+/// 4-, 8-, and 16- byte constant literals.
+const char *FourByteConstantSection;
+const char *EightByteConstantSection;
+const char *SixteenByteConstantSection;
 
 //===--- Global Variable Emission Directives 
--===//
 
@@ -265,7 +273,7 @@
 /// used to print out constants which have been "spilled to memory" by
 /// the code generator.
 ///
-virtual void EmitConstantPool(MachineConstantPool *MCP);
+void EmitConstantPool(MachineConstantPool *MCP);
 
 /// EmitJumpTableInfo - Print assembly representations of the jump tables 
 /// used by the current function to the current output stream.  
@@ -311,6 +319,8 @@
 
   private:
 void EmitXXStructorList(Constant *List);
+void EmitConstantPool(unsigned Alignment, const char *Section,
+std::vector > 
&CP);
 
   };
 }



___
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

2006-07-26 Thread Nate Begeman


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.43 -> 1.44
---
Log message:

Support jump tables when in PIC relocation model


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

 AsmPrinter.h |   12 +---
 1 files changed, 9 insertions(+), 3 deletions(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.43 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.44
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.43 Wed Jun 28 19:26:09 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Wed Jul 26 20:13:04 2006
@@ -156,9 +156,15 @@
 /// before emitting the constant pool for a function.
 const char *ConstantPoolSection; // Defaults to "\t.section .rodata\n"
 
-/// JumpTableSection - This is the section that we SwitchToSection right
-/// before emitting the jump tables for a function.
-const char *JumpTableSection; // Defaults to "\t.section .rodata\n"
+/// JumpTableDataSection - This is the section that we SwitchToSection 
right
+/// before emitting the jump tables for a function when the relocation 
model
+/// is not PIC.
+const char *JumpTableDataSection; // Defaults to "\t.section .rodata\n"
+
+/// JumpTableTextSection - This is the section that we SwitchToSection 
right
+/// before emitting the jump tables for a function when the relocation 
model
+/// is PIC.
+const char *JumpTableTextSection; // Defaults to "\t.text\n"
 
 /// StaticCtorsSection - This is the directive that is emitted to switch to
 /// a section to emit the static constructor list.



___
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

2006-08-12 Thread Nate Begeman


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.44 -> 1.45
---
Log message:

Emit .set directives for jump table entries when possible, which reduces
the number of relocations in object files, shrinkifying them.


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

 AsmPrinter.h |   10 +-
 1 files changed, 9 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.44 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.45
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.44 Wed Jul 26 20:13:04 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Sat Aug 12 16:29:52 2006
@@ -185,6 +185,10 @@
 
 //===--- Global Variable Emission Directives 
--===//
 
+/// SetDirective - This is the name of a directive that can be used to tell
+/// the assembler to set the value of a variable to some expression.
+const char *SetDirective;// Defaults to null.
+
 /// LCOMMDirective - This is the name of a directive (if supported) that 
can
 /// be used to efficiently declare a local (internal) block of zero
 /// initialized data in the .bss/.data section.  The syntax expected is:
@@ -193,7 +197,7 @@
 const char *LCOMMDirective;  // Defaults to null.
 
 const char *COMMDirective;   // Defaults to "\t.comm\t".
-
+
 /// COMMDirectiveTakesAlignment - True if COMMDirective take a third
 /// argument that specifies the alignment of the declaration.
 bool COMMDirectiveTakesAlignment;// Defaults to true.
@@ -322,6 +326,10 @@
 virtual void printBasicBlockLabel(const MachineBasicBlock *MBB,
   bool printColon = false,
   bool printComment = true) const;
+  
+/// printSetLabel - This method prints a set label for the specified
+/// MachineBasicBlock
+void printSetLabel(unsigned uid, const MachineBasicBlock *MBB) const;
 
   private:
 void EmitXXStructorList(Constant *List);



___
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

2006-09-25 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.48 -> 1.49
---
Log message:

Add support for targets that want to do something with the llvm.used list,
because they have an aggressive linker that does dead code stripping.


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

 AsmPrinter.h |1 +
 1 files changed, 1 insertion(+)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.48 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.49
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.48 Tue Sep 12 15:59:22 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Mon Sep 25 22:38:18 2006
@@ -197,6 +197,7 @@
 void printDataDirective(const Type *type);
 
   private:
+void EmitLLVMUsedList(Constant *List);
 void EmitXXStructorList(Constant *List);
 void EmitConstantPool(unsigned Alignment, const char *Section,
 std::vector > 
&CP);



___
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

2006-09-26 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.49 -> 1.50
---
Log message:

Add support for ${:comment}, which expands to the current target's comment
character, and ${:uid} which expands to a unique ID for the MachineInstr. 
More can be added if/when they are needed.



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

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


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.49 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.50
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.49 Mon Sep 25 22:38:18 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Tue Sep 26 18:59:50 2006
@@ -108,6 +108,14 @@
 /// doFinalization - Shut down the asmprinter.  If you override this in 
your
 /// pass, you must make sure to call it explicitly.
 bool doFinalization(Module &M);
+
+/// PrintSpecial - Print information related to the specified machine instr
+/// that is independent of the operand, and may be independent of the instr
+/// itself.  This can be useful for portably encoding the comment character
+/// or other bits of target-specific knowledge into the asmstrings.  The
+/// syntax used is ${:comment}.  Targets can override this to add support
+/// for their own strange codes.
+virtual void PrintSpecial(const MachineInstr *MI, const char *Code);
 
 /// PrintAsmOperand - Print the specified operand of MI, an INLINEASM
 /// instruction, using the specified assembler variant.  Targets should



___
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

2006-10-04 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.50 -> 1.51
---
Log message:

move getSectionForFunction to AsmPrinter.


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

 AsmPrinter.h |6 ++
 1 files changed, 6 insertions(+)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.50 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.51
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.50 Tue Sep 26 18:59:50 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Wed Oct  4 21:41:43 2006
@@ -132,6 +132,12 @@
unsigned AsmVariant, 
const char *ExtraCode);
 
+/// getSectionForFunction - Return the section that we should emit the
+/// specified function body into.  This defaults to 'TextSection'.  This
+/// should most likely be overridden by the target to put linkonce/weak
+/// functions into special sections.
+virtual std::string getSectionForFunction(const Function &F) const;
+
 /// SetupMachineFunction - This should be called when a new MachineFunction
 /// is being processed from runOnMachineFunction.
 void SetupMachineFunction(MachineFunction &MF);



___
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

2006-10-04 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.51 -> 1.52
---
Log message:

Pass the MachineFunction into EmitJumpTableInfo.


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

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


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.51 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.52
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.51 Wed Oct  4 21:41:43 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Wed Oct  4 22:00:37 2006
@@ -161,7 +161,7 @@
 /// EmitJumpTableInfo - Print assembly representations of the jump tables 
 /// used by the current function to the current output stream.  
 ///
-void EmitJumpTableInfo(MachineJumpTableInfo *MJTI);
+void EmitJumpTableInfo(MachineJumpTableInfo *MJTI, MachineFunction &MF);
 
 /// EmitSpecialLLVMGlobal - Check to see if the specified global is a
 /// special global used by LLVM.  If so, emit it and return true, otherwise



___
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

2006-10-17 Thread Jim Laskey


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.52 -> 1.53
---
Log message:

Basic support for getGlobalLinkName.

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

 AsmPrinter.h |9 -
 1 files changed, 8 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.52 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.53
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.52 Wed Oct  4 22:00:37 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Tue Oct 17 08:41:07 2006
@@ -99,6 +99,13 @@
 /// specified global, returned in log form.  This includes an explicitly
 /// requested alignment (if the global has one).
 unsigned getPreferredAlignmentLog(const GlobalVariable *GV) const;
+
+/// getGlobalLinkName - Returns the asm/link name of of the specified
+/// global variable.  Should be overridden by each target asm printer to
+/// generate the appropriate value.
+virtual void getGlobalLinkName(const GlobalVariable *GV,
+   std::string &LinkName);
+
   protected:
 /// doInitialization - Set up the AsmPrinter when we are working on a new
 /// module.  If your pass overrides this, it must make sure to explicitly
@@ -167,7 +174,7 @@
 /// special global used by LLVM.  If so, emit it and return true, otherwise
 /// do nothing and return false.
 bool EmitSpecialLLVMGlobal(const GlobalVariable *GV);
-
+
 /// EmitAlignment - Emit an alignment directive to the specified power of
 /// two boundary.  For example, if you pass in 3 here, you will get an 8
 /// byte alignment.  If a global value is specified, and if that global has



___
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

2006-10-17 Thread Jim Laskey


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.53 -> 1.54
---
Log message:

Clean up interface to getGlobalLinkName.

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

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


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.53 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.54
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.53 Tue Oct 17 08:41:07 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Tue Oct 17 12:17:24 2006
@@ -103,8 +103,7 @@
 /// getGlobalLinkName - Returns the asm/link name of of the specified
 /// global variable.  Should be overridden by each target asm printer to
 /// generate the appropriate value.
-virtual void getGlobalLinkName(const GlobalVariable *GV,
-   std::string &LinkName);
+virtual const std::string getGlobalLinkName(const GlobalVariable *GV) 
const;
 
   protected:
 /// doInitialization - Set up the AsmPrinter when we are working on a new



___
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

2006-10-24 Thread Devang Patel


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.54 -> 1.55
---
Log message:

Move getPreferredAlignmentLog from AsmPrinter to TargetData


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

 AsmPrinter.h |5 -
 1 files changed, 5 deletions(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.54 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.55
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.54 Tue Oct 17 12:17:24 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Tue Oct 24 15:32:14 2006
@@ -95,11 +95,6 @@
 ///
 void SwitchToDataSection(const char *NewSection, const GlobalValue *GV);
 
-/// getPreferredAlignmentLog - Return the preferred alignment of the
-/// specified global, returned in log form.  This includes an explicitly
-/// requested alignment (if the global has one).
-unsigned getPreferredAlignmentLog(const GlobalVariable *GV) const;
-
 /// getGlobalLinkName - Returns the asm/link name of of the specified
 /// global variable.  Should be overridden by each target asm printer to
 /// generate the appropriate value.



___
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

2007-04-25 Thread Anton Korobeynikov


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.62 -> 1.63
---
Log message:

Implement aliases. This fixes PR1017: http://llvm.org/PR1017  and it's 
dependent bugs. CFE part 
will follow.


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

 AsmPrinter.h |1 +
 1 files changed, 1 insertion(+)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.62 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.63
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.62 Wed Feb 21 16:47:38 2007
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Wed Apr 25 09:27:10 2007
@@ -24,6 +24,7 @@
   class Constant;
   class ConstantArray;
   class GlobalVariable;
+  class GlobalAlias;
   class MachineConstantPoolEntry;
   class MachineConstantPoolValue;
   class Mangler;



___
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

2007-05-31 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.66 -> 1.67
---
Log message:

Fix the asmprinter so that a globalvalue can specify an explicit alignment
smaller than the preferred alignment, but so that the target can actually
specify a minimum alignment if needed.  This fixes some objc protocol 
failures Devang tracked down.


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

 AsmPrinter.h |   14 --
 1 files changed, 12 insertions(+), 2 deletions(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.66 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.67
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.66 Wed May  2 20:11:53 2007
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Thu May 31 13:57:45 2007
@@ -248,8 +248,18 @@
 /// EmitAlignment - Emit an alignment directive to the specified power of
 /// two boundary.  For example, if you pass in 3 here, you will get an 8
 /// byte alignment.  If a global value is specified, and if that global has
-/// an explicit alignment requested, it will override the alignment 
request.
-void EmitAlignment(unsigned NumBits, const GlobalValue *GV = 0) const;
+/// an explicit alignment requested, it will unconditionally override the
+/// alignment request.  However, if ForcedAlignBits is specified, this 
value
+/// has final say: the ultimate alignment will be the max of 
ForcedAlignBits
+/// and the alignment computed with NumBits and the global.
+///
+/// The algorithm is:
+/// Align = NumBits;
+/// if (GV && GV->hasalignment) Align = GV->getalignment();
+/// Align = std::max(Align, ForcedAlignBits);
+///
+void EmitAlignment(unsigned NumBits, const GlobalValue *GV = 0,
+   unsigned ForcedAlignBits = 0) const;
 
   protected:
 /// EmitZeros - Emit a block of zeros.



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


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

2006-01-04 Thread Jim Laskey


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.23 -> 1.24
DwarfWriter.h updated: 1.3 -> 1.4
---
Log message:

Tie dwarf generation to darwin assembler.


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

 AsmPrinter.h  |   41 
 DwarfWriter.h |  142 +-
 2 files changed, 180 insertions(+), 3 deletions(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.23 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.24
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.23 Tue Dec 13 00:31:41 2005
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Wed Jan  4 07:52:30 2006
@@ -35,7 +35,7 @@
 /// IncrementFunctionNumber().
 ///
 unsigned FunctionNumber;
-
+
   protected:
 /// Output stream on which we're printing assembly code.
 ///
@@ -165,6 +165,7 @@
 
 AsmPrinter(std::ostream &o, TargetMachine &TM);
 
+  public:
 /// SwitchSection - Switch to the specified section of the executable if we
 /// are not already in it!  If GV is non-null and if the global has an
 /// explicitly requested section, we switch to the section indicated for 
the
@@ -175,6 +176,7 @@
 ///
 void SwitchSection(const char *NewSection, const GlobalValue *GV);
 
+  protected:
 /// getFunctionNumber - Return a unique ID for the current function.
 ///
 unsigned getFunctionNumber() const { return FunctionNumber; }
@@ -229,6 +231,43 @@
 
   private:
 void EmitXXStructorList(Constant *List);
+
+  public:
+/// getCommentString - get the comment string.
+///
+const char *getCommentString() {
+  return CommentString;
+}
+
+/// getData8bitsDirective - get the 8-bit data directive string.
+///
+const char *getData8bitsDirective() {
+  return Data8bitsDirective;
+}
+
+/// getData16bitsDirective - get the 16-bit data directive string.
+///
+const char *getData16bitsDirective() {
+  return Data16bitsDirective;
+}
+
+/// getData32bitsDirective - get the 32-bit data directive string.
+///
+const char *getData32bitsDirective() {
+  return Data32bitsDirective;
+}
+
+/// getData64bitsDirective - get the 64-bit data directive string.
+///
+const char *getData64bitsDirective() {
+  return Data64bitsDirective;
+}
+
+/// getPrivateGlobalPrefix - get private label prefix.
+///
+const char *getPrivateGlobalPrefix() {
+  return PrivateGlobalPrefix;
+}
   };
 }
 


Index: llvm/include/llvm/CodeGen/DwarfWriter.h
diff -u llvm/include/llvm/CodeGen/DwarfWriter.h:1.3 
llvm/include/llvm/CodeGen/DwarfWriter.h:1.4
--- llvm/include/llvm/CodeGen/DwarfWriter.h:1.3 Wed Dec 21 19:40:06 2005
+++ llvm/include/llvm/CodeGen/DwarfWriter.h Wed Jan  4 07:52:30 2006
@@ -14,11 +14,14 @@
 #ifndef LLVM_CODEGEN_DWARFPRINTER_H
 #define LLVM_CODEGEN_DWARFPRINTER_H
 
+#include 
+#include "llvm/CodeGen/MachineDebugInfo.h"
+
 namespace llvm {
 
-  
//===--===//
+  
//======//
   // Dwarf constants as gleaned from the DWARF Debugging Information Format V.3
-  // reference manual http://dwarf.freestandards.org. 
+  // reference manual http://dwarf.freestandards.org .
   //
   enum dwarf_constants {
// Tags
@@ -422,6 +425,141 @@
 DW_CFA_lo_user = 0x1c,
 DW_CFA_hi_user = 0x3f
   };
+  
+  // Forward declarations.
+  //
+  class AsmPrinter;
+  
+  
//======//
+  // DwarfWriter - emits dwarf debug and exception handling directives.
+  //
+  class DwarfWriter {
+  
+  protected:
+  
+/// O - Stream to .s file.
+///
+std::ostream &O;
+
+/// Asm - Target of dwarf emission.
+///
+AsmPrinter *Asm;
+
+/// DebugInfo - Collected debug information.
+///
+MachineDebugInfo &DebugInfo;
+
+/// hasLEB128 - True if target asm supports leb128 directives.
+///
+bool hasLEB128; /// Defaults to false.
+
+/// needsSet - True if target asm can't compute addresses on data
+/// directives.
+bool needsSet; /// Defaults to false.
+
+/// DwarfAbbrevSection - section directive arg for dwarf abbrev.
+///
+const char *DwarfAbbrevSection; /// Defaults to ".debug_abbrev".
+
+/// DwarfInfoSection - section directive arg for dwarf info.
+///
+const char *DwarfInfoSection; /// Defaults to ".debug_info".
+
+/// DwarfLineSection - section directive arg for dwarf info.
+///
+const char *DwarfLineSection; /// Defaults to ".debug_line".
+
+  public:
+
+// Ctor.
+DwarfWriter(std::ostream &o, AsmPrinter *ap, MachineDebugInfo &di)
+: O(o)
+, Asm(ap)
+, DebugInfo(di)
+, hasLEB128(false)
+, needsSet(false)
+, DwarfAbbrevSection(".debug_abbrev")
+, DwarfInfoSection

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

2007-01-26 Thread Jim Laskey


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.60 -> 1.61
SelectionDAGNodes.h updated: 1.163 -> 1.164
---
Log message:

Make LABEL a builtin opcode.

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

 AsmPrinter.h|4 
 SelectionDAGNodes.h |   13 +++--
 2 files changed, 11 insertions(+), 6 deletions(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.60 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.61
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.60 Thu Jan 25 09:12:02 2007
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Fri Jan 26 08:34:51 2007
@@ -266,6 +266,10 @@
 /// instruction that is an inline asm.
 void printInlineAsm(const MachineInstr *MI) const;
 
+/// printLabel - This method prints a local label used by debug and
+/// exception handling tables.
+void printLabel(const MachineInstr *MI) const;
+
 /// printBasicBlockLabel - This method prints the label for the specified
 /// MachineBasicBlock
 virtual void printBasicBlockLabel(const MachineBasicBlock *MBB,


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.163 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.164
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.163 Sat Dec 16 00:21:55 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Fri Jan 26 08:34:51 2007
@@ -436,6 +436,13 @@
 //   Operand #2n+3: A TargetConstant, indicating if the reg is a use/def
 //   Operand #last: Optional, an incoming flag.
 INLINEASM,
+
+// LABEL - Represents a label in mid basic block used to track
+// locations needed for debug and exception handling tables.  This node
+// returns a chain.
+//   Operand #0 : input chain.
+//   Operand #1 : module unique number use to identify the label.
+LABEL,
 
 // STACKSAVE - STACKSAVE has one operand, an input chain.  It produces a
 // value, the same type as the pointer type for the system, and an output
@@ -503,12 +510,6 @@
 // produces a token chain as output.
 DEBUG_LOC,
 
-// DEBUG_LABEL - This node is used to mark a location in the code where a
-// label should be generated for use by the debug information.  It takes a
-// token chain as input and then a unique id (provided by 
MachineDebugInfo.)
-// It produces a token chain as output.
-DEBUG_LABEL,
-
 // BUILTIN_OP_END - This must be the last enum value in this list.
 BUILTIN_OP_END
   };



___
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-05-19 Thread Reid Spencer


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.39 -> 1.40
DwarfWriter.h updated: 1.35 -> 1.36
---
Log message:

Fix some doxygen usage in these headers.


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

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


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.39 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.40
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.39 Tue May  9 00:33:28 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Fri May 19 14:07:54 2006
@@ -82,7 +82,8 @@
 /// will enclose any GlobalVariable that points to a function.
 /// For example, this is used by the IA64 backend to materialize
 /// function descriptors, by decorating the ".data8" object with the
-/// @fptr( ) link-relocation operator.
+/// \literal @fptr( ) \endliteral
+/// link-relocation operator.
 ///
 const char *FunctionAddrPrefix;   // Defaults to ""
 const char *FunctionAddrSuffix;   // Defaults to ""
@@ -173,7 +174,8 @@
 /// LCOMMDirective - This is the name of a directive (if supported) that 
can
 /// be used to efficiently declare a local (internal) block of zero
 /// initialized data in the .bss/.data section.  The syntax expected is:
-/// SYMBOLNAME LENGTHINBYTES, ALIGNMENT
+/// \literal  SYMBOLNAME LENGTHINBYTES, ALIGNMENT
+/// \endliteral
 const char *LCOMMDirective;  // Defaults to null.
 
 const char *COMMDirective;   // Defaults to "\t.comm\t".


Index: llvm/include/llvm/CodeGen/DwarfWriter.h
diff -u llvm/include/llvm/CodeGen/DwarfWriter.h:1.35 
llvm/include/llvm/CodeGen/DwarfWriter.h:1.36
--- llvm/include/llvm/CodeGen/DwarfWriter.h:1.35Tue May  2 20:29:56 2006
+++ llvm/include/llvm/CodeGen/DwarfWriter.h Fri May 19 14:07:54 2006
@@ -279,7 +279,8 @@
   void EmitInt64(uint64_t Value) const;
   
   /// EmitString - Emit a string with quotes and a null terminator.
-  /// Special characters are emitted properly. (Eg. '\t')
+  /// Special characters are emitted properly. 
+  /// \literal (Eg. '\t') \endliteral
   void EmitString(const std::string &String) const;
 
   /// PrintLabelName - Print label name in form used by Dwarf writer.



___
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-06 Thread Jim Laskey


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.45 -> 1.46
DwarfWriter.h updated: 1.38 -> 1.39
---
Log message:

Separate target specific asm properties from the asm printers.


---
Diffs of the changes:  (+25 -237)

 AsmPrinter.h  |  168 --
 DwarfWriter.h |   94 
 2 files changed, 25 insertions(+), 237 deletions(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.45 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.46
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.45 Sat Aug 12 16:29:52 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Wed Sep  6 13:34:40 2006
@@ -7,9 +7,9 @@
 //
 
//===--===//
 //
-// This class is intended to be used as a base class for target-specific
-// asmwriters.  This class primarily takes care of printing global constants,
-// which are printed in a very similar way across all targets.
+// This file contains a class to be used as the base class for target specific
+// asm writers.  This class primarily handles common functionality used by
+// all asm writers.
 //
 
//===--===//
 
@@ -22,10 +22,14 @@
 namespace llvm {
   class Constant;
   class ConstantArray;
-  class Mangler;
   class GlobalVariable;
   class MachineConstantPoolEntry;
+  class Mangler;
+  class TargetAsmInfo;
+  
 
+  /// AsmPrinter - This class is intended to be used as a driving class for all
+  /// asm writers.
   class AsmPrinter : public MachineFunctionPass {
 /// FunctionNumber - This provides a unique ID for each function emitted in
 /// this translation unit.  It is autoincremented by SetupMachineFunction,
@@ -42,6 +46,10 @@
 /// Target machine description.
 ///
 TargetMachine &TM;
+
+/// Target Asm Printer information.
+///
+TargetAsmInfo *TAI;
 
 /// Name-mangler for global names.
 ///
@@ -51,163 +59,13 @@
 /// beginning of each call to runOnMachineFunction().
 ///
 std::string CurrentFnName;
-
-
//===--===//
-// Properties to be set by the derived class ctor, used to configure the
-// asmwriter.
-
-/// CommentString - This indicates the comment character used by the
-/// assembler.
-const char *CommentString; // Defaults to "#"
-
-/// GlobalPrefix - If this is set to a non-empty string, it is prepended
-/// onto all global symbols.  This is often used for "_" or ".".
-const char *GlobalPrefix;// Defaults to ""
-
-/// PrivateGlobalPrefix - This prefix is used for globals like constant
-/// pool entries that are completely private to the .o file and should not
-/// have names in the .o file.  This is often "." or "L".
-const char *PrivateGlobalPrefix;   // Defaults to "."
-
-/// GlobalVarAddrPrefix/Suffix - If these are nonempty, these strings
-/// will enclose any GlobalVariable (that isn't a function)
-///
-const char *GlobalVarAddrPrefix;   // Defaults to ""
-const char *GlobalVarAddrSuffix;   // Defaults to ""
-
-/// FunctionAddrPrefix/Suffix - If these are nonempty, these strings
-/// will enclose any GlobalVariable that points to a function.
-/// For example, this is used by the IA64 backend to materialize
-/// function descriptors, by decorating the ".data8" object with the
-/// \literal @fptr( ) \endliteral
-/// link-relocation operator.
-///
-const char *FunctionAddrPrefix;   // Defaults to ""
-const char *FunctionAddrSuffix;   // Defaults to ""
-
-/// InlineAsmStart/End - If these are nonempty, they contain a directive to
-/// emit before and after an inline assmebly statement.
-const char *InlineAsmStart;   // Defaults to "#APP\n"
-const char *InlineAsmEnd; // Defaults to "#NO_APP\n"
-
-//===--- Data Emission Directives 
-===//
-
-/// ZeroDirective - this should be set to the directive used to get some
-/// number of zero bytes emitted to the current section.  Common cases are
-/// "\t.zero\t" and "\t.space\t".  If this is set to null, the
-/// Data*bitsDirective's will be used to emit zero bytes.
-const char *ZeroDirective;   // Defaults to "\t.zero\t"
-const char *ZeroDirectiveSuffix;  // Defaults to ""
-
-/// AsciiDirective - This directive allows emission of an ascii string with
-/// the standard C escape characters embedded into it.
-const char *AsciiDirective;  // Defaults to "\t.ascii\t"
-
-/// AscizDirective - If not null, this allows for special handling of
-/// zero terminated strings on this target.  This is commonly supported as
-/// ".asciz".  If a target doesn't support this, it can be set to null.
-const ch

[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/include/llvm/CodeGen/AsmPrinter.h DwarfWriter.h MachineDebugInfo.h

2006-06-23 Thread Jim Laskey


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.40 -> 1.41
DwarfWriter.h updated: 1.37 -> 1.38
MachineDebugInfo.h updated: 1.36 -> 1.37
---
Log message:

Add and sort "sections" in debug lines.  This always stepping through
code in sections other than ".text", including weak sections like ctors and
dtors.


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

 AsmPrinter.h   |8 
 DwarfWriter.h  |   17 -
 MachineDebugInfo.h |6 +++---
 3 files changed, 15 insertions(+), 16 deletions(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.40 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.41
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.40 Fri May 19 14:07:54 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Fri Jun 23 07:51:53 2006
@@ -26,10 +26,6 @@
   class GlobalVariable;
 
   class AsmPrinter : public MachineFunctionPass {
-/// CurrentSection - The current section we are emitting to.  This is
-/// controlled and used by the SwitchSection method.
-std::string CurrentSection;
-
 /// FunctionNumber - This provides a unique ID for each function emitted in
 /// this translation unit.  It is autoincremented by SetupMachineFunction,
 /// and can be accessed with getFunctionNumber() and 
@@ -134,6 +130,10 @@
 
 //===--- Section Switching Directives 
-===//
 
+/// CurrentSection - The current section we are emitting to.  This is
+/// controlled and used by the SwitchSection method.
+std::string CurrentSection;
+
 /// SwitchToSectionDirective - This is the directive used when we want to
 /// emit a global to an arbitrary section.  The section name is emited 
after
 /// this.


Index: llvm/include/llvm/CodeGen/DwarfWriter.h
diff -u llvm/include/llvm/CodeGen/DwarfWriter.h:1.37 
llvm/include/llvm/CodeGen/DwarfWriter.h:1.38
--- llvm/include/llvm/CodeGen/DwarfWriter.h:1.37Wed Jun 14 06:35:03 2006
+++ llvm/include/llvm/CodeGen/DwarfWriter.h Fri Jun 23 07:51:53 2006
@@ -47,6 +47,7 @@
 class Module;
 class MRegisterInfo;
 class SubprogramDesc;
+class SourceLineInfo;
 class TargetData;
 class Type;
 class TypeDesc;
@@ -110,11 +111,6 @@
   ///
   bool shouldEmit;
   
-  /// IsNormalText - Flag to indicate if routine is not special case text
-  /// (coalesced.)
-  // FIXME - should be able to debug coalesced functions.
-  bool IsNormalText;
-
   /// SubprogramCount - The running count of functions being compiled.
   ///
   unsigned SubprogramCount;
@@ -144,10 +140,13 @@
   /// descriptors to debug information entries.
   std::map DescToDieMap;
   
-  /// TypeToDieMap - Type to DIEType map.
+  /// SectionMap - Provides a unique id per text section.
+  ///
+  UniqueVector SectionMap;
+  
+  /// SectionSourceLines - Tracks line numbers per text section.
   ///
-  // FIXME - Should not be needed.
-  std::map TypeToDieMap;
+  std::vector > SectionSourceLines;
   
   
//======//
   // Properties to be set by the derived class ctor, used to configure the
@@ -483,7 +482,7 @@
   
   /// BeginFunction - Gather pre-function debug information.  Assumes being 
   /// emitted immediately after the function entry point.
-  void BeginFunction(MachineFunction *MF, bool IsNormalText);
+  void BeginFunction(MachineFunction *MF);
   
   /// EndFunction - Gather and emit post-function debug information.
   ///


Index: llvm/include/llvm/CodeGen/MachineDebugInfo.h
diff -u llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.36 
llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.37
--- llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.36   Fri Jun 16 08:14:03 2006
+++ llvm/include/llvm/CodeGen/MachineDebugInfo.hFri Jun 23 07:51:53 2006
@@ -1031,9 +1031,9 @@
 return SourceFiles;
   }
   
-  /// getSourceLines - Return a vector of source lines.  Vector index + 1
-  /// equals label ID.
-  const std::vector &getSourceLines() const {
+  /// getSourceLines - Return a vector of source lines.
+  ///
+  std::vector &getSourceLines() {
 return Lines;
   }
   



___
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 MachineDebugInfo.h SelectionDAG.h

2006-01-04 Thread Jim Laskey


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.24 -> 1.25
DwarfWriter.h updated: 1.4 -> 1.5
MachineDebugInfo.h updated: 1.3 -> 1.4
SelectionDAG.h updated: 1.82 -> 1.83
---
Log message:

Applied some recommend changes from sabre.  The dominate one beginning "let the
pass manager do it's thing."  Fixes crash when compiling -g files and suppresses
dwarf statements if no debug info is present.


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

 AsmPrinter.h   |   45 ++--
 DwarfWriter.h  |  119 -
 MachineDebugInfo.h |   30 +
 SelectionDAG.h |6 ++
 4 files changed, 88 insertions(+), 112 deletions(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.24 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.25
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.24 Wed Jan  4 07:52:30 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Wed Jan  4 16:28:25 2006
@@ -36,7 +36,7 @@
 ///
 unsigned FunctionNumber;
 
-  protected:
+  public:
 /// Output stream on which we're printing assembly code.
 ///
 std::ostream &O;
@@ -162,7 +162,8 @@
 /// HasDotTypeDotSizeDirective - True if the target has .type and .size
 /// directives, this is true for most ELF targets.
 bool HasDotTypeDotSizeDirective; // Defaults to true.
-
+  
+  protected:
 AsmPrinter(std::ostream &o, TargetMachine &TM);
 
   public:
@@ -194,7 +195,7 @@
 /// doFinalization - Shut down the asmprinter.  If you override this in 
your
 /// pass, you must make sure to call it explicitly.
 bool doFinalization(Module &M);
-
+
 /// SetupMachineFunction - This should be called when a new MachineFunction
 /// is being processed from runOnMachineFunction.
 void SetupMachineFunction(MachineFunction &MF);
@@ -231,43 +232,7 @@
 
   private:
 void EmitXXStructorList(Constant *List);
-
-  public:
-/// getCommentString - get the comment string.
-///
-const char *getCommentString() {
-  return CommentString;
-}
-
-/// getData8bitsDirective - get the 8-bit data directive string.
-///
-const char *getData8bitsDirective() {
-  return Data8bitsDirective;
-}
-
-/// getData16bitsDirective - get the 16-bit data directive string.
-///
-const char *getData16bitsDirective() {
-  return Data16bitsDirective;
-}
-
-/// getData32bitsDirective - get the 32-bit data directive string.
-///
-const char *getData32bitsDirective() {
-  return Data32bitsDirective;
-}
-
-/// getData64bitsDirective - get the 64-bit data directive string.
-///
-const char *getData64bitsDirective() {
-  return Data64bitsDirective;
-}
-
-/// getPrivateGlobalPrefix - get private label prefix.
-///
-const char *getPrivateGlobalPrefix() {
-  return PrivateGlobalPrefix;
-}
+
   };
 }
 


Index: llvm/include/llvm/CodeGen/DwarfWriter.h
diff -u llvm/include/llvm/CodeGen/DwarfWriter.h:1.4 
llvm/include/llvm/CodeGen/DwarfWriter.h:1.5
--- llvm/include/llvm/CodeGen/DwarfWriter.h:1.4 Wed Jan  4 07:52:30 2006
+++ llvm/include/llvm/CodeGen/DwarfWriter.h Wed Jan  4 16:28:25 2006
@@ -14,8 +14,7 @@
 #ifndef LLVM_CODEGEN_DWARFPRINTER_H
 #define LLVM_CODEGEN_DWARFPRINTER_H
 
-#include 
-#include "llvm/CodeGen/MachineDebugInfo.h"
+#include 
 
 namespace llvm {
 
@@ -429,6 +428,7 @@
   // Forward declarations.
   //
   class AsmPrinter;
+  class MachineDebugInfo;
   
   
//======//
   // DwarfWriter - emits dwarf debug and exception handling directives.
@@ -447,12 +447,28 @@
 
 /// DebugInfo - Collected debug information.
 ///
-MachineDebugInfo &DebugInfo;
+MachineDebugInfo *DebugInfo;
 
+/// didInitial - Flag to indicate if initial emission has been done.
+///
+bool didInitial;
+
+
//===--===//
+// Properties to be set by the derived class ctor, used to configure the
+// dwarf writer.
+
 /// hasLEB128 - True if target asm supports leb128 directives.
 ///
 bool hasLEB128; /// Defaults to false.
 
+/// hasDotLoc - True if target asm supports .loc directives.
+///
+bool hasDotLoc; /// Defaults to false.
+
+/// hasDotFile - True if target asm supports .file directives.
+///
+bool hasDotFile; /// Defaults to false.
+
 /// needsSet - True if target asm can't compute addresses on data
 /// directives.
 bool needsSet; /// Defaults to false.
@@ -469,94 +485,89 @@
 ///
 const char *DwarfLineSection; /// Defaults to ".debug_line".
 
+
//===--===//
+
   public:
 
 // Ctor.
-DwarfWriter(std::ostream &o, AsmPrinter *ap, MachineDebugInfo &di)
+DwarfWriter(std::

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

2006-06-23 Thread Jim Laskey
I'm getting old and my brain is confused.s/always/allows/Cheers,-- JimOn Jun 23, 2006, at 9:52 AM, Jim Laskey wrote:Add and sort "sections" in debug lines.  This always stepping through code in sections other than ".text", including weak sections like ctors and dtors. 

smime.p7s
Description: S/MIME cryptographic signature
___
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 MachineConstantPool.h SelectionDAG.h SelectionDAGCSEMap.h SelectionDAGNodes.h

2006-09-12 Thread Evan Cheng


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.47 -> 1.48
MachineConstantPool.h updated: 1.17 -> 1.18
SelectionDAG.h updated: 1.129 -> 1.130
SelectionDAGCSEMap.h updated: 1.7 -> 1.8
SelectionDAGNodes.h updated: 1.145 -> 1.146
---
Log message:

Added support for machine specific constantpool values. These are useful for
representing expressions that can only be resolved at link time, etc.


---
Diffs of the changes:  (+123 -10)

 AsmPrinter.h  |9 ++-
 MachineConstantPool.h |   63 +++---
 SelectionDAG.h|9 ++-
 SelectionDAGCSEMap.h  |1 
 SelectionDAGNodes.h   |   51 
 5 files changed, 123 insertions(+), 10 deletions(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.47 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.48
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.47 Thu Sep  7 17:06:40 2006
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Tue Sep 12 15:59:22 2006
@@ -24,6 +24,7 @@
   class ConstantArray;
   class GlobalVariable;
   class MachineConstantPoolEntry;
+  class MachineConstantPoolValue;
   class Mangler;
   class TargetAsmInfo;
   
@@ -174,6 +175,8 @@
 /// EmitGlobalConstant - Print a general LLVM constant to the .s file.
 ///
 void EmitGlobalConstant(const Constant* CV);
+
+virtual void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV);
 
 /// printInlineAsm - This method formats and prints the specified machine
 /// instruction that is an inline asm.
@@ -188,7 +191,11 @@
 /// printSetLabel - This method prints a set label for the specified
 /// MachineBasicBlock
 void printSetLabel(unsigned uid, const MachineBasicBlock *MBB) const;
-
+
+/// printDataDirective - This method prints the asm directive for the
+/// specified type.
+void printDataDirective(const Type *type);
+
   private:
 void EmitXXStructorList(Constant *List);
 void EmitConstantPool(unsigned Alignment, const char *Section,


Index: llvm/include/llvm/CodeGen/MachineConstantPool.h
diff -u llvm/include/llvm/CodeGen/MachineConstantPool.h:1.17 
llvm/include/llvm/CodeGen/MachineConstantPool.h:1.18
--- llvm/include/llvm/CodeGen/MachineConstantPool.h:1.17Mon May 15 
11:12:01 2006
+++ llvm/include/llvm/CodeGen/MachineConstantPool.h Tue Sep 12 15:59:22 2006
@@ -15,22 +15,77 @@
 #ifndef LLVM_CODEGEN_MACHINECONSTANTPOOL_H
 #define LLVM_CODEGEN_MACHINECONSTANTPOOL_H
 
+#include "llvm/CodeGen/SelectionDAGCSEMap.h"
 #include 
 #include 
 
 namespace llvm {
 
+class AsmPrinter;
 class Constant;
 class TargetData;
+class TargetMachine;
+class MachineConstantPool;
+
+/// Abstract base class for all machine specific constantpool value subclasses.
+///
+class MachineConstantPoolValue {
+  const Type *Ty;
+
+public:
+  MachineConstantPoolValue(const Type *ty) : Ty(ty) {}
+  virtual ~MachineConstantPoolValue() {};
+
+  /// getType - get type of this MachineConstantPoolValue.
+  ///
+  inline const Type *getType() const { return Ty; }
+
+  virtual int getExistingMachineCPValue(MachineConstantPool *CP,
+unsigned Alignment) = 0;
+
+  virtual void AddSelectionDAGCSEId(SelectionDAGCSEMap::NodeID *Id) = 0;
+
+  /// print - Implement operator<<...
+  ///
+  virtual void print(std::ostream &O) const = 0;
+};
+
+inline std::ostream &operator<<(std::ostream &OS,
+const MachineConstantPoolValue &V) {
+  V.print(OS);
+  return OS;
+}
 
 /// This class is a data container for one entry in a MachineConstantPool.
 /// It contains a pointer to the value and an offset from the start of
 /// the constant pool.
 /// @brief An entry in a MachineConstantPool
 struct MachineConstantPoolEntry {
-  Constant *Val;   ///< The constant itself.
-  unsigned Offset; ///< The offset of the constant from the start of the pool.
-  MachineConstantPoolEntry(Constant *V, unsigned O) : Val(V), Offset(O) {}
+  /// The constant itself.
+  union {
+Constant *ConstVal;
+MachineConstantPoolValue *MachineCPVal;
+  } Val;
+
+  /// The offset of the constant from the start of the pool. It's really
+  /// 31-bit only. The top bit is set when Val is a MachineConstantPoolValue.
+  unsigned Offset;
+
+  MachineConstantPoolEntry(Constant *V, unsigned O)
+: Offset(O) {
+assert((int)Offset >= 0 && "Offset is too large");
+Val.ConstVal = V;
+  }
+  MachineConstantPoolEntry(MachineConstantPoolValue *V, unsigned O)
+: Offset(O){
+assert((int)Offset >= 0 && "Offset is too large");
+Val.MachineCPVal = V; 
+Offset |= 1 << (sizeof(unsigned)*8-1);
+  }
+
+  bool isMachineConstantPoolEntry() const {
+return (int)Offset < 0;
+  }
 };
   
 /// The MachineConstantPool class keeps track of constants referenced by a
@@ -50,6 +105,7 @@
 public:
   /// @brief The only constructor.
   MachineConstantPool(const TargetData *td) : TD(td), Pool

[llvm-commits] CVS: llvm/include/llvm/CodeGen/AsmPrinter.h LiveIntervalAnalysis.h LiveVariables.h MachineModuleInfo.h SelectionDAGISel.h

2007-05-02 Thread Devang Patel


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.64 -> 1.65
LiveIntervalAnalysis.h updated: 1.81 -> 1.82
LiveVariables.h updated: 1.42 -> 1.43
MachineModuleInfo.h updated: 1.8 -> 1.9
SelectionDAGISel.h updated: 1.38 -> 1.39
---
Log message:

Use 'static const char' instead of 'static const int'.
Due to darwin gcc bug, one version of darwin linker coalesces 
static const int, which defauts PassID based pass identification.


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

 AsmPrinter.h   |2 +-
 LiveIntervalAnalysis.h |2 +-
 LiveVariables.h|2 +-
 MachineModuleInfo.h|2 +-
 SelectionDAGISel.h |2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.64 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.65
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.64 Tue May  1 16:15:46 2007
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Wed May  2 16:39:18 2007
@@ -34,7 +34,7 @@
   /// AsmPrinter - This class is intended to be used as a driving class for all
   /// asm writers.
   class AsmPrinter : public MachineFunctionPass {
-static const int ID;
+static const char ID;
 
 /// FunctionNumber - This provides a unique ID for each function emitted in
 /// this translation unit.  It is autoincremented by SetupMachineFunction,


Index: llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
diff -u llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.81 
llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.82
--- llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.81   Tue May  1 
16:15:46 2007
+++ llvm/include/llvm/CodeGen/LiveIntervalAnalysis.hWed May  2 16:39:18 2007
@@ -65,7 +65,7 @@
 BitVector JoinedLIs;
 
   public:
-static const int ID; // Pass identifcation, replacement for typeid
+static const char ID; // Pass identifcation, replacement for typeid
 LiveIntervals() : MachineFunctionPass((intptr_t)&ID) {}
 
 struct CopyRec {


Index: llvm/include/llvm/CodeGen/LiveVariables.h
diff -u llvm/include/llvm/CodeGen/LiveVariables.h:1.42 
llvm/include/llvm/CodeGen/LiveVariables.h:1.43
--- llvm/include/llvm/CodeGen/LiveVariables.h:1.42  Tue May  1 16:15:46 2007
+++ llvm/include/llvm/CodeGen/LiveVariables.h   Wed May  2 16:39:18 2007
@@ -40,7 +40,7 @@
 
 class LiveVariables : public MachineFunctionPass {
 public:
-  static const int ID; // Pass identifcation, replacement for typeid
+  static const char ID; // Pass identifcation, replacement for typeid
   LiveVariables() : MachineFunctionPass((intptr_t)&ID) {}
 
   /// VarInfo - This represents the regions where a virtual register is live in


Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h
diff -u llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.8 
llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.9
--- llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.8   Tue May  1 16:15:46 2007
+++ llvm/include/llvm/CodeGen/MachineModuleInfo.h   Wed May  2 16:39:18 2007
@@ -1022,7 +1022,7 @@
   std::vector TypeInfos;
 
 public:
-  static const int ID; // Pass identifcation, replacement for typeid
+  static const char ID; // Pass identifcation, replacement for typeid
 
   MachineModuleInfo();
   ~MachineModuleInfo();


Index: llvm/include/llvm/CodeGen/SelectionDAGISel.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGISel.h:1.38 
llvm/include/llvm/CodeGen/SelectionDAGISel.h:1.39
--- llvm/include/llvm/CodeGen/SelectionDAGISel.h:1.38   Tue May  1 16:15:46 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGISel.hWed May  2 16:39:18 2007
@@ -41,7 +41,7 @@
   MachineBasicBlock *BB;
   std::vector TopOrder;
   unsigned DAGSize;
-  static const int ID;
+  static const char ID;
 
   explicit SelectionDAGISel(TargetLowering &tli) : 
 FunctionPass((intptr_t)&ID), TLI(tli), DAGSize(0) {}



___
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 LiveIntervalAnalysis.h LiveVariables.h MachineModuleInfo.h SelectionDAGISel.h

2007-05-02 Thread Devang Patel


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.65 -> 1.66
LiveIntervalAnalysis.h updated: 1.82 -> 1.83
LiveVariables.h updated: 1.43 -> 1.44
MachineModuleInfo.h updated: 1.9 -> 1.10
SelectionDAGISel.h updated: 1.39 -> 1.40
---
Log message:

Drop 'const'


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

 AsmPrinter.h   |2 +-
 LiveIntervalAnalysis.h |2 +-
 LiveVariables.h|2 +-
 MachineModuleInfo.h|2 +-
 SelectionDAGISel.h |2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.65 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.66
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.65 Wed May  2 16:39:18 2007
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Wed May  2 20:11:53 2007
@@ -34,7 +34,7 @@
   /// AsmPrinter - This class is intended to be used as a driving class for all
   /// asm writers.
   class AsmPrinter : public MachineFunctionPass {
-static const char ID;
+static char ID;
 
 /// FunctionNumber - This provides a unique ID for each function emitted in
 /// this translation unit.  It is autoincremented by SetupMachineFunction,


Index: llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
diff -u llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.82 
llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.83
--- llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.82   Wed May  2 
16:39:18 2007
+++ llvm/include/llvm/CodeGen/LiveIntervalAnalysis.hWed May  2 20:11:53 2007
@@ -65,7 +65,7 @@
 BitVector JoinedLIs;
 
   public:
-static const char ID; // Pass identifcation, replacement for typeid
+static char ID; // Pass identifcation, replacement for typeid
 LiveIntervals() : MachineFunctionPass((intptr_t)&ID) {}
 
 struct CopyRec {


Index: llvm/include/llvm/CodeGen/LiveVariables.h
diff -u llvm/include/llvm/CodeGen/LiveVariables.h:1.43 
llvm/include/llvm/CodeGen/LiveVariables.h:1.44
--- llvm/include/llvm/CodeGen/LiveVariables.h:1.43  Wed May  2 16:39:18 2007
+++ llvm/include/llvm/CodeGen/LiveVariables.h   Wed May  2 20:11:53 2007
@@ -40,7 +40,7 @@
 
 class LiveVariables : public MachineFunctionPass {
 public:
-  static const char ID; // Pass identifcation, replacement for typeid
+  static char ID; // Pass identifcation, replacement for typeid
   LiveVariables() : MachineFunctionPass((intptr_t)&ID) {}
 
   /// VarInfo - This represents the regions where a virtual register is live in


Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h
diff -u llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.9 
llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.10
--- llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.9   Wed May  2 16:39:18 2007
+++ llvm/include/llvm/CodeGen/MachineModuleInfo.h   Wed May  2 20:11:53 2007
@@ -1022,7 +1022,7 @@
   std::vector TypeInfos;
 
 public:
-  static const char ID; // Pass identifcation, replacement for typeid
+  static char ID; // Pass identifcation, replacement for typeid
 
   MachineModuleInfo();
   ~MachineModuleInfo();


Index: llvm/include/llvm/CodeGen/SelectionDAGISel.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGISel.h:1.39 
llvm/include/llvm/CodeGen/SelectionDAGISel.h:1.40
--- llvm/include/llvm/CodeGen/SelectionDAGISel.h:1.39   Wed May  2 16:39:18 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGISel.hWed May  2 20:11:53 2007
@@ -41,7 +41,7 @@
   MachineBasicBlock *BB;
   std::vector TopOrder;
   unsigned DAGSize;
-  static const char ID;
+  static char ID;
 
   explicit SelectionDAGISel(TargetLowering &tli) : 
 FunctionPass((intptr_t)&ID), TLI(tli), DAGSize(0) {}



___
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 LiveIntervalAnalysis.h LiveVariables.h MachineFunctionPass.h MachineModuleInfo.h SelectionDAGISel.h

2007-05-01 Thread Devang Patel


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.63 -> 1.64
LiveIntervalAnalysis.h updated: 1.80 -> 1.81
LiveVariables.h updated: 1.41 -> 1.42
MachineFunctionPass.h updated: 1.5 -> 1.6
MachineModuleInfo.h updated: 1.7 -> 1.8
SelectionDAGISel.h updated: 1.37 -> 1.38
---
Log message:

Do not use typeinfo to identify pass in pass manager.


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

 AsmPrinter.h   |2 ++
 LiveIntervalAnalysis.h |3 +++
 LiveVariables.h|3 +++
 MachineFunctionPass.h  |2 ++
 MachineModuleInfo.h|2 ++
 SelectionDAGISel.h |4 +++-
 6 files changed, 15 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.63 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.64
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.63 Wed Apr 25 09:27:10 2007
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Tue May  1 16:15:46 2007
@@ -34,6 +34,8 @@
   /// AsmPrinter - This class is intended to be used as a driving class for all
   /// asm writers.
   class AsmPrinter : public MachineFunctionPass {
+static const int ID;
+
 /// FunctionNumber - This provides a unique ID for each function emitted in
 /// this translation unit.  It is autoincremented by SetupMachineFunction,
 /// and can be accessed with getFunctionNumber() and 


Index: llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
diff -u llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.80 
llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.81
--- llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.80   Wed Apr 25 
02:30:23 2007
+++ llvm/include/llvm/CodeGen/LiveIntervalAnalysis.hTue May  1 16:15:46 2007
@@ -65,6 +65,9 @@
 BitVector JoinedLIs;
 
   public:
+static const int ID; // Pass identifcation, replacement for typeid
+LiveIntervals() : MachineFunctionPass((intptr_t)&ID) {}
+
 struct CopyRec {
   MachineInstr *MI;
   unsigned SrcReg, DstReg;


Index: llvm/include/llvm/CodeGen/LiveVariables.h
diff -u llvm/include/llvm/CodeGen/LiveVariables.h:1.41 
llvm/include/llvm/CodeGen/LiveVariables.h:1.42
--- llvm/include/llvm/CodeGen/LiveVariables.h:1.41  Wed Apr 25 20:40:09 2007
+++ llvm/include/llvm/CodeGen/LiveVariables.h   Tue May  1 16:15:46 2007
@@ -40,6 +40,9 @@
 
 class LiveVariables : public MachineFunctionPass {
 public:
+  static const int ID; // Pass identifcation, replacement for typeid
+  LiveVariables() : MachineFunctionPass((intptr_t)&ID) {}
+
   /// VarInfo - This represents the regions where a virtual register is live in
   /// the program.  We represent this with three different pieces of
   /// information: the instruction that uniquely defines the value, the set of


Index: llvm/include/llvm/CodeGen/MachineFunctionPass.h
diff -u llvm/include/llvm/CodeGen/MachineFunctionPass.h:1.5 
llvm/include/llvm/CodeGen/MachineFunctionPass.h:1.6
--- llvm/include/llvm/CodeGen/MachineFunctionPass.h:1.5 Fri Jul 14 18:08:47 2006
+++ llvm/include/llvm/CodeGen/MachineFunctionPass.h Tue May  1 16:15:46 2007
@@ -26,6 +26,8 @@
 
 struct MachineFunctionPass : public FunctionPass {
 
+  MachineFunctionPass(intptr_t ID) : FunctionPass(ID) {}
+
   /// runOnMachineFunction - This method must be overloaded to perform the
   /// desired machine code transformation or analysis.
   ///


Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h
diff -u llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.7 
llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.8
--- llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.7   Thu Mar  1 14:25:32 2007
+++ llvm/include/llvm/CodeGen/MachineModuleInfo.h   Tue May  1 16:15:46 2007
@@ -1022,6 +1022,8 @@
   std::vector TypeInfos;
 
 public:
+  static const int ID; // Pass identifcation, replacement for typeid
+
   MachineModuleInfo();
   ~MachineModuleInfo();
   


Index: llvm/include/llvm/CodeGen/SelectionDAGISel.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGISel.h:1.37 
llvm/include/llvm/CodeGen/SelectionDAGISel.h:1.38
--- llvm/include/llvm/CodeGen/SelectionDAGISel.h:1.37   Mon Apr  9 07:31:58 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGISel.hTue May  1 16:15:46 2007
@@ -41,8 +41,10 @@
   MachineBasicBlock *BB;
   std::vector TopOrder;
   unsigned DAGSize;
+  static const int ID;
 
-  explicit SelectionDAGISel(TargetLowering &tli) : TLI(tli), DAGSize(0) {}
+  explicit SelectionDAGISel(TargetLowering &tli) : 
+FunctionPass((intptr_t)&ID), TLI(tli), DAGSize(0) {}
   
   TargetLowering &getTargetLowering() { return TLI; }
 



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