[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAG.cpp updated: 1.362 - 1.363 --- Log message: Added a new SDNode type: BR_JT for jumptable branch. --- Diffs of the changes: (+1 -0) SelectionDAG.cpp |1 + 1 files changed, 1 insertion(+) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.362 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.363 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.362Sun Oct 29 01:14:47 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Mon Oct 30 01:59:36 2006 @@ -2734,6 +2734,7 @@ // Control flow instructions case ISD::BR: return br; case ISD::BRIND: return brind; + case ISD::BR_JT: return br_jt; case ISD::BRCOND: return brcond; case ISD::BR_CC: return br_cc; case ISD::RET: return ret; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp SelectionDAGISel.cpp
Changes in directory llvm/lib/CodeGen/SelectionDAG: LegalizeDAG.cpp updated: 1.413 - 1.414 SelectionDAGISel.cpp updated: 1.307 - 1.308 --- Log message: Lower jumptable to BR_JT. The legalizer can lower it to a BRIND or let the target custom lower it. --- Diffs of the changes: (+55 -28) LegalizeDAG.cpp | 48 SelectionDAGISel.cpp | 35 +++ 2 files changed, 55 insertions(+), 28 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.413 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.414 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.413 Fri Oct 20 02:07:24 2006 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Oct 30 02:00:44 2006 @@ -16,6 +16,7 @@ #include llvm/CodeGen/MachineFrameInfo.h #include llvm/Target/TargetLowering.h #include llvm/Target/TargetData.h +#include llvm/Target/TargetMachine.h #include llvm/Target/TargetOptions.h #include llvm/CallingConv.h #include llvm/Constants.h @@ -1240,6 +1241,53 @@ } Result = DAG.UpdateNodeOperands(Result, Tmp1, Tmp2); break; + case ISD::BR_JT: +Tmp1 = LegalizeOp(Node-getOperand(0)); // Legalize the chain. +// Ensure that libcalls are emitted before a branch. +Tmp1 = DAG.getNode(ISD::TokenFactor, MVT::Other, Tmp1, LastCALLSEQ_END); +Tmp1 = LegalizeOp(Tmp1); +LastCALLSEQ_END = DAG.getEntryNode(); + +Tmp2 = LegalizeOp(Node-getOperand(1)); // Legalize the jumptable node. +Result = DAG.UpdateNodeOperands(Result, Tmp1, Tmp2, Node-getOperand(2)); + +switch (TLI.getOperationAction(ISD::BR_JT, MVT::Other)) { +default: assert(0 This action is not supported yet!); +case TargetLowering::Legal: break; +case TargetLowering::Custom: + Tmp1 = TLI.LowerOperation(Result, DAG); + if (Tmp1.Val) Result = Tmp1; + break; +case TargetLowering::Expand: { + SDOperand Chain = Result.getOperand(0); + SDOperand Table = Result.getOperand(1); + SDOperand Index = Result.getOperand(2); + + MVT::ValueType PTy = TLI.getPointerTy(); + bool isPIC = TLI.getTargetMachine().getRelocationModel() == Reloc::PIC_; + // PIC jump table entries are 32-bit values. + unsigned EntrySize = isPIC ? 4 : MVT::getSizeInBits(PTy)/8; + Index= DAG.getNode(ISD::MUL, PTy, Index, DAG.getConstant(EntrySize, PTy)); + SDOperand Addr = DAG.getNode(ISD::ADD, PTy, Index, Table); + SDOperand LD = DAG.getLoad(isPIC ? MVT::i32 : PTy, Chain, Addr, NULL, 0); + if (isPIC) { +// For PIC, the sequence is: +// BRIND(load(Jumptable + index) + RelocBase) +// RelocBase is the JumpTable on PPC and X86, GOT on Alpha +SDOperand Reloc; +if (TLI.usesGlobalOffsetTable()) + Reloc = DAG.getNode(ISD::GLOBAL_OFFSET_TABLE, PTy); +else + Reloc = Table; +Addr= (PTy != MVT::i32) ? DAG.getNode(ISD::SIGN_EXTEND, PTy, LD) : Addr; +Addr = DAG.getNode(ISD::ADD, PTy, Addr, Reloc); +Result = DAG.getNode(ISD::BRIND, MVT::Other, LD.getValue(1), Addr); + } else { +Result = DAG.getNode(ISD::BRIND, MVT::Other, LD.getValue(1), LD); + } +} +} +break; case ISD::BRCOND: Tmp1 = LegalizeOp(Node-getOperand(0)); // Legalize the chain. // Ensure that libcalls are emitted before a return. Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.307 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.308 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.307Sun Oct 29 15:01:20 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon Oct 30 02:00:44 2006 @@ -1070,33 +1070,11 @@ void SelectionDAGLowering::visitJumpTable(SelectionDAGISel::JumpTable JT) { // Emit the code for the jump table MVT::ValueType PTy = TLI.getPointerTy(); - assert((PTy == MVT::i32 || PTy == MVT::i64) - Jump table entries are 32-bit values); - bool isPIC = TLI.getTargetMachine().getRelocationModel() == Reloc::PIC_; - // PIC jump table entries are 32-bit values. - unsigned EntrySize = isPIC ? 4 : MVT::getSizeInBits(PTy)/8; - SDOperand Copy = DAG.getCopyFromReg(getRoot(), JT.Reg, PTy); - SDOperand IDX = DAG.getNode(ISD::MUL, PTy, Copy, - DAG.getConstant(EntrySize, PTy)); - SDOperand TAB = DAG.getJumpTable(JT.JTI,PTy); - SDOperand ADD = DAG.getNode(ISD::ADD, PTy, IDX, TAB); - SDOperand LD = DAG.getLoad(isPIC ? MVT::i32 : PTy, Copy.getValue(1), ADD, - NULL, 0); - if (isPIC) { -// For Pic, the sequence is: -// BRIND(load(Jumptable + index) + RelocBase) -// RelocBase is the JumpTable on PPC and X86, GOT on Alpha -SDOperand Reloc; -if (TLI.usesGlobalOffsetTable()) - Reloc = DAG.getNode(ISD::GLOBAL_OFFSET_TABLE, PTy); -else - Reloc = TAB; -ADD = (PTy !=
[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp
Changes in directory llvm/lib/Target/Sparc: SparcISelDAGToDAG.cpp updated: 1.112 - 1.113 --- Log message: All targets expand BR_JT for now. --- Diffs of the changes: (+2 -1) SparcISelDAGToDAG.cpp |3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp diff -u llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.112 llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.113 --- llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.112 Fri Oct 13 16:14:26 2006 +++ llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp Mon Oct 30 02:02:39 2006 @@ -174,7 +174,8 @@ // Sparc doesn't have BRCOND either, it has BR_CC. setOperationAction(ISD::BRCOND, MVT::Other, Expand); - setOperationAction(ISD::BRIND, MVT::i32, Expand); + setOperationAction(ISD::BRIND, MVT::Other, Expand); + setOperationAction(ISD::BR_JT, MVT::Other, Expand); setOperationAction(ISD::BR_CC, MVT::i32, Custom); setOperationAction(ISD::BR_CC, MVT::f32, Custom); setOperationAction(ISD::BR_CC, MVT::f64, Custom); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaISelLowering.cpp
Changes in directory llvm/lib/Target/Alpha: AlphaISelLowering.cpp updated: 1.69 - 1.70 --- Log message: All targets expand BR_JT for now. --- Diffs of the changes: (+2 -1) AlphaISelLowering.cpp |3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/lib/Target/Alpha/AlphaISelLowering.cpp diff -u llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.69 llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.70 --- llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.69Fri Oct 13 16:14:26 2006 +++ llvm/lib/Target/Alpha/AlphaISelLowering.cpp Mon Oct 30 02:02:39 2006 @@ -62,7 +62,8 @@ setStoreXAction(MVT::i1, Promote); - // setOperationAction(ISD::BRIND,MVT::i64, Expand); + // setOperationAction(ISD::BRIND,MVT::Other, Expand); + setOperationAction(ISD::BR_JT,MVT::Other, Expand); setOperationAction(ISD::BR_CC,MVT::Other, Expand); setOperationAction(ISD::SELECT_CC,MVT::Other, Expand); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelLowering.cpp
Changes in directory llvm/lib/Target/PowerPC: PPCISelLowering.cpp updated: 1.214 - 1.215 --- Log message: All targets expand BR_JT for now. --- Diffs of the changes: (+2 -0) PPCISelLowering.cpp |2 ++ 1 files changed, 2 insertions(+) Index: llvm/lib/Target/PowerPC/PPCISelLowering.cpp diff -u llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.214 llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.215 --- llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.214 Tue Oct 17 20:20:43 2006 +++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp Mon Oct 30 02:02:39 2006 @@ -107,6 +107,8 @@ // PowerPC does not have BRCOND which requires SetCC setOperationAction(ISD::BRCOND, MVT::Other, Expand); + + setOperationAction(ISD::BR_JT, MVT::Other, Expand); // PowerPC turns FP_TO_SINT into FCTIWZ and some load/stores. setOperationAction(ISD::FP_TO_SINT, MVT::i32, Custom); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
Changes in directory llvm/lib/Target/ARM: ARMISelDAGToDAG.cpp updated: 1.80 - 1.81 --- Log message: All targets expand BR_JT for now. --- Diffs of the changes: (+2 -1) ARMISelDAGToDAG.cpp |3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.80 llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.81 --- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.80Thu Oct 26 08:31:25 2006 +++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Mon Oct 30 02:02:39 2006 @@ -73,7 +73,8 @@ setOperationAction(ISD::MEMSET, MVT::Other, Expand); - setOperationAction(ISD::BRIND, MVT::i32, Expand); + setOperationAction(ISD::BR_JT, MVT::Other, Expand); + setOperationAction(ISD::BRIND, MVT::Other, Expand); setOperationAction(ISD::BR_CC, MVT::i32, Custom); setOperationAction(ISD::BR_CC, MVT::f32, Custom); setOperationAction(ISD::BR_CC, MVT::f64, Custom); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp
Changes in directory llvm/lib/Target/X86: X86ISelLowering.cpp updated: 1.281 - 1.282 --- Log message: All targets expand BR_JT for now. --- Diffs of the changes: (+1 -0) X86ISelLowering.cpp |1 + 1 files changed, 1 insertion(+) Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.281 llvm/lib/Target/X86/X86ISelLowering.cpp:1.282 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.281 Fri Oct 27 16:08:32 2006 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Mon Oct 30 02:02:39 2006 @@ -146,6 +146,7 @@ setOperationAction(ISD::BIT_CONVERT , MVT::f32 , Expand); setOperationAction(ISD::BIT_CONVERT , MVT::i32 , Expand); + setOperationAction(ISD::BR_JT, MVT::Other, Expand); setOperationAction(ISD::BRCOND , MVT::Other, Custom); setOperationAction(ISD::BR_CC, MVT::Other, Expand); setOperationAction(ISD::SELECT_CC, MVT::Other, Expand); ___ 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/DwarfWriter.h
Changes in directory llvm/include/llvm/CodeGen: DwarfWriter.h updated: 1.41 - 1.42 --- Log message: Simplify DwarfWriter header. --- Diffs of the changes: (+6 -357) DwarfWriter.h | 363 -- 1 files changed, 6 insertions(+), 357 deletions(-) Index: llvm/include/llvm/CodeGen/DwarfWriter.h diff -u llvm/include/llvm/CodeGen/DwarfWriter.h:1.41 llvm/include/llvm/CodeGen/DwarfWriter.h:1.42 --- llvm/include/llvm/CodeGen/DwarfWriter.h:1.41Tue Oct 17 17:06:46 2006 +++ llvm/include/llvm/CodeGen/DwarfWriter.h Mon Oct 30 07:35:06 2006 @@ -20,380 +20,32 @@ #ifndef LLVM_CODEGEN_DWARFWRITER_H #define LLVM_CODEGEN_DWARFWRITER_H -#include llvm/ADT/UniqueVector.h -#include llvm/Support/DataTypes.h - -#include iosfwd -#include string - +#include iostream namespace llvm { -// Forward declarations. - class AsmPrinter; -class CompileUnit; -class CompileUnitDesc; -class DebugInfoDesc; -class DebugVariable; -class DebugScope; -class DIE; -class DIEAbbrev; -class GlobalVariableDesc; +class Dwarf; class MachineDebugInfo; class MachineFunction; -class MachineLocation; -class MachineMove; class Module; -class MRegisterInfo; -class SubprogramDesc; -class SourceLineInfo; class TargetAsmInfo; -class TargetData; -class Type; -class TypeDesc; - -//===--===// -// DWLabel - Labels are used to track locations in the assembler file. -// Labels appear in the form prefixdebug_TagNumber, where the tag is a -// category of label (Ex. location) and number is a value unique in that -// category. -class DWLabel { -public: - const char *Tag;// Label category tag. Should always be - // a staticly declared C string. - unsignedNumber; // Unique number. - - DWLabel(const char *T, unsigned N) : Tag(T), Number(N) {} -}; //===--===// // DwarfWriter - Emits Dwarf debug and exception handling directives. // -class DwarfWriter { - -private: - - //======// - // Core attributes used by the Dwarf writer. - // - - // - /// O - Stream to .s file. - /// - std::ostream O; - - /// Asm - Target of Dwarf emission. - /// - AsmPrinter *Asm; - - /// TAI - Target Asm Printer. - const TargetAsmInfo *TAI; - - /// TD - Target data. - const TargetData *TD; - - /// RI - Register Information. - const MRegisterInfo *RI; - - /// M - Current module. - /// - Module *M; - - /// MF - Current machine function. - /// - MachineFunction *MF; - - /// DebugInfo - Collected debug information. - /// - MachineDebugInfo *DebugInfo; - - /// didInitial - Flag to indicate if initial emission has been done. - /// - bool didInitial; - - /// shouldEmit - Flag to indicate if debug information should be emitted. - /// - bool shouldEmit; - - /// SubprogramCount - The running count of functions being compiled. - /// - unsigned SubprogramCount; - - //======// - // Attributes used to construct specific Dwarf sections. - // - - /// CompileUnits - All the compile units involved in this build. The index - /// of each entry in this vector corresponds to the sources in DebugInfo. - std::vectorCompileUnit * CompileUnits; - - /// Abbreviations - A UniqueVector of TAG structure abbreviations. - /// - UniqueVectorDIEAbbrev Abbreviations; - - /// StringPool - A UniqueVector of strings used by indirect references. - /// UnitMap - Map debug information descriptor to compile unit. - /// - UniqueVectorstd::string StringPool; - - /// UnitMap - Map debug information descriptor to compile unit. - /// - std::mapDebugInfoDesc *, CompileUnit * DescToUnitMap; - - /// DescToDieMap - Tracks the mapping of top level debug informaton - /// descriptors to debug information entries. - std::mapDebugInfoDesc *, DIE * DescToDieMap; - - /// SectionMap - Provides a unique id per text section. - /// - UniqueVectorstd::string SectionMap; - - /// SectionSourceLines - Tracks line numbers per text section. - /// - std::vectorstd::vectorSourceLineInfo SectionSourceLines; - -public: - - //======// - // 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; - - /// EmitAlign - Print a align directive. - /// - void EmitAlign(unsigned Alignment) const; - - /// EmitULEB128Bytes - Emit an assembler byte data directive to
[llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp
Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.85 - 1.86 --- Log message: Simplify DwarfWriter header. --- Diffs of the changes: (+508 -97) DwarfWriter.cpp | 605 +++- 1 files changed, 508 insertions(+), 97 deletions(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.85 llvm/lib/CodeGen/DwarfWriter.cpp:1.86 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.85 Tue Oct 24 06:50:43 2006 +++ llvm/lib/CodeGen/DwarfWriter.cppMon Oct 30 07:35:07 2006 @@ -14,6 +14,7 @@ #include llvm/CodeGen/DwarfWriter.h #include llvm/ADT/StringExtras.h +#include llvm/ADT/UniqueVector.h #include llvm/Module.h #include llvm/Type.h #include llvm/CodeGen/AsmPrinter.h @@ -22,6 +23,7 @@ #include llvm/CodeGen/MachineLocation.h #include llvm/Support/Dwarf.h #include llvm/Support/CommandLine.h +#include llvm/Support/DataTypes.h #include llvm/Support/Mangler.h #include llvm/Target/TargetAsmInfo.h #include llvm/Target/MRegisterInfo.h @@ -30,6 +32,7 @@ #include llvm/Target/TargetFrameInfo.h #include iostream +#include string using namespace llvm; using namespace llvm::dwarf; @@ -39,6 +42,20 @@ cl::desc(Add comments to Dwarf directives.)); namespace llvm { + +//===--===// +// DWLabel - Labels are used to track locations in the assembler file. +// Labels appear in the form prefixdebug_TagNumber, where the tag is a +// category of label (Ex. location) and number is a value unique in that +// category. +class DWLabel { +public: + const char *Tag;// Label category tag. Should always be + // a staticly declared C string. + unsignedNumber; // Unique number. + + DWLabel(const char *T, unsigned N) : Tag(T), Number(N) {} +}; //===--===// // Forward declarations. @@ -176,7 +193,7 @@ /// Emit - Print the abbreviation using the specified Dwarf writer. /// - void Emit(const DwarfWriter DW) const; + void Emit(const Dwarf DW) const; #ifndef NDEBUG void print(std::ostream O); @@ -209,11 +226,11 @@ /// EmitValue - Emit value via the Dwarf writer. /// - virtual void EmitValue(const DwarfWriter DW, unsigned Form) const = 0; + virtual void EmitValue(const Dwarf DW, unsigned Form) const = 0; /// SizeOf - Return the size of a value in bytes. /// - virtual unsigned SizeOf(const DwarfWriter DW, unsigned Form) const = 0; + virtual unsigned SizeOf(const Dwarf DW, unsigned Form) const = 0; }; //===--===// @@ -236,11 +253,11 @@ /// EmitValue - Emit integer of appropriate size. /// - virtual void EmitValue(const DwarfWriter DW, unsigned Form) const; + virtual void EmitValue(const Dwarf DW, unsigned Form) const; /// SizeOf - Determine size of integer value in bytes. /// - virtual unsigned SizeOf(const DwarfWriter DW, unsigned Form) const; + virtual unsigned SizeOf(const Dwarf DW, unsigned Form) const; }; //===--===// @@ -257,11 +274,11 @@ /// EmitValue - Emit string value. /// - virtual void EmitValue(const DwarfWriter DW, unsigned Form) const; + virtual void EmitValue(const Dwarf DW, unsigned Form) const; /// SizeOf - Determine size of string value in bytes. /// - virtual unsigned SizeOf(const DwarfWriter DW, unsigned Form) const; + virtual unsigned SizeOf(const Dwarf DW, unsigned Form) const; }; //===--===// @@ -278,11 +295,11 @@ /// EmitValue - Emit label value. /// - virtual void EmitValue(const DwarfWriter DW, unsigned Form) const; + virtual void EmitValue(const Dwarf DW, unsigned Form) const; /// SizeOf - Determine size of label value in bytes. /// - virtual unsigned SizeOf(const DwarfWriter DW, unsigned Form) const; + virtual unsigned SizeOf(const Dwarf DW, unsigned Form) const; }; @@ -300,11 +317,11 @@ /// EmitValue - Emit label value. /// - virtual void EmitValue(const DwarfWriter DW, unsigned Form) const; + virtual void EmitValue(const Dwarf DW, unsigned Form) const; /// SizeOf - Determine size of label value in bytes. /// - virtual unsigned SizeOf(const DwarfWriter DW, unsigned Form) const; + virtual unsigned SizeOf(const Dwarf DW, unsigned Form) const; }; //===--===// @@ -323,11 +340,11 @@ /// EmitValue - Emit delta value. /// - virtual void EmitValue(const DwarfWriter DW, unsigned Form) const; + virtual void EmitValue(const Dwarf DW, unsigned Form) const; /// SizeOf - Determine size of delta value in bytes. /// -
[llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp
Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.86 - 1.87 --- Log message: Switch abbreviations to use the folding set.a. --- Diffs of the changes: (+111 -127) DwarfWriter.cpp | 238 ++-- 1 files changed, 111 insertions(+), 127 deletions(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.86 llvm/lib/CodeGen/DwarfWriter.cpp:1.87 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.86 Mon Oct 30 07:35:07 2006 +++ llvm/lib/CodeGen/DwarfWriter.cppMon Oct 30 09:59:54 2006 @@ -13,6 +13,7 @@ #include llvm/CodeGen/DwarfWriter.h +#include llvm/ADT/FoldingSet.h #include llvm/ADT/StringExtras.h #include llvm/ADT/UniqueVector.h #include llvm/Module.h @@ -44,10 +45,10 @@ namespace llvm { //===--===// -// DWLabel - Labels are used to track locations in the assembler file. -// Labels appear in the form prefixdebug_TagNumber, where the tag is a -// category of label (Ex. location) and number is a value unique in that -// category. +/// DWLabel - Labels are used to track locations in the assembler file. +/// Labels appear in the form prefixdebug_TagNumber, where the tag is a +/// category of label (Ex. location) and number is a value unique in that +/// category. class DWLabel { public: const char *Tag;// Label category tag. Should always be @@ -58,13 +59,13 @@ }; //===--===// -// Forward declarations. +/// Forward declarations. // class DIE; //===--===// -// CompileUnit - This dwarf writer support class manages information associate -// with a source file. +/// CompileUnit - This dwarf writer support class manages information associate +/// with a source file. class CompileUnit { private: CompileUnitDesc *Desc;// Compile unit debug descriptor. @@ -110,8 +111,8 @@ }; //===--===// -// DIEAbbrevData - Dwarf abbreviation data, describes the one attribute of a -// Dwarf abbreviation. +/// DIEAbbrevData - Dwarf abbreviation data, describes the one attribute of a +/// Dwarf abbreviation. class DIEAbbrevData { private: unsigned Attribute; // Dwarf attribute code. @@ -126,32 +127,21 @@ // Accessors. unsigned getAttribute() const { return Attribute; } unsigned getForm() const { return Form; } - - /// operator== - Used by DIEAbbrev to locate entry. - /// - bool operator==(const DIEAbbrevData DAD) const { -return Attribute == DAD.Attribute Form == DAD.Form; - } - /// operator!= - Used by DIEAbbrev to locate entry. + /// Profile - Used to gather unique data for the abbreviation folding set. /// - bool operator!=(const DIEAbbrevData DAD) const { -return Attribute != DAD.Attribute || Form != DAD.Form; - } - - /// operator - Used by DIEAbbrev to locate entry. - /// - bool operator(const DIEAbbrevData DAD) const { -return Attribute DAD.Attribute || - (Attribute == DAD.Attribute Form DAD.Form); + void Profile(FoldingSetNodeID ID) { +ID.AddInteger(Attribute); +ID.AddInteger(Form); } }; //===--===// -// DIEAbbrev - Dwarf abbreviation, describes the organization of a debug -// information object. -class DIEAbbrev { +/// DIEAbbrev - Dwarf abbreviation, describes the organization of a debug +/// information object. +class DIEAbbrev : public FoldingSetNode { private: + unsigned Number;// Unique number for abbreviation. unsigned Tag; // Dwarf tag code. unsigned ChildrenFlag; // Dwarf children flag. std::vectorDIEAbbrevData Data;// Raw data bytes for abbreviation. @@ -159,26 +149,21 @@ public: DIEAbbrev(unsigned T, unsigned C) - : Tag(T) + : Number(0) + , Tag(T) , ChildrenFlag(C) , Data() {} ~DIEAbbrev() {} // Accessors. + unsigned getNumber()const { return Number; } unsigned getTag() const { return Tag; } unsigned getChildrenFlag() const { return ChildrenFlag; } const std::vectorDIEAbbrevData getData() const { return Data; } + void setNumber(unsigned N){ Number = N; } void setChildrenFlag(unsigned CF) { ChildrenFlag = CF; } - /// operator== - Used by UniqueVector to locate entry. - /// - bool operator==(const DIEAbbrev DA) const; - - /// operator - Used by UniqueVector to locate entry. - /// - bool operator(const DIEAbbrev DA) const; - /// AddAttribute - Adds another set of attribute information to the /// abbreviation. void AddAttribute(unsigned Attribute, unsigned Form) { @@ -191,6 +176,17 @@
[llvm-commits] Test - please ignore
Test - please ignore. Reid. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/VMCore/PassManagerT.h
Changes in directory llvm/lib/VMCore: PassManagerT.h updated: 1.69 - 1.70 --- Log message: Update comment. Valid option is -debug-pass=Structures. --- Diffs of the changes: (+1 -1) PassManagerT.h |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/VMCore/PassManagerT.h diff -u llvm/lib/VMCore/PassManagerT.h:1.69 llvm/lib/VMCore/PassManagerT.h:1.70 --- llvm/lib/VMCore/PassManagerT.h:1.69 Sat Sep 2 18:09:24 2006 +++ llvm/lib/VMCore/PassManagerT.h Mon Oct 30 13:25:54 2006 @@ -282,7 +282,7 @@ return runPasses(M, LastUserOf); } - // dumpPassStructure - Implement the -debug-passes=PassStructure option + // dumpPassStructure - Implement the -debug-passes=Structure option inline void dumpPassStructure(unsigned Offset = 0) { // Print out the immutable passes... ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp X86AsmPrinter.cpp X86AsmPrinter.h X86ISelLowering.cpp X86InstrInfo.td X86TargetAsmInfo.cpp
Changes in directory llvm/lib/Target/X86: X86ATTAsmPrinter.cpp updated: 1.69 - 1.70 X86AsmPrinter.cpp updated: 1.207 - 1.208 X86AsmPrinter.h updated: 1.33 - 1.34 X86ISelLowering.cpp updated: 1.282 - 1.283 X86InstrInfo.td updated: 1.292 - 1.293 X86TargetAsmInfo.cpp updated: 1.5 - 1.6 --- Log message: Add debug support for X86/ELF targets (Linux). This allows llvm-gcc4 generated object modules to be debugged with gdb. Hopefully this helps pre-release debugging. --- Diffs of the changes: (+39 -9) X86ATTAsmPrinter.cpp |6 +++--- X86AsmPrinter.cpp|8 +++- X86AsmPrinter.h |2 +- X86ISelLowering.cpp |2 +- X86InstrInfo.td |6 +++--- X86TargetAsmInfo.cpp | 24 6 files changed, 39 insertions(+), 9 deletions(-) Index: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.69 llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.70 --- llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.69 Wed Oct 18 04:12:29 2006 +++ llvm/lib/Target/X86/X86ATTAsmPrinter.cppMon Oct 30 16:32:30 2006 @@ -52,7 +52,7 @@ /// method to print assembly for each instruction. /// bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction MF) { - if (Subtarget-isTargetDarwin()) { + if (Subtarget-isTargetDarwin() || Subtarget-isTargetELF()) { // Let PassManager know we need debug information and relay // the MachineDebugInfo address on to DwarfWriter. DW.SetDebugInfo(getAnalysisMachineDebugInfo()); @@ -111,7 +111,7 @@ F-getLinkage() == Function::WeakLinkage)) O _llvm$workaround$fake$stub_ CurrentFnName :\n; - if (Subtarget-isTargetDarwin()) { + if (Subtarget-isTargetDarwin() || Subtarget-isTargetELF()) { // Emit pre-function debug information. DW.BeginFunction(MF); } @@ -141,7 +141,7 @@ if (TAI-hasDotTypeDotSizeDirective()) O \t.size CurrentFnName , .- CurrentFnName \n; - if (Subtarget-isTargetDarwin()) { + if (Subtarget-isTargetDarwin() || Subtarget-isTargetELF()) { // Emit post-function debug information. DW.EndFunction(); } Index: llvm/lib/Target/X86/X86AsmPrinter.cpp diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.207 llvm/lib/Target/X86/X86AsmPrinter.cpp:1.208 --- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.207 Sat Oct 28 00:56:06 2006 +++ llvm/lib/Target/X86/X86AsmPrinter.cpp Mon Oct 30 16:32:30 2006 @@ -116,6 +116,9 @@ // Emit initial debug information. DW.BeginModule(M); + } else if (Subtarget-isTargetELF()) { +// Emit initial debug information. +DW.BeginModule(M); } return AsmPrinter::doInitialization(M); @@ -278,7 +281,7 @@ O \t.long\t0\n; } -// Emit initial debug information. +// Emit final debug information. DW.EndModule(); // Funny Darwin hack: This flag tells the linker that no global symbols @@ -287,6 +290,9 @@ // linker can safely perform dead code stripping. Since LLVM never // generates code that does this, it is always safe to set. O \t.subsections_via_symbols\n; + } else if (Subtarget-isTargetELF()) { +// Emit final debug information. +DW.EndModule(); } AsmPrinter::doFinalization(M); Index: llvm/lib/Target/X86/X86AsmPrinter.h diff -u llvm/lib/Target/X86/X86AsmPrinter.h:1.33 llvm/lib/Target/X86/X86AsmPrinter.h:1.34 --- llvm/lib/Target/X86/X86AsmPrinter.h:1.33Mon Sep 25 22:57:53 2006 +++ llvm/lib/Target/X86/X86AsmPrinter.h Mon Oct 30 16:32:30 2006 @@ -67,7 +67,7 @@ void getAnalysisUsage(AnalysisUsage AU) const { AU.setPreservesAll(); -if (Subtarget-isTargetDarwin()) { +if (Subtarget-isTargetDarwin() || Subtarget-isTargetELF()) { AU.addRequiredMachineDebugInfo(); } MachineFunctionPass::getAnalysisUsage(AU); Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.282 llvm/lib/Target/X86/X86ISelLowering.cpp:1.283 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.282 Mon Oct 30 02:02:39 2006 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Mon Oct 30 16:32:30 2006 @@ -219,7 +219,7 @@ setOperationAction(ISD::LOCATION, MVT::Other, Expand); setOperationAction(ISD::DEBUG_LOC, MVT::Other, Expand); // FIXME - use subtarget debug flags - if (!Subtarget-isTargetDarwin()) + if (!Subtarget-isTargetDarwin() !Subtarget-isTargetELF()) setOperationAction(ISD::DEBUG_LABEL, MVT::Other, Expand); // VASTART needs to be custom lowered to use the VarArgsFrameIndex Index: llvm/lib/Target/X86/X86InstrInfo.td diff -u llvm/lib/Target/X86/X86InstrInfo.td:1.292 llvm/lib/Target/X86/X86InstrInfo.td:1.293 --- llvm/lib/Target/X86/X86InstrInfo.td:1.292 Fri Oct 13 16:14:26 2006 +++ llvm/lib/Target/X86/X86InstrInfo.td Mon Oct 30 16:32:30 2006 @@ -2451,9 +2451,9 @@ [(dwarf_loc (i32 imm:$line), (i32 imm:$col), (i32 imm:$file))]; -def DWARF_LABEL : I0, Pseudo, (ops i32imm:$id), -
[llvm-commits] fix for PR972 applied
I applied Anton's patch: http://llvm.org/bugs/attachment.cgi?id=427action=view -Chris -- http://nondot.org/sabre/ http://llvm.org/ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/Target/TargetAsmInfo.h
Changes in directory llvm/include/llvm/Target: TargetAsmInfo.h updated: 1.10 - 1.11 --- Log message: Add debug support for X86/ELF targets (Linux). This allows llvm-gcc4 generated object modules to be debugged with gdb. Hopefully this helps pre-release debugging. --- Diffs of the changes: (+7 -0) TargetAsmInfo.h |7 +++ 1 files changed, 7 insertions(+) Index: llvm/include/llvm/Target/TargetAsmInfo.h diff -u llvm/include/llvm/Target/TargetAsmInfo.h:1.10 llvm/include/llvm/Target/TargetAsmInfo.h:1.11 --- llvm/include/llvm/Target/TargetAsmInfo.h:1.10 Thu Oct 26 14:16:20 2006 +++ llvm/include/llvm/Target/TargetAsmInfo.hMon Oct 30 16:32:29 2006 @@ -227,6 +227,10 @@ /// bool HasDotFile; // Defaults to false. +/// RequiresFrameSection - true if the Dwarf2 output needs a frame section +/// +bool DwarfRequiresFrameSection; // Defaults to false. + /// DwarfAbbrevSection - Section directive for Dwarf abbrev. /// const char *DwarfAbbrevSection; // Defaults to .debug_abbrev. @@ -417,6 +421,9 @@ bool hasDotFile() const { return HasDotFile; } +bool getDwarfRequiresFrameSection() const { + return DwarfRequiresFrameSection; +} const char *getDwarfAbbrevSection() const { return DwarfAbbrevSection; } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp
Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.87 - 1.88 --- Log message: Add debug support for X86/ELF targets (Linux). This allows llvm-gcc4 generated object modules to be debugged with gdb. Hopefully this helps pre-release debugging. --- Diffs of the changes: (+12 -8) DwarfWriter.cpp | 20 1 files changed, 12 insertions(+), 8 deletions(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.87 llvm/lib/CodeGen/DwarfWriter.cpp:1.88 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.87 Mon Oct 30 09:59:54 2006 +++ llvm/lib/CodeGen/DwarfWriter.cppMon Oct 30 16:32:29 2006 @@ -1921,8 +1921,8 @@ unsigned ID) { // Construct debug information entry. DIE *Die = new DIE(DW_TAG_compile_unit); - Die-AddDelta (DW_AT_stmt_list, DW_FORM_data4, DWLabel(line, 0), - DWLabel(section_line, 0)); + Die-AddDelta (DW_AT_stmt_list, DW_FORM_data4, DWLabel(section_line, 0), + DWLabel(section_line, 0)); // Die-AddLabel (DW_AT_high_pc, DW_FORM_addr, DWLabel(text_end, 0)); // Die-AddLabel (DW_AT_low_pc,DW_FORM_addr, DWLabel(text_begin, 0)); Die-AddString(DW_AT_producer, DW_FORM_string, UnitDesc-getProducer()); @@ -2175,21 +2175,20 @@ didInitial = true; // Dwarf sections base addresses. - Asm-SwitchToDataSection(TAI-getDwarfFrameSection(), 0); - EmitLabel(section_frame, 0); + if (TAI-getDwarfRequiresFrameSection()) { +Asm-SwitchToDataSection(TAI-getDwarfFrameSection(), 0); +EmitLabel(section_frame, 0); + } Asm-SwitchToDataSection(TAI-getDwarfInfoSection(), 0); EmitLabel(section_info, 0); - EmitLabel(info, 0); Asm-SwitchToDataSection(TAI-getDwarfAbbrevSection(), 0); EmitLabel(section_abbrev, 0); - EmitLabel(abbrev, 0); Asm-SwitchToDataSection(TAI-getDwarfARangesSection(), 0); EmitLabel(section_aranges, 0); Asm-SwitchToDataSection(TAI-getDwarfMacInfoSection(), 0); EmitLabel(section_macinfo, 0); Asm-SwitchToDataSection(TAI-getDwarfLineSection(), 0); EmitLabel(section_line, 0); - EmitLabel(line, 0); Asm-SwitchToDataSection(TAI-getDwarfLocSection(), 0); EmitLabel(section_loc, 0); Asm-SwitchToDataSection(TAI-getDwarfPubNamesSection(), 0); @@ -2198,7 +2197,6 @@ EmitLabel(section_str, 0); Asm-SwitchToDataSection(TAI-getDwarfRangesSection(), 0); EmitLabel(section_ranges, 0); - Asm-SwitchToTextSection(TAI-getTextSection(), 0); EmitLabel(text_begin, 0); Asm-SwitchToDataSection(TAI-getDataSection(), 0); @@ -2629,6 +2627,9 @@ /// EmitInitialDebugFrame - Emit common frame info into a debug frame section. /// void Dwarf::EmitInitialDebugFrame() { + if (TAI-getDwarfRequiresFrameSection()) +return; + int stackGrowth = Asm-TM.getFrameInfo()-getStackGrowthDirection() == TargetFrameInfo::StackGrowsUp ? @@ -2664,6 +2665,9 @@ /// EmitFunctionDebugFrame - Emit per function frame info into a debug frame /// section. void Dwarf::EmitFunctionDebugFrame() { + if (TAI-getDwarfRequiresFrameSection()) +return; + // Start the dwarf frame section. Asm-SwitchToDataSection(TAI-getDwarfFrameSection(), 0); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/TargetAsmInfo.cpp
Changes in directory llvm/lib/Target: TargetAsmInfo.cpp updated: 1.8 - 1.9 --- Log message: Add debug support for X86/ELF targets (Linux). This allows llvm-gcc4 generated object modules to be debugged with gdb. Hopefully this helps pre-release debugging. --- Diffs of the changes: (+1 -0) TargetAsmInfo.cpp |1 + 1 files changed, 1 insertion(+) Index: llvm/lib/Target/TargetAsmInfo.cpp diff -u llvm/lib/Target/TargetAsmInfo.cpp:1.8 llvm/lib/Target/TargetAsmInfo.cpp:1.9 --- llvm/lib/Target/TargetAsmInfo.cpp:1.8 Fri Oct 27 11:14:06 2006 +++ llvm/lib/Target/TargetAsmInfo.cpp Mon Oct 30 16:32:29 2006 @@ -64,6 +64,7 @@ HasLEB128(false), HasDotLoc(false), HasDotFile(false), + DwarfRequiresFrameSection(true), DwarfAbbrevSection(.debug_abbrev), DwarfInfoSection(.debug_info), DwarfLineSection(.debug_line), ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/Target/TargetAsmInfo.h
Changes in directory llvm/include/llvm/Target: TargetAsmInfo.h updated: 1.11 - 1.12 --- Log message: Don't mislead readers by claiming a variable is defaulted to false when the default is actually true. --- Diffs of the changes: (+1 -1) TargetAsmInfo.h |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/Target/TargetAsmInfo.h diff -u llvm/include/llvm/Target/TargetAsmInfo.h:1.11 llvm/include/llvm/Target/TargetAsmInfo.h:1.12 --- llvm/include/llvm/Target/TargetAsmInfo.h:1.11 Mon Oct 30 16:32:29 2006 +++ llvm/include/llvm/Target/TargetAsmInfo.hMon Oct 30 16:46:49 2006 @@ -229,7 +229,7 @@ /// RequiresFrameSection - true if the Dwarf2 output needs a frame section /// -bool DwarfRequiresFrameSection; // Defaults to false. +bool DwarfRequiresFrameSection; // Defaults to true. /// DwarfAbbrevSection - Section directive for Dwarf abbrev. /// ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp
Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.88 - 1.89 --- Log message: Fix a problem introduced by a last-minute change (logic negation). --- Diffs of the changes: (+2 -2) DwarfWriter.cpp |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.88 llvm/lib/CodeGen/DwarfWriter.cpp:1.89 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.88 Mon Oct 30 16:32:29 2006 +++ llvm/lib/CodeGen/DwarfWriter.cppMon Oct 30 17:34:32 2006 @@ -2627,7 +2627,7 @@ /// EmitInitialDebugFrame - Emit common frame info into a debug frame section. /// void Dwarf::EmitInitialDebugFrame() { - if (TAI-getDwarfRequiresFrameSection()) + if (!TAI-getDwarfRequiresFrameSection()) return; int stackGrowth = @@ -2665,7 +2665,7 @@ /// EmitFunctionDebugFrame - Emit per function frame info into a debug frame /// section. void Dwarf::EmitFunctionDebugFrame() { - if (TAI-getDwarfRequiresFrameSection()) + if (!TAI-getDwarfRequiresFrameSection()) return; // Start the dwarf frame section. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
Changes in directory llvm/lib/Target/PowerPC: PPCISelDAGToDAG.cpp updated: 1.211 - 1.212 --- Log message: fix miscompilation of llvm.isunordered, where we branched on the opposite condition. This fixes miscompilation of Olden/bh and many others. --- Diffs of the changes: (+2 -2) PPCISelDAGToDAG.cpp |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp diff -u llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.211 llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.212 --- llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.211 Fri Sep 22 00:01:56 2006 +++ llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Mon Oct 30 17:02:25 2006 @@ -822,8 +822,8 @@ case ISD::SETUGE: case ISD::SETGE: return PPC::BGE; - case ISD::SETO: return PPC::BUN; - case ISD::SETUO: return PPC::BNU; + case ISD::SETO: return PPC::BNU; + case ISD::SETUO: return PPC::BUN; } return 0; } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/X86/X86AsmPrinter.cpp
Changes in directory llvm/lib/Target/X86: X86AsmPrinter.cpp updated: 1.208 - 1.209 --- Log message: Apply Aton's LLVM patch for PR973: http://llvm.org/PR973 : Linux ctors / dtors support. --- Diffs of the changes: (+22 -4) X86AsmPrinter.cpp | 26 ++ 1 files changed, 22 insertions(+), 4 deletions(-) Index: llvm/lib/Target/X86/X86AsmPrinter.cpp diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.208 llvm/lib/Target/X86/X86AsmPrinter.cpp:1.209 --- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.208 Mon Oct 30 16:32:30 2006 +++ llvm/lib/Target/X86/X86AsmPrinter.cpp Mon Oct 30 19:26:55 2006 @@ -145,10 +145,11 @@ unsigned Align = TD-getPreferredAlignmentLog(I); if (C-isNullValue() /* FIXME: Verify correct */ +!I-hasSection() (I-hasInternalLinkage() || I-hasWeakLinkage() || I-hasLinkOnceLinkage() || (Subtarget-isTargetDarwin() - I-hasExternalLinkage() !I-hasSection( { + I-hasExternalLinkage( { if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it. if (I-hasExternalLinkage()) { O \t.globl\t name \n; @@ -185,14 +186,14 @@ } else if (Subtarget-isTargetCygwin()) { std::string SectionName(.section\t.data$linkonce. + name + - ,\aw\\n); + ,\aw\); SwitchToDataSection(SectionName.c_str(), I); O \t.globl name \n \t.linkonce same_size\n; } else { std::string SectionName(\t.section\t.llvm.linkonce.d. + name + - ,\aw\,@progbits\n); + ,\aw\,@progbits); SwitchToDataSection(SectionName.c_str(), I); O \t.weak name \n; } @@ -215,7 +216,24 @@ break; } } -SwitchToDataSection(TAI-getDataSection(), I); +// FIXME: special handling for .ctors .dtors sections +if (I-hasSection() +(I-getSection() == .ctors || + I-getSection() == .dtors)) { + std::string SectionName = .section + I-getSection(); + + if (Subtarget-isTargetCygwin()) { +SectionName += ,\aw\; + } else { +assert(!Subtarget-isTargetDarwin()); +SectionName += ,\aw\,@progbits; + } + + SwitchToDataSection(SectionName.c_str()); +} else { + SwitchToDataSection(TAI-getDataSection(), I); +} + break; } default: ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/X86/X86AsmPrinter.cpp
Changes in directory llvm/lib/Target/X86: X86AsmPrinter.cpp updated: 1.209 - 1.210 --- Log message: Make this compile again. --- Diffs of the changes: (+1 -1) X86AsmPrinter.cpp |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/X86/X86AsmPrinter.cpp diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.209 llvm/lib/Target/X86/X86AsmPrinter.cpp:1.210 --- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.209 Mon Oct 30 19:26:55 2006 +++ llvm/lib/Target/X86/X86AsmPrinter.cpp Mon Oct 30 19:45:56 2006 @@ -229,7 +229,7 @@ SectionName += ,\aw\,@progbits; } - SwitchToDataSection(SectionName.c_str()); + SwitchToDataSection(SectionName.c_str(), I); } else { SwitchToDataSection(TAI-getDataSection(), I); } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] CVS: llvm/lib/Target/X86/X86AsmPrinter.cpp
Evan, Please don't check things in that don't compile: X86AsmPrinter.cpp: In member function `virtual bool llvm::X86SharedAsmPrinter::doFinalization(llvm::Module)': X86AsmPrinter.cpp:232: error: no matching function for call to `llvm::X86SharedAsmPrinter::SwitchToDataSection(const char*)' /proj/llvm/llvm/include/llvm/CodeGen/AsmPrinter.h:96: note: candidates are: void llvm::AsmPrinter::SwitchToDataSection(const char*, const llvm::GlobalValue*) Reid. On Mon, 2006-10-30 at 19:27 -0600, Evan Cheng wrote: Changes in directory llvm/lib/Target/X86: X86AsmPrinter.cpp updated: 1.208 - 1.209 --- Log message: Apply Aton's LLVM patch for PR973: http://llvm.org/PR973 : Linux ctors / dtors support. --- Diffs of the changes: (+22 -4) X86AsmPrinter.cpp | 26 ++ 1 files changed, 22 insertions(+), 4 deletions(-) Index: llvm/lib/Target/X86/X86AsmPrinter.cpp diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.208 llvm/lib/Target/X86/X86AsmPrinter.cpp:1.209 --- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.208 Mon Oct 30 16:32:30 2006 +++ llvm/lib/Target/X86/X86AsmPrinter.cpp Mon Oct 30 19:26:55 2006 @@ -145,10 +145,11 @@ unsigned Align = TD-getPreferredAlignmentLog(I); if (C-isNullValue() /* FIXME: Verify correct */ +!I-hasSection() (I-hasInternalLinkage() || I-hasWeakLinkage() || I-hasLinkOnceLinkage() || (Subtarget-isTargetDarwin() - I-hasExternalLinkage() !I-hasSection( { + I-hasExternalLinkage( { if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it. if (I-hasExternalLinkage()) { O \t.globl\t name \n; @@ -185,14 +186,14 @@ } else if (Subtarget-isTargetCygwin()) { std::string SectionName(.section\t.data$linkonce. + name + - ,\aw\\n); + ,\aw\); SwitchToDataSection(SectionName.c_str(), I); O \t.globl name \n \t.linkonce same_size\n; } else { std::string SectionName(\t.section\t.llvm.linkonce.d. + name + - ,\aw\,@progbits\n); + ,\aw\,@progbits); SwitchToDataSection(SectionName.c_str(), I); O \t.weak name \n; } @@ -215,7 +216,24 @@ break; } } -SwitchToDataSection(TAI-getDataSection(), I); +// FIXME: special handling for .ctors .dtors sections +if (I-hasSection() +(I-getSection() == .ctors || + I-getSection() == .dtors)) { + std::string SectionName = .section + I-getSection(); + + if (Subtarget-isTargetCygwin()) { +SectionName += ,\aw\; + } else { +assert(!Subtarget-isTargetDarwin()); +SectionName += ,\aw\,@progbits; + } + + SwitchToDataSection(SectionName.c_str()); +} else { + SwitchToDataSection(TAI-getDataSection(), I); +} + break; } default: ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Changes in directory llvm/lib/CodeGen/SelectionDAG: LegalizeDAG.cpp updated: 1.414 - 1.415 --- Log message: Fix a typo which can break jumptables. --- Diffs of the changes: (+1 -1) LegalizeDAG.cpp |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.414 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.415 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.414 Mon Oct 30 02:00:44 2006 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Oct 30 20:31:00 2006 @@ -1279,7 +1279,7 @@ Reloc = DAG.getNode(ISD::GLOBAL_OFFSET_TABLE, PTy); else Reloc = Table; -Addr= (PTy != MVT::i32) ? DAG.getNode(ISD::SIGN_EXTEND, PTy, LD) : Addr; +Addr = (PTy != MVT::i32) ? DAG.getNode(ISD::SIGN_EXTEND, PTy, LD) : LD; Addr = DAG.getNode(ISD::ADD, PTy, Addr, Reloc); Result = DAG.getNode(ISD::BRIND, MVT::Other, LD.getValue(1), Addr); } else { ___ 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
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/lib/Target/X86/X86AsmPrinter.cpp
Changes in directory llvm/lib/Target/X86: X86AsmPrinter.cpp updated: 1.210 - 1.211 --- Log message: Unbreaking static ctors patch. Defaulting second arguments of SwitchTo*Section, this should make things somehow clearer. --- Diffs of the changes: (+1 -1) X86AsmPrinter.cpp |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/X86/X86AsmPrinter.cpp diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.210 llvm/lib/Target/X86/X86AsmPrinter.cpp:1.211 --- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.210 Mon Oct 30 19:45:56 2006 +++ llvm/lib/Target/X86/X86AsmPrinter.cpp Tue Oct 31 00:11:06 2006 @@ -229,7 +229,7 @@ SectionName += ,\aw\,@progbits; } - SwitchToDataSection(SectionName.c_str(), I); + SwitchToDataSection(SectionName.c_str()); } else { SwitchToDataSection(TAI-getDataSection(), I); } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/C++Frontend/2006-10-30-ClassBitfield.cpp
Changes in directory llvm/test/Regression/C++Frontend: 2006-10-30-ClassBitfield.cpp added (r1.1) --- Log message: new testcase --- Diffs of the changes: (+16 -0) 2006-10-30-ClassBitfield.cpp | 16 1 files changed, 16 insertions(+) Index: llvm/test/Regression/C++Frontend/2006-10-30-ClassBitfield.cpp diff -c /dev/null llvm/test/Regression/C++Frontend/2006-10-30-ClassBitfield.cpp:1.1 *** /dev/null Tue Oct 31 00:15:24 2006 --- llvm/test/Regression/C++Frontend/2006-10-30-ClassBitfield.cpp Tue Oct 31 00:15:14 2006 *** *** 0 --- 1,16 + // RUN: %llvmgxx %s -emit-llvm -S -o - + // PR954 + + struct _Refcount_Base { + unsigned long _M_ref_count; + int _M_ref_count_lock; + _Refcount_Base() : _M_ref_count(0) {} + }; + + struct _Rope_RopeRep : public _Refcount_Base + { + public: + int _M_tag:8; + }; + + int foo(_Rope_RopeRep* r) { return r-_M_tag; } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/CFrontend/2006-10-30-ArrayCrash.c
Changes in directory llvm/test/Regression/CFrontend: 2006-10-30-ArrayCrash.c updated: 1.1 - 1.2 --- Log message: add a note --- Diffs of the changes: (+1 -0) 2006-10-30-ArrayCrash.c |1 + 1 files changed, 1 insertion(+) Index: llvm/test/Regression/CFrontend/2006-10-30-ArrayCrash.c diff -u llvm/test/Regression/CFrontend/2006-10-30-ArrayCrash.c:1.1 llvm/test/Regression/CFrontend/2006-10-30-ArrayCrash.c:1.2 --- llvm/test/Regression/CFrontend/2006-10-30-ArrayCrash.c:1.1 Tue Oct 31 00:25:13 2006 +++ llvm/test/Regression/CFrontend/2006-10-30-ArrayCrash.c Tue Oct 31 00:26:10 2006 @@ -1,4 +1,5 @@ // RUN: %llvmgcc -O3 -S -o - %s +// PR954, PR911 extern void foo(); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits