From evan.cheng at apple.com Mon Oct 30 01:57:55 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 30 Oct 2006 01:57:55 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h Message-ID: <200610300757.k9U7vtVM018395@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: SelectionDAGNodes.h updated: 1.158 -> 1.159 --- Log message: Added a new SDNode type: BR_JT for jumptable branch. --- Diffs of the changes: (+4 -0) SelectionDAGNodes.h | 4 ++++ 1 files changed, 4 insertions(+) Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.158 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.159 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.158 Fri Oct 27 20:34:21 2006 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Mon Oct 30 01:57:41 2006 @@ -406,6 +406,10 @@ // is the value to branch to, which must be of the same type as the target's // pointer type. BRIND, + + // BR_JT - Jumptable branch. The first operand is the chain, the second + // is the jumptable index, the last one is the jumptable entry index. + BR_JT, // BRCOND - Conditional branch. The first operand is the chain, // the second is the condition, the third is the block to branch From evan.cheng at apple.com Mon Oct 30 01:59:50 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 30 Oct 2006 01:59:50 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <200610300759.k9U7xovZ018439@zion.cs.uiuc.edu> 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.362 Sun 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"; From evan.cheng at apple.com Mon Oct 30 02:00:59 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 30 Oct 2006 02:00:59 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp SelectionDAGISel.cpp Message-ID: <200610300800.k9U80xc0018501@zion.cs.uiuc.edu> 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.307 Sun 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 != MVT::i32) ? DAG.getNode(ISD::SIGN_EXTEND, PTy, LD) : LD; - ADD = DAG.getNode(ISD::ADD, PTy, ADD, Reloc); - DAG.setRoot(DAG.getNode(ISD::BRIND, MVT::Other, LD.getValue(1), ADD)); - } else { - DAG.setRoot(DAG.getNode(ISD::BRIND, MVT::Other, LD.getValue(1), LD)); - } + SDOperand Index = DAG.getCopyFromReg(getRoot(), JT.Reg, PTy); + SDOperand Table = DAG.getJumpTable(JT.JTI, PTy); + DAG.setRoot(DAG.getNode(ISD::BR_JT, MVT::Other, Index.getValue(1), + Table, Index)); + return; } void SelectionDAGLowering::visitSwitch(SwitchInst &I) { @@ -1200,7 +1178,8 @@ // If the switch has more than 5 blocks, and at least 31.25% dense, and the // target supports indirect branches, then emit a jump table rather than // lowering the switch to a binary tree of conditional branches. - if (TLI.isOperationLegal(ISD::BRIND, TLI.getPointerTy()) && + if ((TLI.isOperationLegal(ISD::BR_JT, MVT::Other) || + TLI.isOperationLegal(ISD::BRIND, MVT::Other)) && Cases.size() > 5) { uint64_t First =cast(Cases.front().first)->getZExtValue(); uint64_t Last = cast(Cases.back().first)->getZExtValue(); From evan.cheng at apple.com Mon Oct 30 02:03:01 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 30 Oct 2006 02:03:01 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp Message-ID: <200610300803.k9U831vW018605@zion.cs.uiuc.edu> 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); From evan.cheng at apple.com Mon Oct 30 02:03:02 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 30 Oct 2006 02:03:02 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelLowering.cpp Message-ID: <200610300803.k9U832Mw018615@zion.cs.uiuc.edu> 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); From evan.cheng at apple.com Mon Oct 30 02:03:00 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 30 Oct 2006 02:03:00 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Message-ID: <200610300803.k9U830VL018596@zion.cs.uiuc.edu> 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.80 Thu 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); From evan.cheng at apple.com Mon Oct 30 02:03:02 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 30 Oct 2006 02:03:02 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp Message-ID: <200610300803.k9U83237018610@zion.cs.uiuc.edu> 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); From evan.cheng at apple.com Mon Oct 30 02:02:56 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 30 Oct 2006 02:02:56 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaISelLowering.cpp Message-ID: <200610300802.k9U82uQd018584@zion.cs.uiuc.edu> 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.69 Fri 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); From evan.cheng at apple.com Mon Oct 30 02:02:59 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 30 Oct 2006 02:02:59 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelLowering.cpp Message-ID: <200610300802.k9U82xuC018591@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64ISelLowering.cpp updated: 1.47 -> 1.48 --- Log message: All targets expand BR_JT for now. --- Diffs of the changes: (+2 -1) IA64ISelLowering.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/lib/Target/IA64/IA64ISelLowering.cpp diff -u llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.47 llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.48 --- llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.47 Fri Oct 13 16:14:26 2006 +++ llvm/lib/Target/IA64/IA64ISelLowering.cpp Mon Oct 30 02:02:39 2006 @@ -44,7 +44,8 @@ setLoadXAction(ISD::SEXTLOAD , MVT::i16 , Expand); setLoadXAction(ISD::SEXTLOAD , MVT::i32 , Expand); - 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::FP_ROUND_INREG , MVT::f32 , Expand); From jlaskey at apple.com Mon Oct 30 07:35:21 2006 From: jlaskey at apple.com (Jim Laskey) Date: Mon, 30 Oct 2006 07:35:21 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp Message-ID: <200610301335.k9UDZLVB000722@zion.cs.uiuc.edu> 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.cpp Mon 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 +#include 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 debug_, 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. + unsigned Number; // 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. /// - virtual unsigned SizeOf(const DwarfWriter &DW, unsigned Form) const; + virtual unsigned SizeOf(const Dwarf &DW, unsigned Form) const; }; //===----------------------------------------------------------------------===// @@ -344,11 +361,11 @@ /// EmitValue - Emit debug information entry offset. /// - virtual void EmitValue(const DwarfWriter &DW, unsigned Form) const; + virtual void EmitValue(const Dwarf &DW, unsigned Form) const; /// SizeOf - Determine size of debug information entry in bytes. /// - virtual unsigned SizeOf(const DwarfWriter &DW, unsigned Form) const; + virtual unsigned SizeOf(const Dwarf &DW, unsigned Form) const; }; //===----------------------------------------------------------------------===// @@ -373,7 +390,7 @@ /// ComputeSize - calculate the size of the block. /// - unsigned ComputeSize(DwarfWriter &DW); + unsigned ComputeSize(Dwarf &DW); /// BestForm - Choose the best form for data. /// @@ -381,11 +398,11 @@ /// EmitValue - Emit block data. /// - virtual void EmitValue(const DwarfWriter &DW, unsigned Form) const; + virtual void EmitValue(const Dwarf &DW, unsigned Form) const; /// SizeOf - Determine size of block data in bytes. /// - virtual unsigned SizeOf(const DwarfWriter &DW, unsigned Form) const; + virtual unsigned SizeOf(const Dwarf &DW, unsigned Form) const; /// AddUInt - Add an unsigned integer value. /// @@ -488,12 +505,364 @@ /// Complete - Indicate that all attributes have been added and /// ready to get an abbreviation ID. /// - void Complete(DwarfWriter &DW); + void Complete(Dwarf &DW); /// AddChild - Add a child to the DIE. void AddChild(DIE *Child); }; +//===----------------------------------------------------------------------===// +// Dwarf - Emits Dwarf debug and exception handling directives. +// +class Dwarf { + +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::vector CompileUnits; + + /// Abbreviations - A UniqueVector of TAG structure abbreviations. + /// + UniqueVector Abbreviations; + + /// StringPool - A UniqueVector of strings used by indirect references. + /// UnitMap - Map debug information descriptor to compile unit. + /// + UniqueVector StringPool; + + /// UnitMap - Map debug information descriptor to compile unit. + /// + std::map DescToUnitMap; + + /// DescToDieMap - Tracks the mapping of top level debug informaton + /// descriptors to debug information entries. + std::map DescToDieMap; + + /// SectionMap - Provides a unique id per text section. + /// + UniqueVector SectionMap; + + /// SectionSourceLines - Tracks line numbers per text section. + /// + std::vector > 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 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; + + /// 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); + + /// 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; + + /// PrintLabelName - Print label name in form used by Dwarf writer. + /// + void PrintLabelName(DWLabel Label) const { + PrintLabelName(Label.Tag, Label.Number); + } + void PrintLabelName(const char *Tag, unsigned Number) const; + + /// EmitLabel - Emit location label for internal use by Dwarf. + /// + void EmitLabel(DWLabel Label) const { + EmitLabel(Label.Tag, Label.Number); + } + void EmitLabel(const char *Tag, unsigned Number) const; + + /// EmitReference - Emit a reference to a label. + /// + void EmitReference(DWLabel Label) const { + EmitReference(Label.Tag, Label.Number); + } + void EmitReference(const char *Tag, unsigned Number) const; + void EmitReference(const std::string &Name) const; + + /// EmitDifference - Emit the difference between two labels. Some + /// assemblers do not behave with absolute expressions with data directives, + /// so there is an option (needsSet) to use an intermediary set expression. + void EmitDifference(DWLabel LabelHi, DWLabel LabelLo) const { + EmitDifference(LabelHi.Tag, LabelHi.Number, LabelLo.Tag, LabelLo.Number); + } + void EmitDifference(const char *TagHi, unsigned NumberHi, + const char *TagLo, unsigned NumberLo) const; + + /// NewAbbreviation - Add the abbreviation to the Abbreviation vector. + /// + unsigned NewAbbreviation(DIEAbbrev *Abbrev); + + /// NewString - Add a string to the constant pool and returns a label. + /// + DWLabel NewString(const std::string &String); + + /// getDieMapSlotFor - Returns the debug information entry map slot for the + /// specified debug descriptor. + DIE *&getDieMapSlotFor(DebugInfoDesc *DD); + +private: + + /// AddSourceLine - Add location information to specified debug information + /// entry. + void AddSourceLine(DIE *Die, CompileUnitDesc *File, unsigned Line); + + /// AddAddress - Add an address attribute to a die based on the location + /// provided. + void AddAddress(DIE *Die, unsigned Attribute, + const MachineLocation &Location); + + /// NewType - Create a new type DIE. + /// + DIE *NewType(DIE *Context, TypeDesc *TyDesc, CompileUnit *Unit); + + /// NewCompileUnit - Create new compile unit and it's die. + /// + CompileUnit *NewCompileUnit(CompileUnitDesc *UnitDesc, unsigned ID); + + /// FindCompileUnit - Get the compile unit for the given descriptor. + /// + CompileUnit *FindCompileUnit(CompileUnitDesc *UnitDesc); + + /// NewGlobalVariable - Make a new global variable DIE. + /// + DIE *NewGlobalVariable(GlobalVariableDesc *GVD); + + /// NewSubprogram - Add a new subprogram DIE. + /// + DIE *NewSubprogram(SubprogramDesc *SPD); + + /// NewScopeVariable - Create a new scope variable. + /// + DIE *NewScopeVariable(DebugVariable *DV, CompileUnit *Unit); + + /// ConstructScope - Construct the components of a scope. + /// + void ConstructScope(DebugScope *ParentScope, DIE *ParentDie, + CompileUnit *Unit); + + /// ConstructRootScope - Construct the scope for the subprogram. + /// + void ConstructRootScope(DebugScope *RootScope); + + /// EmitInitial - Emit initial Dwarf declarations. + /// + void EmitInitial(); + + /// EmitDIE - Recusively Emits a debug information entry. + /// + void EmitDIE(DIE *Die) const; + + /// SizeAndOffsetDie - Compute the size and offset of a DIE. + /// + unsigned SizeAndOffsetDie(DIE *Die, unsigned Offset, bool Last); + + /// SizeAndOffsets - Compute the size and offset of all the DIEs. + /// + void SizeAndOffsets(); + + /// EmitFrameMoves - Emit frame instructions to describe the layout of the + /// frame. + void EmitFrameMoves(const char *BaseLabel, unsigned BaseLabelID, + std::vector &Moves); + + /// EmitDebugInfo - Emit the debug info section. + /// + void EmitDebugInfo() const; + + /// EmitAbbreviations - Emit the abbreviation section. + /// + void EmitAbbreviations() const; + + /// EmitDebugLines - Emit source line information. + /// + void EmitDebugLines() const; + + /// EmitInitialDebugFrame - Emit common frame info into a debug frame section. + /// + void EmitInitialDebugFrame(); + + /// EmitFunctionDebugFrame - Emit per function frame info into a debug frame + /// section. + void EmitFunctionDebugFrame(); + + /// EmitDebugPubNames - Emit info into a debug pubnames section. + /// + void EmitDebugPubNames(); + + /// EmitDebugStr - Emit info into a debug str section. + /// + void EmitDebugStr(); + + /// EmitDebugLoc - Emit info into a debug loc section. + /// + void EmitDebugLoc(); + + /// EmitDebugARanges - Emit info into a debug aranges section. + /// + void EmitDebugARanges(); + + /// EmitDebugRanges - Emit info into a debug ranges section. + /// + void EmitDebugRanges(); + + /// EmitDebugMacInfo - Emit info into a debug macinfo section. + /// + void EmitDebugMacInfo(); + + /// ConstructCompileUnitDIEs - Create a compile unit DIE for each source and + /// header file. + void ConstructCompileUnitDIEs(); + + /// ConstructGlobalDIEs - Create DIEs for each of the externally visible + /// global variables. + void ConstructGlobalDIEs(); + + /// ConstructSubprogramDIEs - Create DIEs for each of the externally visible + /// subprograms. + void ConstructSubprogramDIEs(); + + /// ShouldEmitDwarf - Returns true if Dwarf declarations should be made. + /// + bool ShouldEmitDwarf() const { return shouldEmit; } + +public: + + Dwarf(std::ostream &OS, AsmPrinter *A, const TargetAsmInfo *T); + virtual ~Dwarf(); + + // Accessors. + // + const TargetAsmInfo *getTargetAsmInfo() const { return TAI; } + + /// SetDebugInfo - Set DebugInfo when it's known that pass manager has + /// created it. Set by the target AsmPrinter. + void SetDebugInfo(MachineDebugInfo *DI); + + //===--------------------------------------------------------------------===// + // Main entry points. + // + + /// BeginModule - Emit all Dwarf sections that should come prior to the + /// content. + void BeginModule(Module *M); + + /// EndModule - Emit all Dwarf sections that should come after the content. + /// + void EndModule(); + + /// BeginFunction - Gather pre-function debug information. Assumes being + /// emitted immediately after the function entry point. + void BeginFunction(MachineFunction *MF); + + /// EndFunction - Gather and emit post-function debug information. + /// + void EndFunction(); +}; + } // End of namespace llvm //===----------------------------------------------------------------------===// @@ -546,7 +915,7 @@ /// Emit - Print the abbreviation using the specified Dwarf writer. /// -void DIEAbbrev::Emit(const DwarfWriter &DW) const { +void DIEAbbrev::Emit(const Dwarf &DW) const { // Emit its Dwarf tag type. DW.EmitULEB128Bytes(Tag); DW.EOL(TagString(Tag)); @@ -613,7 +982,7 @@ /// EmitValue - Emit integer of appropriate size. /// -void DIEInteger::EmitValue(const DwarfWriter &DW, unsigned Form) const { +void DIEInteger::EmitValue(const Dwarf &DW, unsigned Form) const { switch (Form) { case DW_FORM_flag: // Fall thru case DW_FORM_ref1: // Fall thru @@ -632,7 +1001,7 @@ /// SizeOf - Determine size of integer value in bytes. /// -unsigned DIEInteger::SizeOf(const DwarfWriter &DW, unsigned Form) const { +unsigned DIEInteger::SizeOf(const Dwarf &DW, unsigned Form) const { switch (Form) { case DW_FORM_flag: // Fall thru case DW_FORM_ref1: // Fall thru @@ -654,13 +1023,13 @@ /// EmitValue - Emit string value. /// -void DIEString::EmitValue(const DwarfWriter &DW, unsigned Form) const { +void DIEString::EmitValue(const Dwarf &DW, unsigned Form) const { DW.EmitString(String); } /// SizeOf - Determine size of string value in bytes. /// -unsigned DIEString::SizeOf(const DwarfWriter &DW, unsigned Form) const { +unsigned DIEString::SizeOf(const Dwarf &DW, unsigned Form) const { return String.size() + sizeof(char); // sizeof('\0'); } @@ -668,13 +1037,13 @@ /// EmitValue - Emit label value. /// -void DIEDwarfLabel::EmitValue(const DwarfWriter &DW, unsigned Form) const { +void DIEDwarfLabel::EmitValue(const Dwarf &DW, unsigned Form) const { DW.EmitReference(Label); } /// SizeOf - Determine size of label value in bytes. /// -unsigned DIEDwarfLabel::SizeOf(const DwarfWriter &DW, unsigned Form) const { +unsigned DIEDwarfLabel::SizeOf(const Dwarf &DW, unsigned Form) const { return DW.getTargetAsmInfo()->getAddressSize(); } @@ -682,13 +1051,13 @@ /// EmitValue - Emit label value. /// -void DIEObjectLabel::EmitValue(const DwarfWriter &DW, unsigned Form) const { +void DIEObjectLabel::EmitValue(const Dwarf &DW, unsigned Form) const { DW.EmitReference(Label); } /// SizeOf - Determine size of label value in bytes. /// -unsigned DIEObjectLabel::SizeOf(const DwarfWriter &DW, unsigned Form) const { +unsigned DIEObjectLabel::SizeOf(const Dwarf &DW, unsigned Form) const { return DW.getTargetAsmInfo()->getAddressSize(); } @@ -696,26 +1065,26 @@ /// EmitValue - Emit delta value. /// -void DIEDelta::EmitValue(const DwarfWriter &DW, unsigned Form) const { +void DIEDelta::EmitValue(const Dwarf &DW, unsigned Form) const { DW.EmitDifference(LabelHi, LabelLo); } /// SizeOf - Determine size of delta value in bytes. /// -unsigned DIEDelta::SizeOf(const DwarfWriter &DW, unsigned Form) const { +unsigned DIEDelta::SizeOf(const Dwarf &DW, unsigned Form) const { return DW.getTargetAsmInfo()->getAddressSize(); } //===----------------------------------------------------------------------===// /// EmitValue - Emit debug information entry offset. /// -void DIEntry::EmitValue(const DwarfWriter &DW, unsigned Form) const { +void DIEntry::EmitValue(const Dwarf &DW, unsigned Form) const { DW.EmitInt32(Entry->getOffset()); } /// SizeOf - Determine size of debug information entry value in bytes. /// -unsigned DIEntry::SizeOf(const DwarfWriter &DW, unsigned Form) const { +unsigned DIEntry::SizeOf(const Dwarf &DW, unsigned Form) const { return sizeof(int32_t); } @@ -729,7 +1098,7 @@ /// ComputeSize - calculate the size of the block. /// -unsigned DIEBlock::ComputeSize(DwarfWriter &DW) { +unsigned DIEBlock::ComputeSize(Dwarf &DW) { Size = 0; for (unsigned i = 0, N = Values.size(); i < N; ++i) { Size += Values[i]->SizeOf(DW, Forms[i]); @@ -748,7 +1117,7 @@ /// EmitValue - Emit block data. /// -void DIEBlock::EmitValue(const DwarfWriter &DW, unsigned Form) const { +void DIEBlock::EmitValue(const Dwarf &DW, unsigned Form) const { switch (Form) { case DW_FORM_block1: DW.EmitInt8(Size); break; case DW_FORM_block2: DW.EmitInt16(Size); break; @@ -764,7 +1133,7 @@ /// SizeOf - Determine size of block data in bytes. /// -unsigned DIEBlock::SizeOf(const DwarfWriter &DW, unsigned Form) const { +unsigned DIEBlock::SizeOf(const Dwarf &DW, unsigned Form) const { switch (Form) { case DW_FORM_block1: return Size + sizeof(int8_t); case DW_FORM_block2: return Size + sizeof(int16_t); @@ -927,7 +1296,7 @@ /// Complete - Indicate that all attributes have been added and ready to get an /// abbreviation ID. -void DIE::Complete(DwarfWriter &DW) { +void DIE::Complete(Dwarf &DW) { AbbrevID = DW.NewAbbreviation(Abbrev); delete Abbrev; Abbrev = NULL; @@ -943,19 +1312,19 @@ //===----------------------------------------------------------------------===// -/// DwarfWriter +/// Dwarf //===----------------------------------------------------------------------===// /// PrintHex - Print a value as a hexidecimal value. /// -void DwarfWriter::PrintHex(int Value) const { +void Dwarf::PrintHex(int Value) const { O << "0x" << std::hex << Value << std::dec; } /// 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 DwarfWriter::EOL(const std::string &Comment) const { +void Dwarf::EOL(const std::string &Comment) const { if (DwarfVerbose && !Comment.empty()) { O << "\t" << TAI->getCommentString() @@ -967,13 +1336,13 @@ /// EmitAlign - Print a align directive. /// -void DwarfWriter::EmitAlign(unsigned Alignment) const { +void Dwarf::EmitAlign(unsigned Alignment) const { O << TAI->getAlignDirective() << Alignment << "\n"; } /// EmitULEB128Bytes - Emit an assembler byte data directive to compose an /// unsigned leb128 value. -void DwarfWriter::EmitULEB128Bytes(unsigned Value) const { +void Dwarf::EmitULEB128Bytes(unsigned Value) const { if (TAI->hasLEB128()) { O << "\t.uleb128\t" << Value; @@ -985,7 +1354,7 @@ /// EmitSLEB128Bytes - Emit an assembler byte data directive to compose a /// signed leb128 value. -void DwarfWriter::EmitSLEB128Bytes(int Value) const { +void Dwarf::EmitSLEB128Bytes(int Value) const { if (TAI->hasLEB128()) { O << "\t.sleb128\t" << Value; @@ -997,7 +1366,7 @@ /// PrintULEB128 - Print a series of hexidecimal values (separated by commas) /// representing an unsigned leb128 value. -void DwarfWriter::PrintULEB128(unsigned Value) const { +void Dwarf::PrintULEB128(unsigned Value) const { do { unsigned Byte = Value & 0x7f; Value >>= 7; @@ -1009,7 +1378,7 @@ /// SizeULEB128 - Compute the number of bytes required for an unsigned leb128 /// value. -unsigned DwarfWriter::SizeULEB128(unsigned Value) { +unsigned Dwarf::SizeULEB128(unsigned Value) { unsigned Size = 0; do { Value >>= 7; @@ -1020,7 +1389,7 @@ /// PrintSLEB128 - Print a series of hexidecimal values (separated by commas) /// representing a signed leb128 value. -void DwarfWriter::PrintSLEB128(int Value) const { +void Dwarf::PrintSLEB128(int Value) const { int Sign = Value >> (8 * sizeof(Value) - 1); bool IsMore; @@ -1036,7 +1405,7 @@ /// SizeSLEB128 - Compute the number of bytes required for a signed leb128 /// value. -unsigned DwarfWriter::SizeSLEB128(int Value) { +unsigned Dwarf::SizeSLEB128(int Value) { unsigned Size = 0; int Sign = Value >> (8 * sizeof(Value) - 1); bool IsMore; @@ -1052,28 +1421,28 @@ /// EmitInt8 - Emit a byte directive and value. /// -void DwarfWriter::EmitInt8(int Value) const { +void Dwarf::EmitInt8(int Value) const { O << TAI->getData8bitsDirective(); PrintHex(Value & 0xFF); } /// EmitInt16 - Emit a short directive and value. /// -void DwarfWriter::EmitInt16(int Value) const { +void Dwarf::EmitInt16(int Value) const { O << TAI->getData16bitsDirective(); PrintHex(Value & 0xFFFF); } /// EmitInt32 - Emit a long directive and value. /// -void DwarfWriter::EmitInt32(int Value) const { +void Dwarf::EmitInt32(int Value) const { O << TAI->getData32bitsDirective(); PrintHex(Value); } /// EmitInt64 - Emit a long long directive and value. /// -void DwarfWriter::EmitInt64(uint64_t Value) const { +void Dwarf::EmitInt64(uint64_t Value) const { if (TAI->getData64bitsDirective()) { O << TAI->getData64bitsDirective() << "0x" << std::hex << Value << std::dec; } else { @@ -1089,7 +1458,7 @@ /// EmitString - Emit a string with quotes and a null terminator. /// Special characters are emitted properly. (Eg. '\t') -void DwarfWriter::EmitString(const std::string &String) const { +void Dwarf::EmitString(const std::string &String) const { O << TAI->getAsciiDirective() << "\""; for (unsigned i = 0, N = String.size(); i < N; ++i) { @@ -1122,7 +1491,7 @@ /// PrintLabelName - Print label name in form used by Dwarf writer. /// -void DwarfWriter::PrintLabelName(const char *Tag, unsigned Number) const { +void Dwarf::PrintLabelName(const char *Tag, unsigned Number) const { O << TAI->getPrivateGlobalPrefix() << "debug_" << Tag; @@ -1131,14 +1500,14 @@ /// EmitLabel - Emit location label for internal use by Dwarf. /// -void DwarfWriter::EmitLabel(const char *Tag, unsigned Number) const { +void Dwarf::EmitLabel(const char *Tag, unsigned Number) const { PrintLabelName(Tag, Number); O << ":\n"; } /// EmitReference - Emit a reference to a label. /// -void DwarfWriter::EmitReference(const char *Tag, unsigned Number) const { +void Dwarf::EmitReference(const char *Tag, unsigned Number) const { if (TAI->getAddressSize() == 4) O << TAI->getData32bitsDirective(); else @@ -1146,7 +1515,7 @@ PrintLabelName(Tag, Number); } -void DwarfWriter::EmitReference(const std::string &Name) const { +void Dwarf::EmitReference(const std::string &Name) const { if (TAI->getAddressSize() == 4) O << TAI->getData32bitsDirective(); else @@ -1158,7 +1527,7 @@ /// EmitDifference - Emit an label difference as sizeof(pointer) value. Some /// assemblers do not accept absolute expressions with data directives, so there /// is an option (needsSet) to use an intermediary 'set' expression. -void DwarfWriter::EmitDifference(const char *TagHi, unsigned NumberHi, +void Dwarf::EmitDifference(const char *TagHi, unsigned NumberHi, const char *TagLo, unsigned NumberLo) const { if (TAI->needsSet()) { static unsigned SetCounter = 0; @@ -1193,20 +1562,20 @@ /// NewAbbreviation - Add the abbreviation to the Abbreviation vector. /// -unsigned DwarfWriter::NewAbbreviation(DIEAbbrev *Abbrev) { +unsigned Dwarf::NewAbbreviation(DIEAbbrev *Abbrev) { return Abbreviations.insert(*Abbrev); } /// NewString - Add a string to the constant pool and returns a label. /// -DWLabel DwarfWriter::NewString(const std::string &String) { +DWLabel Dwarf::NewString(const std::string &String) { unsigned StringID = StringPool.insert(String); return DWLabel("string", StringID); } /// AddSourceLine - Add location information to specified debug information /// entry. -void DwarfWriter::AddSourceLine(DIE *Die, CompileUnitDesc *File, unsigned Line){ +void Dwarf::AddSourceLine(DIE *Die, CompileUnitDesc *File, unsigned Line){ if (File && Line) { CompileUnit *FileUnit = FindCompileUnit(File); unsigned FileID = FileUnit->getID(); @@ -1217,7 +1586,7 @@ /// AddAddress - Add an address attribute to a die based on the location /// provided. -void DwarfWriter::AddAddress(DIE *Die, unsigned Attribute, +void Dwarf::AddAddress(DIE *Die, unsigned Attribute, const MachineLocation &Location) { DIEBlock *Block = new DIEBlock(); unsigned Reg = RI->getDwarfRegNum(Location.getRegister()); @@ -1244,13 +1613,13 @@ /// getDieMapSlotFor - Returns the debug information entry map slot for the /// specified debug descriptor. -DIE *&DwarfWriter::getDieMapSlotFor(DebugInfoDesc *DD) { +DIE *&Dwarf::getDieMapSlotFor(DebugInfoDesc *DD) { return DescToDieMap[DD]; } /// NewType - Create a new type DIE. /// -DIE *DwarfWriter::NewType(DIE *Context, TypeDesc *TyDesc, CompileUnit *Unit) { +DIE *Dwarf::NewType(DIE *Context, TypeDesc *TyDesc, CompileUnit *Unit) { if (!TyDesc) { // FIXME - Hack for missing types DIE *Die = new DIE(DW_TAG_base_type); @@ -1565,7 +1934,7 @@ /// NewCompileUnit - Create new compile unit and it's debug information entry. /// -CompileUnit *DwarfWriter::NewCompileUnit(CompileUnitDesc *UnitDesc, +CompileUnit *Dwarf::NewCompileUnit(CompileUnitDesc *UnitDesc, unsigned ID) { // Construct debug information entry. DIE *Die = new DIE(DW_TAG_compile_unit); @@ -1593,7 +1962,7 @@ /// FindCompileUnit - Get the compile unit for the given descriptor. /// -CompileUnit *DwarfWriter::FindCompileUnit(CompileUnitDesc *UnitDesc) { +CompileUnit *Dwarf::FindCompileUnit(CompileUnitDesc *UnitDesc) { CompileUnit *Unit = DescToUnitMap[UnitDesc]; assert(Unit && "Missing compile unit."); return Unit; @@ -1601,7 +1970,7 @@ /// NewGlobalVariable - Add a new global variable DIE. /// -DIE *DwarfWriter::NewGlobalVariable(GlobalVariableDesc *GVD) { +DIE *Dwarf::NewGlobalVariable(GlobalVariableDesc *GVD) { // Get the compile unit context. CompileUnitDesc *UnitDesc = static_cast(GVD->getContext()); CompileUnit *Unit = FindCompileUnit(UnitDesc); @@ -1658,7 +2027,7 @@ /// NewSubprogram - Add a new subprogram DIE. /// -DIE *DwarfWriter::NewSubprogram(SubprogramDesc *SPD) { +DIE *Dwarf::NewSubprogram(SubprogramDesc *SPD) { // Get the compile unit context. CompileUnitDesc *UnitDesc = static_cast(SPD->getContext()); CompileUnit *Unit = FindCompileUnit(UnitDesc); @@ -1704,7 +2073,7 @@ /// NewScopeVariable - Create a new scope variable. /// -DIE *DwarfWriter::NewScopeVariable(DebugVariable *DV, CompileUnit *Unit) { +DIE *Dwarf::NewScopeVariable(DebugVariable *DV, CompileUnit *Unit) { // Get the descriptor. VariableDesc *VD = DV->getDesc(); @@ -1738,7 +2107,7 @@ /// ConstructScope - Construct the components of a scope. /// -void DwarfWriter::ConstructScope(DebugScope *ParentScope, +void Dwarf::ConstructScope(DebugScope *ParentScope, DIE *ParentDie, CompileUnit *Unit) { // Add variables to scope. std::vector &Variables = ParentScope->getVariables(); @@ -1788,7 +2157,7 @@ /// ConstructRootScope - Construct the scope for the subprogram. /// -void DwarfWriter::ConstructRootScope(DebugScope *RootScope) { +void Dwarf::ConstructRootScope(DebugScope *RootScope) { // Exit if there is no root scope. if (!RootScope) return; @@ -1817,7 +2186,7 @@ /// EmitInitial - Emit initial Dwarf declarations. This is necessary for cc /// tools to recognize the object file contains Dwarf information. /// -void DwarfWriter::EmitInitial() { +void Dwarf::EmitInitial() { // Check to see if we already emitted intial headers. if (didInitial) return; didInitial = true; @@ -1858,7 +2227,7 @@ /// EmitDIE - Recusively Emits a debug information entry. /// -void DwarfWriter::EmitDIE(DIE *Die) const { +void Dwarf::EmitDIE(DIE *Die) const { // Get the abbreviation for this DIE. unsigned AbbrevID = Die->getAbbrevID(); const DIEAbbrev &Abbrev = Abbreviations[AbbrevID]; @@ -1911,7 +2280,7 @@ /// SizeAndOffsetDie - Compute the size and offset of a DIE. /// -unsigned DwarfWriter::SizeAndOffsetDie(DIE *Die, unsigned Offset, bool Last) { +unsigned Dwarf::SizeAndOffsetDie(DIE *Die, unsigned Offset, bool Last) { // Get the children. const std::vector &Children = Die->getChildren(); @@ -1959,7 +2328,7 @@ /// SizeAndOffsets - Compute the size and offset of all the DIEs. /// -void DwarfWriter::SizeAndOffsets() { +void Dwarf::SizeAndOffsets() { // Process each compile unit. for (unsigned i = 0, N = CompileUnits.size(); i < N; ++i) { @@ -1977,7 +2346,7 @@ /// EmitFrameMoves - Emit frame instructions to describe the layout of the /// frame. -void DwarfWriter::EmitFrameMoves(const char *BaseLabel, unsigned BaseLabelID, +void Dwarf::EmitFrameMoves(const char *BaseLabel, unsigned BaseLabelID, std::vector &Moves) { for (unsigned i = 0, N = Moves.size(); i < N; ++i) { MachineMove *Move = Moves[i]; @@ -2056,7 +2425,7 @@ /// EmitDebugInfo - Emit the debug info section. /// -void DwarfWriter::EmitDebugInfo() const { +void Dwarf::EmitDebugInfo() const { // Start debug info section. Asm->SwitchToDataSection(TAI->getDwarfInfoSection(), 0); @@ -2090,7 +2459,7 @@ /// EmitAbbreviations - Emit the abbreviation section. /// -void DwarfWriter::EmitAbbreviations() const { +void Dwarf::EmitAbbreviations() const { // Check to see if it is worth the effort. if (!Abbreviations.empty()) { // Start the debug abbrev section. @@ -2121,7 +2490,7 @@ /// EmitDebugLines - Emit source line information. /// -void DwarfWriter::EmitDebugLines() const { +void Dwarf::EmitDebugLines() const { // Minimum line delta, thus ranging from -10..(255-10). const int MinLineDelta = -(DW_LNS_fixed_advance_pc + 1); // Maximum line delta, thus ranging from -10..(255-10). @@ -2277,7 +2646,7 @@ /// EmitInitialDebugFrame - Emit common frame info into a debug frame section. /// -void DwarfWriter::EmitInitialDebugFrame() { +void Dwarf::EmitInitialDebugFrame() { int stackGrowth = Asm->TM.getFrameInfo()->getStackGrowthDirection() == TargetFrameInfo::StackGrowsUp ? @@ -2312,7 +2681,7 @@ /// EmitFunctionDebugFrame - Emit per function frame info into a debug frame /// section. -void DwarfWriter::EmitFunctionDebugFrame() { +void Dwarf::EmitFunctionDebugFrame() { // Start the dwarf frame section. Asm->SwitchToDataSection(TAI->getDwarfFrameSection(), 0); @@ -2342,7 +2711,7 @@ /// EmitDebugPubNames - Emit visible names into a debug pubnames section. /// -void DwarfWriter::EmitDebugPubNames() { +void Dwarf::EmitDebugPubNames() { // Start the dwarf pubnames section. Asm->SwitchToDataSection(TAI->getDwarfPubNamesSection(), 0); @@ -2387,7 +2756,7 @@ /// EmitDebugStr - Emit visible names into a debug str section. /// -void DwarfWriter::EmitDebugStr() { +void Dwarf::EmitDebugStr() { // Check to see if it is worth the effort. if (!StringPool.empty()) { // Start the dwarf str section. @@ -2409,7 +2778,7 @@ /// EmitDebugLoc - Emit visible names into a debug loc section. /// -void DwarfWriter::EmitDebugLoc() { +void Dwarf::EmitDebugLoc() { // Start the dwarf loc section. Asm->SwitchToDataSection(TAI->getDwarfLocSection(), 0); @@ -2418,7 +2787,7 @@ /// EmitDebugARanges - Emit visible names into a debug aranges section. /// -void DwarfWriter::EmitDebugARanges() { +void Dwarf::EmitDebugARanges() { // Start the dwarf aranges section. Asm->SwitchToDataSection(TAI->getDwarfARangesSection(), 0); @@ -2459,7 +2828,7 @@ /// EmitDebugRanges - Emit visible names into a debug ranges section. /// -void DwarfWriter::EmitDebugRanges() { +void Dwarf::EmitDebugRanges() { // Start the dwarf ranges section. Asm->SwitchToDataSection(TAI->getDwarfRangesSection(), 0); @@ -2468,7 +2837,7 @@ /// EmitDebugMacInfo - Emit visible names into a debug macinfo section. /// -void DwarfWriter::EmitDebugMacInfo() { +void Dwarf::EmitDebugMacInfo() { // Start the dwarf macinfo section. Asm->SwitchToDataSection(TAI->getDwarfMacInfoSection(), 0); @@ -2477,7 +2846,7 @@ /// ConstructCompileUnitDIEs - Create a compile unit DIE for each source and /// header file. -void DwarfWriter::ConstructCompileUnitDIEs() { +void Dwarf::ConstructCompileUnitDIEs() { const UniqueVector CUW = DebugInfo->getCompileUnits(); for (unsigned i = 1, N = CUW.size(); i <= N; ++i) { @@ -2488,7 +2857,7 @@ /// ConstructGlobalDIEs - Create DIEs for each of the externally visible global /// variables. -void DwarfWriter::ConstructGlobalDIEs() { +void Dwarf::ConstructGlobalDIEs() { std::vector GlobalVariables = DebugInfo->getAnchoredDescriptors(*M); @@ -2500,7 +2869,7 @@ /// ConstructSubprogramDIEs - Create DIEs for each of the externally visible /// subprograms. -void DwarfWriter::ConstructSubprogramDIEs() { +void Dwarf::ConstructSubprogramDIEs() { std::vector Subprograms = DebugInfo->getAnchoredDescriptors(*M); @@ -2511,10 +2880,10 @@ } //===----------------------------------------------------------------------===// -// Main entry points. +// Dwarf implemenation. // -DwarfWriter::DwarfWriter(std::ostream &OS, AsmPrinter *A, +Dwarf::Dwarf(std::ostream &OS, AsmPrinter *A, const TargetAsmInfo *T) : O(OS) , Asm(A) @@ -2535,7 +2904,7 @@ , SectionMap() , SectionSourceLines() {} -DwarfWriter::~DwarfWriter() { +Dwarf::~Dwarf() { for (unsigned i = 0, N = CompileUnits.size(); i < N; ++i) { delete CompileUnits[i]; } @@ -2543,7 +2912,7 @@ /// SetDebugInfo - Set DebugInfo when it's known that pass manager has /// created it. Set by the target AsmPrinter. -void DwarfWriter::SetDebugInfo(MachineDebugInfo *DI) { +void Dwarf::SetDebugInfo(MachineDebugInfo *DI) { // Make sure initial declarations are made. if (!DebugInfo && DI->hasInfo()) { DebugInfo = DI; @@ -2568,7 +2937,7 @@ /// BeginModule - Emit all Dwarf sections that should come prior to the content. /// -void DwarfWriter::BeginModule(Module *M) { +void Dwarf::BeginModule(Module *M) { this->M = M; if (!ShouldEmitDwarf()) return; @@ -2577,7 +2946,7 @@ /// EndModule - Emit all Dwarf sections that should come after the content. /// -void DwarfWriter::EndModule() { +void Dwarf::EndModule() { if (!ShouldEmitDwarf()) return; EOL("Dwarf End Module"); @@ -2626,7 +2995,7 @@ /// BeginFunction - Gather pre-function debug information. Assumes being /// emitted immediately after the function entry point. -void DwarfWriter::BeginFunction(MachineFunction *MF) { +void Dwarf::BeginFunction(MachineFunction *MF) { this->MF = MF; if (!ShouldEmitDwarf()) return; @@ -2641,7 +3010,7 @@ /// EndFunction - Gather and emit post-function debug information. /// -void DwarfWriter::EndFunction() { +void Dwarf::EndFunction() { if (!ShouldEmitDwarf()) return; EOL("Dwarf End Function"); @@ -2668,9 +3037,51 @@ EmitFunctionDebugFrame(); // Reset the line numbers for the next function. - // FIXME: move this to release memory of the debuginfo object. DebugInfo->ClearLineInfo(); // Clear function debug information. DebugInfo->EndFunction(); } + + +//===----------------------------------------------------------------------===// +/// DwarfWriter Implementation + +DwarfWriter::DwarfWriter(std::ostream &OS, AsmPrinter *A, + const TargetAsmInfo *T) { + DW = new Dwarf(OS, A, T); +} + +DwarfWriter::~DwarfWriter() { + delete DW; +} + +/// SetDebugInfo - Set DebugInfo when it's known that pass manager has +/// created it. Set by the target AsmPrinter. +void DwarfWriter::SetDebugInfo(MachineDebugInfo *DI) { + DW->SetDebugInfo(DI); +} + +/// BeginModule - Emit all Dwarf sections that should come prior to the +/// content. +void DwarfWriter::BeginModule(Module *M) { + DW->BeginModule(M); +} + +/// EndModule - Emit all Dwarf sections that should come after the content. +/// +void DwarfWriter::EndModule() { + DW->EndModule(); +} + +/// BeginFunction - Gather pre-function debug information. Assumes being +/// emitted immediately after the function entry point. +void DwarfWriter::BeginFunction(MachineFunction *MF) { + DW->BeginFunction(MF); +} + +/// EndFunction - Gather and emit post-function debug information. +/// +void DwarfWriter::EndFunction() { + DW->EndFunction(); +} From jlaskey at apple.com Mon Oct 30 07:35:22 2006 From: jlaskey at apple.com (Jim Laskey) Date: Mon, 30 Oct 2006 07:35:22 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/DwarfWriter.h Message-ID: <200610301335.k9UDZMbY000727@zion.cs.uiuc.edu> 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.41 Tue 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 -#include - +#include 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 debug_, 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. - unsigned Number; // 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::vector CompileUnits; - - /// Abbreviations - A UniqueVector of TAG structure abbreviations. - /// - UniqueVector Abbreviations; - - /// StringPool - A UniqueVector of strings used by indirect references. - /// UnitMap - Map debug information descriptor to compile unit. - /// - UniqueVector StringPool; - - /// UnitMap - Map debug information descriptor to compile unit. - /// - std::map DescToUnitMap; - - /// DescToDieMap - Tracks the mapping of top level debug informaton - /// descriptors to debug information entries. - std::map DescToDieMap; - - /// SectionMap - Provides a unique id per text section. - /// - UniqueVector SectionMap; - - /// SectionSourceLines - Tracks line numbers per text section. - /// - std::vector > 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 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; - - /// 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); - - /// 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; - - /// PrintLabelName - Print label name in form used by Dwarf writer. - /// - void PrintLabelName(DWLabel Label) const { - PrintLabelName(Label.Tag, Label.Number); - } - void PrintLabelName(const char *Tag, unsigned Number) const; - - /// EmitLabel - Emit location label for internal use by Dwarf. - /// - void EmitLabel(DWLabel Label) const { - EmitLabel(Label.Tag, Label.Number); - } - void EmitLabel(const char *Tag, unsigned Number) const; - - /// EmitReference - Emit a reference to a label. - /// - void EmitReference(DWLabel Label) const { - EmitReference(Label.Tag, Label.Number); - } - void EmitReference(const char *Tag, unsigned Number) const; - void EmitReference(const std::string &Name) const; - - /// EmitDifference - Emit the difference between two labels. Some - /// assemblers do not behave with absolute expressions with data directives, - /// so there is an option (needsSet) to use an intermediary set expression. - void EmitDifference(DWLabel LabelHi, DWLabel LabelLo) const { - EmitDifference(LabelHi.Tag, LabelHi.Number, LabelLo.Tag, LabelLo.Number); - } - void EmitDifference(const char *TagHi, unsigned NumberHi, - const char *TagLo, unsigned NumberLo) const; - - /// NewAbbreviation - Add the abbreviation to the Abbreviation vector. - /// - unsigned NewAbbreviation(DIEAbbrev *Abbrev); - - /// NewString - Add a string to the constant pool and returns a label. - /// - DWLabel NewString(const std::string &String); - - /// getDieMapSlotFor - Returns the debug information entry map slot for the - /// specified debug descriptor. - DIE *&getDieMapSlotFor(DebugInfoDesc *DD); - +class DwarfWriter { private: - - /// AddSourceLine - Add location information to specified debug information - /// entry. - void AddSourceLine(DIE *Die, CompileUnitDesc *File, unsigned Line); - - /// AddAddress - Add an address attribute to a die based on the location - /// provided. - void AddAddress(DIE *Die, unsigned Attribute, - const MachineLocation &Location); - - /// NewType - Create a new type DIE. - /// - DIE *NewType(DIE *Context, TypeDesc *TyDesc, CompileUnit *Unit); - - /// NewCompileUnit - Create new compile unit and it's die. + /// DM - Provides the DwarfWriter implementation. /// - CompileUnit *NewCompileUnit(CompileUnitDesc *UnitDesc, unsigned ID); + Dwarf *DW; - /// FindCompileUnit - Get the compile unit for the given descriptor. - /// - CompileUnit *FindCompileUnit(CompileUnitDesc *UnitDesc); - - /// NewGlobalVariable - Make a new global variable DIE. - /// - DIE *NewGlobalVariable(GlobalVariableDesc *GVD); - - /// NewSubprogram - Add a new subprogram DIE. - /// - DIE *NewSubprogram(SubprogramDesc *SPD); - - /// NewScopeVariable - Create a new scope variable. - /// - DIE *NewScopeVariable(DebugVariable *DV, CompileUnit *Unit); - - /// ConstructScope - Construct the components of a scope. - /// - void ConstructScope(DebugScope *ParentScope, DIE *ParentDie, - CompileUnit *Unit); - - /// ConstructRootScope - Construct the scope for the subprogram. - /// - void ConstructRootScope(DebugScope *RootScope); - - /// EmitInitial - Emit initial Dwarf declarations. - /// - void EmitInitial(); - - /// EmitDIE - Recusively Emits a debug information entry. - /// - void EmitDIE(DIE *Die) const; - - /// SizeAndOffsetDie - Compute the size and offset of a DIE. - /// - unsigned SizeAndOffsetDie(DIE *Die, unsigned Offset, bool Last); - - /// SizeAndOffsets - Compute the size and offset of all the DIEs. - /// - void SizeAndOffsets(); - - /// EmitFrameMoves - Emit frame instructions to describe the layout of the - /// frame. - void EmitFrameMoves(const char *BaseLabel, unsigned BaseLabelID, - std::vector &Moves); - - /// EmitDebugInfo - Emit the debug info section. - /// - void EmitDebugInfo() const; - - /// EmitAbbreviations - Emit the abbreviation section. - /// - void EmitAbbreviations() const; - - /// EmitDebugLines - Emit source line information. - /// - void EmitDebugLines() const; - - /// EmitInitialDebugFrame - Emit common frame info into a debug frame section. - /// - void EmitInitialDebugFrame(); - - /// EmitFunctionDebugFrame - Emit per function frame info into a debug frame - /// section. - void EmitFunctionDebugFrame(); - - /// EmitDebugPubNames - Emit info into a debug pubnames section. - /// - void EmitDebugPubNames(); - - /// EmitDebugStr - Emit info into a debug str section. - /// - void EmitDebugStr(); - - /// EmitDebugLoc - Emit info into a debug loc section. - /// - void EmitDebugLoc(); - - /// EmitDebugARanges - Emit info into a debug aranges section. - /// - void EmitDebugARanges(); - - /// EmitDebugRanges - Emit info into a debug ranges section. - /// - void EmitDebugRanges(); - - /// EmitDebugMacInfo - Emit info into a debug macinfo section. - /// - void EmitDebugMacInfo(); - - /// ConstructCompileUnitDIEs - Create a compile unit DIE for each source and - /// header file. - void ConstructCompileUnitDIEs(); - - /// ConstructGlobalDIEs - Create DIEs for each of the externally visible - /// global variables. - void ConstructGlobalDIEs(); - - /// ConstructSubprogramDIEs - Create DIEs for each of the externally visible - /// subprograms. - void ConstructSubprogramDIEs(); - - /// ShouldEmitDwarf - Returns true if Dwarf declarations should be made. - /// - bool ShouldEmitDwarf() const { return shouldEmit; } - public: DwarfWriter(std::ostream &OS, AsmPrinter *A, const TargetAsmInfo *T); virtual ~DwarfWriter(); - // Accessors. - // - const TargetAsmInfo *getTargetAsmInfo() const { return TAI; } - /// SetDebugInfo - Set DebugInfo when it's known that pass manager has /// created it. Set by the target AsmPrinter. void SetDebugInfo(MachineDebugInfo *DI); @@ -417,12 +69,9 @@ /// EndFunction - Gather and emit post-function debug information. /// void EndFunction(); - - /// NonFunction - Function does not have a true body. - /// - void NonFunction(); }; + } // end llvm namespace #endif From jlaskey at apple.com Mon Oct 30 10:00:08 2006 From: jlaskey at apple.com (Jim Laskey) Date: Mon, 30 Oct 2006 10:00:08 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp Message-ID: <200610301600.k9UG08h4002867@zion.cs.uiuc.edu> 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.cpp Mon 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 debug_, 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 debug_, 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::vector 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::vector &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 @@ Data.insert(Data.begin(), DIEAbbrevData(Attribute, Form)); } + /// Profile - Used to gather unique data for the abbreviation folding set. + /// + void Profile(FoldingSetNodeID &ID) { + ID.AddInteger(Tag); + ID.AddInteger(ChildrenFlag); + + // For each attribute description. + for (unsigned i = 0, N = Data.size(); i < N; ++i) + Data[i].Profile(ID); + } + /// Emit - Print the abbreviation using the specified Dwarf writer. /// void Emit(const Dwarf &DW) const; @@ -202,7 +198,7 @@ }; //===----------------------------------------------------------------------===// -// DIEValue - A debug information entry value. +/// DIEValue - A debug information entry value. // class DIEValue { public: @@ -234,8 +230,8 @@ }; //===----------------------------------------------------------------------===// -// DWInteger - An integer value DIE. -// +/// DWInteger - An integer value DIE. +/// class DIEInteger : public DIEValue { private: uint64_t Integer; @@ -261,8 +257,8 @@ }; //===----------------------------------------------------------------------===// -// DIEString - A string value DIE. -// +/// DIEString - A string value DIE. +/// struct DIEString : public DIEValue { const std::string String; @@ -282,7 +278,7 @@ }; //===----------------------------------------------------------------------===// -// DIEDwarfLabel - A Dwarf internal label expression DIE. +/// DIEDwarfLabel - A Dwarf internal label expression DIE. // struct DIEDwarfLabel : public DIEValue { const DWLabel Label; @@ -304,7 +300,7 @@ //===----------------------------------------------------------------------===// -// DIEObjectLabel - A label to an object in code or data. +/// DIEObjectLabel - A label to an object in code or data. // struct DIEObjectLabel : public DIEValue { const std::string Label; @@ -325,8 +321,8 @@ }; //===----------------------------------------------------------------------===// -// DIEDelta - A simple label difference DIE. -// +/// DIEDelta - A simple label difference DIE. +/// struct DIEDelta : public DIEValue { const DWLabel LabelHi; const DWLabel LabelLo; @@ -348,8 +344,8 @@ }; //===----------------------------------------------------------------------===// -// DIEntry - A pointer to a debug information entry. -// +/// DIEntry - A pointer to a debug information entry. +/// struct DIEntry : public DIEValue { DIE *Entry; @@ -369,7 +365,7 @@ }; //===----------------------------------------------------------------------===// -// DIEBlock - A block of values. Primarily used for location expressions. +/// DIEBlock - A block of values. Primarily used for location expressions. // struct DIEBlock : public DIEValue { unsigned Size; // Size in bytes excluding size header. @@ -435,12 +431,11 @@ }; //===----------------------------------------------------------------------===// -// DIE - A structured debug information entry. Has an abbreviation which -// describes it's organization. +/// DIE - A structured debug information entry. Has an abbreviation which +/// describes it's organization. class DIE { private: - DIEAbbrev *Abbrev; // Temporary buffer for abbreviation. - unsigned AbbrevID; // Decribing abbreviation ID. + DIEAbbrev Abbrev; // Buffer for constructing abbreviation. unsigned Offset; // Offset in debug info section. unsigned Size; // Size of instance + children. std::vector Children; // Children DIEs. @@ -451,7 +446,9 @@ ~DIE(); // Accessors. - unsigned getAbbrevID() const { return AbbrevID; } + unsigned getAbbrevNumber() const { + return Abbrev.getNumber(); + } unsigned getOffset() const { return Offset; } unsigned getSize() const { return Size; } const std::vector &getChildren() const { return Children; } @@ -512,7 +509,7 @@ }; //===----------------------------------------------------------------------===// -// Dwarf - Emits Dwarf debug and exception handling directives. +/// Dwarf - Emits Dwarf debug and exception handling directives. // class Dwarf { @@ -571,10 +568,14 @@ /// CompileUnits - All the compile units involved in this build. The index /// of each entry in this vector corresponds to the sources in DebugInfo. std::vector CompileUnits; + + /// AbbreviationsSet - Used to uniquely define the abbreviations. + /// + FoldingSet AbbreviationsSet; - /// Abbreviations - A UniqueVector of TAG structure abbreviations. + /// Abbreviations - A list of all the unique abbreviations in use. /// - UniqueVector Abbreviations; + std::vector Abbreviations; /// StringPool - A UniqueVector of strings used by indirect references. /// UnitMap - Map debug information descriptor to compile unit. @@ -692,9 +693,9 @@ void EmitDifference(const char *TagHi, unsigned NumberHi, const char *TagLo, unsigned NumberLo) const; - /// NewAbbreviation - Add the abbreviation to the Abbreviation vector. + /// AssignAbbrevNumber - Define a unique number for the abbreviation. /// - unsigned NewAbbreviation(DIEAbbrev *Abbrev); + void AssignAbbrevNumber(DIEAbbrev *Abbrev); /// NewString - Add a string to the constant pool and returns a label. /// @@ -885,34 +886,6 @@ //===----------------------------------------------------------------------===// -/// operator== - Used by UniqueVector to locate entry. -/// -bool DIEAbbrev::operator==(const DIEAbbrev &DA) const { - if (Tag != DA.Tag) return false; - if (ChildrenFlag != DA.ChildrenFlag) return false; - if (Data.size() != DA.Data.size()) return false; - - for (unsigned i = 0, N = Data.size(); i < N; ++i) { - if (Data[i] != DA.Data[i]) return false; - } - - return true; -} - -/// operator< - Used by UniqueVector to locate entry. -/// -bool DIEAbbrev::operator<(const DIEAbbrev &DA) const { - if (Tag != DA.Tag) return Tag < DA.Tag; - if (ChildrenFlag != DA.ChildrenFlag) return ChildrenFlag < DA.ChildrenFlag; - if (Data.size() != DA.Data.size()) return Data.size() < DA.Data.size(); - - for (unsigned i = 0, N = Data.size(); i < N; ++i) { - if (Data[i] != DA.Data[i]) return Data[i] < DA.Data[i]; - } - - return false; -} - /// Emit - Print the abbreviation using the specified Dwarf writer. /// void DIEAbbrev::Emit(const Dwarf &DW) const { @@ -1200,8 +1173,7 @@ //===----------------------------------------------------------------------===// DIE::DIE(unsigned Tag) -: Abbrev(new DIEAbbrev(Tag, DW_CHILDREN_no)) -, AbbrevID(0) +: Abbrev(Tag, DW_CHILDREN_no) , Offset(0) , Size(0) , Children() @@ -1209,8 +1181,6 @@ {} DIE::~DIE() { - if (Abbrev) delete Abbrev; - for (unsigned i = 0, N = Children.size(); i < N; ++i) { delete Children[i]; } @@ -1225,7 +1195,7 @@ void DIE::AddSiblingOffset() { DIEInteger *DI = new DIEInteger(0); Values.insert(Values.begin(), DI); - Abbrev->AddFirstAttribute(DW_AT_sibling, DW_FORM_ref4); + Abbrev.AddFirstAttribute(DW_AT_sibling, DW_FORM_ref4); } /// AddUInt - Add an unsigned integer attribute data and value. @@ -1234,7 +1204,7 @@ DIEInteger *DI = new DIEInteger(Integer); Values.push_back(DI); if (!Form) Form = DI->BestForm(false); - Abbrev->AddAttribute(Attribute, Form); + Abbrev.AddAttribute(Attribute, Form); } /// AddSInt - Add an signed integer attribute data and value. @@ -1243,7 +1213,7 @@ DIEInteger *DI = new DIEInteger(Integer); Values.push_back(DI); if (!Form) Form = DI->BestForm(true); - Abbrev->AddAttribute(Attribute, Form); + Abbrev.AddAttribute(Attribute, Form); } /// AddString - Add a std::string attribute data and value. @@ -1251,7 +1221,7 @@ void DIE::AddString(unsigned Attribute, unsigned Form, const std::string &String) { Values.push_back(new DIEString(String)); - Abbrev->AddAttribute(Attribute, Form); + Abbrev.AddAttribute(Attribute, Form); } /// AddLabel - Add a Dwarf label attribute data and value. @@ -1259,7 +1229,7 @@ void DIE::AddLabel(unsigned Attribute, unsigned Form, const DWLabel &Label) { Values.push_back(new DIEDwarfLabel(Label)); - Abbrev->AddAttribute(Attribute, Form); + Abbrev.AddAttribute(Attribute, Form); } /// AddObjectLabel - Add an non-Dwarf label attribute data and value. @@ -1267,7 +1237,7 @@ void DIE::AddObjectLabel(unsigned Attribute, unsigned Form, const std::string &Label) { Values.push_back(new DIEObjectLabel(Label)); - Abbrev->AddAttribute(Attribute, Form); + Abbrev.AddAttribute(Attribute, Form); } /// AddDelta - Add a label delta attribute data and value. @@ -1275,14 +1245,14 @@ void DIE::AddDelta(unsigned Attribute, unsigned Form, const DWLabel &Hi, const DWLabel &Lo) { Values.push_back(new DIEDelta(Hi, Lo)); - Abbrev->AddAttribute(Attribute, Form); + Abbrev.AddAttribute(Attribute, Form); } /// AddDIEntry - Add a DIE attribute data and value. /// void DIE::AddDIEntry(unsigned Attribute, unsigned Form, DIE *Entry) { Values.push_back(new DIEntry(Entry)); - Abbrev->AddAttribute(Attribute, Form); + Abbrev.AddAttribute(Attribute, Form); } /// AddBlock - Add block data. @@ -1291,22 +1261,19 @@ assert(Block->Size && "Block size has not been computed"); Values.push_back(Block); if (!Form) Form = Block->BestForm(); - Abbrev->AddAttribute(Attribute, Form); + Abbrev.AddAttribute(Attribute, Form); } /// Complete - Indicate that all attributes have been added and ready to get an /// abbreviation ID. void DIE::Complete(Dwarf &DW) { - AbbrevID = DW.NewAbbreviation(Abbrev); - delete Abbrev; - Abbrev = NULL; + DW.AssignAbbrevNumber(&Abbrev); } /// AddChild - Add a child to the DIE. /// void DIE::AddChild(DIE *Child) { - assert(Abbrev && "Adding children without an abbreviation"); - Abbrev->setChildrenFlag(DW_CHILDREN_yes); + Abbrev.setChildrenFlag(DW_CHILDREN_yes); Children.push_back(Child); } @@ -1560,10 +1527,26 @@ } } -/// NewAbbreviation - Add the abbreviation to the Abbreviation vector. +/// AssignAbbrevNumber - Define a unique number for the abbreviation. /// -unsigned Dwarf::NewAbbreviation(DIEAbbrev *Abbrev) { - return Abbreviations.insert(*Abbrev); +void Dwarf::AssignAbbrevNumber(DIEAbbrev *Abbrev) { + // Profile the node so that we can make it unique. + FoldingSetNodeID ID; + Abbrev->Profile(ID); + + // Check the set for priors. + DIEAbbrev *InSet = AbbreviationsSet.GetOrInsertNode(Abbrev); + + // If it's newly added. + if (InSet == Abbrev) { + // Add to abbreviation list. + Abbreviations.push_back(Abbrev); + // Assign the vector position + 1 as its number. + Abbrev->setNumber(Abbreviations.size()); + } else { + // Assign existing abbreviation number. + Abbrev->setNumber(InSet->getNumber()); + } } /// NewString - Add a string to the constant pool and returns a label. @@ -2229,21 +2212,21 @@ /// void Dwarf::EmitDIE(DIE *Die) const { // Get the abbreviation for this DIE. - unsigned AbbrevID = Die->getAbbrevID(); - const DIEAbbrev &Abbrev = Abbreviations[AbbrevID]; + unsigned AbbrevNumber = Die->getAbbrevNumber(); + const DIEAbbrev *Abbrev = Abbreviations[AbbrevNumber - 1]; O << "\n"; // Emit the code (index) for the abbreviation. - EmitULEB128Bytes(AbbrevID); + EmitULEB128Bytes(AbbrevNumber); EOL(std::string("Abbrev [" + - utostr(AbbrevID) + + utostr(AbbrevNumber) + "] 0x" + utohexstr(Die->getOffset()) + ":0x" + utohexstr(Die->getSize()) + " " + - TagString(Abbrev.getTag()))); + TagString(Abbrev->getTag()))); const std::vector &Values = Die->getValues(); - const std::vector &AbbrevData = Abbrev.getData(); + const std::vector &AbbrevData = Abbrev->getData(); // Emit the DIE attribute values. for (unsigned i = 0, N = Values.size(); i < N; ++i) { @@ -2267,7 +2250,7 @@ } // Emit the DIE children if any. - if (Abbrev.getChildrenFlag() == DW_CHILDREN_yes) { + if (Abbrev->getChildrenFlag() == DW_CHILDREN_yes) { const std::vector &Children = Die->getChildren(); for (unsigned j = 0, M = Children.size(); j < M; ++j) { @@ -2291,17 +2274,17 @@ Die->Complete(*this); // Get the abbreviation for this DIE. - unsigned AbbrevID = Die->getAbbrevID(); - const DIEAbbrev &Abbrev = Abbreviations[AbbrevID]; + unsigned AbbrevNumber = Die->getAbbrevNumber(); + const DIEAbbrev *Abbrev = Abbreviations[AbbrevNumber - 1]; // Set DIE offset Die->setOffset(Offset); // Start the size with the size of abbreviation code. - Offset += SizeULEB128(AbbrevID); + Offset += SizeULEB128(AbbrevNumber); const std::vector &Values = Die->getValues(); - const std::vector &AbbrevData = Abbrev.getData(); + const std::vector &AbbrevData = Abbrev->getData(); // Emit the DIE attribute values. for (unsigned i = 0, N = Values.size(); i < N; ++i) { @@ -2311,7 +2294,7 @@ // Emit the DIE children if any. if (!Children.empty()) { - assert(Abbrev.getChildrenFlag() == DW_CHILDREN_yes && + assert(Abbrev->getChildrenFlag() == DW_CHILDREN_yes && "Children flag not set"); for (unsigned j = 0, M = Children.size(); j < M; ++j) { @@ -2468,16 +2451,15 @@ EmitLabel("abbrev_begin", 0); // For each abbrevation. - for (unsigned AbbrevID = 1, NAID = Abbreviations.size(); - AbbrevID <= NAID; ++AbbrevID) { + for (unsigned i = 0, N = Abbreviations.size(); i < N; ++i) { // Get abbreviation data - const DIEAbbrev &Abbrev = Abbreviations[AbbrevID]; + const DIEAbbrev *Abbrev = Abbreviations[i]; // Emit the abbrevations code (base 1 index.) - EmitULEB128Bytes(AbbrevID); EOL("Abbreviation Code"); + EmitULEB128Bytes(Abbrev->getNumber()); EOL("Abbreviation Code"); // Emit the abbreviations data. - Abbrev.Emit(*this); + Abbrev->Emit(*this); O << "\n"; } @@ -2880,7 +2862,7 @@ } //===----------------------------------------------------------------------===// -// Dwarf implemenation. +/// Dwarf implemenation. // Dwarf::Dwarf(std::ostream &OS, AsmPrinter *A, @@ -2897,13 +2879,15 @@ , shouldEmit(false) , SubprogramCount(0) , CompileUnits() +, AbbreviationsSet() , Abbreviations() , StringPool() , DescToUnitMap() , DescToDieMap() , SectionMap() , SectionSourceLines() -{} +{ +} Dwarf::~Dwarf() { for (unsigned i = 0, N = CompileUnits.size(); i < N; ++i) { delete CompileUnits[i]; From rspencer at reidspencer.com Mon Oct 30 11:49:33 2006 From: rspencer at reidspencer.com (Reid Spencer) Date: Mon, 30 Oct 2006 09:49:33 -0800 Subject: [llvm-commits] Test - please ignore Message-ID: <1162230573.13530.8.camel@bashful.x10sys.com> Test - please ignore. Reid. From dpatel at apple.com Mon Oct 30 13:26:08 2006 From: dpatel at apple.com (Devang Patel) Date: Mon, 30 Oct 2006 13:26:08 -0600 Subject: [llvm-commits] CVS: llvm/lib/VMCore/PassManagerT.h Message-ID: <200610301926.k9UJQ8o8006463@zion.cs.uiuc.edu> 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... From sabre at nondot.org Mon Oct 30 16:27:43 2006 From: sabre at nondot.org (Chris Lattner) Date: Mon, 30 Oct 2006 16:27:43 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86InstrInfo.cpp Message-ID: <200610302227.k9UMRhJV001154@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86InstrInfo.cpp updated: 1.70 -> 1.71 --- Log message: fix wonky indentation --- Diffs of the changes: (+6 -6) X86InstrInfo.cpp | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) Index: llvm/lib/Target/X86/X86InstrInfo.cpp diff -u llvm/lib/Target/X86/X86InstrInfo.cpp:1.70 llvm/lib/Target/X86/X86InstrInfo.cpp:1.71 --- llvm/lib/Target/X86/X86InstrInfo.cpp:1.70 Sat Oct 28 12:29:57 2006 +++ llvm/lib/Target/X86/X86InstrInfo.cpp Mon Oct 30 16:27:23 2006 @@ -359,14 +359,14 @@ isTerminatorInstr((--I)->getOpcode())) return true; - // If the block ends with X86::JMP and a COND_BRANCH, handle it. + // If the block ends with X86::JMP and a conditional branch, handle it. X86::CondCode BranchCode = GetCondFromBranchOpc(SecondLastInst->getOpcode()); if (BranchCode != X86::COND_INVALID && LastInst->getOpcode() == X86::JMP) { - TBB = SecondLastInst->getOperand(0).getMachineBasicBlock(); - Cond.push_back(MachineOperand::CreateImm(BranchCode)); - FBB = LastInst->getOperand(0).getMachineBasicBlock(); - return false; - } + TBB = SecondLastInst->getOperand(0).getMachineBasicBlock(); + Cond.push_back(MachineOperand::CreateImm(BranchCode)); + FBB = LastInst->getOperand(0).getMachineBasicBlock(); + return false; + } // Otherwise, can't handle this. return true; From sabre at nondot.org Mon Oct 30 16:56:43 2006 From: sabre at nondot.org (Chris Lattner) Date: Mon, 30 Oct 2006 14:56:43 -0800 (PST) Subject: [llvm-commits] fix for PR972 applied Message-ID: I applied Anton's patch: http://llvm.org/bugs/attachment.cgi?id=427&action=view -Chris -- http://nondot.org/sabre/ http://llvm.org/ From reid at x10sys.com Mon Oct 30 16:32:49 2006 From: reid at x10sys.com (Reid Spencer) Date: Mon, 30 Oct 2006 16:32:49 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetAsmInfo.h Message-ID: <200610302232.k9UMWnF0001267@zion.cs.uiuc.edu> 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.h Mon 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; } From reid at x10sys.com Mon Oct 30 16:32:49 2006 From: reid at x10sys.com (Reid Spencer) Date: Mon, 30 Oct 2006 16:32:49 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp X86AsmPrinter.cpp X86AsmPrinter.h X86ISelLowering.cpp X86InstrInfo.td X86TargetAsmInfo.cpp Message-ID: <200610302232.k9UMWn9L001282@zion.cs.uiuc.edu> 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.cpp Mon 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(&getAnalysis()); @@ -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.33 Mon 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.addRequired(); } 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 : I<0, Pseudo, (ops i32imm:$id), - "\nLdebug_loc${id:debug}:", - [(dwarf_label (i32 imm:$id))]>; +def DWARF_LABEL : I<0, Pseudo, (ops i32imm:$id), + "\n${:private}debug_loc${id:debug}:", + [(dwarf_label (i32 imm:$id))]>; //===----------------------------------------------------------------------===// // Non-Instruction Patterns Index: llvm/lib/Target/X86/X86TargetAsmInfo.cpp diff -u llvm/lib/Target/X86/X86TargetAsmInfo.cpp:1.5 llvm/lib/Target/X86/X86TargetAsmInfo.cpp:1.6 --- llvm/lib/Target/X86/X86TargetAsmInfo.cpp:1.5 Thu Oct 26 14:18:18 2006 +++ llvm/lib/Target/X86/X86TargetAsmInfo.cpp Mon Oct 30 16:32:30 2006 @@ -60,6 +60,30 @@ DwarfRangesSection = ".section __DWARF,__debug_ranges,regular,debug"; DwarfMacInfoSection = ".section __DWARF,__debug_macinfo,regular,debug"; break; + + case X86Subtarget::isELF: + // Set up DWARF directives + HasLEB128 = true; // Target asm supports leb128 directives (little-endian) + // 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. + PrivateGlobalPrefix = "."; // Prefix for private global symbols + DwarfRequiresFrameSection = false; + DwarfAbbrevSection = "\t.section\t.debug_abbrev,\"\", at progbits"; + DwarfInfoSection = "\t.section\t.debug_info,\"\", at progbits"; + DwarfLineSection = "\t.section\t.debug_line,\"\", at progbits"; + DwarfFrameSection = "\t.section\t.debug_frame,\"\", at progbits"; + DwarfPubNamesSection ="\t.section\t.debug_pubnames,\"\", at progbits"; + DwarfPubTypesSection ="\t.section\t.debug_pubtypes,\"\", at progbits"; + DwarfStrSection = "\t.section\t.debug_str,\"\", at progbits"; + DwarfLocSection = "\t.section\t.debug_loc,\"\", at progbits"; + DwarfARangesSection = "\t.section\t.debug_aranges,\"\", at progbits"; + DwarfRangesSection = "\t.section\t.debug_ranges,\"\", at progbits"; + DwarfMacInfoSection = "\t.section\t.debug_macinfo,\"\", at progbits"; + break; + case X86Subtarget::isCygwin: GlobalPrefix = "_"; COMMDirectiveTakesAlignment = false; From reid at x10sys.com Mon Oct 30 16:32:46 2006 From: reid at x10sys.com (Reid Spencer) Date: Mon, 30 Oct 2006 16:32:46 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp Message-ID: <200610302232.k9UMWkWT001257@zion.cs.uiuc.edu> 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.cpp Mon 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); From reid at x10sys.com Mon Oct 30 16:32:47 2006 From: reid at x10sys.com (Reid Spencer) Date: Mon, 30 Oct 2006 16:32:47 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/TargetAsmInfo.cpp Message-ID: <200610302232.k9UMWllI001262@zion.cs.uiuc.edu> 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"), From reid at x10sys.com Mon Oct 30 16:47:04 2006 From: reid at x10sys.com (Reid Spencer) Date: Mon, 30 Oct 2006 16:47:04 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetAsmInfo.h Message-ID: <200610302247.k9UMl4rC001561@zion.cs.uiuc.edu> 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.h Mon 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. /// From reid at x10sys.com Mon Oct 30 17:34:46 2006 From: reid at x10sys.com (Reid Spencer) Date: Mon, 30 Oct 2006 17:34:46 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp Message-ID: <200610302334.k9UNYkrh002531@zion.cs.uiuc.edu> 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.cpp Mon 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. From sabre at nondot.org Mon Oct 30 17:02:39 2006 From: sabre at nondot.org (Chris Lattner) Date: Mon, 30 Oct 2006 17:02:39 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Message-ID: <200610302302.k9UN2dHI001970@zion.cs.uiuc.edu> 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; } From evan.cheng at apple.com Mon Oct 30 19:27:09 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 30 Oct 2006 19:27:09 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86AsmPrinter.cpp Message-ID: <200610310127.k9V1R9TY004318@zion.cs.uiuc.edu> 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\", at progbits\n"); + ",\"aw\", at 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\", at progbits"; + } + + SwitchToDataSection(SectionName.c_str()); + } else { + SwitchToDataSection(TAI->getDataSection(), I); + } + break; } default: From rspencer at reidspencer.com Mon Oct 30 19:44:59 2006 From: rspencer at reidspencer.com (Reid Spencer) Date: Mon, 30 Oct 2006 17:44:59 -0800 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86AsmPrinter.cpp In-Reply-To: <200610310127.k9V1R9TY004318@zion.cs.uiuc.edu> References: <200610310127.k9V1R9TY004318@zion.cs.uiuc.edu> Message-ID: <1162259099.13530.66.camel@bashful.x10sys.com> 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\", at progbits\n"); > + ",\"aw\", at 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\", at progbits"; > + } > + > + SwitchToDataSection(SectionName.c_str()); > + } else { > + SwitchToDataSection(TAI->getDataSection(), I); > + } > + > break; > } > default: > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From reid at x10sys.com Mon Oct 30 19:46:10 2006 From: reid at x10sys.com (Reid Spencer) Date: Mon, 30 Oct 2006 19:46:10 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86AsmPrinter.cpp Message-ID: <200610310146.k9V1kABE004634@zion.cs.uiuc.edu> 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\", at progbits"; } - SwitchToDataSection(SectionName.c_str()); + SwitchToDataSection(SectionName.c_str(), I); } else { SwitchToDataSection(TAI->getDataSection(), I); } From evan.cheng at apple.com Mon Oct 30 20:31:15 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 30 Oct 2006 20:31:15 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Message-ID: <200610310231.k9V2VF9b005347@zion.cs.uiuc.edu> 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 { From asl at math.spbu.ru Tue Oct 31 00:11:20 2006 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Tue, 31 Oct 2006 00:11:20 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/AsmPrinter.h Message-ID: <200610310611.k9V6BKpY009008@zion.cs.uiuc.edu> 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 From asl at math.spbu.ru Tue Oct 31 00:11:21 2006 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Tue, 31 Oct 2006 00:11:21 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86AsmPrinter.cpp Message-ID: <200610310611.k9V6BLY8009013@zion.cs.uiuc.edu> 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\", at progbits"; } - SwitchToDataSection(SectionName.c_str(), I); + SwitchToDataSection(SectionName.c_str()); } else { SwitchToDataSection(TAI->getDataSection(), I); } From sabre at nondot.org Tue Oct 31 00:15:28 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 31 Oct 2006 00:15:28 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/C++Frontend/2006-10-30-ClassBitfield.cpp Message-ID: <200610310615.k9V6FSZl009131@zion.cs.uiuc.edu> 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; } From clattner at apple.com Tue Oct 31 00:16:20 2006 From: clattner at apple.com (Chris Lattner) Date: Mon, 30 Oct 2006 22:16:20 -0800 Subject: [llvm-commits] llvm-gcc patch for PR954 Message-ID: I applied this patch. Testcase here: Regression/C++Frontend/2006-10-30-ClassBitfield.cpp -Chris Index: llvm-convert.cpp =================================================================== --- llvm-convert.cpp (revision 119298) +++ llvm-convert.cpp (working copy) @@ -3874,7 +3874,7 @@ // the size of the field. To get the pointer close enough, add some // number of alignment units to the pointer. unsigned ByteAlignment = TD.getTypeAlignment(FieldTy); - assert(ByteAlignment*8 < LLVMValueBitSize && "Unknown overlap case!"); + assert(ByteAlignment*8 <= LLVMValueBitSize && "Unknown overlap case!"); unsigned NumAlignmentUnits = BitStart/(ByteAlignment*8); assert(NumAlignmentUnits && "Not adjusting pointer?"); From sabre at nondot.org Tue Oct 31 00:25:27 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 31 Oct 2006 00:25:27 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/CFrontend/2006-10-30-ArrayCrash.c Message-ID: <200610310625.k9V6PRTu009506@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CFrontend: 2006-10-30-ArrayCrash.c added (r1.1) --- Log message: new testcase --- Diffs of the changes: (+16 -0) 2006-10-30-ArrayCrash.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+) Index: llvm/test/Regression/CFrontend/2006-10-30-ArrayCrash.c diff -c /dev/null llvm/test/Regression/CFrontend/2006-10-30-ArrayCrash.c:1.1 *** /dev/null Tue Oct 31 00:25:23 2006 --- llvm/test/Regression/CFrontend/2006-10-30-ArrayCrash.c Tue Oct 31 00:25:13 2006 *************** *** 0 **** --- 1,16 ---- + // RUN: %llvmgcc -O3 -S -o - %s + + extern void foo(); + + struct S { + short f1[3]; + unsigned int f2 : 1; + }; + + void bar() + { + struct S *A; + + if (A->f2) + foo(); + } From sabre at nondot.org Tue Oct 31 00:26:24 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 31 Oct 2006 00:26:24 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/CFrontend/2006-10-30-ArrayCrash.c Message-ID: <200610310626.k9V6QO5B009585@zion.cs.uiuc.edu> 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(); From sabre at nondot.org Tue Oct 31 01:33:27 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 31 Oct 2006 01:33:27 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200610310733.k9V7XRpl010924@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.308 -> 1.309 --- Log message: Turn an assert into an error message. This is commonly triggered when we don't support a specific constraint yet. When this happens, print the unsupported constraint. --- Diffs of the changes: (+5 -1) SelectionDAGISel.cpp | 6 +++++- 1 files changed, 5 insertions(+), 1 deletion(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.308 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.309 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.308 Mon Oct 30 02:00:44 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Oct 31 01:33:13 2006 @@ -2417,7 +2417,11 @@ GetRegistersForValue(ConstraintCode, ConstraintVTs[i], true, UsesInputRegister, OutputRegs, InputRegs); - assert(!Regs.Regs.empty() && "Couldn't allocate output reg!"); + if (Regs.Regs.empty()) { + std::cerr << "Couldn't allocate output reg for contraint '" + << ConstraintCode << "'!\n"; + exit(1); + } if (!Constraints[i].isIndirectOutput) { assert(RetValRegs.Regs.empty() && From asl at math.spbu.ru Tue Oct 31 02:31:41 2006 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Tue, 31 Oct 2006 02:31:41 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Message-ID: <200610310831.k9V8VfiK020435@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCAsmPrinter.cpp updated: 1.204 -> 1.205 --- Log message: 1. Clean up code due to changes in SwitchTo*Section(2) 2. Added partial debug support for mingw\cygwin targets (the same as Linux\ELF). Please note, that currently mingw\cygwin uses 'stabs' format for storing debug info by default, thus many (runtime) libraries has this information included. These formats shouldn't be mixed in one binary ('stabs' & 'DWARF'), otherwise binutils tools will be confused. --- Diffs of the changes: (+5 -5) PPCAsmPrinter.cpp | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.204 llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.205 --- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.204 Sat Oct 28 00:56:51 2006 +++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Tue Oct 31 02:31:24 2006 @@ -577,7 +577,7 @@ for (std::set::iterator i = FnStubs.begin(), e = FnStubs.end(); i != e; ++i) { SwitchToTextSection(".section __TEXT,__picsymbolstub1,symbol_stubs," - "pure_instructions,32", 0); + "pure_instructions,32"); EmitAlignment(4); O << "L" << *i << "$stub:\n"; O << "\t.indirect_symbol " << *i << "\n"; @@ -593,7 +593,7 @@ O << "\tlwzu r12,lo16(L" << *i << "$lazy_ptr-L0$" << *i << ")(r11)\n"; O << "\tmtctr r12\n"; O << "\tbctr\n"; - SwitchToDataSection(".lazy_symbol_pointer", 0); + SwitchToDataSection(".lazy_symbol_pointer"); O << "L" << *i << "$lazy_ptr:\n"; O << "\t.indirect_symbol " << *i << "\n"; if (isPPC64) @@ -605,7 +605,7 @@ for (std::set::iterator i = FnStubs.begin(), e = FnStubs.end(); i != e; ++i) { SwitchToTextSection(".section __TEXT,__symbol_stub1,symbol_stubs," - "pure_instructions,16", 0); + "pure_instructions,16"); EmitAlignment(4); O << "L" << *i << "$stub:\n"; O << "\t.indirect_symbol " << *i << "\n"; @@ -616,7 +616,7 @@ O << "\tlwzu r12,lo16(L" << *i << "$lazy_ptr)(r11)\n"; O << "\tmtctr r12\n"; O << "\tbctr\n"; - SwitchToDataSection(".lazy_symbol_pointer", 0); + SwitchToDataSection(".lazy_symbol_pointer"); O << "L" << *i << "$lazy_ptr:\n"; O << "\t.indirect_symbol " << *i << "\n"; if (isPPC64) @@ -630,7 +630,7 @@ // Output stubs for external and common global variables. if (GVStubs.begin() != GVStubs.end()) { - SwitchToDataSection(".non_lazy_symbol_pointer", 0); + SwitchToDataSection(".non_lazy_symbol_pointer"); for (std::set::iterator I = GVStubs.begin(), E = GVStubs.end(); I != E; ++I) { O << "L" << *I << "$non_lazy_ptr:\n"; From asl at math.spbu.ru Tue Oct 31 02:31:41 2006 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Tue, 31 Oct 2006 02:31:41 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp X86AsmPrinter.cpp X86AsmPrinter.h X86ISelLowering.cpp X86IntelAsmPrinter.cpp X86TargetAsmInfo.cpp Message-ID: <200610310831.k9V8Vfaj020451@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ATTAsmPrinter.cpp updated: 1.70 -> 1.71 X86AsmPrinter.cpp updated: 1.211 -> 1.212 X86AsmPrinter.h updated: 1.34 -> 1.35 X86ISelLowering.cpp updated: 1.283 -> 1.284 X86IntelAsmPrinter.cpp updated: 1.62 -> 1.63 X86TargetAsmInfo.cpp updated: 1.6 -> 1.7 --- Log message: 1. Clean up code due to changes in SwitchTo*Section(2) 2. Added partial debug support for mingw\cygwin targets (the same as Linux\ELF). Please note, that currently mingw\cygwin uses 'stabs' format for storing debug info by default, thus many (runtime) libraries has this information included. These formats shouldn't be mixed in one binary ('stabs' & 'DWARF'), otherwise binutils tools will be confused. --- Diffs of the changes: (+43 -15) X86ATTAsmPrinter.cpp | 12 +++++++++--- X86AsmPrinter.cpp | 12 ++++++------ X86AsmPrinter.h | 4 +++- X86ISelLowering.cpp | 4 +++- X86IntelAsmPrinter.cpp | 8 ++++---- X86TargetAsmInfo.cpp | 18 ++++++++++++++++++ 6 files changed, 43 insertions(+), 15 deletions(-) Index: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.70 llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.71 --- llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.70 Mon Oct 30 16:32:30 2006 +++ llvm/lib/Target/X86/X86ATTAsmPrinter.cpp Tue Oct 31 02:31:24 2006 @@ -52,7 +52,9 @@ /// method to print assembly for each instruction. /// bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) { - if (Subtarget->isTargetDarwin() || Subtarget->isTargetELF()) { + if (Subtarget->isTargetDarwin() || + Subtarget->isTargetELF() || + Subtarget->isTargetCygwin()) { // Let PassManager know we need debug information and relay // the MachineDebugInfo address on to DwarfWriter. DW.SetDebugInfo(&getAnalysis()); @@ -111,7 +113,9 @@ F->getLinkage() == Function::WeakLinkage)) O << "_llvm$workaround$fake$stub_" << CurrentFnName << ":\n"; - if (Subtarget->isTargetDarwin() || Subtarget->isTargetELF()) { + if (Subtarget->isTargetDarwin() || + Subtarget->isTargetELF() || + Subtarget->isTargetCygwin()) { // Emit pre-function debug information. DW.BeginFunction(&MF); } @@ -141,7 +145,9 @@ if (TAI->hasDotTypeDotSizeDirective()) O << "\t.size " << CurrentFnName << ", .-" << CurrentFnName << "\n"; - if (Subtarget->isTargetDarwin() || Subtarget->isTargetELF()) { + if (Subtarget->isTargetDarwin() || + Subtarget->isTargetELF() || + Subtarget->isTargetCygwin()) { // Emit post-function debug information. DW.EndFunction(); } Index: llvm/lib/Target/X86/X86AsmPrinter.cpp diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.211 llvm/lib/Target/X86/X86AsmPrinter.cpp:1.212 --- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.211 Tue Oct 31 00:11:06 2006 +++ llvm/lib/Target/X86/X86AsmPrinter.cpp Tue Oct 31 02:31:24 2006 @@ -116,7 +116,7 @@ // Emit initial debug information. DW.BeginModule(&M); - } else if (Subtarget->isTargetELF()) { + } else if (Subtarget->isTargetELF() || Subtarget->isTargetCygwin()) { // Emit initial debug information. DW.BeginModule(&M); } @@ -253,7 +253,7 @@ // Output linker support code for dllexported globals if (DLLExportedGVs.begin() != DLLExportedGVs.end()) { - SwitchToDataSection(".section .drectve", 0); + SwitchToDataSection(".section .drectve"); } for (std::set::iterator i = DLLExportedGVs.begin(), @@ -263,7 +263,7 @@ } if (DLLExportedFns.begin() != DLLExportedFns.end()) { - SwitchToDataSection(".section .drectve", 0); + SwitchToDataSection(".section .drectve"); } for (std::set::iterator i = DLLExportedFns.begin(), @@ -273,7 +273,7 @@ } if (Subtarget->isTargetDarwin()) { - SwitchToDataSection("", 0); + SwitchToDataSection(""); // Output stubs for dynamically-linked functions unsigned j = 1; @@ -291,7 +291,7 @@ // Output stubs for external and common global variables. if (GVStubs.begin() != GVStubs.end()) SwitchToDataSection( - ".section __IMPORT,__pointers,non_lazy_symbol_pointers", 0); + ".section __IMPORT,__pointers,non_lazy_symbol_pointers"); for (std::set::iterator i = GVStubs.begin(), e = GVStubs.end(); i != e; ++i) { O << "L" << *i << "$non_lazy_ptr:\n"; @@ -308,7 +308,7 @@ // 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()) { + } else if (Subtarget->isTargetELF() || Subtarget->isTargetCygwin()) { // Emit final debug information. DW.EndModule(); } Index: llvm/lib/Target/X86/X86AsmPrinter.h diff -u llvm/lib/Target/X86/X86AsmPrinter.h:1.34 llvm/lib/Target/X86/X86AsmPrinter.h:1.35 --- llvm/lib/Target/X86/X86AsmPrinter.h:1.34 Mon Oct 30 16:32:30 2006 +++ llvm/lib/Target/X86/X86AsmPrinter.h Tue Oct 31 02:31:24 2006 @@ -67,7 +67,9 @@ void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); - if (Subtarget->isTargetDarwin() || Subtarget->isTargetELF()) { + if (Subtarget->isTargetDarwin() || + Subtarget->isTargetELF() || + Subtarget->isTargetCygwin()) { AU.addRequired(); } MachineFunctionPass::getAnalysisUsage(AU); Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.283 llvm/lib/Target/X86/X86ISelLowering.cpp:1.284 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.283 Mon Oct 30 16:32:30 2006 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Tue Oct 31 02:31:24 2006 @@ -219,7 +219,9 @@ setOperationAction(ISD::LOCATION, MVT::Other, Expand); setOperationAction(ISD::DEBUG_LOC, MVT::Other, Expand); // FIXME - use subtarget debug flags - if (!Subtarget->isTargetDarwin() && !Subtarget->isTargetELF()) + if (!Subtarget->isTargetDarwin() && + !Subtarget->isTargetELF() && + !Subtarget->isTargetCygwin()) setOperationAction(ISD::DEBUG_LABEL, MVT::Other, Expand); // VASTART needs to be custom lowered to use the VarArgsFrameIndex Index: llvm/lib/Target/X86/X86IntelAsmPrinter.cpp diff -u llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.62 llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.63 --- llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.62 Tue Oct 24 15:32:14 2006 +++ llvm/lib/Target/X86/X86IntelAsmPrinter.cpp Tue Oct 31 02:31:24 2006 @@ -393,14 +393,14 @@ switch (I->getLinkage()) { case GlobalValue::LinkOnceLinkage: case GlobalValue::WeakLinkage: - SwitchToDataSection("", 0); + SwitchToDataSection(""); O << name << "?\tsegment common 'COMMON'\n"; bCustomSegment = true; // FIXME: the default alignment is 16 bytes, but 1, 2, 4, and 256 // are also available. break; case GlobalValue::AppendingLinkage: - SwitchToDataSection("", 0); + SwitchToDataSection(""); O << name << "?\tsegment public 'DATA'\n"; bCustomSegment = true; // FIXME: the default alignment is 16 bytes, but 1, 2, 4, and 256 @@ -434,7 +434,7 @@ // Output linker support code for dllexported globals if ((DLLExportedGVs.begin() != DLLExportedGVs.end()) || (DLLExportedFns.begin() != DLLExportedFns.end())) { - SwitchToDataSection("", 0); + SwitchToDataSection(""); O << "; WARNING: The following code is valid only with MASM v8.x and (possible) higher\n" << "; This version of MASM is usually shipped with Microsoft Visual Studio 2005\n" << "; or (possible) further versions. Unfortunately, there is no way to support\n" @@ -461,7 +461,7 @@ // Bypass X86SharedAsmPrinter::doFinalization(). AsmPrinter::doFinalization(M); - SwitchToDataSection("", 0); + SwitchToDataSection(""); O << "\tend\n"; return false; // success } Index: llvm/lib/Target/X86/X86TargetAsmInfo.cpp diff -u llvm/lib/Target/X86/X86TargetAsmInfo.cpp:1.6 llvm/lib/Target/X86/X86TargetAsmInfo.cpp:1.7 --- llvm/lib/Target/X86/X86TargetAsmInfo.cpp:1.6 Mon Oct 30 16:32:30 2006 +++ llvm/lib/Target/X86/X86TargetAsmInfo.cpp Tue Oct 31 02:31:24 2006 @@ -90,6 +90,24 @@ HasDotTypeDotSizeDirective = false; StaticCtorsSection = "\t.section .ctors,\"aw\""; StaticDtorsSection = "\t.section .dtors,\"aw\""; + + // Set up DWARF directives + HasLEB128 = true; // Target asm supports leb128 directives (little-endian) + PrivateGlobalPrefix = "L"; // Prefix for private global symbols + DwarfRequiresFrameSection = false; + DwarfAbbrevSection = "\t.section\t.debug_abbrev,\"dr\""; + DwarfInfoSection = "\t.section\t.debug_info,\"dr\""; + DwarfLineSection = "\t.section\t.debug_line,\"dr\""; + DwarfFrameSection = "\t.section\t.debug_frame,\"dr\""; + DwarfPubNamesSection ="\t.section\t.debug_pubnames,\"dr\""; + DwarfPubTypesSection ="\t.section\t.debug_pubtypes,\"dr\""; + DwarfStrSection = "\t.section\t.debug_str,\"dr\""; + DwarfLocSection = "\t.section\t.debug_loc,\"dr\""; + DwarfARangesSection = "\t.section\t.debug_aranges,\"dr\""; + DwarfRangesSection = "\t.section\t.debug_ranges,\"dr\""; + DwarfMacInfoSection = "\t.section\t.debug_macinfo,\"dr\""; + break; + break; case X86Subtarget::isWindows: GlobalPrefix = "_"; From asl at math.spbu.ru Tue Oct 31 02:31:42 2006 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Tue, 31 Oct 2006 02:31:42 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp DwarfWriter.cpp Message-ID: <200610310831.k9V8Vgp1020458@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: AsmPrinter.cpp updated: 1.114 -> 1.115 DwarfWriter.cpp updated: 1.89 -> 1.90 --- Log message: 1. Clean up code due to changes in SwitchTo*Section(2) 2. Added partial debug support for mingw\cygwin targets (the same as Linux\ELF). Please note, that currently mingw\cygwin uses 'stabs' format for storing debug info by default, thus many (runtime) libraries has this information included. These formats shouldn't be mixed in one binary ('stabs' & 'DWARF'), otherwise binutils tools will be confused. --- Diffs of the changes: (+32 -32) AsmPrinter.cpp | 12 ++++++------ DwarfWriter.cpp | 52 ++++++++++++++++++++++++++-------------------------- 2 files changed, 32 insertions(+), 32 deletions(-) Index: llvm/lib/CodeGen/AsmPrinter.cpp diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.114 llvm/lib/CodeGen/AsmPrinter.cpp:1.115 --- llvm/lib/CodeGen/AsmPrinter.cpp:1.114 Sat Oct 28 13:10:06 2006 +++ llvm/lib/CodeGen/AsmPrinter.cpp Tue Oct 31 02:31:23 2006 @@ -96,7 +96,7 @@ << "\n" << TAI->getCommentString() << " End of file scope inline assembly\n"; - SwitchToDataSection("", 0); // Reset back to no section. + SwitchToDataSection(""); // Reset back to no section. if (MachineDebugInfo *DebugInfo = getAnalysisToUpdate()) { DebugInfo->AnalyzeModule(M); @@ -160,7 +160,7 @@ std::vector > &CP) { if (CP.empty()) return; - SwitchToDataSection(Section, 0); + SwitchToDataSection(Section); EmitAlignment(Alignment); for (unsigned i = 0, e = CP.size(); i != e; ++i) { O << TAI->getPrivateGlobalPrefix() << "CPI" << getFunctionNumber() << '_' @@ -203,7 +203,7 @@ if (TM.getRelocationModel() == Reloc::PIC_) { TargetLowering *LoweringInfo = TM.getTargetLowering(); if (LoweringInfo && LoweringInfo->usesGlobalOffsetTable()) { - SwitchToDataSection(TAI->getJumpTableDataSection(), 0); + SwitchToDataSection(TAI->getJumpTableDataSection()); if (TD->getPointerSize() == 8 && !JTEntryDirective) JTEntryDirective = TAI->getData64bitsDirective(); } else { @@ -213,7 +213,7 @@ SwitchToTextSection(getSectionForFunction(*F).c_str(), F); } } else { - SwitchToDataSection(TAI->getJumpTableDataSection(), 0); + SwitchToDataSection(TAI->getJumpTableDataSection()); if (TD->getPointerSize() == 8) JTEntryDirective = TAI->getData64bitsDirective(); } @@ -279,14 +279,14 @@ } if (GV->getName() == "llvm.global_ctors" && GV->use_empty()) { - SwitchToDataSection(TAI->getStaticCtorsSection(), 0); + SwitchToDataSection(TAI->getStaticCtorsSection()); EmitAlignment(2, 0); EmitXXStructorList(GV->getInitializer()); return true; } if (GV->getName() == "llvm.global_dtors" && GV->use_empty()) { - SwitchToDataSection(TAI->getStaticDtorsSection(), 0); + SwitchToDataSection(TAI->getStaticDtorsSection()); EmitAlignment(2, 0); EmitXXStructorList(GV->getInitializer()); return true; Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.89 llvm/lib/CodeGen/DwarfWriter.cpp:1.90 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.89 Mon Oct 30 17:34:32 2006 +++ llvm/lib/CodeGen/DwarfWriter.cpp Tue Oct 31 02:31:24 2006 @@ -2176,30 +2176,30 @@ // Dwarf sections base addresses. if (TAI->getDwarfRequiresFrameSection()) { - Asm->SwitchToDataSection(TAI->getDwarfFrameSection(), 0); + Asm->SwitchToDataSection(TAI->getDwarfFrameSection()); EmitLabel("section_frame", 0); } - Asm->SwitchToDataSection(TAI->getDwarfInfoSection(), 0); + Asm->SwitchToDataSection(TAI->getDwarfInfoSection()); EmitLabel("section_info", 0); - Asm->SwitchToDataSection(TAI->getDwarfAbbrevSection(), 0); + Asm->SwitchToDataSection(TAI->getDwarfAbbrevSection()); EmitLabel("section_abbrev", 0); - Asm->SwitchToDataSection(TAI->getDwarfARangesSection(), 0); + Asm->SwitchToDataSection(TAI->getDwarfARangesSection()); EmitLabel("section_aranges", 0); - Asm->SwitchToDataSection(TAI->getDwarfMacInfoSection(), 0); + Asm->SwitchToDataSection(TAI->getDwarfMacInfoSection()); EmitLabel("section_macinfo", 0); - Asm->SwitchToDataSection(TAI->getDwarfLineSection(), 0); + Asm->SwitchToDataSection(TAI->getDwarfLineSection()); EmitLabel("section_line", 0); - Asm->SwitchToDataSection(TAI->getDwarfLocSection(), 0); + Asm->SwitchToDataSection(TAI->getDwarfLocSection()); EmitLabel("section_loc", 0); - Asm->SwitchToDataSection(TAI->getDwarfPubNamesSection(), 0); + Asm->SwitchToDataSection(TAI->getDwarfPubNamesSection()); EmitLabel("section_pubnames", 0); - Asm->SwitchToDataSection(TAI->getDwarfStrSection(), 0); + Asm->SwitchToDataSection(TAI->getDwarfStrSection()); EmitLabel("section_str", 0); - Asm->SwitchToDataSection(TAI->getDwarfRangesSection(), 0); + Asm->SwitchToDataSection(TAI->getDwarfRangesSection()); EmitLabel("section_ranges", 0); - Asm->SwitchToTextSection(TAI->getTextSection(), 0); + Asm->SwitchToTextSection(TAI->getTextSection()); EmitLabel("text_begin", 0); - Asm->SwitchToDataSection(TAI->getDataSection(), 0); + Asm->SwitchToDataSection(TAI->getDataSection()); EmitLabel("data_begin", 0); // Emit common frame information. @@ -2408,7 +2408,7 @@ /// void Dwarf::EmitDebugInfo() const { // Start debug info section. - Asm->SwitchToDataSection(TAI->getDwarfInfoSection(), 0); + Asm->SwitchToDataSection(TAI->getDwarfInfoSection()); // Process each compile unit. for (unsigned i = 0, N = CompileUnits.size(); i < N; ++i) { @@ -2444,7 +2444,7 @@ // Check to see if it is worth the effort. if (!Abbreviations.empty()) { // Start the debug abbrev section. - Asm->SwitchToDataSection(TAI->getDwarfAbbrevSection(), 0); + Asm->SwitchToDataSection(TAI->getDwarfAbbrevSection()); EmitLabel("abbrev_begin", 0); @@ -2477,7 +2477,7 @@ const int MaxLineDelta = 255 + MinLineDelta; // Start the dwarf line section. - Asm->SwitchToDataSection(TAI->getDwarfLineSection(), 0); + Asm->SwitchToDataSection(TAI->getDwarfLineSection()); // Construct the section header. @@ -2636,7 +2636,7 @@ TAI->getAddressSize() : -TAI->getAddressSize(); // Start the dwarf frame section. - Asm->SwitchToDataSection(TAI->getDwarfFrameSection(), 0); + Asm->SwitchToDataSection(TAI->getDwarfFrameSection()); EmitLabel("frame_common", 0); EmitDifference("frame_common_end", 0, @@ -2669,7 +2669,7 @@ return; // Start the dwarf frame section. - Asm->SwitchToDataSection(TAI->getDwarfFrameSection(), 0); + Asm->SwitchToDataSection(TAI->getDwarfFrameSection()); EmitDifference("frame_end", SubprogramCount, "frame_begin", SubprogramCount); @@ -2699,7 +2699,7 @@ /// void Dwarf::EmitDebugPubNames() { // Start the dwarf pubnames section. - Asm->SwitchToDataSection(TAI->getDwarfPubNamesSection(), 0); + Asm->SwitchToDataSection(TAI->getDwarfPubNamesSection()); // Process each compile unit. for (unsigned i = 0, N = CompileUnits.size(); i < N; ++i) { @@ -2746,7 +2746,7 @@ // Check to see if it is worth the effort. if (!StringPool.empty()) { // Start the dwarf str section. - Asm->SwitchToDataSection(TAI->getDwarfStrSection(), 0); + Asm->SwitchToDataSection(TAI->getDwarfStrSection()); // For each of strings in the string pool. for (unsigned StringID = 1, N = StringPool.size(); @@ -2766,7 +2766,7 @@ /// void Dwarf::EmitDebugLoc() { // Start the dwarf loc section. - Asm->SwitchToDataSection(TAI->getDwarfLocSection(), 0); + Asm->SwitchToDataSection(TAI->getDwarfLocSection()); O << "\n"; } @@ -2775,7 +2775,7 @@ /// void Dwarf::EmitDebugARanges() { // Start the dwarf aranges section. - Asm->SwitchToDataSection(TAI->getDwarfARangesSection(), 0); + Asm->SwitchToDataSection(TAI->getDwarfARangesSection()); // FIXME - Mock up #if 0 @@ -2816,7 +2816,7 @@ /// void Dwarf::EmitDebugRanges() { // Start the dwarf ranges section. - Asm->SwitchToDataSection(TAI->getDwarfRangesSection(), 0); + Asm->SwitchToDataSection(TAI->getDwarfRangesSection()); O << "\n"; } @@ -2825,7 +2825,7 @@ /// void Dwarf::EmitDebugMacInfo() { // Start the dwarf macinfo section. - Asm->SwitchToDataSection(TAI->getDwarfMacInfoSection(), 0); + Asm->SwitchToDataSection(TAI->getDwarfMacInfoSection()); O << "\n"; } @@ -2939,14 +2939,14 @@ EOL("Dwarf End Module"); // Standard sections final addresses. - Asm->SwitchToTextSection(TAI->getTextSection(), 0); + Asm->SwitchToTextSection(TAI->getTextSection()); EmitLabel("text_end", 0); - Asm->SwitchToDataSection(TAI->getDataSection(), 0); + Asm->SwitchToDataSection(TAI->getDataSection()); EmitLabel("data_end", 0); // End text sections. for (unsigned i = 1, N = SectionMap.size(); i <= N; ++i) { - Asm->SwitchToTextSection(SectionMap[i].c_str(), 0); + Asm->SwitchToTextSection(SectionMap[i].c_str()); EmitLabel("section_end", i); } From rafael.espindola at gmail.com Tue Oct 31 07:03:43 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Tue, 31 Oct 2006 07:03:43 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/ARM/alloca.ll Message-ID: <200610311303.k9VD3hF3009724@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/ARM: alloca.ll updated: 1.2 -> 1.3 --- Log message: add support for calling functions when the caller has variable sized objects --- Diffs of the changes: (+4 -1) alloca.ll | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) Index: llvm/test/Regression/CodeGen/ARM/alloca.ll diff -u llvm/test/Regression/CodeGen/ARM/alloca.ll:1.2 llvm/test/Regression/CodeGen/ARM/alloca.ll:1.3 --- llvm/test/Regression/CodeGen/ARM/alloca.ll:1.2 Fri Oct 27 00:30:23 2006 +++ llvm/test/Regression/CodeGen/ARM/alloca.ll Tue Oct 31 07:03:26 2006 @@ -1,6 +1,9 @@ ; RUN: llvm-as < %s | llc -march=arm void %f(uint %a) { entry: - %tmp1032 = alloca ubyte, uint %a + %tmp = alloca sbyte, uint %a + call void %g( sbyte* %tmp, uint %a, uint 1, uint 2, uint 3 ) ret void } + +declare void %g(sbyte*, uint, uint, uint, uint) From rafael.espindola at gmail.com Tue Oct 31 07:03:43 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Tue, 31 Oct 2006 07:03:43 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMRegisterInfo.cpp Message-ID: <200610311303.k9VD3hHO009725@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMRegisterInfo.cpp updated: 1.23 -> 1.24 --- Log message: add support for calling functions when the caller has variable sized objects --- Diffs of the changes: (+19 -1) ARMRegisterInfo.cpp | 20 +++++++++++++++++++- 1 files changed, 19 insertions(+), 1 deletion(-) Index: llvm/lib/Target/ARM/ARMRegisterInfo.cpp diff -u llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.23 llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.24 --- llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.23 Thu Oct 26 08:31:25 2006 +++ llvm/lib/Target/ARM/ARMRegisterInfo.cpp Tue Oct 31 07:03:26 2006 @@ -19,6 +19,8 @@ #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineLocation.h" #include "llvm/Type.h" +#include "llvm/Target/TargetFrameInfo.h" +#include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetOptions.h" #include "llvm/ADT/STLExtras.h" #include @@ -99,7 +101,23 @@ eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const { if (hasFP(MF)) { - assert(0); + MachineInstr *Old = I; + unsigned Amount = Old->getOperand(0).getImmedValue(); + if (Amount != 0) { + unsigned Align = MF.getTarget().getFrameInfo()->getStackAlignment(); + Amount = (Amount+Align-1)/Align*Align; + + if (Old->getOpcode() == ARM::ADJCALLSTACKDOWN) { + // sub sp, sp, amount + BuildMI(MBB, I, ARM::SUB, 2, ARM::R13).addReg(ARM::R13).addImm(Amount) + .addImm(0).addImm(ARMShift::LSL); + } else { + // add sp, sp, amount + assert(Old->getOpcode() == ARM::ADJCALLSTACKUP); + BuildMI(MBB, I, ARM::ADD, 2, ARM::R13).addReg(ARM::R13).addImm(Amount) + .addImm(0).addImm(ARMShift::LSL); + } + } } MBB.erase(I); } From alenhar2 at cs.uiuc.edu Tue Oct 31 10:50:09 2006 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Tue, 31 Oct 2006 10:50:09 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaBranchSelector.cpp Alpha.h AlphaISelLowering.cpp AlphaISelLowering.h AlphaInstrFormats.td AlphaInstrInfo.cpp AlphaInstrInfo.h AlphaInstrInfo.td AlphaTargetMachine.cpp Message-ID: <200610311650.k9VGo9ha014542@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Alpha: AlphaBranchSelector.cpp added (r1.1) Alpha.h updated: 1.7 -> 1.8 AlphaISelLowering.cpp updated: 1.70 -> 1.71 AlphaISelLowering.h updated: 1.21 -> 1.22 AlphaInstrFormats.td updated: 1.28 -> 1.29 AlphaInstrInfo.cpp updated: 1.11 -> 1.12 AlphaInstrInfo.h updated: 1.6 -> 1.7 AlphaInstrInfo.td updated: 1.130 -> 1.131 AlphaTargetMachine.cpp updated: 1.34 -> 1.35 --- Log message: Add all that branch mangling niftiness --- Diffs of the changes: (+414 -129) Alpha.h | 1 AlphaBranchSelector.cpp | 63 +++++++++++ AlphaISelLowering.cpp | 2 AlphaISelLowering.h | 10 + AlphaInstrFormats.td | 28 +---- AlphaInstrInfo.cpp | 166 +++++++++++++++++++++++++++++- AlphaInstrInfo.h | 8 + AlphaInstrInfo.td | 263 ++++++++++++++++++++++++++++-------------------- AlphaTargetMachine.cpp | 2 9 files changed, 414 insertions(+), 129 deletions(-) Index: llvm/lib/Target/Alpha/AlphaBranchSelector.cpp diff -c /dev/null llvm/lib/Target/Alpha/AlphaBranchSelector.cpp:1.1 *** /dev/null Tue Oct 31 10:50:05 2006 --- llvm/lib/Target/Alpha/AlphaBranchSelector.cpp Tue Oct 31 10:49:55 2006 *************** *** 0 **** --- 1,63 ---- + //===-- AlphaBranchSelector.cpp - Convert Pseudo branchs ----------*- C++ -*-=// + // + // The LLVM Compiler Infrastructure + // + // This file was developed by Andrew Lenharth and is distributed under the + // University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // Replace Pseudo COND_BRANCH_* with their appropriate real branch + // Simplified version of the PPC Branch Selector + // + //===----------------------------------------------------------------------===// + + #include "Alpha.h" + #include "AlphaInstrInfo.h" + #include "llvm/CodeGen/MachineFunctionPass.h" + #include "llvm/Support/Compiler.h" + #include "llvm/Target/TargetMachine.h" + #include "llvm/Target/TargetAsmInfo.h" + using namespace llvm; + + namespace { + struct VISIBILITY_HIDDEN AlphaBSel : public MachineFunctionPass { + + virtual bool runOnMachineFunction(MachineFunction &Fn); + + virtual const char *getPassName() const { + return "Alpha Branch Selection"; + } + }; + } + + /// createAlphaBranchSelectionPass - returns an instance of the Branch Selection + /// Pass + /// + FunctionPass *llvm::createAlphaBranchSelectionPass() { + return new AlphaBSel(); + } + + bool AlphaBSel::runOnMachineFunction(MachineFunction &Fn) { + + for (MachineFunction::iterator MFI = Fn.begin(), E = Fn.end(); MFI != E; + ++MFI) { + MachineBasicBlock *MBB = MFI; + + for (MachineBasicBlock::iterator MBBI = MBB->begin(), EE = MBB->end(); + MBBI != EE; ++MBBI) { + if (MBBI->getOpcode() == Alpha::COND_BRANCH_I || + MBBI->getOpcode() == Alpha::COND_BRANCH_F) { + + // condbranch operands: + // 0. bc opcode + // 1. reg + // 2. target MBB + MBBI->setOpcode(MBBI->getOperand(0).getImm()); + } + } + } + + return true; + } + Index: llvm/lib/Target/Alpha/Alpha.h diff -u llvm/lib/Target/Alpha/Alpha.h:1.7 llvm/lib/Target/Alpha/Alpha.h:1.8 --- llvm/lib/Target/Alpha/Alpha.h:1.7 Mon Sep 18 14:44:29 2006 +++ llvm/lib/Target/Alpha/Alpha.h Tue Oct 31 10:49:55 2006 @@ -32,6 +32,7 @@ FunctionPass *createAlphaCodeEmitterPass(AlphaTargetMachine &TM, MachineCodeEmitter &MCE); FunctionPass *createAlphaLLRPPass(AlphaTargetMachine &tm); + FunctionPass *createAlphaBranchSelectionPass(); } // end namespace llvm; Index: llvm/lib/Target/Alpha/AlphaISelLowering.cpp diff -u llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.70 llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.71 --- llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.70 Mon Oct 30 02:02:39 2006 +++ llvm/lib/Target/Alpha/AlphaISelLowering.cpp Tue Oct 31 10:49:55 2006 @@ -164,6 +164,8 @@ case AlphaISD::CALL: return "Alpha::CALL"; case AlphaISD::DivCall: return "Alpha::DivCall"; case AlphaISD::RET_FLAG: return "Alpha::RET_FLAG"; + case AlphaISD::COND_BRANCH_I: return "Alpha::COND_BRANCH_I"; + case AlphaISD::COND_BRANCH_F: return "Alpha::COND_BRANCH_F"; } } Index: llvm/lib/Target/Alpha/AlphaISelLowering.h diff -u llvm/lib/Target/Alpha/AlphaISelLowering.h:1.21 llvm/lib/Target/Alpha/AlphaISelLowering.h:1.22 --- llvm/lib/Target/Alpha/AlphaISelLowering.h:1.21 Wed Oct 11 11:24:51 2006 +++ llvm/lib/Target/Alpha/AlphaISelLowering.h Tue Oct 31 10:49:55 2006 @@ -46,7 +46,15 @@ DivCall, /// return flag operand - RET_FLAG + RET_FLAG, + + /// CHAIN = COND_BRANCH CHAIN, OPC, (G|F)PRC, DESTBB [, INFLAG] - This + /// corresponds to the COND_BRANCH pseudo instruction. + /// *PRC is the input register to compare to zero, + /// OPC is the branch opcode to use (e.g. Alpha::BEQ), + /// DESTBB is the destination block to branch to, and INFLAG is + /// an optional input flag argument. + COND_BRANCH_I, COND_BRANCH_F }; } Index: llvm/lib/Target/Alpha/AlphaInstrFormats.td diff -u llvm/lib/Target/Alpha/AlphaInstrFormats.td:1.28 llvm/lib/Target/Alpha/AlphaInstrFormats.td:1.29 --- llvm/lib/Target/Alpha/AlphaInstrFormats.td:1.28 Mon Jun 12 13:09:24 2006 +++ llvm/lib/Target/Alpha/AlphaInstrFormats.td Tue Oct 31 10:49:55 2006 @@ -22,6 +22,7 @@ def s16imm : Operand; def s21imm : Operand; def s64imm : Operand; +def u64imm : Operand; //===----------------------------------------------------------------------===// // Instruction format superclass @@ -92,36 +93,25 @@ //3.3.2 def target : Operand {} -let isBranch = 1, isTerminator = 1 in -class BFormD opcode, string asmstr, list pattern, InstrItinClass itin> - : InstAlpha { - let Pattern = pattern; - let OperandList = (ops target:$DISP); - bits<5> Ra; - bits<21> disp; - - let Inst{25-21} = Ra; - let Inst{20-0} = disp; -} -let isBranch = 1, isTerminator = 1 in -class BForm opcode, string asmstr, list pattern, InstrItinClass itin> - : InstAlpha { - let Pattern = pattern; - let OperandList = (ops GPRC:$RA, target:$DISP); +let isBranch = 1, isTerminator = 1, hasCtrlDep = 1, noResults = 1 in { +class BFormN opcode, dag OL, string asmstr, InstrItinClass itin> + : InstAlpha { + let OperandList = OL; + bits<64> Opc; //dummy bits<5> Ra; bits<21> disp; let Inst{25-21} = Ra; let Inst{20-0} = disp; } +} let isBranch = 1, isTerminator = 1 in -class FBForm opcode, string asmstr, list pattern, InstrItinClass itin> +class BFormD opcode, string asmstr, list pattern, InstrItinClass itin> : InstAlpha { let Pattern = pattern; - let OperandList = (ops F8RC:$RA, target:$DISP); - + let OperandList = (ops target:$DISP); bits<5> Ra; bits<21> disp; Index: llvm/lib/Target/Alpha/AlphaInstrInfo.cpp diff -u llvm/lib/Target/Alpha/AlphaInstrInfo.cpp:1.11 llvm/lib/Target/Alpha/AlphaInstrInfo.cpp:1.12 --- llvm/lib/Target/Alpha/AlphaInstrInfo.cpp:1.11 Tue Oct 24 12:07:11 2006 +++ llvm/lib/Target/Alpha/AlphaInstrInfo.cpp Tue Oct 31 10:49:55 2006 @@ -83,10 +83,170 @@ return 0; } +static bool isAlphaIntCondCode(unsigned Opcode) { + switch (Opcode) { + case Alpha::BEQ: + case Alpha::BNE: + case Alpha::BGE: + case Alpha::BGT: + case Alpha::BLE: + case Alpha::BLT: + case Alpha::BLBC: + case Alpha::BLBS: + return true; + default: + return false; + } +} + void AlphaInstrInfo::InsertBranch(MachineBasicBlock &MBB,MachineBasicBlock *TBB, MachineBasicBlock *FBB, const std::vector &Cond)const{ - // Can only insert uncond branches so far. - assert(Cond.empty() && !FBB && TBB && "Can only handle uncond branches!"); - BuildMI(&MBB, Alpha::BR, 1).addMBB(TBB); + assert(TBB && "InsertBranch must not be told to insert a fallthrough"); + assert((Cond.size() == 2 || Cond.size() == 0) && + "Alpha branch conditions have two components!"); + + // One-way branch. + if (FBB == 0) { + if (Cond.empty()) // Unconditional branch + BuildMI(&MBB, Alpha::BR, 1).addMBB(TBB); + else // Conditional branch + if (isAlphaIntCondCode(Cond[0].getImm())) + BuildMI(&MBB, Alpha::COND_BRANCH_I, 3) + .addImm(Cond[0].getImm()).addReg(Cond[1].getReg()).addMBB(TBB); + else + BuildMI(&MBB, Alpha::COND_BRANCH_F, 3) + .addImm(Cond[0].getImm()).addReg(Cond[1].getReg()).addMBB(TBB); + return; + } + + // Two-way Conditional Branch. + if (isAlphaIntCondCode(Cond[0].getImm())) + BuildMI(&MBB, Alpha::COND_BRANCH_I, 3) + .addImm(Cond[0].getImm()).addReg(Cond[1].getReg()).addMBB(TBB); + else + BuildMI(&MBB, Alpha::COND_BRANCH_F, 3) + .addImm(Cond[0].getImm()).addReg(Cond[1].getReg()).addMBB(TBB); + BuildMI(&MBB, Alpha::BR, 1).addMBB(FBB); +} + +static unsigned AlphaRevCondCode(unsigned Opcode) { + switch (Opcode) { + case Alpha::BEQ: return Alpha::BNE; + case Alpha::BNE: return Alpha::BEQ; + case Alpha::BGE: return Alpha::BLT; + case Alpha::BGT: return Alpha::BLE; + case Alpha::BLE: return Alpha::BGT; + case Alpha::BLT: return Alpha::BGE; + case Alpha::BLBC: return Alpha::BLBS; + case Alpha::BLBS: return Alpha::BLBC; + case Alpha::FBEQ: return Alpha::FBNE; + case Alpha::FBNE: return Alpha::FBEQ; + case Alpha::FBGE: return Alpha::FBLT; + case Alpha::FBGT: return Alpha::FBLE; + case Alpha::FBLE: return Alpha::FBGT; + case Alpha::FBLT: return Alpha::FBGE; + default: + assert(0 && "Unknown opcode"); + } +} + +// Branch analysis. +bool AlphaInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB,MachineBasicBlock *&TBB, + MachineBasicBlock *&FBB, + std::vector &Cond) const { + // If the block has no terminators, it just falls into the block after it. + MachineBasicBlock::iterator I = MBB.end(); + if (I == MBB.begin() || !isTerminatorInstr((--I)->getOpcode())) + return false; + + // Get the last instruction in the block. + MachineInstr *LastInst = I; + + // If there is only one terminator instruction, process it. + if (I == MBB.begin() || !isTerminatorInstr((--I)->getOpcode())) { + if (LastInst->getOpcode() == Alpha::BR) { + TBB = LastInst->getOperand(0).getMachineBasicBlock(); + return false; + } else if (LastInst->getOpcode() == Alpha::COND_BRANCH_I || + LastInst->getOpcode() == Alpha::COND_BRANCH_F) { + // Block ends with fall-through condbranch. + TBB = LastInst->getOperand(2).getMachineBasicBlock(); + Cond.push_back(LastInst->getOperand(0)); + Cond.push_back(LastInst->getOperand(1)); + return false; + } + // Otherwise, don't know what this is. + return true; + } + + // Get the instruction before it if it's a terminator. + MachineInstr *SecondLastInst = I; + + // If there are three terminators, we don't know what sort of block this is. + if (SecondLastInst && I != MBB.begin() && + isTerminatorInstr((--I)->getOpcode())) + return true; + + // If the block ends with Alpha::BR and Alpha::COND_BRANCH_*, handle it. + if ((SecondLastInst->getOpcode() == Alpha::COND_BRANCH_I || + SecondLastInst->getOpcode() == Alpha::COND_BRANCH_F) && + LastInst->getOpcode() == Alpha::BR) { + TBB = SecondLastInst->getOperand(2).getMachineBasicBlock(); + Cond.push_back(SecondLastInst->getOperand(0)); + Cond.push_back(SecondLastInst->getOperand(1)); + FBB = LastInst->getOperand(0).getMachineBasicBlock(); + return false; + } + + // Otherwise, can't handle this. + return true; +} + +void AlphaInstrInfo::RemoveBranch(MachineBasicBlock &MBB) const { + MachineBasicBlock::iterator I = MBB.end(); + if (I == MBB.begin()) return; + --I; + if (I->getOpcode() != Alpha::BR && + I->getOpcode() != Alpha::COND_BRANCH_I && + I->getOpcode() != Alpha::COND_BRANCH_F) + return; + + // Remove the branch. + I->eraseFromParent(); + + I = MBB.end(); + + if (I == MBB.begin()) return; + --I; + if (I->getOpcode() != Alpha::COND_BRANCH_I && + I->getOpcode() != Alpha::COND_BRANCH_F) + return; + + // Remove the branch. + I->eraseFromParent(); +} + +void AlphaInstrInfo::insertNoop(MachineBasicBlock &MBB, + MachineBasicBlock::iterator MI) const { + BuildMI(MBB, MI, Alpha::BIS, 2, Alpha::R31).addReg(Alpha::R31) + .addReg(Alpha::R31); +} + +bool AlphaInstrInfo::BlockHasNoFallThrough(MachineBasicBlock &MBB) const { + if (MBB.empty()) return false; + + switch (MBB.back().getOpcode()) { + case Alpha::BR: // Uncond branch. + case Alpha::JMP: // Indirect branch. + return true; + default: return false; + } +} +bool AlphaInstrInfo:: +ReverseBranchCondition(std::vector &Cond) const { + assert(Cond.size() == 2 && "Invalid Alpha branch opcode!"); + Cond[0].setImm(AlphaRevCondCode(Cond[0].getImm())); + return false; } + Index: llvm/lib/Target/Alpha/AlphaInstrInfo.h diff -u llvm/lib/Target/Alpha/AlphaInstrInfo.h:1.6 llvm/lib/Target/Alpha/AlphaInstrInfo.h:1.7 --- llvm/lib/Target/Alpha/AlphaInstrInfo.h:1.6 Tue Oct 24 11:41:36 2006 +++ llvm/lib/Target/Alpha/AlphaInstrInfo.h Tue Oct 31 10:49:55 2006 @@ -42,6 +42,14 @@ virtual void InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, const std::vector &Cond) const; + bool AnalyzeBranch(MachineBasicBlock &MBB,MachineBasicBlock *&TBB, + MachineBasicBlock *&FBB, + std::vector &Cond) const; + void RemoveBranch(MachineBasicBlock &MBB) const; + void insertNoop(MachineBasicBlock &MBB, + MachineBasicBlock::iterator MI) const; + bool BlockHasNoFallThrough(MachineBasicBlock &MBB) const; + bool ReverseBranchCondition(std::vector &Cond) const; }; } Index: llvm/lib/Target/Alpha/AlphaInstrInfo.td diff -u llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.130 llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.131 --- llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.130 Fri Oct 13 16:14:26 2006 +++ llvm/lib/Target/Alpha/AlphaInstrInfo.td Tue Oct 31 10:49:55 2006 @@ -847,120 +847,173 @@ ///////////////////////////////////////////////////////// //Branching ///////////////////////////////////////////////////////// +class br_icc opc, string asmstr> + : BFormN; +class br_fcc opc, string asmstr> + : BFormN; + let isBranch = 1, isTerminator = 1, hasCtrlDep = 1, noResults = 1 in { let Ra = 31 in def BR : BFormD<0x30, "br $$31,$DISP", [(br bb:$DISP)], s_ubr>; +def COND_BRANCH_I : BFormN<0, (ops u64imm:$opc, GPRC:$R, target:$dst), + "{:comment} COND_BRANCH imm:$opc, GPRC:$R, bb:$dst", + s_icbr>; +def COND_BRANCH_F : BFormN<0, (ops u64imm:$opc, F8RC:$R, target:$dst), + "{:comment} COND_BRANCH imm:$opc, F8RC:$R, bb:$dst", + s_fbr>; //Branches, int -def BEQ : BForm<0x39, "beq $RA,$DISP", - [(brcond (seteq GPRC:$RA, 0), bb:$DISP)], s_icbr>; -def BGE : BForm<0x3E, "bge $RA,$DISP", - [(brcond (setge GPRC:$RA, 0), bb:$DISP)], s_icbr>; -def BGT : BForm<0x3F, "bgt $RA,$DISP", - [(brcond (setgt GPRC:$RA, 0), bb:$DISP)], s_icbr>; -def BLBC : BForm<0x38, "blbc $RA,$DISP", [], s_icbr>; //TODO: Low bit clear -def BLBS : BForm<0x3C, "blbs $RA,$DISP", - [(brcond (and GPRC:$RA, 1), bb:$DISP)], s_icbr>; -def BLE : BForm<0x3B, "ble $RA,$DISP", - [(brcond (setle GPRC:$RA, 0), bb:$DISP)], s_icbr>; -def BLT : BForm<0x3A, "blt $RA,$DISP", - [(brcond (setlt GPRC:$RA, 0), bb:$DISP)], s_icbr>; -def BNE : BForm<0x3D, "bne $RA,$DISP", - [(brcond (setne GPRC:$RA, 0), bb:$DISP)], s_icbr>; +def BEQ : br_icc<0x39, "beq">; +def BGE : br_icc<0x3E, "bge">; +def BGT : br_icc<0x3F, "bgt">; +def BLBC : br_icc<0x38, "blbc">; +def BLBS : br_icc<0x3C, "blbs">; +def BLE : br_icc<0x3B, "ble">; +def BLT : br_icc<0x3A, "blt">; +def BNE : br_icc<0x3D, "bne">; //Branches, float -def FBEQ : FBForm<0x31, "fbeq $RA,$DISP", - [(brcond (seteq F8RC:$RA, immFPZ), bb:$DISP)], s_fbr>; -def FBGE : FBForm<0x36, "fbge $RA,$DISP", - [(brcond (setge F8RC:$RA, immFPZ), bb:$DISP)], s_fbr>; -def FBGT : FBForm<0x37, "fbgt $RA,$DISP", - [(brcond (setgt F8RC:$RA, immFPZ), bb:$DISP)], s_fbr>; -def FBLE : FBForm<0x33, "fble $RA,$DISP", - [(brcond (setle F8RC:$RA, immFPZ), bb:$DISP)], s_fbr>; -def FBLT : FBForm<0x32, "fblt $RA,$DISP", - [(brcond (setlt F8RC:$RA, immFPZ), bb:$DISP)], s_fbr>; -def FBNE : FBForm<0x35, "fbne $RA,$DISP", - [(brcond (setne F8RC:$RA, immFPZ), bb:$DISP)], s_fbr>; +def FBEQ : br_fcc<0x31, "fbeq">; +def FBGE : br_fcc<0x36, "fbge">; +def FBGT : br_fcc<0x37, "fbgt">; +def FBLE : br_fcc<0x33, "fble">; +def FBLT : br_fcc<0x32, "fblt">; +def FBNE : br_fcc<0x36, "fbne">; } -def : Pat<(brcond GPRC:$RA, bb:$DISP), (BNE GPRC:$RA, bb:$DISP)>; -def : Pat<(brcond (setne GPRC:$RA, GPRC:$RB), bb:$DISP), - (BEQ (CMPEQ GPRC:$RA, GPRC:$RB), bb:$DISP)>; -def : Pat<(brcond (setne GPRC:$RA, immUExt8:$L), bb:$DISP), - (BEQ (CMPEQi GPRC:$RA, immUExt8:$L), bb:$DISP)>; - -def : Pat<(brcond (seteq F8RC:$RA, F8RC:$RB), bb:$DISP), - (FBNE (CMPTEQ F8RC:$RA, F8RC:$RB), bb:$DISP)>; -def : Pat<(brcond (setoeq F8RC:$RA, F8RC:$RB), bb:$DISP), - (FBNE (CMPTEQ F8RC:$RA, F8RC:$RB), bb:$DISP)>; -def : Pat<(brcond (setueq F8RC:$RA, F8RC:$RB), bb:$DISP), - (FBNE (CMPTEQ F8RC:$RA, F8RC:$RB), bb:$DISP)>; - -def : Pat<(brcond (setlt F8RC:$RA, F8RC:$RB), bb:$DISP), - (FBNE (CMPTLT F8RC:$RA, F8RC:$RB), bb:$DISP)>; -def : Pat<(brcond (setolt F8RC:$RA, F8RC:$RB), bb:$DISP), - (FBNE (CMPTLT F8RC:$RA, F8RC:$RB), bb:$DISP)>; -def : Pat<(brcond (setult F8RC:$RA, F8RC:$RB), bb:$DISP), - (FBNE (CMPTLT F8RC:$RA, F8RC:$RB), bb:$DISP)>; - -def : Pat<(brcond (setle F8RC:$RA, F8RC:$RB), bb:$DISP), - (FBNE (CMPTLE F8RC:$RA, F8RC:$RB), bb:$DISP)>; -def : Pat<(brcond (setole F8RC:$RA, F8RC:$RB), bb:$DISP), - (FBNE (CMPTLE F8RC:$RA, F8RC:$RB), bb:$DISP)>; -def : Pat<(brcond (setule F8RC:$RA, F8RC:$RB), bb:$DISP), - (FBNE (CMPTLE F8RC:$RA, F8RC:$RB), bb:$DISP)>; - -def : Pat<(brcond (setgt F8RC:$RA, F8RC:$RB), bb:$DISP), - (FBNE (CMPTLT F8RC:$RB, F8RC:$RA), bb:$DISP)>; -def : Pat<(brcond (setogt F8RC:$RA, F8RC:$RB), bb:$DISP), - (FBNE (CMPTLT F8RC:$RB, F8RC:$RA), bb:$DISP)>; -def : Pat<(brcond (setugt F8RC:$RA, F8RC:$RB), bb:$DISP), - (FBNE (CMPTLT F8RC:$RB, F8RC:$RA), bb:$DISP)>; - -def : Pat<(brcond (setge F8RC:$RA, F8RC:$RB), bb:$DISP), - (FBNE (CMPTLE F8RC:$RB, F8RC:$RA), bb:$DISP)>; -def : Pat<(brcond (setoge F8RC:$RA, F8RC:$RB), bb:$DISP), - (FBNE (CMPTLE F8RC:$RB, F8RC:$RA), bb:$DISP)>; -def : Pat<(brcond (setuge F8RC:$RA, F8RC:$RB), bb:$DISP), - (FBNE (CMPTLE F8RC:$RB, F8RC:$RA), bb:$DISP)>; - -def : Pat<(brcond (setne F8RC:$RA, F8RC:$RB), bb:$DISP), - (FBEQ (CMPTEQ F8RC:$RA, F8RC:$RB), bb:$DISP)>; -def : Pat<(brcond (setone F8RC:$RA, F8RC:$RB), bb:$DISP), - (FBEQ (CMPTEQ F8RC:$RA, F8RC:$RB), bb:$DISP)>; -def : Pat<(brcond (setune F8RC:$RA, F8RC:$RB), bb:$DISP), - (FBEQ (CMPTEQ F8RC:$RA, F8RC:$RB), bb:$DISP)>; - - -def : Pat<(brcond (setoeq F8RC:$RA, immFPZ), bb:$DISP), - (FBEQ F8RC:$RA,bb:$DISP)>; -def : Pat<(brcond (setueq F8RC:$RA, immFPZ), bb:$DISP), - (FBEQ F8RC:$RA,bb:$DISP)>; - -def : Pat<(brcond (setoge F8RC:$RA, immFPZ), bb:$DISP), - (FBGE F8RC:$RA,bb:$DISP)>; -def : Pat<(brcond (setuge F8RC:$RA, immFPZ), bb:$DISP), - (FBGE F8RC:$RA,bb:$DISP)>; - -def : Pat<(brcond (setogt F8RC:$RA, immFPZ), bb:$DISP), - (FBGT F8RC:$RA,bb:$DISP)>; -def : Pat<(brcond (setugt F8RC:$RA, immFPZ), bb:$DISP), - (FBGT F8RC:$RA,bb:$DISP)>; - -def : Pat<(brcond (setole F8RC:$RA, immFPZ), bb:$DISP), - (FBLE F8RC:$RA,bb:$DISP)>; -def : Pat<(brcond (setule F8RC:$RA, immFPZ), bb:$DISP), - (FBLE F8RC:$RA,bb:$DISP)>; - -def : Pat<(brcond (setolt F8RC:$RA, immFPZ), bb:$DISP), - (FBLT F8RC:$RA,bb:$DISP)>; -def : Pat<(brcond (setult F8RC:$RA, immFPZ), bb:$DISP), - (FBLT F8RC:$RA,bb:$DISP)>; - -def : Pat<(brcond (setone F8RC:$RA, immFPZ), bb:$DISP), - (FBNE F8RC:$RA,bb:$DISP)>; -def : Pat<(brcond (setune F8RC:$RA, immFPZ), bb:$DISP), - (FBNE F8RC:$RA,bb:$DISP)>; +//An ugly trick to get the opcode as an imm I can use +def immBRCond : SDNodeXFormgetValue()) { + case 0: return getI64Imm(Alpha::BEQ); + case 1: return getI64Imm(Alpha::BNE); + case 2: return getI64Imm(Alpha::BGE); + case 3: return getI64Imm(Alpha::BGT); + case 4: return getI64Imm(Alpha::BLE); + case 5: return getI64Imm(Alpha::BLT); + case 6: return getI64Imm(Alpha::BLBS); + case 7: return getI64Imm(Alpha::BLBC); + case 20: return getI64Imm(Alpha::FBEQ); + case 21: return getI64Imm(Alpha::FBNE); + case 22: return getI64Imm(Alpha::FBGE); + case 23: return getI64Imm(Alpha::FBGT); + case 24: return getI64Imm(Alpha::FBLE); + case 25: return getI64Imm(Alpha::FBLT); + default: assert(0 && "Unknown branch type"); + } +}]>; + +//Int cond patterns +def : Pat<(brcond (seteq GPRC:$RA, 0), bb:$DISP), + (COND_BRANCH_I (immBRCond 0), GPRC:$RA, bb:$DISP)>; +def : Pat<(brcond (setge GPRC:$RA, 0), bb:$DISP), + (COND_BRANCH_I (immBRCond 2), GPRC:$RA, bb:$DISP)>; +def : Pat<(brcond (setgt GPRC:$RA, 0), bb:$DISP), + (COND_BRANCH_I (immBRCond 3), GPRC:$RA, bb:$DISP)>; +def : Pat<(brcond (and GPRC:$RA, 1), bb:$DISP), + (COND_BRANCH_I (immBRCond 6), GPRC:$RA, bb:$DISP)>; +def : Pat<(brcond (setle GPRC:$RA, 0), bb:$DISP), + (COND_BRANCH_I (immBRCond 4), GPRC:$RA, bb:$DISP)>; +def : Pat<(brcond (setlt GPRC:$RA, 0), bb:$DISP), + (COND_BRANCH_I (immBRCond 5), GPRC:$RA, bb:$DISP)>; +def : Pat<(brcond (setne GPRC:$RA, 0), bb:$DISP), + (COND_BRANCH_I (immBRCond 1), GPRC:$RA, bb:$DISP)>; + +def : Pat<(brcond GPRC:$RA, bb:$DISP), + (COND_BRANCH_I (immBRCond 1), GPRC:$RA, bb:$DISP)>; +def : Pat<(brcond (setne GPRC:$RA, GPRC:$RB), bb:$DISP), + (COND_BRANCH_I (immBRCond 0), (CMPEQ GPRC:$RA, GPRC:$RB), bb:$DISP)>; +def : Pat<(brcond (setne GPRC:$RA, immUExt8:$L), bb:$DISP), + (COND_BRANCH_I (immBRCond 0), (CMPEQi GPRC:$RA, immUExt8:$L), bb:$DISP)>; + +//FP cond patterns +def : Pat<(brcond (seteq F8RC:$RA, immFPZ), bb:$DISP), + (COND_BRANCH_F (immBRCond 20), F8RC:$RA, bb:$DISP)>; +def : Pat<(brcond (setne F8RC:$RA, immFPZ), bb:$DISP), + (COND_BRANCH_F (immBRCond 21), F8RC:$RA, bb:$DISP)>; +def : Pat<(brcond (setge F8RC:$RA, immFPZ), bb:$DISP), + (COND_BRANCH_F (immBRCond 22), F8RC:$RA, bb:$DISP)>; +def : Pat<(brcond (setgt F8RC:$RA, immFPZ), bb:$DISP), + (COND_BRANCH_F (immBRCond 23), F8RC:$RA, bb:$DISP)>; +def : Pat<(brcond (setle F8RC:$RA, immFPZ), bb:$DISP), + (COND_BRANCH_F (immBRCond 24), F8RC:$RA, bb:$DISP)>; +def : Pat<(brcond (setlt F8RC:$RA, immFPZ), bb:$DISP), + (COND_BRANCH_F (immBRCond 25), F8RC:$RA, bb:$DISP)>; + + +def : Pat<(brcond (seteq F8RC:$RA, F8RC:$RB), bb:$DISP), + (COND_BRANCH_F (immBRCond 21), (CMPTEQ F8RC:$RA, F8RC:$RB), bb:$DISP)>; +def : Pat<(brcond (setoeq F8RC:$RA, F8RC:$RB), bb:$DISP), + (COND_BRANCH_F (immBRCond 21), (CMPTEQ F8RC:$RA, F8RC:$RB), bb:$DISP)>; +def : Pat<(brcond (setueq F8RC:$RA, F8RC:$RB), bb:$DISP), + (COND_BRANCH_F (immBRCond 21), (CMPTEQ F8RC:$RA, F8RC:$RB), bb:$DISP)>; + +def : Pat<(brcond (setlt F8RC:$RA, F8RC:$RB), bb:$DISP), + (COND_BRANCH_F (immBRCond 21), (CMPTLT F8RC:$RA, F8RC:$RB), bb:$DISP)>; +def : Pat<(brcond (setolt F8RC:$RA, F8RC:$RB), bb:$DISP), + (COND_BRANCH_F (immBRCond 21), (CMPTLT F8RC:$RA, F8RC:$RB), bb:$DISP)>; +def : Pat<(brcond (setult F8RC:$RA, F8RC:$RB), bb:$DISP), + (COND_BRANCH_F (immBRCond 21), (CMPTLT F8RC:$RA, F8RC:$RB), bb:$DISP)>; + +def : Pat<(brcond (setle F8RC:$RA, F8RC:$RB), bb:$DISP), + (COND_BRANCH_F (immBRCond 21), (CMPTLE F8RC:$RA, F8RC:$RB), bb:$DISP)>; +def : Pat<(brcond (setole F8RC:$RA, F8RC:$RB), bb:$DISP), + (COND_BRANCH_F (immBRCond 21), (CMPTLE F8RC:$RA, F8RC:$RB), bb:$DISP)>; +def : Pat<(brcond (setule F8RC:$RA, F8RC:$RB), bb:$DISP), + (COND_BRANCH_F (immBRCond 21), (CMPTLE F8RC:$RA, F8RC:$RB), bb:$DISP)>; + +def : Pat<(brcond (setgt F8RC:$RA, F8RC:$RB), bb:$DISP), + (COND_BRANCH_F (immBRCond 21), (CMPTLT F8RC:$RB, F8RC:$RA), bb:$DISP)>; +def : Pat<(brcond (setogt F8RC:$RA, F8RC:$RB), bb:$DISP), + (COND_BRANCH_F (immBRCond 21), (CMPTLT F8RC:$RB, F8RC:$RA), bb:$DISP)>; +def : Pat<(brcond (setugt F8RC:$RA, F8RC:$RB), bb:$DISP), + (COND_BRANCH_F (immBRCond 21), (CMPTLT F8RC:$RB, F8RC:$RA), bb:$DISP)>; + +def : Pat<(brcond (setge F8RC:$RA, F8RC:$RB), bb:$DISP), + (COND_BRANCH_F (immBRCond 21), (CMPTLE F8RC:$RB, F8RC:$RA), bb:$DISP)>; +def : Pat<(brcond (setoge F8RC:$RA, F8RC:$RB), bb:$DISP), + (COND_BRANCH_F (immBRCond 21), (CMPTLE F8RC:$RB, F8RC:$RA), bb:$DISP)>; +def : Pat<(brcond (setuge F8RC:$RA, F8RC:$RB), bb:$DISP), + (COND_BRANCH_F (immBRCond 21), (CMPTLE F8RC:$RB, F8RC:$RA), bb:$DISP)>; + +def : Pat<(brcond (setne F8RC:$RA, F8RC:$RB), bb:$DISP), + (COND_BRANCH_F (immBRCond 20), (CMPTEQ F8RC:$RA, F8RC:$RB), bb:$DISP)>; +def : Pat<(brcond (setone F8RC:$RA, F8RC:$RB), bb:$DISP), + (COND_BRANCH_F (immBRCond 20), (CMPTEQ F8RC:$RA, F8RC:$RB), bb:$DISP)>; +def : Pat<(brcond (setune F8RC:$RA, F8RC:$RB), bb:$DISP), + (COND_BRANCH_F (immBRCond 20), (CMPTEQ F8RC:$RA, F8RC:$RB), bb:$DISP)>; + + +def : Pat<(brcond (setoeq F8RC:$RA, immFPZ), bb:$DISP), + (COND_BRANCH_F (immBRCond 20), F8RC:$RA,bb:$DISP)>; +def : Pat<(brcond (setueq F8RC:$RA, immFPZ), bb:$DISP), + (COND_BRANCH_F (immBRCond 20), F8RC:$RA,bb:$DISP)>; + +def : Pat<(brcond (setoge F8RC:$RA, immFPZ), bb:$DISP), + (COND_BRANCH_F (immBRCond 22), F8RC:$RA,bb:$DISP)>; +def : Pat<(brcond (setuge F8RC:$RA, immFPZ), bb:$DISP), + (COND_BRANCH_F (immBRCond 22), F8RC:$RA,bb:$DISP)>; + +def : Pat<(brcond (setogt F8RC:$RA, immFPZ), bb:$DISP), + (COND_BRANCH_F (immBRCond 23), F8RC:$RA,bb:$DISP)>; +def : Pat<(brcond (setugt F8RC:$RA, immFPZ), bb:$DISP), + (COND_BRANCH_F (immBRCond 23), F8RC:$RA,bb:$DISP)>; + +def : Pat<(brcond (setole F8RC:$RA, immFPZ), bb:$DISP), + (COND_BRANCH_F (immBRCond 24), F8RC:$RA,bb:$DISP)>; +def : Pat<(brcond (setule F8RC:$RA, immFPZ), bb:$DISP), + (COND_BRANCH_F (immBRCond 24), F8RC:$RA,bb:$DISP)>; + +def : Pat<(brcond (setolt F8RC:$RA, immFPZ), bb:$DISP), + (COND_BRANCH_F (immBRCond 25), F8RC:$RA,bb:$DISP)>; +def : Pat<(brcond (setult F8RC:$RA, immFPZ), bb:$DISP), + (COND_BRANCH_F (immBRCond 25), F8RC:$RA,bb:$DISP)>; + +def : Pat<(brcond (setone F8RC:$RA, immFPZ), bb:$DISP), + (COND_BRANCH_F (immBRCond 21), F8RC:$RA,bb:$DISP)>; +def : Pat<(brcond (setune F8RC:$RA, immFPZ), bb:$DISP), + (COND_BRANCH_F (immBRCond 21), F8RC:$RA,bb:$DISP)>; //End Branches Index: llvm/lib/Target/Alpha/AlphaTargetMachine.cpp diff -u llvm/lib/Target/Alpha/AlphaTargetMachine.cpp:1.34 llvm/lib/Target/Alpha/AlphaTargetMachine.cpp:1.35 --- llvm/lib/Target/Alpha/AlphaTargetMachine.cpp:1.34 Tue Oct 10 23:29:42 2006 +++ llvm/lib/Target/Alpha/AlphaTargetMachine.cpp Tue Oct 31 10:49:55 2006 @@ -74,7 +74,7 @@ } bool AlphaTargetMachine::addPreEmitPass(FunctionPassManager &PM, bool Fast) { // Must run branch selection immediately preceding the asm printer - //PM.add(createAlphaBranchSelectionPass()); + PM.add(createAlphaBranchSelectionPass()); return false; } bool AlphaTargetMachine::addAssemblyEmitter(FunctionPassManager &PM, bool Fast, From sabre at nondot.org Tue Oct 31 11:51:50 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 31 Oct 2006 11:51:50 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/LCSSA/2006-10-31-UnreachableBlock.ll Message-ID: <200610311751.k9VHpoEk025322@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/LCSSA: 2006-10-31-UnreachableBlock.ll added (r1.1) --- Log message: testcase for PR977: http://llvm.org/PR977 --- Diffs of the changes: (+270 -0) 2006-10-31-UnreachableBlock.ll | 270 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 270 insertions(+) Index: llvm/test/Regression/Transforms/LCSSA/2006-10-31-UnreachableBlock.ll diff -c /dev/null llvm/test/Regression/Transforms/LCSSA/2006-10-31-UnreachableBlock.ll:1.1 *** /dev/null Tue Oct 31 11:51:46 2006 --- llvm/test/Regression/Transforms/LCSSA/2006-10-31-UnreachableBlock.ll Tue Oct 31 11:51:36 2006 *************** *** 0 **** --- 1,270 ---- + ; RUN: llvm-as < %s | opt -lcssa -disable-output + ; PR977 + + void %process_backlog() { + entry: + br label %loopentry.preheader + + loopentry.preheader: ; preds = %dead_block_after_break, %entry + %work.0.ph = phi int [ %inc, %dead_block_after_break ], [ 0, %entry ] ; [#uses=0] + br label %loopentry + + loopentry: ; preds = %endif.1, %loopentry.preheader + br bool false, label %then.i, label %loopentry.__skb_dequeue67.exit_crit_edge + + loopentry.__skb_dequeue67.exit_crit_edge: ; preds = %loopentry + br label %__skb_dequeue67.exit + + then.i: ; preds = %loopentry + br label %__skb_dequeue67.exit + + __skb_dequeue67.exit: ; preds = %then.i, %loopentry.__skb_dequeue67.exit_crit_edge + br bool false, label %then.0, label %__skb_dequeue67.exit.endif.0_crit_edge + + __skb_dequeue67.exit.endif.0_crit_edge: ; preds = %__skb_dequeue67.exit + br label %endif.0 + + then.0: ; preds = %__skb_dequeue67.exit + br label %job_done + + dead_block_after_goto: ; No predecessors! + unreachable + + endif.0: ; preds = %__skb_dequeue67.exit.endif.0_crit_edge + br bool false, label %then.0.i, label %endif.0.endif.0.i_crit_edge + + endif.0.endif.0.i_crit_edge: ; preds = %endif.0 + br label %endif.0.i + + then.0.i: ; preds = %endif.0 + br label %endif.0.i + + endif.0.i: ; preds = %then.0.i, %endif.0.endif.0.i_crit_edge + br bool false, label %then.i.i, label %endif.0.i.skb_bond.exit.i_crit_edge + + endif.0.i.skb_bond.exit.i_crit_edge: ; preds = %endif.0.i + br label %skb_bond.exit.i + + then.i.i: ; preds = %endif.0.i + br label %skb_bond.exit.i + + skb_bond.exit.i: ; preds = %then.i.i, %endif.0.i.skb_bond.exit.i_crit_edge + br label %loopentry.0.i + + loopentry.0.i: ; preds = %loopentry.0.i.backedge, %skb_bond.exit.i + br bool false, label %loopentry.0.i.no_exit.0.i_crit_edge, label %loopentry.0.i.loopexit.0.i_crit_edge + + loopentry.0.i.loopexit.0.i_crit_edge: ; preds = %loopentry.0.i + br label %loopexit.0.i + + loopentry.0.i.no_exit.0.i_crit_edge: ; preds = %loopentry.0.i + br label %no_exit.0.i + + no_exit.0.i: ; preds = %then.3.i.no_exit.0.i_crit_edge, %loopentry.0.i.no_exit.0.i_crit_edge + br bool false, label %no_exit.0.i.shortcirc_done.0.i_crit_edge, label %shortcirc_next.0.i + + no_exit.0.i.shortcirc_done.0.i_crit_edge: ; preds = %no_exit.0.i + br label %shortcirc_done.0.i + + shortcirc_next.0.i: ; preds = %no_exit.0.i + br label %shortcirc_done.0.i + + shortcirc_done.0.i: ; preds = %shortcirc_next.0.i, %no_exit.0.i.shortcirc_done.0.i_crit_edge + br bool false, label %then.1.i, label %endif.1.i + + then.1.i: ; preds = %shortcirc_done.0.i + br bool false, label %then.2.i, label %then.1.i.endif.2.i_crit_edge + + then.1.i.endif.2.i_crit_edge: ; preds = %then.1.i + br label %endif.2.i + + then.2.i: ; preds = %then.1.i + br bool false, label %then.3.i, label %else.0.i + + then.3.i: ; preds = %then.2.i + br bool false, label %then.3.i.no_exit.0.i_crit_edge, label %then.3.i.loopexit.0.i_crit_edge + + then.3.i.loopexit.0.i_crit_edge: ; preds = %then.3.i + br label %loopexit.0.i + + then.3.i.no_exit.0.i_crit_edge: ; preds = %then.3.i + br label %no_exit.0.i + + else.0.i: ; preds = %then.2.i + br label %endif.2.i + + endif.3.i: ; No predecessors! + unreachable + + endif.2.i: ; preds = %else.0.i, %then.1.i.endif.2.i_crit_edge + br label %loopentry.0.i.backedge + + endif.1.i: ; preds = %shortcirc_done.0.i + br label %loopentry.0.i.backedge + + loopentry.0.i.backedge: ; preds = %endif.1.i, %endif.2.i + br label %loopentry.0.i + + loopexit.0.i: ; preds = %then.3.i.loopexit.0.i_crit_edge, %loopentry.0.i.loopexit.0.i_crit_edge + br label %loopentry.1.i + + loopentry.1.i: ; preds = %loopentry.1.i.backedge, %loopexit.0.i + br bool false, label %loopentry.1.i.no_exit.1.i_crit_edge, label %loopentry.1.i.loopexit.1.i_crit_edge + + loopentry.1.i.loopexit.1.i_crit_edge: ; preds = %loopentry.1.i + br label %loopexit.1.i + + loopentry.1.i.no_exit.1.i_crit_edge: ; preds = %loopentry.1.i + br label %no_exit.1.i + + no_exit.1.i: ; preds = %then.6.i.no_exit.1.i_crit_edge, %loopentry.1.i.no_exit.1.i_crit_edge + br bool false, label %shortcirc_next.1.i, label %no_exit.1.i.shortcirc_done.1.i_crit_edge + + no_exit.1.i.shortcirc_done.1.i_crit_edge: ; preds = %no_exit.1.i + br label %shortcirc_done.1.i + + shortcirc_next.1.i: ; preds = %no_exit.1.i + br bool false, label %shortcirc_next.1.i.shortcirc_done.2.i_crit_edge, label %shortcirc_next.2.i + + shortcirc_next.1.i.shortcirc_done.2.i_crit_edge: ; preds = %shortcirc_next.1.i + br label %shortcirc_done.2.i + + shortcirc_next.2.i: ; preds = %shortcirc_next.1.i + br label %shortcirc_done.2.i + + shortcirc_done.2.i: ; preds = %shortcirc_next.2.i, %shortcirc_next.1.i.shortcirc_done.2.i_crit_edge + br label %shortcirc_done.1.i + + shortcirc_done.1.i: ; preds = %shortcirc_done.2.i, %no_exit.1.i.shortcirc_done.1.i_crit_edge + br bool false, label %then.4.i, label %endif.4.i + + then.4.i: ; preds = %shortcirc_done.1.i + br bool false, label %then.5.i, label %then.4.i.endif.5.i_crit_edge + + then.4.i.endif.5.i_crit_edge: ; preds = %then.4.i + br label %endif.5.i + + then.5.i: ; preds = %then.4.i + br bool false, label %then.6.i, label %else.1.i + + then.6.i: ; preds = %then.5.i + br bool false, label %then.6.i.no_exit.1.i_crit_edge, label %then.6.i.loopexit.1.i_crit_edge + + then.6.i.loopexit.1.i_crit_edge: ; preds = %then.6.i + br label %loopexit.1.i + + then.6.i.no_exit.1.i_crit_edge: ; preds = %then.6.i + br label %no_exit.1.i + + else.1.i: ; preds = %then.5.i + br label %endif.5.i + + endif.6.i: ; No predecessors! + unreachable + + endif.5.i: ; preds = %else.1.i, %then.4.i.endif.5.i_crit_edge + br label %loopentry.1.i.backedge + + endif.4.i: ; preds = %shortcirc_done.1.i + br label %loopentry.1.i.backedge + + loopentry.1.i.backedge: ; preds = %endif.4.i, %endif.5.i + br label %loopentry.1.i + + loopexit.1.i: ; preds = %then.6.i.loopexit.1.i_crit_edge, %loopentry.1.i.loopexit.1.i_crit_edge + br bool false, label %then.7.i, label %else.2.i + + then.7.i: ; preds = %loopexit.1.i + br bool false, label %then.8.i, label %else.3.i + + then.8.i: ; preds = %then.7.i + br label %netif_receive_skb.exit + + else.3.i: ; preds = %then.7.i + br label %netif_receive_skb.exit + + endif.8.i: ; No predecessors! + unreachable + + else.2.i: ; preds = %loopexit.1.i + br bool false, label %else.2.i.shortcirc_done.i.i_crit_edge, label %shortcirc_next.i.i + + else.2.i.shortcirc_done.i.i_crit_edge: ; preds = %else.2.i + br label %shortcirc_done.i.i + + shortcirc_next.i.i: ; preds = %else.2.i + br label %shortcirc_done.i.i + + shortcirc_done.i.i: ; preds = %shortcirc_next.i.i, %else.2.i.shortcirc_done.i.i_crit_edge + br bool false, label %then.i1.i, label %shortcirc_done.i.i.kfree_skb65.exit.i_crit_edge + + shortcirc_done.i.i.kfree_skb65.exit.i_crit_edge: ; preds = %shortcirc_done.i.i + br label %kfree_skb65.exit.i + + then.i1.i: ; preds = %shortcirc_done.i.i + br label %kfree_skb65.exit.i + + kfree_skb65.exit.i: ; preds = %then.i1.i, %shortcirc_done.i.i.kfree_skb65.exit.i_crit_edge + br label %netif_receive_skb.exit + + netif_receive_skb.exit: ; preds = %kfree_skb65.exit.i, %else.3.i, %then.8.i + br bool false, label %then.i1, label %netif_receive_skb.exit.dev_put69.exit_crit_edge + + netif_receive_skb.exit.dev_put69.exit_crit_edge: ; preds = %netif_receive_skb.exit + br label %dev_put69.exit + + then.i1: ; preds = %netif_receive_skb.exit + br label %dev_put69.exit + + dev_put69.exit: ; preds = %then.i1, %netif_receive_skb.exit.dev_put69.exit_crit_edge + %inc = add int 0, 1 ; [#uses=1] + br bool false, label %dev_put69.exit.shortcirc_done_crit_edge, label %shortcirc_next + + dev_put69.exit.shortcirc_done_crit_edge: ; preds = %dev_put69.exit + br label %shortcirc_done + + shortcirc_next: ; preds = %dev_put69.exit + br label %shortcirc_done + + shortcirc_done: ; preds = %shortcirc_next, %dev_put69.exit.shortcirc_done_crit_edge + br bool false, label %then.1, label %endif.1 + + then.1: ; preds = %shortcirc_done + ret void + + dead_block_after_break: ; No predecessors! + br label %loopentry.preheader + + endif.1: ; preds = %shortcirc_done + br label %loopentry + + loopexit: ; No predecessors! + unreachable + + after_ret.0: ; No predecessors! + br label %job_done + + job_done: ; preds = %after_ret.0, %then.0 + br label %loopentry.i + + loopentry.i: ; preds = %no_exit.i, %job_done + br bool false, label %no_exit.i, label %clear_bit62.exit + + no_exit.i: ; preds = %loopentry.i + br label %loopentry.i + + clear_bit62.exit: ; preds = %loopentry.i + br bool false, label %then.2, label %endif.2 + + then.2: ; preds = %clear_bit62.exit + ret void + + endif.2: ; preds = %clear_bit62.exit + ret void + + after_ret.1: ; No predecessors! + ret void + + return: ; No predecessors! + unreachable + } From sabre at nondot.org Tue Oct 31 11:52:32 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 31 Oct 2006 11:52:32 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/LCSSA.cpp Message-ID: <200610311752.k9VHqWTK025378@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: LCSSA.cpp updated: 1.28 -> 1.29 --- Log message: Fix PR977: http://llvm.org/PR977 and Transforms/LCSSA/2006-10-31-UnreachableBlock.ll --- Diffs of the changes: (+8 -1) LCSSA.cpp | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletion(-) Index: llvm/lib/Transforms/Utils/LCSSA.cpp diff -u llvm/lib/Transforms/Utils/LCSSA.cpp:1.28 llvm/lib/Transforms/Utils/LCSSA.cpp:1.29 --- llvm/lib/Transforms/Utils/LCSSA.cpp:1.28 Sun Aug 27 17:42:52 2006 +++ llvm/lib/Transforms/Utils/LCSSA.cpp Tue Oct 31 11:52:18 2006 @@ -184,7 +184,14 @@ // Otherwise, patch up uses of the value with the appropriate LCSSA Phi, // inserting PHI nodes into join points where needed. - Value *Val = GetValueForBlock(DT->getNode(UserBB), Instr, Phis); + DominatorTree::Node *UserBBNode = DT->getNode(UserBB); + + // If the block has no dominator info, it is unreachable. + Value *Val; + if (UserBBNode) + Val = GetValueForBlock(UserBBNode, Instr, Phis); + else + Val = UndefValue::get(Instr->getType()); // Preincrement the iterator to avoid invalidating it when we change the // value. From sabre at nondot.org Tue Oct 31 12:56:40 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 31 Oct 2006 12:56:40 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/LCSSA/2006-10-31-UnreachableBlock-2.ll Message-ID: <200610311856.k9VIueMs026445@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/LCSSA: 2006-10-31-UnreachableBlock-2.ll added (r1.1) --- Log message: another testcase for PR977: http://llvm.org/PR977 --- Diffs of the changes: (+210 -0) 2006-10-31-UnreachableBlock-2.ll | 210 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 210 insertions(+) Index: llvm/test/Regression/Transforms/LCSSA/2006-10-31-UnreachableBlock-2.ll diff -c /dev/null llvm/test/Regression/Transforms/LCSSA/2006-10-31-UnreachableBlock-2.ll:1.1 *** /dev/null Tue Oct 31 12:56:35 2006 --- llvm/test/Regression/Transforms/LCSSA/2006-10-31-UnreachableBlock-2.ll Tue Oct 31 12:56:24 2006 *************** *** 0 **** --- 1,210 ---- + ; RUN: llvm-as < %s | opt -lcssa -disable-output + ; PR977 + + declare int %opost_block() + + void %write_chan() { + entry: + br bool false, label %shortcirc_next.0, label %shortcirc_done.0 + + shortcirc_next.0: ; preds = %entry + br label %shortcirc_done.0 + + shortcirc_done.0: ; preds = %shortcirc_next.0, %entry + br bool false, label %shortcirc_next.1, label %shortcirc_done.1 + + shortcirc_next.1: ; preds = %shortcirc_done.0 + br label %shortcirc_done.1 + + shortcirc_done.1: ; preds = %shortcirc_next.1, %shortcirc_done.0 + br bool false, label %then.0, label %endif.0 + + then.0: ; preds = %shortcirc_done.1 + br bool false, label %then.1, label %endif.1 + + then.1: ; preds = %then.0 + br label %return + + after_ret.0: ; No predecessors! + br label %endif.1 + + endif.1: ; preds = %after_ret.0, %then.0 + br label %endif.0 + + endif.0: ; preds = %endif.1, %shortcirc_done.1 + br label %loopentry.0 + + loopentry.0: ; preds = %endif.12, %endif.0 + br bool false, label %then.2, label %endif.2 + + then.2: ; preds = %loopentry.0 + br label %loopexit.0 + + dead_block_after_break.0: ; No predecessors! + br label %endif.2 + + endif.2: ; preds = %dead_block_after_break.0, %loopentry.0 + br bool false, label %shortcirc_done.2, label %shortcirc_next.2 + + shortcirc_next.2: ; preds = %endif.2 + br bool false, label %shortcirc_next.3, label %shortcirc_done.3 + + shortcirc_next.3: ; preds = %shortcirc_next.2 + br label %shortcirc_done.3 + + shortcirc_done.3: ; preds = %shortcirc_next.3, %shortcirc_next.2 + br label %shortcirc_done.2 + + shortcirc_done.2: ; preds = %shortcirc_done.3, %endif.2 + br bool false, label %then.3, label %endif.3 + + then.3: ; preds = %shortcirc_done.2 + br label %loopexit.0 + + dead_block_after_break.1: ; No predecessors! + br label %endif.3 + + endif.3: ; preds = %dead_block_after_break.1, %shortcirc_done.2 + br bool false, label %shortcirc_next.4, label %shortcirc_done.4 + + shortcirc_next.4: ; preds = %endif.3 + br label %shortcirc_done.4 + + shortcirc_done.4: ; preds = %shortcirc_next.4, %endif.3 + br bool false, label %then.4, label %else + + then.4: ; preds = %shortcirc_done.4 + br label %loopentry.1 + + loopentry.1: ; preds = %endif.8, %then.4 + br bool false, label %no_exit, label %loopexit.1 + + no_exit: ; preds = %loopentry.1 + %tmp.94 = call int %opost_block( ) ; [#uses=1] + br bool false, label %then.5, label %endif.5 + + then.5: ; preds = %no_exit + br bool false, label %then.6, label %endif.6 + + then.6: ; preds = %then.5 + br label %loopexit.1 + + dead_block_after_break.2: ; No predecessors! + br label %endif.6 + + endif.6: ; preds = %dead_block_after_break.2, %then.5 + br label %break_out + + dead_block_after_goto.0: ; No predecessors! + br label %endif.5 + + endif.5: ; preds = %dead_block_after_goto.0, %no_exit + br bool false, label %then.7, label %endif.7 + + then.7: ; preds = %endif.5 + br label %loopexit.1 + + dead_block_after_break.3: ; No predecessors! + br label %endif.7 + + endif.7: ; preds = %dead_block_after_break.3, %endif.5 + switch uint 1, label %switchexit [ + uint 4, label %label.2 + uint 2, label %label.1 + uint 1, label %label.0 + ] + + label.0: ; preds = %endif.7 + br label %switchexit + + dead_block_after_break.4: ; No predecessors! + br label %label.1 + + label.1: ; preds = %dead_block_after_break.4, %endif.7 + br label %switchexit + + dead_block_after_break.5: ; No predecessors! + br label %label.2 + + label.2: ; preds = %dead_block_after_break.5, %endif.7 + br label %switchexit + + dead_block_after_break.6: ; No predecessors! + br label %switchexit + + switchexit: ; preds = %dead_block_after_break.6, %label.2, %label.1, %label.0, %endif.7 + br bool false, label %then.8, label %endif.8 + + then.8: ; preds = %switchexit + br label %loopexit.1 + + dead_block_after_break.7: ; No predecessors! + br label %endif.8 + + endif.8: ; preds = %dead_block_after_break.7, %switchexit + br label %loopentry.1 + + loopexit.1: ; preds = %then.8, %then.7, %then.6, %loopentry.1 + br bool false, label %then.9, label %endif.9 + + then.9: ; preds = %loopexit.1 + br label %endif.9 + + endif.9: ; preds = %then.9, %loopexit.1 + br label %endif.4 + + else: ; preds = %shortcirc_done.4 + br bool false, label %then.10, label %endif.10 + + then.10: ; preds = %else + br label %break_out + + dead_block_after_goto.1: ; No predecessors! + br label %endif.10 + + endif.10: ; preds = %dead_block_after_goto.1, %else + br label %endif.4 + + endif.4: ; preds = %endif.10, %endif.9 + br bool false, label %then.11, label %endif.11 + + then.11: ; preds = %endif.4 + br label %loopexit.0 + + dead_block_after_break.8: ; No predecessors! + br label %endif.11 + + endif.11: ; preds = %dead_block_after_break.8, %endif.4 + br bool false, label %then.12, label %endif.12 + + then.12: ; preds = %endif.11 + br label %loopexit.0 + + dead_block_after_break.9: ; No predecessors! + br label %endif.12 + + endif.12: ; preds = %dead_block_after_break.9, %endif.11 + br label %loopentry.0 + + loopexit.0: ; preds = %then.12, %then.11, %then.3, %then.2 + br label %break_out + + break_out: ; preds = %loopexit.0, %then.10, %endif.6 + %retval.3 = phi int [ 0, %loopexit.0 ], [ %tmp.94, %endif.6 ], [ 0, %then.10 ] ; [#uses=0] + br bool false, label %cond_true, label %cond_false + + cond_true: ; preds = %break_out + br label %cond_continue + + cond_false: ; preds = %break_out + br label %cond_continue + + cond_continue: ; preds = %cond_false, %cond_true + br label %return + + after_ret.1: ; No predecessors! + br label %return + + return: ; preds = %after_ret.1, %cond_continue, %then.1 + ret void + } From sabre at nondot.org Tue Oct 31 12:57:02 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 31 Oct 2006 12:57:02 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/LCSSA.cpp Message-ID: <200610311857.k9VIv2WE026462@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: LCSSA.cpp updated: 1.29 -> 1.30 --- Log message: generalize the fix for PR977: http://llvm.org/PR977 to also fix Transforms/LCSSA/2006-10-31-UnreachableBlock-2.ll --- Diffs of the changes: (+26 -28) LCSSA.cpp | 54 ++++++++++++++++++++++++++---------------------------- 1 files changed, 26 insertions(+), 28 deletions(-) Index: llvm/lib/Transforms/Utils/LCSSA.cpp diff -u llvm/lib/Transforms/Utils/LCSSA.cpp:1.29 llvm/lib/Transforms/Utils/LCSSA.cpp:1.30 --- llvm/lib/Transforms/Utils/LCSSA.cpp:1.29 Tue Oct 31 11:52:18 2006 +++ llvm/lib/Transforms/Utils/LCSSA.cpp Tue Oct 31 12:56:48 2006 @@ -71,8 +71,8 @@ private: SetVector getLoopValuesUsedOutsideLoop(Loop *L); - PHINode *GetValueForBlock(DominatorTree::Node *BB, Instruction *OrigInst, - std::map &Phis); + Value *GetValueForBlock(DominatorTree::Node *BB, Instruction *OrigInst, + std::map &Phis); /// inLoop - returns true if the given block is within the current loop const bool inLoop(BasicBlock* B) { @@ -140,7 +140,7 @@ ++NumLCSSA; // We are applying the transformation // Keep track of the blocks that have the value available already. - std::map Phis; + std::map Phis; DominatorTree::Node *InstrNode = DT->getNode(Instr->getParent()); @@ -150,18 +150,18 @@ BBE = exitBlocks.end(); BBI != BBE; ++BBI) { BasicBlock *BB = *BBI; DominatorTree::Node *ExitBBNode = DT->getNode(BB); - PHINode *&Phi = Phis[ExitBBNode]; + Value *&Phi = Phis[ExitBBNode]; if (!Phi && InstrNode->dominates(ExitBBNode)) { - Phi = new PHINode(Instr->getType(), Instr->getName()+".lcssa", - BB->begin()); - Phi->reserveOperandSpace(std::distance(pred_begin(BB), pred_end(BB))); + PHINode *PN = new PHINode(Instr->getType(), Instr->getName()+".lcssa", + BB->begin()); + PN->reserveOperandSpace(std::distance(pred_begin(BB), pred_end(BB))); + + // Remember that this phi makes the value alive in this block. + Phi = PN; // Add inputs from inside the loop for this PHI. for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI) - Phi->addIncoming(Instr, *PI); - - // Remember that this phi makes the value alive in this block. - Phis[ExitBBNode] = Phi; + PN->addIncoming(Instr, *PI); } } @@ -184,14 +184,7 @@ // Otherwise, patch up uses of the value with the appropriate LCSSA Phi, // inserting PHI nodes into join points where needed. - DominatorTree::Node *UserBBNode = DT->getNode(UserBB); - - // If the block has no dominator info, it is unreachable. - Value *Val; - if (UserBBNode) - Val = GetValueForBlock(UserBBNode, Instr, Phis); - else - Val = UndefValue::get(Instr->getType()); + Value *Val = GetValueForBlock(DT->getNode(UserBB), Instr, Phis); // Preincrement the iterator to avoid invalidating it when we change the // value. @@ -233,10 +226,14 @@ /// GetValueForBlock - Get the value to use within the specified basic block. /// available values are in Phis. -PHINode *LCSSA::GetValueForBlock(DominatorTree::Node *BB, Instruction *OrigInst, - std::map &Phis) { +Value *LCSSA::GetValueForBlock(DominatorTree::Node *BB, Instruction *OrigInst, + std::map &Phis) { + // If there is no dominator info for this BB, it is unreachable. + if (BB == 0) + return UndefValue::get(OrigInst->getType()); + // If we have already computed this value, return the previously computed val. - PHINode *&V = Phis[BB]; + Value *&V = Phis[BB]; if (V) return V; DominatorTree::Node *IDom = BB->getIDom(); @@ -262,13 +259,14 @@ // Otherwise, the idom is the loop, so we need to insert a PHI node. Do so // now, then get values to fill in the incoming values for the PHI. - V = new PHINode(OrigInst->getType(), OrigInst->getName()+".lcssa", - BBN->begin()); - V->reserveOperandSpace(std::distance(pred_begin(BBN), pred_end(BBN))); - + PHINode *PN = new PHINode(OrigInst->getType(), OrigInst->getName()+".lcssa", + BBN->begin()); + PN->reserveOperandSpace(std::distance(pred_begin(BBN), pred_end(BBN))); + V = PN; + // Fill in the incoming values for the block. for (pred_iterator PI = pred_begin(BBN), E = pred_end(BBN); PI != E; ++PI) - V->addIncoming(GetValueForBlock(DT->getNode(*PI), OrigInst, Phis), *PI); - return V; + PN->addIncoming(GetValueForBlock(DT->getNode(*PI), OrigInst, Phis), *PI); + return PN; } From sabre at nondot.org Tue Oct 31 13:40:59 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 31 Oct 2006 13:40:59 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetLowering.h Message-ID: <200610311940.k9VJexWl026953@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetLowering.h updated: 1.82 -> 1.83 --- Log message: Change the prototype for TargetLowering::isOperandValidForConstraint --- Diffs of the changes: (+6 -3) TargetLowering.h | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) Index: llvm/include/llvm/Target/TargetLowering.h diff -u llvm/include/llvm/Target/TargetLowering.h:1.82 llvm/include/llvm/Target/TargetLowering.h:1.83 --- llvm/include/llvm/Target/TargetLowering.h:1.82 Fri Oct 13 16:08:54 2006 +++ llvm/include/llvm/Target/TargetLowering.h Tue Oct 31 13:40:43 2006 @@ -694,9 +694,12 @@ MVT::ValueType VT) const; - /// isOperandValidForConstraint - Return true if the specified SDOperand is - /// valid for the specified target constraint letter. - virtual bool isOperandValidForConstraint(SDOperand Op, char ConstraintLetter); + /// isOperandValidForConstraint - Return the specified operand (possibly + /// modified) if the specified SDOperand is valid for the specified target + /// constraint letter, otherwise return null. + virtual SDOperand + isOperandValidForConstraint(SDOperand Op, char ConstraintLetter, + SelectionDAG &DAG); //===--------------------------------------------------------------------===// // Scheduler hooks From sabre at nondot.org Tue Oct 31 13:41:00 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 31 Oct 2006 13:41:00 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp Message-ID: <200610311941.k9VJf0Fu026958@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: TargetLowering.cpp updated: 1.77 -> 1.78 --- Log message: Change the prototype for TargetLowering::isOperandValidForConstraint --- Diffs of the changes: (+8 -5) TargetLowering.cpp | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp diff -u llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.77 llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.78 --- llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.77 Fri Oct 13 16:12:22 2006 +++ llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp Tue Oct 31 13:40:42 2006 @@ -1300,18 +1300,21 @@ } } -bool TargetLowering::isOperandValidForConstraint(SDOperand Op, - char ConstraintLetter) { +/// isOperandValidForConstraint - Return the specified operand (possibly +/// modified) if the specified SDOperand is valid for the specified target +/// constraint letter, otherwise return null. +SDOperand TargetLowering::isOperandValidForConstraint(SDOperand Op, + char ConstraintLetter, + SelectionDAG &DAG) { switch (ConstraintLetter) { - default: return false; + default: return SDOperand(0,0); case 'i': // Simple Integer or Relocatable Constant case 'n': // Simple Integer case 's': // Relocatable Constant - return true; // FIXME: not right. + return Op; // FIXME: not right. } } - std::vector TargetLowering:: getRegClassForInlineAsmConstraint(const std::string &Constraint, MVT::ValueType VT) const { From sabre at nondot.org Tue Oct 31 13:41:00 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 31 Oct 2006 13:41:00 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelLowering.cpp PPCISelLowering.h Message-ID: <200610311941.k9VJf0G9026965@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCISelLowering.cpp updated: 1.215 -> 1.216 PPCISelLowering.h updated: 1.52 -> 1.53 --- Log message: Change the prototype for TargetLowering::isOperandValidForConstraint --- Diffs of the changes: (+20 -12) PPCISelLowering.cpp | 29 ++++++++++++++++++----------- PPCISelLowering.h | 3 ++- 2 files changed, 20 insertions(+), 12 deletions(-) Index: llvm/lib/Target/PowerPC/PPCISelLowering.cpp diff -u llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.215 llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.216 --- llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.215 Mon Oct 30 02:02:39 2006 +++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp Tue Oct 31 13:40:43 2006 @@ -2658,8 +2658,8 @@ } // isOperandValidForConstraint -bool PPCTargetLowering:: -isOperandValidForConstraint(SDOperand Op, char Letter) { +SDOperand PPCTargetLowering:: +isOperandValidForConstraint(SDOperand Op, char Letter, SelectionDAG &DAG) { switch (Letter) { default: break; case 'I': @@ -2670,32 +2670,39 @@ case 'N': case 'O': case 'P': { - if (!isa(Op)) return false; // Must be an immediate. + if (!isa(Op)) return SDOperand(0,0);// Must be an immediate. unsigned Value = cast(Op)->getValue(); switch (Letter) { default: assert(0 && "Unknown constraint letter!"); case 'I': // "I" is a signed 16-bit constant. - return (short)Value == (int)Value; + if ((short)Value == (int)Value) return Op; + break; case 'J': // "J" is a constant with only the high-order 16 bits nonzero. case 'L': // "L" is a signed 16-bit constant shifted left 16 bits. - return (short)Value == 0; + if ((short)Value == 0) return Op; + break; case 'K': // "K" is a constant with only the low-order 16 bits nonzero. - return (Value >> 16) == 0; + if ((Value >> 16) == 0) return Op; + break; case 'M': // "M" is a constant that is greater than 31. - return Value > 31; + if (Value > 31) return Op; + break; case 'N': // "N" is a positive constant that is an exact power of two. - return (int)Value > 0 && isPowerOf2_32(Value); + if ((int)Value > 0 && isPowerOf2_32(Value)) return Op; + break; case 'O': // "O" is the constant zero. - return Value == 0; + if (Value == 0) return Op; + break; case 'P': // "P" is a constant whose negation is a signed 16-bit constant. - return (short)-Value == (int)-Value; + if ((short)-Value == (int)-Value) return Op; + break; } break; } } // Handle standard constraint letters. - return TargetLowering::isOperandValidForConstraint(Op, Letter); + return TargetLowering::isOperandValidForConstraint(Op, Letter, DAG); } /// isLegalAddressImmediate - Return true if the integer value can be used Index: llvm/lib/Target/PowerPC/PPCISelLowering.h diff -u llvm/lib/Target/PowerPC/PPCISelLowering.h:1.52 llvm/lib/Target/PowerPC/PPCISelLowering.h:1.53 --- llvm/lib/Target/PowerPC/PPCISelLowering.h:1.52 Sun Aug 27 20:02:49 2006 +++ llvm/lib/Target/PowerPC/PPCISelLowering.h Tue Oct 31 13:40:43 2006 @@ -194,7 +194,8 @@ std::vector getRegClassForInlineAsmConstraint(const std::string &Constraint, MVT::ValueType VT) const; - bool isOperandValidForConstraint(SDOperand Op, char ConstraintLetter); + SDOperand isOperandValidForConstraint(SDOperand Op, char ConstraintLetter, + SelectionDAG &DAG); /// isLegalAddressImmediate - Return true if the integer value can be used /// as the offset of the target addressing mode. From sabre at nondot.org Tue Oct 31 13:41:32 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 31 Oct 2006 13:41:32 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200610311941.k9VJfW83027023@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.309 -> 1.310 --- Log message: TargetLowering::isOperandValidForConstraint --- Diffs of the changes: (+7 -2) SelectionDAGISel.cpp | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.309 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.310 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.309 Tue Oct 31 01:33:13 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Oct 31 13:41:18 2006 @@ -2487,8 +2487,13 @@ CTy = TLI.getConstraintType(ConstraintCode[0]); if (CTy == TargetLowering::C_Other) { - if (!TLI.isOperandValidForConstraint(InOperandVal, ConstraintCode[0])) - assert(0 && "MATCH FAIL!"); + InOperandVal = TLI.isOperandValidForConstraint(InOperandVal, + ConstraintCode[0], DAG); + if (!InOperandVal.Val) { + std::cerr << "Invalid operand for inline asm constraint '" + << ConstraintCode << "'!\n"; + exit(1); + } // Add information to the INLINEASM node to know about this input. unsigned ResOpType = 3 /*IMM*/ | (1 << 3); From sabre at nondot.org Tue Oct 31 13:42:59 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 31 Oct 2006 13:42:59 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp Message-ID: <200610311942.k9VJgxxC027119@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelLowering.cpp updated: 1.284 -> 1.285 --- Log message: handle "st" as "st(0)" --- Diffs of the changes: (+12 -3) X86ISelLowering.cpp | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.284 llvm/lib/Target/X86/X86ISelLowering.cpp:1.285 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.284 Tue Oct 31 02:31:24 2006 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Tue Oct 31 13:42:44 2006 @@ -32,6 +32,7 @@ #include "llvm/Support/MathExtras.h" #include "llvm/Target/TargetOptions.h" #include "llvm/Support/CommandLine.h" +#include "llvm/ADT/StringExtras.h" using namespace llvm; // FIXME: temporary. @@ -5532,9 +5533,17 @@ // constraint into a member of a register class. std::pair Res; Res = TargetLowering::getRegForInlineAsmConstraint(Constraint, VT); - - // Not found? Bail out. - if (Res.second == 0) return Res; + + // Not found as a standard register? + if (Res.second == 0) { + // GCC calls "st(0)" just plain "st". + if (StringsEqualNoCase("{st}", Constraint)) { + Res.first = X86::ST0; + Res.second = X86::RSTRegisterClass; + } + + return Res; + } // Otherwise, check to see if this is a register class of the wrong value // type. For example, we want to map "{ax},i32" -> {eax}, we don't want it to From alenhar2 at cs.uiuc.edu Tue Oct 31 13:51:23 2006 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Tue, 31 Oct 2006 13:51:23 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/Alpha/add.ll mul5.ll s4addl.ll s4addq.ll Message-ID: <200610311951.k9VJpNjY025947@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/Alpha: add.ll added (r1.1) mul5.ll updated: 1.3 -> 1.4 s4addl.ll (r1.1) removed s4addq.ll (r1.5) removed --- Log message: make one giant add and sub tester --- Diffs of the changes: (+188 -0) add.ll | 183 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ mul5.ll | 5 + 2 files changed, 188 insertions(+) Index: llvm/test/Regression/CodeGen/Alpha/add.ll diff -c /dev/null llvm/test/Regression/CodeGen/Alpha/add.ll:1.1 *** /dev/null Tue Oct 31 13:51:06 2006 --- llvm/test/Regression/CodeGen/Alpha/add.ll Tue Oct 31 13:50:55 2006 *************** *** 0 **** --- 1,183 ---- + ;test all the shifted and signextending adds and subs with and without consts + + ; RUN: llvm-as < %s | llc -march=alpha | grep ' addl' |wc -l |grep 2 + ; RUN: llvm-as < %s | llc -march=alpha | grep ' addq' |wc -l |grep 2 + ; RUN: llvm-as < %s | llc -march=alpha | grep ' subl' |wc -l |grep 2 + ; RUN: llvm-as < %s | llc -march=alpha | grep ' subq' |wc -l |grep 1 + ; RUN: llvm-as < %s | llc -march=alpha | grep 'lda $0,-100($16)' |wc -l |grep 1 + + ; RUN: llvm-as < %s | llc -march=alpha | grep 's4addl' |wc -l |grep 2 + ; RUN: llvm-as < %s | llc -march=alpha | grep 's8addl' |wc -l |grep 2 + ; RUN: llvm-as < %s | llc -march=alpha | grep 's4addq' |wc -l |grep 2 + ; RUN: llvm-as < %s | llc -march=alpha | grep 's8addq' |wc -l |grep 2 + + ; RUN: llvm-as < %s | llc -march=alpha | grep 's4subl' |wc -l |grep 2 + ; RUN: llvm-as < %s | llc -march=alpha | grep 's8subl' |wc -l |grep 2 + ; RUN: llvm-as < %s | llc -march=alpha | grep 's4subq' |wc -l |grep 2 + ; RUN: llvm-as < %s | llc -march=alpha | grep 's8subq' |wc -l |grep 2 + + implementation ; Functions: + + int %al(int %x, int %y) { + entry: + %tmp.3 = add int %y, %x + ret int %tmp.3 + } + + int %ali(int %x) { + entry: + %tmp.3 = add int 100, %x + ret int %tmp.3 + } + + long %aq(long %x, long %y) { + entry: + %tmp.3 = add long %y, %x + ret long %tmp.3 + } + long %aqi(long %x) { + entry: + %tmp.3 = add long 100, %x + ret long %tmp.3 + } + + int %sl(int %x, int %y) { + entry: + %tmp.3 = sub int %y, %x + ret int %tmp.3 + } + + int %sli(int %x) { + entry: + %tmp.3 = sub int %x, 100 + ret int %tmp.3 + } + + long %sq(long %x, long %y) { + entry: + %tmp.3 = sub long %y, %x + ret long %tmp.3 + } + long %sqi(long %x) { + entry: + %tmp.3 = sub long %x, 100 + ret long %tmp.3 + } + + + + int %a4l(int %x, int %y) { + entry: + %tmp.1 = shl int %y, ubyte 2 + %tmp.3 = add int %tmp.1, %x + ret int %tmp.3 + } + + int %a8l(int %x, int %y) { + entry: + %tmp.1 = shl int %y, ubyte 3 + %tmp.3 = add int %tmp.1, %x + ret int %tmp.3 + } + + long %a4q(long %x, long %y) { + entry: + %tmp.1 = shl long %y, ubyte 2 + %tmp.3 = add long %tmp.1, %x + ret long %tmp.3 + } + + long %a8q(long %x, long %y) { + entry: + %tmp.1 = shl long %y, ubyte 3 + %tmp.3 = add long %tmp.1, %x + ret long %tmp.3 + } + + int %a4li(int %y) { + entry: + %tmp.1 = shl int %y, ubyte 2 + %tmp.3 = add int 100, %tmp.1 + ret int %tmp.3 + } + + int %a8li(int %y) { + entry: + %tmp.1 = shl int %y, ubyte 3 + %tmp.3 = add int 100, %tmp.1 + ret int %tmp.3 + } + + long %a4qi(long %y) { + entry: + %tmp.1 = shl long %y, ubyte 2 + %tmp.3 = add long 100, %tmp.1 + ret long %tmp.3 + } + + long %a8qi(long %y) { + entry: + %tmp.1 = shl long %y, ubyte 3 + %tmp.3 = add long 100, %tmp.1 + ret long %tmp.3 + } + + + + + int %s4l(int %x, int %y) { + entry: + %tmp.1 = shl int %y, ubyte 2 + %tmp.3 = sub int %tmp.1, %x + ret int %tmp.3 + } + + int %s8l(int %x, int %y) { + entry: + %tmp.1 = shl int %y, ubyte 3 + %tmp.3 = sub int %tmp.1, %x + ret int %tmp.3 + } + + long %s4q(long %x, long %y) { + entry: + %tmp.1 = shl long %y, ubyte 2 + %tmp.3 = sub long %tmp.1, %x + ret long %tmp.3 + } + + long %s8q(long %x, long %y) { + entry: + %tmp.1 = shl long %y, ubyte 3 + %tmp.3 = sub long %tmp.1, %x + ret long %tmp.3 + } + + int %s4li(int %y) { + entry: + %tmp.1 = shl int %y, ubyte 2 + %tmp.3 = sub int %tmp.1, 100 + ret int %tmp.3 + } + + int %s8li(int %y) { + entry: + %tmp.1 = shl int %y, ubyte 3 + %tmp.3 = sub int %tmp.1, 100 + ret int %tmp.3 + } + + long %s4qi(long %y) { + entry: + %tmp.1 = shl long %y, ubyte 2 + %tmp.3 = sub long %tmp.1, 100 + ret long %tmp.3 + } + + long %s8qi(long %y) { + entry: + %tmp.1 = shl long %y, ubyte 3 + %tmp.3 = sub long %tmp.1, 100 + ret long %tmp.3 + } + Index: llvm/test/Regression/CodeGen/Alpha/mul5.ll diff -u llvm/test/Regression/CodeGen/Alpha/mul5.ll:1.3 llvm/test/Regression/CodeGen/Alpha/mul5.ll:1.4 --- llvm/test/Regression/CodeGen/Alpha/mul5.ll:1.3 Sun Apr 2 23:14:39 2006 +++ llvm/test/Regression/CodeGen/Alpha/mul5.ll Tue Oct 31 13:50:55 2006 @@ -22,6 +22,11 @@ ulong %foo4ln(ulong %x) { entry: + %tmp.1 = mul ulong %x, 508 + ret ulong %tmp.1 +} +ulong %foo4ln_more(ulong %x) { +entry: %tmp.1 = mul ulong %x, 252 ret ulong %tmp.1 } From alenhar2 at cs.uiuc.edu Tue Oct 31 13:52:38 2006 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Tue, 31 Oct 2006 13:52:38 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp AlphaInstrInfo.td Message-ID: <200610311952.k9VJqcYN025977@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Target/Alpha: AlphaISelDAGToDAG.cpp updated: 1.59 -> 1.60 AlphaInstrInfo.td updated: 1.131 -> 1.132 --- Log message: Let us play simplify the td file (and fix a few missed sub and mul patterns). --- Diffs of the changes: (+63 -83) AlphaISelDAGToDAG.cpp | 8 ++ AlphaInstrInfo.td | 138 +++++++++++++++++++------------------------------- 2 files changed, 63 insertions(+), 83 deletions(-) Index: llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp diff -u llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.59 llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.60 --- llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.59 Fri Oct 20 02:07:24 2006 +++ llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp Tue Oct 31 13:52:12 2006 @@ -122,6 +122,14 @@ return comphigh; } + static bool chkRemNearPower2(uint64_t x, uint64_t r, bool swap) { + uint64_t y = getNearPower2(x); + if (swap) + return (y - x) == r; + else + return (x - y) == r; + } + static bool isFPZ(SDOperand N) { ConstantFPSDNode *CN = dyn_cast(N); return (CN && (CN->isExactlyValue(+0.0) || CN->isExactlyValue(-0.0))); Index: llvm/lib/Target/Alpha/AlphaInstrInfo.td diff -u llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.131 llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.132 --- llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.131 Tue Oct 31 10:49:55 2006 +++ llvm/lib/Target/Alpha/AlphaInstrInfo.td Tue Oct 31 13:52:12 2006 @@ -98,30 +98,18 @@ def immFPZ : PatLeaf<(fpimm), [{ //the only fpconstant nodes are +/- 0.0 return true; }]>; -def immRem1 : PatLeaf<(imm), [{ - return N->getValue() - getNearPower2((uint64_t)N->getValue()) == 1; -}]>; -def immRem3 : PatLeaf<(imm), [{ - return N->getValue() - getNearPower2((uint64_t)N->getValue()) == 3; -}]>; -def immRem4 : PatLeaf<(imm), [{ - return N->getValue() - getNearPower2((uint64_t)N->getValue()) == 4; -}]>; -def immRem5 : PatLeaf<(imm), [{ - return N->getValue() - getNearPower2((uint64_t)N->getValue()) == 5; -}]>; -def immRem1n : PatLeaf<(imm), [{ - return getNearPower2((uint64_t)N->getValue()) - N->getValue() == 1; -}]>; -def immRem3n : PatLeaf<(imm), [{ - return getNearPower2((uint64_t)N->getValue()) - N->getValue() == 3; -}]>; -def immRem4n : PatLeaf<(imm), [{ - return getNearPower2((uint64_t)N->getValue()) - N->getValue() == 4; -}]>; -def immRem5n : PatLeaf<(imm), [{ - return getNearPower2((uint64_t)N->getValue()) - N->getValue() == 5; -}]>; + +def immRem1 : PatLeaf<(imm), [{return chkRemNearPower2(N->getValue(),1, 0);}]>; +def immRem2 : PatLeaf<(imm), [{return chkRemNearPower2(N->getValue(),2, 0);}]>; +def immRem3 : PatLeaf<(imm), [{return chkRemNearPower2(N->getValue(),3, 0);}]>; +def immRem4 : PatLeaf<(imm), [{return chkRemNearPower2(N->getValue(),4, 0);}]>; +def immRem5 : PatLeaf<(imm), [{return chkRemNearPower2(N->getValue(),5, 0);}]>; +def immRem1n : PatLeaf<(imm), [{return chkRemNearPower2(N->getValue(),1, 1);}]>; +def immRem2n : PatLeaf<(imm), [{return chkRemNearPower2(N->getValue(),2, 1);}]>; +def immRem3n : PatLeaf<(imm), [{return chkRemNearPower2(N->getValue(),3, 1);}]>; +def immRem4n : PatLeaf<(imm), [{return chkRemNearPower2(N->getValue(),4, 1);}]>; +def immRem5n : PatLeaf<(imm), [{return chkRemNearPower2(N->getValue(),5, 1);}]>; + def immRemP2n : PatLeaf<(imm), [{ return isPowerOf2_64(getNearPower2((uint64_t)N->getValue()) - N->getValue()); }]>; @@ -146,7 +134,7 @@ (add (shl node:$op1, 3), node:$op2)>; def sub8 : PatFrag<(ops node:$op1, node:$op2), (sub (shl node:$op1, 3), node:$op2)>; - +class BinOpFrag : PatFrag<(ops node:$LHS, node:$RHS), res>; //Pseudo ops for selection @@ -234,15 +222,34 @@ def : Pat<(select (setle GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE), (CMOVLEi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>; +multiclass all_inst opc, bits<7> funl, bits<7> funq, + string asmstr, PatFrag OpNode, InstrItinClass itin> { + def L : OForm< opc, funl, !strconcat(asmstr, "l $RA,$RB,$RC"), + [(set GPRC:$RC, (intop (OpNode GPRC:$RA, GPRC:$RB)))], itin>; + def Li : OFormL; + def Q : OForm< opc, funq, !strconcat(asmstr, "q $RA,$RB,$RC"), + [(set GPRC:$RC, (OpNode GPRC:$RA, GPRC:$RB))], itin>; + def Qi : OFormL; +} + +defm MUL : all_inst<0x13, 0x00, 0x20, "mul", BinOpFrag<(mul node:$LHS, node:$RHS)>, s_imul>; +defm ADD : all_inst<0x10, 0x00, 0x20, "add", BinOpFrag<(add node:$LHS, node:$RHS)>, s_iadd>; +defm S4ADD : all_inst<0x10, 0x02, 0x22, "s4add", add4, s_iadd>; +defm S8ADD : all_inst<0x10, 0x12, 0x32, "s8add", add8, s_iadd>; +defm S4SUB : all_inst<0x10, 0x0B, 0x2B, "s4sub", sub4, s_iadd>; +defm S8SUB : all_inst<0x10, 0x1B, 0x3B, "s8sub", sub8, s_iadd>; +defm SUB : all_inst<0x10, 0x09, 0x29, "sub", BinOpFrag<(sub node:$LHS, node:$RHS)>, s_iadd>; +//Const cases since legalize does sub x, int -> add x, inv(int) + 1 +def : Pat<(intop (add GPRC:$RA, immUExt8neg:$L)), (SUBLi GPRC:$RA, immUExt8neg:$L)>; +def : Pat<(add GPRC:$RA, immUExt8neg:$L), (SUBQi GPRC:$RA, immUExt8neg:$L)>; +def : Pat<(intop (add4 GPRC:$RA, immUExt8neg:$L)), (S4SUBLi GPRC:$RA, immUExt8neg:$L)>; +def : Pat<(add4 GPRC:$RA, immUExt8neg:$L), (S4SUBQi GPRC:$RA, immUExt8neg:$L)>; +def : Pat<(intop (add8 GPRC:$RA, immUExt8neg:$L)), (S8SUBLi GPRC:$RA, immUExt8neg:$L)>; +def : Pat<(add8 GPRC:$RA, immUExt8neg:$L), (S8SUBQi GPRC:$RA, immUExt8neg:$L)>; + -def ADDL : OForm< 0x10, 0x00, "addl $RA,$RB,$RC", - [(set GPRC:$RC, (intop (add GPRC:$RA, GPRC:$RB)))], s_iadd>; -def ADDLi : OFormL<0x10, 0x00, "addl $RA,$L,$RC", - [(set GPRC:$RC, (intop (add GPRC:$RA, immUExt8:$L)))], s_iadd>; -def ADDQ : OForm< 0x10, 0x20, "addq $RA,$RB,$RC", - [(set GPRC:$RC, (add GPRC:$RA, GPRC:$RB))], s_iadd>; -def ADDQi : OFormL<0x10, 0x20, "addq $RA,$L,$RC", - [(set GPRC:$RC, (add GPRC:$RA, immUExt8:$L))], s_iadd>; def AND : OForm< 0x11, 0x00, "and $RA,$RB,$RC", [(set GPRC:$RC, (and GPRC:$RA, GPRC:$RB))], s_ilog>; def ANDi : OFormL<0x11, 0x00, "and $RA,$L,$RC", @@ -315,50 +322,10 @@ //def MSKWL : OForm< 0x12, 0x12, "MSKWL $RA,$RB,$RC", []>; //Mask word low //def MSKWLi : OFormL<0x12, 0x12, "MSKWL $RA,$L,$RC", []>; //Mask word low -def MULL : OForm< 0x13, 0x00, "mull $RA,$RB,$RC", - [(set GPRC:$RC, (intop (mul GPRC:$RA, GPRC:$RB)))], s_imul>; -def MULLi : OFormL<0x13, 0x00, "mull $RA,$L,$RC", - [(set GPRC:$RC, (intop (mul GPRC:$RA, immUExt8:$L)))], s_imul>; -def MULQ : OForm< 0x13, 0x20, "mulq $RA,$RB,$RC", - [(set GPRC:$RC, (mul GPRC:$RA, GPRC:$RB))], s_imul>; -def MULQi : OFormL<0x13, 0x20, "mulq $RA,$L,$RC", - [(set GPRC:$RC, (mul GPRC:$RA, immUExt8ME:$L))], s_imul>; def ORNOT : OForm< 0x11, 0x28, "ornot $RA,$RB,$RC", [(set GPRC:$RC, (or GPRC:$RA, (not GPRC:$RB)))], s_ilog>; def ORNOTi : OFormL<0x11, 0x28, "ornot $RA,$L,$RC", [(set GPRC:$RC, (or GPRC:$RA, immUExt8inv:$L))], s_ilog>; -def S4ADDL : OForm< 0x10, 0x02, "s4addl $RA,$RB,$RC", - [(set GPRC:$RC, (intop (add4 GPRC:$RA, GPRC:$RB)))], s_iadd>; -def S4ADDLi : OFormL<0x10, 0x02, "s4addl $RA,$L,$RC", - [(set GPRC:$RC, (intop (add4 GPRC:$RA, immUExt8:$L)))], s_iadd>; -def S4ADDQ : OForm< 0x10, 0x22, "s4addq $RA,$RB,$RC", - [(set GPRC:$RC, (add4 GPRC:$RA, GPRC:$RB))], s_iadd>; -def S4ADDQi : OFormL<0x10, 0x22, "s4addq $RA,$L,$RC", - [(set GPRC:$RC, (add4 GPRC:$RA, immUExt8:$L))], s_iadd>; -def S4SUBL : OForm< 0x10, 0x0B, "s4subl $RA,$RB,$RC", - [(set GPRC:$RC, (intop (sub4 GPRC:$RA, GPRC:$RB)))], s_iadd>; -def S4SUBLi : OFormL<0x10, 0x0B, "s4subl $RA,$L,$RC", - [(set GPRC:$RC, (intop (sub4 GPRC:$RA, immUExt8:$L)))], s_iadd>; -def S4SUBQ : OForm< 0x10, 0x2B, "s4subq $RA,$RB,$RC", - [(set GPRC:$RC, (sub4 GPRC:$RA, GPRC:$RB))], s_iadd>; -def S4SUBQi : OFormL<0x10, 0x2B, "s4subq $RA,$L,$RC", - [(set GPRC:$RC, (sub4 GPRC:$RA, immUExt8:$L))], s_iadd>; -def S8ADDL : OForm< 0x10, 0x12, "s8addl $RA,$RB,$RC", - [(set GPRC:$RC, (intop (add8 GPRC:$RA, GPRC:$RB)))], s_iadd>; -def S8ADDLi : OFormL<0x10, 0x12, "s8addl $RA,$L,$RC", - [(set GPRC:$RC, (intop (add8 GPRC:$RA, immUExt8:$L)))], s_iadd>; -def S8ADDQ : OForm< 0x10, 0x32, "s8addq $RA,$RB,$RC", - [(set GPRC:$RC, (add8 GPRC:$RA, GPRC:$RB))], s_iadd>; -def S8ADDQi : OFormL<0x10, 0x32, "s8addq $RA,$L,$RC", - [(set GPRC:$RC, (add8 GPRC:$RA, immUExt8:$L))], s_iadd>; -def S8SUBL : OForm< 0x10, 0x1B, "s8subl $RA,$RB,$RC", - [(set GPRC:$RC, (intop (sub8 GPRC:$RA, GPRC:$RB)))], s_iadd>; -def S8SUBLi : OFormL<0x10, 0x1B, "s8subl $RA,$L,$RC", - [(set GPRC:$RC, (intop (add8 GPRC:$RA, immUExt8neg:$L)))], s_iadd>; -def S8SUBQ : OForm< 0x10, 0x3B, "s8subq $RA,$RB,$RC", - [(set GPRC:$RC, (sub8 GPRC:$RA, GPRC:$RB))], s_iadd>; -def S8SUBQi : OFormL<0x10, 0x3B, "s8subq $RA,$L,$RC", - [(set GPRC:$RC, (add8 GPRC:$RA, immUExt8neg:$L))], s_iadd>; def SEXTB : OForm2<0x1C, 0x00, "sextb $RB,$RC", [(set GPRC:$RC, (sext_inreg GPRC:$RB, i8))], s_ishf>; def SEXTW : OForm2<0x1C, 0x01, "sextw $RB,$RC", @@ -375,14 +342,6 @@ [(set GPRC:$RC, (srl GPRC:$RA, GPRC:$RB))], s_ishf>; def SRLi : OFormL<0x12, 0x34, "srl $RA,$L,$RC", [(set GPRC:$RC, (srl GPRC:$RA, immUExt8:$L))], s_ishf>; -def SUBL : OForm< 0x10, 0x09, "subl $RA,$RB,$RC", - [(set GPRC:$RC, (intop (sub GPRC:$RA, GPRC:$RB)))], s_iadd>; -def SUBLi : OFormL<0x10, 0x09, "subl $RA,$L,$RC", - [(set GPRC:$RC, (intop (add GPRC:$RA, immUExt8neg:$L)))], s_iadd>; -def SUBQ : OForm< 0x10, 0x29, "subq $RA,$RB,$RC", - [(set GPRC:$RC, (sub GPRC:$RA, GPRC:$RB))], s_iadd>; -def SUBQi : OFormL<0x10, 0x29, "subq $RA,$L,$RC", - [(set GPRC:$RC, (add GPRC:$RA, immUExt8neg:$L))], s_iadd>; def UMULH : OForm< 0x13, 0x30, "umulh $RA,$RB,$RC", [(set GPRC:$RC, (mulhu GPRC:$RA, GPRC:$RB))], s_imul>; def UMULHi : OFormL<0x13, 0x30, "umulh $RA,$L,$RC", @@ -1129,25 +1088,38 @@ (CMOVGE GPRC:$RA, R31, GPRC:$RB)))>; //Stupid crazy arithmetic stuff: +let AddedComplexity = 1 in { def : Pat<(mul GPRC:$RA, 5), (S4ADDQ GPRC:$RA, GPRC:$RA)>; +def : Pat<(mul GPRC:$RA, 9), (S8ADDQ GPRC:$RA, GPRC:$RA)>; def : Pat<(mul GPRC:$RA, 3), (S4SUBQ GPRC:$RA, GPRC:$RA)>; +def : Pat<(mul GPRC:$RA, 7), (S8SUBQ GPRC:$RA, GPRC:$RA)>; +//slight tree expansion if we are multiplying near to a power of 2 +//n is above a power of 2 def : Pat<(mul GPRC:$RA, immRem1:$imm), (ADDQ (SL GPRC:$RA, (nearP2X immRem1:$imm)), GPRC:$RA)>; +def : Pat<(mul GPRC:$RA, immRem2:$imm), + (ADDQ (SL GPRC:$RA, (nearP2X immRem2:$imm)), (ADDQ GPRC:$RA, GPRC:$RA))>; def : Pat<(mul GPRC:$RA, immRem3:$imm), (ADDQ (SL GPRC:$RA, (nearP2X immRem3:$imm)), (S4SUBQ GPRC:$RA, GPRC:$RA))>; -def : Pat<(mul GPRC:$RA, immRem5:$imm), - (ADDQ (SL GPRC:$RA, (nearP2X immRem5:$imm)), (S4ADDQ GPRC:$RA, GPRC:$RA))>; def : Pat<(mul GPRC:$RA, immRem4:$imm), (S4ADDQ GPRC:$RA, (SL GPRC:$RA, (nearP2X immRem4:$imm)))>; +def : Pat<(mul GPRC:$RA, immRem5:$imm), + (ADDQ (SL GPRC:$RA, (nearP2X immRem5:$imm)), (S4ADDQ GPRC:$RA, GPRC:$RA))>; def : Pat<(mul GPRC:$RA, immRemP2:$imm), (ADDQ (SL GPRC:$RA, (nearP2X immRemP2:$imm)), (SLi GPRC:$RA, (nearP2RemX immRemP2:$imm)))>; +//n is below a power of 2 def : Pat<(mul GPRC:$RA, immRem1n:$imm), (SUBQ (SL GPRC:$RA, (nearP2X immRem1n:$imm)), GPRC:$RA)>; +def : Pat<(mul GPRC:$RA, immRem2n:$imm), + (SUBQ (SL GPRC:$RA, (nearP2X immRem2n:$imm)), (ADDQ GPRC:$RA, GPRC:$RA))>; def : Pat<(mul GPRC:$RA, immRem3n:$imm), (SUBQ (SL GPRC:$RA, (nearP2X immRem3n:$imm)), (S4SUBQ GPRC:$RA, GPRC:$RA))>; +def : Pat<(mul GPRC:$RA, immRem4n:$imm), + (SUBQ (SL GPRC:$RA, (nearP2X immRem4n:$imm)), (SLi GPRC:$RA, 2))>; def : Pat<(mul GPRC:$RA, immRem5n:$imm), (SUBQ (SL GPRC:$RA, (nearP2X immRem5n:$imm)), (S4ADDQ GPRC:$RA, GPRC:$RA))>; def : Pat<(mul GPRC:$RA, immRemP2n:$imm), (SUBQ (SL GPRC:$RA, (nearP2X immRemP2n:$imm)), (SLi GPRC:$RA, (nearP2RemX immRemP2n:$imm)))>; +} //Added complexity From sabre at nondot.org Tue Oct 31 14:02:10 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 31 Oct 2006 14:02:10 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Message-ID: <200610312002.k9VK2A2r016882@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: ScheduleDAG.cpp updated: 1.104 -> 1.105 --- Log message: handle global address constant sdnodes --- Diffs of the changes: (+7 -2) ScheduleDAG.cpp | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.104 llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.105 --- llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.104 Sat Oct 14 03:34:06 2006 +++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Tue Oct 31 14:01:56 2006 @@ -544,8 +544,13 @@ break; case 3: { // Immediate. assert(NumVals == 1 && "Unknown immediate value!"); - uint64_t Val = cast(Node->getOperand(i))->getValue(); - MI->addImmOperand(Val); + if (ConstantSDNode *CS=dyn_cast(Node->getOperand(i))){ + MI->addImmOperand(CS->getValue()); + } else { + GlobalAddressSDNode *GA = + cast(Node->getOperand(i)); + MI->addGlobalAddressOperand(GA->getGlobal(), GA->getOffset()); + } ++i; break; } From sabre at nondot.org Tue Oct 31 14:11:29 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 31 Oct 2006 14:11:29 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/asm-global-imm.ll Message-ID: <200610312011.k9VKBTXW017105@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/X86: asm-global-imm.ll added (r1.1) --- Log message: new testcase for PR882: http://llvm.org/PR882 --- Diffs of the changes: (+29 -0) asm-global-imm.ll | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+) Index: llvm/test/Regression/CodeGen/X86/asm-global-imm.ll diff -c /dev/null llvm/test/Regression/CodeGen/X86/asm-global-imm.ll:1.1 *** /dev/null Tue Oct 31 14:11:24 2006 --- llvm/test/Regression/CodeGen/X86/asm-global-imm.ll Tue Oct 31 14:11:14 2006 *************** *** 0 **** --- 1,29 ---- + ; RUN: llvm-as < %s | llc -march=x86 -relocation-model=static | grep 'test1 $_GV' && + ; RUN: llvm-as < %s | llc -march=x86 -relocation-model=static | grep 'test2 _GV' + ; PR882 + + target datalayout = "e-p:32:32" + target endian = little + target pointersize = 32 + target triple = "i686-apple-darwin9.0.0d2" + %GV = weak global int 0 ; [#uses=2] + %str = external global [12 x sbyte] ; <[12 x sbyte]*> [#uses=1] + + implementation ; Functions: + + void %foo() { + entry: + tail call void asm sideeffect "test1 $0", "i,~{dirflag},~{fpsr},~{flags}"( int* %GV ) + tail call void asm sideeffect "test2 ${0:c}", "i,~{dirflag},~{fpsr},~{flags}"( int* %GV ) + ret void + } + + + void %unknown_bootoption() { + entry: + call void asm sideeffect "ud2\0A\09.word ${0:c}\0A\09.long ${1:c}\0A", + "i,i,~{dirflag},~{fpsr},~{flags}"( int 235, sbyte* getelementptr ([12 x sbyte]* + %str, int 0, uint 0) ) + ret void + } + From sabre at nondot.org Tue Oct 31 14:12:45 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 31 Oct 2006 14:12:45 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp Message-ID: <200610312012.k9VKCjmu017196@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ATTAsmPrinter.cpp updated: 1.71 -> 1.72 --- Log message: implement the 'c' inline asm modifier character --- Diffs of the changes: (+3 -0) X86ATTAsmPrinter.cpp | 3 +++ 1 files changed, 3 insertions(+) Index: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.71 llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.72 --- llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.71 Tue Oct 31 02:31:24 2006 +++ llvm/lib/Target/X86/X86ATTAsmPrinter.cpp Tue Oct 31 14:12:30 2006 @@ -399,6 +399,9 @@ switch (ExtraCode[0]) { default: return true; // Unknown modifier. + case 'c': // Don't print "$" before a global var name. + printOperand(MI, OpNo, "mem"); + return false; case 'b': // Print QImode register case 'h': // Print QImode high register case 'w': // Print HImode register From sabre at nondot.org Tue Oct 31 14:13:25 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 31 Oct 2006 14:13:25 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp X86ISelLowering.h Message-ID: <200610312013.k9VKDPV1017239@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelLowering.cpp updated: 1.285 -> 1.286 X86ISelLowering.h updated: 1.77 -> 1.78 --- Log message: allow the address of a global to be used with the "i" constraint when in -static mode. This implements PR882: http://llvm.org/PR882 . --- Diffs of the changes: (+36 -1) X86ISelLowering.cpp | 30 ++++++++++++++++++++++++++++++ X86ISelLowering.h | 7 ++++++- 2 files changed, 36 insertions(+), 1 deletion(-) Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.285 llvm/lib/Target/X86/X86ISelLowering.cpp:1.286 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.285 Tue Oct 31 13:42:44 2006 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Tue Oct 31 14:13:11 2006 @@ -5466,6 +5466,36 @@ } } +/// isOperandValidForConstraint - Return the specified operand (possibly +/// modified) if the specified SDOperand is valid for the specified target +/// constraint letter, otherwise return null. +SDOperand X86TargetLowering:: +isOperandValidForConstraint(SDOperand Op, char Constraint, SelectionDAG &DAG) { + switch (Constraint) { + default: break; + case 'i': + // Literal immediates are always ok. + if (isa(Op)) return Op; + + // If we are in non-pic codegen mode, we allow the address of a global to + // be used with 'i'. + if (GlobalAddressSDNode *GA = dyn_cast(Op)) { + if (getTargetMachine().getRelocationModel() == Reloc::PIC_) + return SDOperand(0, 0); + + if (GA->getOpcode() != ISD::TargetGlobalAddress) + Op = DAG.getTargetGlobalAddress(GA->getGlobal(), GA->getValueType(0), + GA->getOffset()); + return Op; + } + + // Otherwise, not valid for this mode. + return SDOperand(0, 0); + } + return TargetLowering::isOperandValidForConstraint(Op, Constraint, DAG); +} + + std::vector X86TargetLowering:: getRegClassForInlineAsmConstraint(const std::string &Constraint, MVT::ValueType VT) const { Index: llvm/lib/Target/X86/X86ISelLowering.h diff -u llvm/lib/Target/X86/X86ISelLowering.h:1.77 llvm/lib/Target/X86/X86ISelLowering.h:1.78 --- llvm/lib/Target/X86/X86ISelLowering.h:1.77 Fri Oct 27 16:08:32 2006 +++ llvm/lib/Target/X86/X86ISelLowering.h Tue Oct 31 14:13:11 2006 @@ -300,7 +300,12 @@ std::vector getRegClassForInlineAsmConstraint(const std::string &Constraint, MVT::ValueType VT) const; - + /// isOperandValidForConstraint - Return the specified operand (possibly + /// modified) if the specified SDOperand is valid for the specified target + /// constraint letter, otherwise return null. + SDOperand isOperandValidForConstraint(SDOperand Op, char ConstraintLetter, + SelectionDAG &DAG); + /// getRegForInlineAsmConstraint - Given a physical register constraint /// (e.g. {edx}), return the register number and the register class for the /// register. This should only be used for C_Register constraints. On From evan.cheng at apple.com Tue Oct 31 15:53:46 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 31 Oct 2006 15:53:46 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86AsmPrinter.cpp Message-ID: <200610312153.k9VLrkwf018827@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86AsmPrinter.cpp updated: 1.212 -> 1.213 --- Log message: Nuke dead code. --- Diffs of the changes: (+0 -1) X86AsmPrinter.cpp | 1 - 1 files changed, 1 deletion(-) Index: llvm/lib/Target/X86/X86AsmPrinter.cpp diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.212 llvm/lib/Target/X86/X86AsmPrinter.cpp:1.213 --- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.212 Tue Oct 31 02:31:24 2006 +++ llvm/lib/Target/X86/X86AsmPrinter.cpp Tue Oct 31 15:53:31 2006 @@ -110,7 +110,6 @@ /// doInitialization bool X86SharedAsmPrinter::doInitialization(Module &M) { if (Subtarget->isTargetDarwin()) { - const X86Subtarget *Subtarget = &TM.getSubtarget(); if (!Subtarget->is64Bit()) X86PICStyle = PICStyle::Stub; From sabre at nondot.org Tue Oct 31 16:37:57 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 31 Oct 2006 16:37:57 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200610312237.k9VMbvrk019694@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.310 -> 1.311 --- Log message: look through isunordered to inline it into branch blocks. --- Diffs of the changes: (+43 -12) SelectionDAGISel.cpp | 55 +++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 43 insertions(+), 12 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.310 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.311 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.310 Tue Oct 31 13:41:18 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Oct 31 16:37:42 2006 @@ -845,6 +845,22 @@ !InBlock(BOp->getOperand(1), CurBB->getBasicBlock())) { const BasicBlock *BB = CurBB->getBasicBlock(); + if (IntrinsicInst *II = dyn_cast(Cond)) + if ((II->getIntrinsicID() == Intrinsic::isunordered_f32 || + II->getIntrinsicID() == Intrinsic::isunordered_f64) && + // The operands of the setcc have to be in this block. We don't know + // how to export them from some other block. If this is the first + // block of the sequence, no exporting is needed. + (CurBB == CurMBB || + (isExportableFromCurrentBlock(II->getOperand(1), BB) && + isExportableFromCurrentBlock(II->getOperand(2), BB)))) { + SelectionDAGISel::CaseBlock CB(ISD::SETUO, II->getOperand(1), + II->getOperand(2), TBB, FBB, CurBB); + SwitchCases.push_back(CB); + return; + } + + // If the leaf of the tree is a setcond inst, merge the condition into the // caseblock. if (BOp && isa(BOp) && @@ -952,6 +968,16 @@ } } +/// If the set of cases should be emitted as a series of branches, return true. +/// If we should emit this as a bunch of and/or'd together conditions, return +/// false. +static bool +ShouldEmitAsBranches(const std::vector &Cases) { + if (Cases.size() != 2) return true; + + return true; +} + void SelectionDAGLowering::visitBr(BranchInst &I) { // Update machine-CFG edges. MachineBasicBlock *Succ0MBB = FuncInfo.MBBMap[I.getSuccessor(0)]; @@ -1000,20 +1026,25 @@ BOp->getOpcode() == Instruction::Or)) { FindMergedConditions(BOp, Succ0MBB, Succ1MBB, CurMBB, BOp->getOpcode()); - // If the compares in later blocks need to use values not currently - // exported from this block, export them now. This block should always be - // the first entry. - assert(SwitchCases[0].ThisBB == CurMBB && "Unexpected lowering!"); - - for (unsigned i = 1, e = SwitchCases.size(); i != e; ++i) { - ExportFromCurrentBlock(SwitchCases[i].CmpLHS); - ExportFromCurrentBlock(SwitchCases[i].CmpRHS); + // Allow some cases to be rejected. + if (ShouldEmitAsBranches(SwitchCases)) { + // If the compares in later blocks need to use values not currently + // exported from this block, export them now. This block should always + // be the first entry. + assert(SwitchCases[0].ThisBB == CurMBB && "Unexpected lowering!"); + + for (unsigned i = 1, e = SwitchCases.size(); i != e; ++i) { + ExportFromCurrentBlock(SwitchCases[i].CmpLHS); + ExportFromCurrentBlock(SwitchCases[i].CmpRHS); + } + + // Emit the branch for this block. + visitSwitchCase(SwitchCases[0]); + SwitchCases.erase(SwitchCases.begin()); + return; } - // Emit the branch for this block. - visitSwitchCase(SwitchCases[0]); - SwitchCases.erase(SwitchCases.begin()); - return; + SwitchCases.clear(); } } From rspencer at reidspencer.com Tue Oct 31 17:01:11 2006 From: rspencer at reidspencer.com (Reid Spencer) Date: Tue, 31 Oct 2006 15:01:11 -0800 Subject: [llvm-commits] REM Patch Message-ID: <1162335671.11568.34.camel@bashful.x10sys.com> Chris, Here's the patch for conversion of Rem -> [USF]Rem instructions. Please review at your earliest convenience. This passes dejagnu and llvm-test suites. I've reviewed and modified this patch to make it as simple to review as possible. Fortunately its a lot simpler than DIV. Thanks, Reid. -------------- next part -------------- A non-text attachment was scrubbed... Name: REM.patch Type: text/x-patch Size: 76821 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20061031/2fc8048f/attachment.bin From sabre at nondot.org Tue Oct 31 17:05:30 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 31 Oct 2006 17:05:30 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/PowerPC/fp-branch.ll Message-ID: <200610312305.k9VN5UZ0020280@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/PowerPC: fp-branch.ll added (r1.1) --- Log message: This test should compile down to one comparison, not two. --- Diffs of the changes: (+20 -0) fp-branch.ll | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+) Index: llvm/test/Regression/CodeGen/PowerPC/fp-branch.ll diff -c /dev/null llvm/test/Regression/CodeGen/PowerPC/fp-branch.ll:1.1 *** /dev/null Tue Oct 31 17:05:26 2006 --- llvm/test/Regression/CodeGen/PowerPC/fp-branch.ll Tue Oct 31 17:05:16 2006 *************** *** 0 **** --- 1,20 ---- + ; RUN: llvm-as < %s | llc -march=ppc32 | grep fcmp | wc -l | grep 1 + + declare bool %llvm.isunordered.f64(double, double) + + bool %intcoord_cond_next55(double %tmp48.reload) { + newFuncRoot: + br label %cond_next55 + + bb72.exitStub: ; preds = %cond_next55 + ret bool true + + cond_next62.exitStub: ; preds = %cond_next55 + ret bool false + + cond_next55: ; preds = %newFuncRoot + %tmp57 = setge double %tmp48.reload, 1.000000e+00 ; [#uses=1] + %tmp58 = tail call bool %llvm.isunordered.f64( double %tmp48.reload, double 1.000000e+00 ) ; [#uses=1] + %tmp59 = or bool %tmp57, %tmp58 ; [#uses=1] + br bool %tmp59, label %bb72.exitStub, label %cond_next62.exitStub + } From sabre at nondot.org Tue Oct 31 17:06:14 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 31 Oct 2006 17:06:14 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200610312306.k9VN6EJq020340@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.311 -> 1.312 --- Log message: Compile CodeGen/PowerPC/fp-branch.ll to: _intcoord_cond_next55: LBB1_3: ;cond_next55 lis r2, ha16(LCPI1_0) lfs f0, lo16(LCPI1_0)(r2) fcmpu cr0, f1, f0 blt cr0, LBB1_2 ;cond_next62.exitStub LBB1_1: ;bb72.exitStub li r3, 1 blr LBB1_2: ;cond_next62.exitStub li r3, 0 blr instead of: _intcoord_cond_next55: LBB1_3: ;cond_next55 lis r2, ha16(LCPI1_0) lfs f0, lo16(LCPI1_0)(r2) fcmpu cr0, f1, f0 bge cr0, LBB1_1 ;bb72.exitStub LBB1_4: ;cond_next55 lis r2, ha16(LCPI1_0) lfs f0, lo16(LCPI1_0)(r2) fcmpu cr0, f1, f0 bnu cr0, LBB1_2 ;cond_next62.exitStub LBB1_1: ;bb72.exitStub li r3, 1 blr LBB1_2: ;cond_next62.exitStub li r3, 0 blr --- Diffs of the changes: (+19 -6) SelectionDAGISel.cpp | 25 +++++++++++++++++++------ 1 files changed, 19 insertions(+), 6 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.311 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.312 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.311 Tue Oct 31 16:37:42 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Oct 31 17:06:00 2006 @@ -975,6 +975,15 @@ ShouldEmitAsBranches(const std::vector &Cases) { if (Cases.size() != 2) return true; + // If this is two comparisons of the same values or'd or and'd together, they + // will get folded into a single comparison, so don't emit two blocks. + if ((Cases[0].CmpLHS == Cases[1].CmpLHS && + Cases[0].CmpRHS == Cases[1].CmpRHS) || + (Cases[0].CmpRHS == Cases[1].CmpLHS && + Cases[0].CmpLHS == Cases[1].CmpRHS)) { + return false; + } + return true; } @@ -1025,14 +1034,13 @@ (BOp->getOpcode() == Instruction::And || BOp->getOpcode() == Instruction::Or)) { FindMergedConditions(BOp, Succ0MBB, Succ1MBB, CurMBB, BOp->getOpcode()); - + // If the compares in later blocks need to use values not currently + // exported from this block, export them now. This block should always + // be the first entry. + assert(SwitchCases[0].ThisBB == CurMBB && "Unexpected lowering!"); + // Allow some cases to be rejected. if (ShouldEmitAsBranches(SwitchCases)) { - // If the compares in later blocks need to use values not currently - // exported from this block, export them now. This block should always - // be the first entry. - assert(SwitchCases[0].ThisBB == CurMBB && "Unexpected lowering!"); - for (unsigned i = 1, e = SwitchCases.size(); i != e; ++i) { ExportFromCurrentBlock(SwitchCases[i].CmpLHS); ExportFromCurrentBlock(SwitchCases[i].CmpRHS); @@ -1044,6 +1052,11 @@ return; } + // Okay, we decided not to do this, remove any inserted MBB's and clear + // SwitchCases. + for (unsigned i = 1, e = SwitchCases.size(); i != e; ++i) + CurMBB->getParent()->getBasicBlockList().erase(SwitchCases[i].ThisBB); + SwitchCases.clear(); } } From alenhar2 at cs.uiuc.edu Tue Oct 31 17:47:11 2006 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Tue, 31 Oct 2006 17:47:11 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp AlphaInstrInfo.cpp AlphaInstrInfo.td AlphaLLRP.cpp AlphaRegisterInfo.cpp Message-ID: <200610312347.k9VNlBpx021100@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Alpha: AlphaISelDAGToDAG.cpp updated: 1.60 -> 1.61 AlphaInstrInfo.cpp updated: 1.12 -> 1.13 AlphaInstrInfo.td updated: 1.132 -> 1.133 AlphaLLRP.cpp updated: 1.2 -> 1.3 AlphaRegisterInfo.cpp updated: 1.48 -> 1.49 --- Log message: more shotenning --- Diffs of the changes: (+92 -130) AlphaISelDAGToDAG.cpp | 4 - AlphaInstrInfo.cpp | 4 - AlphaInstrInfo.td | 188 +++++++++++++++++++------------------------------- AlphaLLRP.cpp | 14 +-- AlphaRegisterInfo.cpp | 12 +-- 5 files changed, 92 insertions(+), 130 deletions(-) Index: llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp diff -u llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.60 llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.61 --- llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.60 Tue Oct 31 13:52:12 2006 +++ llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp Tue Oct 31 17:46:56 2006 @@ -294,7 +294,7 @@ Chain, Chain.getValue(1)); Chain = CurDAG->getCopyFromReg(Chain, Alpha::R27, MVT::i64, SDOperand(CNode, 1)); - return CurDAG->SelectNodeTo(N, Alpha::BIS, MVT::i64, Chain, Chain); + return CurDAG->SelectNodeTo(N, Alpha::BISr, MVT::i64, Chain, Chain); } case ISD::READCYCLECOUNTER: { @@ -458,7 +458,7 @@ SDOperand(CurDAG->getTargetNode(Alpha::ZAPNOTi, MVT::i64, N->getOperand(0).getOperand(0), getI64Imm(get_zapImm(mask))), 0); - return CurDAG->getTargetNode(Alpha::SRL, MVT::i64, Z, + return CurDAG->getTargetNode(Alpha::SRLr, MVT::i64, Z, getI64Imm(sval)); } } Index: llvm/lib/Target/Alpha/AlphaInstrInfo.cpp diff -u llvm/lib/Target/Alpha/AlphaInstrInfo.cpp:1.12 llvm/lib/Target/Alpha/AlphaInstrInfo.cpp:1.13 --- llvm/lib/Target/Alpha/AlphaInstrInfo.cpp:1.12 Tue Oct 31 10:49:55 2006 +++ llvm/lib/Target/Alpha/AlphaInstrInfo.cpp Tue Oct 31 17:46:56 2006 @@ -26,7 +26,7 @@ unsigned& sourceReg, unsigned& destReg) const { MachineOpCode oc = MI.getOpcode(); - if (oc == Alpha::BIS || + if (oc == Alpha::BISr || oc == Alpha::CPYSS || oc == Alpha::CPYST || oc == Alpha::CPYSSt || @@ -229,7 +229,7 @@ void AlphaInstrInfo::insertNoop(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const { - BuildMI(MBB, MI, Alpha::BIS, 2, Alpha::R31).addReg(Alpha::R31) + BuildMI(MBB, MI, Alpha::BISr, 2, Alpha::R31).addReg(Alpha::R31) .addReg(Alpha::R31); } Index: llvm/lib/Target/Alpha/AlphaInstrInfo.td diff -u llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.132 llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.133 --- llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.132 Tue Oct 31 13:52:12 2006 +++ llvm/lib/Target/Alpha/AlphaInstrInfo.td Tue Oct 31 17:46:56 2006 @@ -135,6 +135,7 @@ def sub8 : PatFrag<(ops node:$op1, node:$op2), (sub (shl node:$op1, 3), node:$op2)>; class BinOpFrag : PatFrag<(ops node:$LHS, node:$RHS), res>; +class CmpOpFrag : PatFrag<(ops node:$R), res>; //Pseudo ops for selection @@ -167,68 +168,47 @@ //conditional moves, int -def CMOVLBC : OForm4< 0x11, 0x16, "cmovlbc $RCOND,$RTRUE,$RDEST", - [(set GPRC:$RDEST, (select (xor GPRC:$RCOND, 1), GPRC:$RTRUE, GPRC:$RFALSE))], s_cmov>; -def CMOVLBS : OForm4< 0x11, 0x14, "cmovlbs $RCOND,$RTRUE,$RDEST", - [(set GPRC:$RDEST, (select (and GPRC:$RCOND, 1), GPRC:$RTRUE, GPRC:$RFALSE))], s_cmov>; -def CMOVEQ : OForm4< 0x11, 0x24, "cmoveq $RCOND,$RTRUE,$RDEST", - [(set GPRC:$RDEST, (select (seteq GPRC:$RCOND, 0), GPRC:$RTRUE, GPRC:$RFALSE))], s_cmov>; -def CMOVGE : OForm4< 0x11, 0x46, "cmovge $RCOND,$RTRUE,$RDEST", - [(set GPRC:$RDEST, (select (setge GPRC:$RCOND, 0), GPRC:$RTRUE, GPRC:$RFALSE))], s_cmov>; -def CMOVGT : OForm4< 0x11, 0x66, "cmovgt $RCOND,$RTRUE,$RDEST", - [(set GPRC:$RDEST, (select (setgt GPRC:$RCOND, 0), GPRC:$RTRUE, GPRC:$RFALSE))], s_cmov>; -def CMOVLE : OForm4< 0x11, 0x64, "cmovle $RCOND,$RTRUE,$RDEST", - [(set GPRC:$RDEST, (select (setle GPRC:$RCOND, 0), GPRC:$RTRUE, GPRC:$RFALSE))], s_cmov>; -def CMOVLT : OForm4< 0x11, 0x44, "cmovlt $RCOND,$RTRUE,$RDEST", - [(set GPRC:$RDEST, (select (setlt GPRC:$RCOND, 0), GPRC:$RTRUE, GPRC:$RFALSE))], s_cmov>; -def CMOVNE : OForm4< 0x11, 0x26, "cmovne $RCOND,$RTRUE,$RDEST", - [(set GPRC:$RDEST, (select (setne GPRC:$RCOND, 0), GPRC:$RTRUE, GPRC:$RFALSE))], s_cmov>; - -def CMOVEQi : OForm4L< 0x11, 0x24, "cmoveq $RCOND,$RTRUE,$RDEST", - [(set GPRC:$RDEST, (select (setne GPRC:$RCOND, 0), GPRC:$RFALSE, immUExt8:$RTRUE))], s_cmov>; -def CMOVGEi : OForm4L< 0x11, 0x46, "cmovge $RCOND,$RTRUE,$RDEST", - [(set GPRC:$RDEST, (select (setlt GPRC:$RCOND, 0), GPRC:$RFALSE, immUExt8:$RTRUE))], s_cmov>; -def CMOVGTi : OForm4L< 0x11, 0x66, "cmovgt $RCOND,$RTRUE,$RDEST", - [(set GPRC:$RDEST, (select (setle GPRC:$RCOND, 0), GPRC:$RFALSE, immUExt8:$RTRUE))], s_cmov>; -def CMOVLEi : OForm4L< 0x11, 0x64, "cmovle $RCOND,$RTRUE,$RDEST", - [(set GPRC:$RDEST, (select (setgt GPRC:$RCOND, 0), GPRC:$RFALSE, immUExt8:$RTRUE))], s_cmov>; -def CMOVLTi : OForm4L< 0x11, 0x44, "cmovlt $RCOND,$RTRUE,$RDEST", - [(set GPRC:$RDEST, (select (setge GPRC:$RCOND, 0), GPRC:$RFALSE, immUExt8:$RTRUE))], s_cmov>; -def CMOVNEi : OForm4L< 0x11, 0x26, "cmovne $RCOND,$RTRUE,$RDEST", - [(set GPRC:$RDEST, (select (seteq GPRC:$RCOND, 0), GPRC:$RFALSE, immUExt8:$RTRUE))], s_cmov>; -def CMOVLBCi : OForm4L< 0x11, 0x16, "cmovlbc $RCOND,$RTRUE,$RDEST", - [(set GPRC:$RDEST, (select (and GPRC:$RCOND, 1), GPRC:$RFALSE, immUExt8:$RTRUE))], s_cmov>; -def CMOVLBSi : OForm4L< 0x11, 0x14, "cmovlbs $RCOND,$RTRUE,$RDEST", - [(set GPRC:$RDEST, (select (xor GPRC:$RCOND, 1), GPRC:$RFALSE, immUExt8:$RTRUE))], s_cmov>; +multiclass cmov_inst fun, string asmstr, PatFrag OpNode> { +def r : OForm4<0x11, fun, !strconcat(asmstr, " $RCOND,$RTRUE,$RDEST"), + [(set GPRC:$RDEST, (select (OpNode GPRC:$RCOND), GPRC:$RTRUE, GPRC:$RFALSE))], s_cmov>; +def i : OForm4L<0x11, fun, !strconcat(asmstr, " $RCOND,$RTRUE,$RDEST"), + [(set GPRC:$RDEST, (select (OpNode GPRC:$RCOND), immUExt8:$RTRUE, GPRC:$RFALSE))], s_cmov>; +} +defm CMOVEQ : cmov_inst<0x24, "cmoveq", CmpOpFrag<(seteq node:$R, 0)>>; +defm CMOVNE : cmov_inst<0x26, "cmovne", CmpOpFrag<(setne node:$R, 0)>>; +defm CMOVLT : cmov_inst<0x44, "cmovlt", CmpOpFrag<(setlt node:$R, 0)>>; +defm CMOVLE : cmov_inst<0x64, "cmovle", CmpOpFrag<(setle node:$R, 0)>>; +defm CMOVGT : cmov_inst<0x66, "cmovgt", CmpOpFrag<(setgt node:$R, 0)>>; +defm CMOVGE : cmov_inst<0x46, "cmovge", CmpOpFrag<(setge node:$R, 0)>>; +defm CMOVLBC : cmov_inst<0x16, "cmovlbc", CmpOpFrag<(xor node:$R, 1)>>; +defm CMOVLBS : cmov_inst<0x14, "cmovlbs", CmpOpFrag<(and node:$R, 1)>>; //General pattern for cmov def : Pat<(select GPRC:$which, GPRC:$src1, GPRC:$src2), - (CMOVNE GPRC:$src2, GPRC:$src1, GPRC:$which)>; + (CMOVNEr GPRC:$src2, GPRC:$src1, GPRC:$which)>; def : Pat<(select GPRC:$which, GPRC:$src1, immUExt8:$src2), (CMOVEQi GPRC:$src1, immUExt8:$src2, GPRC:$which)>; //Invert sense when we can for constants: -def : Pat<(select (seteq GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE), - (CMOVEQi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>; -def : Pat<(select (setne GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE), - (CMOVNEi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>; -def : Pat<(select (setgt GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE), - (CMOVGTi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>; -def : Pat<(select (setge GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE), - (CMOVGEi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>; -def : Pat<(select (setlt GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE), - (CMOVLTi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>; -def : Pat<(select (setle GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE), - (CMOVLEi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>; +//def : Pat<(select (setne GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE), +// (CMOVNEi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>; +//def : Pat<(select (setgt GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE), +// (CMOVGTi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>; +//def : Pat<(select (setge GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE), +// (CMOVGEi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>; +//def : Pat<(select (setlt GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE), +// (CMOVLTi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>; +//def : Pat<(select (setle GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE), +// (CMOVLEi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>; multiclass all_inst opc, bits<7> funl, bits<7> funq, string asmstr, PatFrag OpNode, InstrItinClass itin> { - def L : OForm< opc, funl, !strconcat(asmstr, "l $RA,$RB,$RC"), + def Lr : OForm< opc, funl, !strconcat(asmstr, "l $RA,$RB,$RC"), [(set GPRC:$RC, (intop (OpNode GPRC:$RA, GPRC:$RB)))], itin>; def Li : OFormL; - def Q : OForm< opc, funq, !strconcat(asmstr, "q $RA,$RB,$RC"), + def Qr : OForm< opc, funq, !strconcat(asmstr, "q $RA,$RB,$RC"), [(set GPRC:$RC, (OpNode GPRC:$RA, GPRC:$RB))], itin>; def Qi : OFormL; @@ -249,35 +229,47 @@ def : Pat<(intop (add8 GPRC:$RA, immUExt8neg:$L)), (S8SUBLi GPRC:$RA, immUExt8neg:$L)>; def : Pat<(add8 GPRC:$RA, immUExt8neg:$L), (S8SUBQi GPRC:$RA, immUExt8neg:$L)>; +multiclass log_inst opc, bits<7> fun, string asmstr, SDNode OpNode, InstrItinClass itin> { +def r : OForm; +def i : OFormL; +} +multiclass inv_inst opc, bits<7> fun, string asmstr, SDNode OpNode, InstrItinClass itin> { +def r : OForm; +def i : OFormL; +} + +defm AND : log_inst<0x11, 0x00, "and", and, s_ilog>; +defm BIC : inv_inst<0x11, 0x08, "bic", and, s_ilog>; +defm BIS : log_inst<0x11, 0x20, "bis", or, s_ilog>; +defm ORNOT : inv_inst<0x11, 0x28, "ornot", or, s_ilog>; +defm XOR : log_inst<0x11, 0x40, "xor", xor, s_ilog>; +defm EQV : inv_inst<0x11, 0x48, "eqv", xor, s_ilog>; + +defm SL : log_inst<0x12, 0x39, "sll", shl, s_ishf>; +defm SRA : log_inst<0x12, 0x3c, "sra", sra, s_ishf>; +defm SRL : log_inst<0x12, 0x34, "srl", srl, s_ishf>; +defm UMULH : log_inst<0x13, 0x30, "umulh", mulhu, s_imul>; -def AND : OForm< 0x11, 0x00, "and $RA,$RB,$RC", - [(set GPRC:$RC, (and GPRC:$RA, GPRC:$RB))], s_ilog>; -def ANDi : OFormL<0x11, 0x00, "and $RA,$L,$RC", - [(set GPRC:$RC, (and GPRC:$RA, immUExt8:$L))], s_ilog>; -def BIC : OForm< 0x11, 0x08, "bic $RA,$RB,$RC", - [(set GPRC:$RC, (and GPRC:$RA, (not GPRC:$RB)))], s_ilog>; -def BICi : OFormL<0x11, 0x08, "bic $RA,$L,$RC", - [(set GPRC:$RC, (and GPRC:$RA, immUExt8inv:$L))], s_ilog>; -def BIS : OForm< 0x11, 0x20, "bis $RA,$RB,$RC", - [(set GPRC:$RC, (or GPRC:$RA, GPRC:$RB))], s_ilog>; -def BISi : OFormL<0x11, 0x20, "bis $RA,$L,$RC", - [(set GPRC:$RC, (or GPRC:$RA, immUExt8:$L))], s_ilog>; def CTLZ : OForm2<0x1C, 0x32, "CTLZ $RB,$RC", [(set GPRC:$RC, (ctlz GPRC:$RB))], s_imisc>; def CTPOP : OForm2<0x1C, 0x30, "CTPOP $RB,$RC", [(set GPRC:$RC, (ctpop GPRC:$RB))], s_imisc>; def CTTZ : OForm2<0x1C, 0x33, "CTTZ $RB,$RC", [(set GPRC:$RC, (cttz GPRC:$RB))], s_imisc>; -def EQV : OForm< 0x11, 0x48, "eqv $RA,$RB,$RC", - [(set GPRC:$RC, (xor GPRC:$RA, (not GPRC:$RB)))], s_ilog>; -def EQVi : OFormL<0x11, 0x48, "eqv $RA,$L,$RC", - [(set GPRC:$RC, (xor GPRC:$RA, immUExt8inv:$L))], s_ilog>; def EXTBL : OForm< 0x12, 0x06, "EXTBL $RA,$RB,$RC", [(set GPRC:$RC, (and (srl GPRC:$RA, (shl GPRC:$RB, 3)), 255))], s_ishf>; def EXTWL : OForm< 0x12, 0x16, "EXTWL $RA,$RB,$RC", [(set GPRC:$RC, (and (srl GPRC:$RA, (shl GPRC:$RB, 3)), 65535))], s_ishf>; def EXTLL : OForm< 0x12, 0x26, "EXTLL $RA,$RB,$RC", [(set GPRC:$RC, (and (srl GPRC:$RA, (shl GPRC:$RB, 3)), 4294967295))], s_ishf>; +def SEXTB : OForm2<0x1C, 0x00, "sextb $RB,$RC", + [(set GPRC:$RC, (sext_inreg GPRC:$RB, i8))], s_ishf>; +def SEXTW : OForm2<0x1C, 0x01, "sextw $RB,$RC", + [(set GPRC:$RC, (sext_inreg GPRC:$RB, i16))], s_ishf>; //def EXTBLi : OFormL<0x12, 0x06, "EXTBL $RA,$L,$RC", []>; //Extract byte low //def EXTLH : OForm< 0x12, 0x6A, "EXTLH $RA,$RB,$RC", []>; //Extract longword high @@ -291,8 +283,6 @@ //def EXTWHi : OFormL<0x12, 0x5A, "EXTWH $RA,$L,$RC", []>; //Extract word high //def EXTWLi : OFormL<0x12, 0x16, "EXTWL $RA,$L,$RC", []>; //Extract word low -//def IMPLVER : OForm< 0x11, 0x6C, "IMPLVER $RA,$RB,$RC", []>; //Implementation version -//def IMPLVERi : OFormL<0x11, 0x6C, "IMPLVER $RA,$L,$RC", []>; //Implementation version //def INSBL : OForm< 0x12, 0x0B, "INSBL $RA,$RB,$RC", []>; //Insert byte low //def INSBLi : OFormL<0x12, 0x0B, "INSBL $RA,$L,$RC", []>; //Insert byte low //def INSLH : OForm< 0x12, 0x67, "INSLH $RA,$RB,$RC", []>; //Insert longword high @@ -307,6 +297,7 @@ //def INSWHi : OFormL<0x12, 0x57, "INSWH $RA,$L,$RC", []>; //Insert word high //def INSWL : OForm< 0x12, 0x1B, "INSWL $RA,$RB,$RC", []>; //Insert word low //def INSWLi : OFormL<0x12, 0x1B, "INSWL $RA,$L,$RC", []>; //Insert word low + //def MSKBL : OForm< 0x12, 0x02, "MSKBL $RA,$RB,$RC", []>; //Mask byte low //def MSKBLi : OFormL<0x12, 0x02, "MSKBL $RA,$L,$RC", []>; //Mask byte low //def MSKLH : OForm< 0x12, 0x62, "MSKLH $RA,$RB,$RC", []>; //Mask longword high @@ -321,35 +312,6 @@ //def MSKWHi : OFormL<0x12, 0x52, "MSKWH $RA,$L,$RC", []>; //Mask word high //def MSKWL : OForm< 0x12, 0x12, "MSKWL $RA,$RB,$RC", []>; //Mask word low //def MSKWLi : OFormL<0x12, 0x12, "MSKWL $RA,$L,$RC", []>; //Mask word low - -def ORNOT : OForm< 0x11, 0x28, "ornot $RA,$RB,$RC", - [(set GPRC:$RC, (or GPRC:$RA, (not GPRC:$RB)))], s_ilog>; -def ORNOTi : OFormL<0x11, 0x28, "ornot $RA,$L,$RC", - [(set GPRC:$RC, (or GPRC:$RA, immUExt8inv:$L))], s_ilog>; -def SEXTB : OForm2<0x1C, 0x00, "sextb $RB,$RC", - [(set GPRC:$RC, (sext_inreg GPRC:$RB, i8))], s_ishf>; -def SEXTW : OForm2<0x1C, 0x01, "sextw $RB,$RC", - [(set GPRC:$RC, (sext_inreg GPRC:$RB, i16))], s_ishf>; -def SL : OForm< 0x12, 0x39, "sll $RA,$RB,$RC", - [(set GPRC:$RC, (shl GPRC:$RA, GPRC:$RB))], s_ishf>; -def SLi : OFormL<0x12, 0x39, "sll $RA,$L,$RC", - [(set GPRC:$RC, (shl GPRC:$RA, immUExt8:$L))], s_ishf>; -def SRA : OForm< 0x12, 0x3C, "sra $RA,$RB,$RC", - [(set GPRC:$RC, (sra GPRC:$RA, GPRC:$RB))], s_ishf>; -def SRAi : OFormL<0x12, 0x3C, "sra $RA,$L,$RC", - [(set GPRC:$RC, (sra GPRC:$RA, immUExt8:$L))], s_ishf>; -def SRL : OForm< 0x12, 0x34, "srl $RA,$RB,$RC", - [(set GPRC:$RC, (srl GPRC:$RA, GPRC:$RB))], s_ishf>; -def SRLi : OFormL<0x12, 0x34, "srl $RA,$L,$RC", - [(set GPRC:$RC, (srl GPRC:$RA, immUExt8:$L))], s_ishf>; -def UMULH : OForm< 0x13, 0x30, "umulh $RA,$RB,$RC", - [(set GPRC:$RC, (mulhu GPRC:$RA, GPRC:$RB))], s_imul>; -def UMULHi : OFormL<0x13, 0x30, "umulh $RA,$L,$RC", - [(set GPRC:$RC, (mulhu GPRC:$RA, immUExt8:$L))], s_imul>; -def XOR : OForm< 0x11, 0x40, "xor $RA,$RB,$RC", - [(set GPRC:$RC, (xor GPRC:$RA, GPRC:$RB))], s_ilog>; -def XORi : OFormL<0x11, 0x40, "xor $RA,$L,$RC", - [(set GPRC:$RC, (xor GPRC:$RA, immUExt8:$L))], s_ilog>; def ZAPNOTi : OFormL<0x12, 0x31, "zapnot $RA,$L,$RC", [], s_ishf>; @@ -1084,42 +1046,42 @@ //Yes, signed multiply high is ugly def : Pat<(mulhs GPRC:$RA, GPRC:$RB), - (SUBQ (UMULH GPRC:$RA, GPRC:$RB), (ADDQ (CMOVGE GPRC:$RB, R31, GPRC:$RA), - (CMOVGE GPRC:$RA, R31, GPRC:$RB)))>; + (SUBQr (UMULHr GPRC:$RA, GPRC:$RB), (ADDQr (CMOVGEr GPRC:$RB, R31, GPRC:$RA), + (CMOVGEr GPRC:$RA, R31, GPRC:$RB)))>; //Stupid crazy arithmetic stuff: let AddedComplexity = 1 in { -def : Pat<(mul GPRC:$RA, 5), (S4ADDQ GPRC:$RA, GPRC:$RA)>; -def : Pat<(mul GPRC:$RA, 9), (S8ADDQ GPRC:$RA, GPRC:$RA)>; -def : Pat<(mul GPRC:$RA, 3), (S4SUBQ GPRC:$RA, GPRC:$RA)>; -def : Pat<(mul GPRC:$RA, 7), (S8SUBQ GPRC:$RA, GPRC:$RA)>; +def : Pat<(mul GPRC:$RA, 5), (S4ADDQr GPRC:$RA, GPRC:$RA)>; +def : Pat<(mul GPRC:$RA, 9), (S8ADDQr GPRC:$RA, GPRC:$RA)>; +def : Pat<(mul GPRC:$RA, 3), (S4SUBQr GPRC:$RA, GPRC:$RA)>; +def : Pat<(mul GPRC:$RA, 7), (S8SUBQr GPRC:$RA, GPRC:$RA)>; //slight tree expansion if we are multiplying near to a power of 2 //n is above a power of 2 def : Pat<(mul GPRC:$RA, immRem1:$imm), - (ADDQ (SL GPRC:$RA, (nearP2X immRem1:$imm)), GPRC:$RA)>; + (ADDQr (SLr GPRC:$RA, (nearP2X immRem1:$imm)), GPRC:$RA)>; def : Pat<(mul GPRC:$RA, immRem2:$imm), - (ADDQ (SL GPRC:$RA, (nearP2X immRem2:$imm)), (ADDQ GPRC:$RA, GPRC:$RA))>; + (ADDQr (SLr GPRC:$RA, (nearP2X immRem2:$imm)), (ADDQr GPRC:$RA, GPRC:$RA))>; def : Pat<(mul GPRC:$RA, immRem3:$imm), - (ADDQ (SL GPRC:$RA, (nearP2X immRem3:$imm)), (S4SUBQ GPRC:$RA, GPRC:$RA))>; + (ADDQr (SLr GPRC:$RA, (nearP2X immRem3:$imm)), (S4SUBQr GPRC:$RA, GPRC:$RA))>; def : Pat<(mul GPRC:$RA, immRem4:$imm), - (S4ADDQ GPRC:$RA, (SL GPRC:$RA, (nearP2X immRem4:$imm)))>; + (S4ADDQr GPRC:$RA, (SLr GPRC:$RA, (nearP2X immRem4:$imm)))>; def : Pat<(mul GPRC:$RA, immRem5:$imm), - (ADDQ (SL GPRC:$RA, (nearP2X immRem5:$imm)), (S4ADDQ GPRC:$RA, GPRC:$RA))>; + (ADDQr (SLr GPRC:$RA, (nearP2X immRem5:$imm)), (S4ADDQr GPRC:$RA, GPRC:$RA))>; def : Pat<(mul GPRC:$RA, immRemP2:$imm), - (ADDQ (SL GPRC:$RA, (nearP2X immRemP2:$imm)), (SLi GPRC:$RA, (nearP2RemX immRemP2:$imm)))>; + (ADDQr (SLr GPRC:$RA, (nearP2X immRemP2:$imm)), (SLi GPRC:$RA, (nearP2RemX immRemP2:$imm)))>; //n is below a power of 2 def : Pat<(mul GPRC:$RA, immRem1n:$imm), - (SUBQ (SL GPRC:$RA, (nearP2X immRem1n:$imm)), GPRC:$RA)>; + (SUBQr (SLr GPRC:$RA, (nearP2X immRem1n:$imm)), GPRC:$RA)>; def : Pat<(mul GPRC:$RA, immRem2n:$imm), - (SUBQ (SL GPRC:$RA, (nearP2X immRem2n:$imm)), (ADDQ GPRC:$RA, GPRC:$RA))>; + (SUBQr (SLr GPRC:$RA, (nearP2X immRem2n:$imm)), (ADDQr GPRC:$RA, GPRC:$RA))>; def : Pat<(mul GPRC:$RA, immRem3n:$imm), - (SUBQ (SL GPRC:$RA, (nearP2X immRem3n:$imm)), (S4SUBQ GPRC:$RA, GPRC:$RA))>; + (SUBQr (SLr GPRC:$RA, (nearP2X immRem3n:$imm)), (S4SUBQr GPRC:$RA, GPRC:$RA))>; def : Pat<(mul GPRC:$RA, immRem4n:$imm), - (SUBQ (SL GPRC:$RA, (nearP2X immRem4n:$imm)), (SLi GPRC:$RA, 2))>; + (SUBQr (SLr GPRC:$RA, (nearP2X immRem4n:$imm)), (SLi GPRC:$RA, 2))>; def : Pat<(mul GPRC:$RA, immRem5n:$imm), - (SUBQ (SL GPRC:$RA, (nearP2X immRem5n:$imm)), (S4ADDQ GPRC:$RA, GPRC:$RA))>; + (SUBQr (SLr GPRC:$RA, (nearP2X immRem5n:$imm)), (S4ADDQr GPRC:$RA, GPRC:$RA))>; def : Pat<(mul GPRC:$RA, immRemP2n:$imm), - (SUBQ (SL GPRC:$RA, (nearP2X immRemP2n:$imm)), (SLi GPRC:$RA, (nearP2RemX immRemP2n:$imm)))>; + (SUBQr (SLr GPRC:$RA, (nearP2X immRemP2n:$imm)), (SLi GPRC:$RA, (nearP2RemX immRemP2n:$imm)))>; } //Added complexity Index: llvm/lib/Target/Alpha/AlphaLLRP.cpp diff -u llvm/lib/Target/Alpha/AlphaLLRP.cpp:1.2 llvm/lib/Target/Alpha/AlphaLLRP.cpp:1.3 --- llvm/lib/Target/Alpha/AlphaLLRP.cpp:1.2 Wed Sep 20 15:08:52 2006 +++ llvm/lib/Target/Alpha/AlphaLLRP.cpp Tue Oct 31 17:46:56 2006 @@ -70,7 +70,7 @@ prev[0] = prev[1]; prev[1] = prev[2]; prev[2] = 0; - BuildMI(MBB, MI, Alpha::BIS, 2, Alpha::R31).addReg(Alpha::R31) + BuildMI(MBB, MI, Alpha::BISr, 2, Alpha::R31).addReg(Alpha::R31) .addReg(Alpha::R31); Changed = true; nopintro += 1; count += 1; @@ -81,9 +81,9 @@ MI->getOperand(1).getImmedValue()) { prev[0] = prev[2]; prev[1] = prev[2] = 0; - BuildMI(MBB, MI, Alpha::BIS, 2, Alpha::R31).addReg(Alpha::R31) + BuildMI(MBB, MI, Alpha::BISr, 2, Alpha::R31).addReg(Alpha::R31) .addReg(Alpha::R31); - BuildMI(MBB, MI, Alpha::BIS, 2, Alpha::R31).addReg(Alpha::R31) + BuildMI(MBB, MI, Alpha::BISr, 2, Alpha::R31).addReg(Alpha::R31) .addReg(Alpha::R31); Changed = true; nopintro += 2; count += 2; @@ -93,11 +93,11 @@ && prev[2]->getOperand(1).getImmedValue() == MI->getOperand(1).getImmedValue()) { prev[0] = prev[1] = prev[2] = 0; - BuildMI(MBB, MI, Alpha::BIS, 2, Alpha::R31).addReg(Alpha::R31) + BuildMI(MBB, MI, Alpha::BISr, 2, Alpha::R31).addReg(Alpha::R31) .addReg(Alpha::R31); - BuildMI(MBB, MI, Alpha::BIS, 2, Alpha::R31).addReg(Alpha::R31) + BuildMI(MBB, MI, Alpha::BISr, 2, Alpha::R31).addReg(Alpha::R31) .addReg(Alpha::R31); - BuildMI(MBB, MI, Alpha::BIS, 2, Alpha::R31).addReg(Alpha::R31) + BuildMI(MBB, MI, Alpha::BISr, 2, Alpha::R31).addReg(Alpha::R31) .addReg(Alpha::R31); Changed = true; nopintro += 3; count += 3; @@ -130,7 +130,7 @@ if (ub || AlignAll) { //we can align stuff for free at this point while (count % 4) { - BuildMI(MBB, MBB.end(), Alpha::BIS, 2, Alpha::R31) + BuildMI(MBB, MBB.end(), Alpha::BISr, 2, Alpha::R31) .addReg(Alpha::R31).addReg(Alpha::R31); ++count; ++nopalign; Index: llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp diff -u llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.48 llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.49 --- llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.48 Mon Sep 4 21:31:13 2006 +++ llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp Tue Oct 31 17:46:56 2006 @@ -112,19 +112,19 @@ switch(Opc) { default: break; - case Alpha::BIS: + case Alpha::BISr: case Alpha::CPYSS: case Alpha::CPYST: if (MI->getOperand(1).getReg() == MI->getOperand(2).getReg()) { if (OpNum == 0) { // move -> store unsigned InReg = MI->getOperand(1).getReg(); - Opc = (Opc == Alpha::BIS) ? Alpha::STQ : + Opc = (Opc == Alpha::BISr) ? Alpha::STQ : ((Opc == Alpha::CPYSS) ? Alpha::STS : Alpha::STT); return BuildMI(Opc, 3).addReg(InReg).addFrameIndex(FrameIndex) .addReg(Alpha::F31); } else { // load -> move unsigned OutReg = MI->getOperand(0).getReg(); - Opc = (Opc == Alpha::BIS) ? Alpha::LDQ : + Opc = (Opc == Alpha::BISr) ? Alpha::LDQ : ((Opc == Alpha::CPYSS) ? Alpha::LDS : Alpha::LDT); return BuildMI(Opc, 2, OutReg).addFrameIndex(FrameIndex) .addReg(Alpha::F31); @@ -142,7 +142,7 @@ const TargetRegisterClass *RC) const { // std::cerr << "copyRegToReg " << DestReg << " <- " << SrcReg << "\n"; if (RC == Alpha::GPRCRegisterClass) { - BuildMI(MBB, MI, Alpha::BIS, 2, DestReg).addReg(SrcReg).addReg(SrcReg); + BuildMI(MBB, MI, Alpha::BISr, 2, DestReg).addReg(SrcReg).addReg(SrcReg); } else if (RC == Alpha::F4RCRegisterClass) { BuildMI(MBB, MI, Alpha::CPYSS, 2, DestReg).addReg(SrcReg).addReg(SrcReg); } else if (RC == Alpha::F8RCRegisterClass) { @@ -347,7 +347,7 @@ BuildMI(MBB, MBBI, Alpha::STQ, 3) .addReg(Alpha::R15).addImm(0).addReg(Alpha::R30); //this must be the last instr in the prolog - BuildMI(MBB, MBBI, Alpha::BIS, 2, Alpha::R15) + BuildMI(MBB, MBBI, Alpha::BISr, 2, Alpha::R15) .addReg(Alpha::R30).addReg(Alpha::R30); } @@ -370,7 +370,7 @@ if (FP) { //copy the FP into the SP (discards allocas) - BuildMI(MBB, MBBI, Alpha::BIS, 2, Alpha::R30).addReg(Alpha::R15) + BuildMI(MBB, MBBI, Alpha::BISr, 2, Alpha::R30).addReg(Alpha::R15) .addReg(Alpha::R15); //restore the FP BuildMI(MBB, MBBI, Alpha::LDQ, 2, Alpha::R15).addImm(0).addReg(Alpha::R15); From evan.cheng at apple.com Tue Oct 31 18:25:34 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 31 Oct 2006 18:25:34 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetInstrInfo.h Message-ID: <200611010025.kA10PYTj021814@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetInstrInfo.h updated: 1.99 -> 1.100 --- Log message: Add operand constraints to TargetInstrInfo. --- Diffs of the changes: (+21 -0) TargetInstrInfo.h | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+) Index: llvm/include/llvm/Target/TargetInstrInfo.h diff -u llvm/include/llvm/Target/TargetInstrInfo.h:1.99 llvm/include/llvm/Target/TargetInstrInfo.h:1.100 --- llvm/include/llvm/Target/TargetInstrInfo.h:1.99 Sat Oct 28 12:29:57 2006 +++ llvm/include/llvm/Target/TargetInstrInfo.h Tue Oct 31 18:25:20 2006 @@ -94,6 +94,9 @@ /// if the operand is a register. If not, this contains 0. unsigned short RegClass; unsigned short Flags; + /// Lower 16 bits are used to specify which constraints are set. The higher 16 + /// bits are used to specify the value of constraints (4 bits each). + unsigned int Constraints; /// Currently no other information. }; @@ -219,6 +222,24 @@ return get(Opcode).Flags & M_VARIABLE_OPS; } + // Operand constraints: only "tied_to" for now. + enum OperandConstraint { + TIED_TO = 0 // Must be allocated the same register as. + }; + + /// getOperandConstraint - Returns the value of the specific constraint if + /// it is set. Returns -1 if it is not set. + int getOperandConstraint(MachineOpCode Opcode, unsigned OpNum, + OperandConstraint Constraint) { + assert(OpNum < get(Opcode).numOperands && + "Invalid operand # of TargetInstrInfo"); + if (get(Opcode).OpInfo[OpNum].Constraints & (1 << Constraint)) { + unsigned Pos = 16 + Constraint * 4; + return (int)(get(Opcode).OpInfo[OpNum].Constraints >> Pos) & 0xf; + } + return -1; + } + /// getDWARF_LABELOpcode - Return the opcode of the target's DWARF_LABEL /// instruction if it has one. This is used by codegen passes that update /// DWARF line number info as they modify the code. From evan.cheng at apple.com Tue Oct 31 18:26:42 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 31 Oct 2006 18:26:42 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/Target.td Message-ID: <200611010026.kA10QgO8021862@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: Target.td updated: 1.86 -> 1.87 --- Log message: Add constraints to Instruction class. --- Diffs of the changes: (+2 -0) Target.td | 2 ++ 1 files changed, 2 insertions(+) Index: llvm/lib/Target/Target.td diff -u llvm/lib/Target/Target.td:1.86 llvm/lib/Target/Target.td:1.87 --- llvm/lib/Target/Target.td:1.86 Thu Oct 12 12:49:27 2006 +++ llvm/lib/Target/Target.td Tue Oct 31 18:26:27 2006 @@ -171,6 +171,8 @@ bit noResults = 0; // Does this instruction produce no results? InstrItinClass Itinerary = NoItinerary;// Execution steps used for scheduling. + + string Constraints = ""; } /// Imp - Helper class for specifying the implicit uses/defs set for an From evan.cheng at apple.com Tue Oct 31 18:27:19 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 31 Oct 2006 18:27:19 -0600 Subject: [llvm-commits] CVS: llvm/utils/TableGen/CodeGenInstruction.h CodeGenTarget.cpp DAGISelEmitter.cpp InstrInfoEmitter.cpp InstrInfoEmitter.h Message-ID: <200611010027.kA10RJJO021896@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: CodeGenInstruction.h updated: 1.19 -> 1.20 CodeGenTarget.cpp updated: 1.69 -> 1.70 DAGISelEmitter.cpp updated: 1.272 -> 1.273 InstrInfoEmitter.cpp updated: 1.45 -> 1.46 InstrInfoEmitter.h updated: 1.12 -> 1.13 --- Log message: Add operand constraints to TargetInstrInfo. --- Diffs of the changes: (+89 -16) CodeGenInstruction.h | 8 ++++++++ CodeGenTarget.cpp | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ DAGISelEmitter.cpp | 6 +++++- InstrInfoEmitter.cpp | 41 +++++++++++++++++++++++++++-------------- InstrInfoEmitter.h | 2 +- 5 files changed, 89 insertions(+), 16 deletions(-) Index: llvm/utils/TableGen/CodeGenInstruction.h diff -u llvm/utils/TableGen/CodeGenInstruction.h:1.19 llvm/utils/TableGen/CodeGenInstruction.h:1.20 --- llvm/utils/TableGen/CodeGenInstruction.h:1.19 Mon Jan 9 12:27:06 2006 +++ llvm/utils/TableGen/CodeGenInstruction.h Tue Oct 31 18:27:05 2006 @@ -70,6 +70,14 @@ /// type (which is a record). std::vector OperandList; + /// ConstraintStr - The operand constraints string. + /// + std::string ConstraintStr; + + /// ConstraintsList - List of constraints, encoded into one unsigned int per + /// operand. + std::vector ConstraintsList; + // Various boolean values we track for the instruction. bool isReturn; bool isBranch; Index: llvm/utils/TableGen/CodeGenTarget.cpp diff -u llvm/utils/TableGen/CodeGenTarget.cpp:1.69 llvm/utils/TableGen/CodeGenTarget.cpp:1.70 --- llvm/utils/TableGen/CodeGenTarget.cpp:1.69 Wed Oct 11 16:02:01 2006 +++ llvm/utils/TableGen/CodeGenTarget.cpp Tue Oct 31 18:27:05 2006 @@ -273,6 +273,51 @@ return getInstructionSet()->getValueAsBit("isLittleEndianEncoding"); } +static std::pair parseConstraint(const std::string &CStr, + CodeGenInstruction *I) { + const std::string ops("="); // FIXME: Only supports TIED_TO for now. + std::string::size_type pos = CStr.find_first_of(ops); + assert(pos != std::string::npos && "Unrecognized constraint"); + std::string Name = CStr.substr(1, pos); // Skip '$' + + const std::string delims(" \t"); + std::string::size_type wpos = Name.find_first_of(delims); + if (wpos != std::string::npos) + Name = Name.substr(0, wpos); + unsigned FIdx = I->getOperandNamed(Name); + + Name = CStr.substr(pos+1); + wpos = Name.find_first_not_of(delims); + if (wpos != std::string::npos) + Name = Name.substr(wpos+1); + unsigned TIdx = I->getOperandNamed(Name); + return std::make_pair(FIdx, (TIdx << 16) | 1); +} + +static std::vector parseConstraints(const std::string &CStr, + CodeGenInstruction *I) { + unsigned NumOps = I->OperandList.size(); + std::vector Res(NumOps, 0); + if (CStr == "") + return Res; + + const std::string delims(","); + std::string::size_type bidx, eidx; + + bidx = CStr.find_first_not_of(delims); + while (bidx != std::string::npos) { + eidx = CStr.find_first_of(delims, bidx); + if (eidx == std::string::npos) + eidx = CStr.length(); + std::pair C = + parseConstraint(CStr.substr(bidx, eidx), I); + Res[C.first] = C.second; + bidx = CStr.find_first_not_of(delims, eidx); + } + + return Res; +} + CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr) : TheDef(R), AsmString(AsmStr) { Name = R->getValueAsString("Name"); @@ -338,6 +383,9 @@ MIOperandNo, NumOps, MIOpInfo)); MIOperandNo += NumOps; } + + ConstraintStr = R->getValueAsString("Constraints"); + ConstraintsList = parseConstraints(ConstraintStr, this); } Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.272 llvm/utils/TableGen/DAGISelEmitter.cpp:1.273 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.272 Mon Oct 16 01:33:44 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Tue Oct 31 18:27:05 2006 @@ -3552,11 +3552,14 @@ // Emit boilerplate. OS << "SDNode *Select_INLINEASM(SDOperand N) {\n" << " std::vector Ops(N.Val->op_begin(), N.Val->op_end());\n" - << " AddToISelQueue(N.getOperand(0)); // Select the chain.\n\n" + << " AddToISelQueue(N.getOperand(0)); // Select the chain.\n" << " // Select the flag operand.\n" << " if (Ops.back().getValueType() == MVT::Flag)\n" << " AddToISelQueue(Ops.back());\n" << " SelectInlineAsmMemoryOperands(Ops, *CurDAG);\n" + << " for (unsigned i = 2, e = Ops.size(); i < e; ++i)\n" + << " if (Ops[i].getOpcode() != ISD::Constant)\n" + << " AddToISelQueue(Ops[i]);\n" << " std::vector VTs;\n" << " VTs.push_back(MVT::Other);\n" << " VTs.push_back(MVT::Flag);\n" @@ -3582,6 +3585,7 @@ << " case ISD::TargetConstantPool:\n" << " case ISD::TargetFrameIndex:\n" << " case ISD::TargetJumpTable:\n" + << " case ISD::TargetExternalSymbol:\n" << " case ISD::TargetGlobalAddress: {\n" << " return NULL;\n" << " }\n" Index: llvm/utils/TableGen/InstrInfoEmitter.cpp diff -u llvm/utils/TableGen/InstrInfoEmitter.cpp:1.45 llvm/utils/TableGen/InstrInfoEmitter.cpp:1.46 --- llvm/utils/TableGen/InstrInfoEmitter.cpp:1.45 Fri Jul 21 16:15:20 2006 +++ llvm/utils/TableGen/InstrInfoEmitter.cpp Tue Oct 31 18:27:05 2006 @@ -62,11 +62,13 @@ OS << "0 };\n"; } -static std::vector GetOperandInfo(const CodeGenInstruction &Inst) { - std::vector Result; +static std::vector > +GetOperandInfo(const CodeGenInstruction &Inst) { + std::vector > Result; for (unsigned i = 0, e = Inst.OperandList.size(); i != e; ++i) { if (Inst.OperandList[i].Rec->isSubClassOf("RegisterClass")) { - Result.push_back(Inst.OperandList[i].Rec); + Result.push_back(std::make_pair(Inst.OperandList[i].Rec, + Inst.ConstraintsList[i])); } else { // This might be a multiple operand thing. // Targets like X86 have registers in their multi-operand operands. @@ -74,14 +76,21 @@ unsigned NumDefs = MIOI->getNumArgs(); for (unsigned j = 0, e = Inst.OperandList[i].MINumOperands; j != e; ++j) { if (NumDefs <= j) { - Result.push_back(0); + Result.push_back(std::make_pair((Record*)0, Inst.ConstraintsList[i])); } else { DefInit *Def = dynamic_cast(MIOI->getArg(j)); - Result.push_back(Def ? Def->getDef() : 0); + Result.push_back(std::make_pair(Def ? Def->getDef() : 0, + Inst.ConstraintsList[i])); } } } } + + // For backward compatibility: isTwoAddress means operand 1 is tied to + // operand 0. + if (Inst.isTwoAddress) + Result[1].second |= 1; + return Result; } @@ -117,29 +126,33 @@ } } - std::map, unsigned> OperandInfosEmitted; + std::map >, unsigned> + OperandInfosEmitted; unsigned OperandListNum = 0; - OperandInfosEmitted[std::vector()] = ++OperandListNum; + OperandInfosEmitted[std::vector >()] = + ++OperandListNum; // Emit all of the operand info records. OS << "\n"; for (CodeGenTarget::inst_iterator II = Target.inst_begin(), E = Target.inst_end(); II != E; ++II) { - std::vector OperandInfo = GetOperandInfo(II->second); + std::vector > OperandInfo = + GetOperandInfo(II->second); unsigned &N = OperandInfosEmitted[OperandInfo]; if (N == 0) { N = ++OperandListNum; OS << "static const TargetOperandInfo OperandInfo" << N << "[] = { "; for (unsigned i = 0, e = OperandInfo.size(); i != e; ++i) { - Record *RC = OperandInfo[i]; + Record *RC = OperandInfo[i].first; // FIXME: We only care about register operands for now. if (RC && RC->isSubClassOf("RegisterClass")) - OS << "{ " << getQualifiedName(RC) << "RegClassID, 0 }, "; + OS << "{ " << getQualifiedName(RC) << "RegClassID, 0, "; else if (RC && RC->getName() == "ptr_rc") // Ptr value whose register class is resolved via callback. - OS << "{ 0, 1 }, "; + OS << "{ 0, 1, "; else - OS << "{ 0, 0 }, "; + OS << "{ 0, 0, "; + OS << OperandInfo[i].second << " }, "; } OS << "};\n"; } @@ -162,7 +175,7 @@ void InstrInfoEmitter::emitRecord(const CodeGenInstruction &Inst, unsigned Num, Record *InstrInfo, std::map, unsigned> &EmittedLists, - std::map, unsigned> &OpInfo, + std::map >, unsigned> &OpInfo, std::ostream &OS) { int MinOperands; if (!Inst.OperandList.empty()) @@ -247,7 +260,7 @@ OS << "ImplicitList" << EmittedLists[DefList] << ", "; // Emit the operand info. - std::vector OperandInfo = GetOperandInfo(Inst); + std::vector > OperandInfo = GetOperandInfo(Inst); if (OperandInfo.empty()) OS << "0"; else Index: llvm/utils/TableGen/InstrInfoEmitter.h diff -u llvm/utils/TableGen/InstrInfoEmitter.h:1.12 llvm/utils/TableGen/InstrInfoEmitter.h:1.13 --- llvm/utils/TableGen/InstrInfoEmitter.h:1.12 Mon Oct 31 11:16:46 2005 +++ llvm/utils/TableGen/InstrInfoEmitter.h Tue Oct 31 18:27:05 2006 @@ -45,7 +45,7 @@ void emitRecord(const CodeGenInstruction &Inst, unsigned Num, Record *InstrInfo, std::map, unsigned> &EL, - std::map, unsigned> &OpInfo, + std::map >, unsigned> &OpInfo, std::ostream &OS); void GatherItinClasses(); unsigned ItinClassNumber(std::string ItinName); From evan.cheng at apple.com Tue Oct 31 18:28:13 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 31 Oct 2006 18:28:13 -0600 Subject: [llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp Message-ID: <200611010028.kA10SDiq021927@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.273 -> 1.274 --- Log message: Not meant to be checked in. --- Diffs of the changes: (+1 -5) DAGISelEmitter.cpp | 6 +----- 1 files changed, 1 insertion(+), 5 deletions(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.273 llvm/utils/TableGen/DAGISelEmitter.cpp:1.274 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.273 Tue Oct 31 18:27:05 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Tue Oct 31 18:27:59 2006 @@ -3552,14 +3552,11 @@ // Emit boilerplate. OS << "SDNode *Select_INLINEASM(SDOperand N) {\n" << " std::vector Ops(N.Val->op_begin(), N.Val->op_end());\n" - << " AddToISelQueue(N.getOperand(0)); // Select the chain.\n" + << " AddToISelQueue(N.getOperand(0)); // Select the chain.\n\n" << " // Select the flag operand.\n" << " if (Ops.back().getValueType() == MVT::Flag)\n" << " AddToISelQueue(Ops.back());\n" << " SelectInlineAsmMemoryOperands(Ops, *CurDAG);\n" - << " for (unsigned i = 2, e = Ops.size(); i < e; ++i)\n" - << " if (Ops[i].getOpcode() != ISD::Constant)\n" - << " AddToISelQueue(Ops[i]);\n" << " std::vector VTs;\n" << " VTs.push_back(MVT::Other);\n" << " VTs.push_back(MVT::Flag);\n" @@ -3585,7 +3582,6 @@ << " case ISD::TargetConstantPool:\n" << " case ISD::TargetFrameIndex:\n" << " case ISD::TargetJumpTable:\n" - << " case ISD::TargetExternalSymbol:\n" << " case ISD::TargetGlobalAddress: {\n" << " return NULL;\n" << " }\n" From sabre at nondot.org Tue Oct 31 18:38:45 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 31 Oct 2006 18:38:45 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/BranchFolding.cpp Message-ID: <200611010038.kA10cjO0022175@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: BranchFolding.cpp updated: 1.27 -> 1.28 --- Log message: enable branch folding with an option --- Diffs of the changes: (+2 -1) BranchFolding.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/lib/CodeGen/BranchFolding.cpp diff -u llvm/lib/CodeGen/BranchFolding.cpp:1.27 llvm/lib/CodeGen/BranchFolding.cpp:1.28 --- llvm/lib/CodeGen/BranchFolding.cpp:1.27 Sun Oct 29 15:05:41 2006 +++ llvm/lib/CodeGen/BranchFolding.cpp Tue Oct 31 18:38:31 2006 @@ -30,6 +30,7 @@ static Statistic<> NumDeadBlocks("branchfold", "Number of dead blocks removed"); static Statistic<> NumBranchOpts("branchfold", "Number of branches optimized"); static Statistic<> NumTailMerge ("branchfold", "Number of block tails merged"); +static cl::opt EnableTailMerge("enable-tail-merge", cl::Hidden); namespace { struct BranchFolder : public MachineFunctionPass { @@ -258,7 +259,7 @@ bool BranchFolder::TailMergeBlocks(MachineFunction &MF) { MadeChange = false; - return false; + if (!EnableTailMerge) return false; // Find blocks with no successors. std::vector > MergePotentials; From rspencer at reidspencer.com Tue Oct 31 18:42:58 2006 From: rspencer at reidspencer.com (Reid Spencer) Date: Tue, 31 Oct 2006 16:42:58 -0800 Subject: [llvm-commits] [llvm-gcc] REM patch for llvm-gcc Message-ID: <1162341778.11568.62.camel@bashful.x10sys.com> Attached is the corresponding llvm-gcc patch for the LLVM REM patch. This makes llvm-gcc generate [us]rem instructions instead of just rem. Reid. -------------- next part -------------- A non-text attachment was scrubbed... Name: REM-llvmgcc.patch Type: text/x-patch Size: 827 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20061031/5957f520/attachment.bin From sabre at nondot.org Tue Oct 31 19:16:26 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 31 Oct 2006 19:16:26 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/BranchFolding.cpp Message-ID: <200611010116.kA11GQml022803@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: BranchFolding.cpp updated: 1.28 -> 1.29 --- Log message: make tail merging more aggressive. If two blocks share a common tail, but the tail is not an entire block for either of them, pick one, split it, then merge the common part. --- Diffs of the changes: (+53 -16) BranchFolding.cpp | 69 +++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 53 insertions(+), 16 deletions(-) Index: llvm/lib/CodeGen/BranchFolding.cpp diff -u llvm/lib/CodeGen/BranchFolding.cpp:1.28 llvm/lib/CodeGen/BranchFolding.cpp:1.29 --- llvm/lib/CodeGen/BranchFolding.cpp:1.28 Tue Oct 31 18:38:31 2006 +++ llvm/lib/CodeGen/BranchFolding.cpp Tue Oct 31 19:16:12 2006 @@ -44,7 +44,9 @@ bool TailMergeBlocks(MachineFunction &MF); void ReplaceTailWithBranchTo(MachineBasicBlock::iterator OldInst, MachineBasicBlock *NewDest); - + MachineBasicBlock *SplitMBBAt(MachineBasicBlock &CurMBB, + MachineBasicBlock::iterator BBI1); + // Branch optzn. bool OptimizeBranches(MachineFunction &MF); void OptimizeBlock(MachineBasicBlock *MBB); @@ -256,6 +258,31 @@ ++NumTailMerge; } +/// SplitMBBAt - Given a machine basic block and an iterator into it, split the +/// MBB so that the part before the iterator falls into the part starting at the +/// iterator. This returns the new MBB. +MachineBasicBlock *BranchFolder::SplitMBBAt(MachineBasicBlock &CurMBB, + MachineBasicBlock::iterator BBI1) { + // Create the fall-through block. + MachineFunction::iterator MBBI = &CurMBB; + MachineBasicBlock *NewMBB = new MachineBasicBlock(CurMBB.getBasicBlock()); + CurMBB.getParent()->getBasicBlockList().insert(++MBBI, NewMBB); + + // Move all the successors of this block to the specified block. + while (!CurMBB.succ_empty()) { + MachineBasicBlock *S = *(CurMBB.succ_end()-1); + NewMBB->addSuccessor(S); + CurMBB.removeSuccessor(S); + } + + // Add an edge from CurMBB to NewMBB for the fall-through. + CurMBB.addSuccessor(NewMBB); + + // Splice the code over. + NewMBB->splice(NewMBB->end(), &CurMBB, BBI1, CurMBB.end()); + return NewMBB; +} + bool BranchFolder::TailMergeBlocks(MachineFunction &MF) { MadeChange = false; @@ -318,27 +345,37 @@ // Otherwise, move the matching block to the right position. std::swap(MergePotentials[FoundMatch], *(MergePotentials.end()-2)); } - - // If either block is the entire common tail, make the longer one branch to - // the shorter one. + MachineBasicBlock *MBB2 = (MergePotentials.end()-2)->second; - if (CurMBB->begin() == BBI1) { - // Hack the end off MBB2, making it jump to CurMBB instead. - ReplaceTailWithBranchTo(BBI2, CurMBB); - // This modifies MBB2, so remove it from the worklist. - MergePotentials.erase(MergePotentials.end()-2); - MadeChange = true; - continue; - } else if (MBB2->begin() == BBI2) { + + // If neither block is the entire common tail, split the tail of one block + // to make it redundant with the other tail. + if (CurMBB->begin() != BBI1 && MBB2->begin() != BBI2) { + if (0) { // Enable this to disable partial tail merges. + MergePotentials.pop_back(); + continue; + } + // TODO: if we had some notion of which block was hotter, we could split + // the hot block, so it is the fall-through. For now, just split the + // second block. + MBB2 = SplitMBBAt(*MBB2, BBI2); + BBI2 = MBB2->begin(); + (MergePotentials.end()-2)->second = MBB2; + } + + if (MBB2->begin() == BBI2) { // Hack the end off CurMBB, making it jump to MBBI@ instead. ReplaceTailWithBranchTo(BBI1, MBB2); // This modifies CurMBB, so remove it from the worklist. MergePotentials.pop_back(); - MadeChange = true; - continue; + } else { + assert(CurMBB->begin() == BBI1 && "Didn't split block correctly?"); + // Hack the end off MBB2, making it jump to CurMBB instead. + ReplaceTailWithBranchTo(BBI2, CurMBB); + // This modifies MBB2, so remove it from the worklist. + MergePotentials.erase(MergePotentials.end()-2); } - - MergePotentials.pop_back(); + MadeChange = true; } return MadeChange; From sabre at nondot.org Tue Oct 31 19:36:22 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 31 Oct 2006 19:36:22 -0600 Subject: [llvm-commits] CVS: llvm-test/Makefile.programs Message-ID: <200611010136.kA11aMa6023154@zion.cs.uiuc.edu> Changes in directory llvm-test: Makefile.programs updated: 1.234 -> 1.235 --- Log message: switch llcbeta back to tail merging --- Diffs of the changes: (+4 -2) Makefile.programs | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) Index: llvm-test/Makefile.programs diff -u llvm-test/Makefile.programs:1.234 llvm-test/Makefile.programs:1.235 --- llvm-test/Makefile.programs:1.234 Mon Oct 23 17:10:59 2006 +++ llvm-test/Makefile.programs Tue Oct 31 19:36:08 2006 @@ -193,7 +193,8 @@ endif#DISABLE_DIFFS ifeq ($(ARCH),PowerPC) -LLCBETAOPTION := -regalloc=local -fast +LLCBETAOPTION := --enable-tail-merge +#-regalloc=local -fast endif ifeq ($(ARCH),Alpha) LLCBETAOPTION := -sched=list-td @@ -203,7 +204,8 @@ LLCBETAOPTION := -sched=simple endif ifeq ($(ARCH),x86) -LLCBETAOPTION := -regalloc=local -fast +LLCBETAOPTION := --enable-tail-merge +#-regalloc=local -fast endif ifeq ($(ARCH),Sparc) LLCBETAOPTION := -enable-sparc-v9-insts From reid at x10sys.com Tue Oct 31 21:41:19 2006 From: reid at x10sys.com (Reid Spencer) Date: Tue, 31 Oct 2006 21:41:19 -0600 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp Message-ID: <200611010341.kA13fJ5A025139@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/Interpreter: Execution.cpp updated: 1.141 -> 1.142 --- Log message: Fix a bug in the interpreter where divides of unmatched signed operands would fail. E.g. udiv sint X, Y or sdiv uint X, Y would fail to find a type match in the switch statement and fail the operation. --- Diffs of the changes: (+11 -8) Execution.cpp | 19 +++++++++++-------- 1 files changed, 11 insertions(+), 8 deletions(-) Index: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp diff -u llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.141 llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.142 --- llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.141 Thu Oct 26 01:15:43 2006 +++ llvm/lib/ExecutionEngine/Interpreter/Execution.cpp Tue Oct 31 21:41:05 2006 @@ -254,16 +254,19 @@ return Dest; } +#define IMPLEMENT_SIGNLESS_BINOP(OP, TY1, TY2) \ + case Type::TY2##TyID: IMPLEMENT_BINARY_OPERATOR(OP, TY1) + static GenericValue executeUDivInst(GenericValue Src1, GenericValue Src2, const Type *Ty) { GenericValue Dest; if (Ty->isSigned()) Ty = Ty->getUnsignedVersion(); switch (Ty->getTypeID()) { - IMPLEMENT_BINARY_OPERATOR(/, UByte); - IMPLEMENT_BINARY_OPERATOR(/, UShort); - IMPLEMENT_BINARY_OPERATOR(/, UInt); - IMPLEMENT_BINARY_OPERATOR(/, ULong); + IMPLEMENT_SIGNLESS_BINOP(/, UByte, SByte); + IMPLEMENT_SIGNLESS_BINOP(/, UShort, Short); + IMPLEMENT_SIGNLESS_BINOP(/, UInt, Int); + IMPLEMENT_SIGNLESS_BINOP(/, ULong, Long); default: std::cout << "Unhandled type for UDiv instruction: " << *Ty << "\n"; abort(); @@ -277,10 +280,10 @@ if (Ty->isUnsigned()) Ty = Ty->getSignedVersion(); switch (Ty->getTypeID()) { - IMPLEMENT_BINARY_OPERATOR(/, SByte); - IMPLEMENT_BINARY_OPERATOR(/, Short); - IMPLEMENT_BINARY_OPERATOR(/, Int); - IMPLEMENT_BINARY_OPERATOR(/, Long); + IMPLEMENT_SIGNLESS_BINOP(/, SByte, UByte); + IMPLEMENT_SIGNLESS_BINOP(/, Short, UShort); + IMPLEMENT_SIGNLESS_BINOP(/, Int, UInt); + IMPLEMENT_SIGNLESS_BINOP(/, Long, ULong); default: std::cout << "Unhandled type for SDiv instruction: " << *Ty << "\n"; abort(); From evan.cheng at apple.com Tue Oct 31 22:48:44 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 31 Oct 2006 22:48:44 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp SelectionDAGPrinter.cpp Message-ID: <200611010448.kA14minH026315@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAG.cpp updated: 1.363 -> 1.364 SelectionDAGPrinter.cpp updated: 1.41 -> 1.42 --- Log message: Print jumptable index. --- Diffs of the changes: (+4 -0) SelectionDAG.cpp | 2 ++ SelectionDAGPrinter.cpp | 2 ++ 2 files changed, 4 insertions(+) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.363 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.364 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.363 Mon Oct 30 01:59:36 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Tue Oct 31 22:48:30 2006 @@ -2851,6 +2851,8 @@ std::cerr << " " << offset; } else if (const FrameIndexSDNode *FIDN = dyn_cast(this)) { std::cerr << "<" << FIDN->getIndex() << ">"; + } else if (const JumpTableSDNode *JTDN = dyn_cast(this)) { + std::cerr << "<" << JTDN->getIndex() << ">"; } else if (const ConstantPoolSDNode *CP = dyn_cast(this)){ int offset = CP->getOffset(); if (CP->isMachineConstantPoolEntry()) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp:1.41 llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp:1.42 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp:1.41 Fri Oct 20 13:06:09 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp Tue Oct 31 22:48:30 2006 @@ -105,6 +105,8 @@ Op += itostr(offset); } else if (const FrameIndexSDNode *FIDN = dyn_cast(Node)) { Op += " " + itostr(FIDN->getIndex()); + } else if (const JumpTableSDNode *JTDN = dyn_cast(Node)) { + Op += " " + itostr(JTDN->getIndex()); } else if (const ConstantPoolSDNode *CP = dyn_cast(Node)){ if (CP->isMachineConstantPoolEntry()) { std::ostringstream SS; From sabre at nondot.org Tue Oct 31 22:51:32 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 31 Oct 2006 22:51:32 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200611010451.kA14pWR6026408@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.529 -> 1.530 --- Log message: Fold things like "phi [add (a,b), add(c,d)]" into two phi's and one add. This triggers thousands of times on multisource. --- Diffs of the changes: (+57 -3) InstructionCombining.cpp | 60 ++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 57 insertions(+), 3 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.529 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.530 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.529 Thu Oct 26 14:19:06 2006 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Tue Oct 31 22:51:18 2006 @@ -276,7 +276,9 @@ // operator and they all are only used by the PHI, PHI together their // inputs, and do the operation once, to the result of the PHI. Instruction *FoldPHIArgOpIntoPHI(PHINode &PN); - + Instruction *FoldPHIArgBinOpIntoPHI(PHINode &PN); + + Instruction *OptAndOp(Instruction *Op, ConstantIntegral *OpRHS, ConstantIntegral *AndRHS, BinaryOperator &TheAnd); @@ -6778,6 +6780,56 @@ return true; } +/// FoldPHIArgBinOpIntoPHI - If we have something like phi [add (a,b), add(c,d)] +/// and if a/b/c/d and the add's all have a single use, turn this into two phi's +/// and a single binop. +Instruction *InstCombiner::FoldPHIArgBinOpIntoPHI(PHINode &PN) { + Instruction *FirstInst = cast(PN.getIncomingValue(0)); + assert(isa(FirstInst) || isa(FirstInst)); + unsigned Opc = FirstInst->getOpcode(); + + // Scan to see if all operands are the same opcode, all have one use, and all + // kill their operands (i.e. the operands have one use). + unsigned NumValues = PN.getNumIncomingValues(); + for (unsigned i = 0; i != NumValues; ++i) { + Instruction *I = dyn_cast(PN.getIncomingValue(i)); + if (!I || I->getOpcode() != Opc || !I->hasOneUse()) + return 0; + } + + // Otherwise, this is safe and profitable to transform. Create two phi nodes. + PHINode *NewLHS = new PHINode(FirstInst->getOperand(0)->getType(), + FirstInst->getOperand(0)->getName()+".pn"); + NewLHS->reserveOperandSpace(PN.getNumOperands()/2); + PHINode *NewRHS = new PHINode(FirstInst->getOperand(1)->getType(), + FirstInst->getOperand(1)->getName()+".pn"); + NewRHS->reserveOperandSpace(PN.getNumOperands()/2); + + Value *InLHS = FirstInst->getOperand(0); + NewLHS->addIncoming(InLHS, PN.getIncomingBlock(0)); + Value *InRHS = FirstInst->getOperand(1); + NewRHS->addIncoming(InRHS, PN.getIncomingBlock(0)); + + // Add all operands to the new PHsI. + for (unsigned i = 1, e = PN.getNumIncomingValues(); i != e; ++i) { + Value *NewInLHS = cast(PN.getIncomingValue(i))->getOperand(0); + Value *NewInRHS = cast(PN.getIncomingValue(i))->getOperand(1); + if (NewInLHS != InLHS) InLHS = 0; + if (NewInRHS != InRHS) InRHS = 0; + NewLHS->addIncoming(NewInLHS, PN.getIncomingBlock(i)); + NewRHS->addIncoming(NewInRHS, PN.getIncomingBlock(i)); + } + + InsertNewInstBefore(NewLHS, PN); + InsertNewInstBefore(NewRHS, PN); + + if (BinaryOperator *BinOp = dyn_cast(FirstInst)) + return BinaryOperator::create(BinOp->getOpcode(), NewLHS, NewRHS); + else + return new ShiftInst(cast(FirstInst)->getOpcode(), + NewLHS, NewRHS); +} + // FoldPHIArgOpIntoPHI - If all operands to a PHI node are the same "unary" // operator and they all are only used by the PHI, PHI together their @@ -6794,9 +6846,11 @@ if (isa(FirstInst)) { CastSrcTy = FirstInst->getOperand(0)->getType(); } else if (isa(FirstInst) || isa(FirstInst)) { - // Can fold binop or shift if the RHS is a constant. + // Can fold binop or shift here if the RHS is a constant, otherwise call + // FoldPHIArgBinOpIntoPHI. ConstantOp = dyn_cast(FirstInst->getOperand(1)); - if (ConstantOp == 0) return 0; + if (ConstantOp == 0) + return FoldPHIArgBinOpIntoPHI(PN); } else { return 0; // Cannot fold this operation. } From reid at x10sys.com Tue Oct 31 21:45:57 2006 From: reid at x10sys.com (Reid Spencer) Date: Tue, 31 Oct 2006 21:45:57 -0600 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp Message-ID: <200611010345.kA13jvHP025224@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/Interpreter: Execution.cpp updated: 1.142 -> 1.143 --- Log message: Remove unnecessary sign conversions made possible by last patch. --- Diffs of the changes: (+0 -4) Execution.cpp | 4 ---- 1 files changed, 4 deletions(-) Index: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp diff -u llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.142 llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.143 --- llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.142 Tue Oct 31 21:41:05 2006 +++ llvm/lib/ExecutionEngine/Interpreter/Execution.cpp Tue Oct 31 21:45:43 2006 @@ -260,8 +260,6 @@ static GenericValue executeUDivInst(GenericValue Src1, GenericValue Src2, const Type *Ty) { GenericValue Dest; - if (Ty->isSigned()) - Ty = Ty->getUnsignedVersion(); switch (Ty->getTypeID()) { IMPLEMENT_SIGNLESS_BINOP(/, UByte, SByte); IMPLEMENT_SIGNLESS_BINOP(/, UShort, Short); @@ -277,8 +275,6 @@ static GenericValue executeSDivInst(GenericValue Src1, GenericValue Src2, const Type *Ty) { GenericValue Dest; - if (Ty->isUnsigned()) - Ty = Ty->getSignedVersion(); switch (Ty->getTypeID()) { IMPLEMENT_SIGNLESS_BINOP(/, SByte, UByte); IMPLEMENT_SIGNLESS_BINOP(/, Short, UShort); From sabre at nondot.org Tue Oct 31 22:56:01 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 31 Oct 2006 22:56:01 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200611010456.kA14u1mN026516@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.530 -> 1.531 --- Log message: Fix a bug in the previous patch --- Diffs of the changes: (+6 -3) InstructionCombining.cpp | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.530 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.531 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.530 Tue Oct 31 22:51:18 2006 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Tue Oct 31 22:55:47 2006 @@ -6787,13 +6787,16 @@ Instruction *FirstInst = cast(PN.getIncomingValue(0)); assert(isa(FirstInst) || isa(FirstInst)); unsigned Opc = FirstInst->getOpcode(); + const Type *LHSType = FirstInst->getOperand(0)->getType(); // Scan to see if all operands are the same opcode, all have one use, and all // kill their operands (i.e. the operands have one use). - unsigned NumValues = PN.getNumIncomingValues(); - for (unsigned i = 0; i != NumValues; ++i) { + for (unsigned i = 0; i != PN.getNumIncomingValues(); ++i) { Instruction *I = dyn_cast(PN.getIncomingValue(i)); - if (!I || I->getOpcode() != Opc || !I->hasOneUse()) + if (!I || I->getOpcode() != Opc || !I->hasOneUse() || + // Verify type of the LHS matches so we don't fold setcc's of different + // types. + I->getOperand(0)->getType() != LHSType) return 0; } From evan.cheng at apple.com Wed Nov 1 00:54:07 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 1 Nov 2006 00:54:07 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86InstrSSE.td Message-ID: <200611010654.kA16s7fD028295@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86InstrSSE.td updated: 1.167 -> 1.168 --- Log message: Fix ldmxcsr JIT encoding. --- Diffs of the changes: (+4 -6) X86InstrSSE.td | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) Index: llvm/lib/Target/X86/X86InstrSSE.td diff -u llvm/lib/Target/X86/X86InstrSSE.td:1.167 llvm/lib/Target/X86/X86InstrSSE.td:1.168 --- llvm/lib/Target/X86/X86InstrSSE.td:1.167 Fri Oct 27 16:08:32 2006 +++ llvm/lib/Target/X86/X86InstrSSE.td Wed Nov 1 00:53:52 2006 @@ -1653,12 +1653,10 @@ "mfence", [(int_x86_sse2_mfence)]>, TB, Requires<[HasSSE2]>; // MXCSR register -def LDMXCSR : I<0xAE, MRM5m, (ops i32mem:$src), - "ldmxcsr $src", - [(int_x86_sse_ldmxcsr addr:$src)]>, TB, Requires<[HasSSE1]>; -def STMXCSR : I<0xAE, MRM3m, (ops i32mem:$dst), - "stmxcsr $dst", - [(int_x86_sse_stmxcsr addr:$dst)]>, TB, Requires<[HasSSE1]>; +def LDMXCSR : PSI<0xAE, MRM2m, (ops i32mem:$src), + "ldmxcsr $src", [(int_x86_sse_ldmxcsr addr:$src)]>; +def STMXCSR : PSI<0xAE, MRM3m, (ops i32mem:$dst), + "stmxcsr $dst", [(int_x86_sse_stmxcsr addr:$dst)]>; // Thread synchronization def MONITOR : I<0xC8, RawFrm, (ops), "monitor", From sabre at nondot.org Wed Nov 1 01:14:08 2006 From: sabre at nondot.org (Chris Lattner) Date: Wed, 1 Nov 2006 01:14:08 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200611010714.kA17E82E028643@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.531 -> 1.532 --- Log message: Turn a phi of many loads into a phi of the address and a single load of the result. This can significantly shrink code and exposes identities more aggressively. --- Diffs of the changes: (+30 -41) InstructionCombining.cpp | 71 +++++++++++++++++++---------------------------- 1 files changed, 30 insertions(+), 41 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.531 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.532 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.531 Tue Oct 31 22:55:47 2006 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Wed Nov 1 01:13:54 2006 @@ -6833,6 +6833,19 @@ NewLHS, NewRHS); } +/// isSafeToSinkLoad - Return true if we know that it is safe sink the load out +/// of the block that defines it. This means that it must be obvious the value +/// of the load is not changed from the point of the load to the end of the +/// block it is in. +static bool isSafeToSinkLoad(LoadInst *L) { + BasicBlock::iterator BBI = L, E = L->getParent()->end(); + + for (++BBI; BBI != E; ++BBI) + if (BBI->mayWriteToMemory()) + return false; + return true; +} + // FoldPHIArgOpIntoPHI - If all operands to a PHI node are the same "unary" // operator and they all are only used by the PHI, PHI together their @@ -6846,6 +6859,7 @@ // code size and simplifying code. Constant *ConstantOp = 0; const Type *CastSrcTy = 0; + bool isVolatile = false; if (isa(FirstInst)) { CastSrcTy = FirstInst->getOperand(0)->getType(); } else if (isa(FirstInst) || isa(FirstInst)) { @@ -6854,6 +6868,13 @@ ConstantOp = dyn_cast(FirstInst->getOperand(1)); if (ConstantOp == 0) return FoldPHIArgBinOpIntoPHI(PN); + } else if (LoadInst *LI = dyn_cast(FirstInst)) { + isVolatile = LI->isVolatile(); + // We can't sink the load if the loaded value could be modified between the + // load and the PHI. + if (LI->getParent() != PN.getIncomingBlock(0) || + !isSafeToSinkLoad(LI)) + return 0; } else { return 0; // Cannot fold this operation. } @@ -6867,6 +6888,13 @@ if (CastSrcTy) { if (I->getOperand(0)->getType() != CastSrcTy) return 0; // Cast operation must match. + } else if (LoadInst *LI = dyn_cast(I)) { + // We can't sink the load if the loaded value could be modified between the + // load and the PHI. + if (LI->isVolatile() != isVolatile || + LI->getParent() != PN.getIncomingBlock(i) || + !isSafeToSinkLoad(LI)) + return 0; } else if (I->getOperand(1) != ConstantOp) { return 0; } @@ -6903,6 +6931,8 @@ // Insert and return the new operation. if (isa(FirstInst)) return new CastInst(PhiVal, PN.getType()); + else if (LoadInst *LI = dyn_cast(FirstInst)) + return new LoadInst(PhiVal, "", isVolatile); else if (BinaryOperator *BinOp = dyn_cast(FirstInst)) return BinaryOperator::create(BinOp->getOpcode(), PhiVal, ConstantOp); else @@ -7537,47 +7567,6 @@ LI.setOperand(0, SI->getOperand(1)); return &LI; } - - } else if (PHINode *PN = dyn_cast(Op)) { - // load (phi (&V1, &V2, &V3)) --> phi(load &V1, load &V2, load &V3) - bool Safe = PN->getParent() == LI.getParent(); - - // Scan all of the instructions between the PHI and the load to make - // sure there are no instructions that might possibly alter the value - // loaded from the PHI. - if (Safe) { - BasicBlock::iterator I = &LI; - for (--I; !isa(I); --I) - if (isa(I) || isa(I)) { - Safe = false; - break; - } - } - - for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e && Safe; ++i) - if (!isSafeToLoadUnconditionally(PN->getIncomingValue(i), - PN->getIncomingBlock(i)->getTerminator())) - Safe = false; - - if (Safe) { - // Create the PHI. - PHINode *NewPN = new PHINode(LI.getType(), PN->getName()); - InsertNewInstBefore(NewPN, *PN); - std::map LoadMap; // Don't insert duplicate loads - - for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) { - BasicBlock *BB = PN->getIncomingBlock(i); - Value *&TheLoad = LoadMap[BB]; - if (TheLoad == 0) { - Value *InVal = PN->getIncomingValue(i); - TheLoad = InsertNewInstBefore(new LoadInst(InVal, - InVal->getName()+".val"), - *BB->getTerminator()); - } - NewPN->addIncoming(TheLoad, BB); - } - return ReplaceInstUsesWith(LI, NewPN); - } } } return 0; From sabre at nondot.org Wed Nov 1 01:15:58 2006 From: sabre at nondot.org (Chris Lattner) Date: Wed, 1 Nov 2006 01:15:58 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/load.ll Message-ID: <200611010715.kA17FwTI028700@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/InstCombine: load.ll updated: 1.11 -> 1.12 --- Log message: remove a testcase for a marginal feature --- Diffs of the changes: (+0 -14) load.ll | 14 -------------- 1 files changed, 14 deletions(-) Index: llvm/test/Regression/Transforms/InstCombine/load.ll diff -u llvm/test/Regression/Transforms/InstCombine/load.ll:1.11 llvm/test/Regression/Transforms/InstCombine/load.ll:1.12 --- llvm/test/Regression/Transforms/InstCombine/load.ll:1.11 Mon Sep 12 18:22:17 2005 +++ llvm/test/Regression/Transforms/InstCombine/load.ll Wed Nov 1 01:15:44 2006 @@ -40,20 +40,6 @@ ret int %Z } -; load (phi (&V1, &V2, &V3)) --> phi(load &V1, load &V2, load &V3) -int %test6(bool %C) { -entry: - br bool %C, label %cond_true.i, label %cond_continue.i - -cond_true.i: - br label %cond_continue.i - -cond_continue.i: - %mem_tmp.i.0 = phi int* [ %X, %cond_true.i ], [ %X2, %entry ] - %tmp.3 = load int* %mem_tmp.i.0 - ret int %tmp.3 -} - int %test7(int %X) { %V = getelementptr int* null, int %X %R = load int* %V From sabre at nondot.org Wed Nov 1 01:43:56 2006 From: sabre at nondot.org (Chris Lattner) Date: Wed, 1 Nov 2006 01:43:56 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200611010743.kA17huKJ029180@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.532 -> 1.533 --- Log message: Factor gep instructions through phi nodes. --- Diffs of the changes: (+39 -10) InstructionCombining.cpp | 49 +++++++++++++++++++++++++++++++++++++---------- 1 files changed, 39 insertions(+), 10 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.532 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.533 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.532 Wed Nov 1 01:13:54 2006 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Wed Nov 1 01:43:41 2006 @@ -6785,9 +6785,11 @@ /// and a single binop. Instruction *InstCombiner::FoldPHIArgBinOpIntoPHI(PHINode &PN) { Instruction *FirstInst = cast(PN.getIncomingValue(0)); - assert(isa(FirstInst) || isa(FirstInst)); + assert(isa(FirstInst) || isa(FirstInst) || + isa(FirstInst)); unsigned Opc = FirstInst->getOpcode(); const Type *LHSType = FirstInst->getOperand(0)->getType(); + const Type *RHSType = FirstInst->getOperand(1)->getType(); // Scan to see if all operands are the same opcode, all have one use, and all // kill their operands (i.e. the operands have one use). @@ -6795,8 +6797,9 @@ Instruction *I = dyn_cast(PN.getIncomingValue(i)); if (!I || I->getOpcode() != Opc || !I->hasOneUse() || // Verify type of the LHS matches so we don't fold setcc's of different - // types. - I->getOperand(0)->getType() != LHSType) + // types or GEP's with different index types. + I->getOperand(0)->getType() != LHSType || + I->getOperand(1)->getType() != RHSType) return 0; } @@ -6823,14 +6826,35 @@ NewRHS->addIncoming(NewInRHS, PN.getIncomingBlock(i)); } - InsertNewInstBefore(NewLHS, PN); - InsertNewInstBefore(NewRHS, PN); - + Value *LHSVal; + if (InLHS) { + // The new PHI unions all of the same values together. This is really + // common, so we handle it intelligently here for compile-time speed. + LHSVal = InLHS; + delete NewLHS; + } else { + InsertNewInstBefore(NewLHS, PN); + LHSVal = NewLHS; + } + Value *RHSVal; + if (InRHS) { + // The new PHI unions all of the same values together. This is really + // common, so we handle it intelligently here for compile-time speed. + RHSVal = InRHS; + delete NewRHS; + } else { + InsertNewInstBefore(NewRHS, PN); + RHSVal = NewRHS; + } + if (BinaryOperator *BinOp = dyn_cast(FirstInst)) - return BinaryOperator::create(BinOp->getOpcode(), NewLHS, NewRHS); - else - return new ShiftInst(cast(FirstInst)->getOpcode(), - NewLHS, NewRHS); + return BinaryOperator::create(BinOp->getOpcode(), LHSVal, RHSVal); + else if (ShiftInst *SI = dyn_cast(FirstInst)) + return new ShiftInst(SI->getOpcode(), LHSVal, RHSVal); + else { + assert(isa(FirstInst)); + return new GetElementPtrInst(LHSVal, RHSVal); + } } /// isSafeToSinkLoad - Return true if we know that it is safe sink the load out @@ -6875,6 +6899,11 @@ if (LI->getParent() != PN.getIncomingBlock(0) || !isSafeToSinkLoad(LI)) return 0; + } else if (isa(FirstInst)) { + if (FirstInst->getNumOperands() == 2) + return FoldPHIArgBinOpIntoPHI(PN); + // Can't handle general GEPs yet. + return 0; } else { return 0; // Cannot fold this operation. } From rspencer at reidspencer.com Wed Nov 1 01:55:39 2006 From: rspencer at reidspencer.com (Reid Spencer) Date: Tue, 31 Oct 2006 23:55:39 -0800 Subject: [llvm-commits] SHR Patch Message-ID: <1162367739.11568.88.camel@bashful.x10sys.com> Chris, Attached is the patch for generating AShr and LShr that Sheng Zhou wrote and that I've reviewed and tested. This patch passes all tests. Could you please give it a final review so we can commit it. Thanks, Reid. -------------- next part -------------- A non-text attachment was scrubbed... Name: SHR.patch Type: text/x-patch Size: 92387 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20061031/719d3ef6/attachment.bin From rspencer at reidspencer.com Wed Nov 1 02:08:53 2006 From: rspencer at reidspencer.com (Reid Spencer) Date: Wed, 01 Nov 2006 00:08:53 -0800 Subject: [llvm-commits] [llvm-gcc] SHR Patch Message-ID: <1162368533.11568.101.camel@bashful.x10sys.com> This patch is for llvm-gcc to make it emit ashr (arithmetic shift right) and lshr (logical shift right) instructions. It needs to be applied to llvm-gcc after the SHR.patch is applied to LLVM. Reid. -------------- next part -------------- A non-text attachment was scrubbed... Name: SHR-llvmgcc.patch Type: text/x-patch Size: 1927 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20061101/23663549/attachment.bin From evan.cheng at apple.com Wed Nov 1 03:23:23 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 1 Nov 2006 03:23:23 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp Message-ID: <200611010923.kA19NN9i006913@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: AsmPrinter.cpp updated: 1.115 -> 1.116 --- Log message: Add a printSetLabel that takes two id's. --- Diffs of the changes: (+13 -0) AsmPrinter.cpp | 13 +++++++++++++ 1 files changed, 13 insertions(+) Index: llvm/lib/CodeGen/AsmPrinter.cpp diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.115 llvm/lib/CodeGen/AsmPrinter.cpp:1.116 --- llvm/lib/CodeGen/AsmPrinter.cpp:1.115 Tue Oct 31 02:31:23 2006 +++ llvm/lib/CodeGen/AsmPrinter.cpp Wed Nov 1 03:23:08 2006 @@ -875,6 +875,19 @@ << '_' << uid << '\n'; } +void AsmPrinter::printSetLabel(unsigned uid, unsigned uid2, + const MachineBasicBlock *MBB) const { + if (!TAI->getSetDirective()) + return; + + O << TAI->getSetDirective() << ' ' << TAI->getPrivateGlobalPrefix() + << getFunctionNumber() << '_' << uid << '_' << uid2 + << "_set_" << MBB->getNumber() << ','; + printBasicBlockLabel(MBB, false, false); + O << '-' << TAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber() + << '_' << uid << '_' << uid2 << '\n'; +} + /// printDataDirective - This method prints the asm directive for the /// specified type. void AsmPrinter::printDataDirective(const Type *type) { From evan.cheng at apple.com Wed Nov 1 03:22:58 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 1 Nov 2006 03:22:58 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/AsmPrinter.h Message-ID: <200611010922.kA19MwCU006887@zion.cs.uiuc.edu> 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. From rafael.espindola at gmail.com Wed Nov 1 08:13:42 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Wed, 1 Nov 2006 08:13:42 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.td Message-ID: <200611011413.kA1EDgxo012437@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMInstrInfo.td updated: 1.71 -> 1.72 --- Log message: implement zextload bool and truncstore bool --- Diffs of the changes: (+10 -0) ARMInstrInfo.td | 10 ++++++++++ 1 files changed, 10 insertions(+) Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.71 llvm/lib/Target/ARM/ARMInstrInfo.td:1.72 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.71 Tue Oct 24 11:47:57 2006 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Wed Nov 1 08:13:27 2006 @@ -347,3 +347,13 @@ (LDRB IntRegs:$addr)>; def : Pat<(extloadi16 IntRegs:$addr), (LDRH IntRegs:$addr)>; + +// zextload bool -> zextload byte +def : Pat<(i32 (zextloadi1 IntRegs:$addr)), (LDRB IntRegs:$addr)>; +def : Pat<(i32 (zextloadi1 IntRegs:$addr)), (LDRB IntRegs:$addr)>; + +// truncstore bool -> truncstore byte. +def : Pat<(truncstorei1 IntRegs:$src, IntRegs:$addr), + (STRB IntRegs:$addr, IntRegs:$src)>; +def : Pat<(truncstorei1 IntRegs:$src, IntRegs:$addr), + (STRB IntRegs:$addr, IntRegs:$src)>; From rafael.espindola at gmail.com Wed Nov 1 08:26:58 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Wed, 1 Nov 2006 08:26:58 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMAsmPrinter.cpp Message-ID: <200611011426.kA1EQwe4012667@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMAsmPrinter.cpp updated: 1.25 -> 1.26 --- Log message: print null values in bss --- Diffs of the changes: (+4 -2) ARMAsmPrinter.cpp | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) Index: llvm/lib/Target/ARM/ARMAsmPrinter.cpp diff -u llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.25 llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.26 --- llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.25 Thu Oct 19 08:30:40 2006 +++ llvm/lib/Target/ARM/ARMAsmPrinter.cpp Wed Nov 1 08:26:44 2006 @@ -303,8 +303,10 @@ break; } - assert (!C->isNullValue()); - SwitchToDataSection(".data", I); + if (C->isNullValue()) + SwitchToDataSection(".bss", I); + else + SwitchToDataSection(".data", I); EmitAlignment(Align, I); O << "\t.type " << name << ", %object\n"; From reid at x10sys.com Wed Nov 1 10:15:23 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 1 Nov 2006 10:15:23 -0600 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200611011615.kA1GFNFl023176@zion.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.362 -> 1.363 --- Log message: Partial update for Release 1.9 --- Diffs of the changes: (+25 -59) ReleaseNotes.html | 84 ++++++++++++++++-------------------------------------- 1 files changed, 25 insertions(+), 59 deletions(-) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.362 llvm/docs/ReleaseNotes.html:1.363 --- llvm/docs/ReleaseNotes.html:1.362 Wed Aug 9 12:08:27 2006 +++ llvm/docs/ReleaseNotes.html Wed Nov 1 10:15:04 2006 @@ -4,11 +4,11 @@ - LLVM 1.8 Release Notes + LLVM 1.9 Release Notes -
LLVM 1.8 Release Notes
+
LLVM 1.9 Release Notes
  1. Introduction
  2. @@ -32,7 +32,7 @@

    This document contains the release notes for the LLVM compiler -infrastructure, release 1.8. Here we describe the status of LLVM, including any +infrastructure, release 1.9. Here we describe the status of LLVM, including any known problems and major improvements from the previous release. The most up-to-date version of this document (corresponding to LLVM CVS) can be found on the -

    This is the ninth public release of the LLVM Compiler Infrastructure. This -release incorporates a large number of enhancements and new features, -including DWARF debugging support (C and C++ on Darwin/PPC), improved inline -assembly support, a new nightly -tester, llvm-config enhancements, many bugs -fixed, and performance and compile time improvements. +

    This is the tenth public release of the LLVM Compiler Infrastructure. This +release incorporates a large number of enhancements and new features.

    - - +
    - -

    The llvm-gcc4 C front-end now generates debugging info for C and C++. This -information is propagated through the compiler and the code generator can -currently produce DWARF debugging information from it. DWARF is a standard -debugging format used on many platforms, but currently LLVM only includes -target support for Mac OS X targets for the 1.8 release. -

    - +

    The llvm-gcc4 C front-end now generates debugging info for C and C++ for +X86/ELF platforms (Linux). This extends the PPC/Darwin and X86/Darwin debugging +support available in release 18.8 DWARF is a standard debugging format used on +many platforms.

    - - +
    - -

    Inline assembly support is substantially improved in LLVM 1.8 over LLVM 1.7. -Many unsupported features are now supported, and inline asm support in the X86 -backend is far better. llvm-gcc4 now supports global register variables as -well.

    - +

    As a step towards making LLVM's integer types signless, several new +instructions have been added to LLVM. The DIV instruction has become UDIV, SDIV, +and FDIV. The REM instruction has become UREM, SREM and FREM. The SHR +instruction has become ASHR and LSHR. See the Language + Reference for details on these new instructions.

    - - +
    - -

    The loop optimizer passes now uses "Loop-Closed SSA Form", which makes it -easier to update SSA form as loop transformations change the code. An -immediate benefit of this is that the loop unswitching pass can now unswitch -loops in more cases. -

    - +

    Describe feature C here.

    - - +
    - -

    The code generator now lowers switch statements to jump tables, providing -significant performance boosts for applications (e.g. interpreters) whose -performance is highly correlated to switch statement performance.

    - +

    Describe feature D here.

    - - +
    - -

    The LLVM JIT now allows clients to deallocate machine code JIT'd to its code -buffer. This is important for long living applications that depend on the JIT. -

    - +

    Describe feature E here.

    -
    -

    This release includes many other improvements, including improvements to the optimizers and code generators (improving the generated code) changes to speed up the compiler in many ways (improving algorithms and fine tuning @@ -684,7 +650,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /> The LLVM Compiler Infrastructure
    - Last modified: $Date: 2006/08/09 17:08:27 $ + Last modified: $Date: 2006/11/01 16:15:04 $ From sabre at nondot.org Wed Nov 1 12:30:39 2006 From: sabre at nondot.org (Chris Lattner) Date: Wed, 1 Nov 2006 12:30:39 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/ScalarRepl/phinodepromote.ll Message-ID: <200611011830.kA1IUdiT005720@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/ScalarRepl: phinodepromote.ll updated: 1.2 -> 1.3 --- Log message: extra pass is required now --- Diffs of the changes: (+1 -1) phinodepromote.ll | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/Regression/Transforms/ScalarRepl/phinodepromote.ll diff -u llvm/test/Regression/Transforms/ScalarRepl/phinodepromote.ll:1.2 llvm/test/Regression/Transforms/ScalarRepl/phinodepromote.ll:1.3 --- llvm/test/Regression/Transforms/ScalarRepl/phinodepromote.ll:1.2 Sun Sep 19 13:45:45 2004 +++ llvm/test/Regression/Transforms/ScalarRepl/phinodepromote.ll Wed Nov 1 12:30:25 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | opt -instcombine -mem2reg | llvm-dis | not grep alloca +; RUN: llvm-as < %s | opt -simplifycfg -instcombine -mem2reg | llvm-dis | not grep alloca ; ; This tests to see if mem2reg can promote alloca instructions whose addresses ; are used by PHI nodes that are immediately loaded. The LLVM C++ front-end From sabre at nondot.org Wed Nov 1 12:03:13 2006 From: sabre at nondot.org (Chris Lattner) Date: Wed, 1 Nov 2006 12:03:13 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/GlobalOpt/2006-11-01-ShrinkGlobalPhiCrash.ll Message-ID: <200611011803.kA1I3DnL005113@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/GlobalOpt: 2006-11-01-ShrinkGlobalPhiCrash.ll added (r1.1) --- Log message: new testcase that crashes global opt, reduced from chomp --- Diffs of the changes: (+33 -0) 2006-11-01-ShrinkGlobalPhiCrash.ll | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+) Index: llvm/test/Regression/Transforms/GlobalOpt/2006-11-01-ShrinkGlobalPhiCrash.ll diff -c /dev/null llvm/test/Regression/Transforms/GlobalOpt/2006-11-01-ShrinkGlobalPhiCrash.ll:1.1 *** /dev/null Wed Nov 1 12:03:03 2006 --- llvm/test/Regression/Transforms/GlobalOpt/2006-11-01-ShrinkGlobalPhiCrash.ll Wed Nov 1 12:02:53 2006 *************** *** 0 **** --- 1,33 ---- + ; RUN: llvm-as < %s | opt -globalopt -disable-output + %struct._list = type { int*, %struct._list* } + %struct._play = type { int, int*, %struct._list*, %struct._play* } + %nrow = internal global int 0 ; [#uses=2] + + implementation ; Functions: + + void %make_play() { + entry: + br label %cond_true16.i + + cond_true16.i: ; preds = %cond_true16.i, %entry + %low.0.in.i.0 = phi int* [ %nrow, %entry ], [ null, %cond_true16.i ] ; [#uses=1] + %low.0.i = load int* %low.0.in.i.0 ; [#uses=0] + br label %cond_true16.i + } + + void %make_wanted() { + entry: + unreachable + } + + void %get_good_move() { + entry: + ret void + } + + void %main() { + entry: + store int 8, int* %nrow + tail call void %make_play( ) + ret void + } From sabre at nondot.org Wed Nov 1 12:03:48 2006 From: sabre at nondot.org (Chris Lattner) Date: Wed, 1 Nov 2006 12:03:48 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/IPO/GlobalOpt.cpp Message-ID: <200611011803.kA1I3mj0005180@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: GlobalOpt.cpp updated: 1.69 -> 1.70 --- Log message: Fix GlobalOpt/2006-11-01-ShrinkGlobalPhiCrash.ll and McGill/chomp --- Diffs of the changes: (+14 -8) GlobalOpt.cpp | 22 ++++++++++++++-------- 1 files changed, 14 insertions(+), 8 deletions(-) Index: llvm/lib/Transforms/IPO/GlobalOpt.cpp diff -u llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.69 llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.70 --- llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.69 Fri Oct 20 02:07:24 2006 +++ llvm/lib/Transforms/IPO/GlobalOpt.cpp Wed Nov 1 12:03:33 2006 @@ -104,17 +104,20 @@ /// ever stored to this global, keep track of what value it is. Value *StoredOnceValue; - // AccessingFunction/HasMultipleAccessingFunctions - These start out - // null/false. When the first accessing function is noticed, it is recorded. - // When a second different accessing function is noticed, - // HasMultipleAccessingFunctions is set to true. + /// AccessingFunction/HasMultipleAccessingFunctions - These start out + /// null/false. When the first accessing function is noticed, it is recorded. + /// When a second different accessing function is noticed, + /// HasMultipleAccessingFunctions is set to true. Function *AccessingFunction; bool HasMultipleAccessingFunctions; - // HasNonInstructionUser - Set to true if this global has a user that is not - // an instruction (e.g. a constant expr or GV initializer). + /// HasNonInstructionUser - Set to true if this global has a user that is not + /// an instruction (e.g. a constant expr or GV initializer). bool HasNonInstructionUser; + /// HasPHIUser - Set to true if this global has a user that is a PHI node. + bool HasPHIUser; + /// isNotSuitableForSRA - Keep track of whether any SRA preventing users of /// the global exist. Such users include GEP instruction with variable /// indexes, and non-gep/load/store users like constant expr casts. @@ -122,7 +125,8 @@ GlobalStatus() : isLoaded(false), StoredType(NotStored), StoredOnceValue(0), AccessingFunction(0), HasMultipleAccessingFunctions(false), - HasNonInstructionUser(false), isNotSuitableForSRA(false) {} + HasNonInstructionUser(false), HasPHIUser(false), + isNotSuitableForSRA(false) {} }; @@ -238,6 +242,7 @@ if (PHIUsers.insert(PN).second) // Not already visited. if (AnalyzeGlobal(I, GS, PHIUsers)) return true; GS.isNotSuitableForSRA = true; + GS.HasPHIUser = true; } else if (isa(I)) { GS.isNotSuitableForSRA = true; } else if (isa(I) || isa(I)) { @@ -1321,7 +1326,8 @@ // boolean. if (Constant *SOVConstant = dyn_cast(GS.StoredOnceValue)) if (GV->getType()->getElementType() != Type::BoolTy && - !GV->getType()->getElementType()->isFloatingPoint()) { + !GV->getType()->getElementType()->isFloatingPoint() && + !GS.HasPHIUser) { DEBUG(std::cerr << " *** SHRINKING TO BOOL: " << *GV); ShrinkGlobalToBoolean(GV, SOVConstant); ++NumShrunkToBool; From sabre at nondot.org Wed Nov 1 13:36:43 2006 From: sabre at nondot.org (Chris Lattner) Date: Wed, 1 Nov 2006 13:36:43 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/BranchFolding.cpp Message-ID: <200611011936.kA1Jahj5006917@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: BranchFolding.cpp updated: 1.29 -> 1.30 --- Log message: give branch folding a simple heuristic to decide which block to split so that it inserts an uncond branch where it is less likely to cause a problem. This fixes some perf issues on ppc. --- Diffs of the changes: (+49 -6) BranchFolding.cpp | 55 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 49 insertions(+), 6 deletions(-) Index: llvm/lib/CodeGen/BranchFolding.cpp diff -u llvm/lib/CodeGen/BranchFolding.cpp:1.29 llvm/lib/CodeGen/BranchFolding.cpp:1.30 --- llvm/lib/CodeGen/BranchFolding.cpp:1.29 Tue Oct 31 19:16:12 2006 +++ llvm/lib/CodeGen/BranchFolding.cpp Wed Nov 1 13:36:29 2006 @@ -283,6 +283,44 @@ return NewMBB; } +/// EstimateRuntime - Make a rough estimate for how long it will take to run +/// the specified code. +static unsigned EstimateRuntime(MachineBasicBlock::iterator I, + MachineBasicBlock::iterator E, + const TargetInstrInfo *TII) { + unsigned Time = 0; + for (; I != E; ++I) { + const TargetInstrDescriptor &TID = TII->get(I->getOpcode()); + if (TID.Flags & M_CALL_FLAG) + Time += 10; + else if (TID.Flags & (M_LOAD_FLAG|M_STORE_FLAG)) + Time += 2; + else + ++Time; + } + return Time; +} + +/// ShouldSplitFirstBlock - We need to either split MBB1 at MBB1I or MBB2 at +/// MBB2I and then insert an unconditional branch in the other block. Determine +/// which is the best to split +static bool ShouldSplitFirstBlock(MachineBasicBlock *MBB1, + MachineBasicBlock::iterator MBB1I, + MachineBasicBlock *MBB2, + MachineBasicBlock::iterator MBB2I, + const TargetInstrInfo *TII) { + // TODO: if we had some notion of which block was hotter, we could split + // the hot block, so it is the fall-through. Since we don't have profile info + // make a decision based on which will hurt most to split. + unsigned MBB1Time = EstimateRuntime(MBB1->begin(), MBB1I, TII); + unsigned MBB2Time = EstimateRuntime(MBB2->begin(), MBB2I, TII); + + // If the MBB1 prefix takes "less time" to run than the MBB2 prefix, split the + // MBB1 block so it falls through. This will penalize the MBB2 path, but will + // have a lower overall impact on the program execution. + return MBB1Time < MBB2Time; +} + bool BranchFolder::TailMergeBlocks(MachineFunction &MF) { MadeChange = false; @@ -355,12 +393,17 @@ MergePotentials.pop_back(); continue; } - // TODO: if we had some notion of which block was hotter, we could split - // the hot block, so it is the fall-through. For now, just split the - // second block. - MBB2 = SplitMBBAt(*MBB2, BBI2); - BBI2 = MBB2->begin(); - (MergePotentials.end()-2)->second = MBB2; + + // Decide whether we want to split CurMBB or MBB2. + if (ShouldSplitFirstBlock(CurMBB, BBI1, MBB2, BBI2, TII)) { + CurMBB = SplitMBBAt(*CurMBB, BBI1); + BBI1 = CurMBB->begin(); + MergePotentials.back().second = CurMBB; + } else { + MBB2 = SplitMBBAt(*MBB2, BBI2); + BBI2 = MBB2->begin(); + (MergePotentials.end()-2)->second = MBB2; + } } if (MBB2->begin() == BBI2) { From reid at x10sys.com Wed Nov 1 15:53:33 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 1 Nov 2006 15:53:33 -0600 Subject: [llvm-commits] CVS: llvm/lib/Analysis/ScalarEvolution.cpp Message-ID: <200611012153.kA1LrXBs009477@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: ScalarEvolution.cpp updated: 1.55 -> 1.56 --- Log message: Make ScalarEvolution actually use a ZeroExtend expression instead of having SCZeroExtendExpr be equivalent to SCTruncate --- Diffs of the changes: (+2 -2) ScalarEvolution.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Analysis/ScalarEvolution.cpp diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.55 llvm/lib/Analysis/ScalarEvolution.cpp:1.56 --- llvm/lib/Analysis/ScalarEvolution.cpp:1.55 Thu Oct 26 01:15:43 2006 +++ llvm/lib/Analysis/ScalarEvolution.cpp Wed Nov 1 15:53:12 2006 @@ -229,7 +229,7 @@ SCEVZeroExtendExpr*> > SCEVZeroExtends; SCEVZeroExtendExpr::SCEVZeroExtendExpr(const SCEVHandle &op, const Type *ty) - : SCEV(scTruncate), Op(op), Ty(ty) { + : SCEV(scZeroExtend), Op(op), Ty(ty) { assert(Op->getType()->isInteger() && Ty->isInteger() && Ty->isUnsigned() && "Cannot zero extend non-integer value!"); @@ -1359,7 +1359,7 @@ return SCEVTruncateExpr::get(getSCEV(CI->getOperand(0)), CI->getType()->getUnsignedVersion()); if (SrcTy->isUnsigned() && - SrcTy->getPrimitiveSize() > DestTy->getPrimitiveSize()) + SrcTy->getPrimitiveSize() <= DestTy->getPrimitiveSize()) return SCEVZeroExtendExpr::get(getSCEV(CI->getOperand(0)), CI->getType()->getUnsignedVersion()); } From evan.cheng at apple.com Wed Nov 1 16:17:21 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 1 Nov 2006 16:17:21 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Message-ID: <200611012217.kA1MHLE1010032@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: ScheduleDAGRRList.cpp updated: 1.15 -> 1.16 --- Log message: CopyFromReg starts a live range so its use should not be considered a floater. --- Diffs of the changes: (+1 -1) ScheduleDAGRRList.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.15 llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.16 --- llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.15 Sat Oct 14 03:34:06 2006 +++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Wed Nov 1 16:17:06 2006 @@ -555,7 +555,7 @@ SUnit *PredSU = I->first; unsigned Opc = PredSU->Node->getOpcode(); if (Opc != ISD::EntryToken && Opc != ISD::TokenFactor && - Opc != ISD::CopyFromReg && Opc != ISD::CopyToReg) + Opc != ISD::CopyToReg) return false; } return true; From dpatel at apple.com Wed Nov 1 16:26:02 2006 From: dpatel at apple.com (Devang Patel) Date: Wed, 1 Nov 2006 16:26:02 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/CondProp/2006-11-01-PhiNodeCrash.ll Message-ID: <200611012226.kA1MQ2N7010202@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/CondProp: 2006-11-01-PhiNodeCrash.ll added (r1.1) --- Log message: Testcase from http://llvm.org/bugs/show_bug.cgi?id=979 --- Diffs of the changes: (+1087 -0) 2006-11-01-PhiNodeCrash.ll | 1087 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 1087 insertions(+) Index: llvm/test/Regression/Transforms/CondProp/2006-11-01-PhiNodeCrash.ll diff -c /dev/null llvm/test/Regression/Transforms/CondProp/2006-11-01-PhiNodeCrash.ll:1.1 *** /dev/null Wed Nov 1 16:25:58 2006 --- llvm/test/Regression/Transforms/CondProp/2006-11-01-PhiNodeCrash.ll Wed Nov 1 16:25:48 2006 *************** *** 0 **** --- 1,1087 ---- + ; RUN: llvm-as < %s | opt -condprop -disable-output + ; PR979 + target datalayout = "e-p:32:32" + target endian = little + target pointersize = 32 + target triple = "i686-pc-linux-gnu" + deplibs = [ "c", "crtend" ] + %struct.IO_APIC_reg_00 = type { uint } + %struct.Qdisc = type { int (%struct.sk_buff*, %struct.Qdisc*)*, %struct.sk_buff* (%struct.Qdisc*)*, uint, %struct.Qdisc_ops*, %struct.Qdisc*, uint, %struct.bluez_skb_cb, %struct.sk_buff_head, %struct.net_device*, %struct.tc_stats, int (%struct.sk_buff*, %struct.Qdisc*)*, %struct.Qdisc*, [1 x sbyte] } + %struct.Qdisc_class_ops = type { int (%struct.Qdisc*, uint, %struct.Qdisc*, %struct.Qdisc**)*, %struct.Qdisc* (%struct.Qdisc*, uint)*, uint (%struct.Qdisc*, uint)*, void (%struct.Qdisc*, uint)*, int (%struct.Qdisc*, uint, uint, %struct._agp_version**, uint*)*, int (%struct.Qdisc*, uint)*, void (%struct.Qdisc*, %struct.qdisc_walker*)*, %struct.tcf_proto** (%struct.Qdisc*, uint)*, uint (%struct.Qdisc*, uint, uint)*, void (%struct.Qdisc*, uint)*, int (%struct.Qdisc*, uint, %struct.sk_buff*, %struct.tcmsg*)* } + %struct.Qdisc_ops = type { %struct.Qdisc_ops*, %struct.Qdisc_class_ops*, [16 x sbyte], int, int (%struct.sk_buff*, %struct.Qdisc*)*, %struct.sk_buff* (%struct.Qdisc*)*, int (%struct.sk_buff*, %struct.Qdisc*)*, uint (%struct.Qdisc*)*, int (%struct.Qdisc*, %struct._agp_version*)*, void (%struct.Qdisc*)*, void (%struct.Qdisc*)*, int (%struct.Qdisc*, %struct._agp_version*)*, int (%struct.Qdisc*, %struct.sk_buff*)* } + %struct.ViceFid = type { uint, uint, uint } + %struct.__wait_queue = type { uint, %struct.task_struct*, %struct.list_head } + %struct.__wait_queue_head = type { %struct.IO_APIC_reg_00, %struct.list_head } + %struct._agp_version = type { ushort, ushort } + %struct._drm_i810_overlay_t = type { uint, uint } + %struct.address_space = type { %struct.list_head, %struct.list_head, %struct.list_head, uint, %struct.address_space_operations*, %struct.inode*, %struct.vm_area_struct*, %struct.vm_area_struct*, %struct.IO_APIC_reg_00, int } + %struct.address_space_operations = type { int (%struct.page*)*, int (%struct.file*, %struct.page*)*, int (%struct.page*)*, int (%struct.file*, %struct.page*, uint, uint)*, int (%struct.file*, %struct.page*, uint, uint)*, int (%struct.address_space*, int)*, int (%struct.page*, uint)*, int (%struct.page*, int)*, int (int, %struct.inode*, %struct.kiobuf*, uint, int)*, int (int, %struct.file*, %struct.kiobuf*, uint, int)*, void (%struct.page*)* } + %struct.audio_buf_info = type { int, int, int, int } + %struct.autofs_packet_hdr = type { int, int } + %struct.block_device = type { %struct.list_head, %struct.bluez_skb_cb, %struct.inode*, ushort, int, %struct.block_device_operations*, %struct.semaphore, %struct.list_head } + %struct.block_device_operations = type { int (%struct.inode*, %struct.file*)*, int (%struct.inode*, %struct.file*)*, int (%struct.inode*, %struct.file*, uint, uint)*, int (ushort)*, int (ushort)*, %struct.module* } + %struct.bluez_skb_cb = type { int } + %struct.buffer_head = type { %struct.buffer_head*, uint, ushort, ushort, ushort, %struct.bluez_skb_cb, ushort, uint, uint, %struct.buffer_head*, %struct.buffer_head*, %struct.buffer_head*, %struct.buffer_head*, %struct.buffer_head**, sbyte*, %struct.page*, void (%struct.buffer_head*, int)*, sbyte*, uint, %struct.__wait_queue_head, %struct.list_head } + %struct.char_device = type { %struct.list_head, %struct.bluez_skb_cb, ushort, %struct.bluez_skb_cb, %struct.semaphore } + %struct.completion = type { uint, %struct.__wait_queue_head } + %struct.cramfs_info = type { uint, uint, uint, uint } + %struct.dentry = type { %struct.bluez_skb_cb, uint, %struct.inode*, %struct.dentry*, %struct.list_head, %struct.list_head, %struct.list_head, %struct.list_head, %struct.list_head, int, %struct.qstr, uint, %struct.dentry_operations*, %struct.super_block*, uint, sbyte*, [16 x ubyte] } + %struct.dentry_operations = type { int (%struct.dentry*, int)*, int (%struct.dentry*, %struct.qstr*)*, int (%struct.dentry*, %struct.qstr*, %struct.qstr*)*, int (%struct.dentry*)*, void (%struct.dentry*)*, void (%struct.dentry*, %struct.inode*)* } + %struct.dev_mc_list = type { %struct.dev_mc_list*, [8 x ubyte], ubyte, int, int } + %struct.dnotify_struct = type { %struct.dnotify_struct*, uint, int, %struct.file*, %struct.files_struct* } + %struct.dquot = type { %struct.list_head, %struct.list_head, %struct.list_head, %struct.__wait_queue_head, %struct.__wait_queue_head, int, int, %struct.super_block*, uint, ushort, long, short, short, uint, %struct.mem_dqblk } + %struct.dquot_operations = type { void (%struct.inode*, int)*, void (%struct.inode*)*, int (%struct.inode*, ulong, int)*, int (%struct.inode*, uint)*, void (%struct.inode*, ulong)*, void (%struct.inode*, uint)*, int (%struct.inode*, %struct.iattr*)*, int (%struct.dquot*)* } + %struct.drm_clip_rect = type { ushort, ushort, ushort, ushort } + %struct.drm_ctx_priv_map = type { uint, sbyte* } + %struct.drm_mga_indices = type { int, uint, uint, int } + %struct.dst_entry = type { %struct.dst_entry*, %struct.bluez_skb_cb, int, %struct.net_device*, int, int, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, int, %struct.neighbour*, %struct.hh_cache*, int (%struct.sk_buff*)*, int (%struct.sk_buff*)*, %struct.dst_ops*, [0 x sbyte] } + %struct.dst_ops = type { ushort, ushort, uint, int ()*, %struct.dst_entry* (%struct.dst_entry*, uint)*, %struct.dst_entry* (%struct.dst_entry*, %struct.sk_buff*)*, void (%struct.dst_entry*)*, %struct.dst_entry* (%struct.dst_entry*)*, void (%struct.sk_buff*)*, int, %struct.bluez_skb_cb, %struct.kmem_cache_s* } + %struct.e820entry = type { ulong, ulong, uint } + %struct.exec_domain = type { sbyte*, void (int, %struct.pt_regs*)*, ubyte, ubyte, uint*, uint*, %struct.map_segment*, %struct.map_segment*, %struct.map_segment*, %struct.map_segment*, %struct.module*, %struct.exec_domain* } + %struct.ext2_inode_info = type { [15 x uint], uint, uint, ubyte, ubyte, uint, uint, uint, uint, uint, uint, uint, uint, uint, int } + %struct.ext3_inode_info = type { [15 x uint], uint, uint, uint, uint, uint, uint, uint, uint, uint, %struct.list_head, long, %struct.rw_semaphore } + %struct.fasync_struct = type { int, int, %struct.fasync_struct*, %struct.file* } + %struct.file = type { %struct.list_head, %struct.dentry*, %struct.vfsmount*, %struct.file_operations*, %struct.bluez_skb_cb, uint, ushort, long, uint, uint, uint, uint, uint, %struct.drm_mga_indices, uint, uint, int, uint, sbyte*, %struct.kiobuf*, int } + %struct.file_lock = type { %struct.file_lock*, %struct.list_head, %struct.list_head, %struct.files_struct*, uint, %struct.__wait_queue_head, %struct.file*, ubyte, ubyte, long, long, void (%struct.file_lock*)*, void (%struct.file_lock*)*, void (%struct.file_lock*)*, %struct.fasync_struct*, uint, { %struct.nfs_lock_info } } + %struct.file_operations = type { %struct.module*, long (%struct.file*, long, int)*, int (%struct.file*, sbyte*, uint, long*)*, int (%struct.file*, sbyte*, uint, long*)*, int (%struct.file*, sbyte*, int (sbyte*, sbyte*, int, long, uint, uint)*)*, uint (%struct.file*, %struct.poll_table_struct*)*, int (%struct.inode*, %struct.file*, uint, uint)*, int (%struct.file*, %struct.vm_area_struct*)*, int (%struct.inode*, %struct.file*)*, int (%struct.file*)*, int (%struct.inode*, %struct.file*)*, int (%struct.file*, %struct.dentry*, int)*, int (int, %struct.file*, int)*, int (%struct.file*, int, %struct.file_lock*)*, int (%struct.file*, %struct.iovec*, uint, long*)*, int (%struct.file*, %struct.iovec*, uint, long*)*, int (%struct.file*, %struct.page*, int, uint, long*, int)*, uint (%struct.file*, uint, uint, uint, uint)* } + %struct.file_system_type = type { sbyte*, int, %struct.super_block* (%struct.super_block*, sbyte*, int)*, %struct.module*, %struct.file_system_type*, %struct.list_head } + %struct.files_struct = type { %struct.bluez_skb_cb, %typedef.rwlock_t, int, int, int, %struct.file**, %typedef.__kernel_fd_set*, %typedef.__kernel_fd_set*, %typedef.__kernel_fd_set, %typedef.__kernel_fd_set, [32 x %struct.file*] } + %struct.fs_disk_quota = type { sbyte, sbyte, ushort, uint, ulong, ulong, ulong, ulong, ulong, ulong, int, int, ushort, ushort, int, ulong, ulong, ulong, int, ushort, short, [8 x sbyte] } + %struct.fs_quota_stat = type { sbyte, ushort, sbyte, %struct.e820entry, %struct.e820entry, uint, int, int, int, ushort, ushort } + %struct.fs_struct = type { %struct.bluez_skb_cb, %typedef.rwlock_t, int, %struct.dentry*, %struct.dentry*, %struct.dentry*, %struct.vfsmount*, %struct.vfsmount*, %struct.vfsmount* } + %struct.hh_cache = type { %struct.hh_cache*, %struct.bluez_skb_cb, ushort, int, int (%struct.sk_buff*)*, %typedef.rwlock_t, [32 x uint] } + %struct.i387_fxsave_struct = type { ushort, ushort, ushort, ushort, int, int, int, int, int, int, [32 x int], [32 x int], [56 x int] } + %struct.iattr = type { uint, ushort, uint, uint, long, int, int, int, uint } + %struct.if_dqblk = type { ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, uint } + %struct.if_dqinfo = type { ulong, ulong, uint, uint } + %struct.ifmap = type { uint, uint, ushort, ubyte, ubyte, ubyte } + %struct.ifreq = type { { [16 x sbyte] }, %typedef.dvd_authinfo } + %struct.inode = type { %struct.list_head, %struct.list_head, %struct.list_head, %struct.list_head, %struct.list_head, uint, %struct.bluez_skb_cb, ushort, ushort, ushort, uint, uint, ushort, long, int, int, int, uint, uint, uint, uint, ushort, %struct.semaphore, %struct.rw_semaphore, %struct.semaphore, %struct.inode_operations*, %struct.file_operations*, %struct.super_block*, %struct.__wait_queue_head, %struct.file_lock*, %struct.address_space*, %struct.address_space, [2 x %struct.dquot*], %struct.list_head, %struct.pipe_inode_info*, %struct.block_device*, %struct.char_device*, uint, %struct.dnotify_struct*, uint, uint, ubyte, %struct.bluez_skb_cb, uint, uint, { %struct.ext2_inode_info, %struct.ext3_inode_info, %struct.msdos_inode_info, %struct.iso_inode_info, %struct.nfs_inode_info, %struct._drm_i810_overlay_t, %struct.shmem_inode_info, %struct.proc_inode_info, %struct.socket, %struct.usbdev_inode_info, sbyte* } } + %struct.inode_operations = type { int (%struct.inode*, %struct.dentry*, int)*, %struct.dentry* (%struct.inode*, %struct.dentry*)*, int (%struct.dentry*, %struct.inode*, %struct.dentry*)*, int (%struct.inode*, %struct.dentry*)*, int (%struct.inode*, %struct.dentry*, sbyte*)*, int (%struct.inode*, %struct.dentry*, int)*, int (%struct.inode*, %struct.dentry*)*, int (%struct.inode*, %struct.dentry*, int, int)*, int (%struct.inode*, %struct.dentry*, %struct.inode*, %struct.dentry*)*, int (%struct.dentry*, sbyte*, int)*, int (%struct.dentry*, %struct.nameidata*)*, void (%struct.inode*)*, int (%struct.inode*, int)*, int (%struct.dentry*)*, int (%struct.dentry*, %struct.iattr*)*, int (%struct.dentry*, %struct.iattr*)*, int (%struct.dentry*, sbyte*, sbyte*, uint, int)*, int (%struct.dentry*, sbyte*, sbyte*, uint)*, int (%struct.dentry*, sbyte*, uint)*, int (%struct.dentry*, sbyte*)* } + %struct.iovec = type { sbyte*, uint } + %struct.ip_options = type { uint, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, [0 x ubyte] } + %struct.isapnp_dma = type { ubyte, ubyte, %struct.isapnp_resources*, %struct.isapnp_dma* } + %struct.isapnp_irq = type { ushort, ubyte, ubyte, %struct.isapnp_resources*, %struct.isapnp_irq* } + %struct.isapnp_mem = type { uint, uint, uint, uint, ubyte, ubyte, %struct.isapnp_resources*, %struct.isapnp_mem* } + %struct.isapnp_mem32 = type { [17 x ubyte], %struct.isapnp_resources*, %struct.isapnp_mem32* } + %struct.isapnp_port = type { ushort, ushort, ubyte, ubyte, ubyte, ubyte, %struct.isapnp_resources*, %struct.isapnp_port* } + %struct.isapnp_resources = type { ushort, ushort, %struct.isapnp_port*, %struct.isapnp_irq*, %struct.isapnp_dma*, %struct.isapnp_mem*, %struct.isapnp_mem32*, %struct.pci_dev*, %struct.isapnp_resources*, %struct.isapnp_resources* } + %struct.iso_inode_info = type { uint, ubyte, [3 x ubyte], uint, int } + %struct.iw_handler_def = type opaque + %struct.iw_statistics = type opaque + %struct.k_sigaction = type { %struct.sigaction } + %struct.kern_ipc_perm = type { int, uint, uint, uint, uint, ushort, uint } + %struct.kiobuf = type { int, int, int, int, uint, %struct.page**, %struct.buffer_head**, uint*, %struct.bluez_skb_cb, int, void (%struct.kiobuf*)*, %struct.__wait_queue_head } + %struct.kmem_cache_s = type { %struct.list_head, %struct.list_head, %struct.list_head, uint, uint, uint, %struct.IO_APIC_reg_00, uint, uint, uint, uint, uint, uint, %struct.kmem_cache_s*, uint, uint, void (sbyte*, %struct.kmem_cache_s*, uint)*, void (sbyte*, %struct.kmem_cache_s*, uint)*, uint, [20 x sbyte], %struct.list_head, [32 x %struct._drm_i810_overlay_t*], uint } + %struct.linux_binfmt = type { %struct.linux_binfmt*, %struct.module*, int (%struct.linux_binprm*, %struct.pt_regs*)*, int (%struct.file*)*, int (int, %struct.pt_regs*, %struct.file*)*, uint, int (%struct.linux_binprm*, sbyte*)* } + %struct.linux_binprm = type { [128 x sbyte], [32 x %struct.page*], uint, int, %struct.file*, int, int, uint, uint, uint, int, int, sbyte*, uint, uint } + %struct.list_head = type { %struct.list_head*, %struct.list_head* } + %struct.llva_sigcontext = type { %typedef.llva_icontext_t, %typedef.llva_fp_state_t, uint, uint, uint, uint, [1 x uint], sbyte* } + %struct.map_segment = type opaque + %struct.mem_dqblk = type { uint, uint, ulong, uint, uint, uint, int, int } + %struct.mem_dqinfo = type { %struct.quota_format_type*, int, uint, uint, { %struct.ViceFid } } + %struct.mm_struct = type { %struct.vm_area_struct*, %struct.rb_root_s, %struct.vm_area_struct*, %struct.IO_APIC_reg_00*, %struct.bluez_skb_cb, %struct.bluez_skb_cb, int, %struct.rw_semaphore, %struct.IO_APIC_reg_00, %struct.list_head, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, %struct.iovec } + %struct.module = type { uint, %struct.module*, sbyte*, uint, %struct.bluez_skb_cb, uint, uint, uint, %struct.drm_ctx_priv_map*, %struct.module_ref*, %struct.module_ref*, int ()*, void ()*, %struct._drm_i810_overlay_t*, %struct._drm_i810_overlay_t*, %struct.module_persist*, %struct.module_persist*, int ()*, int, sbyte*, sbyte*, sbyte*, sbyte*, sbyte* } + %struct.module_persist = type opaque + %struct.module_ref = type { %struct.module*, %struct.module*, %struct.module_ref* } + %struct.msdos_inode_info = type { uint, int, int, int, int, int, %struct.inode*, %struct.list_head } + %struct.msghdr = type { sbyte*, int, %struct.iovec*, uint, sbyte*, uint, uint } + %struct.msq_setbuf = type { uint, uint, uint, ushort } + %struct.nameidata = type { %struct.dentry*, %struct.vfsmount*, %struct.qstr, uint, int } + %struct.namespace = type { %struct.bluez_skb_cb, %struct.vfsmount*, %struct.list_head, %struct.rw_semaphore } + %struct.neigh_ops = type { int, void (%struct.neighbour*)*, void (%struct.neighbour*, %struct.sk_buff*)*, void (%struct.neighbour*, %struct.sk_buff*)*, int (%struct.sk_buff*)*, int (%struct.sk_buff*)*, int (%struct.sk_buff*)*, int (%struct.sk_buff*)* } + %struct.neigh_parms = type { %struct.neigh_parms*, int (%struct.neighbour*)*, %struct.neigh_table*, int, sbyte*, sbyte*, int, int, int, int, int, int, int, int, int, int, int, int, int } + %struct.neigh_table = type { %struct.neigh_table*, int, int, int, uint (sbyte*, %struct.net_device*)*, int (%struct.neighbour*)*, int (%struct.pneigh_entry*)*, void (%struct.pneigh_entry*)*, void (%struct.sk_buff*)*, sbyte*, %struct.neigh_parms, int, int, int, int, uint, %struct.timer_list, %struct.timer_list, %struct.sk_buff_head, int, %typedef.rwlock_t, uint, %struct.neigh_parms*, %struct.kmem_cache_s*, %struct.tasklet_struct, %struct.cramfs_info, [32 x %struct.neighbour*], [16 x %struct.pneigh_entry*] } + %struct.neighbour = type { %struct.neighbour*, %struct.neigh_table*, %struct.neigh_parms*, %struct.net_device*, uint, uint, uint, ubyte, ubyte, ubyte, ubyte, %struct.bluez_skb_cb, %typedef.rwlock_t, [8 x ubyte], %struct.hh_cache*, %struct.bluez_skb_cb, int (%struct.sk_buff*)*, %struct.sk_buff_head, %struct.timer_list, %struct.neigh_ops*, [0 x ubyte] } + %struct.net_bridge_port = type opaque + %struct.net_device = type { [16 x sbyte], uint, uint, uint, uint, uint, uint, ubyte, ubyte, uint, %struct.net_device*, int (%struct.net_device*)*, %struct.net_device*, int, int, %struct.net_device_stats* (%struct.net_device*)*, %struct.iw_statistics* (%struct.net_device*)*, %struct.iw_handler_def*, uint, uint, ushort, ushort, ushort, ushort, uint, ushort, ushort, sbyte*, %struct.net_device*, [8 x ubyte], [8 x ubyte], ubyte, %struct.dev_mc_list*, int, int, int, int, %struct.timer_list, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, %struct.list_head, int, int, %struct.Qdisc*, %struct.Qdisc*, %struct.Qdisc*, %struct.Qdisc*, uint, %struct.IO_APIC_reg_00, int, %struct.IO_APIC_reg_00, %struct.bluez_skb_cb, int, int, void (%struct.net_device*)*, void (%struct.net_device*)*, int (%struct.net_device*)*, int (%struct.net_device*)*, int (%struct.sk_buff*, %struct.net_device*)*, int (%struct.net_device*, int*)*, int (%struct.sk_buff*, %struct.net_device*, ushort, sbyte*, sbyte*, uint)*, in! t (%struct.sk_buff*)*, void (%struct.net_device*)*, int (%struct.net_device*, sbyte*)*, int (%struct.net_device*, %struct.ifreq*, int)*, int (%struct.net_device*, %struct.ifmap*)*, int (%struct.neighbour*, %struct.hh_cache*)*, void (%struct.hh_cache*, %struct.net_device*, ubyte*)*, int (%struct.net_device*, int)*, void (%struct.net_device*)*, void (%struct.net_device*, %struct.vlan_group*)*, void (%struct.net_device*, ushort)*, void (%struct.net_device*, ushort)*, int (%struct.sk_buff*, ubyte*)*, int (%struct.net_device*, %struct.neigh_parms*)*, int (%struct.net_device*, %struct.dst_entry*)*, %struct.module*, %struct.net_bridge_port* } + %struct.net_device_stats = type { uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint } + %struct.nf_conntrack = type { %struct.bluez_skb_cb, void (%struct.nf_conntrack*)* } + %struct.nf_ct_info = type { %struct.nf_conntrack* } + %struct.nfs_fh = type { ushort, [64 x ubyte] } + %struct.nfs_inode_info = type { ulong, %struct.nfs_fh, ushort, uint, ulong, ulong, ulong, uint, uint, uint, [2 x uint], %struct.list_head, %struct.list_head, %struct.list_head, %struct.list_head, uint, uint, uint, uint, %struct.rpc_cred* } + %struct.nfs_lock_info = type { uint, uint, %struct.nlm_host* } + %struct.nlm_host = type opaque + %struct.open_request = type { %struct.open_request*, uint, uint, ushort, ushort, ubyte, ubyte, ushort, uint, uint, uint, uint, %struct.or_calltable*, %struct.sock*, { %struct.tcp_v4_open_req } } + %struct.or_calltable = type { int, int (%struct.sock*, %struct.open_request*, %struct.dst_entry*)*, void (%struct.sk_buff*, %struct.open_request*)*, void (%struct.open_request*)*, void (%struct.sk_buff*)* } + %struct.page = type { %struct.list_head, %struct.address_space*, uint, %struct.page*, %struct.bluez_skb_cb, uint, %struct.list_head, %struct.page**, %struct.buffer_head* } + %struct.pci_bus = type { %struct.list_head, %struct.pci_bus*, %struct.list_head, %struct.list_head, %struct.pci_dev*, [4 x %struct.resource*], %struct.pci_ops*, sbyte*, %struct.proc_dir_entry*, ubyte, ubyte, ubyte, ubyte, [48 x sbyte], ushort, ushort, uint, ubyte, ubyte, ubyte, ubyte } + %struct.pci_dev = type { %struct.list_head, %struct.list_head, %struct.pci_bus*, %struct.pci_bus*, sbyte*, %struct.proc_dir_entry*, uint, ushort, ushort, ushort, ushort, uint, ubyte, ubyte, %struct.pci_driver*, sbyte*, ulong, uint, [4 x ushort], [4 x ushort], uint, [12 x %struct.resource], [2 x %struct.resource], [2 x %struct.resource], [90 x sbyte], [8 x sbyte], int, int, ushort, ushort, int (%struct.pci_dev*)*, int (%struct.pci_dev*)*, int (%struct.pci_dev*)* } + %struct.pci_device_id = type { uint, uint, uint, uint, uint, uint, uint } + %struct.pci_driver = type { %struct.list_head, sbyte*, %struct.pci_device_id*, int (%struct.pci_dev*, %struct.pci_device_id*)*, void (%struct.pci_dev*)*, int (%struct.pci_dev*, uint)*, int (%struct.pci_dev*, uint)*, int (%struct.pci_dev*)*, int (%struct.pci_dev*, uint, int)* } + %struct.pci_ops = type { int (%struct.pci_dev*, int, ubyte*)*, int (%struct.pci_dev*, int, ushort*)*, int (%struct.pci_dev*, int, uint*)*, int (%struct.pci_dev*, int, ubyte)*, int (%struct.pci_dev*, int, ushort)*, int (%struct.pci_dev*, int, uint)* } + %struct.pipe_inode_info = type { %struct.__wait_queue_head, sbyte*, uint, uint, uint, uint, uint, uint, uint, uint } + %struct.pneigh_entry = type { %struct.pneigh_entry*, %struct.net_device*, [0 x ubyte] } + %struct.poll_table_entry = type { %struct.file*, %struct.__wait_queue, %struct.__wait_queue_head* } + %struct.poll_table_page = type { %struct.poll_table_page*, %struct.poll_table_entry*, [0 x %struct.poll_table_entry] } + %struct.poll_table_struct = type { int, %struct.poll_table_page* } + %struct.proc_dir_entry = type { ushort, ushort, sbyte*, ushort, ushort, uint, uint, uint, %struct.inode_operations*, %struct.file_operations*, int (sbyte*, sbyte**, int, int)*, %struct.module*, %struct.proc_dir_entry*, %struct.proc_dir_entry*, %struct.proc_dir_entry*, sbyte*, int (sbyte*, sbyte**, int, int, int*, sbyte*)*, int (%struct.file*, sbyte*, uint, sbyte*)*, %struct.bluez_skb_cb, int, ushort } + %struct.proc_inode_info = type { %struct.task_struct*, int, { int (%struct.task_struct*, sbyte*)* }, %struct.file* } + %struct.proto = type { void (%struct.sock*, int)*, int (%struct.sock*, %struct.sockaddr*, int)*, int (%struct.sock*, int)*, %struct.sock* (%struct.sock*, int, int*)*, int (%struct.sock*, int, uint)*, int (%struct.sock*)*, int (%struct.sock*)*, void (%struct.sock*, int)*, int (%struct.sock*, int, int, sbyte*, int)*, int (%struct.sock*, int, int, sbyte*, int*)*, int (%struct.sock*, %struct.msghdr*, int)*, int (%struct.sock*, %struct.msghdr*, int, int, int, int*)*, int (%struct.sock*, %struct.sockaddr*, int)*, int (%struct.sock*, %struct.sk_buff*)*, void (%struct.sock*)*, void (%struct.sock*)*, int (%struct.sock*, ushort)*, [32 x sbyte], [32 x { int, [28 x ubyte] }] } + %struct.proto_ops = type { int, int (%struct.socket*)*, int (%struct.socket*, %struct.sockaddr*, int)*, int (%struct.socket*, %struct.sockaddr*, int, int)*, int (%struct.socket*, %struct.socket*)*, int (%struct.socket*, %struct.socket*, int)*, int (%struct.socket*, %struct.sockaddr*, int*, int)*, uint (%struct.file*, %struct.socket*, %struct.poll_table_struct*)*, int (%struct.socket*, uint, uint)*, int (%struct.socket*, int)*, int (%struct.socket*, int)*, int (%struct.socket*, int, int, sbyte*, int)*, int (%struct.socket*, int, int, sbyte*, int*)*, int (%struct.socket*, %struct.msghdr*, int, %struct.scm_cookie*)*, int (%struct.socket*, %struct.msghdr*, int, int, %struct.scm_cookie*)*, int (%struct.file*, %struct.socket*, %struct.vm_area_struct*)*, int (%struct.socket*, %struct.page*, int, uint, int)* } + %struct.pt_regs = type { int, int, int, int, int, int, int, int, int, int, int, int, int, int, int } + %struct.qdisc_walker = type { int, int, int, int (%struct.Qdisc*, uint, %struct.qdisc_walker*)* } + %struct.qstr = type { ubyte*, uint, uint } + %struct.quota_format_ops = type { int (%struct.super_block*, int)*, int (%struct.super_block*, int)*, int (%struct.super_block*, int)*, int (%struct.super_block*, int)*, int (%struct.dquot*)*, int (%struct.dquot*)* } + %struct.quota_format_type = type { int, %struct.quota_format_ops*, %struct.module*, %struct.quota_format_type* } + %struct.quota_info = type { uint, %struct.semaphore, %struct.semaphore, [2 x %struct.file*], [2 x %struct.mem_dqinfo], [2 x %struct.quota_format_ops*] } + %struct.quotactl_ops = type { int (%struct.super_block*, int, int, sbyte*)*, int (%struct.super_block*, int)*, int (%struct.super_block*, int)*, int (%struct.super_block*, int, %struct.if_dqinfo*)*, int (%struct.super_block*, int, %struct.if_dqinfo*)*, int (%struct.super_block*, int, uint, %struct.if_dqblk*)*, int (%struct.super_block*, int, uint, %struct.if_dqblk*)*, int (%struct.super_block*, %struct.fs_quota_stat*)*, int (%struct.super_block*, uint, int)*, int (%struct.super_block*, int, uint, %struct.fs_disk_quota*)*, int (%struct.super_block*, int, uint, %struct.fs_disk_quota*)* } + %struct.rb_node_s = type { %struct.rb_node_s*, int, %struct.rb_node_s*, %struct.rb_node_s* } + %struct.rb_root_s = type { %struct.rb_node_s* } + %struct.resource = type { sbyte*, uint, uint, uint, %struct.resource*, %struct.resource*, %struct.resource* } + %struct.revectored_struct = type { [8 x uint] } + %struct.rpc_auth = type { [8 x %struct.rpc_cred*], uint, uint, uint, uint, uint, %struct.rpc_authops* } + %struct.rpc_authops = type { uint, sbyte*, %struct.rpc_auth* (%struct.rpc_clnt*)*, void (%struct.rpc_auth*)*, %struct.rpc_cred* (int)* } + %struct.rpc_clnt = type { %struct.bluez_skb_cb, %struct.rpc_xprt*, %struct.rpc_procinfo*, uint, sbyte*, sbyte*, %struct.rpc_auth*, %struct.rpc_stat*, uint, uint, uint, %struct.rpc_rtt, %struct.msq_setbuf, %struct.rpc_wait_queue, int, [32 x sbyte] } + %struct.rpc_cred = type { %struct.rpc_cred*, %struct.rpc_auth*, %struct.rpc_credops*, uint, %struct.bluez_skb_cb, ushort, uint, uint } + %struct.rpc_credops = type { void (%struct.rpc_cred*)*, int (%struct.rpc_cred*, int)*, uint* (%struct.rpc_task*, uint*, int)*, int (%struct.rpc_task*)*, uint* (%struct.rpc_task*, uint*)* } + %struct.rpc_message = type { uint, sbyte*, sbyte*, %struct.rpc_cred* } + %struct.rpc_procinfo = type { sbyte*, int (sbyte*, uint*, sbyte*)*, int (sbyte*, uint*, sbyte*)*, uint, uint, uint } + %struct.rpc_program = type { sbyte*, uint, uint, %struct.rpc_version**, %struct.rpc_stat* } + %struct.rpc_rqst = type { %struct.rpc_xprt*, %struct.rpc_timeout, %struct.xdr_buf, %struct.xdr_buf, %struct.rpc_task*, uint, %struct.rpc_rqst*, int, int, %struct.list_head, %struct.xdr_buf, [2 x uint], uint, int, int, int } + %struct.rpc_rtt = type { int, [5 x int], [5 x int], %struct.bluez_skb_cb } + %struct.rpc_stat = type { %struct.rpc_program*, uint, uint, uint, uint, uint, uint, uint, uint, uint } + %struct.rpc_task = type { %struct.list_head, uint, %struct.list_head, %struct.rpc_clnt*, %struct.rpc_rqst*, int, %struct.rpc_wait_queue*, %struct.rpc_message, uint*, ubyte, ubyte, ubyte, void (%struct.rpc_task*)*, void (%struct.rpc_task*)*, void (%struct.rpc_task*)*, void (%struct.rpc_task*)*, void (%struct.rpc_task*)*, sbyte*, %struct.timer_list, %struct.__wait_queue_head, uint, ushort, ubyte, uint, ushort } + %struct.rpc_timeout = type { uint, uint, uint, uint, short, ubyte } + %struct.rpc_version = type { uint, uint, %struct.rpc_procinfo* } + %struct.rpc_wait_queue = type { %struct.list_head, sbyte* } + %struct.rpc_xprt = type { %struct.socket*, %struct.sock*, %struct.rpc_timeout, %struct.sockaddr_in, int, uint, uint, uint, uint, %struct.rpc_wait_queue, %struct.rpc_wait_queue, %struct.rpc_wait_queue, %struct.rpc_wait_queue, %struct.rpc_rqst*, [16 x %struct.rpc_rqst], uint, ubyte, uint, uint, uint, uint, uint, uint, %struct.IO_APIC_reg_00, %struct.IO_APIC_reg_00, %struct.rpc_task*, %struct.list_head, void (%struct.sock*, int)*, void (%struct.sock*)*, void (%struct.sock*)*, %struct.__wait_queue_head } + %struct.rw_semaphore = type { int, %struct.IO_APIC_reg_00, %struct.list_head } + %struct.scm_cookie = type { %struct.ViceFid, %struct.scm_fp_list*, uint } + %struct.scm_fp_list = type { int, [255 x %struct.file*] } + %struct.sem_array = type { %struct.kern_ipc_perm, int, int, %struct.autofs_packet_hdr*, %struct.sem_queue*, %struct.sem_queue**, %struct.sem_undo*, uint } + %struct.sem_queue = type { %struct.sem_queue*, %struct.sem_queue**, %struct.task_struct*, %struct.sem_undo*, int, int, %struct.sem_array*, int, %struct.sembuf*, int, int } + %struct.sem_undo = type { %struct.sem_undo*, %struct.sem_undo*, int, short* } + %struct.semaphore = type { %struct.bluez_skb_cb, int, %struct.__wait_queue_head } + %struct.sembuf = type { ushort, short, short } + %struct.seq_file = type { sbyte*, uint, uint, uint, long, %struct.semaphore, %struct.seq_operations*, sbyte* } + %struct.seq_operations = type { sbyte* (%struct.seq_file*, long*)*, void (%struct.seq_file*, sbyte*)*, sbyte* (%struct.seq_file*, sbyte*, long*)*, int (%struct.seq_file*, sbyte*)* } + %struct.shmem_inode_info = type { %struct.IO_APIC_reg_00, uint, [16 x %struct.IO_APIC_reg_00], sbyte**, uint, uint, %struct.list_head, %struct.inode* } + %struct.sigaction = type { void (int)*, uint, void ()*, %typedef.sigset_t } + %struct.siginfo = type { int, int, int, { [29 x int] } } + %struct.signal_struct = type { %struct.bluez_skb_cb, [64 x %struct.k_sigaction], %struct.IO_APIC_reg_00 } + %struct.sigpending = type { %struct.sigqueue*, %struct.sigqueue**, %typedef.sigset_t } + %struct.sigqueue = type { %struct.sigqueue*, %struct.siginfo } + %struct.sk_buff = type { %struct.sk_buff*, %struct.sk_buff*, %struct.sk_buff_head*, %struct.sock*, %struct.autofs_packet_hdr, %struct.net_device*, %struct.net_device*, { ubyte* }, { ubyte* }, { ubyte* }, %struct.dst_entry*, [48 x sbyte], uint, uint, uint, ubyte, ubyte, ubyte, ubyte, uint, %struct.bluez_skb_cb, ushort, ushort, uint, ubyte*, ubyte*, ubyte*, ubyte*, void (%struct.sk_buff*)*, uint, uint, %struct.nf_ct_info*, uint } + %struct.sk_buff_head = type { %struct.sk_buff*, %struct.sk_buff*, uint, %struct.IO_APIC_reg_00 } + %struct.sock = type { uint, uint, ushort, ushort, int, %struct.sock*, %struct.sock**, %struct.sock*, %struct.sock**, ubyte, ubyte, ushort, ushort, ubyte, ubyte, %struct.bluez_skb_cb, %typedef.socket_lock_t, int, %struct.__wait_queue_head*, %struct.dst_entry*, %typedef.rwlock_t, %struct.bluez_skb_cb, %struct.sk_buff_head, %struct.bluez_skb_cb, %struct.sk_buff_head, %struct.bluez_skb_cb, int, int, uint, uint, int, %struct.sock*, sbyte, sbyte, sbyte, sbyte, sbyte, sbyte, sbyte, sbyte, sbyte, ubyte, ubyte, ubyte, ubyte, int, int, uint, int, %struct.sock*, { %struct.sk_buff*, %struct.sk_buff* }, %typedef.rwlock_t, %struct.sk_buff_head, %struct.proto*, { %struct.tcp_opt }, int, int, ushort, ushort, uint, ushort, ubyte, ubyte, %struct.ViceFid, int, int, int, { %struct.unix_opt }, %struct.timer_list, %struct.autofs_packet_hdr, %struct.socket*, sbyte*, void (%struct.sock*)*, void (%struct.sock*, int)*, void (%struct.sock*)*, void (%struct.sock*)*, int (%struct.sock*, %struct.sk_bu! ff*)*, void (%struct.sock*)* } + %struct.sockaddr = type { ushort, [14 x sbyte] } + %struct.sockaddr_in = type { ushort, ushort, %struct.IO_APIC_reg_00, [8 x ubyte] } + %struct.sockaddr_un = type { ushort, [108 x sbyte] } + %struct.socket = type { uint, uint, %struct.proto_ops*, %struct.inode*, %struct.fasync_struct*, %struct.file*, %struct.sock*, %struct.__wait_queue_head, short, ubyte } + %struct.statfs = type { int, int, int, int, int, int, int, %typedef.__kernel_fsid_t, int, [6 x int] } + %struct.super_block = type { %struct.list_head, ushort, uint, ubyte, ubyte, ulong, %struct.file_system_type*, %struct.super_operations*, %struct.dquot_operations*, %struct.quotactl_ops*, uint, uint, %struct.dentry*, %struct.rw_semaphore, %struct.semaphore, int, %struct.bluez_skb_cb, %struct.list_head, %struct.list_head, %struct.list_head, %struct.block_device*, %struct.list_head, %struct.quota_info, { [115 x uint] }, %struct.semaphore, %struct.semaphore } + %struct.super_operations = type { %struct.inode* (%struct.super_block*)*, void (%struct.inode*)*, void (%struct.inode*)*, void (%struct.inode*, sbyte*)*, void (%struct.inode*)*, void (%struct.inode*, int)*, void (%struct.inode*)*, void (%struct.inode*)*, void (%struct.super_block*)*, void (%struct.super_block*)*, int (%struct.super_block*)*, void (%struct.super_block*)*, void (%struct.super_block*)*, int (%struct.super_block*, %struct.statfs*)*, int (%struct.super_block*, int*, sbyte*)*, void (%struct.inode*)*, void (%struct.super_block*)*, %struct.dentry* (%struct.super_block*, uint*, int, int, int)*, int (%struct.dentry*, uint*, int*, int)*, int (%struct.seq_file*, %struct.vfsmount*)* } + %struct.task_struct = type { int, uint, int, %struct.IO_APIC_reg_00, %struct.exec_domain*, int, uint, int, int, int, uint, %struct.mm_struct*, int, uint, uint, %struct.list_head, uint, %struct.task_struct*, %struct.task_struct*, %struct.mm_struct*, %struct.list_head, uint, uint, %struct.linux_binfmt*, int, int, int, uint, int, int, int, int, int, int, int, %struct.task_struct*, %struct.task_struct*, %struct.task_struct*, %struct.task_struct*, %struct.task_struct*, %struct.list_head, %struct.task_struct*, %struct.task_struct**, %struct.__wait_queue_head, %struct.completion*, uint, uint, uint, uint, uint, uint, uint, %struct.timer_list, %struct.audio_buf_info, uint, [32 x int], [32 x int], uint, uint, uint, uint, uint, uint, int, uint, uint, uint, uint, uint, uint, uint, uint, int, [32 x uint], uint, uint, uint, int, %struct.user_struct*, [11 x %struct._drm_i810_overlay_t], ushort, [16 x sbyte], int, int, %struct.tty_struct*, uint, %struct.sem_undo*, %struct.sem_queue*, %st! ruct.thread_struct, %struct.fs_struct*, %struct.files_struct*, %struct.namespace*, %struct.IO_APIC_reg_00, %struct.signal_struct*, %typedef.sigset_t, %struct.sigpending, uint, uint, int (sbyte*)*, sbyte*, %typedef.sigset_t*, uint, uint, %struct.IO_APIC_reg_00, sbyte*, %struct.llva_sigcontext*, uint, %struct.task_struct*, uint, %typedef.llva_icontext_t, %typedef.llva_fp_state_t, uint*, int, sbyte* } + %struct.tasklet_struct = type { %struct.tasklet_struct*, uint, %struct.bluez_skb_cb, void (uint)*, uint } + %struct.tc_stats = type { ulong, uint, uint, uint, uint, uint, uint, uint, %struct.IO_APIC_reg_00* } + %struct.tcf_proto = type { %struct.tcf_proto*, sbyte*, int (%struct.sk_buff*, %struct.tcf_proto*, %struct._drm_i810_overlay_t*)*, uint, uint, uint, %struct.Qdisc*, sbyte*, %struct.tcf_proto_ops* } + %struct.tcf_proto_ops = type { %struct.tcf_proto_ops*, [16 x sbyte], int (%struct.sk_buff*, %struct.tcf_proto*, %struct._drm_i810_overlay_t*)*, int (%struct.tcf_proto*)*, void (%struct.tcf_proto*)*, uint (%struct.tcf_proto*, uint)*, void (%struct.tcf_proto*, uint)*, int (%struct.tcf_proto*, uint, uint, %struct._agp_version**, uint*)*, int (%struct.tcf_proto*, uint)*, void (%struct.tcf_proto*, %struct.tcf_walker*)*, int (%struct.tcf_proto*, uint, %struct.sk_buff*, %struct.tcmsg*)* } + %struct.tcf_walker = type { int, int, int, int (%struct.tcf_proto*, uint, %struct.tcf_walker*)* } + %struct.tcmsg = type { ubyte, ubyte, ushort, int, uint, uint, uint } + %struct.tcp_func = type { int (%struct.sk_buff*)*, void (%struct.sock*, %struct.tcphdr*, int, %struct.sk_buff*)*, int (%struct.sock*)*, int (%struct.sock*, %struct.sk_buff*)*, %struct.sock* (%struct.sock*, %struct.sk_buff*, %struct.open_request*, %struct.dst_entry*)*, int (%struct.sock*)*, ushort, int (%struct.sock*, int, int, sbyte*, int)*, int (%struct.sock*, int, int, sbyte*, int*)*, void (%struct.sock*, %struct.sockaddr*)*, int } + %struct.tcp_listen_opt = type { ubyte, int, int, int, uint, [512 x %struct.open_request*] } + %struct.tcp_opt = type { int, uint, uint, uint, uint, uint, uint, uint, { ubyte, ubyte, ubyte, ubyte, uint, uint, uint, ushort, ushort }, { %struct.sk_buff_head, %struct.task_struct*, %struct.iovec*, int, int }, uint, uint, uint, uint, ushort, ushort, ushort, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, ushort, ushort, uint, uint, uint, %struct.timer_list, %struct.timer_list, %struct.sk_buff_head, %struct.tcp_func*, %struct.sk_buff*, %struct.page*, uint, uint, uint, uint, uint, uint, sbyte, sbyte, sbyte, sbyte, ubyte, ubyte, ubyte, ubyte, uint, uint, uint, int, ushort, ubyte, ubyte, [1 x %struct._drm_i810_overlay_t], [4 x %struct._drm_i810_overlay_t], uint, uint, ubyte, ubyte, ushort, ubyte, ubyte, ushort, uint, uint, uint, uint, uint, uint, int, uint, ushort, ubyte, ubyte, uint, %typedef.rwlock_t, %struct.tcp_listen_opt*, %struct.open_request*, %struct.open_request*, int, uint, uint, int, int, uint, uint } + %struct.tcp_v4_open_req = type { uint, uint, %struct.ip_options* } + %struct.tcphdr = type { ushort, ushort, uint, uint, ushort, ushort, ushort, ushort } + %struct.termios = type { uint, uint, uint, uint, ubyte, [19 x ubyte] } + %struct.thread_struct = type { uint, uint, uint, uint, uint, [8 x uint], uint, uint, uint, %union.i387_union, %struct.vm86_struct*, uint, uint, uint, uint, int, [33 x uint] } + %struct.timer_list = type { %struct.list_head, uint, uint, void (uint)* } + %struct.tq_struct = type { %struct.list_head, uint, void (sbyte*)*, sbyte* } + %struct.tty_driver = type { int, sbyte*, sbyte*, int, short, short, short, short, short, %struct.termios, int, int*, %struct.proc_dir_entry*, %struct.tty_driver*, %struct.tty_struct**, %struct.termios**, %struct.termios**, sbyte*, int (%struct.tty_struct*, %struct.file*)*, void (%struct.tty_struct*, %struct.file*)*, int (%struct.tty_struct*, int, ubyte*, int)*, void (%struct.tty_struct*, ubyte)*, void (%struct.tty_struct*)*, int (%struct.tty_struct*)*, int (%struct.tty_struct*)*, int (%struct.tty_struct*, %struct.file*, uint, uint)*, void (%struct.tty_struct*, %struct.termios*)*, void (%struct.tty_struct*)*, void (%struct.tty_struct*)*, void (%struct.tty_struct*)*, void (%struct.tty_struct*)*, void (%struct.tty_struct*)*, void (%struct.tty_struct*, int)*, void (%struct.tty_struct*)*, void (%struct.tty_struct*)*, void (%struct.tty_struct*, int)*, void (%struct.tty_struct*, sbyte)*, int (sbyte*, sbyte**, int, int, int*, sbyte*)*, int (%struct.file*, sbyte*, uint, sbyte*)*, ! %struct.tty_driver*, %struct.tty_driver* } + %struct.tty_flip_buffer = type { %struct.tq_struct, %struct.semaphore, sbyte*, ubyte*, int, int, [1024 x ubyte], [1024 x sbyte], [4 x ubyte] } + %struct.tty_ldisc = type { int, sbyte*, int, int, int (%struct.tty_struct*)*, void (%struct.tty_struct*)*, void (%struct.tty_struct*)*, int (%struct.tty_struct*)*, int (%struct.tty_struct*, %struct.file*, ubyte*, uint)*, int (%struct.tty_struct*, %struct.file*, ubyte*, uint)*, int (%struct.tty_struct*, %struct.file*, uint, uint)*, void (%struct.tty_struct*, %struct.termios*)*, uint (%struct.tty_struct*, %struct.file*, %struct.poll_table_struct*)*, void (%struct.tty_struct*, ubyte*, sbyte*, int)*, int (%struct.tty_struct*)*, void (%struct.tty_struct*)* } + %struct.tty_struct = type { int, %struct.tty_driver, %struct.tty_ldisc, %struct.termios*, %struct.termios*, int, int, ushort, uint, int, %struct.drm_clip_rect, ubyte, ubyte, %struct.tty_struct*, %struct.fasync_struct*, %struct.tty_flip_buffer, int, int, %struct.__wait_queue_head, %struct.__wait_queue_head, %struct.tq_struct, sbyte*, sbyte*, %struct.list_head, uint, ubyte, ushort, uint, int, [8 x uint], sbyte*, int, int, int, [128 x uint], int, uint, uint, %struct.semaphore, %struct.semaphore, %struct.IO_APIC_reg_00, %struct.tq_struct } + %struct.unix_address = type { %struct.bluez_skb_cb, int, uint, [0 x %struct.sockaddr_un] } + %struct.unix_opt = type { %struct.unix_address*, %struct.dentry*, %struct.vfsmount*, %struct.semaphore, %struct.sock*, %struct.sock**, %struct.sock*, %struct.bluez_skb_cb, %typedef.rwlock_t, %struct.__wait_queue_head } + %struct.usb_bus = type opaque + %struct.usbdev_inode_info = type { %struct.list_head, %struct.list_head, { %struct.usb_bus* } } + %struct.user_struct = type { %struct.bluez_skb_cb, %struct.bluez_skb_cb, %struct.bluez_skb_cb, %struct.user_struct*, %struct.user_struct**, uint } + %struct.vfsmount = type { %struct.list_head, %struct.vfsmount*, %struct.dentry*, %struct.dentry*, %struct.super_block*, %struct.list_head, %struct.list_head, %struct.bluez_skb_cb, int, sbyte*, %struct.list_head } + %struct.vlan_group = type opaque + %struct.vm86_regs = type { int, int, int, int, int, int, int, int, int, int, int, int, int, ushort, ushort, int, int, ushort, ushort, ushort, ushort, ushort, ushort, ushort, ushort, ushort, ushort } + %struct.vm86_struct = type { %struct.vm86_regs, uint, uint, uint, %struct.revectored_struct, %struct.revectored_struct } + %struct.vm_area_struct = type { %struct.mm_struct*, uint, uint, %struct.vm_area_struct*, %struct.IO_APIC_reg_00, uint, %struct.rb_node_s, %struct.vm_area_struct*, %struct.vm_area_struct**, %struct.vm_operations_struct*, uint, %struct.file*, uint, sbyte* } + %struct.vm_operations_struct = type { void (%struct.vm_area_struct*)*, void (%struct.vm_area_struct*)*, %struct.page* (%struct.vm_area_struct*, uint, int)* } + %struct.xdr_buf = type { [1 x %struct.iovec], [1 x %struct.iovec], %struct.page**, uint, uint, uint } + %typedef.__kernel_fd_set = type { [32 x int] } + %typedef.__kernel_fsid_t = type { [2 x int] } + %typedef.dvd_authinfo = type { [2 x ulong] } + %typedef.llva_fp_state_t = type { [7 x uint], [20 x uint] } + %typedef.llva_icontext_t = type { uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint*, uint } + %typedef.rwlock_t = type { %struct.IO_APIC_reg_00, %struct.IO_APIC_reg_00, uint } + %typedef.sigset_t = type { [2 x uint] } + %typedef.socket_lock_t = type { %struct.IO_APIC_reg_00, uint, %struct.__wait_queue_head } + %union.i387_union = type { %struct.i387_fxsave_struct } + + implementation ; Functions: + + void %rs_init() { + entry: + br bool false, label %loopentry.0.no_exit.0_crit_edge, label %loopentry.0.loopexit.0_crit_edge + + loopentry.0: ; No predecessors! + unreachable + + loopentry.0.loopexit.0_crit_edge: ; preds = %entry + br label %loopexit.0 + + loopentry.0.no_exit.0_crit_edge: ; preds = %entry + br label %no_exit.0 + + no_exit.0: ; preds = %no_exit.0.no_exit.0_crit_edge, %loopentry.0.no_exit.0_crit_edge + br bool false, label %no_exit.0.no_exit.0_crit_edge, label %no_exit.0.loopexit.0_crit_edge + + no_exit.0.loopexit.0_crit_edge: ; preds = %no_exit.0 + br label %loopexit.0 + + no_exit.0.no_exit.0_crit_edge: ; preds = %no_exit.0 + br label %no_exit.0 + + loopexit.0: ; preds = %no_exit.0.loopexit.0_crit_edge, %loopentry.0.loopexit.0_crit_edge + br bool false, label %then.0, label %loopexit.0.endif.0_crit_edge + + loopexit.0.endif.0_crit_edge: ; preds = %loopexit.0 + br label %endif.0 + + then.0: ; preds = %loopexit.0 + br bool false, label %loopentry.1.no_exit.1_crit_edge, label %loopentry.1.loopexit.1_crit_edge + + loopentry.1: ; No predecessors! + unreachable + + loopentry.1.loopexit.1_crit_edge: ; preds = %then.0 + br label %loopexit.1 + + loopentry.1.no_exit.1_crit_edge: ; preds = %then.0 + br label %no_exit.1 + + no_exit.1: ; preds = %no_exit.1.backedge, %loopentry.1.no_exit.1_crit_edge + br bool false, label %shortcirc_next.0, label %no_exit.1.shortcirc_done.0_crit_edge + + no_exit.1.shortcirc_done.0_crit_edge: ; preds = %no_exit.1 + br label %shortcirc_done.0 + + shortcirc_next.0: ; preds = %no_exit.1 + br label %shortcirc_done.0 + + shortcirc_done.0: ; preds = %shortcirc_next.0, %no_exit.1.shortcirc_done.0_crit_edge + br bool false, label %then.1, label %endif.1 + + then.1: ; preds = %shortcirc_done.0 + br bool false, label %then.1.no_exit.1_crit_edge, label %then.1.loopexit.1_crit_edge + + then.1.loopexit.1_crit_edge: ; preds = %then.1 + br label %loopexit.1 + + then.1.no_exit.1_crit_edge: ; preds = %then.1 + br label %no_exit.1.backedge + + no_exit.1.backedge: ; preds = %endif.1.no_exit.1_crit_edge, %then.1.no_exit.1_crit_edge + br label %no_exit.1 + + endif.1: ; preds = %shortcirc_done.0 + br bool false, label %endif.1.no_exit.1_crit_edge, label %endif.1.loopexit.1_crit_edge + + endif.1.loopexit.1_crit_edge: ; preds = %endif.1 + br label %loopexit.1 + + endif.1.no_exit.1_crit_edge: ; preds = %endif.1 + br label %no_exit.1.backedge + + loopexit.1: ; preds = %endif.1.loopexit.1_crit_edge, %then.1.loopexit.1_crit_edge, %loopentry.1.loopexit.1_crit_edge + br label %endif.0 + + endif.0: ; preds = %loopexit.1, %loopexit.0.endif.0_crit_edge + br bool false, label %then.2, label %endif.0.endif.2_crit_edge + + endif.0.endif.2_crit_edge: ; preds = %endif.0 + br label %endif.2 + + then.2: ; preds = %endif.0 + unreachable + + dead_block.0: ; No predecessors! + br label %endif.2 + + endif.2: ; preds = %dead_block.0, %endif.0.endif.2_crit_edge + br bool false, label %then.3, label %endif.2.endif.3_crit_edge + + endif.2.endif.3_crit_edge: ; preds = %endif.2 + br label %endif.3 + + then.3: ; preds = %endif.2 + unreachable + + dead_block.1: ; No predecessors! + br label %endif.3 + + endif.3: ; preds = %dead_block.1, %endif.2.endif.3_crit_edge + br label %loopentry.2 + + loopentry.2: ; preds = %endif.6, %endif.3 + br bool false, label %loopentry.2.no_exit.2_crit_edge, label %loopentry.2.loopexit.2_crit_edge + + loopentry.2.loopexit.2_crit_edge: ; preds = %loopentry.2 + br label %loopexit.2 + + loopentry.2.no_exit.2_crit_edge: ; preds = %loopentry.2 + br label %no_exit.2 + + no_exit.2: ; preds = %then.5.no_exit.2_crit_edge, %loopentry.2.no_exit.2_crit_edge + br bool false, label %then.4, label %no_exit.2.endif.4_crit_edge + + no_exit.2.endif.4_crit_edge: ; preds = %no_exit.2 + br label %endif.4 + + then.4: ; preds = %no_exit.2 + br label %endif.4 + + endif.4: ; preds = %then.4, %no_exit.2.endif.4_crit_edge + br bool false, label %shortcirc_next.1, label %endif.4.shortcirc_done.1_crit_edge + + endif.4.shortcirc_done.1_crit_edge: ; preds = %endif.4 + br label %shortcirc_done.1 + + shortcirc_next.1: ; preds = %endif.4 + br bool false, label %then.i21, label %endif.i + + then.i21: ; preds = %shortcirc_next.1 + br label %then.5 + + then.i21.endif.5_crit_edge: ; No predecessors! + unreachable + + then.i21.then.5_crit_edge: ; No predecessors! + unreachable + + endif.i: ; preds = %shortcirc_next.1 + br label %shortcirc_done.1 + + __check_region.exit: ; No predecessors! + unreachable + + shortcirc_done.1: ; preds = %endif.i, %endif.4.shortcirc_done.1_crit_edge + br bool false, label %shortcirc_done.1.then.5_crit_edge, label %shortcirc_done.1.endif.5_crit_edge + + shortcirc_done.1.endif.5_crit_edge: ; preds = %shortcirc_done.1 + br label %endif.5 + + shortcirc_done.1.then.5_crit_edge: ; preds = %shortcirc_done.1 + br label %then.5 + + then.5: ; preds = %shortcirc_done.1.then.5_crit_edge, %then.i21 + br bool false, label %then.5.no_exit.2_crit_edge, label %then.5.loopexit.2_crit_edge + + then.5.loopexit.2_crit_edge: ; preds = %then.5 + br label %loopexit.2 + + then.5.no_exit.2_crit_edge: ; preds = %then.5 + br label %no_exit.2 + + dead_block_after_continue.0: ; No predecessors! + unreachable + + endif.5: ; preds = %shortcirc_done.1.endif.5_crit_edge + br bool false, label %then.6, label %endif.5.endif.6_crit_edge + + endif.5.endif.6_crit_edge: ; preds = %endif.5 + br label %endif.6 + + then.6: ; preds = %endif.5 + br label %endif.6 + + endif.6: ; preds = %then.6, %endif.5.endif.6_crit_edge + br label %loopentry.2 + + loopcont.2: ; No predecessors! + unreachable + + loopexit.2: ; preds = %then.5.loopexit.2_crit_edge, %loopentry.2.loopexit.2_crit_edge + br label %loopentry.3 + + loopentry.3: ; preds = %endif.9, %loopexit.2 + br bool false, label %loopentry.3.no_exit.3_crit_edge, label %loopentry.3.loopexit.3_crit_edge + + loopentry.3.loopexit.3_crit_edge: ; preds = %loopentry.3 + br label %loopexit.3 + + loopentry.3.no_exit.3_crit_edge: ; preds = %loopentry.3 + br label %no_exit.3 + + no_exit.3: ; preds = %then.7.no_exit.3_crit_edge, %loopentry.3.no_exit.3_crit_edge + br bool false, label %then.7, label %no_exit.3.endif.7_crit_edge + + no_exit.3.endif.7_crit_edge: ; preds = %no_exit.3 + br label %endif.7 + + then.7: ; preds = %no_exit.3 + br bool false, label %then.7.no_exit.3_crit_edge, label %then.7.loopexit.3_crit_edge + + then.7.loopexit.3_crit_edge: ; preds = %then.7 + br label %loopexit.3 + + then.7.no_exit.3_crit_edge: ; preds = %then.7 + br label %no_exit.3 + + dead_block_after_continue.1: ; No predecessors! + unreachable + + endif.7: ; preds = %no_exit.3.endif.7_crit_edge + br bool false, label %shortcirc_next.2, label %endif.7.shortcirc_done.2_crit_edge + + endif.7.shortcirc_done.2_crit_edge: ; preds = %endif.7 + br label %shortcirc_done.2 + + shortcirc_next.2: ; preds = %endif.7 + br label %shortcirc_done.2 + + shortcirc_done.2: ; preds = %shortcirc_next.2, %endif.7.shortcirc_done.2_crit_edge + br bool false, label %shortcirc_next.3, label %shortcirc_done.2.shortcirc_done.3_crit_edge + + shortcirc_done.2.shortcirc_done.3_crit_edge: ; preds = %shortcirc_done.2 + br label %shortcirc_done.3 + + shortcirc_next.3: ; preds = %shortcirc_done.2 + br bool false, label %shortcirc_next.3.shortcirc_done.4_crit_edge, label %shortcirc_next.4 + + shortcirc_next.3.shortcirc_done.4_crit_edge: ; preds = %shortcirc_next.3 + br label %shortcirc_done.4 + + shortcirc_next.4: ; preds = %shortcirc_next.3 + br label %shortcirc_done.4 + + shortcirc_done.4: ; preds = %shortcirc_next.4, %shortcirc_next.3.shortcirc_done.4_crit_edge + br label %shortcirc_done.3 + + shortcirc_done.3: ; preds = %shortcirc_done.4, %shortcirc_done.2.shortcirc_done.3_crit_edge + br bool false, label %then.8, label %shortcirc_done.3.endif.8_crit_edge + + shortcirc_done.3.endif.8_crit_edge: ; preds = %shortcirc_done.3 + br label %endif.8 + + then.8: ; preds = %shortcirc_done.3 + br label %endif.8 + + endif.8: ; preds = %then.8, %shortcirc_done.3.endif.8_crit_edge + br bool false, label %then.9, label %else + + then.9: ; preds = %endif.8 + br bool false, label %cond_true.0, label %cond_false.0 + + cond_true.0: ; preds = %then.9 + br label %cond_continue.0 + + cond_false.0: ; preds = %then.9 + br label %cond_continue.0 + + cond_continue.0: ; preds = %cond_false.0, %cond_true.0 + br label %endif.9 + + else: ; preds = %endif.8 + br bool false, label %cond_true.1, label %cond_false.1 + + cond_true.1: ; preds = %else + br label %cond_continue.1 + + cond_false.1: ; preds = %else + br label %cond_continue.1 + + cond_continue.1: ; preds = %cond_false.1, %cond_true.1 + br label %endif.9 + + endif.9: ; preds = %cond_continue.1, %cond_continue.0 + br label %loopentry.3 + + loopcont.3: ; No predecessors! + unreachable + + loopexit.3: ; preds = %then.7.loopexit.3_crit_edge, %loopentry.3.loopexit.3_crit_edge + br bool false, label %loopentry.i.i.i2.no_exit.i.i.i4_crit_edge, label %loopentry.i.i.i2.pci_register_driver.exit.i.i_crit_edge + + loopentry.i.i.i2: ; No predecessors! + unreachable + + loopentry.i.i.i2.pci_register_driver.exit.i.i_crit_edge: ; preds = %loopexit.3 + br label %pci_register_driver.exit.i.i + + loopentry.i.i.i2.no_exit.i.i.i4_crit_edge: ; preds = %loopexit.3 + br label %no_exit.i.i.i4 + + no_exit.i.i.i4: ; preds = %endif.i.i.i10.no_exit.i.i.i4_crit_edge, %loopentry.i.i.i2.no_exit.i.i.i4_crit_edge + br bool false, label %then.i.i.i6, label %no_exit.i.i.i4.endif.i.i.i10_crit_edge + + no_exit.i.i.i4.endif.i.i.i10_crit_edge: ; preds = %no_exit.i.i.i4 + br label %endif.i.i.i10 + + then.i.i.i6: ; preds = %no_exit.i.i.i4 + br bool false, label %then.0.i.i.i.i, label %else.i.i.i.i + + then.0.i.i.i.i: ; preds = %then.i.i.i6 + br bool false, label %then.1.i.i.i.i, label %endif.1.i.i.i.i + + then.1.i.i.i.i: ; preds = %then.0.i.i.i.i + br label %endif.i.i.i10 + + endif.1.i.i.i.i: ; preds = %then.0.i.i.i.i + br bool false, label %endif.1.i.i.i.i.then.i.i.i.i.i.i_crit_edge, label %endif.1.i.i.i.i.endif.i.i.i.i.i.i_crit_edge + + endif.1.i.i.i.i.endif.i.i.i.i.i.i_crit_edge: ; preds = %endif.1.i.i.i.i + br label %endif.i.i.i.i.i.i + + endif.1.i.i.i.i.then.i.i.i.i.i.i_crit_edge: ; preds = %endif.1.i.i.i.i + br label %then.i.i.i.i.i.i + + else.i.i.i.i: ; preds = %then.i.i.i6 + br bool false, label %endif.0.i.i.i.i.then.i.i.i.i.i.i_crit_edge, label %endif.0.i.i.i.i.endif.i.i.i.i.i.i_crit_edge + + endif.0.i.i.i.i: ; No predecessors! + unreachable + + endif.0.i.i.i.i.endif.i.i.i.i.i.i_crit_edge: ; preds = %else.i.i.i.i + br label %endif.i.i.i.i.i.i + + endif.0.i.i.i.i.then.i.i.i.i.i.i_crit_edge: ; preds = %else.i.i.i.i + br label %then.i.i.i.i.i.i + + then.i.i.i.i.i.i: ; preds = %endif.0.i.i.i.i.then.i.i.i.i.i.i_crit_edge, %endif.1.i.i.i.i.then.i.i.i.i.i.i_crit_edge + br bool false, label %then.i.i.i.i.i.i.then.2.i.i.i.i_crit_edge, label %then.i.i.i.i.i.i.endif.2.i.i.i.i_crit_edge + + then.i.i.i.i.i.i.endif.2.i.i.i.i_crit_edge: ; preds = %then.i.i.i.i.i.i + br label %endif.2.i.i.i.i + + then.i.i.i.i.i.i.then.2.i.i.i.i_crit_edge: ; preds = %then.i.i.i.i.i.i + br label %then.2.i.i.i.i + + endif.i.i.i.i.i.i: ; preds = %endif.0.i.i.i.i.endif.i.i.i.i.i.i_crit_edge, %endif.1.i.i.i.i.endif.i.i.i.i.i.i_crit_edge + br bool false, label %dev_probe_lock.exit.i.i.i.i.then.2.i.i.i.i_crit_edge, label %dev_probe_lock.exit.i.i.i.i.endif.2.i.i.i.i_crit_edge + + dev_probe_lock.exit.i.i.i.i: ; No predecessors! + unreachable + + dev_probe_lock.exit.i.i.i.i.endif.2.i.i.i.i_crit_edge: ; preds = %endif.i.i.i.i.i.i + br label %endif.2.i.i.i.i + + dev_probe_lock.exit.i.i.i.i.then.2.i.i.i.i_crit_edge: ; preds = %endif.i.i.i.i.i.i + br label %then.2.i.i.i.i + + then.2.i.i.i.i: ; preds = %dev_probe_lock.exit.i.i.i.i.then.2.i.i.i.i_crit_edge, %then.i.i.i.i.i.i.then.2.i.i.i.i_crit_edge + br label %endif.2.i.i.i.i + + endif.2.i.i.i.i: ; preds = %then.2.i.i.i.i, %dev_probe_lock.exit.i.i.i.i.endif.2.i.i.i.i_crit_edge, %then.i.i.i.i.i.i.endif.2.i.i.i.i_crit_edge + br bool false, label %then.i.i2.i.i.i.i, label %endif.i.i3.i.i.i.i + + then.i.i2.i.i.i.i: ; preds = %endif.2.i.i.i.i + br label %endif.i.i.i10 + + endif.i.i3.i.i.i.i: ; preds = %endif.2.i.i.i.i + br label %endif.i.i.i10 + + dev_probe_unlock.exit.i.i.i.i: ; No predecessors! + unreachable + + pci_announce_device.exit.i.i.i: ; No predecessors! + unreachable + + endif.i.i.i10: ; preds = %endif.i.i3.i.i.i.i, %then.i.i2.i.i.i.i, %then.1.i.i.i.i, %no_exit.i.i.i4.endif.i.i.i10_crit_edge + br bool false, label %endif.i.i.i10.no_exit.i.i.i4_crit_edge, label %endif.i.i.i10.pci_register_driver.exit.i.i_crit_edge + + endif.i.i.i10.pci_register_driver.exit.i.i_crit_edge: ; preds = %endif.i.i.i10 + br label %pci_register_driver.exit.i.i + + endif.i.i.i10.no_exit.i.i.i4_crit_edge: ; preds = %endif.i.i.i10 + br label %no_exit.i.i.i4 + + pci_register_driver.exit.i.i: ; preds = %endif.i.i.i10.pci_register_driver.exit.i.i_crit_edge, %loopentry.i.i.i2.pci_register_driver.exit.i.i_crit_edge + br bool false, label %then.0.i.i12, label %endif.0.i.i13 + + then.0.i.i12: ; preds = %pci_register_driver.exit.i.i + br label %probe_serial_pci.exit + + then.0.i.i12.probe_serial_pci.exit_crit_edge: ; No predecessors! + unreachable + + then.0.i.i12.then.i_crit_edge: ; No predecessors! + br label %then.i + + endif.0.i.i13: ; preds = %pci_register_driver.exit.i.i + br bool false, label %then.1.i.i14, label %endif.0.i.i13.endif.1.i.i15_crit_edge + + endif.0.i.i13.endif.1.i.i15_crit_edge: ; preds = %endif.0.i.i13 + br label %endif.1.i.i15 + + then.1.i.i14: ; preds = %endif.0.i.i13 + br label %endif.1.i.i15 + + endif.1.i.i15: ; preds = %then.1.i.i14, %endif.0.i.i13.endif.1.i.i15_crit_edge + br bool false, label %loopentry.i8.i.i.no_exit.i9.i.i_crit_edge, label %loopentry.i8.i.i.pci_unregister_driver.exit.i.i_crit_edge + + loopentry.i8.i.i: ; No predecessors! + unreachable + + loopentry.i8.i.i.pci_unregister_driver.exit.i.i_crit_edge: ; preds = %endif.1.i.i15 + br label %pci_unregister_driver.exit.i.i + + loopentry.i8.i.i.no_exit.i9.i.i_crit_edge: ; preds = %endif.1.i.i15 + br label %no_exit.i9.i.i + + no_exit.i9.i.i: ; preds = %endif.0.i.i.i.no_exit.i9.i.i_crit_edge, %loopentry.i8.i.i.no_exit.i9.i.i_crit_edge + br bool false, label %then.0.i.i.i, label %no_exit.i9.i.i.endif.0.i.i.i_crit_edge + + no_exit.i9.i.i.endif.0.i.i.i_crit_edge: ; preds = %no_exit.i9.i.i + br label %endif.0.i.i.i + + then.0.i.i.i: ; preds = %no_exit.i9.i.i + br bool false, label %then.1.i.i.i, label %then.0.i.i.i.endif.1.i.i.i_crit_edge + + then.0.i.i.i.endif.1.i.i.i_crit_edge: ; preds = %then.0.i.i.i + br label %endif.1.i.i.i + + then.1.i.i.i: ; preds = %then.0.i.i.i + br label %endif.1.i.i.i + + endif.1.i.i.i: ; preds = %then.1.i.i.i, %then.0.i.i.i.endif.1.i.i.i_crit_edge + br label %endif.0.i.i.i + + endif.0.i.i.i: ; preds = %endif.1.i.i.i, %no_exit.i9.i.i.endif.0.i.i.i_crit_edge + br bool false, label %endif.0.i.i.i.no_exit.i9.i.i_crit_edge, label %endif.0.i.i.i.pci_unregister_driver.exit.i.i_crit_edge + + endif.0.i.i.i.pci_unregister_driver.exit.i.i_crit_edge: ; preds = %endif.0.i.i.i + br label %pci_unregister_driver.exit.i.i + + endif.0.i.i.i.no_exit.i9.i.i_crit_edge: ; preds = %endif.0.i.i.i + br label %no_exit.i9.i.i + + pci_unregister_driver.exit.i.i: ; preds = %endif.0.i.i.i.pci_unregister_driver.exit.i.i_crit_edge, %loopentry.i8.i.i.pci_unregister_driver.exit.i.i_crit_edge + br bool false, label %pci_module_init.exit.i.then.i_crit_edge, label %pci_module_init.exit.i.probe_serial_pci.exit_crit_edge + + pci_module_init.exit.i: ; No predecessors! + unreachable + + pci_module_init.exit.i.probe_serial_pci.exit_crit_edge: ; preds = %pci_unregister_driver.exit.i.i + br label %probe_serial_pci.exit + + pci_module_init.exit.i.then.i_crit_edge: ; preds = %pci_unregister_driver.exit.i.i + br label %then.i + + then.i: ; preds = %pci_module_init.exit.i.then.i_crit_edge, %then.0.i.i12.then.i_crit_edge + br label %probe_serial_pci.exit + + probe_serial_pci.exit: ; preds = %then.i, %pci_module_init.exit.i.probe_serial_pci.exit_crit_edge, %then.0.i.i12 + br bool false, label %then.0.i, label %endif.0.i + + then.0.i: ; preds = %probe_serial_pci.exit + ret void + + endif.0.i: ; preds = %probe_serial_pci.exit + br bool false, label %loopentry.0.i.no_exit.0.i_crit_edge, label %loopentry.0.i.loopexit.0.i_crit_edge + + loopentry.0.i: ; No predecessors! + unreachable + + loopentry.0.i.loopexit.0.i_crit_edge: ; preds = %endif.0.i + br label %loopexit.0.i + + loopentry.0.i.no_exit.0.i_crit_edge: ; preds = %endif.0.i + br label %no_exit.0.i + + no_exit.0.i: ; preds = %loopcont.0.i.no_exit.0.i_crit_edge, %loopentry.0.i.no_exit.0.i_crit_edge + br bool false, label %then.1.i, label %endif.1.i + + then.1.i: ; preds = %no_exit.0.i + br label %loopcont.0.i + + endif.1.i: ; preds = %no_exit.0.i + br bool false, label %loopentry.1.i.no_exit.1.i_crit_edge, label %loopentry.1.i.loopexit.1.i_crit_edge + + loopentry.1.i: ; No predecessors! + unreachable + + loopentry.1.i.loopexit.1.i_crit_edge: ; preds = %endif.1.i + br label %loopexit.1.i + + loopentry.1.i.no_exit.1.i_crit_edge: ; preds = %endif.1.i + br label %no_exit.1.i + + no_exit.1.i: ; preds = %endif.2.i.no_exit.1.i_crit_edge, %loopentry.1.i.no_exit.1.i_crit_edge + br bool false, label %shortcirc_next.0.i, label %no_exit.1.i.shortcirc_done.0.i_crit_edge + + no_exit.1.i.shortcirc_done.0.i_crit_edge: ; preds = %no_exit.1.i + br label %shortcirc_done.0.i + + shortcirc_next.0.i: ; preds = %no_exit.1.i + br label %shortcirc_done.0.i + + shortcirc_done.0.i: ; preds = %shortcirc_next.0.i, %no_exit.1.i.shortcirc_done.0.i_crit_edge + br bool false, label %then.2.i, label %endif.2.i + + then.2.i: ; preds = %shortcirc_done.0.i + br bool false, label %then.2.i.then.3.i_crit_edge, label %then.2.i.else.i_crit_edge + + then.2.i.else.i_crit_edge: ; preds = %then.2.i + br label %else.i + + then.2.i.then.3.i_crit_edge: ; preds = %then.2.i + br label %then.3.i + + endif.2.i: ; preds = %shortcirc_done.0.i + br bool false, label %endif.2.i.no_exit.1.i_crit_edge, label %endif.2.i.loopexit.1.i_crit_edge + + endif.2.i.loopexit.1.i_crit_edge: ; preds = %endif.2.i + br label %loopexit.1.i + + endif.2.i.no_exit.1.i_crit_edge: ; preds = %endif.2.i + br label %no_exit.1.i + + loopexit.1.i: ; preds = %endif.2.i.loopexit.1.i_crit_edge, %loopentry.1.i.loopexit.1.i_crit_edge + br bool false, label %loopexit.1.i.then.3.i_crit_edge, label %loopexit.1.i.else.i_crit_edge + + loopexit.1.i.else.i_crit_edge: ; preds = %loopexit.1.i + br label %else.i + + loopexit.1.i.then.3.i_crit_edge: ; preds = %loopexit.1.i + br label %then.3.i + + then.3.i: ; preds = %loopexit.1.i.then.3.i_crit_edge, %then.2.i.then.3.i_crit_edge + br bool false, label %shortcirc_next.1.i, label %then.3.i.shortcirc_done.1.i_crit_edge + + then.3.i.shortcirc_done.1.i_crit_edge: ; preds = %then.3.i + br label %shortcirc_done.1.i + + shortcirc_next.1.i: ; preds = %then.3.i + br label %shortcirc_done.1.i + + shortcirc_done.1.i: ; preds = %shortcirc_next.1.i, %then.3.i.shortcirc_done.1.i_crit_edge + br bool false, label %then.4.i, label %endif.4.i + + then.4.i: ; preds = %shortcirc_done.1.i + br label %endif.3.i + + endif.4.i: ; preds = %shortcirc_done.1.i + br label %endif.3.i + + else.i: ; preds = %loopexit.1.i.else.i_crit_edge, %then.2.i.else.i_crit_edge + br bool false, label %shortcirc_next.0.i.i, label %else.i.shortcirc_done.0.i.i_crit_edge + + else.i.shortcirc_done.0.i.i_crit_edge: ; preds = %else.i + br label %shortcirc_done.0.i.i + + shortcirc_next.0.i.i: ; preds = %else.i + br label %shortcirc_done.0.i.i + + shortcirc_done.0.i.i: ; preds = %shortcirc_next.0.i.i, %else.i.shortcirc_done.0.i.i_crit_edge + br bool false, label %shortcirc_next.1.i.i, label %shortcirc_done.0.i.i.shortcirc_done.1.i.i_crit_edge + + shortcirc_done.0.i.i.shortcirc_done.1.i.i_crit_edge: ; preds = %shortcirc_done.0.i.i + br label %shortcirc_done.1.i.i + + shortcirc_next.1.i.i: ; preds = %shortcirc_done.0.i.i + br bool false, label %loopentry.i.i2.i.no_exit.i.i3.i_crit_edge, label %loopentry.i.i2.i.loopexit.i.i.i_crit_edge + + loopentry.i.i2.i: ; No predecessors! + unreachable + + loopentry.i.i2.i.loopexit.i.i.i_crit_edge: ; preds = %shortcirc_next.1.i.i + br label %loopexit.i.i.i + + loopentry.i.i2.i.no_exit.i.i3.i_crit_edge: ; preds = %shortcirc_next.1.i.i + br label %no_exit.i.i3.i + + no_exit.i.i3.i: ; preds = %endif.i.i.i.no_exit.i.i3.i_crit_edge, %loopentry.i.i2.i.no_exit.i.i3.i_crit_edge + br bool false, label %shortcirc_next.0.i.i.i, label %no_exit.i.i3.i.shortcirc_done.0.i.i.i_crit_edge + + no_exit.i.i3.i.shortcirc_done.0.i.i.i_crit_edge: ; preds = %no_exit.i.i3.i + br label %shortcirc_done.0.i.i.i + + shortcirc_next.0.i.i.i: ; preds = %no_exit.i.i3.i + br label %shortcirc_done.0.i.i.i + + shortcirc_done.0.i.i.i: ; preds = %shortcirc_next.0.i.i.i, %no_exit.i.i3.i.shortcirc_done.0.i.i.i_crit_edge + br bool false, label %shortcirc_next.1.i.i.i, label %shortcirc_done.0.i.i.i.shortcirc_done.1.i.i.i_crit_edge + + shortcirc_done.0.i.i.i.shortcirc_done.1.i.i.i_crit_edge: ; preds = %shortcirc_done.0.i.i.i + br label %shortcirc_done.1.i.i.i + + shortcirc_next.1.i.i.i: ; preds = %shortcirc_done.0.i.i.i + br label %shortcirc_done.1.i.i.i + + shortcirc_done.1.i.i.i: ; preds = %shortcirc_next.1.i.i.i, %shortcirc_done.0.i.i.i.shortcirc_done.1.i.i.i_crit_edge + br bool false, label %then.i.i.i, label %endif.i.i.i + + then.i.i.i: ; preds = %shortcirc_done.1.i.i.i + br label %then.0.i.i + + then.i.i.i.endif.0.i.i_crit_edge: ; No predecessors! + unreachable + + then.i.i.i.then.0.i.i_crit_edge: ; No predecessors! + unreachable + + endif.i.i.i: ; preds = %shortcirc_done.1.i.i.i + br bool false, label %endif.i.i.i.no_exit.i.i3.i_crit_edge, label %endif.i.i.i.loopexit.i.i.i_crit_edge + + endif.i.i.i.loopexit.i.i.i_crit_edge: ; preds = %endif.i.i.i + br label %loopexit.i.i.i + + endif.i.i.i.no_exit.i.i3.i_crit_edge: ; preds = %endif.i.i.i + br label %no_exit.i.i3.i + + loopexit.i.i.i: ; preds = %endif.i.i.i.loopexit.i.i.i_crit_edge, %loopentry.i.i2.i.loopexit.i.i.i_crit_edge + br label %shortcirc_done.1.i.i + + check_compatible_id.exit.i.i: ; No predecessors! + unreachable + + shortcirc_done.1.i.i: ; preds = %loopexit.i.i.i, %shortcirc_done.0.i.i.shortcirc_done.1.i.i_crit_edge + br bool false, label %shortcirc_done.1.i.i.then.0.i.i_crit_edge, label %shortcirc_done.1.i.i.endif.0.i.i_crit_edge + + shortcirc_done.1.i.i.endif.0.i.i_crit_edge: ; preds = %shortcirc_done.1.i.i + br label %endif.0.i.i + + shortcirc_done.1.i.i.then.0.i.i_crit_edge: ; preds = %shortcirc_done.1.i.i + br label %then.0.i.i + + then.0.i.i: ; preds = %shortcirc_done.1.i.i.then.0.i.i_crit_edge, %then.i.i.i + br label %then.5.i + + then.0.i.i.endif.5.i_crit_edge: ; No predecessors! + unreachable + + then.0.i.i.then.5.i_crit_edge: ; No predecessors! + unreachable + + endif.0.i.i: ; preds = %shortcirc_done.1.i.i.endif.0.i.i_crit_edge + br bool false, label %endif.0.i.i.shortcirc_done.2.i.i_crit_edge, label %shortcirc_next.2.i.i + + endif.0.i.i.shortcirc_done.2.i.i_crit_edge: ; preds = %endif.0.i.i + br label %shortcirc_done.2.i.i + + shortcirc_next.2.i.i: ; preds = %endif.0.i.i + br label %shortcirc_done.2.i.i + + shortcirc_done.2.i.i: ; preds = %shortcirc_next.2.i.i, %endif.0.i.i.shortcirc_done.2.i.i_crit_edge + br bool false, label %then.1.i.i, label %endif.1.i.i + + then.1.i.i: ; preds = %shortcirc_done.2.i.i + br label %then.5.i + + then.1.i.i.endif.5.i_crit_edge: ; No predecessors! + unreachable + + then.1.i.i.then.5.i_crit_edge: ; No predecessors! + unreachable + + endif.1.i.i: ; preds = %shortcirc_done.2.i.i + br bool false, label %loopentry.0.i7.i.no_exit.0.i8.i_crit_edge, label %loopentry.0.i7.i.loopexit.0.i11.i_crit_edge + + loopentry.0.i7.i: ; No predecessors! + unreachable + + loopentry.0.i7.i.loopexit.0.i11.i_crit_edge: ; preds = %endif.1.i.i + br label %loopexit.0.i11.i + + loopentry.0.i7.i.no_exit.0.i8.i_crit_edge: ; preds = %endif.1.i.i + br label %no_exit.0.i8.i + + no_exit.0.i8.i: ; preds = %loopexit.1.i.i.no_exit.0.i8.i_crit_edge, %loopentry.0.i7.i.no_exit.0.i8.i_crit_edge + br bool false, label %loopentry.1.i9.i.no_exit.1.i10.i_crit_edge, label %loopentry.1.i9.i.loopexit.1.i.i_crit_edge + + loopentry.1.i9.i: ; No predecessors! + unreachable + + loopentry.1.i9.i.loopexit.1.i.i_crit_edge: ; preds = %no_exit.0.i8.i + br label %loopexit.1.i.i + + loopentry.1.i9.i.no_exit.1.i10.i_crit_edge: ; preds = %no_exit.0.i8.i + br label %no_exit.1.i10.i + + no_exit.1.i10.i: ; preds = %endif.2.i.i.no_exit.1.i10.i_crit_edge, %loopentry.1.i9.i.no_exit.1.i10.i_crit_edge + br bool false, label %shortcirc_next.3.i.i, label %no_exit.1.i10.i.shortcirc_done.3.i.i_crit_edge + + no_exit.1.i10.i.shortcirc_done.3.i.i_crit_edge: ; preds = %no_exit.1.i10.i + br label %shortcirc_done.3.i.i + + shortcirc_next.3.i.i: ; preds = %no_exit.1.i10.i + br bool false, label %shortcirc_next.3.i.i.shortcirc_done.4.i.i_crit_edge, label %shortcirc_next.4.i.i + + shortcirc_next.3.i.i.shortcirc_done.4.i.i_crit_edge: ; preds = %shortcirc_next.3.i.i + br label %shortcirc_done.4.i.i + + shortcirc_next.4.i.i: ; preds = %shortcirc_next.3.i.i + br label %shortcirc_done.4.i.i + + shortcirc_done.4.i.i: ; preds = %shortcirc_next.4.i.i, %shortcirc_next.3.i.i.shortcirc_done.4.i.i_crit_edge + br bool false, label %shortcirc_done.4.i.i.shortcirc_done.5.i.i_crit_edge, label %shortcirc_next.5.i.i + + shortcirc_done.4.i.i.shortcirc_done.5.i.i_crit_edge: ; preds = %shortcirc_done.4.i.i + br label %shortcirc_done.5.i.i + + shortcirc_next.5.i.i: ; preds = %shortcirc_done.4.i.i + %tmp.68.i.i = seteq ushort 0, 1000 ; [#uses=1] + br label %shortcirc_done.5.i.i + + shortcirc_done.5.i.i: ; preds = %shortcirc_next.5.i.i, %shortcirc_done.4.i.i.shortcirc_done.5.i.i_crit_edge + %shortcirc_val.4.i.i = phi bool [ true, %shortcirc_done.4.i.i.shortcirc_done.5.i.i_crit_edge ], [ %tmp.68.i.i, %shortcirc_next.5.i.i ] ; [#uses=1] + br label %shortcirc_done.3.i.i + + shortcirc_done.3.i.i: ; preds = %shortcirc_done.5.i.i, %no_exit.1.i10.i.shortcirc_done.3.i.i_crit_edge + %shortcirc_val.5.i.i = phi bool [ false, %no_exit.1.i10.i.shortcirc_done.3.i.i_crit_edge ], [ %shortcirc_val.4.i.i, %shortcirc_done.5.i.i ] ; [#uses=1] + br bool %shortcirc_val.5.i.i, label %then.2.i.i, label %endif.2.i.i + + then.2.i.i: ; preds = %shortcirc_done.3.i.i + %port.2.i.i.8.lcssa20 = phi %struct.isapnp_port* [ null, %shortcirc_done.3.i.i ] ; <%struct.isapnp_port*> [#uses=0] + br label %endif.5.i + + then.2.i.i.endif.5.i_crit_edge: ; No predecessors! + unreachable + + then.2.i.i.then.5.i_crit_edge: ; No predecessors! + unreachable + + endif.2.i.i: ; preds = %shortcirc_done.3.i.i + br bool false, label %endif.2.i.i.no_exit.1.i10.i_crit_edge, label %endif.2.i.i.loopexit.1.i.i_crit_edge + + endif.2.i.i.loopexit.1.i.i_crit_edge: ; preds = %endif.2.i.i + br label %loopexit.1.i.i + + endif.2.i.i.no_exit.1.i10.i_crit_edge: ; preds = %endif.2.i.i + br label %no_exit.1.i10.i + + loopexit.1.i.i: ; preds = %endif.2.i.i.loopexit.1.i.i_crit_edge, %loopentry.1.i9.i.loopexit.1.i.i_crit_edge + br bool false, label %loopexit.1.i.i.no_exit.0.i8.i_crit_edge, label %loopexit.1.i.i.loopexit.0.i11.i_crit_edge + + loopexit.1.i.i.loopexit.0.i11.i_crit_edge: ; preds = %loopexit.1.i.i + br label %loopexit.0.i11.i + + loopexit.1.i.i.no_exit.0.i8.i_crit_edge: ; preds = %loopexit.1.i.i + br label %no_exit.0.i8.i + + loopexit.0.i11.i: ; preds = %loopexit.1.i.i.loopexit.0.i11.i_crit_edge, %loopentry.0.i7.i.loopexit.0.i11.i_crit_edge + br bool false, label %serial_pnp_guess_board.exit.i.then.5.i_crit_edge, label %serial_pnp_guess_board.exit.i.endif.5.i_crit_edge + + serial_pnp_guess_board.exit.i: ; No predecessors! + unreachable + + serial_pnp_guess_board.exit.i.endif.5.i_crit_edge: ; preds = %loopexit.0.i11.i + br label %endif.5.i + + serial_pnp_guess_board.exit.i.then.5.i_crit_edge: ; preds = %loopexit.0.i11.i + br label %then.5.i + + then.5.i: ; preds = %serial_pnp_guess_board.exit.i.then.5.i_crit_edge, %then.1.i.i, %then.0.i.i + br label %loopcont.0.i + + endif.5.i: ; preds = %serial_pnp_guess_board.exit.i.endif.5.i_crit_edge, %then.2.i.i + br label %endif.3.i + + endif.3.i: ; preds = %endif.5.i, %endif.4.i, %then.4.i + br bool false, label %then.6.i, label %endif.3.i.endif.6.i_crit_edge + + endif.3.i.endif.6.i_crit_edge: ; preds = %endif.3.i + br label %endif.6.i + + then.6.i: ; preds = %endif.3.i + br label %loopentry.0.i.i + + loopentry.0.i.i: ; preds = %endif.i.i, %then.6.i + br bool false, label %loopentry.0.i.i.no_exit.0.i.i_crit_edge, label %loopentry.0.i.i.loopexit.0.i.i_crit_edge + + loopentry.0.i.i.loopexit.0.i.i_crit_edge: ; preds = %loopentry.0.i.i + br label %loopexit.0.i.i + + loopentry.0.i.i.no_exit.0.i.i_crit_edge: ; preds = %loopentry.0.i.i + br label %no_exit.0.i.i + + no_exit.0.i.i: ; preds = %clear_bit195.exit.i.i.no_exit.0.i.i_crit_edge, %loopentry.0.i.i.no_exit.0.i.i_crit_edge + br bool false, label %then.i.i, label %endif.i.i + + then.i.i: ; preds = %no_exit.0.i.i + br label %loopentry.i.i.i + + loopentry.i.i.i: ; preds = %no_exit.i.i.i, %then.i.i + br bool false, label %no_exit.i.i.i, label %clear_bit195.exit.i.i + + no_exit.i.i.i: ; preds = %loopentry.i.i.i + br label %loopentry.i.i.i + + clear_bit195.exit.i.i: ; preds = %loopentry.i.i.i + br bool false, label %clear_bit195.exit.i.i.no_exit.0.i.i_crit_edge, label %clear_bit195.exit.i.i.loopexit.0.i.i_crit_edge + + clear_bit195.exit.i.i.loopexit.0.i.i_crit_edge: ; preds = %clear_bit195.exit.i.i + br label %loopexit.0.i.i + + clear_bit195.exit.i.i.no_exit.0.i.i_crit_edge: ; preds = %clear_bit195.exit.i.i + br label %no_exit.0.i.i + + endif.i.i: ; preds = %no_exit.0.i.i + br label %loopentry.0.i.i + + loopexit.0.i.i: ; preds = %clear_bit195.exit.i.i.loopexit.0.i.i_crit_edge, %loopentry.0.i.i.loopexit.0.i.i_crit_edge + br bool false, label %loopentry.1.i.i.no_exit.1.i.i_crit_edge, label %loopentry.1.i.i.avoid_irq_share.exit.i_crit_edge + + loopentry.1.i.i: ; No predecessors! + unreachable + + loopentry.1.i.i.avoid_irq_share.exit.i_crit_edge: ; preds = %loopexit.0.i.i + br label %avoid_irq_share.exit.i + + loopentry.1.i.i.no_exit.1.i.i_crit_edge: ; preds = %loopexit.0.i.i + br label %no_exit.1.i.i + + no_exit.1.i.i: ; preds = %loopexit.2.i.i.no_exit.1.i.i_crit_edge, %loopentry.1.i.i.no_exit.1.i.i_crit_edge + br bool false, label %loopentry.2.i.i.no_exit.2.i.i_crit_edge, label %loopentry.2.i.i.loopexit.2.i.i_crit_edge + + loopentry.2.i.i: ; No predecessors! + unreachable + + loopentry.2.i.i.loopexit.2.i.i_crit_edge: ; preds = %no_exit.1.i.i + br label %loopexit.2.i.i + + loopentry.2.i.i.no_exit.2.i.i_crit_edge: ; preds = %no_exit.1.i.i + br label %no_exit.2.i.i + + no_exit.2.i.i: ; preds = %no_exit.2.i.i.no_exit.2.i.i_crit_edge, %loopentry.2.i.i.no_exit.2.i.i_crit_edge + br bool false, label %no_exit.2.i.i.no_exit.2.i.i_crit_edge, label %no_exit.2.i.i.loopexit.2.i.i_crit_edge + + no_exit.2.i.i.loopexit.2.i.i_crit_edge: ; preds = %no_exit.2.i.i + br label %loopexit.2.i.i + + no_exit.2.i.i.no_exit.2.i.i_crit_edge: ; preds = %no_exit.2.i.i + br label %no_exit.2.i.i + + loopexit.2.i.i: ; preds = %no_exit.2.i.i.loopexit.2.i.i_crit_edge, %loopentry.2.i.i.loopexit.2.i.i_crit_edge + br bool false, label %loopexit.2.i.i.no_exit.1.i.i_crit_edge, label %loopexit.2.i.i.avoid_irq_share.exit.i_crit_edge + + loopexit.2.i.i.avoid_irq_share.exit.i_crit_edge: ; preds = %loopexit.2.i.i + br label %avoid_irq_share.exit.i + + loopexit.2.i.i.no_exit.1.i.i_crit_edge: ; preds = %loopexit.2.i.i + br label %no_exit.1.i.i + + avoid_irq_share.exit.i: ; preds = %loopexit.2.i.i.avoid_irq_share.exit.i_crit_edge, %loopentry.1.i.i.avoid_irq_share.exit.i_crit_edge + br label %endif.6.i + + endif.6.i: ; preds = %avoid_irq_share.exit.i, %endif.3.i.endif.6.i_crit_edge + br label %loopcont.0.i + + loopcont.0.i: ; preds = %endif.6.i, %then.5.i, %then.1.i + br bool false, label %loopcont.0.i.no_exit.0.i_crit_edge, label %loopcont.0.i.loopexit.0.i_crit_edge + + loopcont.0.i.loopexit.0.i_crit_edge: ; preds = %loopcont.0.i + br label %loopexit.0.i + + loopcont.0.i.no_exit.0.i_crit_edge: ; preds = %loopcont.0.i + br label %no_exit.0.i + + loopexit.0.i: ; preds = %loopcont.0.i.loopexit.0.i_crit_edge, %loopentry.0.i.loopexit.0.i_crit_edge + ret void + + probe_serial_pnp.exit: ; No predecessors! + unreachable + + after_ret: ; No predecessors! + ret void + + return: ; No predecessors! + unreachable + } From dpatel at apple.com Wed Nov 1 16:26:57 2006 From: dpatel at apple.com (Devang Patel) Date: Wed, 1 Nov 2006 16:26:57 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/CondPropagate.cpp Message-ID: <200611012226.kA1MQv3S010230@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: CondPropagate.cpp updated: 1.6 -> 1.7 --- Log message: Handle PHINode with only one incoming value. This fixes http://llvm.org/bugs/show_bug.cgi?id=979 --- Diffs of the changes: (+9 -5) CondPropagate.cpp | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) Index: llvm/lib/Transforms/Scalar/CondPropagate.cpp diff -u llvm/lib/Transforms/Scalar/CondPropagate.cpp:1.6 llvm/lib/Transforms/Scalar/CondPropagate.cpp:1.7 --- llvm/lib/Transforms/Scalar/CondPropagate.cpp:1.6 Sun Aug 27 17:42:52 2006 +++ llvm/lib/Transforms/Scalar/CondPropagate.cpp Wed Nov 1 16:26:43 2006 @@ -196,11 +196,15 @@ // Get the old block we are threading through. BasicBlock *OldSucc = FromBr->getSuccessor(0); - // ToBB should not have any PHI nodes in it to update, because OldSucc had - // multiple successors. If OldSucc had multiple successor and ToBB had - // multiple predecessors, the edge between them would be critical, which we - // already took care of. - assert(!isa(ToBB->begin()) && "Critical Edge Found!"); + // OldSucc had multiple successors. If ToBB has multiple predecessors, the + // edge between them would be critical, which we already took care of. + // If ToBB has single operand PHI node than take care of it here. + if (isa(ToBB->begin())) { + PHINode *PN = cast(ToBB->begin()); + assert(PN->getNumIncomingValues() == 1 && "Critical Edge Found!"); + PN->replaceAllUsesWith(PN->getIncomingValue(0)); + PN->eraseFromParent(); + } // Update PHI nodes in OldSucc to know that FromBB no longer branches to it. OldSucc->removePredecessor(FromBB); From evan.cheng at apple.com Wed Nov 1 16:39:44 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 1 Nov 2006 16:39:44 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Message-ID: <200611012239.kA1MdiYJ010482@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: ScheduleDAGRRList.cpp updated: 1.16 -> 1.17 --- Log message: Clean up. --- Diffs of the changes: (+11 -5) ScheduleDAGRRList.cpp | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.16 llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.17 --- llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.16 Wed Nov 1 16:17:06 2006 +++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Wed Nov 1 16:39:30 2006 @@ -719,7 +719,14 @@ return SethiUllmanNumber; unsigned Opc = SU->Node->getOpcode(); - if (Opc == ISD::TokenFactor || Opc == ISD::CopyToReg) + if (Opc == ISD::CopyFromReg && !isCopyFromLiveIn(SU)) + // CopyFromReg should be close to its def because it restricts allocation + // choices. But if it is a livein then perhaps we want it closer to the + // uses so it can be coalesced. + SethiUllmanNumber = INT_MIN + 10; + else if (Opc == ISD::TokenFactor || Opc == ISD::CopyToReg) + // CopyToReg should be close to its uses to facilitate coalescing and avoid + // spilling. SethiUllmanNumber = INT_MAX - 10; else if (SU->NumSuccsLeft == 0) // If SU does not have a use, i.e. it doesn't produce a value that would @@ -727,10 +734,9 @@ // Give it a small SethiUllman number so it will be scheduled right before its // predecessors that it doesn't lengthen their live ranges. SethiUllmanNumber = INT_MIN + 10; - // FIXME: remove this else if? It seems to reduce register spills but often - // ends up increasing runtime. Need to investigate. - else if (SU->NumPredsLeft == 0 && - (Opc != ISD::CopyFromReg || isCopyFromLiveIn(SU))) + else if (SU->NumPredsLeft == 0) + // If SU does not have a def, schedule it close to its uses because it does + // not lengthen any live ranges. SethiUllmanNumber = INT_MAX - 10; else { int Extra = 0; From evan.cheng at apple.com Wed Nov 1 17:00:07 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 1 Nov 2006 17:00:07 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetInstrInfo.h Message-ID: <200611012300.kA1N070r010801@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetInstrInfo.h updated: 1.100 -> 1.101 --- Log message: Added getTiedToSrcOperand() to check for two-address'ness. --- Diffs of the changes: (+5 -1) TargetInstrInfo.h | 6 +++++- 1 files changed, 5 insertions(+), 1 deletion(-) Index: llvm/include/llvm/Target/TargetInstrInfo.h diff -u llvm/include/llvm/Target/TargetInstrInfo.h:1.100 llvm/include/llvm/Target/TargetInstrInfo.h:1.101 --- llvm/include/llvm/Target/TargetInstrInfo.h:1.100 Tue Oct 31 18:25:20 2006 +++ llvm/include/llvm/Target/TargetInstrInfo.h Wed Nov 1 16:59:52 2006 @@ -230,7 +230,7 @@ /// getOperandConstraint - Returns the value of the specific constraint if /// it is set. Returns -1 if it is not set. int getOperandConstraint(MachineOpCode Opcode, unsigned OpNum, - OperandConstraint Constraint) { + OperandConstraint Constraint) const { assert(OpNum < get(Opcode).numOperands && "Invalid operand # of TargetInstrInfo"); if (get(Opcode).OpInfo[OpNum].Constraints & (1 << Constraint)) { @@ -240,6 +240,10 @@ return -1; } + /// getTiedToSrcOperand - Returns the operand that is tied to the specified + /// dest operand. Returns -1 if there isn't one. + int getTiedToSrcOperand(MachineOpCode Opcode, unsigned OpNum) const; + /// getDWARF_LABELOpcode - Return the opcode of the target's DWARF_LABEL /// instruction if it has one. This is used by codegen passes that update /// DWARF line number info as they modify the code. From evan.cheng at apple.com Wed Nov 1 17:00:46 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 1 Nov 2006 17:00:46 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/TargetInstrInfo.cpp Message-ID: <200611012300.kA1N0khe010826@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: TargetInstrInfo.cpp updated: 1.19 -> 1.20 --- Log message: Added getTiedToSrcOperand() to check for two-address'ness. --- Diffs of the changes: (+12 -0) TargetInstrInfo.cpp | 12 ++++++++++++ 1 files changed, 12 insertions(+) Index: llvm/lib/Target/TargetInstrInfo.cpp diff -u llvm/lib/Target/TargetInstrInfo.cpp:1.19 llvm/lib/Target/TargetInstrInfo.cpp:1.20 --- llvm/lib/Target/TargetInstrInfo.cpp:1.19 Thu May 11 20:46:26 2006 +++ llvm/lib/Target/TargetInstrInfo.cpp Wed Nov 1 17:00:31 2006 @@ -38,6 +38,18 @@ TargetInstrDescriptors = NULL; // reset global variable } +int +TargetInstrInfo::getTiedToSrcOperand(MachineOpCode Opc, unsigned OpNum) const { + for (unsigned i = 0, e = getNumOperands(Opc); i != e; ++i) { + if (i == OpNum) + continue; + int ti = getOperandConstraint(Opc, i, TIED_TO); + if (ti == (int)OpNum) + return i; + } + return -1; +} + // commuteInstruction - The default implementation of this method just exchanges // operand 1 and 2. From evan.cheng at apple.com Wed Nov 1 17:03:25 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 1 Nov 2006 17:03:25 -0600 Subject: [llvm-commits] CVS: llvm/utils/TableGen/CodeGenTarget.cpp Message-ID: <200611012303.kA1N3PGQ010885@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: CodeGenTarget.cpp updated: 1.70 -> 1.71 --- Log message: Tied-to constraint must be op_with_larger_idx = op_with_smaller_idx or else throw an exception. --- Diffs of the changes: (+3 -0) CodeGenTarget.cpp | 3 +++ 1 files changed, 3 insertions(+) Index: llvm/utils/TableGen/CodeGenTarget.cpp diff -u llvm/utils/TableGen/CodeGenTarget.cpp:1.70 llvm/utils/TableGen/CodeGenTarget.cpp:1.71 --- llvm/utils/TableGen/CodeGenTarget.cpp:1.70 Tue Oct 31 18:27:05 2006 +++ llvm/utils/TableGen/CodeGenTarget.cpp Wed Nov 1 17:03:11 2006 @@ -280,6 +280,7 @@ assert(pos != std::string::npos && "Unrecognized constraint"); std::string Name = CStr.substr(1, pos); // Skip '$' + // TIED_TO: $src1 = $dst const std::string delims(" \t"); std::string::size_type wpos = Name.find_first_of(delims); if (wpos != std::string::npos) @@ -291,6 +292,8 @@ if (wpos != std::string::npos) Name = Name.substr(wpos+1); unsigned TIdx = I->getOperandNamed(Name); + if (TIdx >= FIdx) + throw "Illegal tied-to operand constraint '" + CStr + "'"; return std::make_pair(FIdx, (TIdx << 16) | 1); } From dpatel at apple.com Wed Nov 1 17:05:00 2006 From: dpatel at apple.com (Devang Patel) Date: Wed, 1 Nov 2006 17:05:00 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/CondPropagate.cpp Message-ID: <200611012305.kA1N50DC010941@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: CondPropagate.cpp updated: 1.7 -> 1.8 --- Log message: There can be more than one PHINode at the start of the block. --- Diffs of the changes: (+4 -5) CondPropagate.cpp | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) Index: llvm/lib/Transforms/Scalar/CondPropagate.cpp diff -u llvm/lib/Transforms/Scalar/CondPropagate.cpp:1.7 llvm/lib/Transforms/Scalar/CondPropagate.cpp:1.8 --- llvm/lib/Transforms/Scalar/CondPropagate.cpp:1.7 Wed Nov 1 16:26:43 2006 +++ llvm/lib/Transforms/Scalar/CondPropagate.cpp Wed Nov 1 17:04:45 2006 @@ -196,11 +196,10 @@ // Get the old block we are threading through. BasicBlock *OldSucc = FromBr->getSuccessor(0); - // OldSucc had multiple successors. If ToBB has multiple predecessors, the - // edge between them would be critical, which we already took care of. - // If ToBB has single operand PHI node than take care of it here. - if (isa(ToBB->begin())) { - PHINode *PN = cast(ToBB->begin()); + // OldSucc had multiple successors. If ToBB has multiple predecessors, then + // the edge between them would be critical, which we already took care of. + // If ToBB has single operand PHI node then take care of it here. + while (PHINode *PN = dyn_cast(ToBB->begin())) { assert(PN->getNumIncomingValues() == 1 && "Critical Edge Found!"); PN->replaceAllUsesWith(PN->getIncomingValue(0)); PN->eraseFromParent(); From evan.cheng at apple.com Wed Nov 1 17:07:09 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 1 Nov 2006 17:07:09 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAllocSimple.cpp TwoAddressInstructionPass.cpp VirtRegMap.cpp Message-ID: <200611012307.kA1N79kC010992@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: RegAllocSimple.cpp updated: 1.74 -> 1.75 TwoAddressInstructionPass.cpp updated: 1.38 -> 1.39 VirtRegMap.cpp updated: 1.76 -> 1.77 --- Log message: Two-address instructions no longer have to be A := A op C. Now any pair of dest / src operands can be tied together. --- Diffs of the changes: (+144 -118) RegAllocSimple.cpp | 17 +-- TwoAddressInstructionPass.cpp | 229 ++++++++++++++++++++++-------------------- VirtRegMap.cpp | 16 +- 3 files changed, 144 insertions(+), 118 deletions(-) Index: llvm/lib/CodeGen/RegAllocSimple.cpp diff -u llvm/lib/CodeGen/RegAllocSimple.cpp:1.74 llvm/lib/CodeGen/RegAllocSimple.cpp:1.75 --- llvm/lib/CodeGen/RegAllocSimple.cpp:1.74 Mon Sep 4 21:12:02 2006 +++ llvm/lib/CodeGen/RegAllocSimple.cpp Wed Nov 1 17:06:55 2006 @@ -199,17 +199,20 @@ unsigned physReg = Virt2PhysRegMap[virtualReg]; if (physReg == 0) { if (op.isDef()) { - if (!TM->getInstrInfo()->isTwoAddrInstr(MI->getOpcode()) || i) { + int TiedOp = TM->getInstrInfo() + ->getTiedToSrcOperand(MI->getOpcode(), i); + if (TiedOp == -1) { physReg = getFreeReg(virtualReg); } else { - // must be same register number as the first operand - // This maps a = b + c into b = b + c, and saves b into a's spot. - assert(MI->getOperand(1).isRegister() && - MI->getOperand(1).getReg() && - MI->getOperand(1).isUse() && + // must be same register number as the source operand that is + // tied to. This maps a = b + c into b = b + c, and saves b into + // a's spot. + assert(MI->getOperand(TiedOp).isRegister() && + MI->getOperand(TiedOp).getReg() && + MI->getOperand(TiedOp).isUse() && "Two address instruction invalid!"); - physReg = MI->getOperand(1).getReg(); + physReg = MI->getOperand(TiedOp).getReg(); } spillVirtReg(MBB, next(MI), virtualReg, physReg); } else { Index: llvm/lib/CodeGen/TwoAddressInstructionPass.cpp diff -u llvm/lib/CodeGen/TwoAddressInstructionPass.cpp:1.38 llvm/lib/CodeGen/TwoAddressInstructionPass.cpp:1.39 --- llvm/lib/CodeGen/TwoAddressInstructionPass.cpp:1.38 Mon Sep 4 21:12:02 2006 +++ llvm/lib/CodeGen/TwoAddressInstructionPass.cpp Wed Nov 1 17:06:55 2006 @@ -95,122 +95,141 @@ mi != me; ++mi) { unsigned opcode = mi->getOpcode(); - // ignore if it is not a two-address instruction - if (!TII.isTwoAddrInstr(opcode)) - continue; - - ++NumTwoAddressInstrs; - DEBUG(std::cerr << '\t'; mi->print(std::cerr, &TM)); - assert(mi->getOperand(1).isRegister() && mi->getOperand(1).getReg() && - mi->getOperand(1).isUse() && "two address instruction invalid"); - - // if the two operands are the same we just remove the use - // and mark the def as def&use, otherwise we have to insert a copy. - if (mi->getOperand(0).getReg() != mi->getOperand(1).getReg()) { - // rewrite: - // a = b op c - // to: - // a = b - // a = a op c - unsigned regA = mi->getOperand(0).getReg(); - unsigned regB = mi->getOperand(1).getReg(); - - assert(MRegisterInfo::isVirtualRegister(regA) && - MRegisterInfo::isVirtualRegister(regB) && - "cannot update physical register live information"); + bool FirstTied = true; + for (unsigned si = 1, e = TII.getNumOperands(opcode); si < e; ++si) { + int ti = TII.getOperandConstraint(opcode, si, TargetInstrInfo::TIED_TO); + if (ti == -1) + continue; + + if (FirstTied) { + ++NumTwoAddressInstrs; + DEBUG(std::cerr << '\t'; mi->print(std::cerr, &TM)); + } + FirstTied = false; + + assert(mi->getOperand(si).isRegister() && mi->getOperand(si).getReg() && + mi->getOperand(si).isUse() && "two address instruction invalid"); + + // if the two operands are the same we just remove the use + // and mark the def as def&use, otherwise we have to insert a copy. + if (mi->getOperand(ti).getReg() != mi->getOperand(si).getReg()) { + // rewrite: + // a = b op c + // to: + // a = b + // a = a op c + unsigned regA = mi->getOperand(ti).getReg(); + unsigned regB = mi->getOperand(si).getReg(); + + assert(MRegisterInfo::isVirtualRegister(regA) && + MRegisterInfo::isVirtualRegister(regB) && + "cannot update physical register live information"); #ifndef NDEBUG - // First, verify that we do not have a use of a in the instruction (a = - // b + a for example) because our transformation will not work. This - // should never occur because we are in SSA form. - for (unsigned i = 1; i != mi->getNumOperands(); ++i) - assert(!mi->getOperand(i).isRegister() || - mi->getOperand(i).getReg() != regA); + // First, verify that we don't have a use of a in the instruction (a = + // b + a for example) because our transformation will not work. This + // should never occur because we are in SSA form. + for (unsigned i = 0; i != mi->getNumOperands(); ++i) + assert((int)i == ti || + !mi->getOperand(i).isRegister() || + mi->getOperand(i).getReg() != regA); #endif - // If this instruction is not the killing user of B, see if we can - // rearrange the code to make it so. Making it the killing user will - // allow us to coalesce A and B together, eliminating the copy we are - // about to insert. - if (!LV.KillsRegister(mi, regB)) { - const TargetInstrDescriptor &TID = TII.get(opcode); - - // If this instruction is commutative, check to see if C dies. If so, - // swap the B and C operands. This makes the live ranges of A and C - // joinable. - if (TID.Flags & M_COMMUTABLE) { - assert(mi->getOperand(2).isRegister() && - "Not a proper commutative instruction!"); - unsigned regC = mi->getOperand(2).getReg(); - if (LV.KillsRegister(mi, regC)) { - DEBUG(std::cerr << "2addr: COMMUTING : " << *mi); - MachineInstr *NewMI = TII.commuteInstruction(mi); - if (NewMI == 0) { - DEBUG(std::cerr << "2addr: COMMUTING FAILED!\n"); - } else { - DEBUG(std::cerr << "2addr: COMMUTED TO: " << *NewMI); - // If the instruction changed to commute it, update livevar. - if (NewMI != mi) { - LV.instructionChanged(mi, NewMI); // Update live variables - mbbi->insert(mi, NewMI); // Insert the new inst - mbbi->erase(mi); // Nuke the old inst. - mi = NewMI; + // If this instruction is not the killing user of B, see if we can + // rearrange the code to make it so. Making it the killing user will + // allow us to coalesce A and B together, eliminating the copy we are + // about to insert. + if (!LV.KillsRegister(mi, regB)) { + const TargetInstrDescriptor &TID = TII.get(opcode); + + // If this instruction is commutative, check to see if C dies. If + // so, swap the B and C operands. This makes the live ranges of A + // and C joinable. + // FIXME: This code also works for A := B op C instructions. + if ((TID.Flags & M_COMMUTABLE) && mi->getNumOperands() == 3) { + assert(mi->getOperand(3-si).isRegister() && + "Not a proper commutative instruction!"); + unsigned regC = mi->getOperand(3-si).getReg(); + if (LV.KillsRegister(mi, regC)) { + DEBUG(std::cerr << "2addr: COMMUTING : " << *mi); + MachineInstr *NewMI = TII.commuteInstruction(mi); + if (NewMI == 0) { + DEBUG(std::cerr << "2addr: COMMUTING FAILED!\n"); + } else { + DEBUG(std::cerr << "2addr: COMMUTED TO: " << *NewMI); + // If the instruction changed to commute it, update livevar. + if (NewMI != mi) { + LV.instructionChanged(mi, NewMI); // Update live variables + mbbi->insert(mi, NewMI); // Insert the new inst + mbbi->erase(mi); // Nuke the old inst. + mi = NewMI; + } + + ++NumCommuted; + regB = regC; + goto InstructionRearranged; } - - ++NumCommuted; - regB = regC; - goto InstructionRearranged; } } + + // If this instruction is potentially convertible to a true + // three-address instruction, + if (TID.Flags & M_CONVERTIBLE_TO_3_ADDR) + // FIXME: This assumes there are no more operands which are tied + // to another register. +#ifndef NDEBUG + for (unsigned i = si+1, e = TII.getNumOperands(opcode); i < e; ++i) + assert(TII.getOperandConstraint(opcode, i, + TargetInstrInfo::TIED_TO) == -1); +#endif + + if (MachineInstr *New = TII.convertToThreeAddress(mi)) { + DEBUG(std::cerr << "2addr: CONVERTING 2-ADDR: " << *mi); + DEBUG(std::cerr << "2addr: TO 3-ADDR: " << *New); + LV.instructionChanged(mi, New); // Update live variables + mbbi->insert(mi, New); // Insert the new inst + mbbi->erase(mi); // Nuke the old inst. + mi = New; + ++NumConvertedTo3Addr; + assert(!TII.isTwoAddrInstr(New->getOpcode()) && + "convertToThreeAddress returned a 2-addr instruction??"); + // Done with this instruction. + break; + } + } + + InstructionRearranged: + const TargetRegisterClass* rc = MF.getSSARegMap()->getRegClass(regA); + MRI.copyRegToReg(*mbbi, mi, regA, regB, rc); + + MachineBasicBlock::iterator prevMi = prior(mi); + DEBUG(std::cerr << "\t\tprepend:\t"; prevMi->print(std::cerr, &TM)); + + // Update live variables for regA + LiveVariables::VarInfo& varInfo = LV.getVarInfo(regA); + varInfo.DefInst = prevMi; + + // update live variables for regB + if (LV.removeVirtualRegisterKilled(regB, mbbi, mi)) + LV.addVirtualRegisterKilled(regB, prevMi); + + if (LV.removeVirtualRegisterDead(regB, mbbi, mi)) + LV.addVirtualRegisterDead(regB, prevMi); + + // replace all occurences of regB with regA + for (unsigned i = 0, e = mi->getNumOperands(); i != e; ++i) { + if (mi->getOperand(i).isRegister() && + mi->getOperand(i).getReg() == regB) + mi->getOperand(i).setReg(regA); } - // If this instruction is potentially convertible to a true - // three-address instruction, - if (TID.Flags & M_CONVERTIBLE_TO_3_ADDR) - if (MachineInstr *New = TII.convertToThreeAddress(mi)) { - DEBUG(std::cerr << "2addr: CONVERTING 2-ADDR: " << *mi); - DEBUG(std::cerr << "2addr: TO 3-ADDR: " << *New); - LV.instructionChanged(mi, New); // Update live variables - mbbi->insert(mi, New); // Insert the new inst - mbbi->erase(mi); // Nuke the old inst. - mi = New; - ++NumConvertedTo3Addr; - assert(!TII.isTwoAddrInstr(New->getOpcode()) && - "convertToThreeAddress returned a 2-addr instruction??"); - // Done with this instruction. - continue; - } - } - InstructionRearranged: - const TargetRegisterClass* rc = MF.getSSARegMap()->getRegClass(regA); - MRI.copyRegToReg(*mbbi, mi, regA, regB, rc); - - MachineBasicBlock::iterator prevMi = prior(mi); - DEBUG(std::cerr << "\t\tprepend:\t"; prevMi->print(std::cerr, &TM)); - - // Update live variables for regA - LiveVariables::VarInfo& varInfo = LV.getVarInfo(regA); - varInfo.DefInst = prevMi; - - // update live variables for regB - if (LV.removeVirtualRegisterKilled(regB, mbbi, mi)) - LV.addVirtualRegisterKilled(regB, prevMi); - - if (LV.removeVirtualRegisterDead(regB, mbbi, mi)) - LV.addVirtualRegisterDead(regB, prevMi); - - // replace all occurences of regB with regA - for (unsigned i = 1, e = mi->getNumOperands(); i != e; ++i) { - if (mi->getOperand(i).isRegister() && - mi->getOperand(i).getReg() == regB) - mi->getOperand(i).setReg(regA); } - } - assert(mi->getOperand(0).isDef() && mi->getOperand(1).isUse()); - mi->getOperand(1).setReg(mi->getOperand(0).getReg()); - MadeChange = true; + assert(mi->getOperand(ti).isDef() && mi->getOperand(si).isUse()); + mi->getOperand(ti).setReg(mi->getOperand(si).getReg()); + MadeChange = true; - DEBUG(std::cerr << "\t\trewrite to:\t"; mi->print(std::cerr, &TM)); + DEBUG(std::cerr << "\t\trewrite to:\t"; mi->print(std::cerr, &TM)); + } } } Index: llvm/lib/CodeGen/VirtRegMap.cpp diff -u llvm/lib/CodeGen/VirtRegMap.cpp:1.76 llvm/lib/CodeGen/VirtRegMap.cpp:1.77 --- llvm/lib/CodeGen/VirtRegMap.cpp:1.76 Thu Oct 12 12:45:38 2006 +++ llvm/lib/CodeGen/VirtRegMap.cpp Wed Nov 1 17:06:55 2006 @@ -98,7 +98,8 @@ } ModRef MRInfo; - if (OpNo < 2 && TII.isTwoAddrInstr(OldMI->getOpcode())) { + if (TII.getOperandConstraint(OldMI->getOpcode(), OpNo, + TargetInstrInfo::TIED_TO)) { // Folded a two-address operand. MRInfo = isModRef; } else if (OldMI->getOperand(OpNo).isDef()) { @@ -560,9 +561,11 @@ // aren't allowed to modify the reused register. If none of these cases // apply, reuse it. bool CanReuse = true; - if (i == 1 && MI.getOperand(0).isReg() && - MI.getOperand(0).getReg() == VirtReg && - TII->isTwoAddrInstr(MI.getOpcode())) { + int ti = TII->getOperandConstraint(MI.getOpcode(), i, + TargetInstrInfo::TIED_TO); + if (ti != -1 && + MI.getOperand(ti).isReg() && + MI.getOperand(ti).getReg() == VirtReg) { // Okay, we have a two address operand. We can reuse this physreg as // long as we are allowed to clobber the value. CanReuse = Spills.canClobberPhysReg(StackSlot); @@ -818,8 +821,9 @@ // If this def is part of a two-address operand, make sure to execute // the store from the correct physical register. unsigned PhysReg; - if (i == 0 && TII->isTwoAddrInstr(MI.getOpcode())) - PhysReg = MI.getOperand(1).getReg(); + int TiedOp = TII->getTiedToSrcOperand(MI.getOpcode(), i); + if (TiedOp != -1) + PhysReg = MI.getOperand(TiedOp).getReg(); else PhysReg = VRM.getPhys(VirtReg); From clattner at apple.com Wed Nov 1 17:13:04 2006 From: clattner at apple.com (Chris Lattner) Date: Wed, 1 Nov 2006 15:13:04 -0800 Subject: [llvm-commits] REM Patch In-Reply-To: <1162335671.11568.34.camel@bashful.x10sys.com> References: <1162335671.11568.34.camel@bashful.x10sys.com> Message-ID: On Oct 31, 2006, at 3:01 PM, Reid Spencer wrote: > Chris, > > Here's the patch for conversion of Rem -> [USF]Rem instructions. > Please > review at your earliest convenience. This passes dejagnu and llvm-test > suites. I've reviewed and modified this patch to make it as simple to > review as possible. Fortunately its a lot simpler than DIV. Looks good. Some comments: LangRef says that rem can be applied to vectors, but the asmparser rejects them, please update LangRef. Some comments about instcombine below, prefixed by ***. After making these changes and testing them, please commit. -Chris ***This xform (visitURem): + if (Instruction *Op0I = dyn_cast(Op0)) { + // X mul (C1 urem C2) --> 0 iff C1 urem C2 == 0 + if (ConstantExpr::getURem(GetFactor(Op0I), RHS)->isNullValue()) return ReplaceInstUsesWith(I, Constant::getNullValue (I.getType())); } } *** is doing "(X mul C1) urem C2 --> 0 iff C1 urem C2 == 0" please update the comment. This xform also applies in the srem case, where the code is copied, but the comment unmodified. Please move it to intcommon. if (Instruction *RHSI = dyn_cast(I.getOperand(1))) { - // Turn A % (C << N), where C is 2^k, into A & ((C << N)-1) [urem only]. - if (I.getType()->isUnsigned() && - RHSI->getOpcode() == Instruction::Shl && - isa(RHSI->getOperand(0)) && - RHSI->getOperand(0)->getType()->isUnsigned()) { + // Turn A urem (2^C << N) -> A & ((C << N)-1) [urem only]. + if (RHSI->getOpcode() == Instruction::Shl && + isa(RHSI->getOperand(0))) { *** Please change the comment back, your change is not correct. You can drop 'urem only'. + // If the top bits of both operands are zero (i.e. we can prove they are + // unsigned inputs), turn this into a urem. + uint64_t Mask = 1ULL << (I.getType()->getPrimitiveSizeInBits()-1); + if (MaskedValueIsZero(Op1, Mask) && MaskedValueIsZero(Op0, Mask)) { + // X srem Y -> X urem Y, iff X and Y don't have sign bit set + return BinaryOperator::createURem(Op0, Op1, I.getName());; } *** ";;" -> ";" @@ -4564,41 +4608,24 @@ Instruction *InstCombiner::visitSetCondI // If the first operand is (add|sub|and|or|xor|rem) with a constant, and // the second operand is a constant, simplify a bit. if (BinaryOperator *BO = dyn_cast(Op0)) { switch (BO->getOpcode()) { -#if 0 + case Instruction::URem: + break; *** No need for this case stmt, just remove it. case Instruction::SRem: // If we have a signed (X % (2^c)) == 0, turn it into an unsigned one. if (CI->isNullValue() && isa(BO->getOperand (1)) && BO->hasOneUse()) { int64_t V = cast(BO->getOperand(1))- >getSExtValue(); if (V > 1 && isPowerOf2_64(V)) { unsigned L2 = Log2_64(V); const Type *UTy = BO->getType()->getUnsignedVersion(); Value *NewX = InsertNewInstBefore(new CastInst(BO- >getOperand(0), UTy, "tmp"), I); Constant *RHSCst = ConstantInt::get(UTy, 1ULL << L2); - Value *NewRem =InsertNewInstBefore (BinaryOperator::createRem(NewX, + Value *NewRem =InsertNewInstBefore (BinaryOperator::createURem(NewX, RHSCst, BO- >getName()), I); return BinaryOperator::create(I.getOpcode(), NewRem, Constant::getNullValue (UTy)); } } *** There is no need to insert the casts here. It should just replace the srem with a urem in place, no need to change the sign of the inputs. The old code needed the casts because the sign of the operation was tied to the sign of the inputs. From evan.cheng at apple.com Wed Nov 1 17:14:14 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 1 Nov 2006 17:14:14 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetInstrInfo.h Message-ID: <200611012314.kA1NEEVH011118@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetInstrInfo.h updated: 1.101 -> 1.102 --- Log message: Rename --- Diffs of the changes: (+2 -2) TargetInstrInfo.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/include/llvm/Target/TargetInstrInfo.h diff -u llvm/include/llvm/Target/TargetInstrInfo.h:1.101 llvm/include/llvm/Target/TargetInstrInfo.h:1.102 --- llvm/include/llvm/Target/TargetInstrInfo.h:1.101 Wed Nov 1 16:59:52 2006 +++ llvm/include/llvm/Target/TargetInstrInfo.h Wed Nov 1 17:14:00 2006 @@ -240,9 +240,9 @@ return -1; } - /// getTiedToSrcOperand - Returns the operand that is tied to the specified + /// findTiedToSrcOperand - Returns the operand that is tied to the specified /// dest operand. Returns -1 if there isn't one. - int getTiedToSrcOperand(MachineOpCode Opcode, unsigned OpNum) const; + int findTiedToSrcOperand(MachineOpCode Opcode, unsigned OpNum) const; /// getDWARF_LABELOpcode - Return the opcode of the target's DWARF_LABEL /// instruction if it has one. This is used by codegen passes that update From evan.cheng at apple.com Wed Nov 1 17:14:29 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 1 Nov 2006 17:14:29 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/TargetInstrInfo.cpp Message-ID: <200611012314.kA1NETeb011136@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: TargetInstrInfo.cpp updated: 1.20 -> 1.21 --- Log message: Rename --- Diffs of the changes: (+3 -1) TargetInstrInfo.cpp | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/lib/Target/TargetInstrInfo.cpp diff -u llvm/lib/Target/TargetInstrInfo.cpp:1.20 llvm/lib/Target/TargetInstrInfo.cpp:1.21 --- llvm/lib/Target/TargetInstrInfo.cpp:1.20 Wed Nov 1 17:00:31 2006 +++ llvm/lib/Target/TargetInstrInfo.cpp Wed Nov 1 17:14:15 2006 @@ -38,8 +38,10 @@ TargetInstrDescriptors = NULL; // reset global variable } +/// findTiedToSrcOperand - Returns the operand that is tied to the specified +/// dest operand. Returns -1 if there isn't one. int -TargetInstrInfo::getTiedToSrcOperand(MachineOpCode Opc, unsigned OpNum) const { +TargetInstrInfo::findTiedToSrcOperand(MachineOpCode Opc, unsigned OpNum) const { for (unsigned i = 0, e = getNumOperands(Opc); i != e; ++i) { if (i == OpNum) continue; From evan.cheng at apple.com Wed Nov 1 17:18:47 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 1 Nov 2006 17:18:47 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAllocSimple.cpp VirtRegMap.cpp Message-ID: <200611012318.kA1NIlx0011219@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: RegAllocSimple.cpp updated: 1.75 -> 1.76 VirtRegMap.cpp updated: 1.77 -> 1.78 --- Log message: Rename --- Diffs of the changes: (+2 -2) RegAllocSimple.cpp | 2 +- VirtRegMap.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/RegAllocSimple.cpp diff -u llvm/lib/CodeGen/RegAllocSimple.cpp:1.75 llvm/lib/CodeGen/RegAllocSimple.cpp:1.76 --- llvm/lib/CodeGen/RegAllocSimple.cpp:1.75 Wed Nov 1 17:06:55 2006 +++ llvm/lib/CodeGen/RegAllocSimple.cpp Wed Nov 1 17:18:32 2006 @@ -200,7 +200,7 @@ if (physReg == 0) { if (op.isDef()) { int TiedOp = TM->getInstrInfo() - ->getTiedToSrcOperand(MI->getOpcode(), i); + ->findTiedToSrcOperand(MI->getOpcode(), i); if (TiedOp == -1) { physReg = getFreeReg(virtualReg); } else { Index: llvm/lib/CodeGen/VirtRegMap.cpp diff -u llvm/lib/CodeGen/VirtRegMap.cpp:1.77 llvm/lib/CodeGen/VirtRegMap.cpp:1.78 --- llvm/lib/CodeGen/VirtRegMap.cpp:1.77 Wed Nov 1 17:06:55 2006 +++ llvm/lib/CodeGen/VirtRegMap.cpp Wed Nov 1 17:18:32 2006 @@ -821,7 +821,7 @@ // If this def is part of a two-address operand, make sure to execute // the store from the correct physical register. unsigned PhysReg; - int TiedOp = TII->getTiedToSrcOperand(MI.getOpcode(), i); + int TiedOp = TII->findTiedToSrcOperand(MI.getOpcode(), i); if (TiedOp != -1) PhysReg = MI.getOperand(TiedOp).getReg(); else From rspencer at reidspencer.com Wed Nov 1 18:41:29 2006 From: rspencer at reidspencer.com (Reid Spencer) Date: Wed, 01 Nov 2006 16:41:29 -0800 Subject: [llvm-commits] REM Patch In-Reply-To: References: <1162335671.11568.34.camel@bashful.x10sys.com> Message-ID: <1162428089.11568.155.camel@bashful.x10sys.com> On Wed, 2006-11-01 at 15:13 -0800, Chris Lattner wrote: > On Oct 31, 2006, at 3:01 PM, Reid Spencer wrote: > > > Chris, > > > > Here's the patch for conversion of Rem -> [USF]Rem instructions. > > Please > > review at your earliest convenience. This passes dejagnu and llvm-test > > suites. I've reviewed and modified this patch to make it as simple to > > review as possible. Fortunately its a lot simpler than DIV. > > Looks good. Some comments: LangRef says that rem can be applied to > vectors, but the asmparser rejects them, please update LangRef. Done. > > > Some comments about instcombine below, prefixed by ***. After making > these changes and testing them, please commit. > > -Chris > > > ***This xform (visitURem): > + if (Instruction *Op0I = dyn_cast(Op0)) { > + // X mul (C1 urem C2) --> 0 iff C1 urem C2 == 0 > + if (ConstantExpr::getURem(GetFactor(Op0I), RHS)->isNullValue()) > return ReplaceInstUsesWith(I, Constant::getNullValue > (I.getType())); > } > } > > *** is doing "(X mul C1) urem C2 --> 0 iff C1 urem C2 == 0" > please update the comment. Done. > > This xform also applies in the srem case, where the code is copied, > but the comment unmodified. Please move it to intcommon. Done. > if (Instruction *RHSI = dyn_cast(I.getOperand(1))) { > - // Turn A % (C << N), where C is 2^k, into A & ((C << N)-1) > [urem only]. > - if (I.getType()->isUnsigned() && > - RHSI->getOpcode() == Instruction::Shl && > - isa(RHSI->getOperand(0)) && > - RHSI->getOperand(0)->getType()->isUnsigned()) { > + // Turn A urem (2^C << N) -> A & ((C << N)-1) [urem only]. > + if (RHSI->getOpcode() == Instruction::Shl && > + isa(RHSI->getOperand(0))) { > > *** Please change the comment back, your change is not correct. You > can drop 'urem only'. Done. > > > + // If the top bits of both operands are zero (i.e. we can prove > they are > + // unsigned inputs), turn this into a urem. > + uint64_t Mask = 1ULL << (I.getType()->getPrimitiveSizeInBits()-1); > + if (MaskedValueIsZero(Op1, Mask) && MaskedValueIsZero(Op0, Mask)) { > + // X srem Y -> X urem Y, iff X and Y don't have sign bit set > + return BinaryOperator::createURem(Op0, Op1, I.getName());; > } > *** ";;" -> ";" Done. > > @@ -4564,41 +4608,24 @@ Instruction *InstCombiner::visitSetCondI > > // If the first operand is (add|sub|and|or|xor|rem) with a > constant, and > // the second operand is a constant, simplify a bit. > if (BinaryOperator *BO = dyn_cast(Op0)) { > switch (BO->getOpcode()) { > -#if 0 > + case Instruction::URem: > + break; > *** No need for this case stmt, just remove it. > Done. > case Instruction::SRem: > // If we have a signed (X % (2^c)) == 0, turn it into an > unsigned one. > if (CI->isNullValue() && isa(BO->getOperand > (1)) && > BO->hasOneUse()) { > int64_t V = cast(BO->getOperand(1))- > >getSExtValue(); > if (V > 1 && isPowerOf2_64(V)) { > unsigned L2 = Log2_64(V); > const Type *UTy = BO->getType()->getUnsignedVersion(); > Value *NewX = InsertNewInstBefore(new CastInst(BO- > >getOperand(0), > UTy, > "tmp"), I); > Constant *RHSCst = ConstantInt::get(UTy, 1ULL << L2); > - Value *NewRem =InsertNewInstBefore > (BinaryOperator::createRem(NewX, > + Value *NewRem =InsertNewInstBefore > (BinaryOperator::createURem(NewX, > RHSCst, BO- > >getName()), I); > return BinaryOperator::create(I.getOpcode(), NewRem, > Constant::getNullValue > (UTy)); > } > } > *** There is no need to insert the casts here. It should just > replace the srem with a urem in place, no need to change the sign of > the inputs. The old code needed the casts because the sign of the > operation was tied to the sign of the inputs. Right. Done. Reid. From sabre at nondot.org Wed Nov 1 19:39:25 2006 From: sabre at nondot.org (Chris Lattner) Date: Wed, 1 Nov 2006 19:39:25 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetLowering.h Message-ID: <200611020139.kA21dPeY013655@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetLowering.h updated: 1.83 -> 1.84 --- Log message: generalize this api --- Diffs of the changes: (+8 -2) TargetLowering.h | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) Index: llvm/include/llvm/Target/TargetLowering.h diff -u llvm/include/llvm/Target/TargetLowering.h:1.83 llvm/include/llvm/Target/TargetLowering.h:1.84 --- llvm/include/llvm/Target/TargetLowering.h:1.83 Tue Oct 31 13:40:43 2006 +++ llvm/include/llvm/Target/TargetLowering.h Wed Nov 1 19:39:10 2006 @@ -687,8 +687,14 @@ /// getRegForInlineAsmConstraint - Given a physical register constraint (e.g. /// {edx}), return the register number and the register class for the - /// register. This should only be used for C_Register constraints. On error, - /// this returns a register number of 0. + /// register. + /// + /// Given a register class constraint, like 'r', if this corresponds directly + /// to an LLVM register class, return a register of 0 and the register class + /// pointer. + /// + /// This should only be used for C_Register constraints. On error, + /// this returns a register number of 0 and a null register class pointer.. virtual std::pair getRegForInlineAsmConstraint(const std::string &Constraint, MVT::ValueType VT) const; From sabre at nondot.org Wed Nov 1 19:42:03 2006 From: sabre at nondot.org (Chris Lattner) Date: Wed, 1 Nov 2006 19:42:03 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200611020142.kA21g3Y4013748@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.312 -> 1.313 --- Log message: Allow the getRegForInlineAsmConstraint method to return a register class with no fixes physreg. Treat this as permission to use any register in the register class. When this happens and it is safe, allow the llvm register allcoator to allocate the register instead of doing it at isel time. This eliminates a ton of copies around common inline asms. For example: int test2(int Y, int X) { asm("foo %0, %1" : "=r"(X): "r"(X)); return X; } now compiles to: _test2: foo r3, r4 blr instead of: _test2: mr r2, r4 foo r2, r2 mr r3, r2 blr GCC produces: _test2: foo r4, r4 mr r3,r4 blr --- Diffs of the changes: (+32 -4) SelectionDAGISel.cpp | 36 ++++++++++++++++++++++++++++++++---- 1 files changed, 32 insertions(+), 4 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.312 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.313 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.312 Tue Oct 31 17:06:00 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Nov 1 19:41:49 2006 @@ -2231,6 +2231,8 @@ MVT::ValueType RegVT; MVT::ValueType ValueVT = VT; + // If this is a constraint for a specific physical register, like {r17}, + // assign it now. if (PhysReg.first) { if (VT == MVT::Other) ValueVT = *PhysReg.second->vt_begin(); @@ -2260,10 +2262,36 @@ return RegsForValue(Regs, RegVT, ValueVT); } - // This is a reference to a register class. Allocate NumRegs consecutive, - // available, registers from the class. - std::vector RegClassRegs = - TLI.getRegClassForInlineAsmConstraint(ConstrCode, VT); + // Otherwise, if this was a reference to an LLVM register class, create vregs + // for this reference. + std::vector RegClassRegs; + if (PhysReg.second) { + // If this is an early clobber or tied register, our regalloc doesn't know + // how to maintain the constraint. If it isn't, go ahead and create vreg + // and let the regalloc do the right thing. + if (!isOutReg || !isInReg) { + if (VT == MVT::Other) + ValueVT = *PhysReg.second->vt_begin(); + RegVT = *PhysReg.second->vt_begin(); + + // Create the appropriate number of virtual registers. + SSARegMap *RegMap = DAG.getMachineFunction().getSSARegMap(); + for (; NumRegs; --NumRegs) + Regs.push_back(RegMap->createVirtualRegister(PhysReg.second)); + + return RegsForValue(Regs, RegVT, ValueVT); + } + + // Otherwise, we can't allocate it. Let the code below figure out how to + // maintain these constraints. + RegClassRegs.assign(PhysReg.second->begin(), PhysReg.second->end()); + + } else { + // This is a reference to a register class that doesn't directly correspond + // to an LLVM register class. Allocate NumRegs consecutive, available, + // registers from the class. + RegClassRegs = TLI.getRegClassForInlineAsmConstraint(ConstrCode, VT); + } const MRegisterInfo *MRI = DAG.getTarget().getRegisterInfo(); MachineFunction &MF = *CurMBB->getParent(); From sabre at nondot.org Wed Nov 1 19:44:19 2006 From: sabre at nondot.org (Chris Lattner) Date: Wed, 1 Nov 2006 19:44:19 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelLowering.cpp PPCISelLowering.h Message-ID: <200611020144.kA21iJWi013829@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCISelLowering.cpp updated: 1.216 -> 1.217 PPCISelLowering.h updated: 1.53 -> 1.54 --- Log message: Implement the getRegForInlineAsmConstraint method for PPC. With recent sdisel changes, this eliminates a ton of copies around common inline asms. For example: int test2(int Y, int X) { asm("foo %0, %1" : "=r"(X): "r"(X)); return X; } now compiles to: _test2: foo r3, r4 blr instead of: _test2: mr r2, r4 foo r2, r2 mr r3, r2 blr GCC produces: _test2: foo r4, r4 mr r3,r4 blr --- Diffs of the changes: (+29 -56) PPCISelLowering.cpp | 75 +++++++++++++++------------------------------------- PPCISelLowering.h | 10 ++++-- 2 files changed, 29 insertions(+), 56 deletions(-) Index: llvm/lib/Target/PowerPC/PPCISelLowering.cpp diff -u llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.216 llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.217 --- llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.216 Tue Oct 31 13:40:43 2006 +++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp Wed Nov 1 19:44:04 2006 @@ -28,8 +28,8 @@ #include "llvm/Target/TargetOptions.h" using namespace llvm; -PPCTargetLowering::PPCTargetLowering(TargetMachine &TM) - : TargetLowering(TM) { +PPCTargetLowering::PPCTargetLowering(PPCTargetMachine &TM) + : TargetLowering(TM), PPCSubTarget(*TM.getSubtargetImpl()) { // Fold away setcc operations if possible. setSetCCIsExpensive(); @@ -2600,63 +2600,34 @@ return TargetLowering::getConstraintType(ConstraintLetter); } - -std::vector PPCTargetLowering:: -getRegClassForInlineAsmConstraint(const std::string &Constraint, - MVT::ValueType VT) const { +std::pair +PPCTargetLowering::getRegForInlineAsmConstraint(const std::string &Constraint, + MVT::ValueType VT) const { if (Constraint.size() == 1) { - switch (Constraint[0]) { // GCC RS6000 Constraint Letters - default: break; // Unknown constriant letter - case 'b': - return make_vector(/*no R0*/ PPC::R1 , PPC::R2 , PPC::R3 , - PPC::R4 , PPC::R5 , PPC::R6 , PPC::R7 , - PPC::R8 , PPC::R9 , PPC::R10, PPC::R11, - PPC::R12, PPC::R13, PPC::R14, PPC::R15, - PPC::R16, PPC::R17, PPC::R18, PPC::R19, - PPC::R20, PPC::R21, PPC::R22, PPC::R23, - PPC::R24, PPC::R25, PPC::R26, PPC::R27, - PPC::R28, PPC::R29, PPC::R30, PPC::R31, - 0); - case 'r': - return make_vector(PPC::R0 , PPC::R1 , PPC::R2 , PPC::R3 , - PPC::R4 , PPC::R5 , PPC::R6 , PPC::R7 , - PPC::R8 , PPC::R9 , PPC::R10, PPC::R11, - PPC::R12, PPC::R13, PPC::R14, PPC::R15, - PPC::R16, PPC::R17, PPC::R18, PPC::R19, - PPC::R20, PPC::R21, PPC::R22, PPC::R23, - PPC::R24, PPC::R25, PPC::R26, PPC::R27, - PPC::R28, PPC::R29, PPC::R30, PPC::R31, - 0); - case 'f': - return make_vector(PPC::F0 , PPC::F1 , PPC::F2 , PPC::F3 , - PPC::F4 , PPC::F5 , PPC::F6 , PPC::F7 , - PPC::F8 , PPC::F9 , PPC::F10, PPC::F11, - PPC::F12, PPC::F13, PPC::F14, PPC::F15, - PPC::F16, PPC::F17, PPC::F18, PPC::F19, - PPC::F20, PPC::F21, PPC::F22, PPC::F23, - PPC::F24, PPC::F25, PPC::F26, PPC::F27, - PPC::F28, PPC::F29, PPC::F30, PPC::F31, - 0); + // GCC RS6000 Constraint Letters + switch (Constraint[0]) { + case 'b': // R1-R31 + case 'r': // R0-R31 + if (VT == MVT::i64 && PPCSubTarget.isPPC64()) + return std::make_pair(0U, PPC::G8RCRegisterClass); + return std::make_pair(0U, PPC::GPRCRegisterClass); + case 'f': + if (VT == MVT::f32) + return std::make_pair(0U, PPC::F4RCRegisterClass); + else if (VT == MVT::f64) + return std::make_pair(0U, PPC::F8RCRegisterClass); + break; case 'v': - return make_vector(PPC::V0 , PPC::V1 , PPC::V2 , PPC::V3 , - PPC::V4 , PPC::V5 , PPC::V6 , PPC::V7 , - PPC::V8 , PPC::V9 , PPC::V10, PPC::V11, - PPC::V12, PPC::V13, PPC::V14, PPC::V15, - PPC::V16, PPC::V17, PPC::V18, PPC::V19, - PPC::V20, PPC::V21, PPC::V22, PPC::V23, - PPC::V24, PPC::V25, PPC::V26, PPC::V27, - PPC::V28, PPC::V29, PPC::V30, PPC::V31, - 0); - case 'y': - return make_vector(PPC::CR0, PPC::CR1, PPC::CR2, PPC::CR3, - PPC::CR4, PPC::CR5, PPC::CR6, PPC::CR7, - 0); + return std::make_pair(0U, PPC::VRRCRegisterClass); + case 'y': // crrc + return std::make_pair(0U, PPC::CRRCRegisterClass); } } - return std::vector(); + return TargetLowering::getRegForInlineAsmConstraint(Constraint, VT); } + // isOperandValidForConstraint SDOperand PPCTargetLowering:: isOperandValidForConstraint(SDOperand Op, char Letter, SelectionDAG &DAG) { Index: llvm/lib/Target/PowerPC/PPCISelLowering.h diff -u llvm/lib/Target/PowerPC/PPCISelLowering.h:1.53 llvm/lib/Target/PowerPC/PPCISelLowering.h:1.54 --- llvm/lib/Target/PowerPC/PPCISelLowering.h:1.53 Tue Oct 31 13:40:43 2006 +++ llvm/lib/Target/PowerPC/PPCISelLowering.h Wed Nov 1 19:44:04 2006 @@ -18,6 +18,7 @@ #include "llvm/Target/TargetLowering.h" #include "llvm/CodeGen/SelectionDAG.h" #include "PPC.h" +#include "PPCSubtarget.h" namespace llvm { namespace PPCISD { @@ -168,8 +169,9 @@ class PPCTargetLowering : public TargetLowering { int VarArgsFrameIndex; // FrameIndex for start of varargs area. int ReturnAddrIndex; // FrameIndex for return slot. + const PPCSubtarget &PPCSubTarget; public: - PPCTargetLowering(TargetMachine &TM); + PPCTargetLowering(PPCTargetMachine &TM); /// getTargetNodeName() - This method returns the name of a target specific /// DAG node. @@ -191,9 +193,9 @@ MachineBasicBlock *MBB); ConstraintType getConstraintType(char ConstraintLetter) const; - std::vector - getRegClassForInlineAsmConstraint(const std::string &Constraint, - MVT::ValueType VT) const; + std::pair + getRegForInlineAsmConstraint(const std::string &Constraint, + MVT::ValueType VT) const; SDOperand isOperandValidForConstraint(SDOperand Op, char ConstraintLetter, SelectionDAG &DAG); From sabre at nondot.org Wed Nov 1 19:45:42 2006 From: sabre at nondot.org (Chris Lattner) Date: Wed, 1 Nov 2006 19:45:42 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/PowerPC/inlineasm-copy.ll Message-ID: <200611020145.kA21jg6K013899@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/PowerPC: inlineasm-copy.ll added (r1.1) --- Log message: new testcase --- Diffs of the changes: (+14 -0) inlineasm-copy.ll | 14 ++++++++++++++ 1 files changed, 14 insertions(+) Index: llvm/test/Regression/CodeGen/PowerPC/inlineasm-copy.ll diff -c /dev/null llvm/test/Regression/CodeGen/PowerPC/inlineasm-copy.ll:1.1 *** /dev/null Wed Nov 1 19:45:38 2006 --- llvm/test/Regression/CodeGen/PowerPC/inlineasm-copy.ll Wed Nov 1 19:45:28 2006 *************** *** 0 **** --- 1,14 ---- + ; RUN: llvm-as < %s | llc -march=ppc32 && + ; RUN: llvm-as < %s | llc -march=ppc32 | not grep mr + + int %test(int %Y, int %X) { + entry: + %tmp = tail call int asm "foo $0", "=r"( ) ; [#uses=1] + ret int %tmp + } + + int %test2(int %Y, int %X) { + entry: + %tmp1 = tail call int asm "foo $0, $1", "=r,r"( int %X ) ; [#uses=1] + ret int %tmp1 + } From reid at x10sys.com Wed Nov 1 19:54:28 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 1 Nov 2006 19:54:28 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Support/PatternMatch.h Message-ID: <200611020154.kA21sSY5014149@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Support: PatternMatch.h updated: 1.10 -> 1.11 --- Log message: For PR950: http://llvm.org/PR950 : Replace the REM instruction with UREM, SREM and FREM. --- Diffs of the changes: (+14 -2) PatternMatch.h | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) Index: llvm/include/llvm/Support/PatternMatch.h diff -u llvm/include/llvm/Support/PatternMatch.h:1.10 llvm/include/llvm/Support/PatternMatch.h:1.11 --- llvm/include/llvm/Support/PatternMatch.h:1.10 Thu Oct 26 01:15:43 2006 +++ llvm/include/llvm/Support/PatternMatch.h Wed Nov 1 19:53:58 2006 @@ -130,9 +130,21 @@ } template -inline BinaryOp_match m_Rem(const LHS &L, +inline BinaryOp_match m_URem(const LHS &L, + const RHS &R) { + return BinaryOp_match(L, R); +} + +template +inline BinaryOp_match m_SRem(const LHS &L, + const RHS &R) { + return BinaryOp_match(L, R); +} + +template +inline BinaryOp_match m_FRem(const LHS &L, const RHS &R) { - return BinaryOp_match(L, R); + return BinaryOp_match(L, R); } template From reid at x10sys.com Wed Nov 1 19:54:28 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 1 Nov 2006 19:54:28 -0600 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp Message-ID: <200611020154.kA21sS8V014152@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/Interpreter: Execution.cpp updated: 1.143 -> 1.144 --- Log message: For PR950: http://llvm.org/PR950 : Replace the REM instruction with UREM, SREM and FREM. --- Diffs of the changes: (+50 -12) Execution.cpp | 62 ++++++++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 50 insertions(+), 12 deletions(-) Index: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp diff -u llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.143 llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.144 --- llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.143 Tue Oct 31 21:45:43 2006 +++ llvm/lib/ExecutionEngine/Interpreter/Execution.cpp Wed Nov 1 19:53:58 2006 @@ -48,6 +48,12 @@ const Type *Ty); static GenericValue executeFDivInst(GenericValue Src1, GenericValue Src2, const Type *Ty); +static GenericValue executeURemInst(GenericValue Src1, GenericValue Src2, + const Type *Ty); +static GenericValue executeSRemInst(GenericValue Src1, GenericValue Src2, + const Type *Ty); +static GenericValue executeFRemInst(GenericValue Src1, GenericValue Src2, + const Type *Ty); static GenericValue executeAndInst(GenericValue Src1, GenericValue Src2, const Type *Ty); static GenericValue executeOrInst(GenericValue Src1, GenericValue Src2, @@ -105,10 +111,18 @@ return executeFDivInst(getOperandValue(CE->getOperand(0), SF), getOperandValue(CE->getOperand(1), SF), CE->getOperand(0)->getType()); - case Instruction::Rem: - return executeRemInst(getOperandValue(CE->getOperand(0), SF), + case Instruction::URem: + return executeURemInst(getOperandValue(CE->getOperand(0), SF), getOperandValue(CE->getOperand(1), SF), CE->getOperand(0)->getType()); + case Instruction::SRem: + return executeSRemInst(getOperandValue(CE->getOperand(0), SF), + getOperandValue(CE->getOperand(1), SF), + CE->getOperand(0)->getType()); + case Instruction::FRem: + return executeFRemInst(getOperandValue(CE->getOperand(0), SF), + getOperandValue(CE->getOperand(1), SF), + CE->getOperand(0)->getType()); case Instruction::And: return executeAndInst(getOperandValue(CE->getOperand(0), SF), getOperandValue(CE->getOperand(1), SF), @@ -300,18 +314,40 @@ return Dest; } -static GenericValue executeRemInst(GenericValue Src1, GenericValue Src2, +static GenericValue executeURemInst(GenericValue Src1, GenericValue Src2, + const Type *Ty) { + GenericValue Dest; + switch (Ty->getTypeID()) { + IMPLEMENT_SIGNLESS_BINOP(%, UByte, SByte); + IMPLEMENT_SIGNLESS_BINOP(%, UShort, Short); + IMPLEMENT_SIGNLESS_BINOP(%, UInt, Int); + IMPLEMENT_SIGNLESS_BINOP(%, ULong, Long); + default: + std::cout << "Unhandled type for URem instruction: " << *Ty << "\n"; + abort(); + } + return Dest; +} + +static GenericValue executeSRemInst(GenericValue Src1, GenericValue Src2, + const Type *Ty) { + GenericValue Dest; + switch (Ty->getTypeID()) { + IMPLEMENT_SIGNLESS_BINOP(%, SByte, UByte); + IMPLEMENT_SIGNLESS_BINOP(%, Short, UShort); + IMPLEMENT_SIGNLESS_BINOP(%, Int, UInt); + IMPLEMENT_SIGNLESS_BINOP(%, Long, ULong); + default: + std::cout << "Unhandled type for Rem instruction: " << *Ty << "\n"; + abort(); + } + return Dest; +} + +static GenericValue executeFRemInst(GenericValue Src1, GenericValue Src2, const Type *Ty) { GenericValue Dest; switch (Ty->getTypeID()) { - IMPLEMENT_BINARY_OPERATOR(%, UByte); - IMPLEMENT_BINARY_OPERATOR(%, SByte); - IMPLEMENT_BINARY_OPERATOR(%, UShort); - IMPLEMENT_BINARY_OPERATOR(%, Short); - IMPLEMENT_BINARY_OPERATOR(%, UInt); - IMPLEMENT_BINARY_OPERATOR(%, Int); - IMPLEMENT_BINARY_OPERATOR(%, ULong); - IMPLEMENT_BINARY_OPERATOR(%, Long); case Type::FloatTyID: Dest.FloatVal = fmod(Src1.FloatVal, Src2.FloatVal); break; @@ -544,7 +580,9 @@ case Instruction::UDiv: R = executeUDivInst (Src1, Src2, Ty); break; case Instruction::SDiv: R = executeSDivInst (Src1, Src2, Ty); break; case Instruction::FDiv: R = executeFDivInst (Src1, Src2, Ty); break; - case Instruction::Rem: R = executeRemInst (Src1, Src2, Ty); break; + case Instruction::URem: R = executeURemInst (Src1, Src2, Ty); break; + case Instruction::SRem: R = executeSRemInst (Src1, Src2, Ty); break; + case Instruction::FRem: R = executeFRemInst (Src1, Src2, Ty); break; case Instruction::And: R = executeAndInst (Src1, Src2, Ty); break; case Instruction::Or: R = executeOrInst (Src1, Src2, Ty); break; case Instruction::Xor: R = executeXorInst (Src1, Src2, Ty); break; From reid at x10sys.com Wed Nov 1 19:54:31 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 1 Nov 2006 19:54:31 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200611020154.kA21sVMU014160@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.313 -> 1.314 --- Log message: For PR950: http://llvm.org/PR950 : Replace the REM instruction with UREM, SREM and FREM. --- Diffs of the changes: (+4 -8) SelectionDAGISel.cpp | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.313 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.314 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.313 Wed Nov 1 19:41:49 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Nov 1 19:53:58 2006 @@ -528,16 +528,12 @@ else visitIntBinary(I, ISD::MUL, ISD::VMUL); } + void visitURem(User &I) { visitIntBinary(I, ISD::UREM, 0); } + void visitSRem(User &I) { visitIntBinary(I, ISD::SREM, 0); } + void visitFRem(User &I) { visitFPBinary (I, ISD::FREM, 0); } void visitUDiv(User &I) { visitIntBinary(I, ISD::UDIV, ISD::VUDIV); } void visitSDiv(User &I) { visitIntBinary(I, ISD::SDIV, ISD::VSDIV); } - void visitFDiv(User &I) { visitFPBinary(I, ISD::FDIV, ISD::VSDIV); } - void visitRem(User &I) { - const Type *Ty = I.getType(); - if (Ty->isFloatingPoint()) - visitFPBinary(I, ISD::FREM, 0); - else - visitIntBinary(I, Ty->isSigned() ? ISD::SREM : ISD::UREM, 0); - } + void visitFDiv(User &I) { visitFPBinary (I, ISD::FDIV, ISD::VSDIV); } void visitAnd(User &I) { visitIntBinary(I, ISD::AND, ISD::VAND); } void visitOr (User &I) { visitIntBinary(I, ISD::OR, ISD::VOR); } void visitXor(User &I) { visitIntBinary(I, ISD::XOR, ISD::VXOR); } From reid at x10sys.com Wed Nov 1 19:54:34 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 1 Nov 2006 19:54:34 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp Message-ID: <200611020154.kA21sYrg014199@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/CBackend: Writer.cpp updated: 1.276 -> 1.277 --- Log message: For PR950: http://llvm.org/PR950 : Replace the REM instruction with UREM, SREM and FREM. --- Diffs of the changes: (+28 -10) Writer.cpp | 38 ++++++++++++++++++++++++++++---------- 1 files changed, 28 insertions(+), 10 deletions(-) Index: llvm/lib/Target/CBackend/Writer.cpp diff -u llvm/lib/Target/CBackend/Writer.cpp:1.276 llvm/lib/Target/CBackend/Writer.cpp:1.277 --- llvm/lib/Target/CBackend/Writer.cpp:1.276 Thu Oct 26 01:17:40 2006 +++ llvm/lib/Target/CBackend/Writer.cpp Wed Nov 1 19:53:58 2006 @@ -593,7 +593,9 @@ case Instruction::SDiv: case Instruction::UDiv: case Instruction::FDiv: - case Instruction::Rem: + case Instruction::URem: + case Instruction::SRem: + case Instruction::FRem: case Instruction::And: case Instruction::Or: case Instruction::Xor: @@ -613,10 +615,12 @@ case Instruction::Add: Out << " + "; break; case Instruction::Sub: Out << " - "; break; case Instruction::Mul: Out << " * "; break; + case Instruction::URem: + case Instruction::SRem: + case Instruction::FRem: Out << " % "; break; case Instruction::UDiv: case Instruction::SDiv: case Instruction::FDiv: Out << " / "; break; - case Instruction::Rem: Out << " % "; break; case Instruction::And: Out << " & "; break; case Instruction::Or: Out << " | "; break; case Instruction::Xor: Out << " ^ "; break; @@ -825,8 +829,12 @@ bool Result = false; const Type* Ty = CE->getOperand(0)->getType(); switch (CE->getOpcode()) { - case Instruction::UDiv: Result = Ty->isSigned(); break; - case Instruction::SDiv: Result = Ty->isUnsigned(); break; + case Instruction::UDiv: + case Instruction::URem: + Result = Ty->isSigned(); break; + case Instruction::SDiv: + case Instruction::SRem: + Result = Ty->isUnsigned(); break; default: break; } if (Result) { @@ -856,13 +864,16 @@ // for most instructions, it doesn't matter break; case Instruction::UDiv: - // For UDiv to have unsigned operands + case Instruction::URem: + // For UDiv/URem get correct type if (OpTy->isSigned()) { OpTy = OpTy->getUnsignedVersion(); shouldCast = true; } break; case Instruction::SDiv: + case Instruction::SRem: + // For SDiv/SRem get correct type if (OpTy->isUnsigned()) { OpTy = OpTy->getSignedVersion(); shouldCast = true; @@ -919,8 +930,12 @@ bool Result = false; const Type* Ty = I.getOperand(0)->getType(); switch (I.getOpcode()) { - case Instruction::UDiv: Result = Ty->isSigned(); break; - case Instruction::SDiv: Result = Ty->isUnsigned(); break; + case Instruction::UDiv: + case Instruction::URem: + Result = Ty->isSigned(); break; + case Instruction::SDiv: + case Instruction::SRem: + Result = Ty->isUnsigned(); break; default: break; } if (Result) { @@ -950,6 +965,7 @@ // for most instructions, it doesn't matter break; case Instruction::UDiv: + case Instruction::URem: // For UDiv to have unsigned operands if (OpTy->isSigned()) { OpTy = OpTy->getUnsignedVersion(); @@ -957,6 +973,7 @@ } break; case Instruction::SDiv: + case Instruction::SRem: if (OpTy->isUnsigned()) { OpTy = OpTy->getSignedVersion(); shouldCast = true; @@ -1774,8 +1791,7 @@ Out << "-("; writeOperand(BinaryOperator::getNegArgument(cast(&I))); Out << ")"; - } else if (I.getOpcode() == Instruction::Rem && - I.getType()->isFloatingPoint()) { + } else if (I.getOpcode() == Instruction::FRem) { // Output a call to fmod/fmodf instead of emitting a%b if (I.getType() == Type::FloatTy) Out << "fmodf("; @@ -1800,10 +1816,12 @@ case Instruction::Add: Out << " + "; break; case Instruction::Sub: Out << " - "; break; case Instruction::Mul: Out << '*'; break; + case Instruction::URem: + case Instruction::SRem: + case Instruction::FRem: Out << '%'; break; case Instruction::UDiv: case Instruction::SDiv: case Instruction::FDiv: Out << '/'; break; - case Instruction::Rem: Out << '%'; break; case Instruction::And: Out << " & "; break; case Instruction::Or: Out << " | "; break; case Instruction::Xor: Out << " ^ "; break; From reid at x10sys.com Wed Nov 1 19:54:31 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 1 Nov 2006 19:54:31 -0600 Subject: [llvm-commits] CVS: llvm/lib/VMCore/ConstantFolding.cpp Constants.cpp Instruction.cpp Instructions.cpp Message-ID: <200611020154.kA21sVgb014181@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: ConstantFolding.cpp updated: 1.95 -> 1.96 Constants.cpp updated: 1.168 -> 1.169 Instruction.cpp updated: 1.55 -> 1.56 Instructions.cpp updated: 1.44 -> 1.45 --- Log message: For PR950: http://llvm.org/PR950 : Replace the REM instruction with UREM, SREM and FREM. --- Diffs of the changes: (+108 -47) ConstantFolding.cpp | 92 ++++++++++++++++++++++++++++++++-------------------- Constants.cpp | 38 ++++++++++++++++----- Instruction.cpp | 8 +++- Instructions.cpp | 17 ++++++++- 4 files changed, 108 insertions(+), 47 deletions(-) Index: llvm/lib/VMCore/ConstantFolding.cpp diff -u llvm/lib/VMCore/ConstantFolding.cpp:1.95 llvm/lib/VMCore/ConstantFolding.cpp:1.96 --- llvm/lib/VMCore/ConstantFolding.cpp:1.95 Thu Oct 26 01:15:43 2006 +++ llvm/lib/VMCore/ConstantFolding.cpp Wed Nov 1 19:53:58 2006 @@ -40,10 +40,12 @@ virtual Constant *add(const Constant *V1, const Constant *V2) const = 0; virtual Constant *sub(const Constant *V1, const Constant *V2) const = 0; virtual Constant *mul(const Constant *V1, const Constant *V2) const = 0; + virtual Constant *urem(const Constant *V1, const Constant *V2) const = 0; + virtual Constant *srem(const Constant *V1, const Constant *V2) const = 0; + virtual Constant *frem(const Constant *V1, const Constant *V2) const = 0; virtual Constant *udiv(const Constant *V1, const Constant *V2) const = 0; virtual Constant *sdiv(const Constant *V1, const Constant *V2) const = 0; virtual Constant *fdiv(const Constant *V1, const Constant *V2) const = 0; - virtual Constant *rem(const Constant *V1, const Constant *V2) const = 0; virtual Constant *op_and(const Constant *V1, const Constant *V2) const = 0; virtual Constant *op_or (const Constant *V1, const Constant *V2) const = 0; virtual Constant *op_xor(const Constant *V1, const Constant *V2) const = 0; @@ -117,8 +119,14 @@ virtual Constant *fdiv(const Constant *V1, const Constant *V2) const { return SubClassName::FDiv((const ArgType *)V1, (const ArgType *)V2); } - virtual Constant *rem(const Constant *V1, const Constant *V2) const { - return SubClassName::Rem((const ArgType *)V1, (const ArgType *)V2); + virtual Constant *urem(const Constant *V1, const Constant *V2) const { + return SubClassName::URem((const ArgType *)V1, (const ArgType *)V2); + } + virtual Constant *srem(const Constant *V1, const Constant *V2) const { + return SubClassName::SRem((const ArgType *)V1, (const ArgType *)V2); + } + virtual Constant *frem(const Constant *V1, const Constant *V2) const { + return SubClassName::FRem((const ArgType *)V1, (const ArgType *)V2); } virtual Constant *op_and(const Constant *V1, const Constant *V2) const { return SubClassName::And((const ArgType *)V1, (const ArgType *)V2); @@ -192,7 +200,9 @@ static Constant *SDiv(const ArgType *V1, const ArgType *V2) { return 0; } static Constant *UDiv(const ArgType *V1, const ArgType *V2) { return 0; } static Constant *FDiv(const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *Rem (const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *URem(const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *SRem(const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *FRem(const ArgType *V1, const ArgType *V2) { return 0; } static Constant *And (const ArgType *V1, const ArgType *V2) { return 0; } static Constant *Or (const ArgType *V1, const ArgType *V2) { return 0; } static Constant *Xor (const ArgType *V1, const ArgType *V2) { return 0; } @@ -392,8 +402,14 @@ static Constant *FDiv(const ConstantPacked *V1, const ConstantPacked *V2) { return EvalVectorOp(V1, V2, ConstantExpr::getFDiv); } - static Constant *Rem(const ConstantPacked *V1, const ConstantPacked *V2) { - return EvalVectorOp(V1, V2, ConstantExpr::getRem); + static Constant *URem(const ConstantPacked *V1, const ConstantPacked *V2) { + return EvalVectorOp(V1, V2, ConstantExpr::getURem); + } + static Constant *SRem(const ConstantPacked *V1, const ConstantPacked *V2) { + return EvalVectorOp(V1, V2, ConstantExpr::getSRem); + } + static Constant *FRem(const ConstantPacked *V1, const ConstantPacked *V2) { + return EvalVectorOp(V1, V2, ConstantExpr::getFRem); } static Constant *And(const ConstantPacked *V1, const ConstantPacked *V2) { return EvalVectorOp(V1, V2, ConstantExpr::getAnd); @@ -510,30 +526,36 @@ #undef DEF_CAST static Constant *UDiv(const ConstantInt *V1, const ConstantInt *V2) { - if (V2->isNullValue()) + if (V2->isNullValue()) // X / 0 return 0; BuiltinType R = (BuiltinType)(V1->getZExtValue() / V2->getZExtValue()); return ConstantInt::get(*Ty, R); } static Constant *SDiv(const ConstantInt *V1, const ConstantInt *V2) { - if (V2->isNullValue()) + if (V2->isNullValue()) // X / 0 return 0; if (V2->isAllOnesValue() && // MIN_INT / -1 (BuiltinType)V1->getSExtValue() == -(BuiltinType)V1->getSExtValue()) return 0; - BuiltinType R = - (BuiltinType)(V1->getSExtValue() / V2->getSExtValue()); + BuiltinType R = (BuiltinType)(V1->getSExtValue() / V2->getSExtValue()); return ConstantInt::get(*Ty, R); } - static Constant *Rem(const ConstantInt *V1, const ConstantInt *V2) { + static Constant *URem(const ConstantInt *V1, + const ConstantInt *V2) { if (V2->isNullValue()) return 0; // X / 0 - if (V2->isAllOnesValue() && // MIN_INT / -1 - (BuiltinType)V1->getZExtValue() == -(BuiltinType)V1->getZExtValue()) + BuiltinType R = (BuiltinType)(V1->getZExtValue() % V2->getZExtValue()); + return ConstantInt::get(*Ty, R); + } + + static Constant *SRem(const ConstantInt *V1, + const ConstantInt *V2) { + if (V2->isNullValue()) return 0; // X % 0 + if (V2->isAllOnesValue() && // MIN_INT % -1 + (BuiltinType)V1->getSExtValue() == -(BuiltinType)V1->getSExtValue()) return 0; - BuiltinType R = - (BuiltinType)V1->getZExtValue() % (BuiltinType)V2->getZExtValue(); + BuiltinType R = (BuiltinType)(V1->getSExtValue() % V2->getSExtValue()); return ConstantInt::get(*Ty, R); } @@ -632,7 +654,7 @@ DEF_CAST(Double, ConstantFP , double) #undef DEF_CAST - static Constant *Rem(const ConstantFP *V1, const ConstantFP *V2) { + static Constant *FRem(const ConstantFP *V1, const ConstantFP *V2) { if (V2->isNullValue()) return 0; BuiltinType Result = std::fmod((BuiltinType)V1->getValue(), (BuiltinType)V2->getValue()); @@ -1250,7 +1272,9 @@ case Instruction::UDiv: C = ConstRules::get(V1, V2).udiv(V1, V2); break; case Instruction::SDiv: C = ConstRules::get(V1, V2).sdiv(V1, V2); break; case Instruction::FDiv: C = ConstRules::get(V1, V2).fdiv(V1, V2); break; - case Instruction::Rem: C = ConstRules::get(V1, V2).rem(V1, V2); break; + case Instruction::URem: C = ConstRules::get(V1, V2).urem(V1, V2); break; + case Instruction::SRem: C = ConstRules::get(V1, V2).srem(V1, V2); break; + case Instruction::FRem: C = ConstRules::get(V1, V2).frem(V1, V2); break; case Instruction::And: C = ConstRules::get(V1, V2).op_and(V1, V2); break; case Instruction::Or: C = ConstRules::get(V1, V2).op_or (V1, V2); break; case Instruction::Xor: C = ConstRules::get(V1, V2).op_xor(V1, V2); break; @@ -1335,25 +1359,26 @@ case Instruction::UDiv: case Instruction::SDiv: case Instruction::FDiv: - case Instruction::Rem: - if (!isa(V2)) // undef/X -> 0 + case Instruction::URem: + case Instruction::SRem: + case Instruction::FRem: + if (!isa(V2)) // undef / X -> 0 return Constant::getNullValue(V1->getType()); - return const_cast(V2); // X/undef -> undef - case Instruction::Or: // X|undef -> -1 + return const_cast(V2); // X / undef -> undef + case Instruction::Or: // X | undef -> -1 return ConstantInt::getAllOnesValue(V1->getType()); case Instruction::Shr: - if (!isa(V2)) { + if (!isa(V2)) { if (V1->getType()->isSigned()) - return const_cast(V1); // undef >>s X -> undef + return const_cast(V1); // undef >>s X -> undef // undef >>u X -> 0 } else if (isa(V1)) { - return const_cast(V1); // undef >> undef -> undef + return const_cast(V1); // undef >> undef -> undef } else { if (V1->getType()->isSigned()) - return const_cast(V1); // X >>s undef -> X - // X >>u undef -> 0 + return const_cast(V1); // X >>s undef -> X } - return Constant::getNullValue(V1->getType()); + return Constant::getNullValue(V1->getType());// X >>u undef -> 0 case Instruction::Shl: // undef << X -> 0 X << undef -> 0 @@ -1366,10 +1391,6 @@ // There are many possible foldings we could do here. We should probably // at least fold add of a pointer with an integer into the appropriate // getelementptr. This will improve alias analysis a bit. - - - - } else { // Just implement a couple of simple identities. switch (Opcode) { @@ -1391,10 +1412,11 @@ if (CI->getZExtValue() == 1) return const_cast(V1); // X / 1 == X break; - case Instruction::Rem: + case Instruction::URem: + case Instruction::SRem: if (const ConstantInt *CI = dyn_cast(V2)) if (CI->getZExtValue() == 1) - return Constant::getNullValue(CI->getType()); // X % 1 == 0 + return Constant::getNullValue(CI->getType()); // X % 1 == 0 break; case Instruction::And: if (cast(V2)->isAllOnesValue()) @@ -1450,7 +1472,9 @@ case Instruction::SDiv: case Instruction::UDiv: case Instruction::FDiv: - case Instruction::Rem: + case Instruction::URem: + case Instruction::SRem: + case Instruction::FRem: default: // These instructions cannot be flopped around. break; } Index: llvm/lib/VMCore/Constants.cpp diff -u llvm/lib/VMCore/Constants.cpp:1.168 llvm/lib/VMCore/Constants.cpp:1.169 --- llvm/lib/VMCore/Constants.cpp:1.168 Thu Oct 26 16:48:03 2006 +++ llvm/lib/VMCore/Constants.cpp Wed Nov 1 19:53:58 2006 @@ -78,7 +78,9 @@ case Instruction::UDiv: case Instruction::SDiv: case Instruction::FDiv: - case Instruction::Rem: + case Instruction::URem: + case Instruction::SRem: + case Instruction::FRem: // Div and rem can trap if the RHS is not known to be non-zero. if (!isa(getOperand(1)) || getOperand(1)->isNullValue()) return true; @@ -457,8 +459,14 @@ Constant *ConstantExpr::getFDiv(Constant *C1, Constant *C2) { return get(Instruction::FDiv, C1, C2); } -Constant *ConstantExpr::getRem(Constant *C1, Constant *C2) { - return get(Instruction::Rem, C1, C2); +Constant *ConstantExpr::getURem(Constant *C1, Constant *C2) { + return get(Instruction::URem, C1, C2); +} +Constant *ConstantExpr::getSRem(Constant *C1, Constant *C2) { + return get(Instruction::SRem, C1, C2); +} +Constant *ConstantExpr::getFRem(Constant *C1, Constant *C2) { + return get(Instruction::FRem, C1, C2); } Constant *ConstantExpr::getAnd(Constant *C1, Constant *C2) { return get(Instruction::And, C1, C2); @@ -1362,7 +1370,7 @@ break; default: assert(OldC->getOpcode() >= Instruction::BinaryOpsBegin && - OldC->getOpcode() < Instruction::BinaryOpsEnd); + OldC->getOpcode() < Instruction::BinaryOpsEnd); New = ConstantExpr::getTy(NewTy, OldC->getOpcode(), OldC->getOperand(0), OldC->getOperand(1)); break; @@ -1448,8 +1456,8 @@ if (Opcode == Instruction::Shl || Opcode == Instruction::Shr) return getShiftTy(ReqTy, Opcode, C1, C2); // Check the operands for consistency first - assert((Opcode >= Instruction::BinaryOpsBegin && - Opcode < Instruction::BinaryOpsEnd) && + assert(Opcode >= Instruction::BinaryOpsBegin && + Opcode < Instruction::BinaryOpsEnd && "Invalid opcode in binary constant expression"); assert(C1->getType() == C2->getType() && "Operand types in binary constant expression should match"); @@ -1467,15 +1475,14 @@ Constant *ConstantExpr::get(unsigned Opcode, Constant *C1, Constant *C2) { #ifndef NDEBUG switch (Opcode) { - case Instruction::Add: case Instruction::Sub: + case Instruction::Add: + case Instruction::Sub: case Instruction::Mul: - case Instruction::Rem: assert(C1->getType() == C2->getType() && "Op types should be identical!"); assert((C1->getType()->isInteger() || C1->getType()->isFloatingPoint() || isa(C1->getType())) && "Tried to create an arithmetic operation on a non-arithmetic type!"); break; - case Instruction::UDiv: case Instruction::SDiv: assert(C1->getType() == C2->getType() && "Op types should be identical!"); @@ -1489,6 +1496,19 @@ && cast(C1->getType())->getElementType()->isFloatingPoint())) && "Tried to create an arithmetic operation on a non-arithmetic type!"); break; + case Instruction::URem: + case Instruction::SRem: + assert(C1->getType() == C2->getType() && "Op types should be identical!"); + assert((C1->getType()->isInteger() || (isa(C1->getType()) && + cast(C1->getType())->getElementType()->isInteger())) && + "Tried to create an arithmetic operation on a non-arithmetic type!"); + break; + case Instruction::FRem: + assert(C1->getType() == C2->getType() && "Op types should be identical!"); + assert((C1->getType()->isFloatingPoint() || (isa(C1->getType()) + && cast(C1->getType())->getElementType()->isFloatingPoint())) + && "Tried to create an arithmetic operation on a non-arithmetic type!"); + break; case Instruction::And: case Instruction::Or: case Instruction::Xor: Index: llvm/lib/VMCore/Instruction.cpp diff -u llvm/lib/VMCore/Instruction.cpp:1.55 llvm/lib/VMCore/Instruction.cpp:1.56 --- llvm/lib/VMCore/Instruction.cpp:1.55 Thu Oct 26 13:27:26 2006 +++ llvm/lib/VMCore/Instruction.cpp Wed Nov 1 19:53:58 2006 @@ -97,7 +97,9 @@ case UDiv: return "udiv"; case SDiv: return "sdiv"; case FDiv: return "fdiv"; - case Rem: return "rem"; + case URem: return "urem"; + case SRem: return "srem"; + case FRem: return "frem"; // Logical operators... case And: return "and"; @@ -227,7 +229,9 @@ case UDiv: case SDiv: case FDiv: - case Rem: + case URem: + case SRem: + case FRem: case Load: case Store: case Call: Index: llvm/lib/VMCore/Instructions.cpp diff -u llvm/lib/VMCore/Instructions.cpp:1.44 llvm/lib/VMCore/Instructions.cpp:1.45 --- llvm/lib/VMCore/Instructions.cpp:1.44 Thu Oct 26 01:15:43 2006 +++ llvm/lib/VMCore/Instructions.cpp Wed Nov 1 19:53:58 2006 @@ -1023,7 +1023,6 @@ switch (iType) { case Add: case Sub: case Mul: - case Rem: assert(getType() == LHS->getType() && "Arithmetic operation should return same type as operands!"); assert((getType()->isInteger() || getType()->isFloatingPoint() || @@ -1045,7 +1044,21 @@ cast(getType())->getElementType()->isFloatingPoint())) && "Incorrect operand type (not floating point) for FDIV"); break; - + case URem: + case SRem: + assert(getType() == LHS->getType() && + "Arithmetic operation should return same type as operands!"); + assert((getType()->isInteger() || (isa(getType()) && + cast(getType())->getElementType()->isInteger())) && + "Incorrect operand type (not integer) for S/UREM"); + break; + case FRem: + assert(getType() == LHS->getType() && + "Arithmetic operation should return same type as operands!"); + assert((getType()->isFloatingPoint() || (isa(getType()) && + cast(getType())->getElementType()->isFloatingPoint())) + && "Incorrect operand type (not floating point) for FREM"); + break; case And: case Or: case Xor: assert(getType() == LHS->getType() && From reid at x10sys.com Wed Nov 1 19:54:31 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 1 Nov 2006 19:54:31 -0600 Subject: [llvm-commits] CVS: llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp Message-ID: <200611020154.kA21sVki014170@zion.cs.uiuc.edu> Changes in directory llvm/projects/Stacker/lib/compiler: StackerCompiler.cpp updated: 1.20 -> 1.21 --- Log message: For PR950: http://llvm.org/PR950 : Replace the REM instruction with UREM, SREM and FREM. --- Diffs of the changes: (+1 -1) StackerCompiler.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp diff -u llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.20 llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.21 --- llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.20 Thu Oct 26 01:15:43 2006 +++ llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp Wed Nov 1 19:53:59 2006 @@ -1052,7 +1052,7 @@ LoadInst* op1 = cast(pop_integer(bb)); LoadInst* op2 = cast(pop_integer(bb)); BinaryOperator* divop = - BinaryOperator::create( Instruction::Rem, op1, op2); + BinaryOperator::create( Instruction::SRem, op1, op2); bb->getInstList().push_back( divop ); push_value( bb, divop ); break; From reid at x10sys.com Wed Nov 1 19:54:31 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 1 Nov 2006 19:54:31 -0600 Subject: [llvm-commits] CVS: llvm/docs/LangRef.html Message-ID: <200611020154.kA21sVbm014165@zion.cs.uiuc.edu> Changes in directory llvm/docs: LangRef.html updated: 1.159 -> 1.160 --- Log message: For PR950: http://llvm.org/PR950 : Replace the REM instruction with UREM, SREM and FREM. --- Diffs of the changes: (+57 -13) LangRef.html | 70 ++++++++++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 57 insertions(+), 13 deletions(-) Index: llvm/docs/LangRef.html diff -u llvm/docs/LangRef.html:1.159 llvm/docs/LangRef.html:1.160 --- llvm/docs/LangRef.html:1.159 Thu Oct 26 01:15:43 2006 +++ llvm/docs/LangRef.html Wed Nov 1 19:53:58 2006 @@ -80,7 +80,9 @@

  3. 'udiv' Instruction
  4. 'sdiv' Instruction
  5. 'fdiv' Instruction
  6. -
  7. 'rem' Instruction
  8. +
  9. 'urem' Instruction
  10. +
  11. 'srem' Instruction
  12. +
  13. 'frem' Instruction
  14. 'setcc' Instructions
@@ -1699,30 +1701,72 @@ -
'rem' + +
+
Syntax:
+
  <result> = urem <ty> <var1>, <var2>   ; yields {ty}:result
+
+
Overview:
+

The 'urem' instruction returns the remainder from the +unsigned division of its two arguments.

+
Arguments:
+

The two arguments to the 'urem' instruction must be +integer values. Both arguments must have identical +types.

+
Semantics:
+

This instruction returns the unsigned integer remainder of a division. +This instruction always performs an unsigned division to get the remainder, +regardless of whether the arguments are unsigned or not.

+
Example:
+
  <result> = urem uint 4, %var          ; yields {uint}:result = 4 % %var
+
+ +
+ +
Syntax:
-
  <result> = rem <ty> <var1>, <var2>   ; yields {ty}:result
+
  <result> = srem <ty> <var1>, <var2>   ; yields {ty}:result
 
Overview:
-

The 'rem' instruction returns the remainder from the -division of its two operands.

+

The 'srem' instruction returns the remainder from the +signed division of its two operands.

Arguments:
-

The two arguments to the 'rem' instruction must be either integer or floating point -values. -This instruction can also take packed versions of the values. -Both arguments must have identical types.

+

The two arguments to the 'srem' instruction must be +integer values. Both arguments must have identical +types.

Semantics:
-

This returns the remainder of a division (where the result +

This instruction returns the remainder of a division (where the result has the same sign as the divisor), not the modulus (where the result has the same sign as the dividend) of a value. For more information about the difference, see The Math Forum.

Example:
-
  <result> = rem int 4, %var          ; yields {int}:result = 4 % %var
+
  <result> = srem int 4, %var          ; yields {int}:result = 4 % %var
+
+ +
+ + +
+
Syntax:
+
  <result> = frem <ty> <var1>, <var2>   ; yields {ty}:result
+
+
Overview:
+

The 'frem' instruction returns the remainder from the +division of its two operands.

+
Arguments:
+

The two arguments to the 'frem' instruction must be +floating point values. Both arguments must have +identical types.

+
Semantics:
+

This instruction returns the remainder of a division.

+
Example:
+
  <result> = frem float 4.0, %var          ; yields {float}:result = 4.0 % %var
 
@@ -3956,7 +4000,7 @@ Chris Lattner
The LLVM Compiler Infrastructure
- Last modified: $Date: 2006/10/26 06:15:43 $ + Last modified: $Date: 2006/11/02 01:53:58 $ From reid at x10sys.com Wed Nov 1 19:54:34 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 1 Nov 2006 19:54:34 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp PredicateSimplifier.cpp Reassociate.cpp Message-ID: <200611020154.kA21sYtx014215@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.533 -> 1.534 PredicateSimplifier.cpp updated: 1.30 -> 1.31 Reassociate.cpp updated: 1.64 -> 1.65 --- Log message: For PR950: http://llvm.org/PR950 : Replace the REM instruction with UREM, SREM and FREM. --- Diffs of the changes: (+134 -119) InstructionCombining.cpp | 245 ++++++++++++++++++++++++----------------------- PredicateSimplifier.cpp | 4 Reassociate.cpp | 4 3 files changed, 134 insertions(+), 119 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.533 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.534 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.533 Wed Nov 1 01:43:41 2006 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Wed Nov 1 19:53:58 2006 @@ -131,12 +131,16 @@ Instruction *visitAdd(BinaryOperator &I); Instruction *visitSub(BinaryOperator &I); Instruction *visitMul(BinaryOperator &I); + Instruction *visitURem(BinaryOperator &I); + Instruction *visitSRem(BinaryOperator &I); + Instruction *visitFRem(BinaryOperator &I); + Instruction *commonRemTransforms(BinaryOperator &I); + Instruction *commonIRemTransforms(BinaryOperator &I); Instruction *commonDivTransforms(BinaryOperator &I); Instruction *commonIDivTransforms(BinaryOperator &I); Instruction *visitUDiv(BinaryOperator &I); Instruction *visitSDiv(BinaryOperator &I); Instruction *visitFDiv(BinaryOperator &I); - Instruction *visitRem(BinaryOperator &I); Instruction *visitAnd(BinaryOperator &I); Instruction *visitOr (BinaryOperator &I); Instruction *visitXor(BinaryOperator &I); @@ -2412,9 +2416,13 @@ return Result; } -Instruction *InstCombiner::visitRem(BinaryOperator &I) { +/// This function implements the transforms on rem instructions that work +/// regardless of the kind of rem instruction it is (urem, srem, or frem). It +/// is used by the visitors to those instructions. +/// @brief Transforms common to all three rem instructions +Instruction *InstCombiner::commonRemTransforms(BinaryOperator &I) { Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); - + // 0 % X == 0, we don't need to preserve faults! if (Constant *LHS = dyn_cast(Op0)) if (LHS->isNullValue()) @@ -2424,34 +2432,52 @@ return ReplaceInstUsesWith(I, Constant::getNullValue(I.getType())); if (isa(Op1)) return ReplaceInstUsesWith(I, Op1); // X % undef -> undef - - if (I.getType()->isSigned()) { - if (Value *RHSNeg = dyn_castNegVal(Op1)) - if (!isa(RHSNeg) || !RHSNeg->getType()->isSigned() || - cast(RHSNeg)->getSExtValue() > 0) { - // X % -Y -> X % Y - AddUsesToWorkList(I); - I.setOperand(1, RHSNeg); + + // Handle cases involving: rem X, (select Cond, Y, Z) + if (SelectInst *SI = dyn_cast(Op1)) { + // rem X, (Cond ? 0 : Y) -> rem X, Y. If the rem and the select are in + // the same basic block, then we replace the select with Y, and the + // condition of the select with false (if the cond value is in the same + // BB). If the select has uses other than the div, this allows them to be + // simplified also. + if (Constant *ST = dyn_cast(SI->getOperand(1))) + if (ST->isNullValue()) { + Instruction *CondI = dyn_cast(SI->getOperand(0)); + if (CondI && CondI->getParent() == I.getParent()) + UpdateValueUsesWith(CondI, ConstantBool::getFalse()); + else if (I.getParent() != SI->getParent() || SI->hasOneUse()) + I.setOperand(1, SI->getOperand(2)); + else + UpdateValueUsesWith(SI, SI->getOperand(2)); + return &I; + } + // Likewise for: rem X, (Cond ? Y : 0) -> rem X, Y + if (Constant *ST = dyn_cast(SI->getOperand(2))) + if (ST->isNullValue()) { + Instruction *CondI = dyn_cast(SI->getOperand(0)); + if (CondI && CondI->getParent() == I.getParent()) + UpdateValueUsesWith(CondI, ConstantBool::getTrue()); + else if (I.getParent() != SI->getParent() || SI->hasOneUse()) + I.setOperand(1, SI->getOperand(1)); + else + UpdateValueUsesWith(SI, SI->getOperand(1)); return &I; } - - // If the top bits of both operands are zero (i.e. we can prove they are - // unsigned inputs), turn this into a urem. - uint64_t Mask = 1ULL << (I.getType()->getPrimitiveSizeInBits()-1); - if (MaskedValueIsZero(Op1, Mask) && MaskedValueIsZero(Op0, Mask)) { - const Type *NTy = Op0->getType()->getUnsignedVersion(); - Value *LHS = InsertCastBefore(Op0, NTy, I); - Value *RHS; - if (Constant *R = dyn_cast(Op1)) - RHS = ConstantExpr::getCast(R, NTy); - else - RHS = InsertCastBefore(Op1, NTy, I); - Instruction *Rem = BinaryOperator::createRem(LHS, RHS, I.getName()); - InsertNewInstBefore(Rem, I); - return new CastInst(Rem, I.getType()); - } } + return 0; +} + +/// This function implements the transforms common to both integer remainder +/// instructions (urem and srem). It is called by the visitors to those integer +/// remainder instructions. +/// @brief Common integer remainder transforms +Instruction *InstCombiner::commonIRemTransforms(BinaryOperator &I) { + Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); + + if (Instruction *common = commonRemTransforms(I)) + return common; + if (ConstantInt *RHS = dyn_cast(Op1)) { // X % 0 == undef, we don't need to preserve faults! if (RHS->equalsInt(0)) @@ -2460,13 +2486,6 @@ if (RHS->equalsInt(1)) // X % 1 == 0 return ReplaceInstUsesWith(I, Constant::getNullValue(I.getType())); - // Check to see if this is an unsigned remainder with an exact power of 2, - // if so, convert to a bitwise and. - if (ConstantInt *C = dyn_cast(RHS)) - if (RHS->getType()->isUnsigned()) - if (isPowerOf2_64(C->getZExtValue())) - return BinaryOperator::createAnd(Op0, SubOne(C)); - if (Instruction *Op0I = dyn_cast(Op0)) { if (SelectInst *SI = dyn_cast(Op0I)) { if (Instruction *R = FoldOpIntoSelect(I, SI, this)) @@ -2475,19 +2494,34 @@ if (Instruction *NV = FoldOpIntoPhi(I)) return NV; } - - // X*C1%C2 --> 0 iff C1%C2 == 0 - if (ConstantExpr::getRem(GetFactor(Op0I), RHS)->isNullValue()) + // (X * C1) % C2 --> 0 iff C1 % C2 == 0 + if (ConstantExpr::getSRem(GetFactor(Op0I), RHS)->isNullValue()) return ReplaceInstUsesWith(I, Constant::getNullValue(I.getType())); } } + return 0; +} + +Instruction *InstCombiner::visitURem(BinaryOperator &I) { + Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); + + if (Instruction *common = commonIRemTransforms(I)) + return common; + + if (ConstantInt *RHS = dyn_cast(Op1)) { + // X urem C^2 -> X and C + // Check to see if this is an unsigned remainder with an exact power of 2, + // if so, convert to a bitwise and. + if (ConstantInt *C = dyn_cast(RHS)) + if (isPowerOf2_64(C->getZExtValue())) + return BinaryOperator::createAnd(Op0, SubOne(C)); + } + if (Instruction *RHSI = dyn_cast(I.getOperand(1))) { - // Turn A % (C << N), where C is 2^k, into A & ((C << N)-1) [urem only]. - if (I.getType()->isUnsigned() && - RHSI->getOpcode() == Instruction::Shl && - isa(RHSI->getOperand(0)) && - RHSI->getOperand(0)->getType()->isUnsigned()) { + // Turn A % (C << N), where C is 2^k, into A & ((C << N)-1) + if (RHSI->getOpcode() == Instruction::Shl && + isa(RHSI->getOperand(0))) { unsigned C1 = cast(RHSI->getOperand(0))->getZExtValue(); if (isPowerOf2_64(C1)) { Constant *N1 = ConstantInt::getAllOnesValue(I.getType()); @@ -2496,61 +2530,60 @@ return BinaryOperator::createAnd(Op0, Add); } } - - // If this is 'urem X, (Cond ? C1, C2)' where C1&C2 are powers of two, - // transform this into: '(Cond ? (urem X, C1) : (urem X, C2))'. - if (SelectInst *SI = dyn_cast(Op1)) { - // rem X, (Cond ? 0 : Y) -> rem X, Y. If the rem and the select are in - // the same basic block, then we replace the select with Y, and the - // condition of the select with false (if the cond value is in the same - // BB). If the select has uses other than the div, this allows them to be - // simplified also. - if (Constant *ST = dyn_cast(SI->getOperand(1))) - if (ST->isNullValue()) { - Instruction *CondI = dyn_cast(SI->getOperand(0)); - if (CondI && CondI->getParent() == I.getParent()) - UpdateValueUsesWith(CondI, ConstantBool::getFalse()); - else if (I.getParent() != SI->getParent() || SI->hasOneUse()) - I.setOperand(1, SI->getOperand(2)); - else - UpdateValueUsesWith(SI, SI->getOperand(2)); - return &I; - } - // Likewise for: rem X, (Cond ? Y : 0) -> rem X, Y - if (Constant *ST = dyn_cast(SI->getOperand(2))) - if (ST->isNullValue()) { - Instruction *CondI = dyn_cast(SI->getOperand(0)); - if (CondI && CondI->getParent() == I.getParent()) - UpdateValueUsesWith(CondI, ConstantBool::getTrue()); - else if (I.getParent() != SI->getParent() || SI->hasOneUse()) - I.setOperand(1, SI->getOperand(1)); - else - UpdateValueUsesWith(SI, SI->getOperand(1)); - return &I; + } + + // urem X, (select Cond, 2^C1, 2^C2) --> select Cond, (and X, C1), (and X, C2) + // where C1&C2 are powers of two. + if (SelectInst *SI = dyn_cast(Op1)) { + if (ConstantInt *STO = dyn_cast(SI->getOperand(1))) + if (ConstantInt *SFO = dyn_cast(SI->getOperand(2))) { + // STO == 0 and SFO == 0 handled above. + if (isPowerOf2_64(STO->getZExtValue()) && + isPowerOf2_64(SFO->getZExtValue())) { + Value *TrueAnd = InsertNewInstBefore( + BinaryOperator::createAnd(Op0, SubOne(STO), SI->getName()+".t"), I); + Value *FalseAnd = InsertNewInstBefore( + BinaryOperator::createAnd(Op0, SubOne(SFO), SI->getName()+".f"), I); + return new SelectInst(SI->getOperand(0), TrueAnd, FalseAnd); } + } + } + + return 0; +} - - if (ConstantInt *STO = dyn_cast(SI->getOperand(1))) - if (ConstantInt *SFO = dyn_cast(SI->getOperand(2))) - if (STO->getType()->isUnsigned() && SFO->getType()->isUnsigned()) { - // STO == 0 and SFO == 0 handled above. - if (isPowerOf2_64(STO->getZExtValue()) && - isPowerOf2_64(SFO->getZExtValue())) { - Value *TrueAnd = InsertNewInstBefore( - BinaryOperator::createAnd(Op0, SubOne(STO), SI->getName()+".t"), - I); - Value *FalseAnd = InsertNewInstBefore( - BinaryOperator::createAnd(Op0, SubOne(SFO), SI->getName()+".f"), - I); - return new SelectInst(SI->getOperand(0), TrueAnd, FalseAnd); - } - } +Instruction *InstCombiner::visitSRem(BinaryOperator &I) { + Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); + + if (Instruction *common = commonIRemTransforms(I)) + return common; + + if (Value *RHSNeg = dyn_castNegVal(Op1)) + if (!isa(RHSNeg) || + cast(RHSNeg)->getSExtValue() > 0) { + // X % -Y -> X % Y + AddUsesToWorkList(I); + I.setOperand(1, RHSNeg); + return &I; } + + // If the top bits of both operands are zero (i.e. we can prove they are + // unsigned inputs), turn this into a urem. + uint64_t Mask = 1ULL << (I.getType()->getPrimitiveSizeInBits()-1); + if (MaskedValueIsZero(Op1, Mask) && MaskedValueIsZero(Op0, Mask)) { + // X srem Y -> X urem Y, iff X and Y don't have sign bit set + return BinaryOperator::createURem(Op0, Op1, I.getName()); } - + return 0; } +Instruction *InstCombiner::visitFRem(BinaryOperator &I) { + Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); + + return commonRemTransforms(I); +} + // isMaxValueMinusOne - return true if this is Max-1 static bool isMaxValueMinusOne(const ConstantInt *C) { if (C->getType()->isUnsigned()) @@ -4568,40 +4601,16 @@ // the second operand is a constant, simplify a bit. if (BinaryOperator *BO = dyn_cast(Op0)) { switch (BO->getOpcode()) { -#if 0 case Instruction::SRem: // If we have a signed (X % (2^c)) == 0, turn it into an unsigned one. if (CI->isNullValue() && isa(BO->getOperand(1)) && BO->hasOneUse()) { int64_t V = cast(BO->getOperand(1))->getSExtValue(); if (V > 1 && isPowerOf2_64(V)) { - Value *NewRem = InsertNewInstBefore( - BinaryOperator::createURem(BO->getOperand(0), - BO->getOperand(1), - BO->getName()), I); - return BinaryOperator::create( - I.getOpcode(), NewRem, - Constant::getNullValue(NewRem->getType())); - } - } - break; -#endif - - case Instruction::Rem: - // If we have a signed (X % (2^c)) == 0, turn it into an unsigned one. - if (CI->isNullValue() && isa(BO->getOperand(1)) && - BO->hasOneUse() && BO->getOperand(1)->getType()->isSigned()) { - int64_t V = cast(BO->getOperand(1))->getSExtValue(); - if (V > 1 && isPowerOf2_64(V)) { - unsigned L2 = Log2_64(V); - const Type *UTy = BO->getType()->getUnsignedVersion(); - Value *NewX = InsertNewInstBefore(new CastInst(BO->getOperand(0), - UTy, "tmp"), I); - Constant *RHSCst = ConstantInt::get(UTy, 1ULL << L2); - Value *NewRem =InsertNewInstBefore(BinaryOperator::createRem(NewX, - RHSCst, BO->getName()), I); + Value *NewRem = InsertNewInstBefore(BinaryOperator::createURem( + BO->getOperand(0), BO->getOperand(1), BO->getName()), I); return BinaryOperator::create(I.getOpcode(), NewRem, - Constant::getNullValue(UTy)); + Constant::getNullValue(BO->getType())); } } break; @@ -5766,6 +5775,8 @@ break; case Instruction::SDiv: case Instruction::UDiv: + case Instruction::SRem: + case Instruction::URem: // If we are just changing the sign, rewrite. if (DestBitSize == SrcBitSize) { // Don't insert two casts if they cannot be eliminated. We allow two Index: llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp diff -u llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.30 llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.31 --- llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.30 Thu Oct 26 01:15:43 2006 +++ llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp Wed Nov 1 19:53:58 2006 @@ -788,10 +788,12 @@ Instruction::BinaryOps ops = BO.getOpcode(); switch (ops) { + case Instruction::URem: + case Instruction::SRem: case Instruction::UDiv: case Instruction::SDiv: case Instruction::FDiv: - case Instruction::Rem: { + case Instruction::FRem: { Value *Divisor = BO.getOperand(1); KP.addNotEqual(Constant::getNullValue(Divisor->getType()), Divisor); break; Index: llvm/lib/Transforms/Scalar/Reassociate.cpp diff -u llvm/lib/Transforms/Scalar/Reassociate.cpp:1.64 llvm/lib/Transforms/Scalar/Reassociate.cpp:1.65 --- llvm/lib/Transforms/Scalar/Reassociate.cpp:1.64 Thu Oct 26 01:15:43 2006 +++ llvm/lib/Transforms/Scalar/Reassociate.cpp Wed Nov 1 19:53:58 2006 @@ -116,7 +116,9 @@ I->getOpcode() == Instruction::UDiv || I->getOpcode() == Instruction::SDiv || I->getOpcode() == Instruction::FDiv || - I->getOpcode() == Instruction::Rem) + I->getOpcode() == Instruction::URem || + I->getOpcode() == Instruction::SRem || + I->getOpcode() == Instruction::FRem) return true; return false; } From reid at x10sys.com Wed Nov 1 19:54:34 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 1 Nov 2006 19:54:34 -0600 Subject: [llvm-commits] CVS: llvm/lib/Analysis/ScalarEvolution.cpp Message-ID: <200611020154.kA21sYbF014194@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: ScalarEvolution.cpp updated: 1.56 -> 1.57 --- Log message: For PR950: http://llvm.org/PR950 : Replace the REM instruction with UREM, SREM and FREM. --- Diffs of the changes: (+1 -1) ScalarEvolution.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Analysis/ScalarEvolution.cpp diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.56 llvm/lib/Analysis/ScalarEvolution.cpp:1.57 --- llvm/lib/Analysis/ScalarEvolution.cpp:1.56 Wed Nov 1 15:53:12 2006 +++ llvm/lib/Analysis/ScalarEvolution.cpp Wed Nov 1 19:53:58 2006 @@ -2147,7 +2147,7 @@ if (SCEVConstant *StartC = dyn_cast(Start)) { ConstantInt *StartCC = StartC->getValue(); Constant *StartNegC = ConstantExpr::getNeg(StartCC); - Constant *Rem = ConstantExpr::getRem(StartNegC, StepC->getValue()); + Constant *Rem = ConstantExpr::getSRem(StartNegC, StepC->getValue()); if (Rem->isNullValue()) { Constant *Result =ConstantExpr::getSDiv(StartNegC,StepC->getValue()); return SCEVUnknown::get(Result); From reid at x10sys.com Wed Nov 1 19:54:34 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 1 Nov 2006 19:54:34 -0600 Subject: [llvm-commits] CVS: llvm/tools/llvm2cpp/CppWriter.cpp Message-ID: <200611020154.kA21sYaO014218@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm2cpp: CppWriter.cpp updated: 1.18 -> 1.19 --- Log message: For PR950: http://llvm.org/PR950 : Replace the REM instruction with UREM, SREM and FREM. --- Diffs of the changes: (+9 -3) CppWriter.cpp | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) Index: llvm/tools/llvm2cpp/CppWriter.cpp diff -u llvm/tools/llvm2cpp/CppWriter.cpp:1.18 llvm/tools/llvm2cpp/CppWriter.cpp:1.19 --- llvm/tools/llvm2cpp/CppWriter.cpp:1.18 Thu Oct 26 01:15:43 2006 +++ llvm/tools/llvm2cpp/CppWriter.cpp Wed Nov 1 19:53:59 2006 @@ -776,7 +776,9 @@ case Instruction::UDiv: Out << "getUDiv"; break; case Instruction::SDiv: Out << "getSDiv"; break; case Instruction::FDiv: Out << "getFDiv"; break; - case Instruction::Rem: Out << "getRem"; break; + case Instruction::URem: Out << "getURem"; break; + case Instruction::SRem: Out << "getSRem"; break; + case Instruction::FRem: Out << "getFRem"; break; case Instruction::And: Out << "getAnd"; break; case Instruction::Or: Out << "getOr"; break; case Instruction::Xor: Out << "getXor"; break; @@ -1026,7 +1028,9 @@ case Instruction::UDiv: case Instruction::SDiv: case Instruction::FDiv: - case Instruction::Rem: + case Instruction::URem: + case Instruction::SRem: + case Instruction::FRem: case Instruction::And: case Instruction::Or: case Instruction::Xor: @@ -1040,7 +1044,9 @@ case Instruction::UDiv:Out << "Instruction::UDiv"; break; case Instruction::SDiv:Out << "Instruction::SDiv"; break; case Instruction::FDiv:Out << "Instruction::FDiv"; break; - case Instruction::Rem: Out << "Instruction::Rem"; break; + case Instruction::URem:Out << "Instruction::URem"; break; + case Instruction::SRem:Out << "Instruction::SRem"; break; + case Instruction::FRem:Out << "Instruction::FRem"; break; case Instruction::And: Out << "Instruction::And"; break; case Instruction::Or: Out << "Instruction::Or"; break; case Instruction::Xor: Out << "Instruction::Xor"; break; From reid at x10sys.com Wed Nov 1 19:54:34 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 1 Nov 2006 19:54:34 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Constants.h Instruction.def Message-ID: <200611020154.kA21sYmt014214@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Constants.h updated: 1.92 -> 1.93 Instruction.def updated: 1.20 -> 1.21 --- Log message: For PR950: http://llvm.org/PR950 : Replace the REM instruction with UREM, SREM and FREM. --- Diffs of the changes: (+44 -40) Constants.h | 4 ++ Instruction.def | 80 ++++++++++++++++++++++++++++---------------------------- 2 files changed, 44 insertions(+), 40 deletions(-) Index: llvm/include/llvm/Constants.h diff -u llvm/include/llvm/Constants.h:1.92 llvm/include/llvm/Constants.h:1.93 --- llvm/include/llvm/Constants.h:1.92 Thu Oct 26 14:13:30 2006 +++ llvm/include/llvm/Constants.h Wed Nov 1 19:53:58 2006 @@ -551,7 +551,9 @@ static Constant *getUDiv(Constant *C1, Constant *C2); static Constant *getSDiv(Constant *C1, Constant *C2); static Constant *getFDiv(Constant *C1, Constant *C2); - static Constant *getRem(Constant *C1, Constant *C2); + static Constant *getURem(Constant *C1, Constant *C2); // unsigned rem + static Constant *getSRem(Constant *C1, Constant *C2); // signed rem + static Constant *getFRem(Constant *C1, Constant *C2); static Constant *getAnd(Constant *C1, Constant *C2); static Constant *getOr(Constant *C1, Constant *C2); static Constant *getXor(Constant *C1, Constant *C2); Index: llvm/include/llvm/Instruction.def diff -u llvm/include/llvm/Instruction.def:1.20 llvm/include/llvm/Instruction.def:1.21 --- llvm/include/llvm/Instruction.def:1.20 Thu Oct 26 01:15:43 2006 +++ llvm/include/llvm/Instruction.def Wed Nov 1 19:53:58 2006 @@ -90,53 +90,55 @@ // Standard binary operators... FIRST_BINARY_INST( 7) -HANDLE_BINARY_INST( 7, Add , BinaryOperator) -HANDLE_BINARY_INST( 8, Sub , BinaryOperator) -HANDLE_BINARY_INST( 9, Mul , BinaryOperator) -HANDLE_BINARY_INST(10, UDiv , BinaryOperator) -HANDLE_BINARY_INST(11, SDiv , BinaryOperator) -HANDLE_BINARY_INST(12, FDiv , BinaryOperator) -HANDLE_BINARY_INST(13, Rem , BinaryOperator) +HANDLE_BINARY_INST( 7, Add , BinaryOperator) +HANDLE_BINARY_INST( 8, Sub , BinaryOperator) +HANDLE_BINARY_INST( 9, Mul , BinaryOperator) +HANDLE_BINARY_INST(10, UDiv , BinaryOperator) +HANDLE_BINARY_INST(11, SDiv , BinaryOperator) +HANDLE_BINARY_INST(12, FDiv , BinaryOperator) +HANDLE_BINARY_INST(13, URem , BinaryOperator) +HANDLE_BINARY_INST(14, SRem , BinaryOperator) +HANDLE_BINARY_INST(15, FRem , BinaryOperator) // Logical operators... -HANDLE_BINARY_INST(14, And , BinaryOperator) -HANDLE_BINARY_INST(15, Or , BinaryOperator) -HANDLE_BINARY_INST(16, Xor , BinaryOperator) +HANDLE_BINARY_INST(16, And , BinaryOperator) +HANDLE_BINARY_INST(17, Or , BinaryOperator) +HANDLE_BINARY_INST(18, Xor , BinaryOperator) // Binary comparison operators... -HANDLE_BINARY_INST(17, SetEQ , SetCondInst) -HANDLE_BINARY_INST(18, SetNE , SetCondInst) -HANDLE_BINARY_INST(19, SetLE , SetCondInst) -HANDLE_BINARY_INST(20, SetGE , SetCondInst) -HANDLE_BINARY_INST(21, SetLT , SetCondInst) -HANDLE_BINARY_INST(22, SetGT , SetCondInst) - LAST_BINARY_INST(22) +HANDLE_BINARY_INST(19, SetEQ , SetCondInst) +HANDLE_BINARY_INST(20, SetNE , SetCondInst) +HANDLE_BINARY_INST(21, SetLE , SetCondInst) +HANDLE_BINARY_INST(22, SetGE , SetCondInst) +HANDLE_BINARY_INST(23, SetLT , SetCondInst) +HANDLE_BINARY_INST(24, SetGT , SetCondInst) + LAST_BINARY_INST(24) // Memory operators... - FIRST_MEMORY_INST(23) -HANDLE_MEMORY_INST(23, Malloc, MallocInst) // Heap management instructions -HANDLE_MEMORY_INST(24, Free , FreeInst ) -HANDLE_MEMORY_INST(25, Alloca, AllocaInst) // Stack management -HANDLE_MEMORY_INST(26, Load , LoadInst ) // Memory manipulation instrs -HANDLE_MEMORY_INST(27, Store , StoreInst ) -HANDLE_MEMORY_INST(28, GetElementPtr, GetElementPtrInst) - LAST_MEMORY_INST(28) + FIRST_MEMORY_INST(25) +HANDLE_MEMORY_INST(25, Malloc, MallocInst) // Heap management instructions +HANDLE_MEMORY_INST(26, Free , FreeInst ) +HANDLE_MEMORY_INST(27, Alloca, AllocaInst) // Stack management +HANDLE_MEMORY_INST(28, Load , LoadInst ) // Memory manipulation instrs +HANDLE_MEMORY_INST(29, Store , StoreInst ) +HANDLE_MEMORY_INST(30, GetElementPtr, GetElementPtrInst) + LAST_MEMORY_INST(30) // Other operators... - FIRST_OTHER_INST(29) -HANDLE_OTHER_INST(29, PHI , PHINode ) // PHI node instruction -HANDLE_OTHER_INST(30, Cast , CastInst ) // Type cast -HANDLE_OTHER_INST(31, Call , CallInst ) // Call a function -HANDLE_OTHER_INST(32, Shl , ShiftInst ) // Shift operations -HANDLE_OTHER_INST(33, Shr , ShiftInst ) -HANDLE_OTHER_INST(34, Select , SelectInst ) // select instruction -HANDLE_OTHER_INST(35, UserOp1, Instruction) // May be used internally in a pass -HANDLE_OTHER_INST(36, UserOp2, Instruction) -HANDLE_OTHER_INST(37, VAArg , VAArgInst ) // vaarg instruction -HANDLE_OTHER_INST(38, ExtractElement, ExtractElementInst)// extract from vector. -HANDLE_OTHER_INST(39, InsertElement, InsertElementInst) // insert into vector -HANDLE_OTHER_INST(40, ShuffleVector, ShuffleVectorInst) // shuffle two vectors. - LAST_OTHER_INST(40) + FIRST_OTHER_INST(31) +HANDLE_OTHER_INST(31, PHI , PHINode ) // PHI node instruction +HANDLE_OTHER_INST(32, Cast , CastInst ) // Type cast +HANDLE_OTHER_INST(33, Call , CallInst ) // Call a function +HANDLE_OTHER_INST(34, Shl , ShiftInst ) // Shift operations +HANDLE_OTHER_INST(35, Shr , ShiftInst ) +HANDLE_OTHER_INST(36, Select , SelectInst ) // select instruction +HANDLE_OTHER_INST(37, UserOp1, Instruction) // May be used internally in a pass +HANDLE_OTHER_INST(38, UserOp2, Instruction) +HANDLE_OTHER_INST(39, VAArg , VAArgInst ) // vaarg instruction +HANDLE_OTHER_INST(40, ExtractElement, ExtractElementInst)// extract from vector. +HANDLE_OTHER_INST(41, InsertElement, InsertElementInst) // insert into vector +HANDLE_OTHER_INST(42, ShuffleVector, ShuffleVectorInst) // shuffle two vectors. + LAST_OTHER_INST(42) #undef FIRST_TERM_INST #undef HANDLE_TERM_INST From reid at x10sys.com Wed Nov 1 19:54:34 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 1 Nov 2006 19:54:34 -0600 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp Message-ID: <200611020154.kA21sYh1014201@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: Reader.cpp updated: 1.200 -> 1.201 --- Log message: For PR950: http://llvm.org/PR950 : Replace the REM instruction with UREM, SREM and FREM. --- Diffs of the changes: (+13 -8) Reader.cpp | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 deletions(-) Index: llvm/lib/Bytecode/Reader/Reader.cpp diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.200 llvm/lib/Bytecode/Reader/Reader.cpp:1.201 --- llvm/lib/Bytecode/Reader/Reader.cpp:1.200 Thu Oct 26 01:15:43 2006 +++ llvm/lib/Bytecode/Reader/Reader.cpp Wed Nov 1 19:53:58 2006 @@ -652,7 +652,14 @@ break; case 11: // Rem - Opcode = Instruction::Rem; + // As with "Div", make the signed/unsigned or floating point Rem + // instruction choice based on the type of the operands. + if (iType == 10 || iType == 11) + Opcode = Instruction::FRem; + else if (iType >= 2 && iType <= 9 && iType % 2 != 0) + Opcode = Instruction::SRem; + else + Opcode = Instruction::URem; break; case 12: // And Opcode = Instruction::And; @@ -1654,18 +1661,16 @@ else Opcode = Instruction::UDiv; break; - case 11: // Rem - // As with "Div", make the signed/unsigned Rem instruction choice based - // on the type of the instruction. + // As with "Div", make the signed/unsigned or floating point Rem + // instruction choice based on the type of the operands. if (ArgVec[0]->getType()->isFloatingPoint()) - Opcode = Instruction::Rem; + Opcode = Instruction::FRem; else if (ArgVec[0]->getType()->isSigned()) - Opcode = Instruction::Rem; + Opcode = Instruction::SRem; else - Opcode = Instruction::Rem; + Opcode = Instruction::URem; break; - case 12: // And Opcode = Instruction::And; break; From reid at x10sys.com Wed Nov 1 19:54:34 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 1 Nov 2006 19:54:34 -0600 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/Lexer.l llvmAsmParser.y Message-ID: <200611020154.kA21sYFc014189@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: Lexer.l updated: 1.80 -> 1.81 llvmAsmParser.y updated: 1.271 -> 1.272 --- Log message: For PR950: http://llvm.org/PR950 : Replace the REM instruction with UREM, SREM and FREM. --- Diffs of the changes: (+19 -8) Lexer.l | 5 ++++- llvmAsmParser.y | 22 +++++++++++++++------- 2 files changed, 19 insertions(+), 8 deletions(-) Index: llvm/lib/AsmParser/Lexer.l diff -u llvm/lib/AsmParser/Lexer.l:1.80 llvm/lib/AsmParser/Lexer.l:1.81 --- llvm/lib/AsmParser/Lexer.l:1.80 Thu Oct 26 01:15:43 2006 +++ llvm/lib/AsmParser/Lexer.l Wed Nov 1 19:53:58 2006 @@ -261,7 +261,10 @@ udiv { RET_TOK(BinaryOpVal, UDiv, UDIV); } sdiv { RET_TOK(BinaryOpVal, SDiv, SDIV); } fdiv { RET_TOK(BinaryOpVal, FDiv, FDIV); } -rem { RET_TOK(BinaryOpVal, Rem, REM); } +rem { RET_TOK_OBSOLETE(BinaryOpVal, URem, UREM); } +urem { RET_TOK(BinaryOpVal, URem, UREM); } +srem { RET_TOK(BinaryOpVal, SRem, SREM); } +frem { RET_TOK(BinaryOpVal, FRem, FREM); } and { RET_TOK(BinaryOpVal, And, AND); } or { RET_TOK(BinaryOpVal, Or , OR ); } xor { RET_TOK(BinaryOpVal, Xor, XOR); } Index: llvm/lib/AsmParser/llvmAsmParser.y diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.271 llvm/lib/AsmParser/llvmAsmParser.y:1.272 --- llvm/lib/AsmParser/llvmAsmParser.y:1.271 Thu Oct 26 01:15:43 2006 +++ llvm/lib/AsmParser/llvmAsmParser.y Wed Nov 1 19:53:58 2006 @@ -836,7 +836,7 @@ // Depending on the opcode .. switch (OI.opcode) { default: - GenerateError("Invalid Obsolete OpCode"); + GenerateError("Invalid obsolete opCode (check Lexer.l)"); break; case Instruction::UDiv: // Handle cases where the opcode needs to change @@ -845,12 +845,17 @@ else if (Ty->isSigned()) OI.opcode = Instruction::SDiv; break; + case Instruction::URem: + if (Ty->isFloatingPoint()) + OI.opcode = Instruction::FRem; + else if (Ty->isSigned()) + OI.opcode = Instruction::SRem; + break; } // Its not obsolete any more, we fixed it. OI.obsolete = false; } - - + // common code from the two 'RunVMAsmParser' functions static Module* RunParser(Module * M) { @@ -1113,7 +1118,7 @@ // Binary Operators %type ArithmeticOps LogicalOps SetCondOps // Binops Subcatagories -%token ADD SUB MUL UDIV SDIV FDIV REM AND OR XOR +%token ADD SUB MUL UDIV SDIV FDIV UREM SREM FREM AND OR XOR %token SETLE SETGE SETLT SETGT SETEQ SETNE // Binary Comparators // Memory Instructions @@ -1151,7 +1156,7 @@ // Operations that are notably excluded from this list include: // RET, BR, & SWITCH because they end basic blocks and are treated specially. // -ArithmeticOps: ADD | SUB | MUL | UDIV | SDIV | FDIV | REM ; +ArithmeticOps: ADD | SUB | MUL | UDIV | SDIV | FDIV | UREM | SREM | FREM; LogicalOps : AND | OR | XOR; SetCondOps : SETLE | SETGE | SETLT | SETGT | SETEQ | SETNE; @@ -2465,8 +2470,11 @@ !isa((*$2).get())) GEN_ERROR( "Arithmetic operator requires integer, FP, or packed operands!"); - if (isa((*$2).get()) && $1.opcode == Instruction::Rem) - GEN_ERROR("Rem not supported on packed types!"); + if (isa((*$2).get()) && + ($1.opcode == Instruction::URem || + $1.opcode == Instruction::SRem || + $1.opcode == Instruction::FRem)) + GEN_ERROR("U/S/FRem not supported on packed types!"); // Upgrade the opcode from obsolete versions before we do anything with it. sanitizeOpCode($1,*$2); CHECK_FOR_ERROR; From alenhar2 at cs.uiuc.edu Wed Nov 1 21:04:51 2006 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Wed, 1 Nov 2006 21:04:51 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/Alpha/2006-11-01-vastart.ll Message-ID: <200611020304.kA234pra015649@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/Alpha: 2006-11-01-vastart.ll added (r1.1) --- Log message: a regression :( --- Diffs of the changes: (+18 -0) 2006-11-01-vastart.ll | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+) Index: llvm/test/Regression/CodeGen/Alpha/2006-11-01-vastart.ll diff -c /dev/null llvm/test/Regression/CodeGen/Alpha/2006-11-01-vastart.ll:1.1 *** /dev/null Wed Nov 1 21:04:47 2006 --- llvm/test/Regression/CodeGen/Alpha/2006-11-01-vastart.ll Wed Nov 1 21:04:37 2006 *************** *** 0 **** --- 1,18 ---- + ; RUN: llvm-as < %s | llc -march=alpha + + target datalayout = "e-p:64:64" + target endian = little + target pointersize = 64 + target triple = "alphaev67-unknown-linux-gnu" + %struct.va_list = type { sbyte*, int, int } + + implementation ; Functions: + + void %yyerror(int, ...) { + entry: + call void %llvm.va_start( %struct.va_list* null ) + ret void + } + + declare void %llvm.va_start(%struct.va_list*) + From alenhar2 at cs.uiuc.edu Wed Nov 1 21:05:41 2006 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Wed, 1 Nov 2006 21:05:41 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaISelLowering.cpp AlphaInstrInfo.td Message-ID: <200611020305.kA235fiI015703@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Alpha: AlphaISelLowering.cpp updated: 1.71 -> 1.72 AlphaInstrInfo.td updated: 1.133 -> 1.134 --- Log message: fix 2006-11-01-vastart.ll --- Diffs of the changes: (+5 -3) AlphaISelLowering.cpp | 2 +- AlphaInstrInfo.td | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) Index: llvm/lib/Target/Alpha/AlphaISelLowering.cpp diff -u llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.71 llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.72 --- llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.71 Tue Oct 31 10:49:55 2006 +++ llvm/lib/Target/Alpha/AlphaISelLowering.cpp Wed Nov 1 21:05:26 2006 @@ -565,7 +565,7 @@ case ISD::VASTART: { SDOperand Chain = Op.getOperand(0); SDOperand VAListP = Op.getOperand(1); - SrcValueSDNode *VAListS = cast(Op.getOperand(3)); + SrcValueSDNode *VAListS = cast(Op.getOperand(2)); // vastart stores the address of the VarArgsBase and VarArgsOffset SDOperand FR = DAG.getFrameIndex(VarArgsBase, MVT::i64); Index: llvm/lib/Target/Alpha/AlphaInstrInfo.td diff -u llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.133 llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.134 --- llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.133 Tue Oct 31 17:46:56 2006 +++ llvm/lib/Target/Alpha/AlphaInstrInfo.td Wed Nov 1 21:05:26 2006 @@ -404,6 +404,7 @@ def JSR_COROUTINE : MbrForm< 0x1A, 0x03, (ops GPRC:$RD, GPRC:$RS, s14imm:$DISP), "jsr_coroutine $RD,($RS),$DISP", s_jsr>; //Jump to subroutine return + let OperandList = (ops GPRC:$RA, s64imm:$DISP, GPRC:$RB) in { def LDQ : MForm<0x29, 0, 1, "ldq $RA,$DISP($RB)", [(set GPRC:$RA, (load (add GPRC:$RB, immSExt16:$DISP)))], s_ild>; @@ -421,6 +422,8 @@ [(set GPRC:$RA, (zextloadi16 (add GPRC:$RB, immSExt16:$DISP)))], s_ild>; def LDWUr : MForm<0x0C, 0, 1, "ldwu $RA,$DISP($RB)\t\t!gprellow", [(set GPRC:$RA, (zextloadi16 (Alpha_gprello tglobaladdr:$DISP, GPRC:$RB)))], s_ild>; + + def STB : MForm<0x0E, 1, 0, "stb $RA,$DISP($RB)", [(truncstorei8 GPRC:$RA, (add GPRC:$RB, immSExt16:$DISP))], s_ist>; def STBr : MForm<0x0E, 1, 0, "stb $RA,$DISP($RB)\t\t!gprellow", @@ -649,6 +652,7 @@ //misc FP selects //Select double + def : Pat<(select (seteq F8RC:$RA, F8RC:$RB), F8RC:$st, F8RC:$sf), (FCMOVNET F8RC:$sf, F8RC:$st, (CMPTEQ F8RC:$RA, F8RC:$RB))>; def : Pat<(select (setoeq F8RC:$RA, F8RC:$RB), F8RC:$st, F8RC:$sf), @@ -976,8 +980,6 @@ //def UNPKBW : OForm< 0x1C, 0x34, "UNPKBW $RA,$RB,$RC">; //Unpack bytes to words //CVTLQ F-P 17.010 Convert longword to quadword //CVTQL F-P 17.030 Convert quadword to longword -//def AMASK : OForm< 0x11, 0x61, "AMASK $RA,$RB,$RC", []>; //Architecture mask -//def AMASKi : OFormL<0x11, 0x61, "AMASK $RA,$L,$RC", []>; //Architecture mask //Constant handling From rspencer at reidspencer.com Wed Nov 1 21:18:26 2006 From: rspencer at reidspencer.com (Reid Spencer) Date: Wed, 01 Nov 2006 19:18:26 -0800 Subject: [llvm-commits] [llvm-gcc] REM Patch Message-ID: <1162437506.11568.166.camel@bashful.x10sys.com> Jim & all The attached patch should now be applied to llvm-gcc because the corresponding REM patch for LLVM has been applied to CVS. This should show up in llvm-gcc subversion repository in the next 24 hours. If you can't wait that long and you're updating to LLVM CVS Head, apply it to your working copy of llvm-gcc now. Thanks, Reid. -------------- next part -------------- A non-text attachment was scrubbed... Name: REM-llvmgcc.patch Type: text/x-patch Size: 827 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20061101/0276fd9a/attachment.bin From reid at x10sys.com Wed Nov 1 21:37:53 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 1 Nov 2006 21:37:53 -0600 Subject: [llvm-commits] CVS: llvm/test/TestRunner.sh Message-ID: <200611020337.kA23brsD016502@zion.cs.uiuc.edu> Changes in directory llvm/test: TestRunner.sh updated: 1.12 -> 1.13 --- Log message: Add some documentation about the arguments. --- Diffs of the changes: (+3 -0) TestRunner.sh | 3 +++ 1 files changed, 3 insertions(+) Index: llvm/test/TestRunner.sh diff -u llvm/test/TestRunner.sh:1.12 llvm/test/TestRunner.sh:1.13 --- llvm/test/TestRunner.sh:1.12 Sat Jun 17 03:06:33 2006 +++ llvm/test/TestRunner.sh Wed Nov 1 21:37:39 2006 @@ -8,6 +8,9 @@ # # %s - Replaced with the input name of the program, or the program to # execute, as appropriate. +# %llvmgcc - llvm-gcc command +# %llvmgxx - llvm-g++ command +# %prcontext - prcontext.tcl script # FILENAME=$1 From evan.cheng at apple.com Thu Nov 2 01:22:37 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 1 Nov 2006 23:22:37 -0800 Subject: [llvm-commits] [llvm-gcc] REM Patch In-Reply-To: <1162437506.11568.166.camel@bashful.x10sys.com> References: <1162437506.11568.166.camel@bashful.x10sys.com> Message-ID: <459C2A18-4F63-41BD-976C-E3D66AD065AB@apple.com> I've applied this. Thanks! Evan On Nov 1, 2006, at 7:18 PM, Reid Spencer wrote: > Jim & all > > The attached patch should now be applied to llvm-gcc because the > corresponding REM patch for LLVM has been applied to CVS. This should > show up in llvm-gcc subversion repository in the next 24 hours. If you > can't wait that long and you're updating to LLVM CVS Head, apply it to > your working copy of llvm-gcc now. > > Thanks, > > Reid. > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From reid at x10sys.com Thu Nov 2 02:00:13 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 02:00:13 -0600 Subject: [llvm-commits] CVS: llvm/lib/System/Mutex.cpp Message-ID: <200611020800.kA280D5t021066@zion.cs.uiuc.edu> Changes in directory llvm/lib/System: Mutex.cpp updated: 1.9 -> 1.10 --- Log message: Get rid of unused variable. --- Diffs of the changes: (+1 -1) Mutex.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/System/Mutex.cpp diff -u llvm/lib/System/Mutex.cpp:1.9 llvm/lib/System/Mutex.cpp:1.10 --- llvm/lib/System/Mutex.cpp:1.9 Sun Aug 27 19:42:29 2006 +++ llvm/lib/System/Mutex.cpp Thu Nov 2 01:59:59 2006 @@ -101,7 +101,7 @@ { pthread_mutex_t* mutex = reinterpret_cast(data_); assert(mutex != 0); - int errorcode = pthread_mutex_destroy(mutex); + pthread_mutex_destroy(mutex); assert(mutex != 0); } } From reid at x10sys.com Thu Nov 2 02:12:18 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 02:12:18 -0600 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp Message-ID: <200611020812.kA28CIH2024737@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/Interpreter: Execution.cpp updated: 1.144 -> 1.145 --- Log message: Remove a function prototype that is no longer needed (REM patch missed it) --- Diffs of the changes: (+0 -2) Execution.cpp | 2 -- 1 files changed, 2 deletions(-) Index: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp diff -u llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.144 llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.145 --- llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.144 Wed Nov 1 19:53:58 2006 +++ llvm/lib/ExecutionEngine/Interpreter/Execution.cpp Thu Nov 2 02:12:02 2006 @@ -40,8 +40,6 @@ const Type *Ty); static GenericValue executeMulInst(GenericValue Src1, GenericValue Src2, const Type *Ty); -static GenericValue executeRemInst(GenericValue Src1, GenericValue Src2, - const Type *Ty); static GenericValue executeUDivInst(GenericValue Src1, GenericValue Src2, const Type *Ty); static GenericValue executeSDivInst(GenericValue Src1, GenericValue Src2, From reid at x10sys.com Thu Nov 2 02:18:29 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 02:18:29 -0600 Subject: [llvm-commits] CVS: llvm/lib/VMCore/ConstantFolding.cpp Message-ID: <200611020818.kA28ITV9029907@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: ConstantFolding.cpp updated: 1.96 -> 1.97 --- Log message: Remove unused variables. --- Diffs of the changes: (+5 -6) ConstantFolding.cpp | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) Index: llvm/lib/VMCore/ConstantFolding.cpp diff -u llvm/lib/VMCore/ConstantFolding.cpp:1.96 llvm/lib/VMCore/ConstantFolding.cpp:1.97 --- llvm/lib/VMCore/ConstantFolding.cpp:1.96 Wed Nov 1 19:53:58 2006 +++ llvm/lib/VMCore/ConstantFolding.cpp Thu Nov 2 02:18:15 2006 @@ -809,7 +809,7 @@ if (V->getType() == DestTy) return (Constant*)V; // Cast of a global address to boolean is always true. - if (const GlobalValue *GV = dyn_cast(V)) { + if (isa(V)) { if (DestTy == Type::BoolTy) // FIXME: When we support 'external weak' references, we have to prevent // this transformation from happening. This code will need to be updated @@ -962,7 +962,7 @@ const ConstantInt *CIdx = dyn_cast(Idx); if (!CIdx) return 0; uint64_t idxVal = CIdx->getZExtValue(); - if (const UndefValue *UVal = dyn_cast(Val)) { + if (isa(Val)) { // Insertion of scalar constant into packed undef // Optimize away insertion of undef if (isa(Elt)) @@ -980,8 +980,7 @@ } return ConstantPacked::get(Ops); } - if (const ConstantAggregateZero *CVal = - dyn_cast(Val)) { + if (isa(Val)) { // Insertion of scalar constant into packed aggregate zero // Optimize away insertion of zero if (Elt->isNullValue()) @@ -1387,7 +1386,7 @@ } if (const ConstantExpr *CE1 = dyn_cast(V1)) { - if (const ConstantExpr *CE2 = dyn_cast(V2)) { + if (isa(V2)) { // There are many possible foldings we could do here. We should probably // at least fold add of a pointer with an integer into the appropriate // getelementptr. This will improve alias analysis a bit. @@ -1444,7 +1443,7 @@ } } - } else if (const ConstantExpr *CE2 = dyn_cast(V2)) { + } else if (isa(V2)) { // If V2 is a constant expr and V1 isn't, flop them around and fold the // other way if possible. switch (Opcode) { From reid at x10sys.com Thu Nov 2 02:23:59 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 02:23:59 -0600 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Function.cpp Message-ID: <200611020823.kA28Nx67030004@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Function.cpp updated: 1.105 -> 1.106 --- Log message: Remove unused variable. --- Diffs of the changes: (+1 -1) Function.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/VMCore/Function.cpp diff -u llvm/lib/VMCore/Function.cpp:1.105 llvm/lib/VMCore/Function.cpp:1.106 --- llvm/lib/VMCore/Function.cpp:1.105 Sat Mar 25 00:32:47 2006 +++ llvm/lib/VMCore/Function.cpp Thu Nov 2 02:23:44 2006 @@ -150,7 +150,7 @@ for (SymbolTable::plane_iterator LPI = LST.plane_begin(), E = LST.plane_end(); LPI != E; ++LPI) // All global symbols are of pointer type, ignore any non-pointer planes. - if (const PointerType *CurTy = dyn_cast(LPI->first)) { + if (isa(LPI->first)) { // Only check if the global plane has any symbols of this type. SymbolTable::plane_iterator GPI = GST.find(LPI->first); if (GPI != GST.plane_end()) { From jlaskey at apple.com Thu Nov 2 08:21:43 2006 From: jlaskey at apple.com (Jim Laskey) Date: Thu, 2 Nov 2006 08:21:43 -0600 Subject: [llvm-commits] CVS: llvm/lib/Support/FoldingSet.cpp Message-ID: <200611021421.kA2ELh1c003580@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: FoldingSet.cpp updated: 1.8 -> 1.9 --- Log message: Allow FoldingSet clients to pump up the initial hash size. --- Diffs of the changes: (+4 -2) FoldingSet.cpp | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) Index: llvm/lib/Support/FoldingSet.cpp diff -u llvm/lib/Support/FoldingSet.cpp:1.8 llvm/lib/Support/FoldingSet.cpp:1.9 --- llvm/lib/Support/FoldingSet.cpp:1.8 Sun Oct 29 03:19:59 2006 +++ llvm/lib/Support/FoldingSet.cpp Thu Nov 2 08:21:26 2006 @@ -151,8 +151,10 @@ //===----------------------------------------------------------------------===// // FoldingSetImpl Implementation -FoldingSetImpl::FoldingSetImpl() : NumNodes(0) { - NumBuckets = 64; +FoldingSetImpl::FoldingSetImpl(unsigned Log2InitSize) : NumNodes(0) { + assert(5 < Log2InitSize && Log2InitSize < 32 && + "Initial hash table size out of range"); + NumBuckets = 1 << Log2InitSize; Buckets = new void*[NumBuckets]; memset(Buckets, 0, NumBuckets*sizeof(void*)); } From jlaskey at apple.com Thu Nov 2 08:21:43 2006 From: jlaskey at apple.com (Jim Laskey) Date: Thu, 2 Nov 2006 08:21:43 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/ADT/FoldingSet.h Message-ID: <200611021421.kA2ELh7U003575@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/ADT: FoldingSet.h updated: 1.3 -> 1.4 --- Log message: Allow FoldingSet clients to pump up the initial hash size. --- Diffs of the changes: (+5 -1) FoldingSet.h | 6 +++++- 1 files changed, 5 insertions(+), 1 deletion(-) Index: llvm/include/llvm/ADT/FoldingSet.h diff -u llvm/include/llvm/ADT/FoldingSet.h:1.3 llvm/include/llvm/ADT/FoldingSet.h:1.4 --- llvm/include/llvm/ADT/FoldingSet.h:1.3 Fri Oct 27 17:52:02 2006 +++ llvm/include/llvm/ADT/FoldingSet.h Thu Nov 2 08:21:26 2006 @@ -117,7 +117,7 @@ unsigned NumNodes; public: - FoldingSetImpl(); + FoldingSetImpl(unsigned Log2InitSize = 6); virtual ~FoldingSetImpl(); // Forward declaration. @@ -229,6 +229,10 @@ } public: + FoldingSet(unsigned Log2InitSize = 6) + : FoldingSetImpl(Log2InitSize) + {} + /// GetOrInsertNode - If there is an existing simple Node exactly /// equal to the specified node, return it. Otherwise, insert 'N' and /// return it instead. From rafael.espindola at gmail.com Thu Nov 2 09:00:17 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Thu, 2 Nov 2006 09:00:17 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARM.h ARMAsmPrinter.cpp ARMISelDAGToDAG.cpp Message-ID: <200611021500.kA2F0HN7004260@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARM.h updated: 1.6 -> 1.7 ARMAsmPrinter.cpp updated: 1.26 -> 1.27 ARMISelDAGToDAG.cpp updated: 1.81 -> 1.82 --- Log message: move ARMCondCodeToString to ARMAsmPrinter.cpp remove unused variables from lowerCall --- Diffs of the changes: (+21 -23) ARM.h | 21 --------------------- ARMAsmPrinter.cpp | 21 +++++++++++++++++++++ ARMISelDAGToDAG.cpp | 2 -- 3 files changed, 21 insertions(+), 23 deletions(-) Index: llvm/lib/Target/ARM/ARM.h diff -u llvm/lib/Target/ARM/ARM.h:1.6 llvm/lib/Target/ARM/ARM.h:1.7 --- llvm/lib/Target/ARM/ARM.h:1.6 Tue Sep 19 10:49:24 2006 +++ llvm/lib/Target/ARM/ARM.h Thu Nov 2 09:00:02 2006 @@ -51,27 +51,6 @@ }; } - static const char *ARMCondCodeToString(ARMCC::CondCodes CC) { - switch (CC) { - default: assert(0 && "Unknown condition code"); - case ARMCC::EQ: return "eq"; - case ARMCC::NE: return "ne"; - case ARMCC::CS: return "cs"; - case ARMCC::CC: return "cc"; - case ARMCC::MI: return "mi"; - case ARMCC::PL: return "pl"; - case ARMCC::VS: return "vs"; - case ARMCC::VC: return "vc"; - case ARMCC::HI: return "hi"; - case ARMCC::LS: return "ls"; - case ARMCC::GE: return "ge"; - case ARMCC::LT: return "lt"; - case ARMCC::GT: return "gt"; - case ARMCC::LE: return "le"; - case ARMCC::AL: return "al"; - } - } - class FunctionPass; class TargetMachine; Index: llvm/lib/Target/ARM/ARMAsmPrinter.cpp diff -u llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.26 llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.27 --- llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.26 Wed Nov 1 08:26:44 2006 +++ llvm/lib/Target/ARM/ARMAsmPrinter.cpp Thu Nov 2 09:00:02 2006 @@ -38,6 +38,27 @@ namespace { Statistic<> EmittedInsts("asm-printer", "Number of machine instrs printed"); + static const char *ARMCondCodeToString(ARMCC::CondCodes CC) { + switch (CC) { + default: assert(0 && "Unknown condition code"); + case ARMCC::EQ: return "eq"; + case ARMCC::NE: return "ne"; + case ARMCC::CS: return "cs"; + case ARMCC::CC: return "cc"; + case ARMCC::MI: return "mi"; + case ARMCC::PL: return "pl"; + case ARMCC::VS: return "vs"; + case ARMCC::VC: return "vc"; + case ARMCC::HI: return "hi"; + case ARMCC::LS: return "ls"; + case ARMCC::GE: return "ge"; + case ARMCC::LT: return "lt"; + case ARMCC::GT: return "gt"; + case ARMCC::LE: return "le"; + case ARMCC::AL: return "al"; + } + } + struct VISIBILITY_HIDDEN ARMAsmPrinter : public AsmPrinter { ARMAsmPrinter(std::ostream &O, TargetMachine &TM, const TargetAsmInfo *T) : AsmPrinter(O, TM, T) { Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.81 llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.82 --- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.81 Mon Oct 30 02:02:39 2006 +++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Thu Nov 2 09:00:02 2006 @@ -310,8 +310,6 @@ assert((CallConv == CallingConv::C || CallConv == CallingConv::Fast) && "unknown calling convention"); - bool isVarArg = cast(Op.getOperand(2))->getValue() != 0; - bool isTailCall = cast(Op.getOperand(3))->getValue() != 0; SDOperand Callee = Op.getOperand(4); unsigned NumOps = (Op.getNumOperands() - 5) / 2; SDOperand StackPtr = DAG.getRegister(ARM::R13, MVT::i32); From jlaskey at apple.com Thu Nov 2 14:12:53 2006 From: jlaskey at apple.com (Jim Laskey) Date: Thu, 2 Nov 2006 14:12:53 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp Message-ID: <200611022012.kA2KCreA009418@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.90 -> 1.91 --- Log message: General clean up of teh dwarf writer. 1. Most significant is the folding of debug information entries. This reduced self hosted -g SelectionDAGISel.s from 120M to 13M and pretty close to matching .o file sizes with gcc. 2. Debug information entry printing for debugging the dwarf code. 3. Bring all the code closer to llvm standards. 4. Misc. fixes and doc clean ups. --- Diffs of the changes: (+2394 -2347) DwarfWriter.cpp | 4741 ++++++++++++++++++++++++++++---------------------------- 1 files changed, 2394 insertions(+), 2347 deletions(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.90 llvm/lib/CodeGen/DwarfWriter.cpp:1.91 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.90 Tue Oct 31 02:31:24 2006 +++ llvm/lib/CodeGen/DwarfWriter.cpp Thu Nov 2 14:12:39 2006 @@ -45,69 +45,105 @@ namespace llvm { //===----------------------------------------------------------------------===// -/// DWLabel - Labels are used to track locations in the assembler file. -/// Labels appear in the form debug_, 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. - unsigned Number; // Unique number. - DWLabel(const char *T, unsigned N) : Tag(T), Number(N) {} -}; +/// Configuration values for initial hash set sizes (log2). +/// +static const unsigned InitDiesSetSize = 9; // 512 +static const unsigned InitAbbreviationsSetSize = 9; // 512 +static const unsigned InitValuesSetSize = 9; // 512 //===----------------------------------------------------------------------===// /// Forward declarations. -// +/// class DIE; +class DIEValue; //===----------------------------------------------------------------------===// -/// CompileUnit - This dwarf writer support class manages information associate -/// with a source file. -class CompileUnit { -private: - CompileUnitDesc *Desc; // Compile unit debug descriptor. - unsigned ID; // File ID for source. - DIE *Die; // Compile unit debug information entry. - std::map Globals; // A map of globally visible named - // entities for this unit. - std::map DescToDieMap; - // Tracks the mapping of unit level - // debug informaton descriptors to debug - // information entries. +/// LEB 128 number encoding. -public: - CompileUnit(CompileUnitDesc *CUD, unsigned I, DIE *D) - : Desc(CUD) - , ID(I) - , Die(D) - , Globals() - , DescToDieMap() - {} - - ~CompileUnit(); +/// PrintULEB128 - Print a series of hexidecimal values (separated by commas) +/// representing an unsigned leb128 value. +static void PrintULEB128(std::ostream &O, unsigned Value) { + do { + unsigned Byte = Value & 0x7f; + Value >>= 7; + if (Value) Byte |= 0x80; + O << "0x" << std::hex << Byte << std::dec; + if (Value) O << ", "; + } while (Value); +} + +/// SizeULEB128 - Compute the number of bytes required for an unsigned leb128 +/// value. +static unsigned SizeULEB128(unsigned Value) { + unsigned Size = 0; + do { + Value >>= 7; + Size += sizeof(int8_t); + } while (Value); + return Size; +} + +/// PrintSLEB128 - Print a series of hexidecimal values (separated by commas) +/// representing a signed leb128 value. +static void PrintSLEB128(std::ostream &O, int Value) { + int Sign = Value >> (8 * sizeof(Value) - 1); + bool IsMore; - // Accessors. - CompileUnitDesc *getDesc() const { return Desc; } - unsigned getID() const { return ID; } - DIE* getDie() const { return Die; } - std::map &getGlobals() { return Globals; } + do { + unsigned Byte = Value & 0x7f; + Value >>= 7; + IsMore = Value != Sign || ((Byte ^ Sign) & 0x40) != 0; + if (IsMore) Byte |= 0x80; + O << "0x" << std::hex << Byte << std::dec; + if (IsMore) O << ", "; + } while (IsMore); +} + +/// SizeSLEB128 - Compute the number of bytes required for a signed leb128 +/// value. +static unsigned SizeSLEB128(int Value) { + unsigned Size = 0; + int Sign = Value >> (8 * sizeof(Value) - 1); + bool IsMore; - /// hasContent - Return true if this compile unit has something to write out. + do { + unsigned Byte = Value & 0x7f; + Value >>= 7; + IsMore = Value != Sign || ((Byte ^ Sign) & 0x40) != 0; + Size += sizeof(int8_t); + } while (IsMore); + return Size; +} + +//===----------------------------------------------------------------------===// +/// DWLabel - Labels are used to track locations in the assembler file. +/// Labels appear in the form debug_, where the tag is a +/// category of label (Ex. location) and number is a value unique in that +/// category. +class DWLabel { +public: + /// Tag - Label category tag. Should always be a staticly declared C string. /// - bool hasContent() const; + const char *Tag; - /// AddGlobal - Add a new global entity to the compile unit. + /// Number - Value to make label unique. /// - void AddGlobal(const std::string &Name, DIE *Die); + unsigned Number; + + DWLabel(const char *T, unsigned N) : Tag(T), Number(N) {} - /// getDieMapSlotFor - Returns the debug information entry map slot for the - /// specified debug descriptor. - DIE *&getDieMapSlotFor(DebugInfoDesc *DD) { - return DescToDieMap[DD]; + void Profile(FoldingSetNodeID &ID) const { + ID.AddString(std::string(Tag)); + ID.AddInteger(Number); } + +#ifndef NDEBUG + void print(std::ostream &O) const { + O << ".debug_" << Tag; + if (Number) O << Number; + } +#endif }; //===----------------------------------------------------------------------===// @@ -115,8 +151,13 @@ /// Dwarf abbreviation. class DIEAbbrevData { private: - unsigned Attribute; // Dwarf attribute code. - unsigned Form; // Dwarf form code. + /// Attribute - Dwarf attribute code. + /// + unsigned Attribute; + + /// Form - Dwarf form code. + /// + unsigned Form; public: DIEAbbrevData(unsigned A, unsigned F) @@ -130,7 +171,7 @@ /// Profile - Used to gather unique data for the abbreviation folding set. /// - void Profile(FoldingSetNodeID &ID) { + void Profile(FoldingSetNodeID &ID)const { ID.AddInteger(Attribute); ID.AddInteger(Form); } @@ -141,29 +182,40 @@ /// information object. class DIEAbbrev : public FoldingSetNode { private: - unsigned Number; // Unique number for abbreviation. - unsigned Tag; // Dwarf tag code. - unsigned ChildrenFlag; // Dwarf children flag. - std::vector Data; // Raw data bytes for abbreviation. + /// Tag - Dwarf tag code. + /// + unsigned Tag; + + /// Unique number for node. + /// + unsigned Number; + + /// ChildrenFlag - Dwarf children flag. + /// + unsigned ChildrenFlag; + + /// Data - Raw data bytes for abbreviation. + /// + std::vector Data; public: DIEAbbrev(unsigned T, unsigned C) - : Number(0) - , Tag(T) + : Tag(T) , ChildrenFlag(C) , Data() {} ~DIEAbbrev() {} // Accessors. - unsigned getNumber() const { return Number; } unsigned getTag() const { return Tag; } + unsigned getNumber() const { return Number; } unsigned getChildrenFlag() const { return ChildrenFlag; } const std::vector &getData() const { return Data; } - void setNumber(unsigned N) { Number = N; } + void setTag(unsigned T) { Tag = T; } void setChildrenFlag(unsigned CF) { ChildrenFlag = CF; } - + void setNumber(unsigned N) { Number = N; } + /// AddAttribute - Adds another set of attribute information to the /// abbreviation. void AddAttribute(unsigned Attribute, unsigned Form) { @@ -198,9 +250,95 @@ }; //===----------------------------------------------------------------------===// +/// DIE - A structured debug information entry. Has an abbreviation which +/// describes it's organization. +class DIE : public FoldingSetNode { +protected: + /// Abbrev - Buffer for constructing abbreviation. + /// + DIEAbbrev Abbrev; + + /// Offset - Offset in debug info section. + /// + unsigned Offset; + + /// Size - Size of instance + children. + /// + unsigned Size; + + /// Children DIEs. + /// + std::vector Children; + + /// Attributes values. + /// + std::vector Values; + +public: + DIE(unsigned Tag) + : Abbrev(Tag, DW_CHILDREN_no) + , Offset(0) + , Size(0) + , Children() + , Values() + {} + virtual ~DIE(); + + // Accessors. + DIEAbbrev &getAbbrev() { return Abbrev; } + unsigned getAbbrevNumber() const { + return Abbrev.getNumber(); + } + unsigned getOffset() const { return Offset; } + unsigned getSize() const { return Size; } + const std::vector &getChildren() const { return Children; } + const std::vector &getValues() const { return Values; } + void setTag(unsigned Tag) { Abbrev.setTag(Tag); } + void setOffset(unsigned O) { Offset = O; } + void setSize(unsigned S) { Size = S; } + + /// AddValue - Add a value and attributes to a DIE. + /// + void AddValue(unsigned Attribute, unsigned Form, DIEValue *Value) { + Abbrev.AddAttribute(Attribute, Form); + Values.push_back(Value); + } + + /// SiblingOffset - Return the offset of the debug information entry's + /// sibling. + unsigned SiblingOffset() const { return Offset + Size; } + + /// AddSiblingOffset - Add a sibling offset field to the front of the DIE. + /// + void AddSiblingOffset(); + + /// AddChild - Add a child to the DIE. + /// + void AddChild(DIE *Child) { + Abbrev.setChildrenFlag(DW_CHILDREN_yes); + Children.push_back(Child); + } + + /// Detach - Detaches objects connected to it after copying. + /// + void Detach() { + Children.clear(); + } + + /// Profile - Used to gather unique data for the value folding set. + /// + void Profile(FoldingSetNodeID &ID) ; + +#ifndef NDEBUG + void print(std::ostream &O, unsigned IncIndent = 0); + void dump(); +#endif +}; + +//===----------------------------------------------------------------------===// /// DIEValue - A debug information entry value. -// -class DIEValue { +/// +class DIEValue : public FoldingSetNode { public: enum { isInteger, @@ -212,11 +350,24 @@ isBlock }; - unsigned Type; // Type of the value + /// Type - Type of data stored in the value. + /// + unsigned Type; + + /// Usage - Number of uses of this value. + /// + unsigned Usage; - DIEValue(unsigned T) : Type(T) {} + DIEValue(unsigned T) + : Type(T) + , Usage(1) + {} virtual ~DIEValue() {} + unsigned getType() const { return Type; } + unsigned getUsage() const { return Usage; } + void IncUsage() { ++Usage; } + // Implement isa/cast/dyncast. static bool classof(const DIEValue *) { return true; } @@ -227,6 +378,15 @@ /// SizeOf - Return the size of a value in bytes. /// virtual unsigned SizeOf(const Dwarf &DW, unsigned Form) const = 0; + + /// Profile - Used to gather unique data for the value folding set. + /// + virtual void Profile(FoldingSetNodeID &ID) = 0; + +#ifndef NDEBUG + virtual void print(std::ostream &O) = 0; + void dump(); +#endif }; //===----------------------------------------------------------------------===// @@ -245,21 +405,62 @@ /// BestForm - Choose the best form for integer. /// - unsigned BestForm(bool IsSigned); - + static unsigned BestForm(bool IsSigned, uint64_t Integer) { + if (IsSigned) { + if ((char)Integer == (signed)Integer) return DW_FORM_data1; + if ((short)Integer == (signed)Integer) return DW_FORM_data2; + if ((int)Integer == (signed)Integer) return DW_FORM_data4; + } else { + if ((unsigned char)Integer == Integer) return DW_FORM_data1; + if ((unsigned short)Integer == Integer) return DW_FORM_data2; + if ((unsigned int)Integer == Integer) return DW_FORM_data4; + } + return DW_FORM_data8; + } + /// EmitValue - Emit integer of appropriate size. /// virtual void EmitValue(const Dwarf &DW, unsigned Form) const; /// SizeOf - Determine size of integer value in bytes. /// - virtual unsigned SizeOf(const Dwarf &DW, unsigned Form) const; + virtual unsigned SizeOf(const Dwarf &DW, unsigned Form) const { + switch (Form) { + case DW_FORM_flag: // Fall thru + case DW_FORM_ref1: // Fall thru + case DW_FORM_data1: return sizeof(int8_t); + case DW_FORM_ref2: // Fall thru + case DW_FORM_data2: return sizeof(int16_t); + case DW_FORM_ref4: // Fall thru + case DW_FORM_data4: return sizeof(int32_t); + case DW_FORM_ref8: // Fall thru + case DW_FORM_data8: return sizeof(int64_t); + case DW_FORM_udata: return SizeULEB128(Integer); + case DW_FORM_sdata: return SizeSLEB128(Integer); + default: assert(0 && "DIE Value form not supported yet"); break; + } + return 0; + } + + /// Profile - Used to gather unique data for the value folding set. + /// + virtual void Profile(FoldingSetNodeID &ID) { + ID.AddInteger(Integer); + } + +#ifndef NDEBUG + virtual void print(std::ostream &O) { + O << "Int: " << (int64_t)Integer + << " 0x" << std::hex << Integer << std::dec; + } +#endif }; //===----------------------------------------------------------------------===// /// DIEString - A string value DIE. /// -struct DIEString : public DIEValue { +class DIEString : public DIEValue { +public: const std::string String; DIEString(const std::string &S) : DIEValue(isString), String(S) {} @@ -274,13 +475,29 @@ /// SizeOf - Determine size of string value in bytes. /// - virtual unsigned SizeOf(const Dwarf &DW, unsigned Form) const; + virtual unsigned SizeOf(const Dwarf &DW, unsigned Form) const { + return String.size() + sizeof(char); // sizeof('\0'); + } + + /// Profile - Used to gather unique data for the value folding set. + /// + virtual void Profile(FoldingSetNodeID &ID) { + ID.AddString(String); + } + +#ifndef NDEBUG + virtual void print(std::ostream &O) { + O << "Str: \"" << String << "\""; + } +#endif }; //===----------------------------------------------------------------------===// /// DIEDwarfLabel - A Dwarf internal label expression DIE. // -struct DIEDwarfLabel : public DIEValue { +class DIEDwarfLabel : public DIEValue { +public: + const DWLabel Label; DIEDwarfLabel(const DWLabel &L) : DIEValue(isLabel), Label(L) {} @@ -296,13 +513,27 @@ /// SizeOf - Determine size of label value in bytes. /// virtual unsigned SizeOf(const Dwarf &DW, unsigned Form) const; + + /// Profile - Used to gather unique data for the value folding set. + /// + virtual void Profile(FoldingSetNodeID &ID) { + Label.Profile(ID); + } + +#ifndef NDEBUG + virtual void print(std::ostream &O) { + O << "Lbl: "; + Label.print(O); + } +#endif }; //===----------------------------------------------------------------------===// /// DIEObjectLabel - A label to an object in code or data. // -struct DIEObjectLabel : public DIEValue { +class DIEObjectLabel : public DIEValue { +public: const std::string Label; DIEObjectLabel(const std::string &L) : DIEValue(isAsIsLabel), Label(L) {} @@ -318,12 +549,25 @@ /// SizeOf - Determine size of label value in bytes. /// virtual unsigned SizeOf(const Dwarf &DW, unsigned Form) const; + + /// Profile - Used to gather unique data for the value folding set. + /// + virtual void Profile(FoldingSetNodeID &ID) { + ID.AddString(Label); + } + +#ifndef NDEBUG + virtual void print(std::ostream &O) { + O << "Obj: " << Label; + } +#endif }; //===----------------------------------------------------------------------===// /// DIEDelta - A simple label difference DIE. /// -struct DIEDelta : public DIEValue { +class DIEDelta : public DIEValue { +public: const DWLabel LabelHi; const DWLabel LabelLo; @@ -341,16 +585,34 @@ /// SizeOf - Determine size of delta value in bytes. /// virtual unsigned SizeOf(const Dwarf &DW, unsigned Form) const; + + /// Profile - Used to gather unique data for the value folding set. + /// + virtual void Profile(FoldingSetNodeID &ID){ + LabelHi.Profile(ID); + LabelLo.Profile(ID); + } + +#ifndef NDEBUG + virtual void print(std::ostream &O) { + O << "Del: "; + LabelHi.print(O); + O << "-"; + LabelLo.print(O); + } +#endif }; //===----------------------------------------------------------------------===// -/// DIEntry - A pointer to a debug information entry. -/// -struct DIEntry : public DIEValue { +/// DIEntry - A pointer to another debug information entry. An instance of this +/// class can also be used as a proxy for a debug information entry not yet +/// defined (ie. types.) +class DIEntry : public DIEValue { +public: DIE *Entry; DIEntry(DIE *E) : DIEValue(isEntry), Entry(E) {} - + // Implement isa/cast/dyncast. static bool classof(const DIEntry *) { return true; } static bool classof(const DIEValue *E) { return E->Type == isEntry; } @@ -361,25 +623,42 @@ /// SizeOf - Determine size of debug information entry in bytes. /// - virtual unsigned SizeOf(const Dwarf &DW, unsigned Form) const; + virtual unsigned SizeOf(const Dwarf &DW, unsigned Form) const { + return sizeof(int32_t); + } + + /// Profile - Used to gather unique data for the value folding set. + /// + virtual void Profile(FoldingSetNodeID &ID) { + if (Entry) { + ID.AddPointer(Entry); + } else { + ID.AddPointer(this); + } + } + +#ifndef NDEBUG + virtual void print(std::ostream &O) { + O << "Die: 0x" << std::hex << (intptr_t)Entry << std::dec; + } +#endif }; //===----------------------------------------------------------------------===// /// DIEBlock - A block of values. Primarily used for location expressions. // -struct DIEBlock : public DIEValue { +class DIEBlock : public DIEValue, public DIE { +public: unsigned Size; // Size in bytes excluding size header. - std::vector Forms; // Data forms. - std::vector Values; // Block values. DIEBlock() : DIEValue(isBlock) + , DIE(0) , Size(0) - , Forms() - , Values() {} - ~DIEBlock(); - + ~DIEBlock() { + } + // Implement isa/cast/dyncast. static bool classof(const DIEBlock *) { return true; } static bool classof(const DIEValue *E) { return E->Type == isBlock; } @@ -390,7 +669,12 @@ /// BestForm - Choose the best form for data. /// - unsigned BestForm(); + unsigned BestForm() const { + if ((unsigned char)Size == Size) return DW_FORM_block1; + if ((unsigned short)Size == Size) return DW_FORM_block2; + if ((unsigned int)Size == Size) return DW_FORM_block4; + return DW_FORM_block; + } /// EmitValue - Emit block data. /// @@ -399,118 +683,130 @@ /// SizeOf - Determine size of block data in bytes. /// virtual unsigned SizeOf(const Dwarf &DW, unsigned Form) const; + - /// AddUInt - Add an unsigned integer value. - /// - void AddUInt(unsigned Form, uint64_t Integer); - - /// AddSInt - Add an signed integer value. - /// - void AddSInt(unsigned Form, int64_t Integer); - - /// AddString - Add a std::string value. + /// Profile - Used to gather unique data for the value folding set. /// - void AddString(unsigned Form, const std::string &String); - - /// AddLabel - Add a Dwarf label value. - /// - void AddLabel(unsigned Form, const DWLabel &Label); - - /// AddObjectLabel - Add a non-Dwarf label value. - /// - void AddObjectLabel(unsigned Form, const std::string &Label); - - /// AddDelta - Add a label delta value. - /// - void AddDelta(unsigned Form, const DWLabel &Hi, const DWLabel &Lo); - - /// AddDIEntry - Add a DIE value. - /// - void AddDIEntry(unsigned Form, DIE *Entry); - + virtual void DIEBlock::Profile(FoldingSetNodeID &ID) { + DIE::Profile(ID); + } + +#ifndef NDEBUG + virtual void print(std::ostream &O) { + O << "Blk: "; + DIE::print(O, 5); + } +#endif }; //===----------------------------------------------------------------------===// -/// DIE - A structured debug information entry. Has an abbreviation which -/// describes it's organization. -class DIE { +/// CompileUnit - This dwarf writer support class manages information associate +/// with a source file. +class CompileUnit { private: - DIEAbbrev Abbrev; // Buffer for constructing abbreviation. - unsigned Offset; // Offset in debug info section. - unsigned Size; // Size of instance + children. - std::vector Children; // Children DIEs. - std::vector Values; // Attributes values. - -public: - DIE(unsigned Tag); - ~DIE(); - - // Accessors. - unsigned getAbbrevNumber() const { - return Abbrev.getNumber(); - } - unsigned getOffset() const { return Offset; } - unsigned getSize() const { return Size; } - const std::vector &getChildren() const { return Children; } - const std::vector &getValues() const { return Values; } - void setOffset(unsigned O) { Offset = O; } - void setSize(unsigned S) { Size = S; } + /// Desc - Compile unit debug descriptor. + /// + CompileUnitDesc *Desc; - /// SiblingOffset - Return the offset of the debug information entry's - /// sibling. - unsigned SiblingOffset() const { return Offset + Size; } + /// ID - File identifier for source. + /// + unsigned ID; - /// AddSiblingOffset - Add a sibling offset field to the front of the DIE. + /// Die - Compile unit debug information entry. /// - void AddSiblingOffset(); + DIE *Die; + + /// DescToDieMap - Tracks the mapping of unit level debug informaton + /// descriptors to debug information entries. + std::map DescToDieMap; - /// AddUInt - Add an unsigned integer attribute data and value. - /// - void AddUInt(unsigned Attribute, unsigned Form, uint64_t Integer); + /// DescToDIEntryMap - Tracks the mapping of unit level debug informaton + /// descriptors to debug information entries using a DIEntry proxy. + std::map DescToDIEntryMap; - /// AddSInt - Add an signed integer attribute data and value. - /// - void AddSInt(unsigned Attribute, unsigned Form, int64_t Integer); - - /// AddString - Add a std::string attribute data and value. - /// - void AddString(unsigned Attribute, unsigned Form, - const std::string &String); - - /// AddLabel - Add a Dwarf label attribute data and value. + /// Globals - A map of globally visible named entities for this unit. /// - void AddLabel(unsigned Attribute, unsigned Form, const DWLabel &Label); - - /// AddObjectLabel - Add a non-Dwarf label attribute data and value. - /// - void AddObjectLabel(unsigned Attribute, unsigned Form, - const std::string &Label); - - /// AddDelta - Add a label delta attribute data and value. + std::map Globals; + + /// DiesSet - Used to uniquely define dies within the compile unit. /// - void AddDelta(unsigned Attribute, unsigned Form, - const DWLabel &Hi, const DWLabel &Lo); - - /// AddDIEntry - Add a DIE attribute data and value. + FoldingSet DiesSet; + + /// Dies - List of all dies in the compile unit. /// - void AddDIEntry(unsigned Attribute, unsigned Form, DIE *Entry); + std::vector Dies; + +public: + CompileUnit(CompileUnitDesc *CUD, unsigned I, DIE *D) + : Desc(CUD) + , ID(I) + , Die(D) + , DescToDieMap() + , DescToDIEntryMap() + , Globals() + , DiesSet(InitDiesSetSize) + , Dies() + {} + + ~CompileUnit() { + delete Die; + + for (unsigned i = 0, N = Dies.size(); i < N; ++i) + delete Dies[i]; + } + + // Accessors. + CompileUnitDesc *getDesc() const { return Desc; } + unsigned getID() const { return ID; } + DIE* getDie() const { return Die; } + std::map &getGlobals() { return Globals; } - /// AddBlock - Add block data. + /// hasContent - Return true if this compile unit has something to write out. /// - void AddBlock(unsigned Attribute, unsigned Form, DIEBlock *Block); + bool hasContent() const { + return !Die->getChildren().empty(); + } - /// Complete - Indicate that all attributes have been added and - /// ready to get an abbreviation ID. + /// AddGlobal - Add a new global entity to the compile unit. /// - void Complete(Dwarf &DW); + void AddGlobal(const std::string &Name, DIE *Die) { + Globals[Name] = Die; + } - /// AddChild - Add a child to the DIE. - void AddChild(DIE *Child); + /// getDieMapSlotFor - Returns the debug information entry map slot for the + /// specified debug descriptor. + DIE *&getDieMapSlotFor(DebugInfoDesc *DD) { + return DescToDieMap[DD]; + } + + /// getDIEntrySlotFor - Returns the debug information entry proxy slot for the + /// specified debug descriptor. + DIEntry *&getDIEntrySlotFor(DebugInfoDesc *DD) { + return DescToDIEntryMap[DD]; + } + + /// AddDie - Adds or interns the DIE to the compile unit. + /// + DIE *AddDie(DIE &Buffer) { + FoldingSetNodeID ID; + Buffer.Profile(ID); + void *Where; + DIE *Die = DiesSet.FindNodeOrInsertPos(ID, Where); + + if (!Die) { + Die = new DIE(Buffer); + DiesSet.InsertNode(Die, Where); + this->Die->AddChild(Die); + Buffer.Detach(); + } + + return Die; + } }; //===----------------------------------------------------------------------===// -/// Dwarf - Emits Dwarf debug and exception handling directives. -// +/// Dwarf - Emits Dwarf debug and exception handling directives. +/// class Dwarf { private: @@ -569,7 +865,7 @@ /// of each entry in this vector corresponds to the sources in DebugInfo. std::vector CompileUnits; - /// AbbreviationsSet - Used to uniquely define the abbreviations. + /// AbbreviationsSet - Used to uniquely define abbreviations. /// FoldingSet AbbreviationsSet; @@ -577,19 +873,22 @@ /// std::vector Abbreviations; + /// ValuesSet - Used to uniquely define values. + /// + FoldingSet ValuesSet; + + /// Values - A list of all the unique values in use. + /// + std::vector Values; + /// StringPool - A UniqueVector of strings used by indirect references. - /// UnitMap - Map debug information descriptor to compile unit. - /// + /// UniqueVector StringPool; /// UnitMap - Map debug information descriptor to compile unit. /// std::map DescToUnitMap; - /// DescToDieMap - Tracks the mapping of top level debug informaton - /// descriptors to debug information entries. - std::map DescToDieMap; - /// SectionMap - Provides a unique id per text section. /// UniqueVector SectionMap; @@ -607,82 +906,167 @@ /// PrintHex - Print a value as a hexidecimal value. /// - void PrintHex(int Value) const; + void PrintHex(int Value) const { + O << "0x" << std::hex << Value << std::dec; + } /// 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; + void EOL(const std::string &Comment) const { + if (DwarfVerbose && !Comment.empty()) { + O << "\t" + << TAI->getCommentString() + << " " + << Comment; + } + O << "\n"; + } /// EmitAlign - Print a align directive. /// - void EmitAlign(unsigned Alignment) const; + void EmitAlign(unsigned Alignment) const { + O << TAI->getAlignDirective() << Alignment << "\n"; + } /// EmitULEB128Bytes - Emit an assembler byte data directive to compose an /// unsigned leb128 value. - void EmitULEB128Bytes(unsigned Value) const; + void EmitULEB128Bytes(unsigned Value) const { + if (TAI->hasLEB128()) { + O << "\t.uleb128\t" + << Value; + } else { + O << TAI->getData8bitsDirective(); + PrintULEB128(O, Value); + } + } /// EmitSLEB128Bytes - print an assembler byte data directive to compose a /// signed leb128 value. - void EmitSLEB128Bytes(int Value) const; - - /// 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); + void EmitSLEB128Bytes(int Value) const { + if (TAI->hasLEB128()) { + O << "\t.sleb128\t" + << Value; + } else { + O << TAI->getData8bitsDirective(); + PrintSLEB128(O, Value); + } + } /// EmitInt8 - Emit a byte directive and value. /// - void EmitInt8(int Value) const; + void EmitInt8(int Value) const { + O << TAI->getData8bitsDirective(); + PrintHex(Value & 0xFF); + } /// EmitInt16 - Emit a short directive and value. /// - void EmitInt16(int Value) const; + void EmitInt16(int Value) const { + O << TAI->getData16bitsDirective(); + PrintHex(Value & 0xFFFF); + } /// EmitInt32 - Emit a long directive and value. /// - void EmitInt32(int Value) const; - + void EmitInt32(int Value) const { + O << TAI->getData32bitsDirective(); + PrintHex(Value); + } + /// EmitInt64 - Emit a long long directive and value. /// - void EmitInt64(uint64_t Value) const; - + void EmitInt64(uint64_t Value) const { + if (TAI->getData64bitsDirective()) { + O << TAI->getData64bitsDirective(); + PrintHex(Value); + } else { + if (TD->isBigEndian()) { + EmitInt32(unsigned(Value >> 32)); O << "\n"; + EmitInt32(unsigned(Value)); + } else { + EmitInt32(unsigned(Value)); O << "\n"; + EmitInt32(unsigned(Value >> 32)); + } + } + } + /// EmitString - Emit a string with quotes and a null terminator. - /// Special characters are emitted properly. + /// Special characters are emitted properly. /// \literal (Eg. '\t') \endliteral - void EmitString(const std::string &String) const; + void EmitString(const std::string &String) const { + O << TAI->getAsciiDirective() + << "\""; + for (unsigned i = 0, N = String.size(); i < N; ++i) { + unsigned char C = String[i]; + + if (!isascii(C) || iscntrl(C)) { + switch(C) { + case '\b': O << "\\b"; break; + case '\f': O << "\\f"; break; + case '\n': O << "\\n"; break; + case '\r': O << "\\r"; break; + case '\t': O << "\\t"; break; + default: + O << '\\'; + O << char('0' + ((C >> 6) & 7)); + O << char('0' + ((C >> 3) & 7)); + O << char('0' + ((C >> 0) & 7)); + break; + } + } else if (C == '\"') { + O << "\\\""; + } else if (C == '\'') { + O << "\\\'"; + } else { + O << C; + } + } + O << "\\0\""; + } /// PrintLabelName - Print label name in form used by Dwarf writer. /// void PrintLabelName(DWLabel Label) const { PrintLabelName(Label.Tag, Label.Number); } - void PrintLabelName(const char *Tag, unsigned Number) const; + void PrintLabelName(const char *Tag, unsigned Number) const { + O << TAI->getPrivateGlobalPrefix() + << "debug_" + << Tag; + if (Number) O << Number; + } /// EmitLabel - Emit location label for internal use by Dwarf. /// void EmitLabel(DWLabel Label) const { EmitLabel(Label.Tag, Label.Number); } - void EmitLabel(const char *Tag, unsigned Number) const; + void EmitLabel(const char *Tag, unsigned Number) const { + PrintLabelName(Tag, Number); + O << ":\n"; + } /// EmitReference - Emit a reference to a label. /// void EmitReference(DWLabel Label) const { EmitReference(Label.Tag, Label.Number); } - void EmitReference(const char *Tag, unsigned Number) const; - void EmitReference(const std::string &Name) const; + void EmitReference(const char *Tag, unsigned Number) const { + if (TAI->getAddressSize() == 4) + O << TAI->getData32bitsDirective(); + else + O << TAI->getData64bitsDirective(); + + PrintLabelName(Tag, Number); + } + void EmitReference(const std::string &Name) const { + if (TAI->getAddressSize() == 4) + O << TAI->getData32bitsDirective(); + else + O << TAI->getData64bitsDirective(); + + O << Name; + } /// EmitDifference - Emit the difference between two labels. Some /// assemblers do not behave with absolute expressions with data directives, @@ -691,2349 +1075,2012 @@ EmitDifference(LabelHi.Tag, LabelHi.Number, LabelLo.Tag, LabelLo.Number); } void EmitDifference(const char *TagHi, unsigned NumberHi, - const char *TagLo, unsigned NumberLo) const; + const char *TagLo, unsigned NumberLo) const { + if (TAI->needsSet()) { + static unsigned SetCounter = 0; + + O << "\t.set\t"; + PrintLabelName("set", SetCounter); + O << ","; + PrintLabelName(TagHi, NumberHi); + O << "-"; + PrintLabelName(TagLo, NumberLo); + O << "\n"; + + if (TAI->getAddressSize() == sizeof(int32_t)) + O << TAI->getData32bitsDirective(); + else + O << TAI->getData64bitsDirective(); + + PrintLabelName("set", SetCounter); + + ++SetCounter; + } else { + if (TAI->getAddressSize() == sizeof(int32_t)) + O << TAI->getData32bitsDirective(); + else + O << TAI->getData64bitsDirective(); + + PrintLabelName(TagHi, NumberHi); + O << "-"; + PrintLabelName(TagLo, NumberLo); + } + } /// AssignAbbrevNumber - Define a unique number for the abbreviation. /// - void AssignAbbrevNumber(DIEAbbrev *Abbrev); - + void AssignAbbrevNumber(DIEAbbrev &Abbrev) { + // Profile the node so that we can make it unique. + FoldingSetNodeID ID; + Abbrev.Profile(ID); + + // Check the set for priors. + DIEAbbrev *InSet = AbbreviationsSet.GetOrInsertNode(&Abbrev); + + // If it's newly added. + if (InSet == &Abbrev) { + // Add to abbreviation list. + Abbreviations.push_back(&Abbrev); + // Assign the vector position + 1 as its number. + Abbrev.setNumber(Abbreviations.size()); + } else { + // Assign existing abbreviation number. + Abbrev.setNumber(InSet->getNumber()); + } + } + /// NewString - Add a string to the constant pool and returns a label. /// - DWLabel NewString(const std::string &String); + DWLabel NewString(const std::string &String) { + unsigned StringID = StringPool.insert(String); + return DWLabel("string", StringID); + } + + /// NewDIEntry - Creates a new DIEntry to be a proxy for a debug information + /// entry. + DIEntry *NewDIEntry(DIE *Entry = NULL) { + DIEntry *Value; + + if (Entry) { + FoldingSetNodeID ID; + ID.AddPointer(Entry); + void *Where; + Value = static_cast(ValuesSet.FindNodeOrInsertPos(ID, Where)); + + if (Value) { + Value->IncUsage(); + return Value; + } + + Value = new DIEntry(Entry); + ValuesSet.InsertNode(Value, Where); + } else { + Value = new DIEntry(Entry); + } + + Values.push_back(Value); + return Value; + } - /// getDieMapSlotFor - Returns the debug information entry map slot for the - /// specified debug descriptor. - DIE *&getDieMapSlotFor(DebugInfoDesc *DD); - -private: + /// SetDIEntry - Set a DIEntry once the debug information entry is defined. + /// + void SetDIEntry(DIEntry *Value, DIE *Entry) { + Value->Entry = Entry; + // Add to values set if not already there. If it is, we merely have a + // duplicate in the values list (no harm.) + ValuesSet.GetOrInsertNode(Value); + } - /// AddSourceLine - Add location information to specified debug information - /// entry. - void AddSourceLine(DIE *Die, CompileUnitDesc *File, unsigned Line); + /// AddUInt - Add an unsigned integer attribute data and value. + /// + void AddUInt(DIE *Die, unsigned Attribute, unsigned Form, uint64_t Integer) { + if (!Form) Form = DIEInteger::BestForm(false, Integer); - /// AddAddress - Add an address attribute to a die based on the location - /// provided. - void AddAddress(DIE *Die, unsigned Attribute, - const MachineLocation &Location); + FoldingSetNodeID ID; + ID.AddInteger(Integer); + void *Where; + DIEValue *Value = ValuesSet.FindNodeOrInsertPos(ID, Where); + if (!Value) { + Value = new DIEInteger(Integer); + ValuesSet.InsertNode(Value, Where); + Values.push_back(Value); + } else { + Value->IncUsage(); + } + + Die->AddValue(Attribute, Form, Value); + } + + /// AddSInt - Add an signed integer attribute data and value. + /// + void AddSInt(DIE *Die, unsigned Attribute, unsigned Form, int64_t Integer) { + if (!Form) Form = DIEInteger::BestForm(true, Integer); - /// NewType - Create a new type DIE. + FoldingSetNodeID ID; + ID.AddInteger((uint64_t)Integer); + void *Where; + DIEValue *Value = ValuesSet.FindNodeOrInsertPos(ID, Where); + if (!Value) { + Value = new DIEInteger(Integer); + ValuesSet.InsertNode(Value, Where); + Values.push_back(Value); + } else { + Value->IncUsage(); + } + + Die->AddValue(Attribute, Form, Value); + } + + /// AddString - Add a std::string attribute data and value. /// - DIE *NewType(DIE *Context, TypeDesc *TyDesc, CompileUnit *Unit); + void AddString(DIE *Die, unsigned Attribute, unsigned Form, + const std::string &String) { + FoldingSetNodeID ID; + ID.AddString(String); + void *Where; + DIEValue *Value = ValuesSet.FindNodeOrInsertPos(ID, Where); + if (!Value) { + Value = new DIEString(String); + ValuesSet.InsertNode(Value, Where); + Values.push_back(Value); + } else { + Value->IncUsage(); + } - /// NewCompileUnit - Create new compile unit and it's die. + Die->AddValue(Attribute, Form, Value); + } + + /// AddLabel - Add a Dwarf label attribute data and value. /// - CompileUnit *NewCompileUnit(CompileUnitDesc *UnitDesc, unsigned ID); + void AddLabel(DIE *Die, unsigned Attribute, unsigned Form, + const DWLabel &Label) { + FoldingSetNodeID ID; + Label.Profile(ID); + void *Where; + DIEValue *Value = ValuesSet.FindNodeOrInsertPos(ID, Where); + if (!Value) { + Value = new DIEDwarfLabel(Label); + ValuesSet.InsertNode(Value, Where); + Values.push_back(Value); + } else { + Value->IncUsage(); + } - /// FindCompileUnit - Get the compile unit for the given descriptor. + Die->AddValue(Attribute, Form, Value); + } + + /// AddObjectLabel - Add an non-Dwarf label attribute data and value. /// - CompileUnit *FindCompileUnit(CompileUnitDesc *UnitDesc); + void AddObjectLabel(DIE *Die, unsigned Attribute, unsigned Form, + const std::string &Label) { + FoldingSetNodeID ID; + ID.AddString(Label); + void *Where; + DIEValue *Value = ValuesSet.FindNodeOrInsertPos(ID, Where); + if (!Value) { + Value = new DIEObjectLabel(Label); + ValuesSet.InsertNode(Value, Where); + Values.push_back(Value); + } else { + Value->IncUsage(); + } - /// NewGlobalVariable - Make a new global variable DIE. + Die->AddValue(Attribute, Form, Value); + } + + /// AddDelta - Add a label delta attribute data and value. /// - DIE *NewGlobalVariable(GlobalVariableDesc *GVD); - - /// NewSubprogram - Add a new subprogram DIE. + void AddDelta(DIE *Die, unsigned Attribute, unsigned Form, + const DWLabel &Hi, const DWLabel &Lo) { + FoldingSetNodeID ID; + Hi.Profile(ID); + Lo.Profile(ID); + void *Where; + DIEValue *Value = ValuesSet.FindNodeOrInsertPos(ID, Where); + if (!Value) { + Value = new DIEDelta(Hi, Lo); + ValuesSet.InsertNode(Value, Where); + Values.push_back(Value); + } else { + Value->IncUsage(); + } + + Die->AddValue(Attribute, Form, Value); + } + + /// AddDIEntry - Add a DIE attribute data and value. /// - DIE *NewSubprogram(SubprogramDesc *SPD); + void AddDIEntry(DIE *Die, unsigned Attribute, unsigned Form, DIE *Entry) { + Die->AddValue(Attribute, Form, NewDIEntry(Entry)); + } - /// NewScopeVariable - Create a new scope variable. + /// AddBlock - Add block data. /// - DIE *NewScopeVariable(DebugVariable *DV, CompileUnit *Unit); + void AddBlock(DIE *Die, unsigned Attribute, unsigned Form, DIEBlock *Block) { + Block->ComputeSize(*this); + FoldingSetNodeID ID; + Block->Profile(ID); + void *Where; + DIEValue *Value = ValuesSet.FindNodeOrInsertPos(ID, Where); + if (!Value) { + Value = Block; + ValuesSet.InsertNode(Value, Where); + Values.push_back(Value); + } else { + Value->IncUsage(); + delete Block; + } + + Die->AddValue(Attribute, Block->BestForm(), Value); + } - /// ConstructScope - Construct the components of a scope. - /// - void ConstructScope(DebugScope *ParentScope, DIE *ParentDie, - CompileUnit *Unit); +private: - /// ConstructRootScope - Construct the scope for the subprogram. - /// - void ConstructRootScope(DebugScope *RootScope); + /// AddSourceLine - Add location information to specified debug information + /// entry. + void AddSourceLine(DIE *Die, CompileUnitDesc *File, unsigned Line) { + if (File && Line) { + CompileUnit *FileUnit = FindCompileUnit(File); + unsigned FileID = FileUnit->getID(); + AddUInt(Die, DW_AT_decl_file, 0, FileID); + AddUInt(Die, DW_AT_decl_line, 0, Line); + } + } - /// EmitInitial - Emit initial Dwarf declarations. - /// - void EmitInitial(); + /// AddAddress - Add an address attribute to a die based on the location + /// provided. + void AddAddress(DIE *Die, unsigned Attribute, + const MachineLocation &Location) { + unsigned Reg = RI->getDwarfRegNum(Location.getRegister()); + DIEBlock *Block = new DIEBlock(); + + if (Location.isRegister()) { + if (Reg < 32) { + AddUInt(Block, 0, DW_FORM_data1, DW_OP_reg0 + Reg); + } else { + AddUInt(Block, 0, DW_FORM_data1, DW_OP_regx); + AddUInt(Block, 0, DW_FORM_udata, Reg); + } + } else { + if (Reg < 32) { + AddUInt(Block, 0, DW_FORM_data1, DW_OP_breg0 + Reg); + } else { + AddUInt(Block, 0, DW_FORM_data1, DW_OP_bregx); + AddUInt(Block, 0, DW_FORM_udata, Reg); + } + AddUInt(Block, 0, DW_FORM_sdata, Location.getOffset()); + } + + AddBlock(Die, Attribute, 0, Block); + } - /// EmitDIE - Recusively Emits a debug information entry. + /// AddBasicType - Add a new basic type attribute to the specified entity. /// - void EmitDIE(DIE *Die) const; + void AddBasicType(DIE *Entity, CompileUnit *Unit, + const std::string &Name, + unsigned Encoding, unsigned Size) { + DIE *Die = ConstructBasicType(Unit, Name, Encoding, Size); + AddDIEntry(Entity, DW_AT_type, DW_FORM_ref4, Die); + } - /// SizeAndOffsetDie - Compute the size and offset of a DIE. - /// - unsigned SizeAndOffsetDie(DIE *Die, unsigned Offset, bool Last); - - /// SizeAndOffsets - Compute the size and offset of all the DIEs. + /// ConstructBasicType - Construct a new basic type. /// - void SizeAndOffsets(); + DIE *ConstructBasicType(CompileUnit *Unit, + const std::string &Name, + unsigned Encoding, unsigned Size) { + DIE Buffer(DW_TAG_base_type); + AddUInt(&Buffer, DW_AT_byte_size, 0, Size); + AddUInt(&Buffer, DW_AT_encoding, DW_FORM_data1, Encoding); + if (!Name.empty()) AddString(&Buffer, DW_AT_name, DW_FORM_string, Name); + return Unit->AddDie(Buffer); + } - /// EmitFrameMoves - Emit frame instructions to describe the layout of the - /// frame. - void EmitFrameMoves(const char *BaseLabel, unsigned BaseLabelID, - std::vector &Moves); - - /// EmitDebugInfo - Emit the debug info section. + /// AddPointerType - Add a new pointer type attribute to the specified entity. /// - void EmitDebugInfo() const; + void AddPointerType(DIE *Entity, CompileUnit *Unit, const std::string &Name) { + DIE *Die = ConstructPointerType(Unit, Name); + AddDIEntry(Entity, DW_AT_type, DW_FORM_ref4, Die); + } - /// EmitAbbreviations - Emit the abbreviation section. - /// - void EmitAbbreviations() const; - - /// EmitDebugLines - Emit source line information. - /// - void EmitDebugLines() const; - - /// EmitInitialDebugFrame - Emit common frame info into a debug frame section. - /// - void EmitInitialDebugFrame(); - - /// EmitFunctionDebugFrame - Emit per function frame info into a debug frame - /// section. - void EmitFunctionDebugFrame(); - - /// EmitDebugPubNames - Emit info into a debug pubnames section. + /// ConstructPointerType - Construct a new pointer type. /// - void EmitDebugPubNames(); - - /// EmitDebugStr - Emit info into a debug str section. - /// - void EmitDebugStr(); - - /// EmitDebugLoc - Emit info into a debug loc section. - /// - void EmitDebugLoc(); - - /// EmitDebugARanges - Emit info into a debug aranges section. - /// - void EmitDebugARanges(); - - /// EmitDebugRanges - Emit info into a debug ranges section. - /// - void EmitDebugRanges(); - - /// EmitDebugMacInfo - Emit info into a debug macinfo section. - /// - void EmitDebugMacInfo(); - - /// ConstructCompileUnitDIEs - Create a compile unit DIE for each source and - /// header file. - void ConstructCompileUnitDIEs(); - - /// ConstructGlobalDIEs - Create DIEs for each of the externally visible - /// global variables. - void ConstructGlobalDIEs(); - - /// ConstructSubprogramDIEs - Create DIEs for each of the externally visible - /// subprograms. - void ConstructSubprogramDIEs(); - - /// ShouldEmitDwarf - Returns true if Dwarf declarations should be made. - /// - bool ShouldEmitDwarf() const { return shouldEmit; } - -public: - - Dwarf(std::ostream &OS, AsmPrinter *A, const TargetAsmInfo *T); - virtual ~Dwarf(); - - // Accessors. - // - const TargetAsmInfo *getTargetAsmInfo() const { return TAI; } - - /// SetDebugInfo - Set DebugInfo when it's known that pass manager has - /// created it. Set by the target AsmPrinter. - void SetDebugInfo(MachineDebugInfo *DI); - - //===--------------------------------------------------------------------===// - // Main entry points. - // - - /// BeginModule - Emit all Dwarf sections that should come prior to the - /// content. - void BeginModule(Module *M); + DIE *ConstructPointerType(CompileUnit *Unit, const std::string &Name) { + DIE Buffer(DW_TAG_pointer_type); + AddUInt(&Buffer, DW_AT_byte_size, 0, TAI->getAddressSize()); + if (!Name.empty()) AddString(&Buffer, DW_AT_name, DW_FORM_string, Name); + return Unit->AddDie(Buffer); + } - /// EndModule - Emit all Dwarf sections that should come after the content. + /// AddType - Add a new type attribute to the specified entity. /// - void EndModule(); - - /// BeginFunction - Gather pre-function debug information. Assumes being - /// emitted immediately after the function entry point. - void BeginFunction(MachineFunction *MF); - - /// EndFunction - Gather and emit post-function debug information. - /// - void EndFunction(); -}; - -} // End of namespace llvm - -//===----------------------------------------------------------------------===// - -CompileUnit::~CompileUnit() { - delete Die; -} - -/// hasContent - Return true if this compile unit has something to write out. -/// -bool CompileUnit::hasContent() const { - return !Die->getChildren().empty(); -} - -/// AddGlobal - Add a new global entity to the compile unit. -/// -void CompileUnit::AddGlobal(const std::string &Name, DIE *Die) { - Globals[Name] = Die; -} - -//===----------------------------------------------------------------------===// - -/// Emit - Print the abbreviation using the specified Dwarf writer. -/// -void DIEAbbrev::Emit(const Dwarf &DW) const { - // Emit its Dwarf tag type. - DW.EmitULEB128Bytes(Tag); - DW.EOL(TagString(Tag)); - - // Emit whether it has children DIEs. - DW.EmitULEB128Bytes(ChildrenFlag); - DW.EOL(ChildrenString(ChildrenFlag)); - - // For each attribute description. - for (unsigned i = 0, N = Data.size(); i < N; ++i) { - const DIEAbbrevData &AttrData = Data[i]; - - // Emit attribute type. - DW.EmitULEB128Bytes(AttrData.getAttribute()); - DW.EOL(AttributeString(AttrData.getAttribute())); - - // Emit form type. - DW.EmitULEB128Bytes(AttrData.getForm()); - DW.EOL(FormEncodingString(AttrData.getForm())); + void AddType(DIE *Entity, TypeDesc *TyDesc, CompileUnit *Unit) { + if (!TyDesc) { + AddBasicType(Entity, Unit, "", DW_ATE_signed, 4); + } else { + // Check for pre-existence. + DIEntry *&Slot = Unit->getDIEntrySlotFor(TyDesc); + + // If it exists then use the existing value. + if (Slot) { + Slot->IncUsage(); + Entity->AddValue(DW_AT_type, DW_FORM_ref4, Slot); + return; + } + + if (SubprogramDesc *SubprogramTy = dyn_cast(TyDesc)) { + // FIXME - Not sure why programs and variables are coming through here. + // Short cut for handling subprogram types (not really a TyDesc.) + AddPointerType(Entity, Unit, SubprogramTy->getName()); + } else if (GlobalVariableDesc *GlobalTy = + dyn_cast(TyDesc)) { + // FIXME - Not sure why programs and variables are coming through here. + // Short cut for handling global variable types (not really a TyDesc.) + AddPointerType(Entity, Unit, GlobalTy->getName()); + } else { + // Set up proxy. + Slot = NewDIEntry(); + + // Construct type. + DIE Buffer(DW_TAG_base_type); + ConstructType(Buffer, TyDesc, Unit); + + // Add debug information entry to entity and unit. + DIE *Die = Unit->AddDie(Buffer); + SetDIEntry(Slot, Die); + Entity->AddValue(DW_AT_type, DW_FORM_ref4, Slot); + } + } } - - // Mark end of abbreviation. - DW.EmitULEB128Bytes(0); DW.EOL("EOM(1)"); - DW.EmitULEB128Bytes(0); DW.EOL("EOM(2)"); -} - -#ifndef NDEBUG -void DIEAbbrev::print(std::ostream &O) { - O << "Abbreviation @" - << std::hex << (intptr_t)this << std::dec - << " " - << TagString(Tag) - << " " - << ChildrenString(ChildrenFlag) - << "\n"; - for (unsigned i = 0, N = Data.size(); i < N; ++i) { - O << " " - << AttributeString(Data[i].getAttribute()) - << " " - << FormEncodingString(Data[i].getForm()) - << "\n"; - } -} -void DIEAbbrev::dump() { print(std::cerr); } -#endif - -//===----------------------------------------------------------------------===// - -/// BestForm - Choose the best form for integer. -/// -unsigned DIEInteger::BestForm(bool IsSigned) { - if (IsSigned) { - if ((char)Integer == (signed)Integer) return DW_FORM_data1; - if ((short)Integer == (signed)Integer) return DW_FORM_data2; - if ((int)Integer == (signed)Integer) return DW_FORM_data4; - } else { - if ((unsigned char)Integer == Integer) return DW_FORM_data1; - if ((unsigned short)Integer == Integer) return DW_FORM_data2; - if ((unsigned int)Integer == Integer) return DW_FORM_data4; - } - return DW_FORM_data8; -} - -/// EmitValue - Emit integer of appropriate size. -/// -void DIEInteger::EmitValue(const Dwarf &DW, unsigned Form) const { - switch (Form) { - case DW_FORM_flag: // Fall thru - case DW_FORM_ref1: // Fall thru - case DW_FORM_data1: DW.EmitInt8(Integer); break; - case DW_FORM_ref2: // Fall thru - case DW_FORM_data2: DW.EmitInt16(Integer); break; - case DW_FORM_ref4: // Fall thru - case DW_FORM_data4: DW.EmitInt32(Integer); break; - case DW_FORM_ref8: // Fall thru - case DW_FORM_data8: DW.EmitInt64(Integer); break; - case DW_FORM_udata: DW.EmitULEB128Bytes(Integer); break; - case DW_FORM_sdata: DW.EmitSLEB128Bytes(Integer); break; - default: assert(0 && "DIE Value form not supported yet"); break; - } -} - -/// SizeOf - Determine size of integer value in bytes. -/// -unsigned DIEInteger::SizeOf(const Dwarf &DW, unsigned Form) const { - switch (Form) { - case DW_FORM_flag: // Fall thru - case DW_FORM_ref1: // Fall thru - case DW_FORM_data1: return sizeof(int8_t); - case DW_FORM_ref2: // Fall thru - case DW_FORM_data2: return sizeof(int16_t); - case DW_FORM_ref4: // Fall thru - case DW_FORM_data4: return sizeof(int32_t); - case DW_FORM_ref8: // Fall thru - case DW_FORM_data8: return sizeof(int64_t); - case DW_FORM_udata: return DW.SizeULEB128(Integer); - case DW_FORM_sdata: return DW.SizeSLEB128(Integer); - default: assert(0 && "DIE Value form not supported yet"); break; - } - return 0; -} - -//===----------------------------------------------------------------------===// - -/// EmitValue - Emit string value. -/// -void DIEString::EmitValue(const Dwarf &DW, unsigned Form) const { - DW.EmitString(String); -} - -/// SizeOf - Determine size of string value in bytes. -/// -unsigned DIEString::SizeOf(const Dwarf &DW, unsigned Form) const { - return String.size() + sizeof(char); // sizeof('\0'); -} - -//===----------------------------------------------------------------------===// - -/// EmitValue - Emit label value. -/// -void DIEDwarfLabel::EmitValue(const Dwarf &DW, unsigned Form) const { - DW.EmitReference(Label); -} - -/// SizeOf - Determine size of label value in bytes. -/// -unsigned DIEDwarfLabel::SizeOf(const Dwarf &DW, unsigned Form) const { - return DW.getTargetAsmInfo()->getAddressSize(); -} - -//===----------------------------------------------------------------------===// - -/// EmitValue - Emit label value. -/// -void DIEObjectLabel::EmitValue(const Dwarf &DW, unsigned Form) const { - DW.EmitReference(Label); -} - -/// SizeOf - Determine size of label value in bytes. -/// -unsigned DIEObjectLabel::SizeOf(const Dwarf &DW, unsigned Form) const { - return DW.getTargetAsmInfo()->getAddressSize(); -} - -//===----------------------------------------------------------------------===// - -/// EmitValue - Emit delta value. -/// -void DIEDelta::EmitValue(const Dwarf &DW, unsigned Form) const { - DW.EmitDifference(LabelHi, LabelLo); -} - -/// SizeOf - Determine size of delta value in bytes. -/// -unsigned DIEDelta::SizeOf(const Dwarf &DW, unsigned Form) const { - return DW.getTargetAsmInfo()->getAddressSize(); -} - -//===----------------------------------------------------------------------===// -/// EmitValue - Emit debug information entry offset. -/// -void DIEntry::EmitValue(const Dwarf &DW, unsigned Form) const { - DW.EmitInt32(Entry->getOffset()); -} - -/// SizeOf - Determine size of debug information entry value in bytes. -/// -unsigned DIEntry::SizeOf(const Dwarf &DW, unsigned Form) const { - return sizeof(int32_t); -} - -//===----------------------------------------------------------------------===// - -DIEBlock::~DIEBlock() { - for (unsigned i = 0, N = Values.size(); i < N; ++i) { - delete Values[i]; - } -} - -/// ComputeSize - calculate the size of the block. -/// -unsigned DIEBlock::ComputeSize(Dwarf &DW) { - Size = 0; - for (unsigned i = 0, N = Values.size(); i < N; ++i) { - Size += Values[i]->SizeOf(DW, Forms[i]); - } - return Size; -} - -/// BestForm - Choose the best form for data. -/// -unsigned DIEBlock::BestForm() { - if ((unsigned char)Size == Size) return DW_FORM_block1; - if ((unsigned short)Size == Size) return DW_FORM_block2; - if ((unsigned int)Size == Size) return DW_FORM_block4; - return DW_FORM_block; -} - -/// EmitValue - Emit block data. -/// -void DIEBlock::EmitValue(const Dwarf &DW, unsigned Form) const { - switch (Form) { - case DW_FORM_block1: DW.EmitInt8(Size); break; - case DW_FORM_block2: DW.EmitInt16(Size); break; - case DW_FORM_block4: DW.EmitInt32(Size); break; - case DW_FORM_block: DW.EmitULEB128Bytes(Size); break; - default: assert(0 && "Improper form for block"); break; - } - for (unsigned i = 0, N = Values.size(); i < N; ++i) { - DW.EOL(""); - Values[i]->EmitValue(DW, Forms[i]); - } -} - -/// SizeOf - Determine size of block data in bytes. -/// -unsigned DIEBlock::SizeOf(const Dwarf &DW, unsigned Form) const { - switch (Form) { - case DW_FORM_block1: return Size + sizeof(int8_t); - case DW_FORM_block2: return Size + sizeof(int16_t); - case DW_FORM_block4: return Size + sizeof(int32_t); - case DW_FORM_block: return Size + DW.SizeULEB128(Size); - default: assert(0 && "Improper form for block"); break; - } - return 0; -} - -/// AddUInt - Add an unsigned integer value. -/// -void DIEBlock::AddUInt(unsigned Form, uint64_t Integer) { - DIEInteger *DI = new DIEInteger(Integer); - Values.push_back(DI); - if (Form == 0) Form = DI->BestForm(false); - Forms.push_back(Form); -} - -/// AddSInt - Add an signed integer value. -/// -void DIEBlock::AddSInt(unsigned Form, int64_t Integer) { - DIEInteger *DI = new DIEInteger(Integer); - Values.push_back(DI); - if (Form == 0) Form = DI->BestForm(true); - Forms.push_back(Form); -} - -/// AddString - Add a std::string value. -/// -void DIEBlock::AddString(unsigned Form, const std::string &String) { - Values.push_back(new DIEString(String)); - Forms.push_back(Form); -} - -/// AddLabel - Add a Dwarf label value. -/// -void DIEBlock::AddLabel(unsigned Form, const DWLabel &Label) { - Values.push_back(new DIEDwarfLabel(Label)); - Forms.push_back(Form); -} - -/// AddObjectLabel - Add a non-Dwarf label value. -/// -void DIEBlock::AddObjectLabel(unsigned Form, const std::string &Label) { - Values.push_back(new DIEObjectLabel(Label)); - Forms.push_back(Form); -} - -/// AddDelta - Add a label delta value. -/// -void DIEBlock::AddDelta(unsigned Form, const DWLabel &Hi, const DWLabel &Lo) { - Values.push_back(new DIEDelta(Hi, Lo)); - Forms.push_back(Form); -} - -/// AddDIEntry - Add a DIE value. -/// -void DIEBlock::AddDIEntry(unsigned Form, DIE *Entry) { - Values.push_back(new DIEntry(Entry)); - Forms.push_back(Form); -} - -//===----------------------------------------------------------------------===// - -DIE::DIE(unsigned Tag) -: Abbrev(Tag, DW_CHILDREN_no) -, Offset(0) -, Size(0) -, Children() -, Values() -{} - -DIE::~DIE() { - for (unsigned i = 0, N = Children.size(); i < N; ++i) { - delete Children[i]; - } - - for (unsigned j = 0, M = Values.size(); j < M; ++j) { - delete Values[j]; - } -} - -/// AddSiblingOffset - Add a sibling offset field to the front of the DIE. -/// -void DIE::AddSiblingOffset() { - DIEInteger *DI = new DIEInteger(0); - Values.insert(Values.begin(), DI); - Abbrev.AddFirstAttribute(DW_AT_sibling, DW_FORM_ref4); -} + /// ConstructType - Adds all the required attributes to the type. + /// + void ConstructType(DIE &Buffer, TypeDesc *TyDesc, CompileUnit *Unit) { + // Get core information. + const std::string &Name = TyDesc->getName(); + uint64_t Size = TyDesc->getSize() >> 3; + + if (BasicTypeDesc *BasicTy = dyn_cast(TyDesc)) { + // Fundamental types like int, float, bool + Buffer.setTag(DW_TAG_base_type); + AddUInt(&Buffer, DW_AT_encoding, DW_FORM_data1, BasicTy->getEncoding()); + } else if (DerivedTypeDesc *DerivedTy = dyn_cast(TyDesc)) { + // Pointers, tyepdefs et al. + Buffer.setTag(DerivedTy->getTag()); + // Map to main type, void will not have a type. + if (TypeDesc *FromTy = DerivedTy->getFromType()) + AddType(&Buffer, FromTy, Unit); + } else if (CompositeTypeDesc *CompTy = dyn_cast(TyDesc)){ + // Fetch tag. + unsigned Tag = CompTy->getTag(); + + // Set tag accordingly. + if (Tag == DW_TAG_vector_type) + Buffer.setTag(DW_TAG_array_type); + else + Buffer.setTag(Tag); + + std::vector &Elements = CompTy->getElements(); + + switch (Tag) { + case DW_TAG_vector_type: + AddUInt(&Buffer, DW_AT_GNU_vector, DW_FORM_flag, 1); + // Fall thru + case DW_TAG_array_type: { + // Add element type. + if (TypeDesc *FromTy = CompTy->getFromType()) + AddType(&Buffer, FromTy, Unit); + + // Don't emit size attribute. + Size = 0; + + // Construct an anonymous type for index type. + DIE *IndexTy = ConstructBasicType(Unit, "", DW_ATE_signed, 4); + + // Add subranges to array type. + for(unsigned i = 0, N = Elements.size(); i < N; ++i) { + SubrangeDesc *SRD = cast(Elements[i]); + int64_t Lo = SRD->getLo(); + int64_t Hi = SRD->getHi(); + DIE *Subrange = new DIE(DW_TAG_subrange_type); + + // If a range is available. + if (Lo != Hi) { + AddDIEntry(Subrange, DW_AT_type, DW_FORM_ref4, IndexTy); + // Only add low if non-zero. + if (Lo) AddSInt(Subrange, DW_AT_lower_bound, 0, Lo); + AddSInt(Subrange, DW_AT_upper_bound, 0, Hi); + } + + Buffer.AddChild(Subrange); + } + break; + } + case DW_TAG_structure_type: + case DW_TAG_union_type: { + // Add elements to structure type. + for(unsigned i = 0, N = Elements.size(); i < N; ++i) { + DebugInfoDesc *Element = Elements[i]; + + if (DerivedTypeDesc *MemberDesc = dyn_cast(Element)){ + // Add field or base class. + + unsigned Tag = MemberDesc->getTag(); + + // Extract the basic information. + const std::string &Name = MemberDesc->getName(); + TypeDesc *MemTy = MemberDesc->getFromType(); + uint64_t Size = MemberDesc->getSize(); + uint64_t Align = MemberDesc->getAlign(); + uint64_t Offset = MemberDesc->getOffset(); + + // Construct member debug information entry. + DIE *Member = new DIE(Tag); + + // Add name if not "". + if (!Name.empty()) + AddString(Member, DW_AT_name, DW_FORM_string, Name); + // Add location if available. + AddSourceLine(Member, MemberDesc->getFile(), MemberDesc->getLine()); + + // Most of the time the field info is the same as the members. + uint64_t FieldSize = Size; + uint64_t FieldAlign = Align; + uint64_t FieldOffset = Offset; + + if (TypeDesc *FromTy = MemberDesc->getFromType()) { + AddType(Member, FromTy, Unit); + FieldSize = FromTy->getSize(); + FieldAlign = FromTy->getSize(); + } + + // Unless we have a bit field. + if (Tag == DW_TAG_member && FieldSize != Size) { + // Construct the alignment mask. + uint64_t AlignMask = ~(FieldAlign - 1); + // Determine the high bit + 1 of the declared size. + uint64_t HiMark = (Offset + FieldSize) & AlignMask; + // Work backwards to determine the base offset of the field. + FieldOffset = HiMark - FieldSize; + // Now normalize offset to the field. + Offset -= FieldOffset; + + // Maybe we need to work from the other end. + if (TD->isLittleEndian()) Offset = FieldSize - (Offset + Size); + + // Add size and offset. + AddUInt(Member, DW_AT_byte_size, 0, FieldSize >> 3); + AddUInt(Member, DW_AT_bit_size, 0, Size); + AddUInt(Member, DW_AT_bit_offset, 0, Offset); + } + + // Add computation for offset. + DIEBlock *Block = new DIEBlock(); + AddUInt(Block, 0, DW_FORM_data1, DW_OP_plus_uconst); + AddUInt(Block, 0, DW_FORM_udata, FieldOffset >> 3); + AddBlock(Member, DW_AT_data_member_location, 0, Block); + + // Add accessibility (public default unless is base class. + if (MemberDesc->isProtected()) { + AddUInt(Member, DW_AT_accessibility, 0, DW_ACCESS_protected); + } else if (MemberDesc->isPrivate()) { + AddUInt(Member, DW_AT_accessibility, 0, DW_ACCESS_private); + } else if (Tag == DW_TAG_inheritance) { + AddUInt(Member, DW_AT_accessibility, 0, DW_ACCESS_public); + } + + Buffer.AddChild(Member); + } else if (GlobalVariableDesc *StaticDesc = + dyn_cast(Element)) { + // Add static member. + + // Construct member debug information entry. + DIE *Static = new DIE(DW_TAG_variable); + + // Add name and mangled name. + const std::string &Name = StaticDesc->getDisplayName(); + const std::string &MangledName = StaticDesc->getName(); + AddString(Static, DW_AT_name, DW_FORM_string, Name); + AddString(Static, DW_AT_MIPS_linkage_name, DW_FORM_string, + MangledName); + + // Add location. + AddSourceLine(Static, StaticDesc->getFile(), StaticDesc->getLine()); + + // Add type. + if (TypeDesc *StaticTy = StaticDesc->getType()) + AddType(Static, StaticTy, Unit); + + // Add flags. + AddUInt(Static, DW_AT_external, DW_FORM_flag, 1); + AddUInt(Static, DW_AT_declaration, DW_FORM_flag, 1); + + Buffer.AddChild(Static); + } else if (SubprogramDesc *MethodDesc = + dyn_cast(Element)) { + // Add member function. + + // Construct member debug information entry. + DIE *Method = new DIE(DW_TAG_subprogram); + + // Add name and mangled name. + const std::string &Name = MethodDesc->getDisplayName(); + const std::string &MangledName = MethodDesc->getName(); + bool IsCTor = false; + + if (Name.empty()) { + AddString(Method, DW_AT_name, DW_FORM_string, MangledName); + IsCTor = TyDesc->getName() == MangledName; + } else { + AddString(Method, DW_AT_name, DW_FORM_string, Name); + AddString(Method, DW_AT_MIPS_linkage_name, DW_FORM_string, + MangledName); + } + + // Add location. + AddSourceLine(Method, MethodDesc->getFile(), MethodDesc->getLine()); + + // Add type. + if (CompositeTypeDesc *MethodTy = + dyn_cast_or_null(MethodDesc->getType())) { + // Get argument information. + std::vector &Args = MethodTy->getElements(); + + // If not a ctor. + if (!IsCTor) { + // Add return type. + AddType(Method, dyn_cast(Args[0]), Unit); + } + + // Add arguments. + for(unsigned i = 1, N = Args.size(); i < N; ++i) { + DIE *Arg = new DIE(DW_TAG_formal_parameter); + AddType(Arg, cast(Args[i]), Unit); + AddUInt(Arg, DW_AT_artificial, DW_FORM_flag, 1); + Method->AddChild(Arg); + } + } -/// AddUInt - Add an unsigned integer attribute data and value. -/// -void DIE::AddUInt(unsigned Attribute, unsigned Form, uint64_t Integer) { - DIEInteger *DI = new DIEInteger(Integer); - Values.push_back(DI); - if (!Form) Form = DI->BestForm(false); - Abbrev.AddAttribute(Attribute, Form); -} - -/// AddSInt - Add an signed integer attribute data and value. -/// -void DIE::AddSInt(unsigned Attribute, unsigned Form, int64_t Integer) { - DIEInteger *DI = new DIEInteger(Integer); - Values.push_back(DI); - if (!Form) Form = DI->BestForm(true); - Abbrev.AddAttribute(Attribute, Form); -} - -/// AddString - Add a std::string attribute data and value. -/// -void DIE::AddString(unsigned Attribute, unsigned Form, - const std::string &String) { - Values.push_back(new DIEString(String)); - Abbrev.AddAttribute(Attribute, Form); -} - -/// AddLabel - Add a Dwarf label attribute data and value. -/// -void DIE::AddLabel(unsigned Attribute, unsigned Form, - const DWLabel &Label) { - Values.push_back(new DIEDwarfLabel(Label)); - Abbrev.AddAttribute(Attribute, Form); -} + // Add flags. + AddUInt(Method, DW_AT_external, DW_FORM_flag, 1); + AddUInt(Method, DW_AT_declaration, DW_FORM_flag, 1); + + Buffer.AddChild(Method); + } + } + break; + } + case DW_TAG_enumeration_type: { + // Add enumerators to enumeration type. + for(unsigned i = 0, N = Elements.size(); i < N; ++i) { + EnumeratorDesc *ED = cast(Elements[i]); + const std::string &Name = ED->getName(); + int64_t Value = ED->getValue(); + DIE *Enumerator = new DIE(DW_TAG_enumerator); + AddString(Enumerator, DW_AT_name, DW_FORM_string, Name); + AddSInt(Enumerator, DW_AT_const_value, DW_FORM_sdata, Value); + Buffer.AddChild(Enumerator); + } + + break; + } + case DW_TAG_subroutine_type: { + // Add prototype flag. + AddUInt(&Buffer, DW_AT_prototyped, DW_FORM_flag, 1); + // Add return type. + AddType(&Buffer, dyn_cast(Elements[0]), Unit); + + // Add arguments. + for(unsigned i = 1, N = Elements.size(); i < N; ++i) { + DIE *Arg = new DIE(DW_TAG_formal_parameter); + AddType(Arg, cast(Elements[i]), Unit); + Buffer.AddChild(Arg); + } + + break; + } + default: break; + } + } + + // Add size if non-zero (derived types don't have a size.) + if (Size) AddUInt(&Buffer, DW_AT_byte_size, 0, Size); + // Add name if not anonymous or intermediate type. + if (!Name.empty()) AddString(&Buffer, DW_AT_name, DW_FORM_string, Name); + // Add source line info if available. + AddSourceLine(&Buffer, TyDesc->getFile(), TyDesc->getLine()); + } + + /// NewCompileUnit - Create new compile unit and it's debug information entry. + /// + CompileUnit *NewCompileUnit(CompileUnitDesc *UnitDesc, unsigned ID) { + // Construct debug information entry. + DIE *Die = new DIE(DW_TAG_compile_unit); + AddDelta(Die, DW_AT_stmt_list, DW_FORM_data4, DWLabel("section_line", 0), + DWLabel("section_line", 0)); + AddString(Die, DW_AT_producer, DW_FORM_string, UnitDesc->getProducer()); + AddUInt (Die, DW_AT_language, DW_FORM_data1, UnitDesc->getLanguage()); + AddString(Die, DW_AT_name, DW_FORM_string, UnitDesc->getFileName()); + AddString(Die, DW_AT_comp_dir, DW_FORM_string, UnitDesc->getDirectory()); -/// AddObjectLabel - Add an non-Dwarf label attribute data and value. -/// -void DIE::AddObjectLabel(unsigned Attribute, unsigned Form, - const std::string &Label) { - Values.push_back(new DIEObjectLabel(Label)); - Abbrev.AddAttribute(Attribute, Form); -} + // Construct compile unit. + CompileUnit *Unit = new CompileUnit(UnitDesc, ID, Die); -/// AddDelta - Add a label delta attribute data and value. -/// -void DIE::AddDelta(unsigned Attribute, unsigned Form, - const DWLabel &Hi, const DWLabel &Lo) { - Values.push_back(new DIEDelta(Hi, Lo)); - Abbrev.AddAttribute(Attribute, Form); -} + // Add Unit to compile unit map. + DescToUnitMap[UnitDesc] = Unit; -/// AddDIEntry - Add a DIE attribute data and value. -/// -void DIE::AddDIEntry(unsigned Attribute, unsigned Form, DIE *Entry) { - Values.push_back(new DIEntry(Entry)); - Abbrev.AddAttribute(Attribute, Form); -} - -/// AddBlock - Add block data. -/// -void DIE::AddBlock(unsigned Attribute, unsigned Form, DIEBlock *Block) { - assert(Block->Size && "Block size has not been computed"); - Values.push_back(Block); - if (!Form) Form = Block->BestForm(); - Abbrev.AddAttribute(Attribute, Form); -} - -/// Complete - Indicate that all attributes have been added and ready to get an -/// abbreviation ID. -void DIE::Complete(Dwarf &DW) { - DW.AssignAbbrevNumber(&Abbrev); -} - -/// AddChild - Add a child to the DIE. -/// -void DIE::AddChild(DIE *Child) { - Abbrev.setChildrenFlag(DW_CHILDREN_yes); - Children.push_back(Child); -} - -//===----------------------------------------------------------------------===// - -/// Dwarf - -//===----------------------------------------------------------------------===// - -/// PrintHex - Print a value as a hexidecimal value. -/// -void Dwarf::PrintHex(int Value) const { - O << "0x" << std::hex << Value << std::dec; -} + return Unit; + } -/// 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 Dwarf::EOL(const std::string &Comment) const { - if (DwarfVerbose && !Comment.empty()) { - O << "\t" - << TAI->getCommentString() - << " " - << Comment; + /// FindCompileUnit - Get the compile unit for the given descriptor. + /// + CompileUnit *FindCompileUnit(CompileUnitDesc *UnitDesc) { +#if 1 + // FIXME - Using only one compile unit. Needs to me fixed at the FE. + CompileUnit *Unit = CompileUnits[0]; +#else + CompileUnit *Unit = DescToUnitMap[UnitDesc]; +#endif + assert(Unit && "Missing compile unit."); + return Unit; } - O << "\n"; -} -/// EmitAlign - Print a align directive. -/// -void Dwarf::EmitAlign(unsigned Alignment) const { - O << TAI->getAlignDirective() << Alignment << "\n"; -} + /// NewGlobalVariable - Add a new global variable DIE. + /// + DIE *NewGlobalVariable(GlobalVariableDesc *GVD) { + // Get the compile unit context. + CompileUnitDesc *UnitDesc = + static_cast(GVD->getContext()); + CompileUnit *Unit = FindCompileUnit(UnitDesc); + + // Check for pre-existence. + DIE *&Slot = Unit->getDieMapSlotFor(GVD); + if (Slot) return Slot; + + // Get the global variable itself. + GlobalVariable *GV = GVD->getGlobalVariable(); + + const std::string &Name = GVD->hasMangledName() ? GVD->getDisplayName() + : GVD->getName(); + const std::string &MangledName = GVD->hasMangledName() ? GVD->getName() + : ""; + // Create the global's variable DIE. + DIE *VariableDie = new DIE(DW_TAG_variable); + AddString(VariableDie, DW_AT_name, DW_FORM_string, Name); + if (!MangledName.empty()) { + AddString(VariableDie, DW_AT_MIPS_linkage_name, DW_FORM_string, + MangledName); + } + AddType(VariableDie, GVD->getType(), Unit); + AddUInt(VariableDie, DW_AT_external, DW_FORM_flag, 1); + + // Add source line info if available. + AddSourceLine(VariableDie, UnitDesc, GVD->getLine()); + + // Work up linkage name. + const std::string LinkageName = Asm->getGlobalLinkName(GV); -/// EmitULEB128Bytes - Emit an assembler byte data directive to compose an -/// unsigned leb128 value. -void Dwarf::EmitULEB128Bytes(unsigned Value) const { - if (TAI->hasLEB128()) { - O << "\t.uleb128\t" - << Value; - } else { - O << TAI->getData8bitsDirective(); - PrintULEB128(Value); + // Add address. + DIEBlock *Block = new DIEBlock(); + AddUInt(Block, 0, DW_FORM_data1, DW_OP_addr); + AddObjectLabel(Block, 0, DW_FORM_udata, LinkageName); + AddBlock(VariableDie, DW_AT_location, 0, Block); + + // Add to map. + Slot = VariableDie; + + // Add to context owner. + Unit->getDie()->AddChild(VariableDie); + + // Expose as global. + // FIXME - need to check external flag. + Unit->AddGlobal(Name, VariableDie); + + return VariableDie; } -} -/// EmitSLEB128Bytes - Emit an assembler byte data directive to compose a -/// signed leb128 value. -void Dwarf::EmitSLEB128Bytes(int Value) const { - if (TAI->hasLEB128()) { - O << "\t.sleb128\t" - << Value; - } else { - O << TAI->getData8bitsDirective(); - PrintSLEB128(Value); + /// NewSubprogram - Add a new subprogram DIE. + /// + DIE *NewSubprogram(SubprogramDesc *SPD) { + // Get the compile unit context. + CompileUnitDesc *UnitDesc = + static_cast(SPD->getContext()); + CompileUnit *Unit = FindCompileUnit(UnitDesc); + + // Check for pre-existence. + DIE *&Slot = Unit->getDieMapSlotFor(SPD); + if (Slot) return Slot; + + // Gather the details (simplify add attribute code.) + const std::string &Name = SPD->hasMangledName() ? SPD->getDisplayName() + : SPD->getName(); + const std::string &MangledName = SPD->hasMangledName() ? SPD->getName() + : ""; + unsigned IsExternal = SPD->isStatic() ? 0 : 1; + + DIE *SubprogramDie = new DIE(DW_TAG_subprogram); + AddString(SubprogramDie, DW_AT_name, DW_FORM_string, Name); + if (!MangledName.empty()) { + AddString(SubprogramDie, DW_AT_MIPS_linkage_name, DW_FORM_string, + MangledName); + } + if (SPD->getType()) AddType(SubprogramDie, SPD->getType(), Unit); + AddUInt(SubprogramDie, DW_AT_external, DW_FORM_flag, IsExternal); + AddUInt(SubprogramDie, DW_AT_prototyped, DW_FORM_flag, 1); + + // Add source line info if available. + AddSourceLine(SubprogramDie, UnitDesc, SPD->getLine()); + + // Add to map. + Slot = SubprogramDie; + + // Add to context owner. + Unit->getDie()->AddChild(SubprogramDie); + + // Expose as global. + Unit->AddGlobal(Name, SubprogramDie); + + return SubprogramDie; } -} - -/// PrintULEB128 - Print a series of hexidecimal values (separated by commas) -/// representing an unsigned leb128 value. -void Dwarf::PrintULEB128(unsigned Value) const { - do { - unsigned Byte = Value & 0x7f; - Value >>= 7; - if (Value) Byte |= 0x80; - PrintHex(Byte); - if (Value) O << ", "; - } while (Value); -} - -/// SizeULEB128 - Compute the number of bytes required for an unsigned leb128 -/// value. -unsigned Dwarf::SizeULEB128(unsigned Value) { - unsigned Size = 0; - do { - Value >>= 7; - Size += sizeof(int8_t); - } while (Value); - return Size; -} - -/// PrintSLEB128 - Print a series of hexidecimal values (separated by commas) -/// representing a signed leb128 value. -void Dwarf::PrintSLEB128(int Value) const { - int Sign = Value >> (8 * sizeof(Value) - 1); - bool IsMore; - - do { - unsigned Byte = Value & 0x7f; - Value >>= 7; - IsMore = Value != Sign || ((Byte ^ Sign) & 0x40) != 0; - if (IsMore) Byte |= 0x80; - PrintHex(Byte); - if (IsMore) O << ", "; - } while (IsMore); -} - -/// SizeSLEB128 - Compute the number of bytes required for a signed leb128 -/// value. -unsigned Dwarf::SizeSLEB128(int Value) { - unsigned Size = 0; - int Sign = Value >> (8 * sizeof(Value) - 1); - bool IsMore; - - do { - unsigned Byte = Value & 0x7f; - Value >>= 7; - IsMore = Value != Sign || ((Byte ^ Sign) & 0x40) != 0; - Size += sizeof(int8_t); - } while (IsMore); - return Size; -} - -/// EmitInt8 - Emit a byte directive and value. -/// -void Dwarf::EmitInt8(int Value) const { - O << TAI->getData8bitsDirective(); - PrintHex(Value & 0xFF); -} - -/// EmitInt16 - Emit a short directive and value. -/// -void Dwarf::EmitInt16(int Value) const { - O << TAI->getData16bitsDirective(); - PrintHex(Value & 0xFFFF); -} - -/// EmitInt32 - Emit a long directive and value. -/// -void Dwarf::EmitInt32(int Value) const { - O << TAI->getData32bitsDirective(); - PrintHex(Value); -} -/// EmitInt64 - Emit a long long directive and value. -/// -void Dwarf::EmitInt64(uint64_t Value) const { - if (TAI->getData64bitsDirective()) { - O << TAI->getData64bitsDirective() << "0x" << std::hex << Value << std::dec; - } else { - if (TD->isBigEndian()) { - EmitInt32(unsigned(Value >> 32)); O << "\n"; - EmitInt32(unsigned(Value)); - } else { - EmitInt32(unsigned(Value)); O << "\n"; - EmitInt32(unsigned(Value >> 32)); - } + /// NewScopeVariable - Create a new scope variable. + /// + DIE *NewScopeVariable(DebugVariable *DV, CompileUnit *Unit) { + // Get the descriptor. + VariableDesc *VD = DV->getDesc(); + + // Translate tag to proper Dwarf tag. The result variable is dropped for + // now. + unsigned Tag; + switch (VD->getTag()) { + case DW_TAG_return_variable: return NULL; + case DW_TAG_arg_variable: Tag = DW_TAG_formal_parameter; break; + case DW_TAG_auto_variable: // fall thru + default: Tag = DW_TAG_variable; break; + } + + // Define variable debug information entry. + DIE *VariableDie = new DIE(Tag); + AddString(VariableDie, DW_AT_name, DW_FORM_string, VD->getName()); + + // Add source line info if available. + AddSourceLine(VariableDie, VD->getFile(), VD->getLine()); + + // Add variable type. + AddType(VariableDie, VD->getType(), Unit); + + // Add variable address. + MachineLocation Location; + RI->getLocation(*MF, DV->getFrameIndex(), Location); + AddAddress(VariableDie, DW_AT_location, Location); + + return VariableDie; } -} -/// EmitString - Emit a string with quotes and a null terminator. -/// Special characters are emitted properly. (Eg. '\t') -void Dwarf::EmitString(const std::string &String) const { - O << TAI->getAsciiDirective() - << "\""; - for (unsigned i = 0, N = String.size(); i < N; ++i) { - unsigned char C = String[i]; - - if (!isascii(C) || iscntrl(C)) { - switch(C) { - case '\b': O << "\\b"; break; - case '\f': O << "\\f"; break; - case '\n': O << "\\n"; break; - case '\r': O << "\\r"; break; - case '\t': O << "\\t"; break; - default: - O << '\\'; - O << char('0' + ((C >> 6) & 7)); - O << char('0' + ((C >> 3) & 7)); - O << char('0' + ((C >> 0) & 7)); - break; + /// ConstructScope - Construct the components of a scope. + /// + void ConstructScope(DebugScope *ParentScope, + DIE *ParentDie, CompileUnit *Unit) { + // Add variables to scope. + std::vector &Variables = ParentScope->getVariables(); + for (unsigned i = 0, N = Variables.size(); i < N; ++i) { + DIE *VariableDie = NewScopeVariable(Variables[i], Unit); + if (VariableDie) ParentDie->AddChild(VariableDie); + } + + // Add nested scopes. + std::vector &Scopes = ParentScope->getScopes(); + for (unsigned j = 0, M = Scopes.size(); j < M; ++j) { + // Define the Scope debug information entry. + DebugScope *Scope = Scopes[j]; + // FIXME - Ignore inlined functions for the time being. + if (!Scope->getParent()) continue; + + unsigned StartID = Scope->getStartLabelID(); + unsigned EndID = Scope->getEndLabelID(); + + // Throw out scope if block is discarded. + if (StartID && !DebugInfo->isLabelValid(StartID)) continue; + if (EndID && !DebugInfo->isLabelValid(EndID)) continue; + + DIE *ScopeDie = new DIE(DW_TAG_lexical_block); + + // Add the scope bounds. + if (StartID) { + AddLabel(ScopeDie, DW_AT_low_pc, DW_FORM_addr, + DWLabel("loc", StartID)); + } else { + AddLabel(ScopeDie, DW_AT_low_pc, DW_FORM_addr, + DWLabel("func_begin", SubprogramCount)); } - } else if (C == '\"') { - O << "\\\""; - } else if (C == '\'') { - O << "\\\'"; - } else { - O << C; + if (EndID) { + AddLabel(ScopeDie, DW_AT_high_pc, DW_FORM_addr, + DWLabel("loc", EndID)); + } else { + AddLabel(ScopeDie, DW_AT_high_pc, DW_FORM_addr, + DWLabel("func_end", SubprogramCount)); + } + + // Add the scope contents. + ConstructScope(Scope, ScopeDie, Unit); + ParentDie->AddChild(ScopeDie); } } - O << "\\0\""; -} -/// PrintLabelName - Print label name in form used by Dwarf writer. -/// -void Dwarf::PrintLabelName(const char *Tag, unsigned Number) const { - O << TAI->getPrivateGlobalPrefix() - << "debug_" - << Tag; - if (Number) O << Number; -} + /// ConstructRootScope - Construct the scope for the subprogram. + /// + void ConstructRootScope(DebugScope *RootScope) { + // Exit if there is no root scope. + if (!RootScope) return; + + // Get the subprogram debug information entry. + SubprogramDesc *SPD = cast(RootScope->getDesc()); + + // Get the compile unit context. + CompileUnitDesc *UnitDesc = + static_cast(SPD->getContext()); + CompileUnit *Unit = FindCompileUnit(UnitDesc); + + // Get the subprogram die. + DIE *SPDie = Unit->getDieMapSlotFor(SPD); + assert(SPDie && "Missing subprogram descriptor"); + + // Add the function bounds. + AddLabel(SPDie, DW_AT_low_pc, DW_FORM_addr, + DWLabel("func_begin", SubprogramCount)); + AddLabel(SPDie, DW_AT_high_pc, DW_FORM_addr, + DWLabel("func_end", SubprogramCount)); + MachineLocation Location(RI->getFrameRegister(*MF)); + AddAddress(SPDie, DW_AT_frame_base, Location); + + ConstructScope(RootScope, SPDie, Unit); + } + + /// EmitInitial - Emit initial Dwarf declarations. This is necessary for cc + /// tools to recognize the object file contains Dwarf information. + void EmitInitial() { + // Check to see if we already emitted intial headers. + if (didInitial) return; + didInitial = true; + + // Dwarf sections base addresses. + if (TAI->getDwarfRequiresFrameSection()) { + Asm->SwitchToDataSection(TAI->getDwarfFrameSection()); + EmitLabel("section_frame", 0); + } + Asm->SwitchToDataSection(TAI->getDwarfInfoSection()); + EmitLabel("section_info", 0); + Asm->SwitchToDataSection(TAI->getDwarfAbbrevSection()); + EmitLabel("section_abbrev", 0); + Asm->SwitchToDataSection(TAI->getDwarfARangesSection()); + EmitLabel("section_aranges", 0); + Asm->SwitchToDataSection(TAI->getDwarfMacInfoSection()); + EmitLabel("section_macinfo", 0); + Asm->SwitchToDataSection(TAI->getDwarfLineSection()); + EmitLabel("section_line", 0); + Asm->SwitchToDataSection(TAI->getDwarfLocSection()); + EmitLabel("section_loc", 0); + Asm->SwitchToDataSection(TAI->getDwarfPubNamesSection()); + EmitLabel("section_pubnames", 0); + Asm->SwitchToDataSection(TAI->getDwarfStrSection()); + EmitLabel("section_str", 0); + Asm->SwitchToDataSection(TAI->getDwarfRangesSection()); + EmitLabel("section_ranges", 0); + + Asm->SwitchToTextSection(TAI->getTextSection()); + EmitLabel("text_begin", 0); + Asm->SwitchToDataSection(TAI->getDataSection()); + EmitLabel("data_begin", 0); -/// EmitLabel - Emit location label for internal use by Dwarf. -/// -void Dwarf::EmitLabel(const char *Tag, unsigned Number) const { - PrintLabelName(Tag, Number); - O << ":\n"; -} + // Emit common frame information. + EmitInitialDebugFrame(); + } -/// EmitReference - Emit a reference to a label. -/// -void Dwarf::EmitReference(const char *Tag, unsigned Number) const { - if (TAI->getAddressSize() == 4) - O << TAI->getData32bitsDirective(); - else - O << TAI->getData64bitsDirective(); - - PrintLabelName(Tag, Number); -} -void Dwarf::EmitReference(const std::string &Name) const { - if (TAI->getAddressSize() == 4) - O << TAI->getData32bitsDirective(); - else - O << TAI->getData64bitsDirective(); + /// EmitDIE - Recusively Emits a debug information entry. + /// + void EmitDIE(DIE *Die) const { + // Get the abbreviation for this DIE. + unsigned AbbrevNumber = Die->getAbbrevNumber(); + const DIEAbbrev *Abbrev = Abbreviations[AbbrevNumber - 1]; - O << Name; -} - -/// EmitDifference - Emit an label difference as sizeof(pointer) value. Some -/// assemblers do not accept absolute expressions with data directives, so there -/// is an option (needsSet) to use an intermediary 'set' expression. -void Dwarf::EmitDifference(const char *TagHi, unsigned NumberHi, - const char *TagLo, unsigned NumberLo) const { - if (TAI->needsSet()) { - static unsigned SetCounter = 0; - - O << "\t.set\t"; - PrintLabelName("set", SetCounter); - O << ","; - PrintLabelName(TagHi, NumberHi); - O << "-"; - PrintLabelName(TagLo, NumberLo); O << "\n"; - - if (TAI->getAddressSize() == sizeof(int32_t)) - O << TAI->getData32bitsDirective(); - else - O << TAI->getData64bitsDirective(); + + // Emit the code (index) for the abbreviation. + EmitULEB128Bytes(AbbrevNumber); + EOL(std::string("Abbrev [" + + utostr(AbbrevNumber) + + "] 0x" + utohexstr(Die->getOffset()) + + ":0x" + utohexstr(Die->getSize()) + " " + + TagString(Abbrev->getTag()))); + + const std::vector &Values = Die->getValues(); + const std::vector &AbbrevData = Abbrev->getData(); + + // Emit the DIE attribute values. + for (unsigned i = 0, N = Values.size(); i < N; ++i) { + unsigned Attr = AbbrevData[i].getAttribute(); + unsigned Form = AbbrevData[i].getForm(); + assert(Form && "Too many attributes for DIE (check abbreviation)"); + + switch (Attr) { + case DW_AT_sibling: { + EmitInt32(Die->SiblingOffset()); + break; + } + default: { + // Emit an attribute using the defined form. + Values[i]->EmitValue(*this, Form); + break; + } + } - PrintLabelName("set", SetCounter); + EOL(AttributeString(Attr)); + } - ++SetCounter; - } else { - if (TAI->getAddressSize() == sizeof(int32_t)) - O << TAI->getData32bitsDirective(); - else - O << TAI->getData64bitsDirective(); + // Emit the DIE children if any. + if (Abbrev->getChildrenFlag() == DW_CHILDREN_yes) { + const std::vector &Children = Die->getChildren(); - PrintLabelName(TagHi, NumberHi); - O << "-"; - PrintLabelName(TagLo, NumberLo); + for (unsigned j = 0, M = Children.size(); j < M; ++j) { + EmitDIE(Children[j]); + } + + EmitInt8(0); EOL("End Of Children Mark"); + } } -} -/// AssignAbbrevNumber - Define a unique number for the abbreviation. -/// -void Dwarf::AssignAbbrevNumber(DIEAbbrev *Abbrev) { - // Profile the node so that we can make it unique. - FoldingSetNodeID ID; - Abbrev->Profile(ID); - - // Check the set for priors. - DIEAbbrev *InSet = AbbreviationsSet.GetOrInsertNode(Abbrev); - - // If it's newly added. - if (InSet == Abbrev) { - // Add to abbreviation list. - Abbreviations.push_back(Abbrev); - // Assign the vector position + 1 as its number. - Abbrev->setNumber(Abbreviations.size()); - } else { - // Assign existing abbreviation number. - Abbrev->setNumber(InSet->getNumber()); - } -} + /// SizeAndOffsetDie - Compute the size and offset of a DIE. + /// + unsigned SizeAndOffsetDie(DIE *Die, unsigned Offset, bool Last) { + // Get the children. + const std::vector &Children = Die->getChildren(); + + // If not last sibling and has children then add sibling offset attribute. + if (!Last && !Children.empty()) Die->AddSiblingOffset(); -/// NewString - Add a string to the constant pool and returns a label. -/// -DWLabel Dwarf::NewString(const std::string &String) { - unsigned StringID = StringPool.insert(String); - return DWLabel("string", StringID); -} + // Record the abbreviation. + AssignAbbrevNumber(Die->getAbbrev()); + + // Get the abbreviation for this DIE. + unsigned AbbrevNumber = Die->getAbbrevNumber(); + const DIEAbbrev *Abbrev = Abbreviations[AbbrevNumber - 1]; + + // Set DIE offset + Die->setOffset(Offset); + + // Start the size with the size of abbreviation code. + Offset += SizeULEB128(AbbrevNumber); + + const std::vector &Values = Die->getValues(); + const std::vector &AbbrevData = Abbrev->getData(); + + // Size the DIE attribute values. + for (unsigned i = 0, N = Values.size(); i < N; ++i) { + // Size attribute value. + Offset += Values[i]->SizeOf(*this, AbbrevData[i].getForm()); + } + + // Size the DIE children if any. + if (!Children.empty()) { + assert(Abbrev->getChildrenFlag() == DW_CHILDREN_yes && + "Children flag not set"); + + for (unsigned j = 0, M = Children.size(); j < M; ++j) { + Offset = SizeAndOffsetDie(Children[j], Offset, (j + 1) == M); + } + + // End of children marker. + Offset += sizeof(int8_t); + } -/// AddSourceLine - Add location information to specified debug information -/// entry. -void Dwarf::AddSourceLine(DIE *Die, CompileUnitDesc *File, unsigned Line){ - if (File && Line) { - CompileUnit *FileUnit = FindCompileUnit(File); - unsigned FileID = FileUnit->getID(); - Die->AddUInt(DW_AT_decl_file, 0, FileID); - Die->AddUInt(DW_AT_decl_line, 0, Line); + Die->setSize(Offset - Die->getOffset()); + return Offset; } -} -/// AddAddress - Add an address attribute to a die based on the location -/// provided. -void Dwarf::AddAddress(DIE *Die, unsigned Attribute, - const MachineLocation &Location) { - DIEBlock *Block = new DIEBlock(); - unsigned Reg = RI->getDwarfRegNum(Location.getRegister()); - - if (Location.isRegister()) { - if (Reg < 32) { - Block->AddUInt(DW_FORM_data1, DW_OP_reg0 + Reg); - } else { - Block->AddUInt(DW_FORM_data1, DW_OP_regx); - Block->AddUInt(DW_FORM_udata, Reg); - } - } else { - if (Reg < 32) { - Block->AddUInt(DW_FORM_data1, DW_OP_breg0 + Reg); - } else { - Block->AddUInt(DW_FORM_data1, DW_OP_bregx); - Block->AddUInt(DW_FORM_udata, Reg); + /// SizeAndOffsets - Compute the size and offset of all the DIEs. + /// + void SizeAndOffsets() { + // Process each compile unit. + for (unsigned i = 0, N = CompileUnits.size(); i < N; ++i) { + CompileUnit *Unit = CompileUnits[i]; + if (Unit->hasContent()) { + // Compute size of compile unit header + unsigned Offset = sizeof(int32_t) + // Length of Compilation Unit Info + sizeof(int16_t) + // DWARF version number + sizeof(int32_t) + // Offset Into Abbrev. Section + sizeof(int8_t); // Pointer Size (in bytes) + SizeAndOffsetDie(Unit->getDie(), Offset, (i + 1) == N); + } } - Block->AddUInt(DW_FORM_sdata, Location.getOffset()); } - Block->ComputeSize(*this); - Die->AddBlock(Attribute, 0, Block); -} - -/// getDieMapSlotFor - Returns the debug information entry map slot for the -/// specified debug descriptor. -DIE *&Dwarf::getDieMapSlotFor(DebugInfoDesc *DD) { - return DescToDieMap[DD]; -} -/// NewType - Create a new type DIE. -/// -DIE *Dwarf::NewType(DIE *Context, TypeDesc *TyDesc, CompileUnit *Unit) { - if (!TyDesc) { - // FIXME - Hack for missing types - DIE *Die = new DIE(DW_TAG_base_type); - Die->AddUInt(DW_AT_byte_size, 0, 4); - Die->AddUInt(DW_AT_encoding, DW_FORM_data1, DW_ATE_signed); - Unit->getDie()->AddChild(Die); - return Die; - } - - // Check for pre-existence. - DIE *&Slot = Unit->getDieMapSlotFor(TyDesc); - if (Slot) return Slot; - - // Type DIE result. - DIE *Ty = NULL; - - // FIXME - Not sure why programs and variables are coming through here. - // Short cut for handling subprogram types (not really a TyDesc.) - if (SubprogramDesc *SubprogramTy = dyn_cast(TyDesc)) { - Slot = Ty = new DIE(DW_TAG_pointer_type); - Ty->AddUInt(DW_AT_byte_size, 0, TAI->getAddressSize()); - Ty->AddString(DW_AT_name, DW_FORM_string, SubprogramTy->getName()); - Context->AddChild(Ty); - return Slot; - } - // Short cut for handling global variable types (not really a TyDesc.) - if (GlobalVariableDesc *GlobalVariableTy = - dyn_cast(TyDesc)) { - Slot = Ty = new DIE(DW_TAG_pointer_type); - Ty->AddUInt(DW_AT_byte_size, 0, TAI->getAddressSize()); - Ty->AddString(DW_AT_name, DW_FORM_string, GlobalVariableTy->getName()); - Context->AddChild(Ty); - return Slot; - } - - // Get core information. - const std::string &Name = TyDesc->getName(); - uint64_t Size = TyDesc->getSize() >> 3; - - if (BasicTypeDesc *BasicTy = dyn_cast(TyDesc)) { - // Fundamental types like int, float, bool - Slot = Ty = new DIE(DW_TAG_base_type); - unsigned Encoding = BasicTy->getEncoding(); - Ty->AddUInt(DW_AT_encoding, DW_FORM_data1, Encoding); - } else if (DerivedTypeDesc *DerivedTy = dyn_cast(TyDesc)) { - // Create specific DIE. - Slot = Ty = new DIE(DerivedTy->getTag()); - - // Map to main type, void will not have a type. - if (TypeDesc *FromTy = DerivedTy->getFromType()) { - Ty->AddDIEntry(DW_AT_type, DW_FORM_ref4, - NewType(Context, FromTy, Unit)); - } - } else if (CompositeTypeDesc *CompTy = dyn_cast(TyDesc)) { - // Fetch tag - unsigned Tag = CompTy->getTag(); - - // Create specific DIE. - Slot = Ty = Tag == DW_TAG_vector_type ? new DIE(DW_TAG_array_type) : - new DIE(Tag); - - std::vector &Elements = CompTy->getElements(); - - switch (Tag) { - case DW_TAG_vector_type: Ty->AddUInt(DW_AT_GNU_vector, DW_FORM_flag, 1); - // Fall thru - case DW_TAG_array_type: { - // Add element type. - if (TypeDesc *FromTy = CompTy->getFromType()) { - Ty->AddDIEntry(DW_AT_type, DW_FORM_ref4, - NewType(Context, FromTy, Unit)); - } - - // Don't emit size attribute. - Size = 0; - - // Construct an anonymous type for index type. - DIE *IndexTy = new DIE(DW_TAG_base_type); - IndexTy->AddUInt(DW_AT_byte_size, 0, 4); - IndexTy->AddUInt(DW_AT_encoding, DW_FORM_data1, DW_ATE_signed); - // Add to context. - Context->AddChild(IndexTy); - - // Add subranges to array type. - for(unsigned i = 0, N = Elements.size(); i < N; ++i) { - SubrangeDesc *SRD = cast(Elements[i]); - int64_t Lo = SRD->getLo(); - int64_t Hi = SRD->getHi(); - DIE *Subrange = new DIE(DW_TAG_subrange_type); - - // If a range is available. - if (Lo != Hi) { - Subrange->AddDIEntry(DW_AT_type, DW_FORM_ref4, IndexTy); - // Only add low if non-zero. - if (Lo) Subrange->AddSInt(DW_AT_lower_bound, 0, Lo); - Subrange->AddSInt(DW_AT_upper_bound, 0, Hi); - } - Ty->AddChild(Subrange); + /// EmitFrameMoves - Emit frame instructions to describe the layout of the + /// frame. + void EmitFrameMoves(const char *BaseLabel, unsigned BaseLabelID, + std::vector &Moves) { + for (unsigned i = 0, N = Moves.size(); i < N; ++i) { + MachineMove *Move = Moves[i]; + unsigned LabelID = Move->getLabelID(); + + // Throw out move if the label is invalid. + if (LabelID && !DebugInfo->isLabelValid(LabelID)) continue; + + const MachineLocation &Dst = Move->getDestination(); + const MachineLocation &Src = Move->getSource(); + + // Advance row if new location. + if (BaseLabel && LabelID && BaseLabelID != LabelID) { + EmitInt8(DW_CFA_advance_loc4); + EOL("DW_CFA_advance_loc4"); + EmitDifference("loc", LabelID, BaseLabel, BaseLabelID); + EOL(""); + + BaseLabelID = LabelID; + BaseLabel = "loc"; } - break; - } - case DW_TAG_structure_type: - case DW_TAG_union_type: { - // Add elements to structure type. - for(unsigned i = 0, N = Elements.size(); i < N; ++i) { - DebugInfoDesc *Element = Elements[i]; - - if (DerivedTypeDesc *MemberDesc = dyn_cast(Element)) { - // Add field or base class. - - unsigned Tag = MemberDesc->getTag(); - - // Extract the basic information. - const std::string &Name = MemberDesc->getName(); - TypeDesc *MemTy = MemberDesc->getFromType(); - uint64_t Size = MemberDesc->getSize(); - uint64_t Align = MemberDesc->getAlign(); - uint64_t Offset = MemberDesc->getOffset(); - - // Construct member debug information entry. - DIE *Member = new DIE(Tag); - - // Add name if not "". - if (!Name.empty())Member->AddString(DW_AT_name, DW_FORM_string, Name); - // Add location if available. - AddSourceLine(Member, MemberDesc->getFile(), MemberDesc->getLine()); - - // Most of the time the field info is the same as the members. - uint64_t FieldSize = Size; - uint64_t FieldAlign = Align; - uint64_t FieldOffset = Offset; - - if (TypeDesc *FromTy = MemberDesc->getFromType()) { - Member->AddDIEntry(DW_AT_type, DW_FORM_ref4, - NewType(Context, FromTy, Unit)); - FieldSize = FromTy->getSize(); - FieldAlign = FromTy->getSize(); - } - - // Unless we have a bit field. - if (Tag == DW_TAG_member && FieldSize != Size) { - // Construct the alignment mask. - uint64_t AlignMask = ~(FieldAlign - 1); - // Determine the high bit + 1 of the declared size. - uint64_t HiMark = (Offset + FieldSize) & AlignMask; - // Work backwards to determine the base offset of the field. - FieldOffset = HiMark - FieldSize; - // Now normalize offset to the field. - Offset -= FieldOffset; - - // Maybe we need to work from the other end. - if (TD->isLittleEndian()) Offset = FieldSize - (Offset + Size); + int stackGrowth = + Asm->TM.getFrameInfo()->getStackGrowthDirection() == + TargetFrameInfo::StackGrowsUp ? + TAI->getAddressSize() : -TAI->getAddressSize(); + + // If advancing cfa. + if (Dst.isRegister() && Dst.getRegister() == MachineLocation::VirtualFP) { + if (!Src.isRegister()) { + if (Src.getRegister() == MachineLocation::VirtualFP) { + EmitInt8(DW_CFA_def_cfa_offset); + EOL("DW_CFA_def_cfa_offset"); + } else { + EmitInt8(DW_CFA_def_cfa); + EOL("DW_CFA_def_cfa"); - // Add size and offset. - Member->AddUInt(DW_AT_byte_size, 0, FieldSize >> 3); - Member->AddUInt(DW_AT_bit_size, 0, Size); - Member->AddUInt(DW_AT_bit_offset, 0, Offset); - } - - // Add computation for offset. - DIEBlock *Block = new DIEBlock(); - Block->AddUInt(DW_FORM_data1, DW_OP_plus_uconst); - Block->AddUInt(DW_FORM_udata, FieldOffset >> 3); - Block->ComputeSize(*this); - Member->AddBlock(DW_AT_data_member_location, 0, Block); - - // Add accessibility (public default unless is base class. - if (MemberDesc->isProtected()) { - Member->AddUInt(DW_AT_accessibility, 0, DW_ACCESS_protected); - } else if (MemberDesc->isPrivate()) { - Member->AddUInt(DW_AT_accessibility, 0, DW_ACCESS_private); - } else if (Tag == DW_TAG_inheritance) { - Member->AddUInt(DW_AT_accessibility, 0, DW_ACCESS_public); - } - - Ty->AddChild(Member); - } else if (GlobalVariableDesc *StaticDesc = - dyn_cast(Element)) { - // Add static member. - - // Construct member debug information entry. - DIE *Static = new DIE(DW_TAG_variable); - - // Add name and mangled name. - const std::string &Name = StaticDesc->getDisplayName(); - const std::string &MangledName = StaticDesc->getName(); - Static->AddString(DW_AT_name, DW_FORM_string, Name); - Static->AddString(DW_AT_MIPS_linkage_name, DW_FORM_string, - MangledName); - - // Add location. - AddSourceLine(Static, StaticDesc->getFile(), StaticDesc->getLine()); - - // Add type. - if (TypeDesc *StaticTy = StaticDesc->getType()) { - Static->AddDIEntry(DW_AT_type, DW_FORM_ref4, - NewType(Context, StaticTy, Unit)); + EmitULEB128Bytes(RI->getDwarfRegNum(Src.getRegister())); + EOL("Register"); } - // Add flags. - Static->AddUInt(DW_AT_external, DW_FORM_flag, 1); - Static->AddUInt(DW_AT_declaration, DW_FORM_flag, 1); - - Ty->AddChild(Static); - } else if (SubprogramDesc *MethodDesc = - dyn_cast(Element)) { - // Add member function. - - // Construct member debug information entry. - DIE *Method = new DIE(DW_TAG_subprogram); - - // Add name and mangled name. - const std::string &Name = MethodDesc->getDisplayName(); - const std::string &MangledName = MethodDesc->getName(); - bool IsCTor = false; - - if (Name.empty()) { - Method->AddString(DW_AT_name, DW_FORM_string, MangledName); - IsCTor = TyDesc->getName() == MangledName; - } else { - Method->AddString(DW_AT_name, DW_FORM_string, Name); - Method->AddString(DW_AT_MIPS_linkage_name, DW_FORM_string, - MangledName); - } + int Offset = Src.getOffset() / stackGrowth; - // Add location. - AddSourceLine(Method, MethodDesc->getFile(), MethodDesc->getLine()); - - // Add type. - if (CompositeTypeDesc *MethodTy = - dyn_cast_or_null(MethodDesc->getType())) { - // Get argument information. - std::vector &Args = MethodTy->getElements(); - - // If not a ctor. - if (!IsCTor) { - // Add return type. - Method->AddDIEntry(DW_AT_type, DW_FORM_ref4, - NewType(Context, dyn_cast(Args[0]), - Unit)); - } - - // Add arguments. - for(unsigned i = 1, N = Args.size(); i < N; ++i) { - DIE *Arg = new DIE(DW_TAG_formal_parameter); - Arg->AddDIEntry(DW_AT_type, DW_FORM_ref4, - NewType(Context, cast(Args[i]), Unit)); - Arg->AddUInt(DW_AT_artificial, DW_FORM_flag, 1); - Method->AddChild(Arg); - } - } - - // Add flags. - Method->AddUInt(DW_AT_external, DW_FORM_flag, 1); - Method->AddUInt(DW_AT_declaration, DW_FORM_flag, 1); - - Ty->AddChild(Method); + EmitULEB128Bytes(Offset); + EOL("Offset"); + } else { + assert(0 && "Machine move no supported yet."); + } + } else { + unsigned Reg = RI->getDwarfRegNum(Src.getRegister()); + int Offset = Dst.getOffset() / stackGrowth; + + if (Offset < 0) { + EmitInt8(DW_CFA_offset_extended_sf); + EOL("DW_CFA_offset_extended_sf"); + EmitULEB128Bytes(Reg); + EOL("Reg"); + EmitSLEB128Bytes(Offset); + EOL("Offset"); + } else if (Reg < 64) { + EmitInt8(DW_CFA_offset + Reg); + EOL("DW_CFA_offset + Reg"); + EmitULEB128Bytes(Offset); + EOL("Offset"); + } else { + EmitInt8(DW_CFA_offset_extended); + EOL("DW_CFA_offset_extended"); + EmitULEB128Bytes(Reg); + EOL("Reg"); + EmitULEB128Bytes(Offset); + EOL("Offset"); } } - break; } - case DW_TAG_enumeration_type: { - // Add enumerators to enumeration type. - for(unsigned i = 0, N = Elements.size(); i < N; ++i) { - EnumeratorDesc *ED = cast(Elements[i]); - const std::string &Name = ED->getName(); - int64_t Value = ED->getValue(); - DIE *Enumerator = new DIE(DW_TAG_enumerator); - Enumerator->AddString(DW_AT_name, DW_FORM_string, Name); - Enumerator->AddSInt(DW_AT_const_value, DW_FORM_sdata, Value); - Ty->AddChild(Enumerator); - } - - break; - } - case DW_TAG_subroutine_type: { - // Add prototype flag. - Ty->AddUInt(DW_AT_prototyped, DW_FORM_flag, 1); - // Add return type. - Ty->AddDIEntry(DW_AT_type, DW_FORM_ref4, - NewType(Context, dyn_cast(Elements[0]), Unit)); - - // Add arguments. - for(unsigned i = 1, N = Elements.size(); i < N; ++i) { - DIE *Arg = new DIE(DW_TAG_formal_parameter); - Arg->AddDIEntry(DW_AT_type, DW_FORM_ref4, - NewType(Context, cast(Elements[i]), Unit)); - Ty->AddChild(Arg); - } - - break; - } - default: break; - } - } - - assert(Ty && "Type not supported yet"); - - // Add size if non-zero (derived types don't have a size.) - if (Size) Ty->AddUInt(DW_AT_byte_size, 0, Size); - // Add name if not anonymous or intermediate type. - if (!Name.empty()) Ty->AddString(DW_AT_name, DW_FORM_string, Name); - // Add source line info if available. - AddSourceLine(Ty, TyDesc->getFile(), TyDesc->getLine()); - - // Add to context owner. - Context->AddChild(Ty); - - return Slot; -} - -/// NewCompileUnit - Create new compile unit and it's debug information entry. -/// -CompileUnit *Dwarf::NewCompileUnit(CompileUnitDesc *UnitDesc, - unsigned ID) { - // Construct debug information entry. - DIE *Die = new DIE(DW_TAG_compile_unit); - 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()); - Die->AddUInt (DW_AT_language, DW_FORM_data1, UnitDesc->getLanguage()); - Die->AddString(DW_AT_name, DW_FORM_string, UnitDesc->getFileName()); - Die->AddString(DW_AT_comp_dir, DW_FORM_string, UnitDesc->getDirectory()); - - // Add debug information entry to descriptor map. - DIE *&Slot = getDieMapSlotFor(UnitDesc); - Slot = Die; - - // Construct compile unit. - CompileUnit *Unit = new CompileUnit(UnitDesc, ID, Die); - - // Add Unit to compile unit map. - DescToUnitMap[UnitDesc] = Unit; - - return Unit; -} - -/// FindCompileUnit - Get the compile unit for the given descriptor. -/// -CompileUnit *Dwarf::FindCompileUnit(CompileUnitDesc *UnitDesc) { - CompileUnit *Unit = DescToUnitMap[UnitDesc]; - assert(Unit && "Missing compile unit."); - return Unit; -} - -/// NewGlobalVariable - Add a new global variable DIE. -/// -DIE *Dwarf::NewGlobalVariable(GlobalVariableDesc *GVD) { - // Get the compile unit context. - CompileUnitDesc *UnitDesc = static_cast(GVD->getContext()); - CompileUnit *Unit = FindCompileUnit(UnitDesc); - - // Check for pre-existence. - DIE *&Slot = Unit->getDieMapSlotFor(GVD); - if (Slot) return Slot; - - // Get the global variable itself. - GlobalVariable *GV = GVD->getGlobalVariable(); - - const std::string &Name = GVD->hasMangledName() ? GVD->getDisplayName() - : GVD->getName(); - const std::string &MangledName = GVD->hasMangledName() ? GVD->getName() - : ""; - // Get the global's type. - DIE *Type = NewType(Unit->getDie(), GVD->getType(), Unit); - - // Create the globale variable DIE. - DIE *VariableDie = new DIE(DW_TAG_variable); - VariableDie->AddString(DW_AT_name, DW_FORM_string, Name); - if (!MangledName.empty()) { - VariableDie->AddString(DW_AT_MIPS_linkage_name, DW_FORM_string, - MangledName); - } - VariableDie->AddDIEntry(DW_AT_type, DW_FORM_ref4, Type); - VariableDie->AddUInt(DW_AT_external, DW_FORM_flag, 1); - - // Add source line info if available. - AddSourceLine(VariableDie, UnitDesc, GVD->getLine()); - - // Work up linkage name. - const std::string LinkageName = Asm->getGlobalLinkName(GV); - - // Add address. - DIEBlock *Block = new DIEBlock(); - Block->AddUInt(DW_FORM_data1, DW_OP_addr); - Block->AddObjectLabel(DW_FORM_udata, LinkageName); - Block->ComputeSize(*this); - VariableDie->AddBlock(DW_AT_location, 0, Block); - - // Add to map. - Slot = VariableDie; - - // Add to context owner. - Unit->getDie()->AddChild(VariableDie); - - // Expose as global. - // FIXME - need to check external flag. - Unit->AddGlobal(Name, VariableDie); - - return VariableDie; -} - -/// NewSubprogram - Add a new subprogram DIE. -/// -DIE *Dwarf::NewSubprogram(SubprogramDesc *SPD) { - // Get the compile unit context. - CompileUnitDesc *UnitDesc = static_cast(SPD->getContext()); - CompileUnit *Unit = FindCompileUnit(UnitDesc); - - // Check for pre-existence. - DIE *&Slot = Unit->getDieMapSlotFor(SPD); - if (Slot) return Slot; - - // Gather the details (simplify add attribute code.) - const std::string &Name = SPD->hasMangledName() ? SPD->getDisplayName() - : SPD->getName(); - const std::string &MangledName = SPD->hasMangledName() ? SPD->getName() - : ""; - DIE *Type = NewType(Unit->getDie(), SPD->getType(), Unit); - unsigned IsExternal = SPD->isStatic() ? 0 : 1; - - DIE *SubprogramDie = new DIE(DW_TAG_subprogram); - SubprogramDie->AddString(DW_AT_name, DW_FORM_string, Name); - if (!MangledName.empty()) { - SubprogramDie->AddString(DW_AT_MIPS_linkage_name, DW_FORM_string, - MangledName); - } - if (Type) { - SubprogramDie->AddDIEntry(DW_AT_type, DW_FORM_ref4, Type); - } - SubprogramDie->AddUInt(DW_AT_external, DW_FORM_flag, IsExternal); - SubprogramDie->AddUInt(DW_AT_prototyped, DW_FORM_flag, 1); - - // Add source line info if available. - AddSourceLine(SubprogramDie, UnitDesc, SPD->getLine()); - - // Add to map. - Slot = SubprogramDie; - - // Add to context owner. - Unit->getDie()->AddChild(SubprogramDie); - - // Expose as global. - Unit->AddGlobal(Name, SubprogramDie); - - return SubprogramDie; -} - -/// NewScopeVariable - Create a new scope variable. -/// -DIE *Dwarf::NewScopeVariable(DebugVariable *DV, CompileUnit *Unit) { - // Get the descriptor. - VariableDesc *VD = DV->getDesc(); + } - // Translate tag to proper Dwarf tag. The result variable is dropped for now. - unsigned Tag; - switch (VD->getTag()) { - case DW_TAG_return_variable: return NULL; - case DW_TAG_arg_variable: Tag = DW_TAG_formal_parameter; break; - case DW_TAG_auto_variable: // fall thru - default: Tag = DW_TAG_variable; break; + /// EmitDebugInfo - Emit the debug info section. + /// + void EmitDebugInfo() const { + // Start debug info section. + Asm->SwitchToDataSection(TAI->getDwarfInfoSection()); + + // Process each compile unit. + for (unsigned i = 0, N = CompileUnits.size(); i < N; ++i) { + CompileUnit *Unit = CompileUnits[i]; + + if (Unit->hasContent()) { + DIE *Die = Unit->getDie(); + // Emit the compile units header. + EmitLabel("info_begin", Unit->getID()); + // Emit size of content not including length itself + unsigned ContentSize = Die->getSize() + + sizeof(int16_t) + // DWARF version number + sizeof(int32_t) + // Offset Into Abbrev. Section + sizeof(int8_t); // Pointer Size (in bytes) + + EmitInt32(ContentSize); EOL("Length of Compilation Unit Info"); + EmitInt16(DWARF_VERSION); EOL("DWARF version number"); + EmitDifference("abbrev_begin", 0, "section_abbrev", 0); + EOL("Offset Into Abbrev. Section"); + EmitInt8(TAI->getAddressSize()); EOL("Address Size (in bytes)"); + + EmitDIE(Die); + EmitLabel("info_end", Unit->getID()); + } + + O << "\n"; + } } - // Define variable debug information entry. - DIE *VariableDie = new DIE(Tag); - VariableDie->AddString(DW_AT_name, DW_FORM_string, VD->getName()); + /// EmitAbbreviations - Emit the abbreviation section. + /// + void EmitAbbreviations() const { + // Check to see if it is worth the effort. + if (!Abbreviations.empty()) { + // Start the debug abbrev section. + Asm->SwitchToDataSection(TAI->getDwarfAbbrevSection()); + + EmitLabel("abbrev_begin", 0); + + // For each abbrevation. + for (unsigned i = 0, N = Abbreviations.size(); i < N; ++i) { + // Get abbreviation data + const DIEAbbrev *Abbrev = Abbreviations[i]; + + // Emit the abbrevations code (base 1 index.) + EmitULEB128Bytes(Abbrev->getNumber()); EOL("Abbreviation Code"); + + // Emit the abbreviations data. + Abbrev->Emit(*this); + + O << "\n"; + } + + EmitLabel("abbrev_end", 0); + + O << "\n"; + } + } - // Add source line info if available. - AddSourceLine(VariableDie, VD->getFile(), VD->getLine()); - - // Add variable type. - DIE *Type = NewType(Unit->getDie(), VD->getType(), Unit); - VariableDie->AddDIEntry(DW_AT_type, DW_FORM_ref4, Type); - - // Add variable address. - MachineLocation Location; - RI->getLocation(*MF, DV->getFrameIndex(), Location); - AddAddress(VariableDie, DW_AT_location, Location); - - return VariableDie; -} + /// EmitDebugLines - Emit source line information. + /// + void EmitDebugLines() const { + // Minimum line delta, thus ranging from -10..(255-10). + const int MinLineDelta = -(DW_LNS_fixed_advance_pc + 1); + // Maximum line delta, thus ranging from -10..(255-10). + const int MaxLineDelta = 255 + MinLineDelta; -/// ConstructScope - Construct the components of a scope. -/// -void Dwarf::ConstructScope(DebugScope *ParentScope, - DIE *ParentDie, CompileUnit *Unit) { - // Add variables to scope. - std::vector &Variables = ParentScope->getVariables(); - for (unsigned i = 0, N = Variables.size(); i < N; ++i) { - DIE *VariableDie = NewScopeVariable(Variables[i], Unit); - if (VariableDie) ParentDie->AddChild(VariableDie); - } - - // Add nested scopes. - std::vector &Scopes = ParentScope->getScopes(); - for (unsigned j = 0, M = Scopes.size(); j < M; ++j) { - // Define the Scope debug information entry. - DebugScope *Scope = Scopes[j]; - // FIXME - Ignore inlined functions for the time being. - if (!Scope->getParent()) continue; + // Start the dwarf line section. + Asm->SwitchToDataSection(TAI->getDwarfLineSection()); - unsigned StartID = Scope->getStartLabelID(); - unsigned EndID = Scope->getEndLabelID(); + // Construct the section header. - // Throw out scope if block is discarded. - if (StartID && !DebugInfo->isLabelValid(StartID)) continue; - if (EndID && !DebugInfo->isLabelValid(EndID)) continue; + EmitDifference("line_end", 0, "line_begin", 0); + EOL("Length of Source Line Info"); + EmitLabel("line_begin", 0); - DIE *ScopeDie = new DIE(DW_TAG_lexical_block); + EmitInt16(DWARF_VERSION); EOL("DWARF version number"); - // Add the scope bounds. - if (StartID) { - ScopeDie->AddLabel(DW_AT_low_pc, DW_FORM_addr, - DWLabel("loc", StartID)); - } else { - ScopeDie->AddLabel(DW_AT_low_pc, DW_FORM_addr, - DWLabel("func_begin", SubprogramCount)); - } - if (EndID) { - ScopeDie->AddLabel(DW_AT_high_pc, DW_FORM_addr, - DWLabel("loc", EndID)); - } else { - ScopeDie->AddLabel(DW_AT_high_pc, DW_FORM_addr, - DWLabel("func_end", SubprogramCount)); - } - - // Add the scope contents. - ConstructScope(Scope, ScopeDie, Unit); - ParentDie->AddChild(ScopeDie); - } -} + EmitDifference("line_prolog_end", 0, "line_prolog_begin", 0); + EOL("Prolog Length"); + EmitLabel("line_prolog_begin", 0); + + EmitInt8(1); EOL("Minimum Instruction Length"); -/// ConstructRootScope - Construct the scope for the subprogram. -/// -void Dwarf::ConstructRootScope(DebugScope *RootScope) { - // Exit if there is no root scope. - if (!RootScope) return; - - // Get the subprogram debug information entry. - SubprogramDesc *SPD = cast(RootScope->getDesc()); - - // Get the compile unit context. - CompileUnitDesc *UnitDesc = static_cast(SPD->getContext()); - CompileUnit *Unit = FindCompileUnit(UnitDesc); - - // Get the subprogram die. - DIE *SPDie = Unit->getDieMapSlotFor(SPD); - assert(SPDie && "Missing subprogram descriptor"); - - // Add the function bounds. - SPDie->AddLabel(DW_AT_low_pc, DW_FORM_addr, - DWLabel("func_begin", SubprogramCount)); - SPDie->AddLabel(DW_AT_high_pc, DW_FORM_addr, - DWLabel("func_end", SubprogramCount)); - MachineLocation Location(RI->getFrameRegister(*MF)); - AddAddress(SPDie, DW_AT_frame_base, Location); - - ConstructScope(RootScope, SPDie, Unit); -} + EmitInt8(1); EOL("Default is_stmt_start flag"); -/// EmitInitial - Emit initial Dwarf declarations. This is necessary for cc -/// tools to recognize the object file contains Dwarf information. -/// -void Dwarf::EmitInitial() { - // Check to see if we already emitted intial headers. - if (didInitial) return; - didInitial = true; - - // Dwarf sections base addresses. - if (TAI->getDwarfRequiresFrameSection()) { - Asm->SwitchToDataSection(TAI->getDwarfFrameSection()); - EmitLabel("section_frame", 0); - } - Asm->SwitchToDataSection(TAI->getDwarfInfoSection()); - EmitLabel("section_info", 0); - Asm->SwitchToDataSection(TAI->getDwarfAbbrevSection()); - EmitLabel("section_abbrev", 0); - Asm->SwitchToDataSection(TAI->getDwarfARangesSection()); - EmitLabel("section_aranges", 0); - Asm->SwitchToDataSection(TAI->getDwarfMacInfoSection()); - EmitLabel("section_macinfo", 0); - Asm->SwitchToDataSection(TAI->getDwarfLineSection()); - EmitLabel("section_line", 0); - Asm->SwitchToDataSection(TAI->getDwarfLocSection()); - EmitLabel("section_loc", 0); - Asm->SwitchToDataSection(TAI->getDwarfPubNamesSection()); - EmitLabel("section_pubnames", 0); - Asm->SwitchToDataSection(TAI->getDwarfStrSection()); - EmitLabel("section_str", 0); - Asm->SwitchToDataSection(TAI->getDwarfRangesSection()); - EmitLabel("section_ranges", 0); - Asm->SwitchToTextSection(TAI->getTextSection()); - EmitLabel("text_begin", 0); - Asm->SwitchToDataSection(TAI->getDataSection()); - EmitLabel("data_begin", 0); - - // Emit common frame information. - EmitInitialDebugFrame(); -} - -/// EmitDIE - Recusively Emits a debug information entry. -/// -void Dwarf::EmitDIE(DIE *Die) const { - // Get the abbreviation for this DIE. - unsigned AbbrevNumber = Die->getAbbrevNumber(); - const DIEAbbrev *Abbrev = Abbreviations[AbbrevNumber - 1]; - - O << "\n"; + EmitInt8(MinLineDelta); EOL("Line Base Value (Special Opcodes)"); + + EmitInt8(MaxLineDelta); EOL("Line Range Value (Special Opcodes)"); - // Emit the code (index) for the abbreviation. - EmitULEB128Bytes(AbbrevNumber); - EOL(std::string("Abbrev [" + - utostr(AbbrevNumber) + - "] 0x" + utohexstr(Die->getOffset()) + - ":0x" + utohexstr(Die->getSize()) + " " + - TagString(Abbrev->getTag()))); - - const std::vector &Values = Die->getValues(); - const std::vector &AbbrevData = Abbrev->getData(); - - // Emit the DIE attribute values. - for (unsigned i = 0, N = Values.size(); i < N; ++i) { - unsigned Attr = AbbrevData[i].getAttribute(); - unsigned Form = AbbrevData[i].getForm(); - assert(Form && "Too many attributes for DIE (check abbreviation)"); + EmitInt8(-MinLineDelta); EOL("Special Opcode Base"); - switch (Attr) { - case DW_AT_sibling: { - EmitInt32(Die->SiblingOffset()); - break; - } - default: { - // Emit an attribute using the defined form. - Values[i]->EmitValue(*this, Form); - break; - } + // Line number standard opcode encodings argument count + EmitInt8(0); EOL("DW_LNS_copy arg count"); + EmitInt8(1); EOL("DW_LNS_advance_pc arg count"); + EmitInt8(1); EOL("DW_LNS_advance_line arg count"); + EmitInt8(1); EOL("DW_LNS_set_file arg count"); + EmitInt8(1); EOL("DW_LNS_set_column arg count"); + EmitInt8(0); EOL("DW_LNS_negate_stmt arg count"); + EmitInt8(0); EOL("DW_LNS_set_basic_block arg count"); + EmitInt8(0); EOL("DW_LNS_const_add_pc arg count"); + EmitInt8(1); EOL("DW_LNS_fixed_advance_pc arg count"); + + const UniqueVector &Directories = DebugInfo->getDirectories(); + const UniqueVector + &SourceFiles = DebugInfo->getSourceFiles(); + + // Emit directories. + for (unsigned DirectoryID = 1, NDID = Directories.size(); + DirectoryID <= NDID; ++DirectoryID) { + EmitString(Directories[DirectoryID]); EOL("Directory"); } + EmitInt8(0); EOL("End of directories"); - EOL(AttributeString(Attr)); - } - - // Emit the DIE children if any. - if (Abbrev->getChildrenFlag() == DW_CHILDREN_yes) { - const std::vector &Children = Die->getChildren(); - - for (unsigned j = 0, M = Children.size(); j < M; ++j) { - EmitDIE(Children[j]); + // Emit files. + for (unsigned SourceID = 1, NSID = SourceFiles.size(); + SourceID <= NSID; ++SourceID) { + const SourceFileInfo &SourceFile = SourceFiles[SourceID]; + EmitString(SourceFile.getName()); EOL("Source"); + EmitULEB128Bytes(SourceFile.getDirectoryID()); EOL("Directory #"); + EmitULEB128Bytes(0); EOL("Mod date"); + EmitULEB128Bytes(0); EOL("File size"); } + EmitInt8(0); EOL("End of files"); - EmitInt8(0); EOL("End Of Children Mark"); - } -} + EmitLabel("line_prolog_end", 0); + + // A sequence for each text section. + for (unsigned j = 0, M = SectionSourceLines.size(); j < M; ++j) { + // Isolate current sections line info. + const std::vector &LineInfos = SectionSourceLines[j]; + + if (DwarfVerbose) { + O << "\t" + << TAI->getCommentString() << " " + << "Section " + << SectionMap[j + 1].c_str() << "\n"; + } -/// SizeAndOffsetDie - Compute the size and offset of a DIE. -/// -unsigned Dwarf::SizeAndOffsetDie(DIE *Die, unsigned Offset, bool Last) { - // Get the children. - const std::vector &Children = Die->getChildren(); - - // If not last sibling and has children then add sibling offset attribute. - if (!Last && !Children.empty()) Die->AddSiblingOffset(); + // Dwarf assumes we start with first line of first source file. + unsigned Source = 1; + unsigned Line = 1; + + // Construct rows of the address, source, line, column matrix. + for (unsigned i = 0, N = LineInfos.size(); i < N; ++i) { + const SourceLineInfo &LineInfo = LineInfos[i]; + unsigned LabelID = LineInfo.getLabelID(); + + // Source line labels are validated at the MachineDebugInfo level. + + if (DwarfVerbose) { + unsigned SourceID = LineInfo.getSourceID(); + const SourceFileInfo &SourceFile = SourceFiles[SourceID]; + unsigned DirectoryID = SourceFile.getDirectoryID(); + O << "\t" + << TAI->getCommentString() << " " + << Directories[DirectoryID] + << SourceFile.getName() << ":" + << LineInfo.getLine() << "\n"; + } - // Record the abbreviation. - Die->Complete(*this); - - // Get the abbreviation for this DIE. - unsigned AbbrevNumber = Die->getAbbrevNumber(); - const DIEAbbrev *Abbrev = Abbreviations[AbbrevNumber - 1]; + // Define the line address. + EmitInt8(0); EOL("Extended Op"); + EmitInt8(4 + 1); EOL("Op size"); + EmitInt8(DW_LNE_set_address); EOL("DW_LNE_set_address"); + EmitReference("loc", LabelID); EOL("Location label"); + + // If change of source, then switch to the new source. + if (Source != LineInfo.getSourceID()) { + Source = LineInfo.getSourceID(); + EmitInt8(DW_LNS_set_file); EOL("DW_LNS_set_file"); + EmitULEB128Bytes(Source); EOL("New Source"); + } + + // If change of line. + if (Line != LineInfo.getLine()) { + // Determine offset. + int Offset = LineInfo.getLine() - Line; + int Delta = Offset - MinLineDelta; + + // Update line. + Line = LineInfo.getLine(); + + // If delta is small enough and in range... + if (Delta >= 0 && Delta < (MaxLineDelta - 1)) { + // ... then use fast opcode. + EmitInt8(Delta - MinLineDelta); EOL("Line Delta"); + } else { + // ... otherwise use long hand. + EmitInt8(DW_LNS_advance_line); EOL("DW_LNS_advance_line"); + EmitSLEB128Bytes(Offset); EOL("Line Offset"); + EmitInt8(DW_LNS_copy); EOL("DW_LNS_copy"); + } + } else { + // Copy the previous row (different address or source) + EmitInt8(DW_LNS_copy); EOL("DW_LNS_copy"); + } + } - // Set DIE offset - Die->setOffset(Offset); - - // Start the size with the size of abbreviation code. - Offset += SizeULEB128(AbbrevNumber); - - const std::vector &Values = Die->getValues(); - const std::vector &AbbrevData = Abbrev->getData(); + // Define last address of section. + EmitInt8(0); EOL("Extended Op"); + EmitInt8(4 + 1); EOL("Op size"); + EmitInt8(DW_LNE_set_address); EOL("DW_LNE_set_address"); + EmitReference("section_end", j + 1); EOL("Section end label"); - // Emit the DIE attribute values. - for (unsigned i = 0, N = Values.size(); i < N; ++i) { - // Size attribute value. - Offset += Values[i]->SizeOf(*this, AbbrevData[i].getForm()); - } - - // Emit the DIE children if any. - if (!Children.empty()) { - assert(Abbrev->getChildrenFlag() == DW_CHILDREN_yes && - "Children flag not set"); - - for (unsigned j = 0, M = Children.size(); j < M; ++j) { - Offset = SizeAndOffsetDie(Children[j], Offset, (j + 1) == M); + // Mark end of matrix. + EmitInt8(0); EOL("DW_LNE_end_sequence"); + EmitULEB128Bytes(1); O << "\n"; + EmitInt8(1); O << "\n"; } - // End of children marker. - Offset += sizeof(int8_t); + EmitLabel("line_end", 0); + + O << "\n"; } + + /// EmitInitialDebugFrame - Emit common frame info into a debug frame section. + /// + void EmitInitialDebugFrame() { + if (!TAI->getDwarfRequiresFrameSection()) + return; - Die->setSize(Offset - Die->getOffset()); - return Offset; -} + int stackGrowth = + Asm->TM.getFrameInfo()->getStackGrowthDirection() == + TargetFrameInfo::StackGrowsUp ? + TAI->getAddressSize() : -TAI->getAddressSize(); -/// SizeAndOffsets - Compute the size and offset of all the DIEs. -/// -void Dwarf::SizeAndOffsets() { - - // Process each compile unit. - for (unsigned i = 0, N = CompileUnits.size(); i < N; ++i) { - CompileUnit *Unit = CompileUnits[i]; - if (Unit->hasContent()) { - // Compute size of compile unit header - unsigned Offset = sizeof(int32_t) + // Length of Compilation Unit Info - sizeof(int16_t) + // DWARF version number - sizeof(int32_t) + // Offset Into Abbrev. Section - sizeof(int8_t); // Pointer Size (in bytes) - SizeAndOffsetDie(Unit->getDie(), Offset, (i + 1) == N); - } + // Start the dwarf frame section. + Asm->SwitchToDataSection(TAI->getDwarfFrameSection()); + + EmitLabel("frame_common", 0); + EmitDifference("frame_common_end", 0, + "frame_common_begin", 0); + EOL("Length of Common Information Entry"); + + EmitLabel("frame_common_begin", 0); + EmitInt32(DW_CIE_ID); EOL("CIE Identifier Tag"); + EmitInt8(DW_CIE_VERSION); EOL("CIE Version"); + EmitString(""); EOL("CIE Augmentation"); + EmitULEB128Bytes(1); EOL("CIE Code Alignment Factor"); + EmitSLEB128Bytes(stackGrowth); EOL("CIE Data Alignment Factor"); + EmitInt8(RI->getDwarfRegNum(RI->getRARegister())); EOL("CIE RA Column"); + + std::vector Moves; + RI->getInitialFrameState(Moves); + EmitFrameMoves(NULL, 0, Moves); + for (unsigned i = 0, N = Moves.size(); i < N; ++i) delete Moves[i]; + + EmitAlign(2); + EmitLabel("frame_common_end", 0); + + O << "\n"; } -} -/// EmitFrameMoves - Emit frame instructions to describe the layout of the -/// frame. -void Dwarf::EmitFrameMoves(const char *BaseLabel, unsigned BaseLabelID, - std::vector &Moves) { - for (unsigned i = 0, N = Moves.size(); i < N; ++i) { - MachineMove *Move = Moves[i]; - unsigned LabelID = Move->getLabelID(); + /// EmitFunctionDebugFrame - Emit per function frame info into a debug frame + /// section. + void EmitFunctionDebugFrame() { + // Start the dwarf frame section. + Asm->SwitchToDataSection(TAI->getDwarfFrameSection()); - // Throw out move if the label is invalid. - if (LabelID && !DebugInfo->isLabelValid(LabelID)) continue; + EmitDifference("frame_end", SubprogramCount, + "frame_begin", SubprogramCount); + EOL("Length of Frame Information Entry"); - const MachineLocation &Dst = Move->getDestination(); - const MachineLocation &Src = Move->getSource(); + EmitLabel("frame_begin", SubprogramCount); - // Advance row if new location. - if (BaseLabel && LabelID && BaseLabelID != LabelID) { - EmitInt8(DW_CFA_advance_loc4); - EOL("DW_CFA_advance_loc4"); - EmitDifference("loc", LabelID, BaseLabel, BaseLabelID); - EOL(""); - - BaseLabelID = LabelID; - BaseLabel = "loc"; - } + EmitDifference("frame_common", 0, "section_frame", 0); + EOL("FDE CIE offset"); + + EmitReference("func_begin", SubprogramCount); EOL("FDE initial location"); + EmitDifference("func_end", SubprogramCount, + "func_begin", SubprogramCount); + EOL("FDE address range"); - int stackGrowth = - Asm->TM.getFrameInfo()->getStackGrowthDirection() == - TargetFrameInfo::StackGrowsUp ? - TAI->getAddressSize() : -TAI->getAddressSize(); + std::vector &Moves = DebugInfo->getFrameMoves(); + + EmitFrameMoves("func_begin", SubprogramCount, Moves); + + EmitAlign(2); + EmitLabel("frame_end", SubprogramCount); - // If advancing cfa. - if (Dst.isRegister() && Dst.getRegister() == MachineLocation::VirtualFP) { - if (!Src.isRegister()) { - if (Src.getRegister() == MachineLocation::VirtualFP) { - EmitInt8(DW_CFA_def_cfa_offset); - EOL("DW_CFA_def_cfa_offset"); - } else { - EmitInt8(DW_CFA_def_cfa); - EOL("DW_CFA_def_cfa"); - - EmitULEB128Bytes(RI->getDwarfRegNum(Src.getRegister())); - EOL("Register"); - } + O << "\n"; + } + + /// EmitDebugPubNames - Emit visible names into a debug pubnames section. + /// + void EmitDebugPubNames() { + // Start the dwarf pubnames section. + Asm->SwitchToDataSection(TAI->getDwarfPubNamesSection()); + + // Process each compile unit. + for (unsigned i = 0, N = CompileUnits.size(); i < N; ++i) { + CompileUnit *Unit = CompileUnits[i]; + + if (Unit->hasContent()) { + EmitDifference("pubnames_end", Unit->getID(), + "pubnames_begin", Unit->getID()); + EOL("Length of Public Names Info"); - int Offset = Src.getOffset() / stackGrowth; + EmitLabel("pubnames_begin", Unit->getID()); - EmitULEB128Bytes(Offset); - EOL("Offset"); - } else { - assert(0 && "Machine move no supported yet."); - } - } else { - unsigned Reg = RI->getDwarfRegNum(Src.getRegister()); - int Offset = Dst.getOffset() / stackGrowth; + EmitInt16(DWARF_VERSION); EOL("DWARF Version"); + + EmitDifference("info_begin", Unit->getID(), "section_info", 0); + EOL("Offset of Compilation Unit Info"); + + EmitDifference("info_end", Unit->getID(), "info_begin", Unit->getID()); + EOL("Compilation Unit Length"); + + std::map &Globals = Unit->getGlobals(); + + for (std::map::iterator GI = Globals.begin(), + GE = Globals.end(); + GI != GE; ++GI) { + const std::string &Name = GI->first; + DIE * Entity = GI->second; + + EmitInt32(Entity->getOffset()); EOL("DIE offset"); + EmitString(Name); EOL("External Name"); + } - if (Offset < 0) { - EmitInt8(DW_CFA_offset_extended_sf); - EOL("DW_CFA_offset_extended_sf"); - EmitULEB128Bytes(Reg); - EOL("Reg"); - EmitSLEB128Bytes(Offset); - EOL("Offset"); - } else if (Reg < 64) { - EmitInt8(DW_CFA_offset + Reg); - EOL("DW_CFA_offset + Reg"); - EmitULEB128Bytes(Offset); - EOL("Offset"); - } else { - EmitInt8(DW_CFA_offset_extended); - EOL("DW_CFA_offset_extended"); - EmitULEB128Bytes(Reg); - EOL("Reg"); - EmitULEB128Bytes(Offset); - EOL("Offset"); + EmitInt32(0); EOL("End Mark"); + EmitLabel("pubnames_end", Unit->getID()); + + O << "\n"; } } } -} -/// EmitDebugInfo - Emit the debug info section. -/// -void Dwarf::EmitDebugInfo() const { - // Start debug info section. - Asm->SwitchToDataSection(TAI->getDwarfInfoSection()); - - // Process each compile unit. - for (unsigned i = 0, N = CompileUnits.size(); i < N; ++i) { - CompileUnit *Unit = CompileUnits[i]; - - if (Unit->hasContent()) { - DIE *Die = Unit->getDie(); - // Emit the compile units header. - EmitLabel("info_begin", Unit->getID()); - // Emit size of content not including length itself - unsigned ContentSize = Die->getSize() + - sizeof(int16_t) + // DWARF version number - sizeof(int32_t) + // Offset Into Abbrev. Section - sizeof(int8_t); // Pointer Size (in bytes) - - EmitInt32(ContentSize); EOL("Length of Compilation Unit Info"); - EmitInt16(DWARF_VERSION); EOL("DWARF version number"); - EmitDifference("abbrev_begin", 0, "section_abbrev", 0); - EOL("Offset Into Abbrev. Section"); - EmitInt8(TAI->getAddressSize()); EOL("Address Size (in bytes)"); + /// EmitDebugStr - Emit visible names into a debug str section. + /// + void EmitDebugStr() { + // Check to see if it is worth the effort. + if (!StringPool.empty()) { + // Start the dwarf str section. + Asm->SwitchToDataSection(TAI->getDwarfStrSection()); + + // For each of strings in the string pool. + for (unsigned StringID = 1, N = StringPool.size(); + StringID <= N; ++StringID) { + // Emit a label for reference from debug information entries. + EmitLabel("string", StringID); + // Emit the string itself. + const std::string &String = StringPool[StringID]; + EmitString(String); O << "\n"; + } - EmitDIE(Die); - EmitLabel("info_end", Unit->getID()); + O << "\n"; } - - O << "\n"; } -} -/// EmitAbbreviations - Emit the abbreviation section. -/// -void Dwarf::EmitAbbreviations() const { - // Check to see if it is worth the effort. - if (!Abbreviations.empty()) { - // Start the debug abbrev section. - Asm->SwitchToDataSection(TAI->getDwarfAbbrevSection()); - - EmitLabel("abbrev_begin", 0); - - // For each abbrevation. - for (unsigned i = 0, N = Abbreviations.size(); i < N; ++i) { - // Get abbreviation data - const DIEAbbrev *Abbrev = Abbreviations[i]; - - // Emit the abbrevations code (base 1 index.) - EmitULEB128Bytes(Abbrev->getNumber()); EOL("Abbreviation Code"); - - // Emit the abbreviations data. - Abbrev->Emit(*this); - - O << "\n"; - } + /// EmitDebugLoc - Emit visible names into a debug loc section. + /// + void EmitDebugLoc() { + // Start the dwarf loc section. + Asm->SwitchToDataSection(TAI->getDwarfLocSection()); - EmitLabel("abbrev_end", 0); - O << "\n"; } -} -/// EmitDebugLines - Emit source line information. -/// -void Dwarf::EmitDebugLines() const { - // Minimum line delta, thus ranging from -10..(255-10). - const int MinLineDelta = -(DW_LNS_fixed_advance_pc + 1); - // Maximum line delta, thus ranging from -10..(255-10). - const int MaxLineDelta = 255 + MinLineDelta; + /// EmitDebugARanges - Emit visible names into a debug aranges section. + /// + void EmitDebugARanges() { + // Start the dwarf aranges section. + Asm->SwitchToDataSection(TAI->getDwarfARangesSection()); + + // FIXME - Mock up + #if 0 + // Process each compile unit. + for (unsigned i = 0, N = CompileUnits.size(); i < N; ++i) { + CompileUnit *Unit = CompileUnits[i]; + + if (Unit->hasContent()) { + // Don't include size of length + EmitInt32(0x1c); EOL("Length of Address Ranges Info"); + + EmitInt16(DWARF_VERSION); EOL("Dwarf Version"); + + EmitReference("info_begin", Unit->getID()); + EOL("Offset of Compilation Unit Info"); - // Start the dwarf line section. - Asm->SwitchToDataSection(TAI->getDwarfLineSection()); - - // Construct the section header. - - EmitDifference("line_end", 0, "line_begin", 0); - EOL("Length of Source Line Info"); - EmitLabel("line_begin", 0); - - EmitInt16(DWARF_VERSION); EOL("DWARF version number"); - - EmitDifference("line_prolog_end", 0, "line_prolog_begin", 0); - EOL("Prolog Length"); - EmitLabel("line_prolog_begin", 0); - - EmitInt8(1); EOL("Minimum Instruction Length"); + EmitInt8(TAI->getAddressSize()); EOL("Size of Address"); - EmitInt8(1); EOL("Default is_stmt_start flag"); + EmitInt8(0); EOL("Size of Segment Descriptor"); - EmitInt8(MinLineDelta); EOL("Line Base Value (Special Opcodes)"); - - EmitInt8(MaxLineDelta); EOL("Line Range Value (Special Opcodes)"); + EmitInt16(0); EOL("Pad (1)"); + EmitInt16(0); EOL("Pad (2)"); - EmitInt8(-MinLineDelta); EOL("Special Opcode Base"); - - // Line number standard opcode encodings argument count - EmitInt8(0); EOL("DW_LNS_copy arg count"); - EmitInt8(1); EOL("DW_LNS_advance_pc arg count"); - EmitInt8(1); EOL("DW_LNS_advance_line arg count"); - EmitInt8(1); EOL("DW_LNS_set_file arg count"); - EmitInt8(1); EOL("DW_LNS_set_column arg count"); - EmitInt8(0); EOL("DW_LNS_negate_stmt arg count"); - EmitInt8(0); EOL("DW_LNS_set_basic_block arg count"); - EmitInt8(0); EOL("DW_LNS_const_add_pc arg count"); - EmitInt8(1); EOL("DW_LNS_fixed_advance_pc arg count"); + // Range 1 + EmitReference("text_begin", 0); EOL("Address"); + EmitDifference("text_end", 0, "text_begin", 0); EOL("Length"); - const UniqueVector &Directories = DebugInfo->getDirectories(); - const UniqueVector &SourceFiles = DebugInfo->getSourceFiles(); + EmitInt32(0); EOL("EOM (1)"); + EmitInt32(0); EOL("EOM (2)"); + + O << "\n"; + } + } + #endif + } - // Emit directories. - for (unsigned DirectoryID = 1, NDID = Directories.size(); - DirectoryID <= NDID; ++DirectoryID) { - EmitString(Directories[DirectoryID]); EOL("Directory"); + /// EmitDebugRanges - Emit visible names into a debug ranges section. + /// + void EmitDebugRanges() { + // Start the dwarf ranges section. + Asm->SwitchToDataSection(TAI->getDwarfRangesSection()); + + O << "\n"; } - EmitInt8(0); EOL("End of directories"); - - // Emit files. - for (unsigned SourceID = 1, NSID = SourceFiles.size(); - SourceID <= NSID; ++SourceID) { - const SourceFileInfo &SourceFile = SourceFiles[SourceID]; - EmitString(SourceFile.getName()); EOL("Source"); - EmitULEB128Bytes(SourceFile.getDirectoryID()); EOL("Directory #"); - EmitULEB128Bytes(0); EOL("Mod date"); - EmitULEB128Bytes(0); EOL("File size"); + + /// EmitDebugMacInfo - Emit visible names into a debug macinfo section. + /// + void EmitDebugMacInfo() { + // Start the dwarf macinfo section. + Asm->SwitchToDataSection(TAI->getDwarfMacInfoSection()); + + O << "\n"; } - EmitInt8(0); EOL("End of files"); - - EmitLabel("line_prolog_end", 0); - - // A sequence for each text section. - for (unsigned j = 0, M = SectionSourceLines.size(); j < M; ++j) { - // Isolate current sections line info. - const std::vector &LineInfos = SectionSourceLines[j]; + + /// ConstructCompileUnitDIEs - Create a compile unit DIE for each source and + /// header file. + void ConstructCompileUnitDIEs() { + const UniqueVector CUW = DebugInfo->getCompileUnits(); - if (DwarfVerbose) { - O << "\t" - << TAI->getCommentString() << " " - << "Section " - << SectionMap[j + 1].c_str() << "\n"; + for (unsigned i = 1, N = CUW.size(); i <= N; ++i) { + CompileUnit *Unit = NewCompileUnit(CUW[i], i); + CompileUnits.push_back(Unit); } + } - // Dwarf assumes we start with first line of first source file. - unsigned Source = 1; - unsigned Line = 1; - - // Construct rows of the address, source, line, column matrix. - for (unsigned i = 0, N = LineInfos.size(); i < N; ++i) { - const SourceLineInfo &LineInfo = LineInfos[i]; - unsigned LabelID = LineInfo.getLabelID(); - - // Source line labels are validated at the MachineDebugInfo level. + /// ConstructGlobalDIEs - Create DIEs for each of the externally visible + /// global variables. + void ConstructGlobalDIEs() { + std::vector GlobalVariables = + DebugInfo->getAnchoredDescriptors(*M); + + for (unsigned i = 0, N = GlobalVariables.size(); i < N; ++i) { + GlobalVariableDesc *GVD = GlobalVariables[i]; + NewGlobalVariable(GVD); + } + } + + /// ConstructSubprogramDIEs - Create DIEs for each of the externally visible + /// subprograms. + void ConstructSubprogramDIEs() { + std::vector Subprograms = + DebugInfo->getAnchoredDescriptors(*M); + + for (unsigned i = 0, N = Subprograms.size(); i < N; ++i) { + SubprogramDesc *SPD = Subprograms[i]; + NewSubprogram(SPD); + } + } + + /// ShouldEmitDwarf - Returns true if Dwarf declarations should be made. + /// + bool ShouldEmitDwarf() const { return shouldEmit; } + +public: + //===--------------------------------------------------------------------===// + // Main entry points. + // + Dwarf(std::ostream &OS, AsmPrinter *A, const TargetAsmInfo *T) + : O(OS) + , Asm(A) + , TAI(T) + , TD(Asm->TM.getTargetData()) + , RI(Asm->TM.getRegisterInfo()) + , M(NULL) + , MF(NULL) + , DebugInfo(NULL) + , didInitial(false) + , shouldEmit(false) + , SubprogramCount(0) + , CompileUnits() + , AbbreviationsSet(InitAbbreviationsSetSize) + , Abbreviations() + , ValuesSet(InitValuesSetSize) + , Values() + , StringPool() + , DescToUnitMap() + , SectionMap() + , SectionSourceLines() + { + } + virtual ~Dwarf() { + for (unsigned i = 0, N = CompileUnits.size(); i < N; ++i) + delete CompileUnits[i]; + for (unsigned j = 0, M = Values.size(); j < M; ++j) + delete Values[j]; + } + + // Accessors. + // + const TargetAsmInfo *getTargetAsmInfo() const { return TAI; } + + /// SetDebugInfo - Set DebugInfo when it's known that pass manager has + /// created it. Set by the target AsmPrinter. + void SetDebugInfo(MachineDebugInfo *DI) { + // Make sure initial declarations are made. + if (!DebugInfo && DI->hasInfo()) { + DebugInfo = DI; + shouldEmit = true; + + // Emit initial sections + EmitInitial(); + + // Create all the compile unit DIEs. + ConstructCompileUnitDIEs(); - if (DwarfVerbose) { - unsigned SourceID = LineInfo.getSourceID(); - const SourceFileInfo &SourceFile = SourceFiles[SourceID]; - unsigned DirectoryID = SourceFile.getDirectoryID(); - O << "\t" - << TAI->getCommentString() << " " - << Directories[DirectoryID] - << SourceFile.getName() << ":" - << LineInfo.getLine() << "\n"; - } + // Create DIEs for each of the externally visible global variables. + ConstructGlobalDIEs(); - // Define the line address. - EmitInt8(0); EOL("Extended Op"); - EmitInt8(4 + 1); EOL("Op size"); - EmitInt8(DW_LNE_set_address); EOL("DW_LNE_set_address"); - EmitReference("loc", LabelID); EOL("Location label"); + // Create DIEs for each of the externally visible subprograms. + ConstructSubprogramDIEs(); - // If change of source, then switch to the new source. - if (Source != LineInfo.getSourceID()) { - Source = LineInfo.getSourceID(); - EmitInt8(DW_LNS_set_file); EOL("DW_LNS_set_file"); - EmitULEB128Bytes(Source); EOL("New Source"); - } - - // If change of line. - if (Line != LineInfo.getLine()) { - // Determine offset. - int Offset = LineInfo.getLine() - Line; - int Delta = Offset - MinLineDelta; - - // Update line. - Line = LineInfo.getLine(); - - // If delta is small enough and in range... - if (Delta >= 0 && Delta < (MaxLineDelta - 1)) { - // ... then use fast opcode. - EmitInt8(Delta - MinLineDelta); EOL("Line Delta"); - } else { - // ... otherwise use long hand. - EmitInt8(DW_LNS_advance_line); EOL("DW_LNS_advance_line"); - EmitSLEB128Bytes(Offset); EOL("Line Offset"); - EmitInt8(DW_LNS_copy); EOL("DW_LNS_copy"); - } - } else { - // Copy the previous row (different address or source) - EmitInt8(DW_LNS_copy); EOL("DW_LNS_copy"); - } + // Prime section data. + SectionMap.insert(std::string("\t") + TAI->getTextSection()); + } + } + + /// BeginModule - Emit all Dwarf sections that should come prior to the + /// content. + void BeginModule(Module *M) { + this->M = M; + + if (!ShouldEmitDwarf()) return; + EOL("Dwarf Begin Module"); + } + + /// EndModule - Emit all Dwarf sections that should come after the content. + /// + void EndModule() { + if (!ShouldEmitDwarf()) return; + EOL("Dwarf End Module"); + + // Standard sections final addresses. + Asm->SwitchToTextSection(TAI->getTextSection()); + EmitLabel("text_end", 0); + Asm->SwitchToDataSection(TAI->getDataSection()); + EmitLabel("data_end", 0); + + // End text sections. + for (unsigned i = 1, N = SectionMap.size(); i <= N; ++i) { + Asm->SwitchToTextSection(SectionMap[i].c_str()); + EmitLabel("section_end", i); } + + // Compute DIE offsets and sizes. + SizeAndOffsets(); + + // Emit all the DIEs into a debug info section + EmitDebugInfo(); + + // Corresponding abbreviations into a abbrev section. + EmitAbbreviations(); + + // Emit source line correspondence into a debug line section. + EmitDebugLines(); + + // Emit info into a debug pubnames section. + EmitDebugPubNames(); + + // Emit info into a debug str section. + EmitDebugStr(); + + // Emit info into a debug loc section. + EmitDebugLoc(); + + // Emit info into a debug aranges section. + EmitDebugARanges(); + + // Emit info into a debug ranges section. + EmitDebugRanges(); + + // Emit info into a debug macinfo section. + EmitDebugMacInfo(); + } - // Define last address of section. - EmitInt8(0); EOL("Extended Op"); - EmitInt8(4 + 1); EOL("Op size"); - EmitInt8(DW_LNE_set_address); EOL("DW_LNE_set_address"); - EmitReference("section_end", j + 1); EOL("Section end label"); + /// BeginFunction - Gather pre-function debug information. Assumes being + /// emitted immediately after the function entry point. + void BeginFunction(MachineFunction *MF) { + this->MF = MF; + + if (!ShouldEmitDwarf()) return; + EOL("Dwarf Begin Function"); - // Mark end of matrix. - EmitInt8(0); EOL("DW_LNE_end_sequence"); - EmitULEB128Bytes(1); O << "\n"; - EmitInt8(1); O << "\n"; + // Begin accumulating function debug information. + DebugInfo->BeginFunction(MF); + + // Assumes in correct section after the entry point. + EmitLabel("func_begin", ++SubprogramCount); } - - EmitLabel("line_end", 0); - - O << "\n"; -} - -/// 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 ? - TAI->getAddressSize() : -TAI->getAddressSize(); - - // Start the dwarf frame section. - Asm->SwitchToDataSection(TAI->getDwarfFrameSection()); - - EmitLabel("frame_common", 0); - EmitDifference("frame_common_end", 0, - "frame_common_begin", 0); - EOL("Length of Common Information Entry"); - - EmitLabel("frame_common_begin", 0); - EmitInt32(DW_CIE_ID); EOL("CIE Identifier Tag"); - EmitInt8(DW_CIE_VERSION); EOL("CIE Version"); - EmitString(""); EOL("CIE Augmentation"); - EmitULEB128Bytes(1); EOL("CIE Code Alignment Factor"); - EmitSLEB128Bytes(stackGrowth); EOL("CIE Data Alignment Factor"); - EmitInt8(RI->getDwarfRegNum(RI->getRARegister())); EOL("CIE RA Column"); - - std::vector Moves; - RI->getInitialFrameState(Moves); - EmitFrameMoves(NULL, 0, Moves); - for (unsigned i = 0, N = Moves.size(); i < N; ++i) delete Moves[i]; - EmitAlign(2); - EmitLabel("frame_common_end", 0); - - O << "\n"; -} + /// EndFunction - Gather and emit post-function debug information. + /// + void EndFunction() { + if (!ShouldEmitDwarf()) return; + EOL("Dwarf End Function"); + + // Define end label for subprogram. + EmitLabel("func_end", SubprogramCount); + + // Get function line info. + const std::vector &LineInfos = DebugInfo->getSourceLines(); -/// EmitFunctionDebugFrame - Emit per function frame info into a debug frame -/// section. -void Dwarf::EmitFunctionDebugFrame() { - if (!TAI->getDwarfRequiresFrameSection()) - return; + if (!LineInfos.empty()) { + // Get section line info. + unsigned ID = SectionMap.insert(Asm->CurrentSection); + if (SectionSourceLines.size() < ID) SectionSourceLines.resize(ID); + std::vector &SectionLineInfos = SectionSourceLines[ID-1]; + // Append the function info to section info. + SectionLineInfos.insert(SectionLineInfos.end(), + LineInfos.begin(), LineInfos.end()); + } + + // Construct scopes for subprogram. + ConstructRootScope(DebugInfo->getRootScope()); + + // Emit function frame information. + EmitFunctionDebugFrame(); + + // Reset the line numbers for the next function. + DebugInfo->ClearLineInfo(); - // Start the dwarf frame section. - Asm->SwitchToDataSection(TAI->getDwarfFrameSection()); - - EmitDifference("frame_end", SubprogramCount, - "frame_begin", SubprogramCount); - EOL("Length of Frame Information Entry"); - - EmitLabel("frame_begin", SubprogramCount); - - EmitDifference("frame_common", 0, "section_frame", 0); - EOL("FDE CIE offset"); + // Clear function debug information. + DebugInfo->EndFunction(); + } +}; - EmitReference("func_begin", SubprogramCount); EOL("FDE initial location"); - EmitDifference("func_end", SubprogramCount, - "func_begin", SubprogramCount); - EOL("FDE address range"); - - std::vector &Moves = DebugInfo->getFrameMoves(); - - EmitFrameMoves("func_begin", SubprogramCount, Moves); - - EmitAlign(2); - EmitLabel("frame_end", SubprogramCount); +} // End of namespace llvm - O << "\n"; -} +//===----------------------------------------------------------------------===// -/// EmitDebugPubNames - Emit visible names into a debug pubnames section. +/// Emit - Print the abbreviation using the specified Dwarf writer. /// -void Dwarf::EmitDebugPubNames() { - // Start the dwarf pubnames section. - Asm->SwitchToDataSection(TAI->getDwarfPubNamesSection()); - - // Process each compile unit. - for (unsigned i = 0, N = CompileUnits.size(); i < N; ++i) { - CompileUnit *Unit = CompileUnits[i]; - - if (Unit->hasContent()) { - EmitDifference("pubnames_end", Unit->getID(), - "pubnames_begin", Unit->getID()); - EOL("Length of Public Names Info"); - - EmitLabel("pubnames_begin", Unit->getID()); - - EmitInt16(DWARF_VERSION); EOL("DWARF Version"); - - EmitDifference("info_begin", Unit->getID(), "section_info", 0); - EOL("Offset of Compilation Unit Info"); - - EmitDifference("info_end", Unit->getID(), "info_begin", Unit->getID()); - EOL("Compilation Unit Length"); - - std::map &Globals = Unit->getGlobals(); - - for (std::map::iterator GI = Globals.begin(), - GE = Globals.end(); - GI != GE; ++GI) { - const std::string &Name = GI->first; - DIE * Entity = GI->second; - - EmitInt32(Entity->getOffset()); EOL("DIE offset"); - EmitString(Name); EOL("External Name"); - } +void DIEAbbrev::Emit(const Dwarf &DW) const { + // Emit its Dwarf tag type. + DW.EmitULEB128Bytes(Tag); + DW.EOL(TagString(Tag)); + + // Emit whether it has children DIEs. + DW.EmitULEB128Bytes(ChildrenFlag); + DW.EOL(ChildrenString(ChildrenFlag)); + + // For each attribute description. + for (unsigned i = 0, N = Data.size(); i < N; ++i) { + const DIEAbbrevData &AttrData = Data[i]; - EmitInt32(0); EOL("End Mark"); - EmitLabel("pubnames_end", Unit->getID()); + // Emit attribute type. + DW.EmitULEB128Bytes(AttrData.getAttribute()); + DW.EOL(AttributeString(AttrData.getAttribute())); - O << "\n"; - } + // Emit form type. + DW.EmitULEB128Bytes(AttrData.getForm()); + DW.EOL(FormEncodingString(AttrData.getForm())); } + + // Mark end of abbreviation. + DW.EmitULEB128Bytes(0); DW.EOL("EOM(1)"); + DW.EmitULEB128Bytes(0); DW.EOL("EOM(2)"); } -/// EmitDebugStr - Emit visible names into a debug str section. -/// -void Dwarf::EmitDebugStr() { - // Check to see if it is worth the effort. - if (!StringPool.empty()) { - // Start the dwarf str section. - Asm->SwitchToDataSection(TAI->getDwarfStrSection()); - - // For each of strings in the string pool. - for (unsigned StringID = 1, N = StringPool.size(); - StringID <= N; ++StringID) { - // Emit a label for reference from debug information entries. - EmitLabel("string", StringID); - // Emit the string itself. - const std::string &String = StringPool[StringID]; - EmitString(String); O << "\n"; - } +#ifndef NDEBUG +void DIEAbbrev::print(std::ostream &O) { + O << "Abbreviation @" + << std::hex << (intptr_t)this << std::dec + << " " + << TagString(Tag) + << " " + << ChildrenString(ChildrenFlag) + << "\n"; - O << "\n"; + for (unsigned i = 0, N = Data.size(); i < N; ++i) { + O << " " + << AttributeString(Data[i].getAttribute()) + << " " + << FormEncodingString(Data[i].getForm()) + << "\n"; } } +void DIEAbbrev::dump() { print(std::cerr); } +#endif -/// EmitDebugLoc - Emit visible names into a debug loc section. -/// -void Dwarf::EmitDebugLoc() { - // Start the dwarf loc section. - Asm->SwitchToDataSection(TAI->getDwarfLocSection()); - - O << "\n"; +//===----------------------------------------------------------------------===// + +#ifndef NDEBUG +void DIEValue::dump() { + print(std::cerr); } +#endif -/// EmitDebugARanges - Emit visible names into a debug aranges section. -/// -void Dwarf::EmitDebugARanges() { - // Start the dwarf aranges section. - Asm->SwitchToDataSection(TAI->getDwarfARangesSection()); - - // FIXME - Mock up -#if 0 - // Process each compile unit. - for (unsigned i = 0, N = CompileUnits.size(); i < N; ++i) { - CompileUnit *Unit = CompileUnits[i]; - - if (Unit->hasContent()) { - // Don't include size of length - EmitInt32(0x1c); EOL("Length of Address Ranges Info"); - - EmitInt16(DWARF_VERSION); EOL("Dwarf Version"); - - EmitReference("info_begin", Unit->getID()); - EOL("Offset of Compilation Unit Info"); +//===----------------------------------------------------------------------===// - EmitInt8(TAI->getAddressSize()); EOL("Size of Address"); +/// EmitValue - Emit integer of appropriate size. +/// +void DIEInteger::EmitValue(const Dwarf &DW, unsigned Form) const { + switch (Form) { + case DW_FORM_flag: // Fall thru + case DW_FORM_ref1: // Fall thru + case DW_FORM_data1: DW.EmitInt8(Integer); break; + case DW_FORM_ref2: // Fall thru + case DW_FORM_data2: DW.EmitInt16(Integer); break; + case DW_FORM_ref4: // Fall thru + case DW_FORM_data4: DW.EmitInt32(Integer); break; + case DW_FORM_ref8: // Fall thru + case DW_FORM_data8: DW.EmitInt64(Integer); break; + case DW_FORM_udata: DW.EmitULEB128Bytes(Integer); break; + case DW_FORM_sdata: DW.EmitSLEB128Bytes(Integer); break; + default: assert(0 && "DIE Value form not supported yet"); break; + } +} - EmitInt8(0); EOL("Size of Segment Descriptor"); +//===----------------------------------------------------------------------===// - EmitInt16(0); EOL("Pad (1)"); - EmitInt16(0); EOL("Pad (2)"); +/// EmitValue - Emit string value. +/// +void DIEString::EmitValue(const Dwarf &DW, unsigned Form) const { + DW.EmitString(String); +} - // Range 1 - EmitReference("text_begin", 0); EOL("Address"); - EmitDifference("text_end", 0, "text_begin", 0); EOL("Length"); +//===----------------------------------------------------------------------===// - EmitInt32(0); EOL("EOM (1)"); - EmitInt32(0); EOL("EOM (2)"); - - O << "\n"; - } - } -#endif +/// EmitValue - Emit label value. +/// +void DIEDwarfLabel::EmitValue(const Dwarf &DW, unsigned Form) const { + DW.EmitReference(Label); } -/// EmitDebugRanges - Emit visible names into a debug ranges section. +/// SizeOf - Determine size of label value in bytes. /// -void Dwarf::EmitDebugRanges() { - // Start the dwarf ranges section. - Asm->SwitchToDataSection(TAI->getDwarfRangesSection()); - - O << "\n"; +unsigned DIEDwarfLabel::SizeOf(const Dwarf &DW, unsigned Form) const { + return DW.getTargetAsmInfo()->getAddressSize(); } -/// EmitDebugMacInfo - Emit visible names into a debug macinfo section. +//===----------------------------------------------------------------------===// + +/// EmitValue - Emit label value. /// -void Dwarf::EmitDebugMacInfo() { - // Start the dwarf macinfo section. - Asm->SwitchToDataSection(TAI->getDwarfMacInfoSection()); - - O << "\n"; +void DIEObjectLabel::EmitValue(const Dwarf &DW, unsigned Form) const { + DW.EmitReference(Label); } -/// ConstructCompileUnitDIEs - Create a compile unit DIE for each source and -/// header file. -void Dwarf::ConstructCompileUnitDIEs() { - const UniqueVector CUW = DebugInfo->getCompileUnits(); - - for (unsigned i = 1, N = CUW.size(); i <= N; ++i) { - CompileUnit *Unit = NewCompileUnit(CUW[i], i); - CompileUnits.push_back(Unit); - } +/// SizeOf - Determine size of label value in bytes. +/// +unsigned DIEObjectLabel::SizeOf(const Dwarf &DW, unsigned Form) const { + return DW.getTargetAsmInfo()->getAddressSize(); } + +//===----------------------------------------------------------------------===// -/// ConstructGlobalDIEs - Create DIEs for each of the externally visible global -/// variables. -void Dwarf::ConstructGlobalDIEs() { - std::vector GlobalVariables = - DebugInfo->getAnchoredDescriptors(*M); - - for (unsigned i = 0, N = GlobalVariables.size(); i < N; ++i) { - GlobalVariableDesc *GVD = GlobalVariables[i]; - NewGlobalVariable(GVD); - } +/// EmitValue - Emit delta value. +/// +void DIEDelta::EmitValue(const Dwarf &DW, unsigned Form) const { + DW.EmitDifference(LabelHi, LabelLo); } -/// ConstructSubprogramDIEs - Create DIEs for each of the externally visible -/// subprograms. -void Dwarf::ConstructSubprogramDIEs() { - std::vector Subprograms = - DebugInfo->getAnchoredDescriptors(*M); - - for (unsigned i = 0, N = Subprograms.size(); i < N; ++i) { - SubprogramDesc *SPD = Subprograms[i]; - NewSubprogram(SPD); - } +/// SizeOf - Determine size of delta value in bytes. +/// +unsigned DIEDelta::SizeOf(const Dwarf &DW, unsigned Form) const { + return DW.getTargetAsmInfo()->getAddressSize(); } //===----------------------------------------------------------------------===// -/// Dwarf implemenation. -// - -Dwarf::Dwarf(std::ostream &OS, AsmPrinter *A, - const TargetAsmInfo *T) -: O(OS) -, Asm(A) -, TAI(T) -, TD(Asm->TM.getTargetData()) -, RI(Asm->TM.getRegisterInfo()) -, M(NULL) -, MF(NULL) -, DebugInfo(NULL) -, didInitial(false) -, shouldEmit(false) -, SubprogramCount(0) -, CompileUnits() -, AbbreviationsSet() -, Abbreviations() -, StringPool() -, DescToUnitMap() -, DescToDieMap() -, SectionMap() -, SectionSourceLines() -{ -} -Dwarf::~Dwarf() { - for (unsigned i = 0, N = CompileUnits.size(); i < N; ++i) { - delete CompileUnits[i]; - } -} -/// SetDebugInfo - Set DebugInfo when it's known that pass manager has -/// created it. Set by the target AsmPrinter. -void Dwarf::SetDebugInfo(MachineDebugInfo *DI) { - // Make sure initial declarations are made. - if (!DebugInfo && DI->hasInfo()) { - DebugInfo = DI; - shouldEmit = true; - - // Emit initial sections - EmitInitial(); - - // Create all the compile unit DIEs. - ConstructCompileUnitDIEs(); +/// EmitValue - Emit debug information entry offset. +/// +void DIEntry::EmitValue(const Dwarf &DW, unsigned Form) const { + DW.EmitInt32(Entry->getOffset()); +} - // Create DIEs for each of the externally visible global variables. - ConstructGlobalDIEs(); +//===----------------------------------------------------------------------===// - // Create DIEs for each of the externally visible subprograms. - ConstructSubprogramDIEs(); +/// ComputeSize - calculate the size of the block. +/// +unsigned DIEBlock::ComputeSize(Dwarf &DW) { + if (!Size) { + const std::vector &AbbrevData = Abbrev.getData(); - // Prime section data. - SectionMap.insert(std::string("\t") + TAI->getTextSection()); + for (unsigned i = 0, N = Values.size(); i < N; ++i) { + Size += Values[i]->SizeOf(DW, AbbrevData[i].getForm()); + } } + return Size; } -/// BeginModule - Emit all Dwarf sections that should come prior to the content. +/// EmitValue - Emit block data. /// -void Dwarf::BeginModule(Module *M) { - this->M = M; +void DIEBlock::EmitValue(const Dwarf &DW, unsigned Form) const { + switch (Form) { + case DW_FORM_block1: DW.EmitInt8(Size); break; + case DW_FORM_block2: DW.EmitInt16(Size); break; + case DW_FORM_block4: DW.EmitInt32(Size); break; + case DW_FORM_block: DW.EmitULEB128Bytes(Size); break; + default: assert(0 && "Improper form for block"); break; + } - if (!ShouldEmitDwarf()) return; - EOL("Dwarf Begin Module"); + const std::vector &AbbrevData = Abbrev.getData(); + + for (unsigned i = 0, N = Values.size(); i < N; ++i) { + DW.EOL(""); + Values[i]->EmitValue(DW, AbbrevData[i].getForm()); + } } -/// EndModule - Emit all Dwarf sections that should come after the content. +/// SizeOf - Determine size of block data in bytes. /// -void Dwarf::EndModule() { - if (!ShouldEmitDwarf()) return; - EOL("Dwarf End Module"); - - // Standard sections final addresses. - Asm->SwitchToTextSection(TAI->getTextSection()); - EmitLabel("text_end", 0); - Asm->SwitchToDataSection(TAI->getDataSection()); - EmitLabel("data_end", 0); - - // End text sections. - for (unsigned i = 1, N = SectionMap.size(); i <= N; ++i) { - Asm->SwitchToTextSection(SectionMap[i].c_str()); - EmitLabel("section_end", i); +unsigned DIEBlock::SizeOf(const Dwarf &DW, unsigned Form) const { + switch (Form) { + case DW_FORM_block1: return Size + sizeof(int8_t); + case DW_FORM_block2: return Size + sizeof(int16_t); + case DW_FORM_block4: return Size + sizeof(int32_t); + case DW_FORM_block: return Size + SizeULEB128(Size); + default: assert(0 && "Improper form for block"); break; } - - // Compute DIE offsets and sizes. - SizeAndOffsets(); - - // Emit all the DIEs into a debug info section - EmitDebugInfo(); - - // Corresponding abbreviations into a abbrev section. - EmitAbbreviations(); - - // Emit source line correspondence into a debug line section. - EmitDebugLines(); - - // Emit info into a debug pubnames section. - EmitDebugPubNames(); - - // Emit info into a debug str section. - EmitDebugStr(); - - // Emit info into a debug loc section. - EmitDebugLoc(); - - // Emit info into a debug aranges section. - EmitDebugARanges(); - - // Emit info into a debug ranges section. - EmitDebugRanges(); - - // Emit info into a debug macinfo section. - EmitDebugMacInfo(); + return 0; } -/// BeginFunction - Gather pre-function debug information. Assumes being -/// emitted immediately after the function entry point. -void Dwarf::BeginFunction(MachineFunction *MF) { - this->MF = MF; - - if (!ShouldEmitDwarf()) return; - EOL("Dwarf Begin Function"); +//===----------------------------------------------------------------------===// +/// DIE Implementation - // Begin accumulating function debug information. - DebugInfo->BeginFunction(MF); +DIE::~DIE() { + for (unsigned i = 0, N = Children.size(); i < N; ++i) + delete Children[i]; +} - // Assumes in correct section after the entry point. - EmitLabel("func_begin", ++SubprogramCount); +/// AddSiblingOffset - Add a sibling offset field to the front of the DIE. +/// +void DIE::AddSiblingOffset() { + DIEInteger *DI = new DIEInteger(0); + Values.insert(Values.begin(), DI); + Abbrev.AddFirstAttribute(DW_AT_sibling, DW_FORM_ref4); } -/// EndFunction - Gather and emit post-function debug information. +/// Profile - Used to gather unique data for the value folding set. /// -void Dwarf::EndFunction() { - if (!ShouldEmitDwarf()) return; - EOL("Dwarf End Function"); +void DIE::Profile(FoldingSetNodeID &ID) { + Abbrev.Profile(ID); - // Define end label for subprogram. - EmitLabel("func_end", SubprogramCount); - - // Get function line info. - const std::vector &LineInfos = DebugInfo->getSourceLines(); + for (unsigned i = 0, N = Children.size(); i < N; ++i) + ID.AddPointer(Children[i]); + + for (unsigned j = 0, M = Values.size(); j < M; ++j) + ID.AddPointer(Values[j]); +} - if (!LineInfos.empty()) { - // Get section line info. - unsigned ID = SectionMap.insert(Asm->CurrentSection); - if (SectionSourceLines.size() < ID) SectionSourceLines.resize(ID); - std::vector &SectionLineInfos = SectionSourceLines[ID-1]; - // Append the function info to section info. - SectionLineInfos.insert(SectionLineInfos.end(), - LineInfos.begin(), LineInfos.end()); +#ifndef NDEBUG +void DIE::print(std::ostream &O, unsigned IncIndent) { + static unsigned IndentCount = 0; + IndentCount += IncIndent; + const std::string Indent(IndentCount, ' '); + bool isBlock = Abbrev.getTag() == 0; + + if (!isBlock) { + O << Indent + << "Die: " + << "0x" << std::hex << (intptr_t)this << std::dec + << ", Offset: " << Offset + << ", Size: " << Size + << "\n"; + + O << Indent + << TagString(Abbrev.getTag()) + << " " + << ChildrenString(Abbrev.getChildrenFlag()); + } else { + O << "Size: " << Size; } + O << "\n"; + + const std::vector &Data = Abbrev.getData(); - // Construct scopes for subprogram. - ConstructRootScope(DebugInfo->getRootScope()); - - // Emit function frame information. - EmitFunctionDebugFrame(); - - // Reset the line numbers for the next function. - DebugInfo->ClearLineInfo(); + IndentCount += 2; + for (unsigned i = 0, N = Data.size(); i < N; ++i) { + O << Indent; + if (!isBlock) { + O << AttributeString(Data[i].getAttribute()); + } else { + O << "Blk[" << i << "]"; + } + O << " " + << FormEncodingString(Data[i].getForm()) + << " "; + Values[i]->print(O); + O << "\n"; + } + IndentCount -= 2; - // Clear function debug information. - DebugInfo->EndFunction(); + for (unsigned j = 0, M = Children.size(); j < M; ++j) { + Children[j]->print(O, 4); + } + + if (!isBlock) O << "\n"; + IndentCount -= IncIndent; } +void DIE::dump() { + print(std::cerr); +} +#endif //===----------------------------------------------------------------------===// /// DwarfWriter Implementation +/// DwarfWriter::DwarfWriter(std::ostream &OS, AsmPrinter *A, const TargetAsmInfo *T) { From reid at x10sys.com Thu Nov 2 14:26:57 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:26:57 -0600 Subject: [llvm-commits] CVS: llvm/tools/bugpoint/CrashDebugger.cpp Miscompilation.cpp Message-ID: <200611022026.kA2KQv3A009812@zion.cs.uiuc.edu> Changes in directory llvm/tools/bugpoint: CrashDebugger.cpp updated: 1.52 -> 1.53 Miscompilation.cpp updated: 1.77 -> 1.78 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+1 -2) CrashDebugger.cpp | 1 - Miscompilation.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/tools/bugpoint/CrashDebugger.cpp diff -u llvm/tools/bugpoint/CrashDebugger.cpp:1.52 llvm/tools/bugpoint/CrashDebugger.cpp:1.53 --- llvm/tools/bugpoint/CrashDebugger.cpp:1.52 Fri Oct 27 15:22:04 2006 +++ llvm/tools/bugpoint/CrashDebugger.cpp Thu Nov 2 14:25:50 2006 @@ -525,7 +525,6 @@ std::cout << "\n*** Debugging optimizer crash!\n"; // Reduce the list of passes which causes the optimizer to crash... - unsigned OldSize = PassesToRun.size(); if (!BugpointIsInterrupted) ReducePassList(*this).reduceList(PassesToRun); Index: llvm/tools/bugpoint/Miscompilation.cpp diff -u llvm/tools/bugpoint/Miscompilation.cpp:1.77 llvm/tools/bugpoint/Miscompilation.cpp:1.78 --- llvm/tools/bugpoint/Miscompilation.cpp:1.77 Thu Sep 7 13:21:07 2006 +++ llvm/tools/bugpoint/Miscompilation.cpp Thu Nov 2 14:25:50 2006 @@ -747,7 +747,7 @@ // Pass on the arguments to the real function, return its result if (F->getReturnType() == Type::VoidTy) { - CallInst *Call = new CallInst(FuncPtr, Args, "", DoCallBB); + new CallInst(FuncPtr, Args, "", DoCallBB); new ReturnInst(DoCallBB); } else { CallInst *Call = new CallInst(FuncPtr, Args, "retval", DoCallBB); From reid at x10sys.com Thu Nov 2 14:27:05 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:05 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/CloneFunction.cpp LoopSimplify.cpp LowerInvoke.cpp SimplifyCFG.cpp Message-ID: <200611022027.kA2KR5lp010035@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: CloneFunction.cpp updated: 1.31 -> 1.32 LoopSimplify.cpp updated: 1.76 -> 1.77 LowerInvoke.cpp updated: 1.42 -> 1.43 SimplifyCFG.cpp updated: 1.102 -> 1.103 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+2 -8) CloneFunction.cpp | 3 --- LoopSimplify.cpp | 1 - LowerInvoke.cpp | 1 - SimplifyCFG.cpp | 5 ++--- 4 files changed, 2 insertions(+), 8 deletions(-) Index: llvm/lib/Transforms/Utils/CloneFunction.cpp diff -u llvm/lib/Transforms/Utils/CloneFunction.cpp:1.31 llvm/lib/Transforms/Utils/CloneFunction.cpp:1.32 --- llvm/lib/Transforms/Utils/CloneFunction.cpp:1.31 Wed Sep 13 16:27:00 2006 +++ llvm/lib/Transforms/Utils/CloneFunction.cpp Thu Nov 2 14:25:50 2006 @@ -361,10 +361,7 @@ // requires the CFG to be up-to-date. for (unsigned phino = 0, e = PHIToResolve.size(); phino != e; ) { const PHINode *OPN = PHIToResolve[phino]; - unsigned NumPreds = OPN->getNumIncomingValues(); - - unsigned BBPHIStart = phino; const BasicBlock *OldBB = OPN->getParent(); BasicBlock *NewBB = cast(ValueMap[OldBB]); Index: llvm/lib/Transforms/Utils/LoopSimplify.cpp diff -u llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.76 llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.77 --- llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.76 Sat Sep 23 03:19:21 2006 +++ llvm/lib/Transforms/Utils/LoopSimplify.cpp Thu Nov 2 14:25:50 2006 @@ -763,7 +763,6 @@ // If NewBB dominates some blocks, then it will dominate all blocks that // NewBBSucc does. if (NewBBDominatesNewBBSucc) { - BasicBlock *PredBlock = PredBlocks[0]; Function *F = NewBB->getParent(); for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I) if (DS.dominates(NewBBSucc, I)) Index: llvm/lib/Transforms/Utils/LowerInvoke.cpp diff -u llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.42 llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.43 --- llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.42 Fri Oct 20 02:07:24 2006 +++ llvm/lib/Transforms/Utils/LowerInvoke.cpp Thu Nov 2 14:25:50 2006 @@ -370,7 +370,6 @@ // Scan all of the uses and see if the live range is live across an unwind // edge. If we find a use live across an invoke edge, create an alloca // and spill the value. - AllocaInst *SpillLoc = 0; std::set InvokesWithStoreInserted; // Find all of the blocks that this value is live in. Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp diff -u llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.102 llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.103 --- llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.102 Sun Oct 29 15:21:20 2006 +++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp Thu Nov 2 14:25:50 2006 @@ -1340,7 +1340,7 @@ } } } - } else if (UnwindInst *UI = dyn_cast(BB->begin())) { + } else if (isa(BB->begin())) { // Check to see if the first instruction in this block is just an unwind. // If so, replace any invoke instructions which use this as an exception // destination with call instructions, and any unconditional branch @@ -1409,7 +1409,7 @@ return 1; } else { // Conditional branch - if (Value *CompVal = isValueEqualityComparison(BI)) { + if (isValueEqualityComparison(BI)) { // If we only have one predecessor, and if it is a branch on this value, // see if that predecessor totally determines the outcome of this // switch. @@ -1764,7 +1764,6 @@ if (OnlySucc) { DEBUG(std::cerr << "Merging: " << *BB << "into: " << *OnlyPred); - TerminatorInst *Term = OnlyPred->getTerminator(); // Resolve any PHI nodes at the start of the block. They are all // guaranteed to have exactly one entry if they exist, unless there are From reid at x10sys.com Thu Nov 2 14:26:59 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:26:59 -0600 Subject: [llvm-commits] CVS: llvm/lib/Analysis/BasicAliasAnalysis.cpp Message-ID: <200611022026.kA2KQxI6009822@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: BasicAliasAnalysis.cpp updated: 1.87 -> 1.88 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+1 -1) BasicAliasAnalysis.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp diff -u llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.87 llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.88 --- llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.87 Fri Oct 20 02:07:24 2006 +++ llvm/lib/Analysis/BasicAliasAnalysis.cpp Thu Nov 2 14:25:49 2006 @@ -399,7 +399,7 @@ } if (V1Size != ~0U && V2Size != ~0U) - if (const User *GEP = isGEP(V1)) { + if (isGEP(V1)) { std::vector GEPOperands; const Value *BasePtr = GetGEPOperands(V1, GEPOperands); From reid at x10sys.com Thu Nov 2 14:27:03 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:03 -0600 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200611022027.kA2KR3EQ009877@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.407 -> 1.408 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+2 -2) Makefile.rules | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.407 llvm/Makefile.rules:1.408 --- llvm/Makefile.rules:1.407 Tue Oct 24 15:32:44 2006 +++ llvm/Makefile.rules Thu Nov 2 14:25:49 2006 @@ -382,8 +382,8 @@ # Options To Invoke Tools #---------------------------------------------------------- -CompileCommonOpts := -Wall -W -Wwrite-strings -Wno-unused -Wno-long-long \ - -pedantic $(EXTRA_OPTIONS) +CompileCommonOpts := -pedantic -Wall -W -Wwrite-strings -Wno-long-long \ + -Wunused -Wno-unused-parameter $(EXTRA_OPTIONS) ifeq ($(OS),HP-UX) CompileCommonOpts := -D_REENTRANT -D_HPUX_SOURCE From reid at x10sys.com Thu Nov 2 14:27:05 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:05 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86FloatingPoint.cpp X86ISelLowering.cpp X86IntelAsmPrinter.cpp Message-ID: <200611022027.kA2KR5bT010062@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86FloatingPoint.cpp updated: 1.54 -> 1.55 X86ISelLowering.cpp updated: 1.286 -> 1.287 X86IntelAsmPrinter.cpp updated: 1.63 -> 1.64 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+3 -9) X86FloatingPoint.cpp | 1 - X86ISelLowering.cpp | 10 +++------- X86IntelAsmPrinter.cpp | 1 - 3 files changed, 3 insertions(+), 9 deletions(-) Index: llvm/lib/Target/X86/X86FloatingPoint.cpp diff -u llvm/lib/Target/X86/X86FloatingPoint.cpp:1.54 llvm/lib/Target/X86/X86FloatingPoint.cpp:1.55 --- llvm/lib/Target/X86/X86FloatingPoint.cpp:1.54 Tue Sep 5 15:27:32 2006 +++ llvm/lib/Target/X86/X86FloatingPoint.cpp Thu Nov 2 14:25:49 2006 @@ -106,7 +106,6 @@ bool isAtTop(unsigned RegNo) const { return getSlot(RegNo) == StackTop-1; } void moveToTop(unsigned RegNo, MachineBasicBlock::iterator &I) { if (!isAtTop(RegNo)) { - unsigned Slot = getSlot(RegNo); unsigned STReg = getSTReg(RegNo); unsigned RegOnTop = getStackEntry(0); Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.286 llvm/lib/Target/X86/X86ISelLowering.cpp:1.287 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.286 Tue Oct 31 14:13:11 2006 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Thu Nov 2 14:25:49 2006 @@ -532,7 +532,6 @@ SDOperand X86TargetLowering::LowerCCCCallTo(SDOperand Op, SelectionDAG &DAG) { SDOperand Chain = Op.getOperand(0); unsigned CallingConv= cast(Op.getOperand(1))->getValue(); - bool isVarArg = cast(Op.getOperand(2))->getValue() != 0; bool isTailCall = cast(Op.getOperand(3))->getValue() != 0; SDOperand Callee = Op.getOperand(4); MVT::ValueType RetVT= Op.Val->getValueType(0); @@ -1031,7 +1030,6 @@ SDOperand X86TargetLowering::LowerX86_64CCCCallTo(SDOperand Op, SelectionDAG &DAG) { SDOperand Chain = Op.getOperand(0); - unsigned CallingConv= cast(Op.getOperand(1))->getValue(); bool isVarArg = cast(Op.getOperand(2))->getValue() != 0; bool isTailCall = cast(Op.getOperand(3))->getValue() != 0; SDOperand Callee = Op.getOperand(4); @@ -1528,8 +1526,6 @@ SDOperand X86TargetLowering::LowerFastCCCallTo(SDOperand Op, SelectionDAG &DAG, bool isFastCall) { SDOperand Chain = Op.getOperand(0); - unsigned CallingConv= cast(Op.getOperand(1))->getValue(); - bool isVarArg = cast(Op.getOperand(2))->getValue() != 0; bool isTailCall = cast(Op.getOperand(3))->getValue() != 0; SDOperand Callee = Op.getOperand(4); MVT::ValueType RetVT= Op.Val->getValueType(0); @@ -1549,11 +1545,13 @@ { X86::AX, X86::DX }, { X86::EAX, X86::EDX } }; +#if 0 static const unsigned FastCallGPRArgRegs[][2] = { { X86::CL, X86::DL }, { X86::CX, X86::DX }, { X86::ECX, X86::EDX } }; +#endif static const unsigned XMMArgRegs[] = { X86::XMM0, X86::XMM1, X86::XMM2, X86::XMM3 }; @@ -1906,7 +1904,6 @@ SDOperand X86TargetLowering::LowerStdCallCCCallTo(SDOperand Op, SelectionDAG &DAG) { SDOperand Chain = Op.getOperand(0); - unsigned CallingConv= cast(Op.getOperand(1))->getValue(); bool isVarArg = cast(Op.getOperand(2))->getValue() != 0; bool isTailCall = cast(Op.getOperand(3))->getValue() != 0; SDOperand Callee = Op.getOperand(4); @@ -2841,7 +2838,7 @@ unsigned i = 0; for (; i != NumElems; ++i) { SDOperand Elt = N->getOperand(i); - if (ConstantSDNode *EltV = dyn_cast(Elt)) { + if (isa(Elt)) { ElementBase = Elt; break; } @@ -5431,7 +5428,6 @@ SDOperand X86TargetLowering::PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const { - TargetMachine &TM = getTargetMachine(); SelectionDAG &DAG = DCI.DAG; switch (N->getOpcode()) { default: break; Index: llvm/lib/Target/X86/X86IntelAsmPrinter.cpp diff -u llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.63 llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.64 --- llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.63 Tue Oct 31 02:31:24 2006 +++ llvm/lib/Target/X86/X86IntelAsmPrinter.cpp Thu Nov 2 14:25:49 2006 @@ -386,7 +386,6 @@ std::string name = Mang->getValueName(I); Constant *C = I->getInitializer(); - unsigned Size = TD->getTypeSize(C->getType()); unsigned Align = TD->getPreferredAlignmentLog(I); bool bCustomSegment = false; From reid at x10sys.com Thu Nov 2 14:27:04 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:04 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/ExprTypeConvert.cpp Message-ID: <200611022027.kA2KR4Nv009945@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms: ExprTypeConvert.cpp updated: 1.110 -> 1.111 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+1 -4) ExprTypeConvert.cpp | 5 +---- 1 files changed, 1 insertion(+), 4 deletions(-) Index: llvm/lib/Transforms/ExprTypeConvert.cpp diff -u llvm/lib/Transforms/ExprTypeConvert.cpp:1.110 llvm/lib/Transforms/ExprTypeConvert.cpp:1.111 --- llvm/lib/Transforms/ExprTypeConvert.cpp:1.110 Fri May 12 18:32:01 2006 +++ llvm/lib/Transforms/ExprTypeConvert.cpp Thu Nov 2 14:25:50 2006 @@ -537,7 +537,7 @@ // a whole structure at a time), so the level raiser must be trying to // store into the first field. Check for this and allow it now: // - if (const StructType *SElTy = dyn_cast(ElTy)) { + if (isa(ElTy)) { unsigned Offset = 0; std::vector Indices; ElTy = getStructOffsetType(ElTy, Offset, Indices, TD, false); @@ -799,9 +799,6 @@ Value *SrcPtr = VMCI->second; if (ElTy != NewTy) { - // We check that this is a struct in the initial scan... - const StructType *SElTy = cast(ElTy); - std::vector Indices; Indices.push_back(Constant::getNullValue(Type::UIntTy)); From reid at x10sys.com Thu Nov 2 14:26:59 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:26:59 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libm/Makefile Message-ID: <200611022026.kA2KQxBl009820@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libm: Makefile updated: 1.9 -> 1.10 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+0 -1) Makefile | 1 - 1 files changed, 1 deletion(-) Index: llvm/runtime/GCCLibraries/libm/Makefile diff -u llvm/runtime/GCCLibraries/libm/Makefile:1.9 llvm/runtime/GCCLibraries/libm/Makefile:1.10 --- llvm/runtime/GCCLibraries/libm/Makefile:1.9 Tue Dec 21 23:57:33 2004 +++ llvm/runtime/GCCLibraries/libm/Makefile Thu Nov 2 14:25:50 2006 @@ -14,4 +14,3 @@ BYTECODE_DESTINATION = $(CFERuntimeLibDir) include $(LEVEL)/Makefile.common - From reid at x10sys.com Thu Nov 2 14:27:03 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:03 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/SparcAsmPrinter.cpp Message-ID: <200611022027.kA2KR3uj009937@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: SparcAsmPrinter.cpp updated: 1.70 -> 1.71 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+0 -2) SparcAsmPrinter.cpp | 2 -- 1 files changed, 2 deletions(-) Index: llvm/lib/Target/Sparc/SparcAsmPrinter.cpp diff -u llvm/lib/Target/Sparc/SparcAsmPrinter.cpp:1.70 llvm/lib/Target/Sparc/SparcAsmPrinter.cpp:1.71 --- llvm/lib/Target/Sparc/SparcAsmPrinter.cpp:1.70 Wed Oct 4 21:48:40 2006 +++ llvm/lib/Target/Sparc/SparcAsmPrinter.cpp Thu Nov 2 14:25:49 2006 @@ -185,8 +185,6 @@ return; } - MachineOperand::MachineOperandType OpTy = MI->getOperand(opNum+1).getType(); - if (MI->getOperand(opNum+1).isRegister() && MI->getOperand(opNum+1).getReg() == SP::G0) return; // don't print "+%g0" From reid at x10sys.com Thu Nov 2 14:27:01 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:01 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp InstructionCombining.cpp LoopStrengthReduce.cpp LoopUnroll.cpp LoopUnswitch.cpp SCCP.cpp ScalarReplAggregates.cpp TailRecursionElimination.cpp Message-ID: <200611022027.kA2KR1O1009869@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: CorrelatedExprs.cpp updated: 1.36 -> 1.37 InstructionCombining.cpp updated: 1.534 -> 1.535 LoopStrengthReduce.cpp updated: 1.92 -> 1.93 LoopUnroll.cpp updated: 1.29 -> 1.30 LoopUnswitch.cpp updated: 1.48 -> 1.49 SCCP.cpp updated: 1.135 -> 1.136 ScalarReplAggregates.cpp updated: 1.46 -> 1.47 TailRecursionElimination.cpp updated: 1.24 -> 1.25 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+13 -23) CorrelatedExprs.cpp | 1 - InstructionCombining.cpp | 16 ++++++---------- LoopStrengthReduce.cpp | 2 +- LoopUnroll.cpp | 3 +-- LoopUnswitch.cpp | 7 ++----- SCCP.cpp | 4 ++-- ScalarReplAggregates.cpp | 2 +- TailRecursionElimination.cpp | 1 - 8 files changed, 13 insertions(+), 23 deletions(-) Index: llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp diff -u llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.36 llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.37 --- llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.36 Sat Oct 28 01:38:14 2006 +++ llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp Thu Nov 2 14:25:50 2006 @@ -726,7 +726,6 @@ const std::vector &RegionExitBlocks) { assert(BBVal->getType() == OldVal->getType() && "Should be derived values!"); BasicBlock *BB = BBVal->getParent(); - BasicBlock *OldSucc = OldVal->getParent(); // Loop over all of the blocks we have to place PHIs in, doing it. for (unsigned i = 0, e = RegionExitBlocks.size(); i != e; ++i) { Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.534 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.535 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.534 Wed Nov 1 19:53:58 2006 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Thu Nov 2 14:25:50 2006 @@ -2579,8 +2579,6 @@ } Instruction *InstCombiner::visitFRem(BinaryOperator &I) { - Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); - return commonRemTransforms(I); } @@ -3109,7 +3107,6 @@ { Value *A = 0, *B = 0; - ConstantInt *C1 = 0, *C2 = 0; if (match(Op0, m_Or(m_Value(A), m_Value(B)))) if (A == Op1 || B == Op1) // (A | ?) & A --> A return ReplaceInstUsesWith(I, Op1); @@ -5510,7 +5507,7 @@ // If the first operand is itself a cast, and is eliminable, do not count // this as an eliminable cast. We would prefer to eliminate those two // casts first. - if (CastInst *OpCast = dyn_cast(I->getOperand(0))) + if (isa(I->getOperand(0))) return true; ++NumCastsRemoved; @@ -6192,7 +6189,6 @@ if (Instruction *TI = dyn_cast(TrueVal)) if (Instruction *FI = dyn_cast(FalseVal)) if (TI->hasOneUse() && FI->hasOneUse()) { - bool isInverse = false; Instruction *AddOp = 0, *SubOp = 0; // Turn (select C, (op X, Y), (op X, Z)) -> (op X, (select C, Y, Z)) @@ -6971,7 +6967,7 @@ // Insert and return the new operation. if (isa(FirstInst)) return new CastInst(PhiVal, PN.getType()); - else if (LoadInst *LI = dyn_cast(FirstInst)) + else if (isa(FirstInst)) return new LoadInst(PhiVal, "", isVolatile); else if (BinaryOperator *BinOp = dyn_cast(FirstInst)) return BinaryOperator::create(BinOp->getOpcode(), PhiVal, ConstantOp); @@ -7327,7 +7323,7 @@ // If the index will be to exactly the right offset with the scale taken // out, perform the transformation. if (Scale && Scale->getZExtValue() % ArrayEltSize == 0) { - if (ConstantInt *C = dyn_cast(Scale)) + if (isa(Scale)) Scale = ConstantInt::get(Scale->getType(), Scale->getZExtValue() / ArrayEltSize); if (Scale->getZExtValue() != 1) { @@ -7501,7 +7497,7 @@ Value *Op = LI.getOperand(0); // load (cast X) --> cast (load X) iff safe - if (CastInst *CI = dyn_cast(Op)) + if (isa(Op)) if (Instruction *Res = InstCombineLoadCast(*this, LI)) return Res; @@ -7728,7 +7724,7 @@ // If the pointer destination is a cast, see if we can fold the cast into the // source instead. - if (CastInst *CI = dyn_cast(Ptr)) + if (isa(Ptr)) if (Instruction *Res = InstCombineStoreToCast(*this, SI)) return Res; if (ConstantExpr *CE = dyn_cast(Ptr)) @@ -8015,7 +8011,7 @@ InsertNewInstBefore(newEI1, EI); return BinaryOperator::create(BO->getOpcode(), newEI0, newEI1); } - } else if (LoadInst *LI = dyn_cast(I)) { + } else if (isa(I)) { Value *Ptr = InsertCastBefore(I->getOperand(0), PointerType::get(EI.getType()), EI); GetElementPtrInst *GEP = Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.92 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.93 --- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.92 Sat Oct 28 01:45:33 2006 +++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Thu Nov 2 14:25:50 2006 @@ -307,7 +307,7 @@ Start = SCEVAddExpr::get(Start, AE->getOperand(i)); } - } else if (SCEVAddRecExpr *AddRec = dyn_cast(SH)) { + } else if (isa(SH)) { TheAddRec = SH; } else { return false; // not analyzable. Index: llvm/lib/Transforms/Scalar/LoopUnroll.cpp diff -u llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.29 llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.30 --- llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.29 Fri Oct 20 02:07:24 2006 +++ llvm/lib/Transforms/Scalar/LoopUnroll.cpp Thu Nov 2 14:25:50 2006 @@ -92,7 +92,7 @@ // Ignore PHI nodes in the header. } else if (I->hasOneUse() && I->use_back() == Term) { // Ignore instructions only used by the loop terminator. - } else if (DbgInfoIntrinsic *DbgI = dyn_cast(I)) { + } else if (isa(I)) { // Ignore debug instructions } else { ++Size; @@ -135,7 +135,6 @@ return 0; DEBUG(std::cerr << "Merging: " << *BB << "into: " << *OnlyPred); - TerminatorInst *Term = OnlyPred->getTerminator(); // Resolve any PHI nodes at the start of the block. They are all // guaranteed to have exactly one entry if they exist, unless there are Index: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp diff -u llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.48 llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.49 --- llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.48 Thu Sep 28 18:35:21 2006 +++ llvm/lib/Transforms/Scalar/LoopUnswitch.cpp Thu Nov 2 14:25:50 2006 @@ -576,8 +576,6 @@ // Split all of the edges from inside the loop to their exit blocks. Update // the appropriate Phi nodes as we do so. - unsigned NumBlocks = L->getBlocks().size(); - for (unsigned i = 0, e = ExitBlocks.size(); i != e; ++i) { BasicBlock *ExitBlock = ExitBlocks[i]; std::vector Preds(pred_begin(ExitBlock), pred_end(ExitBlock)); @@ -966,9 +964,8 @@ BasicBlock* Split = SplitBlock(Old, SI); Instruction* OldTerm = Old->getTerminator(); - BranchInst* Branch = new BranchInst(Split, SI->getSuccessor(i), - ConstantBool::getTrue(), - OldTerm); + new BranchInst(Split, SI->getSuccessor(i), + ConstantBool::getTrue(), OldTerm); Old->getTerminator()->eraseFromParent(); Index: llvm/lib/Transforms/Scalar/SCCP.cpp diff -u llvm/lib/Transforms/Scalar/SCCP.cpp:1.135 llvm/lib/Transforms/Scalar/SCCP.cpp:1.136 --- llvm/lib/Transforms/Scalar/SCCP.cpp:1.135 Mon Oct 23 13:57:02 2006 +++ llvm/lib/Transforms/Scalar/SCCP.cpp Thu Nov 2 14:25:50 2006 @@ -377,7 +377,7 @@ Succs[BCValue.getConstant() == ConstantBool::getFalse()] = true; } } - } else if (InvokeInst *II = dyn_cast(&TI)) { + } else if (isa(&TI)) { // Invoke instructions successors are always executable. Succs[0] = Succs[1] = true; } else if (SwitchInst *SI = dyn_cast(&TI)) { @@ -436,7 +436,7 @@ } return false; } - } else if (InvokeInst *II = dyn_cast(TI)) { + } else if (isa(TI)) { // Invoke instructions successors are always executable. return true; } else if (SwitchInst *SI = dyn_cast(TI)) { Index: llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp diff -u llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.46 llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.47 --- llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.46 Tue Oct 24 01:26:32 2006 +++ llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp Thu Nov 2 14:25:50 2006 @@ -302,7 +302,7 @@ if (const ArrayType *AT = dyn_cast(*I)) { uint64_t NumElements = AT->getNumElements(); - if (ConstantInt *CI = dyn_cast(I.getOperand())) { + if (isa(I.getOperand())) { // Check to make sure that index falls within the array. If not, // something funny is going on, so we won't do the optimization. // Index: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp diff -u llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.24 llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.25 --- llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.24 Sun Oct 22 13:42:26 2006 +++ llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp Thu Nov 2 14:25:50 2006 @@ -161,7 +161,6 @@ // occurs when a function passes an argument straight through to its tail // call. if (!ArgumentPHIs.empty()) { - unsigned NumIncoming = ArgumentPHIs[0]->getNumIncomingValues(); for (unsigned i = 0, e = ArgumentPHIs.size(); i != e; ++i) { PHINode *PN = ArgumentPHIs[i]; From reid at x10sys.com Thu Nov 2 14:26:59 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:26:59 -0600 Subject: [llvm-commits] CVS: llvm/tools/llvm2cpp/CppWriter.cpp Message-ID: <200611022026.kA2KQx4a009818@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm2cpp: CppWriter.cpp updated: 1.19 -> 1.20 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+1 -2) CppWriter.cpp | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/tools/llvm2cpp/CppWriter.cpp diff -u llvm/tools/llvm2cpp/CppWriter.cpp:1.19 llvm/tools/llvm2cpp/CppWriter.cpp:1.20 --- llvm/tools/llvm2cpp/CppWriter.cpp:1.19 Wed Nov 1 19:53:59 2006 +++ llvm/tools/llvm2cpp/CppWriter.cpp Thu Nov 2 14:25:50 2006 @@ -383,7 +383,7 @@ if (const GlobalVariable* GV = dyn_cast(val)) { name = std::string("gvar_") + getTypePrefix(GV->getType()->getElementType()); - } else if (const Function* F = dyn_cast(val)) { + } else if (isa(val)) { name = std::string("func_"); } else if (const Constant* C = dyn_cast(val)) { name = std::string("const_") + getTypePrefix(C->getType()); @@ -536,7 +536,6 @@ break; } case Type::OpaqueTyID: { - const OpaqueType* OT = cast(Ty); Out << "OpaqueType* " << typeName << " = OpaqueType::get();"; nl(Out); break; From reid at x10sys.com Thu Nov 2 14:27:05 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:05 -0600 Subject: [llvm-commits] CVS: llvm/lib/Linker/LinkArchives.cpp Message-ID: <200611022027.kA2KR5nf010045@zion.cs.uiuc.edu> Changes in directory llvm/lib/Linker: LinkArchives.cpp updated: 1.51 -> 1.52 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+0 -14) LinkArchives.cpp | 14 -------------- 1 files changed, 14 deletions(-) Index: llvm/lib/Linker/LinkArchives.cpp diff -u llvm/lib/Linker/LinkArchives.cpp:1.51 llvm/lib/Linker/LinkArchives.cpp:1.52 --- llvm/lib/Linker/LinkArchives.cpp:1.51 Thu Sep 14 13:23:26 2006 +++ llvm/lib/Linker/LinkArchives.cpp Thu Nov 2 14:25:49 2006 @@ -23,20 +23,6 @@ #include using namespace llvm; -/// GetAllDefinedSymbols - Modifies its parameter DefinedSymbols to contain the -/// name of each externally-visible symbol defined in M. -/// -static void -GetAllDefinedSymbols(Module *M, std::set &DefinedSymbols) { - for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I) - if (I->hasName() && !I->isExternal() && !I->hasInternalLinkage()) - DefinedSymbols.insert(I->getName()); - for (Module::global_iterator I = M->global_begin(), E = M->global_end(); - I != E; ++I) - if (I->hasName() && !I->isExternal() && !I->hasInternalLinkage()) - DefinedSymbols.insert(I->getName()); -} - /// GetAllUndefinedSymbols - calculates the set of undefined symbols that still /// exist in an LLVM module. This is a bit tricky because there may be two /// symbols with the same name but different LLVM types that will be resolved to From reid at x10sys.com Thu Nov 2 14:27:03 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:03 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp LegalizeDAG.cpp ScheduleDAGRRList.cpp ScheduleDAGSimple.cpp SelectionDAG.cpp SelectionDAGISel.cpp TargetLowering.cpp Message-ID: <200611022027.kA2KR3W0009892@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.231 -> 1.232 LegalizeDAG.cpp updated: 1.415 -> 1.416 ScheduleDAGRRList.cpp updated: 1.17 -> 1.18 ScheduleDAGSimple.cpp updated: 1.18 -> 1.19 SelectionDAG.cpp updated: 1.364 -> 1.365 SelectionDAGISel.cpp updated: 1.314 -> 1.315 TargetLowering.cpp updated: 1.78 -> 1.79 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+5 -23) DAGCombiner.cpp | 14 +++++--------- LegalizeDAG.cpp | 2 -- ScheduleDAGRRList.cpp | 2 -- ScheduleDAGSimple.cpp | 1 - SelectionDAG.cpp | 1 - SelectionDAGISel.cpp | 6 ------ TargetLowering.cpp | 2 -- 7 files changed, 5 insertions(+), 23 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.231 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.232 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.231 Wed Oct 18 14:08:31 2006 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu Nov 2 14:25:49 2006 @@ -1041,7 +1041,6 @@ ConstantSDNode *N0C = dyn_cast(N0); ConstantSDNode *N1C = dyn_cast(N1); MVT::ValueType VT = N1.getValueType(); - unsigned OpSizeInBits = MVT::getSizeInBits(VT); // fold (and c1, c2) -> c1&c2 if (N0C && N1C) @@ -1319,7 +1318,7 @@ /// MatchRotateHalf - Match "(X shl/srl V1) & V2" where V2 may not be present. static bool MatchRotateHalf(SDOperand Op, SDOperand &Shift, SDOperand &Mask) { if (Op.getOpcode() == ISD::AND) { - if (ConstantSDNode *RHSC = dyn_cast(Op.getOperand(1))) { + if (isa(Op.getOperand(1))) { Mask = Op.getOperand(1); Op = Op.getOperand(0); } else { @@ -1856,9 +1855,6 @@ SDOperand N2 = N->getOperand(2); SDOperand N3 = N->getOperand(3); SDOperand N4 = N->getOperand(4); - ConstantSDNode *N0C = dyn_cast(N0); - ConstantSDNode *N1C = dyn_cast(N1); - ConstantSDNode *N2C = dyn_cast(N2); ISD::CondCode CC = cast(N4)->get(); // fold select_cc lhs, rhs, x, x, cc -> x @@ -1900,7 +1896,7 @@ MVT::ValueType VT = N->getValueType(0); // fold (sext c1) -> c1 - if (ConstantSDNode *N0C = dyn_cast(N0)) + if (isa(N0)) return DAG.getNode(ISD::SIGN_EXTEND, VT, N0); // fold (sext (sext x)) -> (sext x) @@ -1958,7 +1954,7 @@ MVT::ValueType VT = N->getValueType(0); // fold (zext c1) -> c1 - if (ConstantSDNode *N0C = dyn_cast(N0)) + if (isa(N0)) return DAG.getNode(ISD::ZERO_EXTEND, VT, N0); // fold (zext (zext x)) -> (zext x) // fold (zext (aext x)) -> (zext x) @@ -3578,7 +3574,7 @@ if (ConstantSDNode *N1C = dyn_cast(N1.Val)) { uint64_t C1 = N1C->getValue(); - if (ConstantSDNode *N0C = dyn_cast(N0.Val)) { + if (isa(N0.Val)) { return DAG.FoldSetCC(VT, N0, N1, Cond); } else { // If the LHS is '(srl (ctlz x), 5)', the RHS is 0/1, and this is an @@ -3806,7 +3802,7 @@ return DAG.getSetCC(VT, N1, N0, ISD::getSetCCSwappedOperands(Cond)); } - if (ConstantFPSDNode *N0C = dyn_cast(N0.Val)) { + if (isa(N0.Val)) { // Constant fold or commute setcc. SDOperand O = DAG.FoldSetCC(VT, N0, N1, Cond); if (O.Val) return O; Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.415 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.416 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.415 Mon Oct 30 20:31:00 2006 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Thu Nov 2 14:25:49 2006 @@ -3690,7 +3690,6 @@ SmallVector Stores; unsigned TypeByteSize = MVT::getSizeInBits(Node->getOperand(0).getValueType())/8; - unsigned VectorSize = MVT::getSizeInBits(VT)/8; // Store (in the right endianness) the elements to memory. for (unsigned i = 0, e = Node->getNumOperands(); i != e; ++i) { // Ignore undef elements. @@ -4802,7 +4801,6 @@ bool HasMULHS = TLI.isOperationLegal(ISD::MULHS, NVT); bool HasMULHU = TLI.isOperationLegal(ISD::MULHU, NVT); - bool UseLibCall = true; if (HasMULHS || HasMULHU) { SDOperand LL, LH, RL, RH; ExpandOp(Node->getOperand(0), LL, LH); Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.17 llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.18 --- llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.17 Wed Nov 1 16:39:30 2006 +++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Thu Nov 2 14:25:49 2006 @@ -257,7 +257,6 @@ // While Available queue is not empty, grab the node with the highest // priority. If it is not ready put it back. Schedule the node. std::vector NotReady; - SUnit *CurNode = NULL; while (!AvailableQueue->empty()) { SUnit *CurNode = AvailableQueue->pop(); while (CurNode && !isReady(CurNode, CurCycle)) { @@ -373,7 +372,6 @@ // While Available queue is not empty, grab the node with the highest // priority. If it is not ready put it back. Schedule the node. std::vector NotReady; - SUnit *CurNode = NULL; while (!AvailableQueue->empty()) { SUnit *CurNode = AvailableQueue->pop(); while (CurNode && !isReady(CurNode, CurCycle)) { Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp:1.18 llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp:1.19 --- llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp:1.18 Sun Aug 27 07:54:01 2006 +++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp Thu Nov 2 14:25:49 2006 @@ -505,7 +505,6 @@ RSLoadStore = 0x0C000000, // Two load store units RSBranch = 0x02000000 // One branch unit }; -static InstrStage CallStage = { CallLatency, RSBranch }; static InstrStage LoadStage = { 5, RSLoadStore }; static InstrStage StoreStage = { 2, RSLoadStore }; static InstrStage IntStage = { 2, RSInteger }; Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.364 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.365 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.364 Tue Oct 31 22:48:30 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Thu Nov 2 14:25:49 2006 @@ -1956,7 +1956,6 @@ assert(N->getNumOperands() == 2 && "Update with wrong number of operands"); // Check to see if there is no change. - bool AnyChange = false; if (Op1 == N->getOperand(0) && Op2 == N->getOperand(1)) return InN; // No operands changed, just return the input node. Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.314 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.315 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.314 Wed Nov 1 19:53:58 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Thu Nov 2 14:25:49 2006 @@ -2343,11 +2343,6 @@ SDOperand AsmStr = DAG.getTargetExternalSymbol(IA->getAsmString().c_str(), MVT::Other); - // Note, we treat inline asms both with and without side-effects as the same. - // If an inline asm doesn't have side effects and doesn't access memory, we - // could not choose to not chain it. - bool hasSideEffects = IA->hasSideEffects(); - std::vector Constraints = IA->ParseConstraints(); std::vector ConstraintVTs; @@ -3124,7 +3119,6 @@ static SDOperand getMemsetStringVal(MVT::ValueType VT, SelectionDAG &DAG, TargetLowering &TLI, std::string &Str, unsigned Offset) { - MVT::ValueType CurVT = VT; uint64_t Val = 0; unsigned MSB = getSizeInBits(VT) / 8; if (TLI.isLittleEndian()) Index: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp diff -u llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.78 llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.79 --- llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.78 Tue Oct 31 13:40:42 2006 +++ llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp Thu Nov 2 14:25:49 2006 @@ -504,7 +504,6 @@ } break; case ISD::SIGN_EXTEND_INREG: { - MVT::ValueType VT = Op.getValueType(); MVT::ValueType EVT = cast(Op.getOperand(1))->getVT(); // Sign extension. Compute the demanded bits in the result that are not @@ -852,7 +851,6 @@ } return; case ISD::SIGN_EXTEND_INREG: { - MVT::ValueType VT = Op.getValueType(); MVT::ValueType EVT = cast(Op.getOperand(1))->getVT(); // Sign extension. Compute the demanded bits in the result that are not From reid at x10sys.com Thu Nov 2 14:27:04 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:04 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp Message-ID: <200611022027.kA2KR4XV009964@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/CBackend: Writer.cpp updated: 1.277 -> 1.278 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+2 -2) Writer.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Target/CBackend/Writer.cpp diff -u llvm/lib/Target/CBackend/Writer.cpp:1.277 llvm/lib/Target/CBackend/Writer.cpp:1.278 --- llvm/lib/Target/CBackend/Writer.cpp:1.277 Wed Nov 1 19:53:58 2006 +++ llvm/lib/Target/CBackend/Writer.cpp Thu Nov 2 14:25:49 2006 @@ -702,7 +702,7 @@ // The prefix for a quiet NaN is 0x7FF8. For a signalling NaN, // it's 0x7ff4. const unsigned long QuietNaN = 0x7ff8UL; - const unsigned long SignalNaN = 0x7ff4UL; + //const unsigned long SignalNaN = 0x7ff4UL; // We need to grab the first part of the FP # char Buffer[100]; @@ -2140,7 +2140,7 @@ gep_type_iterator E) { bool HasImplicitAddress = false; // If accessing a global value with no indexing, avoid *(&GV) syndrome - if (GlobalValue *V = dyn_cast(Ptr)) { + if (isa(Ptr)) { HasImplicitAddress = true; } else if (isDirectAlloca(Ptr)) { HasImplicitAddress = true; From reid at x10sys.com Thu Nov 2 14:27:04 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:04 -0600 Subject: [llvm-commits] CVS: llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp Message-ID: <200611022027.kA2KR49c009955@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-bcanalyzer: llvm-bcanalyzer.cpp updated: 1.7 -> 1.8 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+0 -1) llvm-bcanalyzer.cpp | 1 - 1 files changed, 1 deletion(-) Index: llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp diff -u llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp:1.7 llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp:1.8 --- llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp:1.7 Thu Jul 6 13:01:01 2006 +++ llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp Thu Nov 2 14:25:50 2006 @@ -57,7 +57,6 @@ sys::PrintStackTraceOnErrorSignal(); std::ostream* Out = &std::cout; // Default to printing to stdout... - std::istream* In = &std::cin; // Default to reading stdin std::string ErrorMessage; BytecodeAnalysis bca; From reid at x10sys.com Thu Nov 2 14:27:05 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:05 -0600 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp Message-ID: <200611022027.kA2KR5PZ009970@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/JIT: JITEmitter.cpp updated: 1.116 -> 1.117 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+0 -1) JITEmitter.cpp | 1 - 1 files changed, 1 deletion(-) Index: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp diff -u llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.116 llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.117 --- llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.116 Thu Sep 14 23:56:11 2006 +++ llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp Thu Nov 2 14:25:49 2006 @@ -906,7 +906,6 @@ const std::vector &JT = MJTI->getJumpTables(); if (JT.empty() || JumpTableBase == 0) return; - unsigned Offset = 0; assert(MJTI->getEntrySize() == sizeof(void*) && "Cross JIT'ing?"); // For each jump table, map each target in the jump table to the address of From reid at x10sys.com Thu Nov 2 14:27:05 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:05 -0600 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp EquivClassGraphs.cpp Local.cpp Message-ID: <200611022027.kA2KR5mk010001@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructure.cpp updated: 1.247 -> 1.248 EquivClassGraphs.cpp updated: 1.48 -> 1.49 Local.cpp updated: 1.156 -> 1.157 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+5 -8) DataStructure.cpp | 9 ++++----- EquivClassGraphs.cpp | 2 -- Local.cpp | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.247 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.248 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.247 Mon Jun 19 10:42:47 2006 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Thu Nov 2 14:25:49 2006 @@ -512,7 +512,6 @@ // try merge with NewTy: struct {t1, t2, stuff...} if offset lands exactly on a field in Ty if (isa(NewTy) && isa(Ty)) { DEBUG(std::cerr << "Ty: " << *Ty << "\nNewTy: " << *NewTy << "@" << Offset << "\n"); - unsigned O = 0; const StructType *STy = cast(Ty); const StructLayout &SL = *TD.getStructLayout(STy); unsigned i = SL.getElementContainingOffset(Offset); @@ -537,7 +536,6 @@ //try merge with NewTy: struct : {t1, t2, T} if offset lands on a field in Ty if (isa(Ty)) { DEBUG(std::cerr << "Ty: " << *Ty << "\nNewTy: " << *NewTy << "@" << Offset << "\n"); - unsigned O = 0; const StructType *STy = cast(Ty); const StructLayout &SL = *TD.getStructLayout(STy); unsigned i = SL.getElementContainingOffset(Offset); @@ -1280,9 +1278,9 @@ if (GlobalValue *GV = dyn_cast(Ptr)) { N->addGlobal(GV); - } else if (MallocInst *MI = dyn_cast(Ptr)) { + } else if (isa(Ptr)) { N->setHeapNodeMarker(); - } else if (AllocaInst *AI = dyn_cast(Ptr)) { + } else if (isa(Ptr)) { N->setAllocaNodeMarker(); } else { assert(0 && "Illegal memory object input!"); @@ -1777,8 +1775,10 @@ // Scan the call list cleaning it up as necessary... DSNodeHandle LastCalleeNode; +#if 0 Function *LastCalleeFunc = 0; unsigned NumDuplicateCalls = 0; +#endif bool LastCalleeContainsExternalFunction = false; unsigned NumDeleted = 0; @@ -2187,7 +2187,6 @@ } while (Iterate); // Move dead aux function calls to the end of the list - unsigned CurIdx = 0; for (std::list::iterator CI = AuxFunctionCalls.begin(), E = AuxFunctionCalls.end(); CI != E; ) if (AuxFCallsAlive.count(&*CI)) Index: llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp diff -u llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.48 llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.49 --- llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.48 Sun Aug 27 17:30:17 2006 +++ llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp Thu Nov 2 14:25:49 2006 @@ -256,8 +256,6 @@ for (++SI; SI != FuncECs.member_end(); ++SI) { Function *F = *SI; - DSGraph *&FG = DSInfo[F]; - DSGraph &CBUGraph = CBU->getDSGraph(*F); if (GraphsMerged.insert(&CBUGraph).second) { // Record the "folded" graph for the function. Index: llvm/lib/Analysis/DataStructure/Local.cpp diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.156 llvm/lib/Analysis/DataStructure/Local.cpp:1.157 --- llvm/lib/Analysis/DataStructure/Local.cpp:1.156 Mon Oct 23 09:39:22 2006 +++ llvm/lib/Analysis/DataStructure/Local.cpp Thu Nov 2 14:25:49 2006 @@ -409,7 +409,7 @@ unsigned FieldNo = (unsigned)cast(I.getOperand())->getZExtValue(); Offset += (unsigned)TD.getStructLayout(STy)->MemberOffsets[FieldNo]; - } else if (const PointerType *PTy = dyn_cast(*I)) { + } else if (isa(*I)) { if (!isa(I.getOperand()) || !cast(I.getOperand())->isNullValue()) Value.getNode()->setArrayMarker(); From reid at x10sys.com Thu Nov 2 14:27:05 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:05 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Instrumentation/RSProfiling.cpp TraceBasicBlocks.cpp Message-ID: <200611022027.kA2KR5S2010020@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Instrumentation: RSProfiling.cpp updated: 1.8 -> 1.9 TraceBasicBlocks.cpp updated: 1.16 -> 1.17 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+1 -2) RSProfiling.cpp | 1 - TraceBasicBlocks.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/lib/Transforms/Instrumentation/RSProfiling.cpp diff -u llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.8 llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.9 --- llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.8 Fri Oct 20 02:07:24 2006 +++ llvm/lib/Transforms/Instrumentation/RSProfiling.cpp Thu Nov 2 14:25:50 2006 @@ -580,7 +580,6 @@ for(BasicBlock::iterator ib = btarget->begin(), ie = btarget->end(); ib != ie; ++ib) if (PHINode* phi = dyn_cast(&*ib)) { - unsigned total = phi->getNumIncomingValues(); std::map counter; for(unsigned i = 0; i < phi->getNumIncomingValues(); ) { if (counter[phi->getIncomingBlock(i)]) { Index: llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp diff -u llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp:1.16 llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp:1.17 --- llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp:1.16 Fri Oct 20 02:07:24 2006 +++ llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp Thu Nov 2 14:25:50 2006 @@ -56,7 +56,7 @@ while (isa(InsertPos) || isa(InsertPos)) ++InsertPos; - Instruction *InstrCall = new CallInst (InstrFn, Args, "", InsertPos); + new CallInst (InstrFn, Args, "", InsertPos); } bool TraceBasicBlocks::runOnModule(Module &M) { From reid at x10sys.com Thu Nov 2 14:27:03 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:03 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/IPO/ArgumentPromotion.cpp GlobalOpt.cpp IndMemRemoval.cpp InlineSimple.cpp Inliner.cpp LowerSetJmp.cpp SimplifyLibCalls.cpp Message-ID: <200611022027.kA2KR3g1009930@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: ArgumentPromotion.cpp updated: 1.28 -> 1.29 GlobalOpt.cpp updated: 1.70 -> 1.71 IndMemRemoval.cpp updated: 1.3 -> 1.4 InlineSimple.cpp updated: 1.74 -> 1.75 Inliner.cpp updated: 1.29 -> 1.30 LowerSetJmp.cpp updated: 1.30 -> 1.31 SimplifyLibCalls.cpp updated: 1.71 -> 1.72 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+5 -10) ArgumentPromotion.cpp | 2 -- GlobalOpt.cpp | 2 +- IndMemRemoval.cpp | 2 +- InlineSimple.cpp | 2 +- Inliner.cpp | 2 -- LowerSetJmp.cpp | 1 - SimplifyLibCalls.cpp | 4 ++-- 7 files changed, 5 insertions(+), 10 deletions(-) Index: llvm/lib/Transforms/IPO/ArgumentPromotion.cpp diff -u llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.28 llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.29 --- llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.28 Fri Oct 20 02:07:24 2006 +++ llvm/lib/Transforms/IPO/ArgumentPromotion.cpp Thu Nov 2 14:25:50 2006 @@ -259,7 +259,6 @@ // it is safe to unconditionally load the pointer. Use alias analysis to // check to see if the pointer is guaranteed to not be modified from entry of // the function to each of the load instructions. - Function &F = *Arg->getParent(); // Because there could be several/many load instructions, remember which // blocks we know to be transparent to the load. @@ -508,7 +507,6 @@ GetElementPtrInst *GEP = cast(I->use_back()); std::vector Operands(GEP->op_begin()+1, GEP->op_end()); - unsigned ArgNo = 0; Function::arg_iterator TheArg = I2; for (ScalarizeTable::iterator It = ArgIndices.begin(); *It != Operands; ++It, ++TheArg) { Index: llvm/lib/Transforms/IPO/GlobalOpt.cpp diff -u llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.70 llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.71 --- llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.70 Wed Nov 1 12:03:33 2006 +++ llvm/lib/Transforms/IPO/GlobalOpt.cpp Thu Nov 2 14:25:50 2006 @@ -1770,7 +1770,7 @@ return false; InstResult = RetVal; } - } else if (TerminatorInst *TI = dyn_cast(CurInst)) { + } else if (isa(CurInst)) { BasicBlock *NewBB = 0; if (BranchInst *BI = dyn_cast(CurInst)) { if (BI->isUnconditional()) { Index: llvm/lib/Transforms/IPO/IndMemRemoval.cpp diff -u llvm/lib/Transforms/IPO/IndMemRemoval.cpp:1.3 llvm/lib/Transforms/IPO/IndMemRemoval.cpp:1.4 --- llvm/lib/Transforms/IPO/IndMemRemoval.cpp:1.3 Sun Aug 27 17:42:52 2006 +++ llvm/lib/Transforms/IPO/IndMemRemoval.cpp Thu Nov 2 14:25:50 2006 @@ -77,7 +77,7 @@ BasicBlock* bb = new BasicBlock("entry",FN); Instruction* c = new CastInst(FN->arg_begin(), Type::UIntTy, "c", bb); Instruction* a = new MallocInst(Type::SByteTy, c, "m", bb); - Instruction* R = new ReturnInst(a, bb); + new ReturnInst(a, bb); ++NumBounce; NumBounceSites += F->getNumUses(); F->replaceAllUsesWith(FN); Index: llvm/lib/Transforms/IPO/InlineSimple.cpp diff -u llvm/lib/Transforms/IPO/InlineSimple.cpp:1.74 llvm/lib/Transforms/IPO/InlineSimple.cpp:1.75 --- llvm/lib/Transforms/IPO/InlineSimple.cpp:1.74 Sat Sep 9 15:40:44 2006 +++ llvm/lib/Transforms/IPO/InlineSimple.cpp Thu Nov 2 14:25:50 2006 @@ -245,7 +245,7 @@ // significant future optimization possibilities (like scalar promotion, and // scalarization), so encourage the inlining of the function. // - else if (AllocaInst *AI = dyn_cast(I)) { + else if (isa(I)) { if (ArgNo < CalleeFI.ArgumentWeights.size()) InlineCost -= CalleeFI.ArgumentWeights[ArgNo].AllocaWeight; Index: llvm/lib/Transforms/IPO/Inliner.cpp diff -u llvm/lib/Transforms/IPO/Inliner.cpp:1.29 llvm/lib/Transforms/IPO/Inliner.cpp:1.30 --- llvm/lib/Transforms/IPO/Inliner.cpp:1.29 Wed Jul 12 13:29:36 2006 +++ llvm/lib/Transforms/IPO/Inliner.cpp Thu Nov 2 14:25:50 2006 @@ -129,8 +129,6 @@ DEBUG(std::cerr << " Inlining: cost=" << InlineCost << ", Call: " << *CS.getInstruction()); - Function *Caller = CS.getInstruction()->getParent()->getParent(); - // Attempt to inline the function... if (InlineCallIfPossible(CS, CG, SCCFunctions)) { // Remove this call site from the list. Index: llvm/lib/Transforms/IPO/LowerSetJmp.cpp diff -u llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.30 llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.31 --- llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.30 Fri Oct 20 02:07:24 2006 +++ llvm/lib/Transforms/IPO/LowerSetJmp.cpp Thu Nov 2 14:25:50 2006 @@ -496,7 +496,6 @@ // If not reachable from a setjmp call, don't transform. if (!DFSBlocks.count(BB)) return; - BasicBlock* NormalBB = II.getNormalDest(); BasicBlock* ExceptBB = II.getUnwindDest(); Function* Func = BB->getParent(); Index: llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp diff -u llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.71 llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.72 --- llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.71 Thu Oct 26 01:15:43 2006 +++ llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp Thu Nov 2 14:25:50 2006 @@ -1106,7 +1106,7 @@ CastInst* DestCast = new CastInst(dest,PointerType::get(castType),dest->getName()+".cast",ci); LoadInst* LI = new LoadInst(SrcCast,SrcCast->getName()+".val",ci); - StoreInst* SI = new StoreInst(LI, DestCast, ci); + new StoreInst(LI, DestCast, ci); ci->eraseFromParent(); return true; } @@ -2063,7 +2063,7 @@ Constant* INTLZR = GV->getInitializer(); // Handle the ConstantAggregateZero case - if (ConstantAggregateZero *CAZ = dyn_cast(INTLZR)) { + if (isa(INTLZR)) { // This is a degenerate case. The initializer is constant zero so the // length of the string must be zero. len = 0; From reid at x10sys.com Thu Nov 2 14:27:03 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:03 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/BranchFolding.cpp DwarfWriter.cpp ELFWriter.cpp LiveInterval.cpp LiveIntervalAnalysis.cpp LiveVariables.cpp Message-ID: <200611022027.kA2KR3bL009919@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: BranchFolding.cpp updated: 1.30 -> 1.31 DwarfWriter.cpp updated: 1.91 -> 1.92 ELFWriter.cpp updated: 1.26 -> 1.27 LiveInterval.cpp updated: 1.35 -> 1.36 LiveIntervalAnalysis.cpp updated: 1.187 -> 1.188 LiveVariables.cpp updated: 1.60 -> 1.61 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+1 -7) BranchFolding.cpp | 2 -- DwarfWriter.cpp | 1 - ELFWriter.cpp | 1 - LiveInterval.cpp | 1 - LiveIntervalAnalysis.cpp | 2 +- LiveVariables.cpp | 1 - 6 files changed, 1 insertion(+), 7 deletions(-) Index: llvm/lib/CodeGen/BranchFolding.cpp diff -u llvm/lib/CodeGen/BranchFolding.cpp:1.30 llvm/lib/CodeGen/BranchFolding.cpp:1.31 --- llvm/lib/CodeGen/BranchFolding.cpp:1.30 Wed Nov 1 13:36:29 2006 +++ llvm/lib/CodeGen/BranchFolding.cpp Thu Nov 2 14:25:49 2006 @@ -766,7 +766,6 @@ // Analyze the branch at the end of the pred. MachineBasicBlock *PredBB = *PI; MachineFunction::iterator PredFallthrough = PredBB; ++PredFallthrough; - MachineBasicBlock *PredTBB = 0, *PredFBB = 0; std::vector PredCond; if (PredBB != MBB && !CanFallThrough(PredBB)) { MBB->moveAfter(PredBB); @@ -781,7 +780,6 @@ // Analyze the branch at the end of the block before the succ. MachineBasicBlock *SuccBB = *SI; MachineFunction::iterator SuccPrev = SuccBB; --SuccPrev; - MachineBasicBlock *SuccPrevTBB = 0, *SuccPrevFBB = 0; std::vector SuccPrevCond; if (SuccBB != MBB && !CanFallThrough(SuccPrev)) { MBB->moveBefore(SuccBB); Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.91 llvm/lib/CodeGen/DwarfWriter.cpp:1.92 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.91 Thu Nov 2 14:12:39 2006 +++ llvm/lib/CodeGen/DwarfWriter.cpp Thu Nov 2 14:25:49 2006 @@ -2132,7 +2132,6 @@ } else { EmitInt8(DW_CFA_def_cfa); EOL("DW_CFA_def_cfa"); - EmitULEB128Bytes(RI->getDwarfRegNum(Src.getRegister())); EOL("Register"); } Index: llvm/lib/CodeGen/ELFWriter.cpp diff -u llvm/lib/CodeGen/ELFWriter.cpp:1.26 llvm/lib/CodeGen/ELFWriter.cpp:1.27 --- llvm/lib/CodeGen/ELFWriter.cpp:1.26 Fri May 12 01:33:48 2006 +++ llvm/lib/CodeGen/ELFWriter.cpp Thu Nov 2 14:25:49 2006 @@ -113,7 +113,6 @@ // Add padding zeros to the end of the buffer to make sure that the // function will start on the correct byte alignment within the section. - size_t SectionOff = OutBuffer->size(); ELFWriter::align(*OutBuffer, Align); FnStart = OutBuffer->size(); Index: llvm/lib/CodeGen/LiveInterval.cpp diff -u llvm/lib/CodeGen/LiveInterval.cpp:1.35 llvm/lib/CodeGen/LiveInterval.cpp:1.36 --- llvm/lib/CodeGen/LiveInterval.cpp:1.35 Sat Sep 2 00:26:59 2006 +++ llvm/lib/CodeGen/LiveInterval.cpp Thu Nov 2 14:25:49 2006 @@ -289,7 +289,6 @@ // // Also, if one range is a physreg and one is a vreg, we always merge from the // vreg into the physreg, which leaves the vreg intervals pristine. - unsigned OtherOffs = 1, ThisOffs = 0; if ((Other.ranges.size() > ranges.size() && MRegisterInfo::isVirtualRegister(reg)) || MRegisterInfo::isPhysicalRegister(Other.reg)) { Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.187 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.188 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.187 Thu Sep 14 22:57:23 2006 +++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Thu Nov 2 14:25:49 2006 @@ -184,7 +184,7 @@ if (tii_->isMoveInstr(*mii, srcReg, dstReg) && (RegRep = rep(srcReg)) == rep(dstReg)) { // remove from def list - LiveInterval &interval = getOrCreateInterval(RegRep); + getOrCreateInterval(RegRep); RemoveMachineInstrFromMaps(mii); mii = mbbi->erase(mii); ++numPeep; Index: llvm/lib/CodeGen/LiveVariables.cpp diff -u llvm/lib/CodeGen/LiveVariables.cpp:1.60 llvm/lib/CodeGen/LiveVariables.cpp:1.61 --- llvm/lib/CodeGen/LiveVariables.cpp:1.60 Tue Oct 3 02:20:20 2006 +++ llvm/lib/CodeGen/LiveVariables.cpp Thu Nov 2 14:25:49 2006 @@ -223,7 +223,6 @@ for (df_ext_iterator DFI = df_ext_begin(Entry, Visited), E = df_ext_end(Entry, Visited); DFI != E; ++DFI) { MachineBasicBlock *MBB = *DFI; - unsigned BBNum = MBB->getNumber(); // Loop over all of the instructions, processing them. for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end(); From reid at x10sys.com Thu Nov 2 14:27:04 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:04 -0600 Subject: [llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp Message-ID: <200611022027.kA2KR4ZB009942@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: AsmWriter.cpp updated: 1.211 -> 1.212 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+1 -1) AsmWriter.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/VMCore/AsmWriter.cpp diff -u llvm/lib/VMCore/AsmWriter.cpp:1.211 llvm/lib/VMCore/AsmWriter.cpp:1.212 --- llvm/lib/VMCore/AsmWriter.cpp:1.211 Fri Oct 27 13:58:54 2006 +++ llvm/lib/VMCore/AsmWriter.cpp Thu Nov 2 14:25:50 2006 @@ -753,7 +753,7 @@ Out << '<' << PTy->getNumElements() << " x "; printType(PTy->getElementType()) << '>'; } - else if (const OpaqueType *OTy = dyn_cast(Ty)) { + else if (isa(Ty)) { Out << "opaque"; } else { if (!Ty->isPrimitiveType()) From reid at x10sys.com Thu Nov 2 14:27:05 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:05 -0600 Subject: [llvm-commits] CVS: llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp Message-ID: <200611022027.kA2KR5E5009986@zion.cs.uiuc.edu> Changes in directory llvm/projects/Stacker/lib/compiler: StackerCompiler.cpp updated: 1.21 -> 1.22 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+0 -1) StackerCompiler.cpp | 1 - 1 files changed, 1 deletion(-) Index: llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp diff -u llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.21 llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.22 --- llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.21 Wed Nov 1 19:53:59 2006 +++ llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp Thu Nov 2 14:25:50 2006 @@ -116,7 +116,6 @@ } } - Module *Result; try { // Create the module we'll return From reid at x10sys.com Thu Nov 2 14:27:05 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:05 -0600 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp Message-ID: <200611022027.kA2KR5f9010064@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: Reader.cpp updated: 1.201 -> 1.202 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+0 -1) Reader.cpp | 1 - 1 files changed, 1 deletion(-) Index: llvm/lib/Bytecode/Reader/Reader.cpp diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.201 llvm/lib/Bytecode/Reader/Reader.cpp:1.202 --- llvm/lib/Bytecode/Reader/Reader.cpp:1.201 Wed Nov 1 19:53:58 2006 +++ llvm/lib/Bytecode/Reader/Reader.cpp Thu Nov 2 14:25:49 2006 @@ -1383,7 +1383,6 @@ unsigned NumEntries = read_vbr_uint(); unsigned Typ = 0; bool isTypeType = read_typeid(Typ); - const Type *Ty = getType(Typ); for (unsigned i = 0; i != NumEntries; ++i) { // Symtab entry: [def slot #][name] From reid at x10sys.com Thu Nov 2 14:27:05 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:05 -0600 Subject: [llvm-commits] CVS: llvm/tools/llvm-ar/llvm-ar.cpp Message-ID: <200611022027.kA2KR5sI009980@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-ar: llvm-ar.cpp updated: 1.38 -> 1.39 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+0 -1) llvm-ar.cpp | 1 - 1 files changed, 1 deletion(-) Index: llvm/tools/llvm-ar/llvm-ar.cpp diff -u llvm/tools/llvm-ar/llvm-ar.cpp:1.38 llvm/tools/llvm-ar/llvm-ar.cpp:1.39 --- llvm/tools/llvm-ar/llvm-ar.cpp:1.38 Fri Aug 25 00:28:17 2006 +++ llvm/tools/llvm-ar/llvm-ar.cpp Thu Nov 2 14:25:50 2006 @@ -445,7 +445,6 @@ doExtract(std::string* ErrMsg) { if (buildPaths(false, ErrMsg)) return true; - unsigned countDown = Count; for (Archive::iterator I = TheArchive->begin(), E = TheArchive->end(); I != E; ++I ) { if (Paths.empty() || From reid at x10sys.com Thu Nov 2 14:27:05 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:05 -0600 Subject: [llvm-commits] CVS: llvm/utils/PerfectShuffle/PerfectShuffle.cpp Message-ID: <200611022027.kA2KR5ra009976@zion.cs.uiuc.edu> Changes in directory llvm/utils/PerfectShuffle: PerfectShuffle.cpp updated: 1.8 -> 1.9 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+0 -1) PerfectShuffle.cpp | 1 - 1 files changed, 1 deletion(-) Index: llvm/utils/PerfectShuffle/PerfectShuffle.cpp diff -u llvm/utils/PerfectShuffle/PerfectShuffle.cpp:1.8 llvm/utils/PerfectShuffle/PerfectShuffle.cpp:1.9 --- llvm/utils/PerfectShuffle/PerfectShuffle.cpp:1.8 Wed May 24 12:04:05 2006 +++ llvm/utils/PerfectShuffle/PerfectShuffle.cpp Thu Nov 2 14:25:50 2006 @@ -296,7 +296,6 @@ for (unsigned opnum = 0, e = TheOperators.size(); opnum != e; ++opnum) { Operator *Op = TheOperators[opnum]; - unsigned short Mask = Op->ShuffleMask; // Evaluate op(LHS,LHS) unsigned ResultMask = Op->getTransformedMask(LHS, LHS); From reid at x10sys.com Thu Nov 2 14:27:05 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:05 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp AlphaCodeEmitter.cpp AlphaISelDAGToDAG.cpp AlphaISelLowering.cpp Message-ID: <200611022027.kA2KR57A009984@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Alpha: AlphaAsmPrinter.cpp updated: 1.53 -> 1.54 AlphaCodeEmitter.cpp updated: 1.17 -> 1.18 AlphaISelDAGToDAG.cpp updated: 1.61 -> 1.62 AlphaISelLowering.cpp updated: 1.72 -> 1.73 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+0 -12) AlphaAsmPrinter.cpp | 1 - AlphaCodeEmitter.cpp | 5 ----- AlphaISelDAGToDAG.cpp | 1 - AlphaISelLowering.cpp | 5 ----- 4 files changed, 12 deletions(-) Index: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp diff -u llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.53 llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.54 --- llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.53 Tue Oct 24 15:32:14 2006 +++ llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp Thu Nov 2 14:25:49 2006 @@ -97,7 +97,6 @@ void AlphaAsmPrinter::printOp(const MachineOperand &MO, bool IsCallOp) { const MRegisterInfo &RI = *TM.getRegisterInfo(); - int new_symbol; switch (MO.getType()) { case MachineOperand::MO_Register: Index: llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp diff -u llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp:1.17 llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp:1.18 --- llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp:1.17 Thu Jul 27 13:20:17 2006 +++ llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp Thu Nov 2 14:25:49 2006 @@ -92,7 +92,6 @@ for (MachineBasicBlock::iterator I = MBB.begin(), E = MBB.end(); I != E; ++I) { MachineInstr &MI = *I; - unsigned Opcode = MI.getOpcode(); switch(MI.getOpcode()) { default: MCE.emitWordLE(getBinaryCodeForInstr(*I)); @@ -160,10 +159,6 @@ } else if (MO.isGlobalAddress() || MO.isExternalSymbol() || MO.isConstantPoolIndex()) { DEBUG(std::cerr << MO << " is a relocated op for " << MI << "\n";); - bool isExternal = MO.isExternalSymbol() || - (MO.isGlobalAddress() && - ( MO.getGlobal()->hasWeakLinkage() || - MO.getGlobal()->isExternal()) ); unsigned Reloc = 0; int Offset = 0; bool useGOT = false; Index: llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp diff -u llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.61 llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.62 --- llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.61 Tue Oct 31 17:46:56 2006 +++ llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp Thu Nov 2 14:25:49 2006 @@ -324,7 +324,6 @@ // val32 >= IMM_LOW + IMM_LOW * IMM_MULT) //always true break; //(zext (LDAH (LDA))) //Else use the constant pool - MachineConstantPool *CP = BB->getParent()->getConstantPool(); ConstantInt *C = ConstantInt::get(Type::ULongTy, uval); SDOperand CPI = CurDAG->getTargetConstantPool(C, MVT::i64); SDNode *Tmp = CurDAG->getTargetNode(Alpha::LDAHr, MVT::i64, CPI, Index: llvm/lib/Target/Alpha/AlphaISelLowering.cpp diff -u llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.72 llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.73 --- llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.72 Wed Nov 1 21:05:26 2006 +++ llvm/lib/Target/Alpha/AlphaISelLowering.cpp Thu Nov 2 14:25:49 2006 @@ -175,8 +175,6 @@ SDOperand JTI = DAG.getTargetJumpTable(JT->getIndex(), PtrVT); SDOperand Zero = DAG.getConstant(0, PtrVT); - const TargetMachine &TM = DAG.getTarget(); - SDOperand Hi = DAG.getNode(AlphaISD::GPRelHi, MVT::i64, JTI, DAG.getNode(ISD::GLOBAL_OFFSET_TABLE, MVT::i64)); SDOperand Lo = DAG.getNode(AlphaISD::GPRelLo, MVT::i64, JTI, Hi); @@ -207,7 +205,6 @@ int &VarArgsOffset) { MachineFunction &MF = DAG.getMachineFunction(); MachineFrameInfo *MFI = MF.getFrameInfo(); - SSARegMap *RegMap = MF.getSSARegMap(); std::vector ArgValues; SDOperand Root = Op.getOperand(0); @@ -225,7 +222,6 @@ SDOperand ArgVal; if (ArgNo < 6) { - unsigned Vreg; switch (ObjectVT) { default: std::cerr << "Unknown Type " << ObjectVT << "\n"; @@ -480,7 +476,6 @@ //Expand only on constant case if (Op.getOperand(1).getOpcode() == ISD::Constant) { MVT::ValueType VT = Op.Val->getValueType(0); - unsigned Opc = Op.Val->getOpcode() == ISD::UREM ? ISD::UDIV : ISD::SDIV; SDOperand Tmp1 = Op.Val->getOpcode() == ISD::UREM ? BuildUDIV(Op.Val, DAG, NULL) : BuildSDIV(Op.Val, DAG, NULL); From reid at x10sys.com Thu Nov 2 14:27:01 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:01 -0600 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Writer/Writer.cpp Message-ID: <200611022027.kA2KR1NB009841@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Writer: Writer.cpp updated: 1.126 -> 1.127 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+1 -1) Writer.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Bytecode/Writer/Writer.cpp diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.126 llvm/lib/Bytecode/Writer/Writer.cpp:1.127 --- llvm/lib/Bytecode/Writer/Writer.cpp:1.126 Thu Oct 26 01:15:43 2006 +++ llvm/lib/Bytecode/Writer/Writer.cpp Thu Nov 2 14:25:49 2006 @@ -1273,7 +1273,7 @@ Out.write(compressed_magic,4); // Compress everything after the magic number (which we altered) - uint64_t zipSize = Compressor::compressToStream( + Compressor::compressToStream( (char*)(FirstByte+4), // Skip the magic number Buffer.size()-4, // Skip the magic number Out // Where to write compressed data From reid at x10sys.com Thu Nov 2 14:27:04 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:04 -0600 Subject: [llvm-commits] CVS: llvm/lib/Debugger/ProgramInfo.cpp Message-ID: <200611022027.kA2KR4q7009946@zion.cs.uiuc.edu> Changes in directory llvm/lib/Debugger: ProgramInfo.cpp updated: 1.18 -> 1.19 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+1 -1) ProgramInfo.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Debugger/ProgramInfo.cpp diff -u llvm/lib/Debugger/ProgramInfo.cpp:1.18 llvm/lib/Debugger/ProgramInfo.cpp:1.19 --- llvm/lib/Debugger/ProgramInfo.cpp:1.18 Fri Oct 20 02:07:24 2006 +++ llvm/lib/Debugger/ProgramInfo.cpp Thu Nov 2 14:25:49 2006 @@ -61,7 +61,7 @@ // If we found a stop point, check to see if it is earlier than what we // already have. If so, remember it. - if (const Function *F = CI->getCalledFunction()) + if (CI->getCalledFunction()) if (const DbgStopPointInst *SPI = dyn_cast(CI)) { unsigned CurLineNo = SPI->getLine(); unsigned CurColNo = SPI->getColumn(); From reid at x10sys.com Thu Nov 2 14:27:05 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:05 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/crtend/Makefile Message-ID: <200611022027.kA2KR5An010033@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/crtend: Makefile updated: 1.33 -> 1.34 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+0 -2) Makefile | 2 -- 1 files changed, 2 deletions(-) Index: llvm/runtime/GCCLibraries/crtend/Makefile diff -u llvm/runtime/GCCLibraries/crtend/Makefile:1.33 llvm/runtime/GCCLibraries/crtend/Makefile:1.34 --- llvm/runtime/GCCLibraries/crtend/Makefile:1.33 Thu Mar 9 00:16:28 2006 +++ llvm/runtime/GCCLibraries/crtend/Makefile Thu Nov 2 14:25:50 2006 @@ -81,5 +81,3 @@ uninstall-local:: $(Echo) Uninstalling $(BuildMode) Bytecode Archive $(DestBytecodeLib) -$(Verb) $(RM) -f $(DestBytecodeLib) - - From reid at x10sys.com Thu Nov 2 14:27:05 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:05 -0600 Subject: [llvm-commits] CVS: llvm/tools/opt/opt.cpp Message-ID: <200611022027.kA2KR5TV010010@zion.cs.uiuc.edu> Changes in directory llvm/tools/opt: opt.cpp updated: 1.118 -> 1.119 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+2 -3) opt.cpp | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) Index: llvm/tools/opt/opt.cpp diff -u llvm/tools/opt/opt.cpp:1.118 llvm/tools/opt/opt.cpp:1.119 --- llvm/tools/opt/opt.cpp:1.118 Mon Aug 28 12:31:55 2006 +++ llvm/tools/opt/opt.cpp Thu Nov 2 14:25:50 2006 @@ -163,7 +163,6 @@ // FIXME: The choice of target should be controllable on the command line. std::auto_ptr target; - TargetMachine* TM = NULL; std::string ErrorMessage; // Load the input module... @@ -233,9 +232,9 @@ Passes.add(P); if (AnalyzeOnly) { - if (BasicBlockPass *BBP = dynamic_cast(P)) + if (dynamic_cast(P)) Passes.add(new BasicBlockPassPrinter(PassInf)); - else if (FunctionPass *FP = dynamic_cast(P)) + else if (dynamic_cast(P)) Passes.add(new FunctionPassPrinter(PassInf)); else Passes.add(new ModulePassPrinter(PassInf)); From reid at x10sys.com Thu Nov 2 14:27:05 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:05 -0600 Subject: [llvm-commits] CVS: llvm/tools/llvmc/CompilerDriver.cpp Message-ID: <200611022027.kA2KR5Hs010024@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvmc: CompilerDriver.cpp updated: 1.41 -> 1.42 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+0 -7) CompilerDriver.cpp | 7 ------- 1 files changed, 7 deletions(-) Index: llvm/tools/llvmc/CompilerDriver.cpp diff -u llvm/tools/llvmc/CompilerDriver.cpp:1.41 llvm/tools/llvmc/CompilerDriver.cpp:1.42 --- llvm/tools/llvmc/CompilerDriver.cpp:1.41 Fri Aug 25 12:43:11 2006 +++ llvm/tools/llvmc/CompilerDriver.cpp Thu Nov 2 14:25:50 2006 @@ -62,13 +62,6 @@ DumpAction(&cd->Linker); } -/// This specifies the passes to run for OPT_FAST_COMPILE (-O1) -/// which should reduce the volume of code and make compilation -/// faster. This is also safe on any llvm module. -static const char* DefaultFastCompileOptimizations[] = { - "-simplifycfg", "-mem2reg", "-instcombine" -}; - class CompilerDriverImpl : public CompilerDriver { /// @name Constructors /// @{ From reid at x10sys.com Thu Nov 2 14:27:05 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:05 -0600 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/Lexer.cpp.cvs Lexer.l.cvs llvmAsmParser.cpp.cvs llvmAsmParser.h.cvs llvmAsmParser.y.cvs Message-ID: <200611022027.kA2KR5Hg010032@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: Lexer.cpp.cvs updated: 1.12 -> 1.13 Lexer.l.cvs updated: 1.9 -> 1.10 llvmAsmParser.cpp.cvs updated: 1.22 -> 1.23 llvmAsmParser.h.cvs updated: 1.17 -> 1.18 llvmAsmParser.y.cvs updated: 1.23 -> 1.24 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+1844 -1731) Lexer.cpp.cvs | 1255 +++++++++++++++-------------- Lexer.l.cvs | 22 llvmAsmParser.cpp.cvs | 2160 +++++++++++++++++++++++++------------------------- llvmAsmParser.h.cvs | 116 +- llvmAsmParser.y.cvs | 22 5 files changed, 1844 insertions(+), 1731 deletions(-) Index: llvm/lib/AsmParser/Lexer.cpp.cvs diff -u llvm/lib/AsmParser/Lexer.cpp.cvs:1.12 llvm/lib/AsmParser/Lexer.cpp.cvs:1.13 --- llvm/lib/AsmParser/Lexer.cpp.cvs:1.12 Sun Oct 22 01:08:13 2006 +++ llvm/lib/AsmParser/Lexer.cpp.cvs Thu Nov 2 14:25:49 2006 @@ -17,10 +17,10 @@ #define yylineno llvmAsmlineno #line 20 "Lexer.cpp" -/* A lexical scanner generated by flex */ +/* A lexical scanner generated by flex*/ /* Scanner skeleton version: - * $Header: /var/cvs/llvm/llvm/lib/AsmParser/Lexer.cpp.cvs,v 1.12 2006/10/22 06:08:13 lattner Exp $ + * $Header: /var/cvs/llvm/llvm/lib/AsmParser/Lexer.cpp.cvs,v 1.13 2006/11/02 20:25:49 reid Exp $ */ #define FLEX_SCANNER @@ -28,6 +28,7 @@ #define YY_FLEX_MINOR_VERSION 5 #include +#include /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ @@ -41,7 +42,6 @@ #ifdef __cplusplus #include -#include /* Use prototypes in function declarations. */ #define YY_USE_PROTOS @@ -153,6 +153,15 @@ #define unput(c) yyunput( c, yytext_ptr ) +/* Some routines like yy_flex_realloc() are emitted as static but are + not called by all lexers. This generates warnings in some compilers, + notably GCC. Arrange to suppress these. */ +#ifdef __GNUC__ +#define YY_MAY_BE_UNUSED __attribute__((unused)) +#else +#define YY_MAY_BE_UNUSED +#endif + /* The following is because we cannot portably get our hands on size_t * (without autoconf's help, which isn't available because we want * flex-generated scanners to compile on their own). @@ -259,7 +268,7 @@ YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); static void *yy_flex_alloc YY_PROTO(( yy_size_t )); -static inline void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); +static inline void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) YY_MAY_BE_UNUSED; static void yy_flex_free YY_PROTO(( void * )); #define yy_new_buffer yy_create_buffer @@ -308,35 +317,35 @@ *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 114 -#define YY_END_OF_BUFFER 115 -static yyconst short int yy_acclist[192] = +#define YY_NUM_RULES 120 +#define YY_END_OF_BUFFER 121 +static yyconst short int yy_acclist[198] = { 0, - 115, 113, 114, 112, 113, 114, 112, 114, 113, 114, - 113, 114, 113, 114, 113, 114, 113, 114, 113, 114, - 105, 113, 114, 105, 113, 114, 1, 113, 114, 113, - 114, 113, 114, 113, 114, 113, 114, 113, 114, 113, - 114, 113, 114, 113, 114, 113, 114, 113, 114, 113, - 114, 113, 114, 113, 114, 113, 114, 113, 114, 113, - 114, 113, 114, 113, 114, 113, 114, 113, 114, 113, - 114, 104, 102, 101, 101, 108, 106, 110, 105, 1, - 87, 41, 69, 23, 104, 101, 101, 109, 110, 20, - 110, 111, 63, 68, 39, 34, 42, 66, 3, 54, - - 65, 25, 77, 67, 86, 81, 82, 64, 70, 103, - 110, 110, 49, 78, 79, 94, 95, 56, 22, 107, - 26, 4, 61, 55, 48, 11, 110, 36, 2, 5, - 58, 60, 50, 72, 76, 74, 75, 73, 71, 52, - 96, 51, 57, 21, 84, 93, 45, 59, 30, 24, - 44, 7, 89, 33, 92, 38, 62, 80, 88, 27, - 28, 90, 53, 85, 83, 43, 6, 29, 37, 8, - 17, 9, 10, 35, 12, 14, 13, 32, 40, 15, - 31, 91, 97, 99, 100, 16, 46, 98, 18, 47, - 19 + 121, 119, 120, 118, 119, 120, 118, 120, 119, 120, + 119, 120, 119, 120, 119, 120, 119, 120, 119, 120, + 111, 119, 120, 111, 119, 120, 1, 119, 120, 119, + 120, 119, 120, 119, 120, 119, 120, 119, 120, 119, + 120, 119, 120, 119, 120, 119, 120, 119, 120, 119, + 120, 119, 120, 119, 120, 119, 120, 119, 120, 119, + 120, 119, 120, 119, 120, 119, 120, 119, 120, 119, + 120, 110, 108, 107, 107, 114, 112, 116, 111, 1, + 93, 41, 75, 23, 110, 107, 107, 115, 116, 20, + 116, 117, 63, 74, 39, 34, 42, 66, 3, 54, + + 65, 25, 83, 70, 92, 87, 88, 64, 76, 109, + 116, 116, 49, 84, 85, 69, 100, 73, 101, 56, + 22, 113, 68, 72, 26, 4, 61, 67, 55, 71, + 48, 11, 116, 36, 2, 5, 58, 60, 50, 78, + 82, 80, 81, 79, 77, 52, 102, 51, 57, 21, + 90, 99, 45, 59, 30, 24, 44, 7, 95, 33, + 98, 38, 62, 86, 94, 27, 28, 96, 53, 91, + 89, 43, 6, 29, 37, 8, 17, 9, 10, 35, + 12, 14, 13, 32, 40, 15, 31, 97, 103, 105, + 106, 16, 46, 104, 18, 47, 19 } ; -static yyconst short int yy_accept[511] = +static yyconst short int yy_accept[527] = { 0, 1, 1, 1, 2, 4, 7, 9, 11, 13, 15, 17, 19, 21, 24, 27, 30, 32, 34, 36, 38, @@ -346,54 +355,56 @@ 81, 81, 81, 81, 81, 81, 81, 81, 81, 82, 82, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 84, 84, 84, + 83, 83, 83, 83, 83, 83, 83, 83, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, - 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, - 85, 85, 85, 85, 86, 87, 89, 90, 91, 92, - 92, 93, 94, 94, 94, 95, 95, 96, 96, 97, - 97, 97, 97, 98, 98, 98, 98, 98, 98, 98, - 99, 99, 99, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 101, 101, 101, 101, 101, 101, - 101, 101, 101, 102, 103, 103, 103, 104, 104, 105, - 106, 106, 106, 106, 106, 106, 107, 107, 108, 108, - 108, 108, 109, 109, 109, 109, 109, 109, 109, 109, + 84, 84, 84, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 86, + 87, 89, 90, 91, 92, 92, 93, 94, 94, 94, + 95, 95, 96, 96, 97, 97, 97, 97, 98, 98, + 98, 98, 98, 98, 98, 99, 99, 99, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 101, 101, 101, 101, 101, 101, 101, 101, 101, 102, + 103, 103, 103, 104, 104, 105, 106, 106, 106, 106, + 106, 106, 106, 107, 107, 108, 108, 108, 108, 108, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 110, 110, 111, 112, 112, 112, 112, 113, 113, 113, 113, 113, 114, 115, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, - 116, 116, 116, 116, 116, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 118, 119, 119, 119, 120, - 120, 120, 121, 121, 121, 121, 121, 121, 121, 121, - 121, 121, 121, 121, 121, 122, 122, 122, 123, 124, - 124, 125, 125, 125, 125, 125, 125, 125, 125, 125, - 125, 126, 126, 127, 127, 127, 128, 129, 129, 129, - 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, - - 130, 130, 130, 130, 131, 131, 132, 132, 132, 132, - 132, 132, 132, 133, 133, 133, 133, 133, 133, 133, - 134, 134, 134, 135, 136, 137, 138, 139, 140, 141, - 141, 141, 142, 142, 142, 142, 143, 144, 145, 145, - 145, 145, 145, 145, 146, 146, 146, 146, 146, 146, - 147, 147, 148, 148, 148, 148, 148, 148, 148, 148, - 149, 150, 151, 151, 151, 152, 152, 153, 153, 153, - 153, 154, 154, 155, 156, 157, 158, 158, 158, 159, - 159, 159, 160, 161, 162, 162, 162, 163, 164, 165, - 166, 166, 166, 166, 166, 166, 166, 167, 167, 168, - - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 170, 170, 170, 170, 170, 170, 170, 170, - 170, 170, 171, 171, 171, 171, 171, 172, 172, 172, - 172, 172, 173, 174, 174, 174, 174, 174, 174, 175, - 175, 175, 175, 176, 176, 177, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, - 179, 179, 179, 179, 179, 179, 179, 179, 180, 180, - 180, 180, 180, 180, 181, 181, 181, 181, 181, 182, - 182, 182, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 183, 183, 183, 183, 183, 184, 184, 185, 186, - - 187, 187, 188, 188, 189, 190, 191, 191, 192, 192 + 116, 116, 116, 116, 117, 117, 118, 119, 119, 119, + 119, 119, 119, 119, 119, 119, 119, 120, 121, 121, + 121, 122, 122, 122, 123, 123, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 125, 125, 125, 126, + 126, 126, 127, 128, 128, 129, 130, 130, 130, 130, + 130, 130, 131, 131, 131, 131, 131, 132, 132, 133, + + 133, 133, 134, 135, 135, 135, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 137, 137, 138, 138, 138, 138, 138, 138, 138, 139, + 139, 139, 139, 139, 139, 139, 140, 140, 140, 141, + 142, 143, 144, 145, 146, 147, 147, 147, 148, 148, + 148, 148, 149, 150, 151, 151, 151, 151, 151, 151, + 152, 152, 152, 152, 152, 152, 153, 153, 154, 154, + 154, 154, 154, 154, 154, 154, 155, 156, 157, 157, + 157, 158, 158, 159, 159, 159, 159, 160, 160, 161, + 162, 163, 164, 164, 164, 165, 165, 165, 166, 167, + + 168, 168, 168, 169, 170, 171, 172, 172, 172, 172, + 172, 172, 172, 173, 173, 174, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, 176, 176, + 176, 176, 176, 176, 176, 176, 176, 176, 177, 177, + 177, 177, 177, 178, 178, 178, 178, 178, 179, 180, + 180, 180, 180, 180, 180, 181, 181, 181, 181, 182, + 182, 183, 184, 184, 184, 184, 184, 184, 184, 184, + 184, 184, 184, 184, 184, 184, 185, 185, 185, 185, + 185, 185, 185, 185, 186, 186, 186, 186, 186, 186, + 187, 187, 187, 187, 187, 188, 188, 188, 189, 189, + + 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 190, 190, 191, 192, 193, 193, 194, 194, + 195, 196, 197, 197, 198, 198 } ; static yyconst int yy_ec[256] = @@ -437,260 +448,265 @@ 3, 3, 3 } ; -static yyconst short int yy_base[515] = +static yyconst short int yy_base[531] = { 0, - 0, 0, 1108, 1109, 1109, 1109, 1103, 1092, 36, 40, + 0, 0, 1140, 1141, 1141, 1141, 1135, 1124, 36, 40, 44, 50, 56, 62, 0, 63, 66, 81, 89, 47, - 90, 91, 76, 96, 108, 49, 97, 110, 68, 137, - 120, 168, 112, 115, 135, 127, 1101, 1109, 1090, 1109, - 0, 158, 173, 180, 196, 70, 201, 216, 221, 0, - 121, 152, 123, 139, 166, 140, 162, 184, 1089, 222, - 180, 31, 186, 119, 232, 208, 144, 225, 234, 236, - 235, 188, 238, 240, 246, 241, 245, 203, 248, 256, - 254, 258, 262, 252, 272, 274, 1088, 276, 278, 280, - 255, 253, 283, 284, 285, 286, 288, 297, 300, 1087, - - 301, 292, 295, 307, 309, 318, 316, 315, 322, 312, - 147, 329, 330, 1086, 0, 344, 349, 1085, 363, 380, - 0, 1084, 338, 336, 1083, 355, 1082, 356, 1081, 353, - 367, 334, 1080, 375, 365, 381, 384, 370, 371, 1079, - 388, 392, 391, 393, 394, 395, 396, 400, 399, 407, - 406, 409, 411, 413, 410, 414, 418, 421, 425, 426, - 427, 429, 1078, 1077, 430, 431, 1076, 435, 1075, 1074, - 458, 436, 439, 434, 469, 1073, 449, 1072, 438, 441, - 458, 1071, 471, 472, 474, 473, 481, 482, 475, 476, - 483, 488, 489, 493, 495, 496, 504, 501, 503, 505, - - 510, 507, 516, 1070, 511, 1109, 527, 541, 545, 549, - 554, 555, 440, 556, 557, 1069, 1068, 1067, 558, 559, - 560, 517, 528, 518, 561, 189, 562, 563, 566, 569, - 570, 567, 564, 578, 1066, 579, 581, 580, 584, 587, - 592, 595, 591, 596, 1065, 1064, 597, 598, 1063, 593, - 599, 0, 603, 607, 614, 604, 616, 618, 619, 600, - 626, 629, 631, 630, 1062, 633, 632, 1061, 1060, 634, - 1059, 635, 644, 645, 648, 649, 650, 651, 652, 655, - 1058, 656, 1057, 659, 657, 677, 1056, 660, 519, 1055, - 661, 662, 677, 678, 664, 680, 687, 688, 689, 691, - - 690, 692, 693, 1054, 694, 1053, 695, 696, 699, 697, - 702, 703, 1052, 705, 714, 710, 716, 718, 721, 1051, - 724, 726, 1050, 1049, 1048, 1047, 1046, 1045, 1044, 728, - 729, 1043, 732, 731, 736, 1042, 1041, 1040, 733, 734, - 738, 735, 737, 1039, 740, 747, 750, 751, 752, 1038, - 753, 1037, 759, 757, 761, 762, 765, 767, 768, 1036, - 1035, 1034, 773, 770, 1033, 772, 1032, 775, 781, 791, - 1031, 792, 1030, 1029, 1028, 1027, 779, 780, 1026, 794, - 795, 1025, 1024, 1023, 798, 801, 1022, 1021, 1020, 1019, - 802, 782, 806, 807, 808, 809, 1018, 810, 1017, 1016, - - 812, 815, 816, 819, 818, 821, 822, 823, 826, 831, - 824, 1015, 829, 835, 843, 845, 847, 837, 851, 849, - 852, 1014, 853, 855, 857, 859, 1013, 861, 862, 864, - 865, 1012, 1011, 869, 866, 881, 870, 867, 1010, 883, - 884, 886, 1007, 871, 998, 997, 891, 892, 893, 895, - 897, 898, 902, 903, 904, 905, 906, 907, 910, 995, - 914, 908, 912, 918, 921, 923, 919, 994, 925, 929, - 933, 934, 935, 992, 936, 937, 939, 940, 990, 943, - 944, 989, 947, 951, 946, 955, 956, 963, 964, 965, - 966, 968, 969, 967, 970, 985, 971, 984, 983, 979, - - 973, 783, 982, 602, 477, 446, 978, 333, 1109, 1013, - 1015, 83, 1019, 80 + 100, 97, 76, 96, 111, 49, 113, 110, 68, 140, + 126, 171, 119, 118, 139, 133, 1133, 1141, 1122, 1141, + 0, 176, 184, 199, 204, 70, 209, 224, 229, 0, + 117, 130, 150, 72, 160, 151, 159, 123, 1121, 230, + 178, 31, 69, 168, 240, 95, 233, 165, 241, 243, + 242, 156, 244, 246, 187, 251, 253, 254, 211, 258, + 256, 263, 260, 265, 190, 267, 283, 1120, 271, 274, + 270, 285, 289, 290, 291, 292, 294, 295, 297, 299, + + 296, 308, 1119, 311, 300, 318, 320, 322, 323, 330, + 325, 328, 327, 337, 342, 216, 336, 345, 1118, 0, + 362, 366, 1117, 380, 397, 0, 1116, 370, 349, 1115, + 373, 1114, 355, 1113, 371, 372, 384, 1112, 392, 326, + 399, 398, 401, 402, 1111, 405, 404, 406, 411, 412, + 409, 413, 415, 422, 423, 425, 424, 426, 428, 429, + 435, 442, 374, 443, 444, 445, 446, 447, 1110, 1109, + 448, 449, 1108, 450, 1107, 1106, 476, 454, 455, 464, + 459, 488, 1105, 470, 1104, 490, 489, 460, 492, 1103, + 493, 494, 495, 496, 501, 502, 504, 507, 508, 512, + + 514, 517, 519, 520, 521, 518, 457, 522, 526, 530, + 539, 540, 541, 1102, 524, 1141, 550, 564, 568, 572, + 577, 578, 458, 579, 580, 1101, 1100, 1099, 581, 582, + 583, 584, 550, 585, 525, 586, 589, 551, 590, 587, + 607, 591, 594, 1098, 592, 1097, 1096, 603, 611, 610, + 593, 613, 617, 620, 621, 622, 1095, 1094, 623, 625, + 1093, 624, 626, 0, 627, 1092, 629, 638, 630, 643, + 644, 646, 628, 647, 654, 1091, 656, 661, 1090, 660, + 658, 1089, 1088, 662, 1087, 1086, 659, 664, 672, 675, + 676, 1085, 677, 678, 679, 681, 1084, 682, 1083, 684, + + 683, 690, 1082, 692, 695, 1081, 700, 704, 710, 711, + 691, 713, 701, 702, 714, 715, 718, 722, 724, 1080, + 726, 1079, 725, 727, 728, 729, 730, 736, 1078, 737, + 740, 743, 746, 748, 751, 1077, 735, 738, 1076, 1075, + 1074, 1073, 1072, 1071, 1070, 756, 758, 1069, 762, 759, + 763, 1068, 1067, 1066, 764, 766, 767, 765, 769, 1065, + 770, 776, 778, 777, 779, 1064, 781, 1063, 784, 785, + 786, 790, 791, 797, 798, 1062, 1061, 1060, 802, 795, + 1059, 803, 1058, 808, 811, 804, 1057, 805, 1056, 1055, + 1054, 1053, 810, 821, 1052, 823, 824, 1051, 1050, 1049, + + 822, 825, 1048, 1047, 1046, 1045, 826, 827, 828, 829, + 830, 833, 1044, 839, 1043, 1042, 840, 843, 844, 845, + 846, 850, 848, 851, 852, 853, 854, 1041, 858, 863, + 868, 869, 871, 875, 877, 878, 879, 1040, 881, 885, + 886, 882, 1037, 887, 889, 888, 894, 1028, 1026, 897, + 895, 892, 900, 907, 1025, 912, 916, 914, 1024, 917, + 1023, 1021, 918, 920, 922, 925, 926, 924, 928, 931, + 933, 932, 934, 936, 938, 1020, 941, 944, 937, 948, + 949, 950, 952, 1019, 957, 961, 962, 963, 964, 1018, + 965, 966, 967, 968, 1013, 969, 972, 1010, 973, 976, + + 982, 984, 990, 991, 992, 993, 994, 996, 997, 998, + 999, 1006, 1000, 896, 893, 633, 1005, 632, 1007, 385, + 354, 353, 1008, 301, 1141, 1043, 1045, 226, 1049, 166 } ; -static yyconst short int yy_def[515] = +static yyconst short int yy_def[531] = { 0, - 509, 1, 509, 509, 509, 509, 510, 511, 512, 509, - 511, 511, 511, 511, 513, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 510, 509, 511, 509, - 514, 514, 509, 509, 511, 511, 511, 511, 511, 513, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 509, 514, 514, 509, 511, 511, 511, - 49, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 49, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - - 511, 511, 511, 511, 511, 509, 509, 509, 509, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 171, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 509, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - - 511, 511, 511, 511, 511, 511, 511, 511, 0, 509, - 509, 509, 509, 509 + 525, 1, 525, 525, 525, 525, 526, 527, 528, 525, + 527, 527, 527, 527, 529, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 526, 525, 527, 525, + 530, 530, 525, 525, 527, 527, 527, 527, 527, 529, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 525, 530, + 530, 525, 527, 527, 527, 49, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 49, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 525, 525, 525, 525, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 177, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + + 527, 525, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 0, 525, 525, 525, 525, 525 } ; -static yyconst short int yy_nxt[1153] = +static yyconst short int yy_nxt[1185] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 4, 15, 8, 8, 8, 16, 17, 18, 19, 20, 21, 22, 8, 23, 8, 24, 25, 26, 27, 28, 8, 29, 30, 31, 32, 33, 34, 35, 8, 36, 42, 40, 43, 43, 43, 43, 44, - 44, 44, 44, 45, 45, 45, 45, 40, 46, 134, - 40, 135, 40, 40, 47, 48, 48, 48, 48, 40, - 47, 48, 48, 48, 48, 40, 40, 69, 118, 40, - 84, 40, 115, 40, 51, 41, 85, 70, 56, 40, - 90, 52, 57, 53, 40, 54, 49, 58, 55, 60, - - 59, 61, 40, 40, 40, 76, 77, 64, 71, 40, - 40, 65, 62, 74, 78, 66, 63, 67, 72, 75, - 68, 40, 79, 40, 73, 40, 81, 80, 40, 86, - 108, 87, 40, 40, 40, 88, 40, 110, 99, 82, - 40, 89, 122, 109, 125, 83, 91, 111, 40, 113, - 40, 100, 40, 40, 101, 137, 92, 40, 203, 93, - 40, 102, 94, 95, 128, 40, 112, 116, 116, 116, - 116, 126, 141, 96, 97, 40, 98, 91, 123, 40, - 124, 40, 43, 43, 43, 43, 129, 103, 117, 44, - 44, 44, 44, 40, 104, 127, 105, 40, 106, 40, - - 133, 40, 40, 107, 47, 45, 45, 45, 45, 40, - 119, 119, 119, 119, 40, 130, 40, 120, 298, 148, - 136, 40, 156, 120, 47, 48, 48, 48, 48, 40, - 121, 121, 121, 121, 40, 40, 121, 121, 40, 121, - 121, 121, 121, 121, 121, 40, 140, 40, 40, 40, - 131, 40, 138, 40, 40, 143, 144, 132, 40, 40, - 149, 40, 142, 146, 139, 40, 40, 40, 40, 40, - 147, 40, 145, 152, 159, 40, 150, 151, 157, 162, - 153, 154, 161, 155, 158, 40, 160, 40, 164, 40, - 163, 40, 166, 40, 172, 171, 40, 40, 40, 40, - - 165, 40, 167, 173, 168, 40, 180, 182, 40, 169, - 40, 174, 176, 40, 40, 177, 170, 181, 178, 175, - 40, 179, 40, 183, 188, 40, 184, 186, 40, 40, - 202, 40, 197, 198, 185, 40, 189, 190, 187, 192, - 191, 196, 40, 40, 193, 199, 40, 40, 200, 40, - 201, 40, 194, 116, 116, 116, 116, 195, 207, 207, - 207, 207, 212, 204, 205, 208, 40, 213, 40, 40, - 218, 208, 119, 119, 119, 119, 40, 214, 40, 120, - 40, 216, 215, 40, 40, 120, 209, 210, 40, 211, - 211, 211, 211, 40, 40, 217, 219, 40, 223, 224, - - 220, 40, 222, 221, 40, 40, 40, 40, 40, 40, - 225, 227, 40, 40, 226, 229, 230, 228, 234, 40, - 40, 235, 40, 40, 40, 237, 40, 40, 231, 236, - 232, 40, 233, 239, 40, 240, 242, 238, 40, 40, - 40, 241, 40, 40, 40, 243, 245, 40, 40, 40, - 246, 40, 40, 40, 40, 247, 255, 244, 249, 40, - 288, 261, 40, 262, 250, 251, 248, 252, 252, 252, - 252, 40, 253, 252, 252, 254, 252, 252, 252, 252, - 252, 252, 40, 260, 40, 40, 40, 40, 40, 40, - 40, 256, 263, 257, 40, 40, 40, 258, 266, 259, - - 265, 40, 40, 268, 269, 267, 40, 264, 40, 40, - 273, 270, 271, 272, 40, 275, 40, 40, 40, 274, - 40, 276, 278, 40, 40, 280, 281, 277, 282, 40, - 40, 40, 40, 284, 283, 279, 207, 207, 207, 207, - 351, 40, 285, 208, 296, 294, 295, 209, 209, 208, - 286, 286, 286, 286, 286, 286, 286, 286, 211, 211, - 211, 211, 40, 211, 211, 211, 211, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 291, 40, - 40, 300, 40, 40, 305, 287, 289, 290, 303, 304, - 299, 40, 40, 40, 40, 292, 293, 40, 301, 308, - - 40, 297, 309, 302, 40, 40, 40, 307, 40, 40, - 40, 40, 40, 40, 306, 40, 40, 40, 310, 312, - 40, 311, 314, 313, 315, 320, 317, 40, 316, 40, - 318, 40, 40, 321, 322, 319, 329, 323, 324, 40, - 326, 328, 40, 40, 40, 40, 40, 40, 40, 330, - 333, 331, 325, 332, 327, 334, 336, 40, 40, 337, - 335, 40, 40, 40, 40, 40, 340, 338, 40, 40, - 40, 339, 40, 40, 40, 40, 344, 40, 350, 341, - 353, 352, 347, 349, 342, 343, 286, 286, 286, 286, - 40, 40, 346, 40, 348, 345, 355, 354, 356, 357, - + 44, 44, 44, 45, 45, 45, 45, 40, 46, 139, + 40, 140, 40, 40, 47, 48, 48, 48, 48, 40, + 47, 48, 48, 48, 48, 40, 40, 69, 123, 40, + 85, 40, 40, 40, 51, 40, 86, 70, 56, 40, + 91, 52, 57, 53, 40, 54, 49, 58, 55, 60, + + 59, 61, 40, 141, 131, 77, 78, 64, 40, 40, + 40, 65, 62, 40, 79, 66, 63, 67, 71, 75, + 68, 72, 80, 40, 40, 76, 40, 81, 73, 82, + 40, 40, 40, 145, 74, 89, 40, 113, 127, 40, + 115, 90, 83, 40, 102, 87, 40, 88, 84, 92, + 114, 116, 40, 40, 135, 118, 128, 103, 129, 93, + 104, 94, 95, 40, 40, 96, 97, 105, 120, 40, + 117, 130, 40, 40, 98, 133, 99, 100, 40, 101, + 92, 40, 153, 134, 40, 121, 121, 121, 121, 132, + 106, 40, 107, 43, 43, 43, 43, 108, 138, 109, + + 40, 110, 147, 40, 142, 111, 112, 122, 44, 44, + 44, 44, 47, 45, 45, 45, 45, 40, 124, 124, + 124, 124, 40, 156, 40, 125, 170, 213, 41, 40, + 162, 125, 47, 48, 48, 48, 48, 40, 126, 126, + 126, 126, 40, 40, 126, 126, 40, 126, 126, 126, + 126, 126, 126, 40, 40, 40, 40, 40, 136, 40, + 143, 146, 148, 149, 40, 137, 40, 40, 155, 40, + 151, 40, 144, 40, 165, 154, 40, 152, 40, 150, + 40, 168, 157, 40, 40, 158, 166, 40, 163, 159, + 160, 167, 161, 169, 164, 171, 40, 173, 40, 175, + + 174, 172, 40, 40, 40, 40, 176, 40, 40, 40, + 40, 180, 40, 40, 40, 187, 179, 188, 190, 181, + 183, 40, 191, 184, 40, 177, 185, 182, 189, 186, + 178, 40, 196, 40, 192, 40, 40, 194, 40, 40, + 40, 40, 193, 40, 207, 208, 198, 205, 195, 40, + 40, 201, 199, 206, 200, 40, 202, 209, 40, 197, + 212, 230, 40, 210, 203, 211, 40, 40, 40, 204, + 214, 121, 121, 121, 121, 217, 217, 217, 217, 215, + 223, 225, 218, 40, 40, 40, 40, 40, 218, 124, + 124, 124, 124, 40, 222, 224, 125, 40, 40, 226, + + 227, 255, 125, 219, 220, 40, 221, 221, 221, 221, + 40, 40, 40, 229, 40, 40, 232, 40, 40, 40, + 228, 231, 40, 237, 40, 40, 40, 235, 40, 233, + 234, 236, 238, 239, 240, 40, 40, 40, 40, 40, + 245, 40, 40, 249, 242, 246, 241, 248, 40, 243, + 251, 252, 247, 244, 250, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 254, 257, 253, 40, 40, 258, + 40, 40, 40, 40, 259, 294, 261, 40, 304, 256, + 263, 268, 262, 40, 260, 264, 264, 264, 264, 276, + 265, 264, 264, 266, 264, 264, 264, 264, 264, 264, + + 267, 40, 40, 40, 273, 40, 40, 40, 40, 40, + 269, 275, 270, 274, 40, 40, 271, 40, 272, 280, + 40, 40, 279, 282, 283, 40, 277, 40, 281, 278, + 40, 40, 40, 40, 40, 40, 288, 40, 40, 40, + 284, 290, 287, 40, 286, 285, 291, 289, 296, 293, + 292, 297, 40, 40, 40, 301, 295, 298, 300, 217, + 217, 217, 217, 40, 40, 313, 218, 299, 311, 316, + 219, 219, 218, 302, 302, 302, 302, 302, 302, 302, + 302, 221, 221, 221, 221, 40, 221, 221, 221, 221, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 360, 40, 364, 365, 40, 40, 366, 40, 358, - 359, 361, 363, 40, 367, 371, 362, 40, 368, 40, - 374, 40, 370, 369, 40, 372, 373, 40, 375, 40, - 376, 40, 40, 377, 40, 40, 40, 40, 40, 40, - 40, 40, 381, 40, 386, 378, 380, 382, 384, 387, - 40, 389, 379, 40, 40, 40, 40, 383, 392, 385, - 40, 388, 40, 391, 40, 40, 390, 397, 40, 395, - 40, 40, 394, 40, 399, 40, 40, 393, 40, 396, - 403, 404, 40, 40, 40, 40, 40, 407, 401, 402, - - 400, 406, 398, 408, 40, 40, 405, 40, 40, 409, - 412, 40, 410, 411, 40, 40, 413, 418, 414, 40, - 40, 40, 40, 40, 415, 40, 416, 419, 40, 40, - 417, 40, 40, 420, 40, 40, 40, 40, 421, 40, - 428, 423, 40, 429, 40, 422, 424, 427, 40, 425, - 40, 431, 430, 433, 432, 426, 40, 436, 40, 434, - 40, 437, 40, 438, 40, 40, 40, 435, 40, 439, - 40, 441, 40, 440, 40, 40, 443, 40, 40, 40, - 40, 447, 40, 40, 40, 442, 456, 451, 453, 448, - 444, 445, 449, 446, 40, 452, 40, 40, 455, 40, - - 450, 454, 458, 457, 40, 40, 40, 460, 40, 461, - 40, 40, 459, 464, 462, 40, 40, 40, 40, 40, - 40, 40, 467, 40, 471, 40, 465, 40, 473, 463, - 469, 40, 40, 470, 40, 472, 40, 475, 40, 468, - 466, 474, 40, 478, 476, 479, 40, 40, 40, 40, - 40, 482, 40, 40, 477, 480, 40, 40, 486, 40, - 40, 483, 484, 485, 40, 488, 491, 481, 40, 40, - 489, 493, 494, 487, 490, 492, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 495, 40, 500, 501, 502, - 496, 40, 40, 506, 497, 40, 40, 40, 40, 499, - 498, 505, 40, 40, 507, 40, 504, 40, 40, 503, - 40, 40, 508, 37, 37, 37, 37, 39, 39, 50, + 40, 307, 40, 40, 40, 40, 40, 40, 303, 305, + 306, 312, 310, 320, 321, 314, 40, 315, 308, 309, + 40, 318, 317, 40, 40, 319, 40, 326, 322, 324, + 40, 323, 325, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 328, 40, 40, 327, 329, 336, + 331, 40, 330, 333, 332, 337, 40, 40, 338, 40, + 40, 334, 335, 339, 345, 340, 342, 40, 344, 40, + 346, 40, 40, 40, 40, 40, 347, 40, 348, 341, + 343, 349, 350, 353, 352, 40, 351, 354, 40, 40, + 40, 40, 40, 356, 40, 40, 40, 40, 355, 302, + + 302, 302, 302, 360, 40, 40, 357, 363, 40, 365, + 366, 358, 359, 40, 40, 40, 367, 40, 362, 364, + 368, 361, 369, 40, 40, 372, 40, 40, 40, 371, + 370, 40, 373, 374, 375, 40, 376, 40, 40, 40, + 40, 40, 40, 40, 380, 377, 381, 382, 40, 40, + 40, 40, 379, 40, 378, 383, 40, 384, 387, 40, + 386, 40, 389, 390, 40, 385, 394, 388, 391, 40, + 392, 40, 40, 393, 395, 40, 40, 40, 40, 40, + 40, 397, 40, 40, 396, 400, 402, 398, 403, 40, + 40, 40, 40, 405, 40, 399, 408, 40, 40, 40, + + 401, 404, 407, 40, 40, 413, 406, 411, 40, 410, + 40, 40, 415, 409, 412, 40, 40, 40, 40, 419, + 420, 40, 425, 40, 40, 426, 416, 414, 417, 418, + 423, 421, 422, 424, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 427, 429, 40, 430, 431, 435, + 432, 428, 40, 40, 433, 436, 40, 40, 40, 40, + 437, 40, 434, 40, 40, 40, 40, 40, 444, 438, + 439, 40, 445, 443, 440, 449, 40, 441, 446, 447, + 448, 40, 40, 442, 40, 452, 453, 454, 40, 450, + 40, 40, 40, 455, 40, 40, 451, 457, 40, 40, + + 40, 40, 40, 459, 463, 40, 40, 40, 40, 40, + 40, 456, 470, 40, 458, 464, 467, 469, 460, 465, + 40, 461, 462, 468, 466, 40, 472, 40, 471, 40, + 40, 40, 473, 40, 474, 40, 477, 40, 40, 40, + 475, 40, 478, 480, 40, 40, 40, 40, 483, 40, + 40, 40, 487, 476, 40, 481, 489, 40, 479, 485, + 486, 40, 40, 40, 488, 40, 482, 484, 490, 492, + 40, 494, 495, 491, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 498, 493, 40, 40, 502, 496, 40, + 499, 500, 501, 504, 507, 40, 509, 40, 505, 497, + + 506, 508, 503, 40, 40, 40, 40, 40, 510, 40, + 40, 40, 40, 40, 511, 516, 517, 518, 40, 40, + 40, 40, 513, 40, 512, 522, 40, 515, 514, 523, + 521, 40, 40, 40, 40, 520, 40, 40, 40, 40, + 519, 40, 524, 37, 37, 37, 37, 39, 39, 50, 40, 50, 50, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 40, 206, - - 40, 40, 40, 40, 114, 40, 38, 509, 3, 509, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509 + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 216, 40, 40, 40, 40, 119, 40, 38, 525, + 3, 525, 525, 525, 525, 525, 525, 525, 525, 525, + 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, + 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, + 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, + 525, 525, 525, 525 } ; -static yyconst short int yy_chk[1153] = +static yyconst short int yy_chk[1185] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -700,125 +716,128 @@ 10, 10, 10, 11, 11, 11, 11, 11, 12, 62, 20, 62, 26, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 16, 20, 46, 17, - 26, 29, 514, 46, 16, 512, 26, 20, 17, 23, + 26, 29, 63, 46, 16, 54, 26, 20, 17, 23, 29, 16, 17, 16, 18, 16, 13, 17, 16, 18, - 17, 18, 19, 21, 22, 23, 23, 19, 21, 24, - 27, 19, 18, 22, 24, 19, 18, 19, 21, 22, - 19, 25, 24, 28, 21, 33, 25, 24, 34, 27, - 33, 27, 64, 31, 51, 28, 53, 34, 31, 25, - 36, 28, 51, 33, 53, 25, 30, 35, 35, 36, - 30, 31, 54, 56, 31, 64, 30, 67, 111, 30, - 111, 31, 30, 30, 56, 52, 35, 42, 42, 42, - 42, 54, 67, 30, 30, 57, 30, 32, 52, 55, - 52, 32, 43, 43, 43, 43, 57, 32, 44, 44, - 44, 44, 44, 61, 32, 55, 32, 58, 32, 63, - - 61, 72, 226, 32, 45, 45, 45, 45, 45, 45, - 47, 47, 47, 47, 47, 58, 78, 47, 226, 72, - 63, 66, 78, 47, 48, 48, 48, 48, 48, 48, - 49, 49, 49, 49, 49, 60, 49, 49, 68, 49, - 49, 49, 49, 49, 49, 65, 66, 69, 71, 70, - 60, 73, 65, 74, 76, 69, 70, 60, 77, 75, - 73, 79, 68, 71, 65, 84, 92, 81, 91, 80, - 71, 82, 70, 76, 80, 83, 74, 75, 79, 82, - 77, 77, 81, 77, 79, 85, 80, 86, 84, 88, - 83, 89, 86, 90, 92, 91, 93, 94, 95, 96, - - 85, 97, 88, 93, 89, 102, 95, 97, 103, 90, - 98, 93, 94, 99, 101, 94, 90, 96, 94, 93, - 104, 94, 105, 98, 102, 110, 99, 101, 108, 107, - 110, 106, 108, 108, 99, 109, 103, 104, 101, 106, - 105, 107, 112, 113, 106, 108, 508, 132, 109, 124, - 109, 123, 106, 116, 116, 116, 116, 106, 117, 117, - 117, 117, 123, 112, 113, 117, 130, 124, 126, 128, - 132, 117, 119, 119, 119, 119, 119, 126, 135, 119, - 131, 130, 128, 138, 139, 119, 120, 120, 134, 120, - 120, 120, 120, 120, 136, 131, 134, 137, 138, 139, - - 135, 141, 137, 136, 143, 142, 144, 145, 146, 147, - 141, 142, 149, 148, 141, 144, 145, 143, 148, 151, - 150, 149, 152, 155, 153, 151, 154, 156, 145, 150, - 146, 157, 147, 153, 158, 154, 156, 152, 159, 160, - 161, 155, 162, 165, 166, 157, 159, 174, 168, 172, - 160, 179, 173, 213, 180, 161, 174, 158, 165, 506, - 213, 179, 177, 180, 166, 168, 162, 171, 171, 171, - 171, 181, 172, 171, 171, 173, 171, 171, 171, 171, - 171, 171, 175, 177, 183, 184, 186, 185, 189, 190, - 505, 175, 181, 175, 187, 188, 191, 175, 185, 175, - - 184, 192, 193, 187, 188, 186, 194, 183, 195, 196, - 192, 189, 190, 191, 198, 194, 199, 197, 200, 193, - 202, 195, 197, 201, 205, 199, 200, 196, 201, 203, - 222, 224, 289, 203, 202, 198, 207, 207, 207, 207, - 289, 223, 205, 207, 224, 222, 223, 208, 208, 207, - 208, 208, 208, 208, 209, 209, 209, 209, 210, 210, - 210, 210, 210, 211, 211, 211, 211, 211, 212, 214, - 215, 219, 220, 221, 225, 227, 228, 233, 219, 229, - 232, 228, 230, 231, 233, 212, 214, 215, 231, 232, - 227, 234, 236, 238, 237, 220, 221, 239, 229, 237, - - 240, 225, 238, 230, 243, 241, 250, 236, 242, 244, - 247, 248, 251, 260, 234, 504, 253, 256, 239, 241, - 254, 240, 243, 242, 244, 253, 248, 255, 247, 257, - 250, 258, 259, 254, 255, 251, 260, 256, 257, 261, - 258, 259, 262, 264, 263, 267, 266, 270, 272, 261, - 264, 262, 257, 263, 258, 266, 270, 273, 274, 272, - 267, 275, 276, 277, 278, 279, 275, 273, 280, 282, - 285, 274, 284, 288, 291, 292, 279, 295, 288, 276, - 292, 291, 284, 285, 277, 278, 286, 286, 286, 286, - 293, 294, 282, 296, 284, 280, 294, 293, 295, 296, - - 297, 298, 299, 301, 300, 302, 303, 305, 307, 308, - 310, 299, 309, 303, 305, 311, 312, 307, 314, 297, - 298, 300, 302, 316, 308, 312, 301, 315, 309, 317, - 316, 318, 311, 310, 319, 314, 315, 321, 317, 322, - 318, 330, 331, 319, 334, 333, 339, 340, 342, 335, - 343, 341, 331, 345, 340, 321, 330, 333, 335, 341, - 346, 343, 322, 347, 348, 349, 351, 334, 347, 339, - 354, 342, 353, 346, 355, 356, 345, 354, 357, 351, - 358, 359, 349, 364, 356, 366, 363, 348, 368, 353, - 363, 363, 377, 378, 369, 392, 502, 368, 358, 359, - - 357, 366, 355, 369, 370, 372, 364, 380, 381, 370, - 378, 385, 372, 377, 386, 391, 380, 392, 381, 393, - 394, 395, 396, 398, 385, 401, 386, 393, 402, 403, - 391, 405, 404, 394, 406, 407, 408, 411, 395, 409, - 405, 398, 413, 406, 410, 396, 401, 404, 414, 402, - 418, 408, 407, 410, 409, 403, 415, 414, 416, 411, - 417, 415, 420, 416, 419, 421, 423, 413, 424, 417, - 425, 419, 426, 418, 428, 429, 421, 430, 431, 435, - 438, 426, 434, 437, 444, 420, 438, 431, 435, 428, - 423, 424, 429, 425, 436, 434, 440, 441, 437, 442, - - 430, 436, 441, 440, 447, 448, 449, 444, 450, 447, - 451, 452, 442, 450, 448, 453, 454, 455, 456, 457, - 458, 462, 453, 459, 457, 463, 451, 461, 459, 449, - 455, 464, 467, 456, 465, 458, 466, 462, 469, 454, - 452, 461, 470, 465, 463, 466, 471, 472, 473, 475, - 476, 470, 477, 478, 464, 467, 480, 481, 475, 485, - 483, 471, 472, 473, 484, 477, 481, 469, 486, 487, - 478, 484, 485, 476, 480, 483, 488, 489, 490, 491, - 494, 492, 493, 495, 497, 486, 501, 491, 492, 493, - 487, 507, 500, 501, 488, 503, 499, 498, 496, 490, - - 489, 497, 482, 479, 503, 474, 495, 468, 460, 494, - 446, 445, 507, 510, 510, 510, 510, 511, 511, 513, - 443, 513, 513, 439, 433, 432, 427, 422, 412, 400, - 399, 397, 390, 389, 388, 387, 384, 383, 382, 379, - 376, 375, 374, 373, 371, 367, 365, 362, 361, 360, - 352, 350, 344, 338, 337, 336, 332, 329, 328, 327, - 326, 325, 324, 323, 320, 313, 306, 304, 290, 287, - 283, 281, 271, 269, 268, 265, 249, 246, 245, 235, - 218, 217, 216, 204, 182, 178, 176, 170, 169, 167, - 164, 163, 140, 133, 129, 127, 125, 122, 118, 114, - - 100, 87, 59, 39, 37, 8, 7, 3, 509, 509, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509 + 17, 18, 19, 63, 54, 23, 23, 19, 66, 24, + 22, 19, 18, 21, 24, 19, 18, 19, 21, 22, + 19, 21, 24, 28, 25, 22, 27, 24, 21, 25, + 51, 34, 33, 66, 21, 28, 58, 33, 51, 31, + 34, 28, 25, 52, 31, 27, 36, 27, 25, 30, + 33, 35, 35, 30, 58, 36, 52, 31, 52, 30, + 31, 30, 30, 53, 56, 30, 30, 31, 530, 72, + 35, 53, 57, 55, 30, 56, 30, 30, 68, 30, + 32, 64, 72, 57, 32, 42, 42, 42, 42, 55, + 32, 61, 32, 43, 43, 43, 43, 32, 61, 32, + + 75, 32, 68, 85, 64, 32, 32, 44, 44, 44, + 44, 44, 45, 45, 45, 45, 45, 45, 47, 47, + 47, 47, 47, 75, 79, 47, 85, 116, 528, 116, + 79, 47, 48, 48, 48, 48, 48, 48, 49, 49, + 49, 49, 49, 60, 49, 49, 67, 49, 49, 49, + 49, 49, 49, 65, 69, 71, 70, 73, 60, 74, + 65, 67, 69, 70, 76, 60, 77, 78, 74, 81, + 71, 80, 65, 83, 81, 73, 82, 71, 84, 70, + 86, 83, 76, 91, 89, 77, 81, 90, 80, 78, + 78, 82, 78, 84, 80, 86, 87, 89, 92, 91, + + 90, 87, 93, 94, 95, 96, 91, 97, 98, 101, + 99, 95, 100, 105, 524, 97, 94, 98, 100, 95, + 96, 102, 101, 96, 104, 92, 96, 95, 99, 96, + 93, 106, 105, 107, 102, 108, 109, 104, 111, 140, + 113, 112, 102, 110, 113, 113, 107, 111, 104, 117, + 114, 110, 108, 112, 109, 115, 110, 113, 118, 106, + 115, 140, 129, 114, 110, 114, 522, 521, 133, 110, + 117, 121, 121, 121, 121, 122, 122, 122, 122, 118, + 129, 133, 122, 128, 135, 136, 131, 163, 122, 124, + 124, 124, 124, 124, 128, 131, 124, 137, 520, 135, + + 136, 163, 124, 125, 125, 139, 125, 125, 125, 125, + 125, 142, 141, 139, 143, 144, 142, 147, 146, 148, + 137, 141, 151, 147, 149, 150, 152, 146, 153, 143, + 144, 146, 148, 149, 150, 154, 155, 157, 156, 158, + 154, 159, 160, 157, 151, 155, 150, 156, 161, 152, + 159, 160, 155, 153, 158, 162, 164, 165, 166, 167, + 168, 171, 172, 174, 162, 165, 161, 178, 179, 166, + 207, 223, 181, 188, 167, 207, 171, 180, 223, 164, + 174, 181, 172, 184, 168, 177, 177, 177, 177, 188, + 178, 177, 177, 179, 177, 177, 177, 177, 177, 177, + + 180, 182, 187, 186, 184, 189, 191, 192, 193, 194, + 182, 187, 182, 186, 195, 196, 182, 197, 182, 193, + 198, 199, 192, 195, 196, 200, 189, 201, 194, 191, + 202, 206, 203, 204, 205, 208, 201, 215, 235, 209, + 197, 203, 200, 210, 199, 198, 204, 202, 209, 206, + 205, 210, 211, 212, 213, 215, 208, 211, 213, 217, + 217, 217, 217, 233, 238, 235, 217, 212, 233, 238, + 218, 218, 217, 218, 218, 218, 218, 219, 219, 219, + 219, 220, 220, 220, 220, 220, 221, 221, 221, 221, + 221, 222, 224, 225, 229, 230, 231, 232, 234, 236, + + 240, 229, 237, 239, 242, 245, 251, 243, 222, 224, + 225, 234, 232, 242, 243, 236, 248, 237, 230, 231, + 241, 240, 239, 250, 249, 241, 252, 251, 245, 249, + 253, 248, 250, 254, 255, 256, 259, 262, 260, 263, + 265, 273, 267, 269, 253, 518, 516, 252, 254, 265, + 256, 268, 255, 260, 259, 267, 270, 271, 268, 272, + 274, 262, 263, 269, 273, 270, 271, 275, 272, 277, + 274, 281, 287, 280, 278, 284, 275, 288, 277, 270, + 271, 278, 280, 287, 284, 289, 281, 288, 290, 291, + 293, 294, 295, 290, 296, 298, 301, 300, 289, 302, + + 302, 302, 302, 295, 311, 304, 291, 300, 305, 301, + 304, 293, 294, 307, 313, 314, 305, 308, 298, 300, + 307, 296, 308, 309, 310, 311, 312, 315, 316, 310, + 309, 317, 312, 313, 314, 318, 315, 319, 323, 321, + 324, 325, 326, 327, 319, 316, 321, 323, 337, 328, + 330, 338, 318, 331, 317, 324, 332, 325, 328, 333, + 327, 334, 331, 332, 335, 326, 337, 330, 333, 346, + 334, 347, 350, 335, 338, 349, 351, 355, 358, 356, + 357, 347, 359, 361, 346, 351, 356, 349, 357, 362, + 364, 363, 365, 359, 367, 350, 363, 369, 370, 371, + + 355, 358, 362, 372, 373, 370, 361, 367, 380, 365, + 374, 375, 372, 364, 369, 379, 382, 386, 388, 379, + 379, 384, 386, 393, 385, 388, 373, 371, 374, 375, + 384, 380, 382, 385, 394, 401, 396, 397, 402, 407, + 408, 409, 410, 411, 393, 396, 412, 397, 401, 409, + 402, 394, 414, 417, 407, 410, 418, 419, 420, 421, + 411, 423, 408, 422, 424, 425, 426, 427, 421, 412, + 414, 429, 422, 420, 417, 426, 430, 418, 423, 424, + 425, 431, 432, 419, 433, 430, 431, 432, 434, 427, + 435, 436, 437, 433, 439, 442, 429, 435, 440, 441, + + 444, 446, 445, 437, 442, 452, 515, 447, 451, 514, + 450, 434, 452, 453, 436, 444, 447, 451, 439, 445, + 454, 440, 441, 450, 446, 456, 454, 458, 453, 457, + 460, 463, 456, 464, 457, 465, 463, 468, 466, 467, + 458, 469, 464, 466, 470, 472, 471, 473, 469, 474, + 479, 475, 473, 460, 477, 467, 475, 478, 465, 471, + 472, 480, 481, 482, 474, 483, 468, 470, 477, 479, + 485, 481, 482, 478, 486, 487, 488, 489, 491, 492, + 493, 494, 496, 486, 480, 497, 499, 491, 483, 500, + 487, 488, 489, 493, 497, 501, 500, 502, 494, 485, + + 496, 499, 492, 503, 504, 505, 506, 507, 501, 508, + 509, 510, 511, 513, 502, 507, 508, 509, 517, 512, + 519, 523, 504, 498, 503, 517, 495, 506, 505, 519, + 513, 490, 484, 476, 462, 511, 461, 459, 455, 449, + 510, 448, 523, 526, 526, 526, 526, 527, 527, 529, + 443, 529, 529, 438, 428, 416, 415, 413, 406, 405, + 404, 403, 400, 399, 398, 395, 392, 391, 390, 389, + 387, 383, 381, 378, 377, 376, 368, 366, 360, 354, + 353, 352, 348, 345, 344, 343, 342, 341, 340, 339, + 336, 329, 322, 320, 306, 303, 299, 297, 292, 286, + + 285, 283, 282, 279, 276, 266, 261, 258, 257, 247, + 246, 244, 228, 227, 226, 214, 190, 185, 183, 176, + 175, 173, 170, 169, 145, 138, 134, 132, 130, 127, + 123, 119, 103, 88, 59, 39, 37, 8, 7, 3, + 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, + 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, + 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, + 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, + 525, 525, 525, 525 } ; static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; @@ -835,7 +854,7 @@ #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; -#line 1 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 1 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" #define INITIAL 0 /*===-- Lexer.l - Scanner for llvm assembly files --------------*- C++ -*--===// // @@ -850,7 +869,7 @@ // //===----------------------------------------------------------------------===*/ #define YY_NEVER_INTERACTIVE 1 -#line 28 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 28 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" #include "ParserInternals.h" #include "llvm/Module.h" #include @@ -865,8 +884,18 @@ yy_scan_string (str); } +// Construct a token value for a non-obsolete token #define RET_TOK(type, Enum, sym) \ - llvmAsmlval.type = Instruction::Enum; return sym + llvmAsmlval.type.opcode = Instruction::Enum; \ + llvmAsmlval.type.obsolete = false; \ + return sym + +// Construct a token value for an obsolete token +#define RET_TOK_OBSOLETE(type, Enum, sym) \ + llvmAsmlval.type.opcode = Instruction::Enum; \ + llvmAsmlval.type.obsolete = true; \ + return sym + namespace llvm { @@ -976,7 +1005,7 @@ /* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing * it to deal with 64 bit numbers. */ -#line 980 "Lexer.cpp" +#line 1009 "Lexer.cpp" /* Macros after this point can all be overridden by user definitions in * section 1. @@ -1124,13 +1153,13 @@ YY_DECL { register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; + register char *yy_cp = NULL, *yy_bp = NULL; register int yy_act; -#line 179 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 189 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" -#line 1134 "Lexer.cpp" +#line 1163 "Lexer.cpp" if ( yy_init ) { @@ -1178,14 +1207,14 @@ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 510 ) + if ( yy_current_state >= 526 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; *yy_state_ptr++ = yy_current_state; ++yy_cp; } - while ( yy_current_state != 509 ); + while ( yy_current_state != 525 ); yy_find_action: yy_current_state = *--yy_state_ptr; @@ -1223,516 +1252,546 @@ { /* beginning of action switch */ case 1: YY_RULE_SETUP -#line 181 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 191 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { /* Ignore comments for now */ } YY_BREAK case 2: YY_RULE_SETUP -#line 183 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 193 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return BEGINTOK; } YY_BREAK case 3: YY_RULE_SETUP -#line 184 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 194 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return ENDTOK; } YY_BREAK case 4: YY_RULE_SETUP -#line 185 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 195 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return TRUETOK; } YY_BREAK case 5: YY_RULE_SETUP -#line 186 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 196 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return FALSETOK; } YY_BREAK case 6: YY_RULE_SETUP -#line 187 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 197 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return DECLARE; } YY_BREAK case 7: YY_RULE_SETUP -#line 188 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 198 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return GLOBAL; } YY_BREAK case 8: YY_RULE_SETUP -#line 189 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 199 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return CONSTANT; } YY_BREAK case 9: YY_RULE_SETUP -#line 190 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 200 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return INTERNAL; } YY_BREAK case 10: YY_RULE_SETUP -#line 191 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 201 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return LINKONCE; } YY_BREAK case 11: YY_RULE_SETUP -#line 192 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 202 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return WEAK; } YY_BREAK case 12: YY_RULE_SETUP -#line 193 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 203 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return APPENDING; } YY_BREAK case 13: YY_RULE_SETUP -#line 194 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 204 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return DLLIMPORT; } YY_BREAK case 14: YY_RULE_SETUP -#line 195 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 205 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return DLLEXPORT; } YY_BREAK case 15: YY_RULE_SETUP -#line 196 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 206 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return EXTERN_WEAK; } YY_BREAK case 16: YY_RULE_SETUP -#line 197 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 207 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return EXTERNAL; } /* Deprecated, turn into external */ YY_BREAK case 17: YY_RULE_SETUP -#line 198 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 208 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return EXTERNAL; } YY_BREAK case 18: YY_RULE_SETUP -#line 199 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 209 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return IMPLEMENTATION; } YY_BREAK case 19: YY_RULE_SETUP -#line 200 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 210 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return ZEROINITIALIZER; } YY_BREAK case 20: YY_RULE_SETUP -#line 201 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 211 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return DOTDOTDOT; } YY_BREAK case 21: YY_RULE_SETUP -#line 202 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 212 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return UNDEF; } YY_BREAK case 22: YY_RULE_SETUP -#line 203 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 213 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return NULL_TOK; } YY_BREAK case 23: YY_RULE_SETUP -#line 204 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 214 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return TO; } YY_BREAK case 24: YY_RULE_SETUP -#line 205 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 215 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { RET_TOK(TermOpVal, Unwind, UNWIND); } YY_BREAK case 25: YY_RULE_SETUP -#line 206 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 216 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return NOT; } /* Deprecated, turned into XOR */ YY_BREAK case 26: YY_RULE_SETUP -#line 207 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 217 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return TAIL; } YY_BREAK case 27: YY_RULE_SETUP -#line 208 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 218 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return TARGET; } YY_BREAK case 28: YY_RULE_SETUP -#line 209 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 219 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return TRIPLE; } YY_BREAK case 29: YY_RULE_SETUP -#line 210 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 220 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return DEPLIBS; } YY_BREAK case 30: YY_RULE_SETUP -#line 211 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 221 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return ENDIAN; } YY_BREAK case 31: YY_RULE_SETUP -#line 212 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 222 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return POINTERSIZE; } YY_BREAK case 32: YY_RULE_SETUP -#line 213 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 223 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return DATALAYOUT; } YY_BREAK case 33: YY_RULE_SETUP -#line 214 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 224 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return LITTLE; } YY_BREAK case 34: YY_RULE_SETUP -#line 215 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 225 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return BIG; } YY_BREAK case 35: YY_RULE_SETUP -#line 216 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 226 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return VOLATILE; } YY_BREAK case 36: YY_RULE_SETUP -#line 217 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 227 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return ALIGN; } YY_BREAK case 37: YY_RULE_SETUP -#line 218 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 228 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return SECTION; } YY_BREAK case 38: YY_RULE_SETUP -#line 219 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 229 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return MODULE; } YY_BREAK case 39: YY_RULE_SETUP -#line 220 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 230 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return ASM_TOK; } YY_BREAK case 40: YY_RULE_SETUP -#line 221 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 231 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return SIDEEFFECT; } YY_BREAK case 41: YY_RULE_SETUP -#line 223 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 233 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return CC_TOK; } YY_BREAK case 42: YY_RULE_SETUP -#line 224 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 234 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return CCC_TOK; } YY_BREAK case 43: YY_RULE_SETUP -#line 225 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 235 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return CSRETCC_TOK; } YY_BREAK case 44: YY_RULE_SETUP -#line 226 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 236 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return FASTCC_TOK; } YY_BREAK case 45: YY_RULE_SETUP -#line 227 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 237 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return COLDCC_TOK; } YY_BREAK case 46: YY_RULE_SETUP -#line 228 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 238 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return X86_STDCALLCC_TOK; } YY_BREAK case 47: YY_RULE_SETUP -#line 229 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 239 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return X86_FASTCALLCC_TOK; } YY_BREAK case 48: YY_RULE_SETUP -#line 231 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 241 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::VoidTy ; return VOID; } YY_BREAK case 49: YY_RULE_SETUP -#line 232 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 242 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::BoolTy ; return BOOL; } YY_BREAK case 50: YY_RULE_SETUP -#line 233 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 243 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::SByteTy ; return SBYTE; } YY_BREAK case 51: YY_RULE_SETUP -#line 234 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 244 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::UByteTy ; return UBYTE; } YY_BREAK case 52: YY_RULE_SETUP -#line 235 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 245 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::ShortTy ; return SHORT; } YY_BREAK case 53: YY_RULE_SETUP -#line 236 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 246 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::UShortTy; return USHORT; } YY_BREAK case 54: YY_RULE_SETUP -#line 237 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 247 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::IntTy ; return INT; } YY_BREAK case 55: YY_RULE_SETUP -#line 238 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 248 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::UIntTy ; return UINT; } YY_BREAK case 56: YY_RULE_SETUP -#line 239 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 249 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::LongTy ; return LONG; } YY_BREAK case 57: YY_RULE_SETUP -#line 240 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 250 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::ULongTy ; return ULONG; } YY_BREAK case 58: YY_RULE_SETUP -#line 241 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 251 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::FloatTy ; return FLOAT; } YY_BREAK case 59: YY_RULE_SETUP -#line 242 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 252 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::DoubleTy; return DOUBLE; } YY_BREAK case 60: YY_RULE_SETUP -#line 243 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 253 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::LabelTy ; return LABEL; } YY_BREAK case 61: YY_RULE_SETUP -#line 244 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 254 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return TYPE; } YY_BREAK case 62: YY_RULE_SETUP -#line 245 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 255 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return OPAQUE; } YY_BREAK case 63: YY_RULE_SETUP -#line 247 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 257 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, Add, ADD); } YY_BREAK case 64: YY_RULE_SETUP -#line 248 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 258 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, Sub, SUB); } YY_BREAK case 65: YY_RULE_SETUP -#line 249 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 259 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, Mul, MUL); } YY_BREAK case 66: YY_RULE_SETUP -#line 250 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, Div, DIV); } +#line 260 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK_OBSOLETE(BinaryOpVal, UDiv, UDIV); } YY_BREAK case 67: YY_RULE_SETUP -#line 251 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, Rem, REM); } +#line 261 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, UDiv, UDIV); } YY_BREAK case 68: YY_RULE_SETUP -#line 252 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, And, AND); } +#line 262 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SDiv, SDIV); } YY_BREAK case 69: YY_RULE_SETUP -#line 253 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, Or , OR ); } +#line 263 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, FDiv, FDIV); } YY_BREAK case 70: YY_RULE_SETUP -#line 254 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, Xor, XOR); } +#line 264 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK_OBSOLETE(BinaryOpVal, URem, UREM); } YY_BREAK case 71: YY_RULE_SETUP -#line 255 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, SetNE, SETNE); } +#line 265 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, URem, UREM); } YY_BREAK case 72: YY_RULE_SETUP -#line 256 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, SetEQ, SETEQ); } +#line 266 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SRem, SREM); } YY_BREAK case 73: YY_RULE_SETUP -#line 257 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, SetLT, SETLT); } +#line 267 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, FRem, FREM); } YY_BREAK case 74: YY_RULE_SETUP -#line 258 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, SetGT, SETGT); } +#line 268 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, And, AND); } YY_BREAK case 75: YY_RULE_SETUP -#line 259 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, SetLE, SETLE); } +#line 269 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, Or , OR ); } YY_BREAK case 76: YY_RULE_SETUP -#line 260 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, SetGE, SETGE); } +#line 270 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, Xor, XOR); } YY_BREAK case 77: YY_RULE_SETUP -#line 262 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, PHI, PHI_TOK); } +#line 271 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SetNE, SETNE); } YY_BREAK case 78: YY_RULE_SETUP -#line 263 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, Call, CALL); } +#line 272 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SetEQ, SETEQ); } YY_BREAK case 79: YY_RULE_SETUP -#line 264 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, Cast, CAST); } +#line 273 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SetLT, SETLT); } YY_BREAK case 80: YY_RULE_SETUP -#line 265 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, Select, SELECT); } +#line 274 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SetGT, SETGT); } YY_BREAK case 81: YY_RULE_SETUP -#line 266 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, Shl, SHL); } +#line 275 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SetLE, SETLE); } YY_BREAK case 82: YY_RULE_SETUP -#line 267 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, Shr, SHR); } +#line 276 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SetGE, SETGE); } YY_BREAK case 83: YY_RULE_SETUP -#line 268 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ return VANEXT_old; } +#line 278 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, PHI, PHI_TOK); } YY_BREAK case 84: YY_RULE_SETUP -#line 269 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ return VAARG_old; } +#line 279 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, Call, CALL); } YY_BREAK case 85: YY_RULE_SETUP -#line 270 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, VAArg , VAARG); } +#line 280 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, Cast, CAST); } YY_BREAK case 86: YY_RULE_SETUP -#line 271 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(TermOpVal, Ret, RET); } +#line 281 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, Select, SELECT); } YY_BREAK case 87: YY_RULE_SETUP -#line 272 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(TermOpVal, Br, BR); } +#line 282 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, Shl, SHL); } YY_BREAK case 88: YY_RULE_SETUP -#line 273 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(TermOpVal, Switch, SWITCH); } +#line 283 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, Shr, SHR); } YY_BREAK case 89: YY_RULE_SETUP -#line 274 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(TermOpVal, Invoke, INVOKE); } +#line 284 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ return VANEXT_old; } YY_BREAK case 90: YY_RULE_SETUP -#line 275 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(TermOpVal, Unwind, UNWIND); } +#line 285 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ return VAARG_old; } YY_BREAK case 91: YY_RULE_SETUP -#line 276 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(TermOpVal, Unreachable, UNREACHABLE); } +#line 286 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, VAArg , VAARG); } YY_BREAK case 92: YY_RULE_SETUP -#line 278 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(MemOpVal, Malloc, MALLOC); } +#line 287 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(TermOpVal, Ret, RET); } YY_BREAK case 93: YY_RULE_SETUP -#line 279 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(MemOpVal, Alloca, ALLOCA); } +#line 288 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(TermOpVal, Br, BR); } YY_BREAK case 94: YY_RULE_SETUP -#line 280 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(MemOpVal, Free, FREE); } +#line 289 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(TermOpVal, Switch, SWITCH); } YY_BREAK case 95: YY_RULE_SETUP -#line 281 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(MemOpVal, Load, LOAD); } +#line 290 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(TermOpVal, Invoke, INVOKE); } YY_BREAK case 96: YY_RULE_SETUP -#line 282 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(MemOpVal, Store, STORE); } +#line 291 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(TermOpVal, Unwind, UNWIND); } YY_BREAK case 97: YY_RULE_SETUP -#line 283 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); } +#line 292 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(TermOpVal, Unreachable, UNREACHABLE); } YY_BREAK case 98: YY_RULE_SETUP -#line 285 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); } +#line 294 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(MemOpVal, Malloc, MALLOC); } YY_BREAK case 99: YY_RULE_SETUP -#line 286 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); } +#line 295 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(MemOpVal, Alloca, ALLOCA); } YY_BREAK case 100: YY_RULE_SETUP -#line 287 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); } +#line 296 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(MemOpVal, Free, FREE); } YY_BREAK case 101: YY_RULE_SETUP -#line 290 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 297 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(MemOpVal, Load, LOAD); } + YY_BREAK +case 102: +YY_RULE_SETUP +#line 298 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(MemOpVal, Store, STORE); } + YY_BREAK +case 103: +YY_RULE_SETUP +#line 299 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); } + YY_BREAK +case 104: +YY_RULE_SETUP +#line 301 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); } + YY_BREAK +case 105: +YY_RULE_SETUP +#line 302 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); } + YY_BREAK +case 106: +YY_RULE_SETUP +#line 303 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); } + YY_BREAK +case 107: +YY_RULE_SETUP +#line 306 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { UnEscapeLexed(yytext+1); llvmAsmlval.StrVal = strdup(yytext+1); // Skip % return VAR_ID; } YY_BREAK -case 102: +case 108: YY_RULE_SETUP -#line 295 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 311 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { yytext[strlen(yytext)-1] = 0; // nuke colon UnEscapeLexed(yytext); @@ -1740,9 +1799,9 @@ return LABELSTR; } YY_BREAK -case 103: +case 109: YY_RULE_SETUP -#line 301 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 317 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { yytext[strlen(yytext)-2] = 0; // nuke colon, end quote UnEscapeLexed(yytext+1); @@ -1750,9 +1809,9 @@ return LABELSTR; } YY_BREAK -case 104: +case 110: YY_RULE_SETUP -#line 308 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 324 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { // Note that we cannot unescape a string constant here! The // string constant might contain a \00 which would not be // understood by the string stuff. It is valid to make a @@ -1763,14 +1822,14 @@ return STRINGCONSTANT; } YY_BREAK -case 105: +case 111: YY_RULE_SETUP -#line 319 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 335 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { llvmAsmlval.UInt64Val = atoull(yytext); return EUINT64VAL; } YY_BREAK -case 106: +case 112: YY_RULE_SETUP -#line 320 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 336 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { uint64_t Val = atoull(yytext+1); // +1: we have bigger negative range @@ -1780,17 +1839,17 @@ return ESINT64VAL; } YY_BREAK -case 107: +case 113: YY_RULE_SETUP -#line 328 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 344 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { llvmAsmlval.UInt64Val = HexIntToVal(yytext+3); return yytext[0] == 's' ? ESINT64VAL : EUINT64VAL; } YY_BREAK -case 108: +case 114: YY_RULE_SETUP -#line 333 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 349 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { uint64_t Val = atoull(yytext+1); if ((unsigned)Val != Val) @@ -1799,9 +1858,9 @@ return UINTVAL; } YY_BREAK -case 109: +case 115: YY_RULE_SETUP -#line 340 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 356 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { uint64_t Val = atoull(yytext+2); // +1: we have bigger negative range @@ -1811,18 +1870,18 @@ return SINTVAL; } YY_BREAK -case 110: +case 116: YY_RULE_SETUP -#line 349 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 365 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { llvmAsmlval.FPVal = atof(yytext); return FPVAL; } YY_BREAK -case 111: +case 117: YY_RULE_SETUP -#line 350 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 366 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { llvmAsmlval.FPVal = HexToFP(yytext); return FPVAL; } YY_BREAK case YY_STATE_EOF(INITIAL): -#line 352 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 368 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { /* Make sure to free the internal buffers for flex when we are * done reading our input! @@ -1831,22 +1890,22 @@ return EOF; } YY_BREAK -case 112: +case 118: YY_RULE_SETUP -#line 360 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 376 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { /* Ignore whitespace */ } YY_BREAK -case 113: +case 119: YY_RULE_SETUP -#line 361 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 377 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" { return yytext[0]; } YY_BREAK -case 114: +case 120: YY_RULE_SETUP -#line 363 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 379 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 1850 "Lexer.cpp" +#line 1909 "Lexer.cpp" case YY_END_OF_BUFFER: { @@ -2133,7 +2192,7 @@ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 510 ) + if ( yy_current_state >= 526 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -2163,11 +2222,11 @@ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 510 ) + if ( yy_current_state >= 526 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 509); + yy_is_jam = (yy_current_state == 525); if ( ! yy_is_jam ) *yy_state_ptr++ = yy_current_state; @@ -2222,6 +2281,7 @@ #endif /* ifndef YY_NO_UNPUT */ +#ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput() #else @@ -2295,7 +2355,7 @@ return c; } - +#endif /* YY_NO_INPUT */ #ifdef YY_USE_PROTOS void yyrestart( FILE *input_file ) @@ -2406,11 +2466,6 @@ } -#ifndef YY_ALWAYS_INTERACTIVE -#ifndef YY_NEVER_INTERACTIVE -extern int isatty YY_PROTO(( int )); -#endif -#endif #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) @@ -2728,5 +2783,5 @@ return 0; } #endif -#line 363 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l" +#line 379 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l" Index: llvm/lib/AsmParser/Lexer.l.cvs diff -u llvm/lib/AsmParser/Lexer.l.cvs:1.9 llvm/lib/AsmParser/Lexer.l.cvs:1.10 --- llvm/lib/AsmParser/Lexer.l.cvs:1.9 Sun Oct 22 01:08:13 2006 +++ llvm/lib/AsmParser/Lexer.l.cvs Thu Nov 2 14:25:49 2006 @@ -39,8 +39,18 @@ yy_scan_string (str); } +// Construct a token value for a non-obsolete token #define RET_TOK(type, Enum, sym) \ - llvmAsmlval.type = Instruction::Enum; return sym + llvmAsmlval.type.opcode = Instruction::Enum; \ + llvmAsmlval.type.obsolete = false; \ + return sym + +// Construct a token value for an obsolete token +#define RET_TOK_OBSOLETE(type, Enum, sym) \ + llvmAsmlval.type.opcode = Instruction::Enum; \ + llvmAsmlval.type.obsolete = true; \ + return sym + namespace llvm { @@ -247,8 +257,14 @@ add { RET_TOK(BinaryOpVal, Add, ADD); } sub { RET_TOK(BinaryOpVal, Sub, SUB); } mul { RET_TOK(BinaryOpVal, Mul, MUL); } -div { RET_TOK(BinaryOpVal, Div, DIV); } -rem { RET_TOK(BinaryOpVal, Rem, REM); } +div { RET_TOK_OBSOLETE(BinaryOpVal, UDiv, UDIV); } +udiv { RET_TOK(BinaryOpVal, UDiv, UDIV); } +sdiv { RET_TOK(BinaryOpVal, SDiv, SDIV); } +fdiv { RET_TOK(BinaryOpVal, FDiv, FDIV); } +rem { RET_TOK_OBSOLETE(BinaryOpVal, URem, UREM); } +urem { RET_TOK(BinaryOpVal, URem, UREM); } +srem { RET_TOK(BinaryOpVal, SRem, SREM); } +frem { RET_TOK(BinaryOpVal, FRem, FREM); } and { RET_TOK(BinaryOpVal, And, AND); } or { RET_TOK(BinaryOpVal, Or , OR ); } xor { RET_TOK(BinaryOpVal, Xor, XOR); } Index: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.22 llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.23 --- llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.22 Thu Oct 26 01:15:43 2006 +++ llvm/lib/AsmParser/llvmAsmParser.cpp.cvs Thu Nov 2 14:25:49 2006 @@ -145,33 +145,35 @@ UDIV = 336, SDIV = 337, FDIV = 338, - REM = 339, - AND = 340, - OR = 341, - XOR = 342, - SETLE = 343, - SETGE = 344, - SETLT = 345, - SETGT = 346, - SETEQ = 347, - SETNE = 348, - MALLOC = 349, - ALLOCA = 350, - FREE = 351, - LOAD = 352, - STORE = 353, - GETELEMENTPTR = 354, - PHI_TOK = 355, - CAST = 356, - SELECT = 357, - SHL = 358, - SHR = 359, - VAARG = 360, - EXTRACTELEMENT = 361, - INSERTELEMENT = 362, - SHUFFLEVECTOR = 363, - VAARG_old = 364, - VANEXT_old = 365 + UREM = 339, + SREM = 340, + FREM = 341, + AND = 342, + OR = 343, + XOR = 344, + SETLE = 345, + SETGE = 346, + SETLT = 347, + SETGT = 348, + SETEQ = 349, + SETNE = 350, + MALLOC = 351, + ALLOCA = 352, + FREE = 353, + LOAD = 354, + STORE = 355, + GETELEMENTPTR = 356, + PHI_TOK = 357, + CAST = 358, + SELECT = 359, + SHL = 360, + SHR = 361, + VAARG = 362, + EXTRACTELEMENT = 363, + INSERTELEMENT = 364, + SHUFFLEVECTOR = 365, + VAARG_old = 366, + VANEXT_old = 367 }; #endif /* Tokens. */ @@ -256,39 +258,41 @@ #define UDIV 336 #define SDIV 337 #define FDIV 338 -#define REM 339 -#define AND 340 -#define OR 341 -#define XOR 342 -#define SETLE 343 -#define SETGE 344 -#define SETLT 345 -#define SETGT 346 -#define SETEQ 347 -#define SETNE 348 -#define MALLOC 349 -#define ALLOCA 350 -#define FREE 351 -#define LOAD 352 -#define STORE 353 -#define GETELEMENTPTR 354 -#define PHI_TOK 355 -#define CAST 356 -#define SELECT 357 -#define SHL 358 -#define SHR 359 -#define VAARG 360 -#define EXTRACTELEMENT 361 -#define INSERTELEMENT 362 -#define SHUFFLEVECTOR 363 -#define VAARG_old 364 -#define VANEXT_old 365 +#define UREM 339 +#define SREM 340 +#define FREM 341 +#define AND 342 +#define OR 343 +#define XOR 344 +#define SETLE 345 +#define SETGE 346 +#define SETLT 347 +#define SETGT 348 +#define SETEQ 349 +#define SETNE 350 +#define MALLOC 351 +#define ALLOCA 352 +#define FREE 353 +#define LOAD 354 +#define STORE 355 +#define GETELEMENTPTR 356 +#define PHI_TOK 357 +#define CAST 358 +#define SELECT 359 +#define SHL 360 +#define SHR 361 +#define VAARG 362 +#define EXTRACTELEMENT 363 +#define INSERTELEMENT 364 +#define SHUFFLEVECTOR 365 +#define VAARG_old 366 +#define VANEXT_old 367 /* Copy the first part of user declarations. */ -#line 14 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 14 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" #include "ParserInternals.h" #include "llvm/CallingConv.h" @@ -1114,7 +1118,7 @@ // Depending on the opcode .. switch (OI.opcode) { default: - GenerateError("Invalid Obsolete OpCode"); + GenerateError("Invalid obsolete opCode (check Lexer.l)"); break; case Instruction::UDiv: // Handle cases where the opcode needs to change @@ -1123,12 +1127,17 @@ else if (Ty->isSigned()) OI.opcode = Instruction::SDiv; break; + case Instruction::URem: + if (Ty->isFloatingPoint()) + OI.opcode = Instruction::FRem; + else if (Ty->isSigned()) + OI.opcode = Instruction::SRem; + break; } // Its not obsolete any more, we fixed it. OI.obsolete = false; } - - + // common code from the two 'RunVMAsmParser' functions static Module* RunParser(Module * M) { @@ -1305,7 +1314,7 @@ #endif #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 1011 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1016 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" typedef union YYSTYPE { llvm::Module *ModuleVal; llvm::Function *FunctionVal; @@ -1346,7 +1355,7 @@ llvm::Module::Endianness Endianness; } YYSTYPE; /* Line 196 of yacc.c. */ -#line 1350 "llvmAsmParser.tab.c" +#line 1359 "llvmAsmParser.tab.c" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 @@ -1358,7 +1367,7 @@ /* Line 219 of yacc.c. */ -#line 1362 "llvmAsmParser.tab.c" +#line 1371 "llvmAsmParser.tab.c" #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ @@ -1509,20 +1518,20 @@ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 4 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 1288 +#define YYLAST 1357 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 125 +#define YYNTOKENS 127 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 75 /* YYNRULES -- Number of rules. */ -#define YYNRULES 254 +#define YYNRULES 256 /* YYNRULES -- Number of states. */ -#define YYNSTATES 519 +#define YYNSTATES 521 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 365 +#define YYMAXUTOK 367 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -1534,15 +1543,15 @@ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 114, 115, 123, 2, 112, 2, 2, 2, 2, 2, + 116, 117, 125, 2, 114, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 119, 111, 120, 2, 2, 2, 2, 2, 2, 2, + 121, 113, 122, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 116, 113, 118, 2, 2, 2, 2, 2, 124, + 2, 118, 115, 120, 2, 2, 2, 2, 2, 126, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 117, 2, 2, 121, 2, 122, 2, 2, 2, 2, + 119, 2, 2, 123, 2, 124, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -1566,7 +1575,7 @@ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110 + 105, 106, 107, 108, 109, 110, 111, 112 }; #if YYDEBUG @@ -1577,148 +1586,148 @@ 0, 0, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, - 59, 61, 63, 65, 67, 69, 71, 74, 75, 77, - 79, 81, 83, 85, 87, 89, 90, 91, 93, 95, - 97, 99, 101, 103, 106, 107, 110, 111, 115, 118, - 119, 121, 122, 126, 128, 131, 133, 135, 137, 139, + 59, 61, 63, 65, 67, 69, 71, 73, 75, 78, + 79, 81, 83, 85, 87, 89, 91, 93, 94, 95, + 97, 99, 101, 103, 105, 107, 110, 111, 114, 115, + 119, 122, 123, 125, 126, 130, 132, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, - 161, 163, 165, 167, 169, 171, 173, 176, 181, 187, - 193, 197, 200, 203, 205, 209, 211, 215, 217, 218, - 223, 227, 231, 236, 241, 245, 248, 251, 254, 257, - 260, 263, 266, 269, 272, 275, 282, 288, 297, 304, - 311, 318, 325, 332, 341, 350, 354, 356, 358, 360, - 362, 365, 368, 373, 376, 378, 383, 386, 391, 392, - 400, 401, 409, 410, 418, 419, 427, 431, 436, 437, - 439, 441, 443, 447, 451, 455, 459, 463, 467, 469, - 470, 472, 474, 476, 477, 480, 484, 486, 488, 492, - 494, 495, 504, 506, 508, 512, 514, 516, 519, 520, - 522, 524, 525, 530, 531, 533, 535, 537, 539, 541, - 543, 545, 547, 549, 553, 555, 561, 563, 565, 567, - 569, 572, 575, 578, 582, 585, 586, 588, 591, 594, - 598, 608, 618, 627, 641, 643, 645, 652, 658, 661, - 668, 676, 678, 682, 684, 685, 688, 690, 696, 702, - 708, 711, 716, 721, 728, 733, 738, 743, 748, 755, - 762, 765, 773, 775, 778, 779, 781, 782, 786, 793, - 797, 804, 807, 812, 819 + 161, 163, 165, 167, 169, 171, 173, 175, 177, 180, + 185, 191, 197, 201, 204, 207, 209, 213, 215, 219, + 221, 222, 227, 231, 235, 240, 245, 249, 252, 255, + 258, 261, 264, 267, 270, 273, 276, 279, 286, 292, + 301, 308, 315, 322, 329, 336, 345, 354, 358, 360, + 362, 364, 366, 369, 372, 377, 380, 382, 387, 390, + 395, 396, 404, 405, 413, 414, 422, 423, 431, 435, + 440, 441, 443, 445, 447, 451, 455, 459, 463, 467, + 471, 473, 474, 476, 478, 480, 481, 484, 488, 490, + 492, 496, 498, 499, 508, 510, 512, 516, 518, 520, + 523, 524, 526, 528, 529, 534, 535, 537, 539, 541, + 543, 545, 547, 549, 551, 553, 557, 559, 565, 567, + 569, 571, 573, 576, 579, 582, 586, 589, 590, 592, + 595, 598, 602, 612, 622, 631, 645, 647, 649, 656, + 662, 665, 672, 680, 682, 686, 688, 689, 692, 694, + 700, 706, 712, 715, 720, 725, 732, 737, 742, 747, + 752, 759, 766, 769, 777, 779, 782, 783, 785, 786, + 790, 797, 801, 808, 811, 816, 823 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const short int yyrhs[] = { - 156, 0, -1, 5, -1, 6, -1, 3, -1, 4, + 158, 0, -1, 5, -1, 6, -1, 3, -1, 4, -1, 78, -1, 79, -1, 80, -1, 81, -1, 82, -1, 83, -1, 84, -1, 85, -1, 86, -1, 87, -1, 88, -1, 89, -1, 90, -1, 91, -1, 92, - -1, 93, -1, 103, -1, 104, -1, 16, -1, 14, - -1, 12, -1, 10, -1, 17, -1, 15, -1, 13, - -1, 11, -1, 132, -1, 133, -1, 18, -1, 19, - -1, 168, 111, -1, -1, 41, -1, 42, -1, 43, - -1, 44, -1, 45, -1, 46, -1, 47, -1, -1, - -1, 65, -1, 66, -1, 67, -1, 68, -1, 69, - -1, 70, -1, 64, 4, -1, -1, 57, 4, -1, - -1, 112, 57, 4, -1, 34, 24, -1, -1, 141, - -1, -1, 112, 144, 143, -1, 141, -1, 57, 4, - -1, 147, -1, 8, -1, 149, -1, 8, -1, 149, - -1, 9, -1, 10, -1, 11, -1, 12, -1, 13, - -1, 14, -1, 15, -1, 16, -1, 17, -1, 18, - -1, 19, -1, 20, -1, 21, -1, 48, -1, 148, - -1, 183, -1, 113, 4, -1, 146, 114, 151, 115, - -1, 116, 4, 117, 149, 118, -1, 119, 4, 117, - 149, 120, -1, 121, 150, 122, -1, 121, 122, -1, - 149, 123, -1, 149, -1, 150, 112, 149, -1, 150, - -1, 150, 112, 37, -1, 37, -1, -1, 147, 116, - 154, 118, -1, 147, 116, 118, -1, 147, 124, 24, - -1, 147, 119, 154, 120, -1, 147, 121, 154, 122, - -1, 147, 121, 122, -1, 147, 38, -1, 147, 39, - -1, 147, 183, -1, 147, 153, -1, 147, 26, -1, - 132, 127, -1, 133, 4, -1, 9, 27, -1, 9, - 28, -1, 135, 7, -1, 101, 114, 152, 36, 147, - 115, -1, 99, 114, 152, 197, 115, -1, 102, 114, - 152, 112, 152, 112, 152, 115, -1, 128, 114, 152, - 112, 152, 115, -1, 129, 114, 152, 112, 152, 115, - -1, 130, 114, 152, 112, 152, 115, -1, 131, 114, - 152, 112, 152, 115, -1, 106, 114, 152, 112, 152, - 115, -1, 107, 114, 152, 112, 152, 112, 152, 115, - -1, 108, 114, 152, 112, 152, 112, 152, 115, -1, - 154, 112, 152, -1, 152, -1, 32, -1, 33, -1, - 157, -1, 157, 177, -1, 157, 179, -1, 157, 62, - 61, 163, -1, 157, 25, -1, 158, -1, 158, 136, - 20, 145, -1, 158, 179, -1, 158, 62, 61, 163, - -1, -1, 158, 136, 137, 155, 152, 159, 143, -1, - -1, 158, 136, 50, 155, 147, 160, 143, -1, -1, - 158, 136, 45, 155, 147, 161, 143, -1, -1, 158, - 136, 47, 155, 147, 162, 143, -1, 158, 51, 165, - -1, 158, 58, 111, 166, -1, -1, 24, -1, 56, - -1, 55, -1, 53, 111, 164, -1, 54, 111, 4, - -1, 52, 111, 24, -1, 71, 111, 24, -1, 116, - 167, 118, -1, 167, 112, 24, -1, 24, -1, -1, - 22, -1, 24, -1, 168, -1, -1, 147, 169, -1, - 171, 112, 170, -1, 170, -1, 171, -1, 171, 112, - 37, -1, 37, -1, -1, 138, 145, 168, 114, 172, - 115, 142, 139, -1, 29, -1, 121, -1, 137, 173, - 174, -1, 30, -1, 122, -1, 186, 176, -1, -1, - 45, -1, 47, -1, -1, 31, 180, 178, 173, -1, - -1, 63, -1, 3, -1, 4, -1, 7, -1, 27, - -1, 28, -1, 38, -1, 39, -1, 26, -1, 119, - 154, 120, -1, 153, -1, 61, 181, 24, 112, 24, - -1, 126, -1, 168, -1, 183, -1, 182, -1, 147, - 184, -1, 186, 187, -1, 175, 187, -1, 188, 136, - 189, -1, 188, 191, -1, -1, 23, -1, 72, 185, - -1, 72, 8, -1, 73, 21, 184, -1, 73, 9, - 184, 112, 21, 184, 112, 21, 184, -1, 74, 134, - 184, 112, 21, 184, 116, 190, 118, -1, 74, 134, - 184, 112, 21, 184, 116, 118, -1, 75, 138, 145, - 184, 114, 194, 115, 36, 21, 184, 76, 21, 184, - -1, 76, -1, 77, -1, 190, 134, 182, 112, 21, - 184, -1, 134, 182, 112, 21, 184, -1, 136, 196, - -1, 147, 116, 184, 112, 184, 118, -1, 192, 112, - 116, 184, 112, 184, 118, -1, 185, -1, 193, 112, - 185, -1, 193, -1, -1, 60, 59, -1, 59, -1, - 128, 147, 184, 112, 184, -1, 129, 147, 184, 112, - 184, -1, 130, 147, 184, 112, 184, -1, 49, 185, - -1, 131, 185, 112, 185, -1, 101, 185, 36, 147, - -1, 102, 185, 112, 185, 112, 185, -1, 105, 185, - 112, 147, -1, 109, 185, 112, 147, -1, 110, 185, - 112, 147, -1, 106, 185, 112, 185, -1, 107, 185, - 112, 185, 112, 185, -1, 108, 185, 112, 185, 112, - 185, -1, 100, 192, -1, 195, 138, 145, 184, 114, - 194, 115, -1, 199, -1, 112, 193, -1, -1, 35, - -1, -1, 94, 147, 140, -1, 94, 147, 112, 15, - 184, 140, -1, 95, 147, 140, -1, 95, 147, 112, - 15, 184, 140, -1, 96, 185, -1, 198, 97, 147, - 184, -1, 198, 98, 185, 112, 147, 184, -1, 99, - 147, 184, 197, -1 + -1, 93, -1, 94, -1, 95, -1, 105, -1, 106, + -1, 16, -1, 14, -1, 12, -1, 10, -1, 17, + -1, 15, -1, 13, -1, 11, -1, 134, -1, 135, + -1, 18, -1, 19, -1, 170, 113, -1, -1, 41, + -1, 42, -1, 43, -1, 44, -1, 45, -1, 46, + -1, 47, -1, -1, -1, 65, -1, 66, -1, 67, + -1, 68, -1, 69, -1, 70, -1, 64, 4, -1, + -1, 57, 4, -1, -1, 114, 57, 4, -1, 34, + 24, -1, -1, 143, -1, -1, 114, 146, 145, -1, + 143, -1, 57, 4, -1, 149, -1, 8, -1, 151, + -1, 8, -1, 151, -1, 9, -1, 10, -1, 11, + -1, 12, -1, 13, -1, 14, -1, 15, -1, 16, + -1, 17, -1, 18, -1, 19, -1, 20, -1, 21, + -1, 48, -1, 150, -1, 185, -1, 115, 4, -1, + 148, 116, 153, 117, -1, 118, 4, 119, 151, 120, + -1, 121, 4, 119, 151, 122, -1, 123, 152, 124, + -1, 123, 124, -1, 151, 125, -1, 151, -1, 152, + 114, 151, -1, 152, -1, 152, 114, 37, -1, 37, + -1, -1, 149, 118, 156, 120, -1, 149, 118, 120, + -1, 149, 126, 24, -1, 149, 121, 156, 122, -1, + 149, 123, 156, 124, -1, 149, 123, 124, -1, 149, + 38, -1, 149, 39, -1, 149, 185, -1, 149, 155, + -1, 149, 26, -1, 134, 129, -1, 135, 4, -1, + 9, 27, -1, 9, 28, -1, 137, 7, -1, 103, + 116, 154, 36, 149, 117, -1, 101, 116, 154, 199, + 117, -1, 104, 116, 154, 114, 154, 114, 154, 117, + -1, 130, 116, 154, 114, 154, 117, -1, 131, 116, + 154, 114, 154, 117, -1, 132, 116, 154, 114, 154, + 117, -1, 133, 116, 154, 114, 154, 117, -1, 108, + 116, 154, 114, 154, 117, -1, 109, 116, 154, 114, + 154, 114, 154, 117, -1, 110, 116, 154, 114, 154, + 114, 154, 117, -1, 156, 114, 154, -1, 154, -1, + 32, -1, 33, -1, 159, -1, 159, 179, -1, 159, + 181, -1, 159, 62, 61, 165, -1, 159, 25, -1, + 160, -1, 160, 138, 20, 147, -1, 160, 181, -1, + 160, 62, 61, 165, -1, -1, 160, 138, 139, 157, + 154, 161, 145, -1, -1, 160, 138, 50, 157, 149, + 162, 145, -1, -1, 160, 138, 45, 157, 149, 163, + 145, -1, -1, 160, 138, 47, 157, 149, 164, 145, + -1, 160, 51, 167, -1, 160, 58, 113, 168, -1, + -1, 24, -1, 56, -1, 55, -1, 53, 113, 166, + -1, 54, 113, 4, -1, 52, 113, 24, -1, 71, + 113, 24, -1, 118, 169, 120, -1, 169, 114, 24, + -1, 24, -1, -1, 22, -1, 24, -1, 170, -1, + -1, 149, 171, -1, 173, 114, 172, -1, 172, -1, + 173, -1, 173, 114, 37, -1, 37, -1, -1, 140, + 147, 170, 116, 174, 117, 144, 141, -1, 29, -1, + 123, -1, 139, 175, 176, -1, 30, -1, 124, -1, + 188, 178, -1, -1, 45, -1, 47, -1, -1, 31, + 182, 180, 175, -1, -1, 63, -1, 3, -1, 4, + -1, 7, -1, 27, -1, 28, -1, 38, -1, 39, + -1, 26, -1, 121, 156, 122, -1, 155, -1, 61, + 183, 24, 114, 24, -1, 128, -1, 170, -1, 185, + -1, 184, -1, 149, 186, -1, 188, 189, -1, 177, + 189, -1, 190, 138, 191, -1, 190, 193, -1, -1, + 23, -1, 72, 187, -1, 72, 8, -1, 73, 21, + 186, -1, 73, 9, 186, 114, 21, 186, 114, 21, + 186, -1, 74, 136, 186, 114, 21, 186, 118, 192, + 120, -1, 74, 136, 186, 114, 21, 186, 118, 120, + -1, 75, 140, 147, 186, 116, 196, 117, 36, 21, + 186, 76, 21, 186, -1, 76, -1, 77, -1, 192, + 136, 184, 114, 21, 186, -1, 136, 184, 114, 21, + 186, -1, 138, 198, -1, 149, 118, 186, 114, 186, + 120, -1, 194, 114, 118, 186, 114, 186, 120, -1, + 187, -1, 195, 114, 187, -1, 195, -1, -1, 60, + 59, -1, 59, -1, 130, 149, 186, 114, 186, -1, + 131, 149, 186, 114, 186, -1, 132, 149, 186, 114, + 186, -1, 49, 187, -1, 133, 187, 114, 187, -1, + 103, 187, 36, 149, -1, 104, 187, 114, 187, 114, + 187, -1, 107, 187, 114, 149, -1, 111, 187, 114, + 149, -1, 112, 187, 114, 149, -1, 108, 187, 114, + 187, -1, 109, 187, 114, 187, 114, 187, -1, 110, + 187, 114, 187, 114, 187, -1, 102, 194, -1, 197, + 140, 147, 186, 116, 196, 117, -1, 201, -1, 114, + 195, -1, -1, 35, -1, -1, 96, 149, 142, -1, + 96, 149, 114, 15, 186, 142, -1, 97, 149, 142, + -1, 97, 149, 114, 15, 186, 142, -1, 98, 187, + -1, 200, 99, 149, 186, -1, 200, 100, 187, 114, + 149, 186, -1, 101, 149, 186, 199, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const unsigned short int yyrline[] = { - 0, 1134, 1134, 1135, 1143, 1144, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1155, 1155, 1155, 1156, 1156, 1156, 1156, - 1156, 1156, 1158, 1158, 1162, 1162, 1162, 1162, 1163, 1163, - 1163, 1163, 1164, 1164, 1165, 1165, 1168, 1172, 1177, 1178, - 1179, 1180, 1181, 1182, 1183, 1184, 1186, 1187, 1188, 1189, - 1190, 1191, 1192, 1193, 1202, 1203, 1209, 1210, 1218, 1226, - 1227, 1232, 1233, 1234, 1239, 1253, 1253, 1254, 1254, 1256, - 1266, 1266, 1266, 1266, 1266, 1266, 1266, 1267, 1267, 1267, - 1267, 1267, 1267, 1268, 1272, 1276, 1284, 1292, 1305, 1310, - 1322, 1332, 1336, 1347, 1352, 1358, 1359, 1363, 1367, 1378, - 1404, 1418, 1448, 1474, 1495, 1508, 1518, 1523, 1584, 1591, - 1600, 1606, 1612, 1616, 1620, 1628, 1639, 1671, 1679, 1706, - 1717, 1723, 1731, 1737, 1743, 1752, 1756, 1764, 1764, 1774, - 1782, 1787, 1791, 1795, 1799, 1814, 1836, 1839, 1842, 1842, - 1850, 1850, 1858, 1858, 1866, 1866, 1875, 1878, 1881, 1885, - 1898, 1899, 1901, 1905, 1914, 1918, 1923, 1925, 1930, 1935, - 1944, 1944, 1945, 1945, 1947, 1954, 1960, 1967, 1971, 1977, - 1982, 1987, 2082, 2082, 2084, 2092, 2092, 2094, 2099, 2100, - 2101, 2103, 2103, 2113, 2117, 2122, 2126, 2130, 2134, 2138, - 2142, 2146, 2150, 2154, 2179, 2183, 2197, 2201, 2207, 2207, - 2213, 2218, 2222, 2231, 2242, 2247, 2259, 2272, 2276, 2280, - 2285, 2294, 2313, 2322, 2378, 2382, 2389, 2400, 2413, 2422, - 2431, 2441, 2445, 2452, 2452, 2454, 2458, 2463, 2482, 2497, - 2511, 2524, 2532, 2540, 2548, 2554, 2574, 2597, 2603, 2609, - 2615, 2630, 2689, 2696, 2699, 2704, 2708, 2715, 2720, 2726, - 2731, 2737, 2745, 2757, 2772 + 0, 1139, 1139, 1140, 1148, 1149, 1159, 1159, 1159, 1159, + 1159, 1159, 1159, 1159, 1159, 1160, 1160, 1160, 1161, 1161, + 1161, 1161, 1161, 1161, 1163, 1163, 1167, 1167, 1167, 1167, + 1168, 1168, 1168, 1168, 1169, 1169, 1170, 1170, 1173, 1177, + 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1191, 1192, + 1193, 1194, 1195, 1196, 1197, 1198, 1207, 1208, 1214, 1215, + 1223, 1231, 1232, 1237, 1238, 1239, 1244, 1258, 1258, 1259, + 1259, 1261, 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1272, + 1272, 1272, 1272, 1272, 1272, 1273, 1277, 1281, 1289, 1297, + 1310, 1315, 1327, 1337, 1341, 1352, 1357, 1363, 1364, 1368, + 1372, 1383, 1409, 1423, 1453, 1479, 1500, 1513, 1523, 1528, + 1589, 1596, 1605, 1611, 1617, 1621, 1625, 1633, 1644, 1676, + 1684, 1711, 1722, 1728, 1736, 1742, 1748, 1757, 1761, 1769, + 1769, 1779, 1787, 1792, 1796, 1800, 1804, 1819, 1841, 1844, + 1847, 1847, 1855, 1855, 1863, 1863, 1871, 1871, 1880, 1883, + 1886, 1890, 1903, 1904, 1906, 1910, 1919, 1923, 1928, 1930, + 1935, 1940, 1949, 1949, 1950, 1950, 1952, 1959, 1965, 1972, + 1976, 1982, 1987, 1992, 2087, 2087, 2089, 2097, 2097, 2099, + 2104, 2105, 2106, 2108, 2108, 2118, 2122, 2127, 2131, 2135, + 2139, 2143, 2147, 2151, 2155, 2159, 2184, 2188, 2202, 2206, + 2212, 2212, 2218, 2223, 2227, 2236, 2247, 2252, 2264, 2277, + 2281, 2285, 2290, 2299, 2318, 2327, 2383, 2387, 2394, 2405, + 2418, 2427, 2436, 2446, 2450, 2457, 2457, 2459, 2463, 2468, + 2490, 2505, 2519, 2532, 2540, 2548, 2556, 2562, 2582, 2605, + 2611, 2617, 2623, 2638, 2697, 2704, 2707, 2712, 2716, 2723, + 2728, 2734, 2739, 2745, 2753, 2765, 2780 }; #endif @@ -1740,27 +1749,28 @@ "SIDEEFFECT", "CC_TOK", "CCC_TOK", "CSRETCC_TOK", "FASTCC_TOK", "COLDCC_TOK", "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT", "RET", "BR", "SWITCH", "INVOKE", "UNWIND", "UNREACHABLE", "ADD", "SUB", - "MUL", "UDIV", "SDIV", "FDIV", "REM", "AND", "OR", "XOR", "SETLE", - "SETGE", "SETLT", "SETGT", "SETEQ", "SETNE", "MALLOC", "ALLOCA", "FREE", - "LOAD", "STORE", "GETELEMENTPTR", "PHI_TOK", "CAST", "SELECT", "SHL", - "SHR", "VAARG", "EXTRACTELEMENT", "INSERTELEMENT", "SHUFFLEVECTOR", - "VAARG_old", "VANEXT_old", "'='", "','", "'\\\\'", "'('", "')'", "'['", - "'x'", "']'", "'<'", "'>'", "'{'", "'}'", "'*'", "'c'", "$accept", - "INTVAL", "EINT64VAL", "ArithmeticOps", "LogicalOps", "SetCondOps", - "ShiftOps", "SIntType", "UIntType", "IntType", "FPType", "OptAssign", - "OptLinkage", "OptCallingConv", "OptAlign", "OptCAlign", "SectionString", - "OptSection", "GlobalVarAttributes", "GlobalVarAttribute", "TypesV", - "UpRTypesV", "Types", "PrimType", "UpRTypes", "TypeListI", - "ArgTypeListI", "ConstVal", "ConstExpr", "ConstVector", "GlobalType", - "Module", "FunctionList", "ConstPool", "@1", "@2", "@3", "@4", - "AsmBlock", "BigOrLittle", "TargetDefinition", "LibrariesDefinition", - "LibList", "Name", "OptName", "ArgVal", "ArgListH", "ArgList", - "FunctionHeaderH", "BEGIN", "FunctionHeader", "END", "Function", - "FnDeclareLinkage", "FunctionProto", "@5", "OptSideEffect", - "ConstValueRef", "SymbolicValueRef", "ValueRef", "ResolvedVal", - "BasicBlockList", "BasicBlock", "InstructionList", "BBTerminatorInst", - "JumpTable", "Inst", "PHIList", "ValueRefList", "ValueRefListE", - "OptTailCall", "InstVal", "IndexList", "OptVolatile", "MemoryInst", 0 + "MUL", "UDIV", "SDIV", "FDIV", "UREM", "SREM", "FREM", "AND", "OR", + "XOR", "SETLE", "SETGE", "SETLT", "SETGT", "SETEQ", "SETNE", "MALLOC", + "ALLOCA", "FREE", "LOAD", "STORE", "GETELEMENTPTR", "PHI_TOK", "CAST", + "SELECT", "SHL", "SHR", "VAARG", "EXTRACTELEMENT", "INSERTELEMENT", + "SHUFFLEVECTOR", "VAARG_old", "VANEXT_old", "'='", "','", "'\\\\'", + "'('", "')'", "'['", "'x'", "']'", "'<'", "'>'", "'{'", "'}'", "'*'", + "'c'", "$accept", "INTVAL", "EINT64VAL", "ArithmeticOps", "LogicalOps", + "SetCondOps", "ShiftOps", "SIntType", "UIntType", "IntType", "FPType", + "OptAssign", "OptLinkage", "OptCallingConv", "OptAlign", "OptCAlign", + "SectionString", "OptSection", "GlobalVarAttributes", + "GlobalVarAttribute", "TypesV", "UpRTypesV", "Types", "PrimType", + "UpRTypes", "TypeListI", "ArgTypeListI", "ConstVal", "ConstExpr", + "ConstVector", "GlobalType", "Module", "FunctionList", "ConstPool", "@1", + "@2", "@3", "@4", "AsmBlock", "BigOrLittle", "TargetDefinition", + "LibrariesDefinition", "LibList", "Name", "OptName", "ArgVal", + "ArgListH", "ArgList", "FunctionHeaderH", "BEGIN", "FunctionHeader", + "END", "Function", "FnDeclareLinkage", "FunctionProto", "@5", + "OptSideEffect", "ConstValueRef", "SymbolicValueRef", "ValueRef", + "ResolvedVal", "BasicBlockList", "BasicBlock", "InstructionList", + "BBTerminatorInst", "JumpTable", "Inst", "PHIList", "ValueRefList", + "ValueRefListE", "OptTailCall", "InstVal", "IndexList", "OptVolatile", + "MemoryInst", 0 }; #endif @@ -1780,40 +1790,40 @@ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, - 365, 61, 44, 92, 40, 41, 91, 120, 93, 60, - 62, 123, 125, 42, 99 + 365, 366, 367, 61, 44, 92, 40, 41, 91, 120, + 93, 60, 62, 123, 125, 42, 99 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const unsigned char yyr1[] = { - 0, 125, 126, 126, 127, 127, 128, 128, 128, 128, - 128, 128, 128, 129, 129, 129, 130, 130, 130, 130, - 130, 130, 131, 131, 132, 132, 132, 132, 133, 133, - 133, 133, 134, 134, 135, 135, 136, 136, 137, 137, - 137, 137, 137, 137, 137, 137, 138, 138, 138, 138, - 138, 138, 138, 138, 139, 139, 140, 140, 141, 142, - 142, 143, 143, 144, 144, 145, 145, 146, 146, 147, - 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 149, 149, 149, 149, 149, 149, 149, - 149, 149, 149, 150, 150, 151, 151, 151, 151, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 154, 154, 155, 155, 156, - 157, 157, 157, 157, 157, 158, 158, 158, 159, 158, - 160, 158, 161, 158, 162, 158, 158, 158, 158, 163, - 164, 164, 165, 165, 165, 165, 166, 167, 167, 167, - 168, 168, 169, 169, 170, 171, 171, 172, 172, 172, - 172, 173, 174, 174, 175, 176, 176, 177, 178, 178, - 178, 180, 179, 181, 181, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 183, 183, 184, 184, - 185, 186, 186, 187, 188, 188, 188, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 190, 190, 191, 192, - 192, 193, 193, 194, 194, 195, 195, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 197, 197, 198, 198, 199, 199, 199, - 199, 199, 199, 199, 199 + 0, 127, 128, 128, 129, 129, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 131, 131, 131, 132, 132, + 132, 132, 132, 132, 133, 133, 134, 134, 134, 134, + 135, 135, 135, 135, 136, 136, 137, 137, 138, 138, + 139, 139, 139, 139, 139, 139, 139, 139, 140, 140, + 140, 140, 140, 140, 140, 140, 141, 141, 142, 142, + 143, 144, 144, 145, 145, 146, 146, 147, 147, 148, + 148, 149, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 152, 152, 153, 153, 153, + 153, 154, 154, 154, 154, 154, 154, 154, 154, 154, + 154, 154, 154, 154, 154, 154, 154, 155, 155, 155, + 155, 155, 155, 155, 155, 155, 155, 156, 156, 157, + 157, 158, 159, 159, 159, 159, 159, 160, 160, 160, + 161, 160, 162, 160, 163, 160, 164, 160, 160, 160, + 160, 165, 166, 166, 167, 167, 167, 167, 168, 169, + 169, 169, 170, 170, 171, 171, 172, 173, 173, 174, + 174, 174, 174, 175, 176, 176, 177, 178, 178, 179, + 180, 180, 180, 182, 181, 183, 183, 184, 184, 184, + 184, 184, 184, 184, 184, 184, 184, 184, 185, 185, + 186, 186, 187, 188, 188, 189, 190, 190, 190, 191, + 191, 191, 191, 191, 191, 191, 191, 191, 192, 192, + 193, 194, 194, 195, 195, 196, 196, 197, 197, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 199, 199, 200, 200, 201, + 201, 201, 201, 201, 201, 201, 201 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -1822,502 +1832,519 @@ 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, - 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, - 1, 1, 1, 2, 0, 2, 0, 3, 2, 0, - 1, 0, 3, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, + 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, + 1, 1, 1, 1, 1, 2, 0, 2, 0, 3, + 2, 0, 1, 0, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 4, 5, 5, - 3, 2, 2, 1, 3, 1, 3, 1, 0, 4, - 3, 3, 4, 4, 3, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 6, 5, 8, 6, 6, - 6, 6, 6, 8, 8, 3, 1, 1, 1, 1, - 2, 2, 4, 2, 1, 4, 2, 4, 0, 7, - 0, 7, 0, 7, 0, 7, 3, 4, 0, 1, - 1, 1, 3, 3, 3, 3, 3, 3, 1, 0, - 1, 1, 1, 0, 2, 3, 1, 1, 3, 1, - 0, 8, 1, 1, 3, 1, 1, 2, 0, 1, - 1, 0, 4, 0, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 1, 5, 1, 1, 1, 1, - 2, 2, 2, 3, 2, 0, 1, 2, 2, 3, - 9, 9, 8, 13, 1, 1, 6, 5, 2, 6, - 7, 1, 3, 1, 0, 2, 1, 5, 5, 5, - 2, 4, 4, 6, 4, 4, 4, 4, 6, 6, - 2, 7, 1, 2, 0, 1, 0, 3, 6, 3, - 6, 2, 4, 6, 4 + 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, + 5, 5, 3, 2, 2, 1, 3, 1, 3, 1, + 0, 4, 3, 3, 4, 4, 3, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 6, 5, 8, + 6, 6, 6, 6, 6, 8, 8, 3, 1, 1, + 1, 1, 2, 2, 4, 2, 1, 4, 2, 4, + 0, 7, 0, 7, 0, 7, 0, 7, 3, 4, + 0, 1, 1, 1, 3, 3, 3, 3, 3, 3, + 1, 0, 1, 1, 1, 0, 2, 3, 1, 1, + 3, 1, 0, 8, 1, 1, 3, 1, 1, 2, + 0, 1, 1, 0, 4, 0, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 1, 5, 1, 1, + 1, 1, 2, 2, 2, 3, 2, 0, 1, 2, + 2, 3, 9, 9, 8, 13, 1, 1, 6, 5, + 2, 6, 7, 1, 3, 1, 0, 2, 1, 5, + 5, 5, 2, 4, 4, 6, 4, 4, 4, 4, + 6, 6, 2, 7, 1, 2, 0, 1, 0, 3, + 6, 3, 6, 2, 4, 6, 4 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ -static const unsigned char yydefact[] = +static const unsigned short int yydefact[] = { - 148, 0, 45, 134, 1, 133, 181, 38, 39, 40, - 41, 42, 43, 44, 0, 46, 205, 130, 131, 205, - 160, 161, 0, 0, 0, 45, 0, 136, 178, 0, - 0, 47, 48, 49, 50, 51, 52, 0, 0, 206, - 202, 37, 175, 176, 177, 201, 0, 0, 0, 0, - 146, 0, 0, 0, 0, 0, 0, 0, 36, 179, - 180, 46, 149, 132, 53, 2, 3, 66, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 0, 0, 0, 0, 196, 0, 0, 65, - 84, 69, 197, 85, 172, 173, 174, 246, 204, 0, - 0, 0, 0, 159, 147, 137, 135, 127, 128, 0, - 0, 0, 0, 182, 86, 0, 0, 68, 91, 93, - 0, 0, 98, 92, 245, 0, 226, 0, 0, 0, - 0, 46, 214, 215, 6, 7, 8, 9, 10, 11, + 150, 0, 47, 136, 1, 135, 183, 40, 41, 42, + 43, 44, 45, 46, 0, 48, 207, 132, 133, 207, + 162, 163, 0, 0, 0, 47, 0, 138, 180, 0, + 0, 49, 50, 51, 52, 53, 54, 0, 0, 208, + 204, 39, 177, 178, 179, 203, 0, 0, 0, 0, + 148, 0, 0, 0, 0, 0, 0, 0, 38, 181, + 182, 48, 151, 134, 55, 2, 3, 68, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 0, 0, 0, 0, 198, 0, 0, 67, + 86, 71, 199, 87, 174, 175, 176, 248, 206, 0, + 0, 0, 0, 161, 149, 139, 137, 129, 130, 0, + 0, 0, 0, 184, 88, 0, 0, 70, 93, 95, + 0, 0, 100, 94, 247, 0, 228, 0, 0, 0, + 0, 48, 216, 217, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 0, 0, 0, 0, 0, 0, 0, 22, 23, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 203, - 46, 218, 0, 242, 154, 151, 150, 152, 153, 155, - 158, 0, 142, 144, 140, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 0, 0, 0, 0, - 138, 0, 0, 0, 90, 170, 97, 95, 0, 0, - 230, 225, 208, 207, 0, 0, 27, 31, 26, 30, - 25, 29, 24, 28, 32, 33, 0, 0, 56, 56, - 251, 0, 0, 240, 0, 0, 0, 0, 0, 0, + 22, 23, 0, 0, 0, 0, 0, 0, 0, 24, + 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 205, 48, 220, 0, 244, 156, 153, 152, 154, + 155, 157, 160, 0, 144, 146, 142, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 0, 0, + 0, 0, 140, 0, 0, 0, 92, 172, 99, 97, + 0, 0, 232, 227, 210, 209, 0, 0, 29, 33, + 28, 32, 27, 31, 26, 30, 34, 35, 0, 0, + 58, 58, 253, 0, 0, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 156, 61, 61, 61, 112, 113, 4, 5, 110, 111, - 114, 109, 105, 106, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 108, 107, - 61, 67, 67, 94, 169, 163, 166, 167, 0, 0, - 87, 185, 186, 187, 192, 188, 189, 190, 191, 183, - 0, 194, 199, 198, 200, 0, 209, 0, 0, 0, - 247, 0, 249, 244, 0, 0, 0, 0, 0, 0, + 0, 0, 158, 63, 63, 63, 114, 115, 4, 5, + 112, 113, 116, 111, 107, 108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 157, 0, 143, 145, 141, 0, 0, 0, 0, - 0, 0, 100, 126, 0, 0, 104, 0, 101, 0, - 0, 0, 0, 139, 88, 89, 162, 164, 0, 59, - 96, 184, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 254, 0, 0, 232, 0, 234, 237, 0, 0, - 235, 236, 0, 0, 0, 231, 0, 252, 0, 0, - 0, 63, 61, 244, 0, 0, 0, 0, 0, 0, - 99, 102, 103, 0, 0, 0, 0, 168, 165, 60, - 54, 0, 193, 0, 0, 224, 56, 57, 56, 221, - 243, 0, 0, 0, 0, 0, 227, 228, 229, 224, - 0, 58, 64, 62, 0, 0, 0, 0, 0, 0, - 125, 0, 0, 0, 0, 0, 171, 0, 0, 0, - 223, 0, 0, 248, 250, 0, 0, 0, 233, 238, - 239, 0, 253, 116, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 55, 195, 0, 0, 0, 222, 219, - 0, 241, 115, 0, 122, 0, 0, 118, 119, 120, - 121, 0, 212, 0, 0, 0, 220, 0, 0, 0, - 210, 0, 211, 0, 0, 117, 123, 124, 0, 0, - 0, 0, 0, 0, 217, 0, 0, 216, 213 + 110, 109, 63, 69, 69, 96, 171, 165, 168, 169, + 0, 0, 89, 187, 188, 189, 194, 190, 191, 192, + 193, 185, 0, 196, 201, 200, 202, 0, 211, 0, + 0, 0, 249, 0, 251, 246, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 159, 0, 145, 147, 143, 0, 0, + 0, 0, 0, 0, 102, 128, 0, 0, 106, 0, + 103, 0, 0, 0, 0, 141, 90, 91, 164, 166, + 0, 61, 98, 186, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 256, 0, 0, 234, 0, 236, 239, + 0, 0, 237, 238, 0, 0, 0, 233, 0, 254, + 0, 0, 0, 65, 63, 246, 0, 0, 0, 0, + 0, 0, 101, 104, 105, 0, 0, 0, 0, 170, + 167, 62, 56, 0, 195, 0, 0, 226, 58, 59, + 58, 223, 245, 0, 0, 0, 0, 0, 229, 230, + 231, 226, 0, 60, 66, 64, 0, 0, 0, 0, + 0, 0, 127, 0, 0, 0, 0, 0, 173, 0, + 0, 0, 225, 0, 0, 250, 252, 0, 0, 0, + 235, 240, 241, 0, 255, 118, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 57, 197, 0, 0, 0, + 224, 221, 0, 243, 117, 0, 124, 0, 0, 120, + 121, 122, 123, 0, 214, 0, 0, 0, 222, 0, + 0, 0, 212, 0, 213, 0, 0, 119, 125, 126, + 0, 0, 0, 0, 0, 0, 219, 0, 0, 218, + 215 }; /* YYDEFGOTO[NTERM-NUM]. */ static const short int yydefgoto[] = { - -1, 86, 258, 274, 275, 276, 277, 196, 197, 226, - 198, 25, 15, 37, 446, 310, 391, 410, 333, 392, - 87, 88, 199, 90, 91, 120, 208, 343, 301, 344, - 109, 1, 2, 3, 280, 253, 251, 252, 63, 177, - 50, 104, 181, 92, 357, 286, 287, 288, 38, 96, - 16, 44, 17, 61, 18, 28, 362, 302, 93, 304, - 419, 19, 40, 41, 169, 494, 98, 233, 450, 451, - 170, 171, 371, 172, 173 + -1, 86, 260, 276, 277, 278, 279, 198, 199, 228, + 200, 25, 15, 37, 448, 312, 393, 412, 335, 394, + 87, 88, 201, 90, 91, 120, 210, 345, 303, 346, + 109, 1, 2, 3, 282, 255, 253, 254, 63, 179, + 50, 104, 183, 92, 359, 288, 289, 290, 38, 96, + 16, 44, 17, 61, 18, 28, 364, 304, 93, 306, + 421, 19, 40, 41, 171, 496, 98, 235, 452, 453, + 172, 173, 373, 174, 175 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -463 +#define YYPACT_NINF -447 static const short int yypact[] = { - -463, 42, 182, 621, -463, -463, -463, -463, -463, -463, - -463, -463, -463, -463, -15, 347, 64, -463, -463, -12, - -463, -463, 15, 1, 33, 360, 10, -463, 89, 114, - 140, -463, -463, -463, -463, -463, -463, 1005, -1, -463, - -463, 115, -463, -463, -463, -463, 40, 56, 67, 68, - -463, 59, 114, 1005, 51, 51, 51, 51, -463, -463, - -463, 347, -463, -463, -463, -463, -463, 66, -463, -463, - -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, - -463, -463, 172, 177, 180, 489, -463, 115, 74, -463, - -463, -97, -463, -463, -463, -463, -463, 1178, -463, 165, - -17, 188, 170, 171, -463, -463, -463, -463, -463, 1046, - 1046, 1046, 1087, -463, -463, 80, 81, -463, -463, -97, - -91, 85, 838, -463, -463, 1046, -463, 142, 1128, 6, - 248, 347, -463, -463, -463, -463, -463, -463, -463, -463, - -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, - 1046, 1046, 1046, 1046, 1046, 1046, 1046, -463, -463, 1046, - 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, -463, - 347, -463, 35, -463, -463, -463, -463, -463, -463, -463, - -463, -48, -463, -463, -463, 113, 146, 198, 150, 200, - 152, 213, 167, 214, 212, 223, 169, 216, 224, 443, - -463, 1046, 1046, 1046, -463, 879, -463, 109, 117, 620, - -463, -463, 66, -463, 620, 620, -463, -463, -463, -463, - -463, -463, -463, -463, -463, -463, 620, 1005, 128, 129, - -463, 620, 126, 131, 209, 134, 141, 143, 144, 154, - 156, 157, 620, 620, 620, 158, 1005, 1046, 1046, 228, - -463, 161, 161, 161, -463, -463, -463, -463, -463, -463, - -463, -463, -463, -463, 160, 164, 175, 178, 181, 184, - 87, 1087, 574, 230, 185, 186, 187, 189, -463, -463, - 161, -33, -101, -97, -463, 115, -463, 163, 176, 923, - -463, -463, -463, -463, -463, -463, -463, -463, -463, 231, - 1087, -463, -463, -463, -463, 190, -463, 195, 620, -9, - -463, -8, -463, 196, 620, 193, 1046, 1046, 1046, 1046, - 1046, 1046, 1046, 1046, 199, 201, 202, 1046, 620, 620, - 203, -463, -22, -463, -463, -463, 1087, 1087, 1087, 1087, - 1087, 1087, -463, -463, -47, -79, -463, -82, -463, 1087, - 1087, 1087, 1087, -463, -463, -463, -463, -463, 964, 262, - -463, -463, 293, -75, 301, 302, 210, 620, 324, 620, - 1046, -463, 217, 620, -463, 218, -463, -463, 219, 220, - -463, -463, 620, 620, 620, -463, 229, -463, 1046, 314, - 340, -463, 161, 196, 309, 234, 237, 240, 241, 1087, - -463, -463, -463, 242, 243, 246, 247, -463, -463, -463, - 303, 249, -463, 620, 620, 1046, 250, -463, 250, -463, - 251, 620, 255, 1046, 1046, 1046, -463, -463, -463, 1046, - 620, -463, -463, -463, 253, 1046, 1087, 1087, 1087, 1087, - -463, 1087, 1087, 1087, 1087, 365, -463, 348, 259, 258, - 251, 260, 320, -463, -463, 1046, 261, 620, -463, -463, - -463, 267, -463, -463, 270, 277, 278, 282, 283, 281, - 284, 294, 304, -463, -463, 376, 65, 372, -463, -463, - 305, -463, -463, 1087, -463, 1087, 1087, -463, -463, -463, - -463, 620, -463, 726, 149, 399, -463, 306, 307, 310, - -463, 312, -463, 726, 620, -463, -463, -463, 405, 315, - 352, 620, 409, 411, -463, 620, 620, -463, -463 + -447, 33, 122, 610, -447, -447, -447, -447, -447, -447, + -447, -447, -447, -447, -13, 161, 47, -447, -447, -15, + -447, -447, 15, 10, 91, -6, 48, -447, 19, 138, + 168, -447, -447, -447, -447, -447, -447, 1070, -20, -447, + -447, 70, -447, -447, -447, -447, 60, 61, 64, 67, + -447, 63, 138, 1070, 106, 106, 106, 106, -447, -447, + -447, 161, -447, -447, -447, -447, -447, 59, -447, -447, + -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, + -447, -447, 174, 178, 179, 576, -447, 70, 74, -447, + -447, -54, -447, -447, -447, -447, -447, 1245, -447, 162, + -44, 190, 171, 172, -447, -447, -447, -447, -447, 1111, + 1111, 1111, 1152, -447, -447, 78, 88, -447, -447, -54, + -29, 92, 865, -447, -447, 1111, -447, 150, 1193, 75, + 189, 161, -447, -447, -447, -447, -447, -447, -447, -447, + -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, + -447, -447, 1111, 1111, 1111, 1111, 1111, 1111, 1111, -447, + -447, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, + 1111, -447, 161, -447, 8, -447, -447, -447, -447, -447, + -447, -447, -447, -10, -447, -447, -447, 113, 139, 206, + 145, 211, 147, 215, 152, 216, 214, 225, 154, 218, + 226, 419, -447, 1111, 1111, 1111, -447, 906, -447, 120, + 118, 643, -447, -447, 59, -447, 643, 643, -447, -447, + -447, -447, -447, -447, -447, -447, -447, -447, 643, 1070, + 128, 129, -447, 643, 126, 131, 210, 133, 134, 140, + 141, 142, 143, 144, 643, 643, 643, 146, 1070, 1111, + 1111, 237, -447, 148, 148, 148, -447, -447, -447, -447, + -447, -447, -447, -447, -447, -447, 149, 151, 153, 155, + 156, 159, 947, 1152, 596, 239, 160, 164, 175, 177, + -447, -447, 148, -74, -23, -54, -447, 70, -447, 163, + 180, 988, -447, -447, -447, -447, -447, -447, -447, -447, + -447, 201, 1152, -447, -447, -447, -447, 182, -447, 184, + 643, -2, -447, 6, -447, 186, 643, 176, 1111, 1111, + 1111, 1111, 1111, 1111, 1111, 1111, 187, 188, 191, 1111, + 643, 643, 195, -447, -12, -447, -447, -447, 1152, 1152, + 1152, 1152, 1152, 1152, -447, -447, -9, -21, -447, -27, + -447, 1152, 1152, 1152, 1152, -447, -447, -447, -447, -447, + 1029, 232, -447, -447, 244, -16, 249, 282, 194, 643, + 300, 643, 1111, -447, 197, 643, -447, 199, -447, -447, + 202, 203, -447, -447, 643, 643, 643, -447, 208, -447, + 1111, 291, 315, -447, 148, 186, 289, 212, 217, 219, + 220, 1152, -447, -447, -447, 231, 233, 234, 240, -447, + -447, -447, 273, 241, -447, 643, 643, 1111, 242, -447, + 242, -447, 243, 643, 246, 1111, 1111, 1111, -447, -447, + -447, 1111, 643, -447, -447, -447, 223, 1111, 1152, 1152, + 1152, 1152, -447, 1152, 1152, 1152, 1152, 328, -447, 322, + 247, 245, 243, 248, 294, -447, -447, 1111, 250, 643, + -447, -447, -447, 252, -447, -447, 254, 259, 257, 262, + 263, 264, 265, 267, 270, -447, -447, 341, 14, 343, + -447, -447, 271, -447, -447, 1152, -447, 1152, 1152, -447, + -447, -447, -447, 643, -447, 751, 65, 374, -447, 279, + 280, 281, -447, 285, -447, 751, 643, -447, -447, -447, + 380, 290, 288, 643, 382, 384, -447, 643, 643, -447, + -447 }; /* YYPGOTO[NTERM-NUM]. */ static const short int yypgoto[] = { - -463, -463, -463, 336, 339, 341, 342, -129, -128, -462, - -463, 396, 415, -118, -463, -225, 82, -463, -244, -463, - -50, -463, -37, -463, -56, 321, -463, -102, 252, -247, - 5, -463, -463, -463, -463, -463, -463, -463, 390, -463, - -463, -463, -463, 2, -463, 92, -463, -463, 391, -463, - -463, -463, -463, -463, 450, -463, -463, -459, -57, 62, - -105, -463, 436, -463, -463, -463, -463, -463, 86, 28, - -463, -463, 69, -463, -463 + -447, -447, -447, 309, 310, 311, 312, -129, -128, -446, + -447, 369, 386, -89, -447, -227, 51, -447, -248, -447, + -50, -447, -37, -447, -68, 292, -447, -102, 221, -255, + 57, -447, -447, -447, -447, -447, -447, -447, 361, -447, + -447, -447, -447, 2, -447, 55, -447, -447, 355, -447, + -447, -447, -447, -447, 414, -447, -447, -405, -57, 62, + -105, -447, 399, -447, -447, -447, -447, -447, 49, -8, + -447, -447, 24, -447, -447 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -130 +#define YYTABLE_NINF -132 static const short int yytable[] = { - 89, 224, 225, 106, 312, 26, 367, 369, 334, 335, - 200, 39, 389, 227, 493, 214, 89, -67, 42, 355, - 210, 203, 123, 213, 345, 347, 123, 215, 94, 119, - 399, 204, 503, 399, 501, 390, 353, 399, 175, 176, - 402, 401, 4, 26, 509, 412, 29, 230, 368, 368, - 234, 235, 246, 363, 236, 237, 238, 239, 240, 241, - 110, 111, 112, 245, 249, 399, 119, 46, 47, 48, - 250, 400, 182, 183, 184, 216, 217, 218, 219, 220, - 221, 222, 223, 107, 108, 354, 49, 39, 209, 121, - 123, 209, 65, 66, 52, 117, 185, 186, 187, 188, - 189, 190, 191, 192, 193, 194, 195, 79, 80, 20, - 43, 21, 51, 228, 229, 209, 231, 232, 209, 209, - 95, 58, 209, 209, 209, 209, 209, 209, 242, 243, - 244, 209, 247, 248, 59, 81, 60, 20, 62, 21, - 254, 255, 279, 330, 64, 281, 282, 283, 433, -27, - -27, 99, 303, -26, -26, -25, -25, 303, 303, 216, - 217, 218, 219, 220, 221, 222, 223, 100, 285, 303, - -24, -24, 256, 257, 303, 103, 114, 308, 101, 102, - -68, 115, -129, 492, 116, 303, 303, 303, 122, 174, - 89, 453, 178, 454, 179, 180, 328, 201, 202, 205, - 82, 211, -31, 83, -30, 342, 84, 5, 85, 89, - 329, 209, 375, 6, 377, 378, 379, -29, -28, -34, - 259, 289, 385, 7, 8, 9, 10, 11, 12, 13, - -35, 260, 290, 283, 393, 394, 395, 396, 397, 398, - 309, 311, 314, 315, 14, 316, 317, 403, 404, 405, - 406, 303, 331, 318, 348, 319, 320, 303, 216, 217, - 218, 219, 220, 221, 222, 223, 321, 502, 322, 323, - 327, 303, 303, 332, 336, 358, 305, 306, 337, 374, - 209, 376, 209, 209, 209, 380, 381, 356, 307, 338, - 209, 359, 339, 313, 361, 340, 389, 440, 341, 349, - 350, 351, 364, 352, 324, 325, 326, 365, 370, 373, - 303, 382, 303, 383, 384, 388, 303, 411, 458, 459, - 460, 285, 413, 414, 415, 303, 303, 303, 417, 421, - 423, 424, 425, 209, 465, 466, 467, 468, 431, 469, - 470, 471, 472, 429, 432, 435, 436, 224, 225, 437, - 478, 430, 438, 439, 441, 442, 303, 303, 443, 444, - 445, 447, 452, 455, 303, 224, 225, 457, 463, 473, - 366, 475, 474, 303, 476, 477, 372, 368, 209, 479, - 53, 497, 481, 498, 499, 482, 209, 209, 209, 483, - 386, 387, 209, 484, 485, 486, 487, 491, 464, 488, - 303, 7, 8, 9, 10, 54, 12, 55, 495, 489, - 56, 30, 31, 32, 33, 34, 35, 36, 209, 490, - 504, 505, 506, 496, 508, 507, 511, 512, 513, 416, - 515, 418, 516, 165, 303, 422, 166, 97, 167, 168, - 57, 409, 105, 207, 426, 427, 428, 303, 65, 66, - 408, 278, 113, 27, 303, 45, 420, 461, 303, 303, - 0, 0, 434, 0, 0, 20, 0, 21, 0, 261, - 0, 0, 0, 0, 0, 448, 449, 0, 0, 0, - 0, 262, 263, 456, 0, 0, 0, 0, 0, 0, - 0, 0, 462, 0, 65, 66, 0, 117, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 20, 0, 21, 0, 0, 0, 0, 0, 480, - 0, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 149, 81, 0, 0, - 0, 0, 264, 0, 265, 266, 157, 158, 0, 267, - 268, 269, 0, 500, 0, 0, 0, 0, 0, 270, - 0, 0, 271, 0, 272, 0, 510, 273, 0, 0, - 0, 0, 0, 514, 0, 0, 0, 517, 518, 65, - 66, 0, 117, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 195, 79, 80, 20, 0, 21, 0, - 0, 0, 82, 0, 0, 83, 0, 0, 84, 0, - 85, 118, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 81, 291, 292, 65, 66, 293, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -37, 20, 20, 21, 21, 294, 295, 296, 0, - 0, 0, 6, -37, -37, 0, 0, 0, 297, 298, - 0, 0, -37, -37, -37, -37, -37, -37, -37, 0, - 0, -37, 22, 0, 0, 0, 0, 0, 0, 23, - 0, 299, 0, 24, 0, 0, 0, 82, 0, 0, - 83, 0, 0, 84, 0, 85, 346, 0, 134, 135, - 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, - 146, 147, 148, 149, 0, 0, 0, 0, 0, 264, - 0, 265, 266, 157, 158, 0, 267, 268, 269, 291, - 292, 0, 0, 293, 0, 0, 0, 0, 0, 300, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 294, 295, 296, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 297, 298, 0, 0, 0, 0, + 89, 226, 227, 106, 314, 26, 336, 337, 39, 94, + 202, 177, 178, 369, 53, 42, 89, 119, 347, 349, + 212, 371, 391, 215, 218, 219, 220, 221, 222, 223, + 224, 225, 495, 4, 355, 7, 8, 9, 10, 54, + 12, 55, 229, 26, 56, 392, 356, 365, 29, 232, + 505, 123, 236, 237, 119, 370, 238, 239, 240, 241, + 242, 243, -69, 370, 59, 247, 60, 46, 47, 48, + 39, 123, 184, 185, 186, 218, 219, 220, 221, 222, + 223, 224, 225, 248, 216, 205, 49, 401, 211, 121, + 503, 211, 20, 401, 21, 206, 217, 404, 401, 357, + 511, 403, 123, 95, 251, 401, 414, 249, 250, 43, + 252, 402, 110, 111, 112, 230, 231, 211, 233, 234, + 211, 211, -131, 51, 211, 211, 211, 211, 211, 211, + 244, 245, 246, 211, 494, 283, 284, 285, 107, 108, + 256, 257, -29, -29, 281, 332, 435, 5, -28, -28, + -27, -27, 52, 6, 305, -26, -26, 258, 259, 305, + 305, 58, 62, 7, 8, 9, 10, 11, 12, 13, + 287, 305, 64, 99, 100, -70, 305, 101, 114, 310, + 102, 103, 115, 116, 14, 504, 176, 305, 305, 305, + 122, 455, 89, 456, 180, 181, 182, 203, 330, 218, + 219, 220, 221, 222, 223, 224, 225, 204, 207, 213, + -33, 89, 331, 211, 377, -32, 379, 380, 381, -31, + -30, -36, 261, 285, 387, 30, 31, 32, 33, 34, + 35, 36, -37, 262, 291, 292, 395, 396, 397, 398, + 399, 400, 311, 313, 316, 317, 318, 319, 320, 405, + 406, 407, 408, 305, 321, 322, 323, 324, 325, 305, + 329, 333, 334, 350, 363, 338, 391, 339, 413, 340, + 415, 341, 342, 305, 305, 343, 351, 360, 307, 308, + 352, 376, 211, 378, 211, 211, 211, 382, 383, 358, + 309, 353, 211, 354, 375, 315, 366, 361, 367, 442, + 372, 384, 385, 416, 419, 386, 326, 327, 328, 390, + 417, 423, 305, 425, 305, 433, 426, 427, 305, 434, + 460, 461, 462, 287, 431, 437, 438, 305, 305, 305, + 447, 439, 475, 440, 441, 211, 467, 468, 469, 470, + 465, 471, 472, 473, 474, 443, 476, 444, 445, 226, + 227, 370, 480, 432, 446, 449, 454, 457, 305, 305, + 459, 477, 493, 478, 515, 479, 305, 226, 227, 483, + 481, 484, 368, 485, 486, 305, 487, 488, 374, 497, + 211, 489, 490, 499, 491, 500, 501, 492, 211, 211, + 211, 498, 388, 389, 211, 506, 507, 508, 509, 510, + 466, 513, 305, 517, 514, 518, 167, 168, 169, 170, + 97, 57, 411, 105, 209, 410, 113, 27, 45, 436, + 211, 422, 280, 463, 65, 66, 0, 0, 0, 0, + 0, 418, 0, 420, 0, 0, 305, 424, 0, 0, + 0, 20, 0, 21, 0, 263, 428, 429, 430, 305, + 0, 0, 0, 0, 0, 0, 305, 264, 265, 0, + 305, 305, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 450, 451, 0, + 0, 0, 0, 0, 0, 458, 0, 0, 0, 0, + 0, 0, 0, 0, 464, 0, 0, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 0, 0, 0, 0, 0, + 266, 482, 267, 268, 159, 160, 0, 269, 270, 271, + 0, 0, 0, 0, 0, 0, 0, 272, 0, 0, + 273, 0, 274, 0, 0, 275, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 502, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 512, 0, + 0, 0, 0, 0, 0, 516, 0, 0, 0, 519, + 520, 65, 66, 0, 117, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 20, 0, + 21, 65, 66, 0, 117, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 79, 80, 20, 0, + 21, 0, 0, 0, 81, 0, 0, 0, 0, 0, + -39, 0, 20, 0, 21, 0, 0, 0, 0, 0, + 0, 6, -39, -39, 81, 0, 293, 294, 65, 66, + 295, -39, -39, -39, -39, -39, -39, -39, 0, 0, + -39, 22, 0, 0, 0, 20, 0, 21, 23, 296, + 297, 298, 24, 0, 0, 0, 0, 0, 0, 0, + 0, 299, 300, 0, 0, 0, 0, 0, 0, 0, + 0, 82, 0, 0, 83, 0, 0, 84, 0, 85, + 118, 0, 0, 0, 301, 0, 0, 0, 0, 0, + 0, 82, 0, 0, 83, 0, 0, 84, 0, 85, + 348, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 0, + 0, 0, 0, 0, 266, 0, 267, 268, 159, 160, + 0, 269, 270, 271, 293, 294, 0, 0, 295, 0, + 0, 0, 0, 0, 302, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 296, 297, 298, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 299, + 300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 299, 0, 0, + 0, 0, 301, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 0, 0, 0, + 0, 0, 266, 0, 267, 268, 159, 160, 0, 269, + 270, 271, 0, 0, 0, 0, 0, 0, 0, 0, + 65, 66, 302, 117, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 20, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 134, 135, 136, 137, 138, 139, - 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, - 0, 0, 0, 0, 0, 264, 0, 265, 266, 157, - 158, 0, 267, 268, 269, 0, 0, 0, 0, 0, - 0, 0, 0, 65, 66, 300, 117, 68, 69, 70, + 0, 0, 208, 0, 0, 0, 0, 0, 0, 0, + 0, 65, 66, 81, 117, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 20, 0, + 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 286, 0, 0, 0, 0, 0, 0, + 0, 0, 65, 66, 81, 117, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 197, 79, 80, 20, + 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, + 82, 0, 0, 83, 0, 0, 84, 0, 85, 0, + 0, 0, 0, 65, 66, 81, 117, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 20, 0, 21, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 206, 0, 0, 0, 0, + 0, 82, 0, 0, 83, 362, 0, 84, 0, 85, 0, 0, 0, 0, 65, 66, 81, 117, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 20, 0, 21, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 284, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 81, 65, 66, - 0, 117, 68, 69, 70, 71, 72, 73, 74, 75, + 0, 0, 82, 0, 0, 83, 409, 344, 84, 0, + 85, 0, 0, 0, 0, 65, 66, 81, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 20, 0, 21, 0, 0, 0, 0, 0, + 0, 0, 0, 82, 0, 0, 83, 0, 0, 84, + 0, 85, 0, 0, 0, 0, 65, 66, 81, 117, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 20, 0, 21, 0, 0, 0, 0, + 0, 0, 0, 0, 82, 0, 0, 83, 0, 0, + 84, 0, 85, 0, 0, 0, 0, 65, 66, 81, + 117, 187, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 197, 79, 80, 20, 0, 21, 0, 0, 0, + 0, 0, 0, 0, 0, 82, 0, 0, 83, 0, + 0, 84, 0, 85, 0, 0, 0, 0, 65, 66, + 81, 214, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 20, 0, 21, 0, 0, - 0, 82, 0, 0, 83, 0, 0, 84, 0, 85, - 360, 0, 0, 0, 0, 0, 0, 0, 0, 65, - 66, 81, 117, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 20, 0, 21, 0, - 0, 0, 82, 0, 0, 83, 0, 0, 84, 0, - 85, 407, 0, 0, 0, 0, 0, 0, 0, 0, - 65, 66, 81, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 20, 0, 21, 0, 0, 0, 0, 0, 0, 82, 0, 0, 83, 0, 0, 84, 0, 85, 0, 0, 0, 0, 0, - 0, 65, 66, 81, 117, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 20, 0, - 21, 0, 0, 0, 0, 0, 0, 82, 0, 0, - 83, 0, 0, 84, 0, 85, 0, 0, 0, 0, - 0, 0, 65, 66, 81, 117, 185, 186, 187, 188, - 189, 190, 191, 192, 193, 194, 195, 79, 80, 20, - 0, 21, 0, 0, 0, 0, 0, 0, 82, 0, - 0, 83, 0, 0, 84, 0, 85, 0, 0, 0, - 0, 0, 0, 65, 66, 81, 212, 68, 69, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 20, 0, 21, 0, 0, 0, 0, 0, 0, 82, - 0, 0, 83, 0, 0, 84, 0, 85, 0, 0, - 0, 0, 0, 0, 0, 0, 81, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 82, 0, 0, 83, 0, 0, 84, 0, 85, 0, - 0, 0, 0, 124, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 125, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 126, 127, 0, - 0, 82, 0, 0, 83, 0, 0, 84, 0, 85, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, 0, 0, 153, 154, 155, - 156, 157, 158, 159, 160, 161, 162, 163, 164 + 0, 0, 0, 0, 0, 0, 0, 82, 0, 0, + 83, 0, 0, 84, 0, 85, 0, 0, 0, 0, + 124, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 125, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 126, 127, 0, 0, 82, 0, + 0, 83, 0, 0, 84, 0, 85, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 0, 0, 155, 156, 157, 158, + 159, 160, 161, 162, 163, 164, 165, 166 }; static const short int yycheck[] = { - 37, 130, 130, 53, 229, 3, 15, 15, 252, 253, - 112, 23, 34, 131, 476, 9, 53, 114, 30, 120, - 125, 112, 123, 128, 271, 272, 123, 21, 29, 85, - 112, 122, 494, 112, 493, 57, 280, 112, 55, 56, - 122, 120, 0, 41, 503, 120, 61, 152, 57, 57, - 155, 156, 170, 300, 159, 160, 161, 162, 163, 164, - 55, 56, 57, 168, 112, 112, 122, 52, 53, 54, - 118, 118, 109, 110, 111, 10, 11, 12, 13, 14, - 15, 16, 17, 32, 33, 118, 71, 23, 125, 87, - 123, 128, 5, 6, 61, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 122, 24, 111, 150, 151, 152, 153, 154, 155, 156, - 121, 111, 159, 160, 161, 162, 163, 164, 165, 166, - 167, 168, 97, 98, 45, 48, 47, 22, 24, 24, - 27, 28, 199, 248, 4, 201, 202, 203, 392, 3, - 4, 111, 209, 3, 4, 3, 4, 214, 215, 10, - 11, 12, 13, 14, 15, 16, 17, 111, 205, 226, - 3, 4, 3, 4, 231, 116, 4, 227, 111, 111, - 114, 4, 0, 118, 4, 242, 243, 244, 114, 24, - 227, 416, 4, 418, 24, 24, 246, 117, 117, 114, - 113, 59, 4, 116, 4, 118, 119, 25, 121, 246, - 247, 248, 317, 31, 319, 320, 321, 4, 4, 7, - 4, 112, 327, 41, 42, 43, 44, 45, 46, 47, - 7, 7, 115, 289, 336, 337, 338, 339, 340, 341, - 112, 112, 116, 112, 62, 36, 112, 349, 350, 351, - 352, 308, 24, 112, 24, 112, 112, 314, 10, 11, - 12, 13, 14, 15, 16, 17, 112, 118, 112, 112, - 112, 328, 329, 112, 114, 112, 214, 215, 114, 316, - 317, 318, 319, 320, 321, 322, 323, 285, 226, 114, - 327, 115, 114, 231, 63, 114, 34, 399, 114, 114, - 114, 114, 112, 114, 242, 243, 244, 112, 112, 116, - 367, 112, 369, 112, 112, 112, 373, 24, 423, 424, - 425, 358, 21, 21, 114, 382, 383, 384, 4, 112, - 112, 112, 112, 370, 436, 437, 438, 439, 24, 441, - 442, 443, 444, 114, 4, 36, 112, 476, 476, 112, - 455, 388, 112, 112, 112, 112, 413, 414, 112, 112, - 57, 112, 112, 112, 421, 494, 494, 112, 115, 4, - 308, 112, 24, 430, 116, 115, 314, 57, 415, 118, - 20, 483, 115, 485, 486, 115, 423, 424, 425, 112, - 328, 329, 429, 115, 112, 112, 115, 21, 435, 115, - 457, 41, 42, 43, 44, 45, 46, 47, 36, 115, - 50, 64, 65, 66, 67, 68, 69, 70, 455, 115, - 21, 115, 115, 118, 112, 115, 21, 112, 76, 367, - 21, 369, 21, 97, 491, 373, 97, 41, 97, 97, - 25, 359, 52, 122, 382, 383, 384, 504, 5, 6, - 358, 199, 61, 3, 511, 19, 370, 429, 515, 516, - -1, -1, 393, -1, -1, 22, -1, 24, -1, 26, - -1, -1, -1, -1, -1, 413, 414, -1, -1, -1, - -1, 38, 39, 421, -1, -1, -1, -1, -1, -1, - -1, -1, 430, -1, 5, 6, -1, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, -1, 24, -1, -1, -1, -1, -1, 457, - -1, 78, 79, 80, 81, 82, 83, 84, 85, 86, - 87, 88, 89, 90, 91, 92, 93, 48, -1, -1, - -1, -1, 99, -1, 101, 102, 103, 104, -1, 106, - 107, 108, -1, 491, -1, -1, -1, -1, -1, 116, - -1, -1, 119, -1, 121, -1, 504, 124, -1, -1, - -1, -1, -1, 511, -1, -1, -1, 515, 516, 5, - 6, -1, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, -1, 24, -1, - -1, -1, 113, -1, -1, 116, -1, -1, 119, -1, - 121, 122, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 48, 3, 4, 5, 6, 7, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 20, 22, 22, 24, 24, 26, 27, 28, -1, - -1, -1, 31, 32, 33, -1, -1, -1, 38, 39, - -1, -1, 41, 42, 43, 44, 45, 46, 47, -1, - -1, 50, 51, -1, -1, -1, -1, -1, -1, 58, - -1, 61, -1, 62, -1, -1, -1, 113, -1, -1, - 116, -1, -1, 119, -1, 121, 122, -1, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, -1, -1, -1, -1, -1, 99, - -1, 101, 102, 103, 104, -1, 106, 107, 108, 3, - 4, -1, -1, 7, -1, -1, -1, -1, -1, 119, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 26, 27, 28, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 38, 39, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 61, -1, -1, + 37, 130, 130, 53, 231, 3, 254, 255, 23, 29, + 112, 55, 56, 15, 20, 30, 53, 85, 273, 274, + 125, 15, 34, 128, 10, 11, 12, 13, 14, 15, + 16, 17, 478, 0, 282, 41, 42, 43, 44, 45, + 46, 47, 131, 41, 50, 57, 120, 302, 61, 154, + 496, 125, 157, 158, 122, 57, 161, 162, 163, 164, + 165, 166, 116, 57, 45, 170, 47, 52, 53, 54, + 23, 125, 109, 110, 111, 10, 11, 12, 13, 14, + 15, 16, 17, 172, 9, 114, 71, 114, 125, 87, + 495, 128, 22, 114, 24, 124, 21, 124, 114, 122, + 505, 122, 125, 123, 114, 114, 122, 99, 100, 124, + 120, 120, 55, 56, 57, 152, 153, 154, 155, 156, + 157, 158, 0, 113, 161, 162, 163, 164, 165, 166, + 167, 168, 169, 170, 120, 203, 204, 205, 32, 33, + 27, 28, 3, 4, 201, 250, 394, 25, 3, 4, + 3, 4, 61, 31, 211, 3, 4, 3, 4, 216, + 217, 113, 24, 41, 42, 43, 44, 45, 46, 47, + 207, 228, 4, 113, 113, 116, 233, 113, 4, 229, + 113, 118, 4, 4, 62, 120, 24, 244, 245, 246, + 116, 418, 229, 420, 4, 24, 24, 119, 248, 10, + 11, 12, 13, 14, 15, 16, 17, 119, 116, 59, + 4, 248, 249, 250, 319, 4, 321, 322, 323, 4, + 4, 7, 4, 291, 329, 64, 65, 66, 67, 68, + 69, 70, 7, 7, 114, 117, 338, 339, 340, 341, + 342, 343, 114, 114, 118, 114, 36, 114, 114, 351, + 352, 353, 354, 310, 114, 114, 114, 114, 114, 316, + 114, 24, 114, 24, 63, 116, 34, 116, 24, 116, + 21, 116, 116, 330, 331, 116, 116, 114, 216, 217, + 116, 318, 319, 320, 321, 322, 323, 324, 325, 287, + 228, 116, 329, 116, 118, 233, 114, 117, 114, 401, + 114, 114, 114, 21, 4, 114, 244, 245, 246, 114, + 116, 114, 369, 114, 371, 24, 114, 114, 375, 4, + 425, 426, 427, 360, 116, 36, 114, 384, 385, 386, + 57, 114, 4, 114, 114, 372, 438, 439, 440, 441, + 117, 443, 444, 445, 446, 114, 24, 114, 114, 478, + 478, 57, 457, 390, 114, 114, 114, 114, 415, 416, + 114, 114, 21, 118, 76, 117, 423, 496, 496, 117, + 120, 117, 310, 114, 117, 432, 114, 114, 316, 36, + 417, 117, 117, 485, 117, 487, 488, 117, 425, 426, + 427, 120, 330, 331, 431, 21, 117, 117, 117, 114, + 437, 21, 459, 21, 114, 21, 97, 97, 97, 97, + 41, 25, 361, 52, 122, 360, 61, 3, 19, 395, + 457, 372, 201, 431, 5, 6, -1, -1, -1, -1, + -1, 369, -1, 371, -1, -1, 493, 375, -1, -1, + -1, 22, -1, 24, -1, 26, 384, 385, 386, 506, + -1, -1, -1, -1, -1, -1, 513, 38, 39, -1, + 517, 518, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 415, 416, -1, + -1, -1, -1, -1, -1, 423, -1, -1, -1, -1, + -1, -1, -1, -1, 432, -1, -1, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, -1, -1, -1, -1, -1, + 101, 459, 103, 104, 105, 106, -1, 108, 109, 110, + -1, -1, -1, -1, -1, -1, -1, 118, -1, -1, + 121, -1, 123, -1, -1, 126, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 493, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 506, -1, + -1, -1, -1, -1, -1, 513, -1, -1, -1, 517, + 518, 5, 6, -1, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, + 24, 5, 6, -1, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, + 24, -1, -1, -1, 48, -1, -1, -1, -1, -1, + 20, -1, 22, -1, 24, -1, -1, -1, -1, -1, + -1, 31, 32, 33, 48, -1, 3, 4, 5, 6, + 7, 41, 42, 43, 44, 45, 46, 47, -1, -1, + 50, 51, -1, -1, -1, 22, -1, 24, 58, 26, + 27, 28, 62, -1, -1, -1, -1, -1, -1, -1, + -1, 38, 39, -1, -1, -1, -1, -1, -1, -1, + -1, 115, -1, -1, 118, -1, -1, 121, -1, 123, + 124, -1, -1, -1, 61, -1, -1, -1, -1, -1, + -1, 115, -1, -1, 118, -1, -1, 121, -1, 123, + 124, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, -1, + -1, -1, -1, -1, 101, -1, 103, 104, 105, 106, + -1, 108, 109, 110, 3, 4, -1, -1, 7, -1, + -1, -1, -1, -1, 121, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 26, 27, 28, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 38, + 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - -1, -1, -1, -1, -1, 99, -1, 101, 102, 103, - 104, -1, 106, 107, 108, -1, -1, -1, -1, -1, - -1, -1, -1, 5, 6, 119, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, -1, 24, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 37, -1, -1, -1, -1, - -1, -1, -1, -1, 5, 6, 48, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, -1, 24, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 37, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 48, 5, 6, - -1, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, -1, 24, -1, -1, - -1, 113, -1, -1, 116, -1, -1, 119, -1, 121, - 37, -1, -1, -1, -1, -1, -1, -1, -1, 5, - 6, 48, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, -1, 24, -1, - -1, -1, 113, -1, -1, 116, -1, -1, 119, -1, - 121, 37, -1, -1, -1, -1, -1, -1, -1, -1, - 5, 6, 48, 8, 9, 10, 11, 12, 13, 14, + -1, -1, 61, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, -1, -1, -1, + -1, -1, 101, -1, 103, 104, 105, 106, -1, 108, + 109, 110, -1, -1, -1, -1, -1, -1, -1, -1, + 5, 6, 121, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, 24, - -1, -1, -1, -1, -1, -1, 113, -1, -1, 116, - -1, -1, 119, -1, 121, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 37, -1, -1, -1, -1, -1, -1, -1, -1, 5, 6, 48, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, - 24, -1, -1, -1, -1, -1, -1, 113, -1, -1, - 116, -1, -1, 119, -1, 121, -1, -1, -1, -1, + 24, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 37, -1, -1, -1, -1, -1, -1, -1, -1, 5, 6, 48, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - -1, 24, -1, -1, -1, -1, -1, -1, 113, -1, - -1, 116, -1, -1, 119, -1, 121, -1, -1, -1, + -1, 24, -1, -1, -1, -1, -1, -1, -1, -1, + 115, -1, -1, 118, -1, -1, 121, -1, 123, -1, -1, -1, -1, 5, 6, 48, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, -1, 24, -1, -1, -1, -1, -1, -1, 113, - -1, -1, 116, -1, -1, 119, -1, 121, -1, -1, - -1, -1, -1, -1, -1, -1, 48, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 22, -1, 24, -1, -1, -1, -1, -1, -1, -1, + -1, 115, -1, -1, 118, 37, -1, 121, -1, 123, + -1, -1, -1, -1, 5, 6, 48, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, -1, 24, -1, -1, -1, -1, -1, -1, + -1, -1, 115, -1, -1, 118, 37, 120, 121, -1, + 123, -1, -1, -1, -1, 5, 6, 48, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, -1, 24, -1, -1, -1, -1, -1, + -1, -1, -1, 115, -1, -1, 118, -1, -1, 121, + -1, 123, -1, -1, -1, -1, 5, 6, 48, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, -1, 24, -1, -1, -1, -1, + -1, -1, -1, -1, 115, -1, -1, 118, -1, -1, + 121, -1, 123, -1, -1, -1, -1, 5, 6, 48, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, -1, 24, -1, -1, -1, + -1, -1, -1, -1, -1, 115, -1, -1, 118, -1, + -1, 121, -1, 123, -1, -1, -1, -1, 5, 6, + 48, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, -1, 24, -1, -1, + -1, -1, -1, -1, -1, -1, 115, -1, -1, 118, + -1, -1, 121, -1, 123, -1, -1, -1, -1, -1, + -1, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 113, -1, -1, 116, -1, -1, 119, -1, 121, -1, - -1, -1, -1, 35, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 49, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 59, 60, -1, - -1, 113, -1, -1, 116, -1, -1, 119, -1, 121, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, -1, -1, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110 + -1, -1, -1, -1, -1, -1, -1, 115, -1, -1, + 118, -1, -1, 121, -1, 123, -1, -1, -1, -1, + 35, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 49, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 59, 60, -1, -1, 115, -1, + -1, 118, -1, -1, 121, -1, 123, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, -1, -1, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const unsigned char yystos[] = { - 0, 156, 157, 158, 0, 25, 31, 41, 42, 43, - 44, 45, 46, 47, 62, 137, 175, 177, 179, 186, - 22, 24, 51, 58, 62, 136, 168, 179, 180, 61, - 64, 65, 66, 67, 68, 69, 70, 138, 173, 23, - 187, 188, 30, 122, 176, 187, 52, 53, 54, 71, - 165, 111, 61, 20, 45, 47, 50, 137, 111, 45, - 47, 178, 24, 163, 4, 5, 6, 8, 9, 10, + 0, 158, 159, 160, 0, 25, 31, 41, 42, 43, + 44, 45, 46, 47, 62, 139, 177, 179, 181, 188, + 22, 24, 51, 58, 62, 138, 170, 181, 182, 61, + 64, 65, 66, 67, 68, 69, 70, 140, 175, 23, + 189, 190, 30, 124, 178, 189, 52, 53, 54, 71, + 167, 113, 61, 20, 45, 47, 50, 139, 113, 45, + 47, 180, 24, 165, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 48, 113, 116, 119, 121, 126, 145, 146, 147, - 148, 149, 168, 183, 29, 121, 174, 136, 191, 111, - 111, 111, 111, 116, 166, 163, 145, 32, 33, 155, - 155, 155, 155, 173, 4, 4, 4, 8, 122, 149, - 150, 168, 114, 123, 35, 49, 59, 60, 72, 73, + 21, 48, 115, 118, 121, 123, 128, 147, 148, 149, + 150, 151, 170, 185, 29, 123, 176, 138, 193, 113, + 113, 113, 113, 118, 168, 165, 147, 32, 33, 157, + 157, 157, 157, 175, 4, 4, 4, 8, 124, 151, + 152, 170, 116, 125, 35, 49, 59, 60, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 109, 110, 128, 129, 130, 131, 189, - 195, 196, 198, 199, 24, 55, 56, 164, 4, 24, - 24, 167, 147, 147, 147, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 132, 133, 135, 147, - 152, 117, 117, 112, 122, 114, 37, 150, 151, 147, - 185, 59, 8, 185, 9, 21, 10, 11, 12, 13, - 14, 15, 16, 17, 132, 133, 134, 138, 147, 147, - 185, 147, 147, 192, 185, 185, 185, 185, 185, 185, - 185, 185, 147, 147, 147, 185, 138, 97, 98, 112, - 118, 161, 162, 160, 27, 28, 3, 4, 127, 4, - 7, 26, 38, 39, 99, 101, 102, 106, 107, 108, - 116, 119, 121, 124, 128, 129, 130, 131, 153, 183, - 159, 149, 149, 149, 37, 147, 170, 171, 172, 112, - 115, 3, 4, 7, 26, 27, 28, 38, 39, 61, - 119, 153, 182, 183, 184, 184, 184, 184, 145, 112, - 140, 112, 140, 184, 116, 112, 36, 112, 112, 112, - 112, 112, 112, 112, 184, 184, 184, 112, 145, 147, - 185, 24, 112, 143, 143, 143, 114, 114, 114, 114, - 114, 114, 118, 152, 154, 154, 122, 154, 24, 114, - 114, 114, 114, 143, 118, 120, 168, 169, 112, 115, - 37, 63, 181, 154, 112, 112, 184, 15, 57, 15, - 112, 197, 184, 116, 147, 185, 147, 185, 185, 185, - 147, 147, 112, 112, 112, 185, 184, 184, 112, 34, - 57, 141, 144, 152, 152, 152, 152, 152, 152, 112, - 118, 120, 122, 152, 152, 152, 152, 37, 170, 141, - 142, 24, 120, 21, 21, 114, 184, 4, 184, 185, - 193, 112, 184, 112, 112, 112, 184, 184, 184, 114, - 147, 24, 4, 143, 197, 36, 112, 112, 112, 112, - 152, 112, 112, 112, 112, 57, 139, 112, 184, 184, - 193, 194, 112, 140, 140, 112, 184, 112, 185, 185, - 185, 194, 184, 115, 147, 152, 152, 152, 152, 152, - 152, 152, 152, 4, 24, 112, 116, 115, 185, 118, - 184, 115, 115, 112, 115, 112, 112, 115, 115, 115, - 115, 21, 118, 134, 190, 36, 118, 152, 152, 152, - 184, 182, 118, 134, 21, 115, 115, 115, 112, 182, - 184, 21, 112, 76, 184, 21, 21, 184, 184 + 94, 95, 96, 97, 98, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 130, 131, 132, + 133, 191, 197, 198, 200, 201, 24, 55, 56, 166, + 4, 24, 24, 169, 149, 149, 149, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 134, 135, + 137, 149, 154, 119, 119, 114, 124, 116, 37, 152, + 153, 149, 187, 59, 8, 187, 9, 21, 10, 11, + 12, 13, 14, 15, 16, 17, 134, 135, 136, 140, + 149, 149, 187, 149, 149, 194, 187, 187, 187, 187, + 187, 187, 187, 187, 149, 149, 149, 187, 140, 99, + 100, 114, 120, 163, 164, 162, 27, 28, 3, 4, + 129, 4, 7, 26, 38, 39, 101, 103, 104, 108, + 109, 110, 118, 121, 123, 126, 130, 131, 132, 133, + 155, 185, 161, 151, 151, 151, 37, 149, 172, 173, + 174, 114, 117, 3, 4, 7, 26, 27, 28, 38, + 39, 61, 121, 155, 184, 185, 186, 186, 186, 186, + 147, 114, 142, 114, 142, 186, 118, 114, 36, 114, + 114, 114, 114, 114, 114, 114, 186, 186, 186, 114, + 147, 149, 187, 24, 114, 145, 145, 145, 116, 116, + 116, 116, 116, 116, 120, 154, 156, 156, 124, 156, + 24, 116, 116, 116, 116, 145, 120, 122, 170, 171, + 114, 117, 37, 63, 183, 156, 114, 114, 186, 15, + 57, 15, 114, 199, 186, 118, 149, 187, 149, 187, + 187, 187, 149, 149, 114, 114, 114, 187, 186, 186, + 114, 34, 57, 143, 146, 154, 154, 154, 154, 154, + 154, 114, 120, 122, 124, 154, 154, 154, 154, 37, + 172, 143, 144, 24, 122, 21, 21, 116, 186, 4, + 186, 187, 195, 114, 186, 114, 114, 114, 186, 186, + 186, 116, 149, 24, 4, 145, 199, 36, 114, 114, + 114, 114, 154, 114, 114, 114, 114, 57, 141, 114, + 186, 186, 195, 196, 114, 142, 142, 114, 186, 114, + 187, 187, 187, 196, 186, 117, 149, 154, 154, 154, + 154, 154, 154, 154, 154, 4, 24, 114, 118, 117, + 187, 120, 186, 117, 117, 114, 117, 114, 114, 117, + 117, 117, 117, 21, 120, 136, 192, 36, 120, 154, + 154, 154, 186, 184, 120, 136, 21, 117, 117, 117, + 114, 184, 186, 21, 114, 76, 186, 21, 21, 186, + 186 }; #define yyerrok (yyerrstatus = 0) @@ -2987,7 +3014,7 @@ switch (yyn) { case 3: -#line 1135 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1140 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[0].UIntVal) > (uint32_t)INT32_MAX) // Outside of my range! GEN_ERROR("Value too large for type!"); @@ -2997,7 +3024,7 @@ break; case 5: -#line 1144 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1149 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[0].UInt64Val) > (uint64_t)INT64_MAX) // Outside of my range! GEN_ERROR("Value too large for type!"); @@ -3006,99 +3033,99 @@ ;} break; - case 36: -#line 1168 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 38: +#line 1173 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[-1].StrVal); CHECK_FOR_ERROR ;} break; - case 37: -#line 1172 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 39: +#line 1177 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; CHECK_FOR_ERROR ;} break; - case 38: -#line 1177 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 40: +#line 1182 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; - case 39: -#line 1178 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 41: +#line 1183 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} break; - case 40: -#line 1179 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 42: +#line 1184 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; - case 41: -#line 1180 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 43: +#line 1185 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::AppendingLinkage; ;} break; - case 42: -#line 1181 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 44: +#line 1186 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; - case 43: -#line 1182 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 45: +#line 1187 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} break; - case 44: -#line 1183 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 46: +#line 1188 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; - case 45: -#line 1184 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 47: +#line 1189 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; - case 46: -#line 1186 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 48: +#line 1191 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; - case 47: -#line 1187 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 49: +#line 1192 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; - case 48: -#line 1188 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 50: +#line 1193 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::CSRet; ;} break; - case 49: -#line 1189 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 51: +#line 1194 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Fast; ;} break; - case 50: -#line 1190 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 52: +#line 1195 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Cold; ;} break; - case 51: -#line 1191 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 53: +#line 1196 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_StdCall; ;} break; - case 52: -#line 1192 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 54: +#line 1197 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_FastCall; ;} break; - case 53: -#line 1193 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 55: +#line 1198 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if ((unsigned)(yyvsp[0].UInt64Val) != (yyvsp[0].UInt64Val)) GEN_ERROR("Calling conv too large!"); @@ -3107,13 +3134,13 @@ ;} break; - case 54: -#line 1202 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 56: +#line 1207 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; - case 55: -#line 1203 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 57: +#line 1208 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[0].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -3122,13 +3149,13 @@ ;} break; - case 56: -#line 1209 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 58: +#line 1214 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; - case 57: -#line 1210 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 59: +#line 1215 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[0].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -3137,8 +3164,8 @@ ;} break; - case 58: -#line 1218 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 60: +#line 1223 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { for (unsigned i = 0, e = strlen((yyvsp[0].StrVal)); i != e; ++i) if ((yyvsp[0].StrVal)[i] == '"' || (yyvsp[0].StrVal)[i] == '\\') @@ -3148,28 +3175,28 @@ ;} break; - case 59: -#line 1226 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 61: +#line 1231 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; - case 60: -#line 1227 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 62: +#line 1232 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[0].StrVal); ;} break; - case 61: -#line 1232 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 63: +#line 1237 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" {;} break; - case 62: -#line 1233 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 64: +#line 1238 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" {;} break; - case 63: -#line 1234 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 65: +#line 1239 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { CurGV->setSection((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -3177,8 +3204,8 @@ ;} break; - case 64: -#line 1239 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 66: +#line 1244 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[0].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[0].UInt64Val))) GEN_ERROR("Alignment must be a power of two!"); @@ -3187,18 +3214,18 @@ ;} break; - case 66: -#line 1253 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 68: +#line 1258 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder((yyvsp[0].PrimType)); ;} break; - case 68: -#line 1254 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 70: +#line 1259 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder((yyvsp[0].PrimType)); ;} break; - case 69: -#line 1256 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 71: +#line 1261 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription()); @@ -3207,24 +3234,24 @@ ;} break; - case 83: -#line 1268 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 85: +#line 1273 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder(OpaqueType::get()); CHECK_FOR_ERROR ;} break; - case 84: -#line 1272 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 86: +#line 1277 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder((yyvsp[0].PrimType)); CHECK_FOR_ERROR ;} break; - case 85: -#line 1276 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 87: +#line 1281 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Named types are also simple types... const Type* tmp = getTypeVal((yyvsp[0].ValIDVal)); CHECK_FOR_ERROR @@ -3232,8 +3259,8 @@ ;} break; - case 86: -#line 1284 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 88: +#line 1289 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Type UpReference if ((yyvsp[0].UInt64Val) > (uint64_t)~0U) GEN_ERROR("Value out of range!"); OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder @@ -3244,8 +3271,8 @@ ;} break; - case 87: -#line 1292 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 89: +#line 1297 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Function derived type? std::vector Params; for (std::list::iterator I = (yyvsp[-1].TypeList)->begin(), @@ -3261,8 +3288,8 @@ ;} break; - case 88: -#line 1305 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 90: +#line 1310 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Sized array type? (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(ArrayType::get(*(yyvsp[-1].TypeVal), (unsigned)(yyvsp[-3].UInt64Val)))); delete (yyvsp[-1].TypeVal); @@ -3270,8 +3297,8 @@ ;} break; - case 89: -#line 1310 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 91: +#line 1315 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Packed array type? const llvm::Type* ElemTy = (yyvsp[-1].TypeVal)->get(); if ((unsigned)(yyvsp[-3].UInt64Val) != (yyvsp[-3].UInt64Val)) @@ -3286,8 +3313,8 @@ ;} break; - case 90: -#line 1322 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 92: +#line 1327 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Structure type? std::vector Elements; for (std::list::iterator I = (yyvsp[-1].TypeList)->begin(), @@ -3300,16 +3327,16 @@ ;} break; - case 91: -#line 1332 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 93: +#line 1337 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector())); CHECK_FOR_ERROR ;} break; - case 92: -#line 1336 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 94: +#line 1341 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Pointer type? if (*(yyvsp[-1].TypeVal) == Type::LabelTy) GEN_ERROR("Cannot form a pointer to a basic block"); @@ -3319,8 +3346,8 @@ ;} break; - case 93: -#line 1347 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 95: +#line 1352 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList) = new std::list(); (yyval.TypeList)->push_back(*(yyvsp[0].TypeVal)); delete (yyvsp[0].TypeVal); @@ -3328,40 +3355,40 @@ ;} break; - case 94: -#line 1352 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 96: +#line 1357 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeList)=(yyvsp[-2].TypeList))->push_back(*(yyvsp[0].TypeVal)); delete (yyvsp[0].TypeVal); CHECK_FOR_ERROR ;} break; - case 96: -#line 1359 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 98: +#line 1364 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeList)=(yyvsp[-2].TypeList))->push_back(Type::VoidTy); CHECK_FOR_ERROR ;} break; - case 97: -#line 1363 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 99: +#line 1368 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeList) = new std::list())->push_back(Type::VoidTy); CHECK_FOR_ERROR ;} break; - case 98: -#line 1367 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 100: +#line 1372 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList) = new std::list(); CHECK_FOR_ERROR ;} break; - case 99: -#line 1378 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 101: +#line 1383 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr const ArrayType *ATy = dyn_cast((yyvsp[-3].TypeVal)->get()); if (ATy == 0) @@ -3390,8 +3417,8 @@ ;} break; - case 100: -#line 1404 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 102: +#line 1409 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { const ArrayType *ATy = dyn_cast((yyvsp[-2].TypeVal)->get()); if (ATy == 0) @@ -3408,8 +3435,8 @@ ;} break; - case 101: -#line 1418 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 103: +#line 1423 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { const ArrayType *ATy = dyn_cast((yyvsp[-2].TypeVal)->get()); if (ATy == 0) @@ -3442,8 +3469,8 @@ ;} break; - case 102: -#line 1448 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 104: +#line 1453 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr const PackedType *PTy = dyn_cast((yyvsp[-3].TypeVal)->get()); if (PTy == 0) @@ -3472,8 +3499,8 @@ ;} break; - case 103: -#line 1474 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 105: +#line 1479 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast((yyvsp[-3].TypeVal)->get()); if (STy == 0) @@ -3497,8 +3524,8 @@ ;} break; - case 104: -#line 1495 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 106: +#line 1500 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast((yyvsp[-2].TypeVal)->get()); if (STy == 0) @@ -3514,8 +3541,8 @@ ;} break; - case 105: -#line 1508 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 107: +#line 1513 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { const PointerType *PTy = dyn_cast((yyvsp[-1].TypeVal)->get()); if (PTy == 0) @@ -3528,8 +3555,8 @@ ;} break; - case 106: -#line 1518 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 108: +#line 1523 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstVal) = UndefValue::get((yyvsp[-1].TypeVal)->get()); delete (yyvsp[-1].TypeVal); @@ -3537,8 +3564,8 @@ ;} break; - case 107: -#line 1523 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 109: +#line 1528 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { const PointerType *Ty = dyn_cast((yyvsp[-1].TypeVal)->get()); if (Ty == 0) @@ -3602,8 +3629,8 @@ ;} break; - case 108: -#line 1584 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 110: +#line 1589 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-1].TypeVal)->get() != (yyvsp[0].ConstVal)->getType()) GEN_ERROR("Mismatched types for constant expression!"); @@ -3613,8 +3640,8 @@ ;} break; - case 109: -#line 1591 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 111: +#line 1596 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { const Type *Ty = (yyvsp[-1].TypeVal)->get(); if (isa(Ty) || Ty == Type::LabelTy || isa(Ty)) @@ -3625,8 +3652,8 @@ ;} break; - case 110: -#line 1600 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 112: +#line 1605 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // integral constants if (!ConstantInt::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].SInt64Val))) GEN_ERROR("Constant value doesn't fit in type!"); @@ -3635,8 +3662,8 @@ ;} break; - case 111: -#line 1606 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 113: +#line 1611 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // integral constants if (!ConstantInt::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].UInt64Val))) GEN_ERROR("Constant value doesn't fit in type!"); @@ -3645,24 +3672,24 @@ ;} break; - case 112: -#line 1612 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 114: +#line 1617 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Boolean constants (yyval.ConstVal) = ConstantBool::getTrue(); CHECK_FOR_ERROR ;} break; - case 113: -#line 1616 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 115: +#line 1621 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Boolean constants (yyval.ConstVal) = ConstantBool::getFalse(); CHECK_FOR_ERROR ;} break; - case 114: -#line 1620 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 116: +#line 1625 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Float & Double constants if (!ConstantFP::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].FPVal))) GEN_ERROR("Floating point constant invalid for type!!"); @@ -3671,8 +3698,8 @@ ;} break; - case 115: -#line 1628 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 117: +#line 1633 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if (!(yyvsp[-3].ConstVal)->getType()->isFirstClassType()) GEN_ERROR("cast constant expression from a non-primitive type: '" + @@ -3686,8 +3713,8 @@ ;} break; - case 116: -#line 1639 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 118: +#line 1644 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[-2].ConstVal)->getType())) GEN_ERROR("GetElementPtr requires a pointer operand!"); @@ -3722,8 +3749,8 @@ ;} break; - case 117: -#line 1671 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 119: +#line 1676 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-5].ConstVal)->getType() != Type::BoolTy) GEN_ERROR("Select condition must be of boolean type!"); @@ -3734,8 +3761,8 @@ ;} break; - case 118: -#line 1679 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 120: +#line 1684 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) GEN_ERROR("Binary operator types must match!"); @@ -3765,8 +3792,8 @@ ;} break; - case 119: -#line 1706 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 121: +#line 1711 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) GEN_ERROR("Logical operator types must match!"); @@ -3780,8 +3807,8 @@ ;} break; - case 120: -#line 1717 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 122: +#line 1722 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) GEN_ERROR("setcc operand types must match!"); @@ -3790,8 +3817,8 @@ ;} break; - case 121: -#line 1723 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 123: +#line 1728 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-1].ConstVal)->getType() != Type::UByteTy) GEN_ERROR("Shift count for shift constant must be unsigned byte!"); @@ -3802,8 +3829,8 @@ ;} break; - case 122: -#line 1731 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 124: +#line 1736 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal))) GEN_ERROR("Invalid extractelement operands!"); @@ -3812,8 +3839,8 @@ ;} break; - case 123: -#line 1737 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 125: +#line 1742 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal))) GEN_ERROR("Invalid insertelement operands!"); @@ -3822,8 +3849,8 @@ ;} break; - case 124: -#line 1743 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 126: +#line 1748 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal))) GEN_ERROR("Invalid shufflevector operands!"); @@ -3832,16 +3859,16 @@ ;} break; - case 125: -#line 1752 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 127: +#line 1757 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { ((yyval.ConstVector) = (yyvsp[-2].ConstVector))->push_back((yyvsp[0].ConstVal)); CHECK_FOR_ERROR ;} break; - case 126: -#line 1756 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 128: +#line 1761 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstVector) = new std::vector(); (yyval.ConstVector)->push_back((yyvsp[0].ConstVal)); @@ -3849,18 +3876,18 @@ ;} break; - case 127: -#line 1764 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 129: +#line 1769 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; ;} break; - case 128: -#line 1764 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 130: +#line 1769 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; ;} break; - case 129: -#line 1774 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 131: +#line 1779 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = ParserResult = (yyvsp[0].ModuleVal); CurModule.ModuleDone(); @@ -3868,8 +3895,8 @@ ;} break; - case 130: -#line 1782 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 132: +#line 1787 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); CurFun.FunctionDone(); @@ -3877,32 +3904,32 @@ ;} break; - case 131: -#line 1787 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 133: +#line 1792 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); CHECK_FOR_ERROR ;} break; - case 132: -#line 1791 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 134: +#line 1796 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = (yyvsp[-3].ModuleVal); CHECK_FOR_ERROR ;} break; - case 133: -#line 1795 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 135: +#line 1800 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); CHECK_FOR_ERROR ;} break; - case 134: -#line 1799 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 136: +#line 1804 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = CurModule.CurrentModule; // Emit an error if there are any unresolved types left. @@ -3918,8 +3945,8 @@ ;} break; - case 135: -#line 1814 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 137: +#line 1819 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Eagerly resolve types. This is not an optimization, this is a // requirement that is due to the fact that we could have this: @@ -3944,22 +3971,22 @@ ;} break; - case 136: -#line 1836 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 138: +#line 1841 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Function prototypes can be in const pool CHECK_FOR_ERROR ;} break; - case 137: -#line 1839 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 139: +#line 1844 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Asm blocks can be in the const pool CHECK_FOR_ERROR ;} break; - case 138: -#line 1842 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 140: +#line 1847 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[0].ConstVal) == 0) GEN_ERROR("Global value initializer is not a constant!"); @@ -3968,15 +3995,15 @@ ;} break; - case 139: -#line 1847 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 141: +#line 1852 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ;} break; - case 140: -#line 1850 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 142: +#line 1855 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::ExternalLinkage, (yyvsp[-1].BoolVal), *(yyvsp[0].TypeVal), 0); CHECK_FOR_ERROR @@ -3984,16 +4011,16 @@ ;} break; - case 141: -#line 1854 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 143: +#line 1859 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; CHECK_FOR_ERROR ;} break; - case 142: -#line 1858 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 144: +#line 1863 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::DLLImportLinkage, (yyvsp[-1].BoolVal), *(yyvsp[0].TypeVal), 0); CHECK_FOR_ERROR @@ -4001,16 +4028,16 @@ ;} break; - case 143: -#line 1862 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 145: +#line 1867 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; CHECK_FOR_ERROR ;} break; - case 144: -#line 1866 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 146: +#line 1871 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::ExternalWeakLinkage, (yyvsp[-1].BoolVal), *(yyvsp[0].TypeVal), 0); @@ -4019,36 +4046,36 @@ ;} break; - case 145: -#line 1871 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 147: +#line 1876 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; CHECK_FOR_ERROR ;} break; - case 146: -#line 1875 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 148: +#line 1880 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 147: -#line 1878 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 149: +#line 1883 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 148: -#line 1881 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 150: +#line 1886 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { ;} break; - case 149: -#line 1885 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 151: +#line 1890 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm(); char *EndStr = UnEscapeLexed((yyvsp[0].StrVal), true); @@ -4063,26 +4090,26 @@ ;} break; - case 150: -#line 1898 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 152: +#line 1903 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.Endianness) = Module::BigEndian; ;} break; - case 151: -#line 1899 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 153: +#line 1904 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.Endianness) = Module::LittleEndian; ;} break; - case 152: -#line 1901 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 154: +#line 1906 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setEndianness((yyvsp[0].Endianness)); CHECK_FOR_ERROR ;} break; - case 153: -#line 1905 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 155: +#line 1910 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[0].UInt64Val) == 32) CurModule.CurrentModule->setPointerSize(Module::Pointer32); @@ -4094,24 +4121,24 @@ ;} break; - case 154: -#line 1914 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 156: +#line 1919 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setTargetTriple((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); ;} break; - case 155: -#line 1918 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 157: +#line 1923 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setDataLayout((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); ;} break; - case 157: -#line 1925 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 159: +#line 1930 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -4119,8 +4146,8 @@ ;} break; - case 158: -#line 1930 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 160: +#line 1935 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -4128,20 +4155,20 @@ ;} break; - case 159: -#line 1935 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 161: +#line 1940 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 163: -#line 1945 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 165: +#line 1950 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; - case 164: -#line 1947 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 166: +#line 1952 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if (*(yyvsp[-1].TypeVal) == Type::VoidTy) GEN_ERROR("void typed arguments are invalid!"); @@ -4150,8 +4177,8 @@ ;} break; - case 165: -#line 1954 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 167: +#line 1959 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[-2].ArgList); (yyvsp[-2].ArgList)->push_back(*(yyvsp[0].ArgVal)); @@ -4160,8 +4187,8 @@ ;} break; - case 166: -#line 1960 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 168: +#line 1965 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = new std::vector >(); (yyval.ArgList)->push_back(*(yyvsp[0].ArgVal)); @@ -4170,16 +4197,16 @@ ;} break; - case 167: -#line 1967 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 169: +#line 1972 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[0].ArgList); CHECK_FOR_ERROR ;} break; - case 168: -#line 1971 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 170: +#line 1976 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[-2].ArgList); (yyval.ArgList)->push_back(std::pair >(); (yyval.ArgList)->push_back(std::make_pair(new PATypeHolder(Type::VoidTy), (char*)0)); @@ -4197,16 +4224,16 @@ ;} break; - case 170: -#line 1982 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 172: +#line 1987 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = 0; CHECK_FOR_ERROR ;} break; - case 171: -#line 1988 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 173: +#line 1993 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { UnEscapeLexed((yyvsp[-5].StrVal)); std::string FunctionName((yyvsp[-5].StrVal)); @@ -4302,8 +4329,8 @@ ;} break; - case 174: -#line 2084 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 176: +#line 2089 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = CurFun.CurrentFunction; @@ -4313,31 +4340,31 @@ ;} break; - case 177: -#line 2094 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 179: +#line 2099 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); CHECK_FOR_ERROR ;} break; - case 179: -#line 2100 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 181: +#line 2105 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { CurFun.Linkage = GlobalValue::DLLImportLinkage ;} break; - case 180: -#line 2101 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 182: +#line 2106 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { CurFun.Linkage = GlobalValue::DLLImportLinkage ;} break; - case 181: -#line 2103 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 183: +#line 2108 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = true; ;} break; - case 182: -#line 2103 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 184: +#line 2108 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = CurFun.CurrentFunction; CurFun.FunctionDone(); @@ -4345,88 +4372,88 @@ ;} break; - case 183: -#line 2113 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 185: +#line 2118 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR ;} break; - case 184: -#line 2117 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 186: +#line 2122 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR ;} break; - case 185: -#line 2122 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 187: +#line 2127 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // A reference to a direct constant (yyval.ValIDVal) = ValID::create((yyvsp[0].SInt64Val)); CHECK_FOR_ERROR ;} break; - case 186: -#line 2126 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 188: +#line 2131 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].UInt64Val)); CHECK_FOR_ERROR ;} break; - case 187: -#line 2130 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 189: +#line 2135 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Perhaps it's an FP constant? (yyval.ValIDVal) = ValID::create((yyvsp[0].FPVal)); CHECK_FOR_ERROR ;} break; - case 188: -#line 2134 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 190: +#line 2139 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantBool::getTrue()); CHECK_FOR_ERROR ;} break; - case 189: -#line 2138 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 191: +#line 2143 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantBool::getFalse()); CHECK_FOR_ERROR ;} break; - case 190: -#line 2142 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 192: +#line 2147 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createNull(); CHECK_FOR_ERROR ;} break; - case 191: -#line 2146 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 193: +#line 2151 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createUndef(); CHECK_FOR_ERROR ;} break; - case 192: -#line 2150 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 194: +#line 2155 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // A vector zero constant. (yyval.ValIDVal) = ValID::createZeroInit(); CHECK_FOR_ERROR ;} break; - case 193: -#line 2154 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 195: +#line 2159 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized packed vector const Type *ETy = (*(yyvsp[-1].ConstVector))[0]->getType(); int NumElements = (yyvsp[-1].ConstVector)->size(); @@ -4454,16 +4481,16 @@ ;} break; - case 194: -#line 2179 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 196: +#line 2184 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].ConstVal)); CHECK_FOR_ERROR ;} break; - case 195: -#line 2183 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 197: +#line 2188 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { char *End = UnEscapeLexed((yyvsp[-2].StrVal), true); std::string AsmStr = std::string((yyvsp[-2].StrVal), End); @@ -4476,48 +4503,48 @@ ;} break; - case 196: -#line 2197 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 198: +#line 2202 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Is it an integer reference...? (yyval.ValIDVal) = ValID::create((yyvsp[0].SIntVal)); CHECK_FOR_ERROR ;} break; - case 197: -#line 2201 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 199: +#line 2206 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? (yyval.ValIDVal) = ValID::create((yyvsp[0].StrVal)); CHECK_FOR_ERROR ;} break; - case 200: -#line 2213 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 202: +#line 2218 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueVal) = getVal(*(yyvsp[-1].TypeVal), (yyvsp[0].ValIDVal)); delete (yyvsp[-1].TypeVal); CHECK_FOR_ERROR ;} break; - case 201: -#line 2218 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 203: +#line 2223 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); CHECK_FOR_ERROR ;} break; - case 202: -#line 2222 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 204: +#line 2227 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Do not allow functions with 0 basic blocks (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); CHECK_FOR_ERROR ;} break; - case 203: -#line 2231 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 205: +#line 2236 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { setValueName((yyvsp[0].TermInstVal), (yyvsp[-1].StrVal)); CHECK_FOR_ERROR @@ -4530,8 +4557,8 @@ ;} break; - case 204: -#line 2242 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 206: +#line 2247 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyvsp[-1].BasicBlockVal)->getInstList().push_back((yyvsp[0].InstVal)); (yyval.BasicBlockVal) = (yyvsp[-1].BasicBlockVal); @@ -4539,8 +4566,8 @@ ;} break; - case 205: -#line 2247 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 207: +#line 2252 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.BasicBlockVal) = CurBB = getBBVal(ValID::create((int)CurFun.NextBBNum++), true); CHECK_FOR_ERROR @@ -4555,8 +4582,8 @@ ;} break; - case 206: -#line 2259 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 208: +#line 2264 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.BasicBlockVal) = CurBB = getBBVal(ValID::create((yyvsp[0].StrVal)), true); CHECK_FOR_ERROR @@ -4571,24 +4598,24 @@ ;} break; - case 207: -#line 2272 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 209: +#line 2277 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Return with a result... (yyval.TermInstVal) = new ReturnInst((yyvsp[0].ValueVal)); CHECK_FOR_ERROR ;} break; - case 208: -#line 2276 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 210: +#line 2281 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Return with no result... (yyval.TermInstVal) = new ReturnInst(); CHECK_FOR_ERROR ;} break; - case 209: -#line 2280 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 211: +#line 2285 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Unconditional Branch... BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal)); CHECK_FOR_ERROR @@ -4596,8 +4623,8 @@ ;} break; - case 210: -#line 2285 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 212: +#line 2290 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { BasicBlock* tmpBBA = getBBVal((yyvsp[-3].ValIDVal)); CHECK_FOR_ERROR @@ -4609,8 +4636,8 @@ ;} break; - case 211: -#line 2294 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 213: +#line 2299 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[-7].PrimType), (yyvsp[-6].ValIDVal)); CHECK_FOR_ERROR @@ -4632,8 +4659,8 @@ ;} break; - case 212: -#line 2313 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 214: +#line 2318 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[-6].PrimType), (yyvsp[-5].ValIDVal)); CHECK_FOR_ERROR @@ -4645,8 +4672,8 @@ ;} break; - case 213: -#line 2323 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 215: +#line 2328 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { const PointerType *PFTy; const FunctionType *Ty; @@ -4704,24 +4731,24 @@ ;} break; - case 214: -#line 2378 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 216: +#line 2383 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnwindInst(); CHECK_FOR_ERROR ;} break; - case 215: -#line 2382 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 217: +#line 2387 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnreachableInst(); CHECK_FOR_ERROR ;} break; - case 216: -#line 2389 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 218: +#line 2394 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = (yyvsp[-5].JumpTable); Constant *V = cast(getValNonImprovising((yyvsp[-4].PrimType), (yyvsp[-3].ValIDVal))); @@ -4735,8 +4762,8 @@ ;} break; - case 217: -#line 2400 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 219: +#line 2405 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = new std::vector >(); Constant *V = cast(getValNonImprovising((yyvsp[-4].PrimType), (yyvsp[-3].ValIDVal))); @@ -4751,8 +4778,8 @@ ;} break; - case 218: -#line 2413 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 220: +#line 2418 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Is this definition named?? if so, assign the name... setValueName((yyvsp[0].InstVal), (yyvsp[-1].StrVal)); @@ -4763,8 +4790,8 @@ ;} break; - case 219: -#line 2422 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 221: +#line 2427 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Used for PHI nodes (yyval.PHIList) = new std::list >(); Value* tmpVal = getVal(*(yyvsp[-5].TypeVal), (yyvsp[-3].ValIDVal)); @@ -4776,8 +4803,8 @@ ;} break; - case 220: -#line 2431 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 222: +#line 2436 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.PHIList) = (yyvsp[-6].PHIList); Value* tmpVal = getVal((yyvsp[-6].PHIList)->front().first->getType(), (yyvsp[-3].ValIDVal)); @@ -4788,16 +4815,16 @@ ;} break; - case 221: -#line 2441 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 223: +#line 2446 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { // Used for call statements, and memory insts... (yyval.ValueList) = new std::vector(); (yyval.ValueList)->push_back((yyvsp[0].ValueVal)); ;} break; - case 222: -#line 2445 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 224: +#line 2450 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = (yyvsp[-2].ValueList); (yyvsp[-2].ValueList)->push_back((yyvsp[0].ValueVal)); @@ -4805,36 +4832,39 @@ ;} break; - case 224: -#line 2452 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 226: +#line 2457 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = 0; ;} break; - case 225: -#line 2454 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 227: +#line 2459 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR ;} break; - case 226: -#line 2458 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 228: +#line 2463 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR ;} break; - case 227: -#line 2463 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 229: +#line 2468 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if (!(*(yyvsp[-3].TypeVal))->isInteger() && !(*(yyvsp[-3].TypeVal))->isFloatingPoint() && !isa((*(yyvsp[-3].TypeVal)).get())) GEN_ERROR( "Arithmetic operator requires integer, FP, or packed operands!"); - if (isa((*(yyvsp[-3].TypeVal)).get()) && (yyvsp[-4].BinaryOpVal).opcode == Instruction::Rem) - GEN_ERROR("Rem not supported on packed types!"); + if (isa((*(yyvsp[-3].TypeVal)).get()) && + ((yyvsp[-4].BinaryOpVal).opcode == Instruction::URem || + (yyvsp[-4].BinaryOpVal).opcode == Instruction::SRem || + (yyvsp[-4].BinaryOpVal).opcode == Instruction::FRem)) + GEN_ERROR("U/S/FRem not supported on packed types!"); // Upgrade the opcode from obsolete versions before we do anything with it. sanitizeOpCode((yyvsp[-4].BinaryOpVal),*(yyvsp[-3].TypeVal)); CHECK_FOR_ERROR; @@ -4849,8 +4879,8 @@ ;} break; - case 228: -#line 2482 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 230: +#line 2490 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if (!(*(yyvsp[-3].TypeVal))->isIntegral()) { if (!isa((yyvsp[-3].TypeVal)->get()) || @@ -4868,8 +4898,8 @@ ;} break; - case 229: -#line 2497 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 231: +#line 2505 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if(isa((*(yyvsp[-3].TypeVal)).get())) { GEN_ERROR( @@ -4886,8 +4916,8 @@ ;} break; - case 230: -#line 2511 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 232: +#line 2519 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { std::cerr << "WARNING: Use of eliminated 'not' instruction:" << " Replacing with 'xor'.\n"; @@ -4903,8 +4933,8 @@ ;} break; - case 231: -#line 2524 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 233: +#line 2532 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[0].ValueVal)->getType() != Type::UByteTy) GEN_ERROR("Shift amount must be ubyte!"); @@ -4915,8 +4945,8 @@ ;} break; - case 232: -#line 2532 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 234: +#line 2540 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if (!(yyvsp[0].TypeVal)->get()->isFirstClassType()) GEN_ERROR("cast instruction to a non-primitive type: '" + @@ -4927,8 +4957,8 @@ ;} break; - case 233: -#line 2540 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 235: +#line 2548 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-4].ValueVal)->getType() != Type::BoolTy) GEN_ERROR("select condition must be boolean!"); @@ -4939,8 +4969,8 @@ ;} break; - case 234: -#line 2548 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 236: +#line 2556 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { NewVarArgs = true; (yyval.InstVal) = new VAArgInst((yyvsp[-2].ValueVal), *(yyvsp[0].TypeVal)); @@ -4949,8 +4979,8 @@ ;} break; - case 235: -#line 2554 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 237: +#line 2562 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { ObsoleteVarArgs = true; const Type* ArgTy = (yyvsp[-2].ValueVal)->getType(); @@ -4973,8 +5003,8 @@ ;} break; - case 236: -#line 2574 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 238: +#line 2582 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { ObsoleteVarArgs = true; const Type* ArgTy = (yyvsp[-2].ValueVal)->getType(); @@ -5000,8 +5030,8 @@ ;} break; - case 237: -#line 2597 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 239: +#line 2605 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[-2].ValueVal), (yyvsp[0].ValueVal))) GEN_ERROR("Invalid extractelement operands!"); @@ -5010,8 +5040,8 @@ ;} break; - case 238: -#line 2603 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 240: +#line 2611 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal))) GEN_ERROR("Invalid insertelement operands!"); @@ -5020,8 +5050,8 @@ ;} break; - case 239: -#line 2609 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 241: +#line 2617 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal))) GEN_ERROR("Invalid shufflevector operands!"); @@ -5030,8 +5060,8 @@ ;} break; - case 240: -#line 2615 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 242: +#line 2623 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { const Type *Ty = (yyvsp[0].PHIList)->front().first->getType(); if (!Ty->isFirstClassType()) @@ -5049,8 +5079,8 @@ ;} break; - case 241: -#line 2630 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 243: +#line 2638 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { const PointerType *PFTy; const FunctionType *Ty; @@ -5112,48 +5142,48 @@ ;} break; - case 242: -#line 2689 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 244: +#line 2697 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.InstVal) = (yyvsp[0].InstVal); CHECK_FOR_ERROR ;} break; - case 243: -#line 2696 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 245: +#line 2704 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = (yyvsp[0].ValueList); CHECK_FOR_ERROR ;} break; - case 244: -#line 2699 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 246: +#line 2707 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = new std::vector(); CHECK_FOR_ERROR ;} break; - case 245: -#line 2704 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 247: +#line 2712 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR ;} break; - case 246: -#line 2708 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 248: +#line 2716 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR ;} break; - case 247: -#line 2715 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 249: +#line 2723 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.InstVal) = new MallocInst(*(yyvsp[-1].TypeVal), 0, (yyvsp[0].UIntVal)); delete (yyvsp[-1].TypeVal); @@ -5161,8 +5191,8 @@ ;} break; - case 248: -#line 2720 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 250: +#line 2728 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[-2].PrimType), (yyvsp[-1].ValIDVal)); CHECK_FOR_ERROR @@ -5171,8 +5201,8 @@ ;} break; - case 249: -#line 2726 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 251: +#line 2734 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { (yyval.InstVal) = new AllocaInst(*(yyvsp[-1].TypeVal), 0, (yyvsp[0].UIntVal)); delete (yyvsp[-1].TypeVal); @@ -5180,8 +5210,8 @@ ;} break; - case 250: -#line 2731 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 252: +#line 2739 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[-2].PrimType), (yyvsp[-1].ValIDVal)); CHECK_FOR_ERROR @@ -5190,8 +5220,8 @@ ;} break; - case 251: -#line 2737 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 253: +#line 2745 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[0].ValueVal)->getType())) GEN_ERROR("Trying to free nonpointer type " + @@ -5201,8 +5231,8 @@ ;} break; - case 252: -#line 2745 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 254: +#line 2753 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[-1].TypeVal)->get())) GEN_ERROR("Can't load from nonpointer type: " + @@ -5217,8 +5247,8 @@ ;} break; - case 253: -#line 2757 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 255: +#line 2765 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { const PointerType *PT = dyn_cast((yyvsp[-1].TypeVal)->get()); if (!PT) @@ -5236,8 +5266,8 @@ ;} break; - case 254: -#line 2772 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 256: +#line 2780 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[-2].TypeVal)->get())) GEN_ERROR("getelementptr insn requires pointer operand!"); @@ -5269,7 +5299,7 @@ } /* Line 1126 of yacc.c. */ -#line 5273 "llvmAsmParser.tab.c" +#line 5303 "llvmAsmParser.tab.c" yyvsp -= yylen; yyssp -= yylen; @@ -5537,7 +5567,7 @@ } -#line 2798 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2806 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" void llvm::GenerateError(const std::string &message, int LineNo) { Index: llvm/lib/AsmParser/llvmAsmParser.h.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.17 llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.18 --- llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.17 Thu Oct 26 01:15:43 2006 +++ llvm/lib/AsmParser/llvmAsmParser.h.cvs Thu Nov 2 14:25:49 2006 @@ -110,33 +110,35 @@ UDIV = 336, SDIV = 337, FDIV = 338, - REM = 339, - AND = 340, - OR = 341, - XOR = 342, - SETLE = 343, - SETGE = 344, - SETLT = 345, - SETGT = 346, - SETEQ = 347, - SETNE = 348, - MALLOC = 349, - ALLOCA = 350, - FREE = 351, - LOAD = 352, - STORE = 353, - GETELEMENTPTR = 354, - PHI_TOK = 355, - CAST = 356, - SELECT = 357, - SHL = 358, - SHR = 359, - VAARG = 360, - EXTRACTELEMENT = 361, - INSERTELEMENT = 362, - SHUFFLEVECTOR = 363, - VAARG_old = 364, - VANEXT_old = 365 + UREM = 339, + SREM = 340, + FREM = 341, + AND = 342, + OR = 343, + XOR = 344, + SETLE = 345, + SETGE = 346, + SETLT = 347, + SETGT = 348, + SETEQ = 349, + SETNE = 350, + MALLOC = 351, + ALLOCA = 352, + FREE = 353, + LOAD = 354, + STORE = 355, + GETELEMENTPTR = 356, + PHI_TOK = 357, + CAST = 358, + SELECT = 359, + SHL = 360, + SHR = 361, + VAARG = 362, + EXTRACTELEMENT = 363, + INSERTELEMENT = 364, + SHUFFLEVECTOR = 365, + VAARG_old = 366, + VANEXT_old = 367 }; #endif /* Tokens. */ @@ -221,39 +223,41 @@ #define UDIV 336 #define SDIV 337 #define FDIV 338 -#define REM 339 -#define AND 340 -#define OR 341 -#define XOR 342 -#define SETLE 343 -#define SETGE 344 -#define SETLT 345 -#define SETGT 346 -#define SETEQ 347 -#define SETNE 348 -#define MALLOC 349 -#define ALLOCA 350 -#define FREE 351 -#define LOAD 352 -#define STORE 353 -#define GETELEMENTPTR 354 -#define PHI_TOK 355 -#define CAST 356 -#define SELECT 357 -#define SHL 358 -#define SHR 359 -#define VAARG 360 -#define EXTRACTELEMENT 361 -#define INSERTELEMENT 362 -#define SHUFFLEVECTOR 363 -#define VAARG_old 364 -#define VANEXT_old 365 +#define UREM 339 +#define SREM 340 +#define FREM 341 +#define AND 342 +#define OR 343 +#define XOR 344 +#define SETLE 345 +#define SETGE 346 +#define SETLT 347 +#define SETGT 348 +#define SETEQ 349 +#define SETNE 350 +#define MALLOC 351 +#define ALLOCA 352 +#define FREE 353 +#define LOAD 354 +#define STORE 355 +#define GETELEMENTPTR 356 +#define PHI_TOK 357 +#define CAST 358 +#define SELECT 359 +#define SHL 360 +#define SHR 361 +#define VAARG 362 +#define EXTRACTELEMENT 363 +#define INSERTELEMENT 364 +#define SHUFFLEVECTOR 365 +#define VAARG_old 366 +#define VANEXT_old 367 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 1011 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1016 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y" typedef union YYSTYPE { llvm::Module *ModuleVal; llvm::Function *FunctionVal; @@ -294,7 +298,7 @@ llvm::Module::Endianness Endianness; } YYSTYPE; /* Line 1447 of yacc.c. */ -#line 298 "llvmAsmParser.tab.h" +#line 302 "llvmAsmParser.tab.h" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 Index: llvm/lib/AsmParser/llvmAsmParser.y.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.23 llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.24 --- llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.23 Thu Oct 26 01:15:43 2006 +++ llvm/lib/AsmParser/llvmAsmParser.y.cvs Thu Nov 2 14:25:49 2006 @@ -836,7 +836,7 @@ // Depending on the opcode .. switch (OI.opcode) { default: - GenerateError("Invalid Obsolete OpCode"); + GenerateError("Invalid obsolete opCode (check Lexer.l)"); break; case Instruction::UDiv: // Handle cases where the opcode needs to change @@ -845,12 +845,17 @@ else if (Ty->isSigned()) OI.opcode = Instruction::SDiv; break; + case Instruction::URem: + if (Ty->isFloatingPoint()) + OI.opcode = Instruction::FRem; + else if (Ty->isSigned()) + OI.opcode = Instruction::SRem; + break; } // Its not obsolete any more, we fixed it. OI.obsolete = false; } - - + // common code from the two 'RunVMAsmParser' functions static Module* RunParser(Module * M) { @@ -1113,7 +1118,7 @@ // Binary Operators %type ArithmeticOps LogicalOps SetCondOps // Binops Subcatagories -%token ADD SUB MUL UDIV SDIV FDIV REM AND OR XOR +%token ADD SUB MUL UDIV SDIV FDIV UREM SREM FREM AND OR XOR %token SETLE SETGE SETLT SETGT SETEQ SETNE // Binary Comparators // Memory Instructions @@ -1151,7 +1156,7 @@ // Operations that are notably excluded from this list include: // RET, BR, & SWITCH because they end basic blocks and are treated specially. // -ArithmeticOps: ADD | SUB | MUL | UDIV | SDIV | FDIV | REM ; +ArithmeticOps: ADD | SUB | MUL | UDIV | SDIV | FDIV | UREM | SREM | FREM; LogicalOps : AND | OR | XOR; SetCondOps : SETLE | SETGE | SETLT | SETGT | SETEQ | SETNE; @@ -2465,8 +2470,11 @@ !isa((*$2).get())) GEN_ERROR( "Arithmetic operator requires integer, FP, or packed operands!"); - if (isa((*$2).get()) && $1.opcode == Instruction::Rem) - GEN_ERROR("Rem not supported on packed types!"); + if (isa((*$2).get()) && + ($1.opcode == Instruction::URem || + $1.opcode == Instruction::SRem || + $1.opcode == Instruction::FRem)) + GEN_ERROR("U/S/FRem not supported on packed types!"); // Upgrade the opcode from obsolete versions before we do anything with it. sanitizeOpCode($1,*$2); CHECK_FOR_ERROR; From reid at x10sys.com Thu Nov 2 14:46:31 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:46:31 -0600 Subject: [llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp Record.cpp SubtargetEmitter.cpp Message-ID: <200611022046.kA2KkVUu010387@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.274 -> 1.275 Record.cpp updated: 1.53 -> 1.54 SubtargetEmitter.cpp updated: 1.19 -> 1.20 --- Log message: For PR786: http://llvm.org/PR786 : Remove unused variables. --- Diffs of the changes: (+3 -8) DAGISelEmitter.cpp | 8 ++------ Record.cpp | 2 +- SubtargetEmitter.cpp | 1 - 3 files changed, 3 insertions(+), 8 deletions(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.274 llvm/utils/TableGen/DAGISelEmitter.cpp:1.275 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.274 Tue Oct 31 18:27:59 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Thu Nov 2 14:46:16 2006 @@ -2259,13 +2259,11 @@ unsigned OpNo = 0; bool NodeHasChain = NodeHasProperty (N, SDNPHasChain, ISE); bool HasChain = PatternHasProperty(N, SDNPHasChain, ISE); - bool HasOutFlag = PatternHasProperty(N, SDNPOutFlag, ISE); bool EmittedUseCheck = false; if (HasChain) { if (NodeHasChain) OpNo = 1; if (!isRoot) { - const SDNodeInfo &CInfo = ISE.getSDNodeInfo(N->getOperator()); // Multiple uses of actual result? emitCheck(RootName + ".hasOneUse()"); EmittedUseCheck = true; @@ -2329,7 +2327,6 @@ (PatternHasProperty(N, SDNPInFlag, ISE) || PatternHasProperty(N, SDNPOptInFlag, ISE) || PatternHasProperty(N, SDNPOutFlag, ISE))) { - const SDNodeInfo &CInfo = ISE.getSDNodeInfo(N->getOperator()); if (!EmittedUseCheck) { // Multiple uses of actual result? emitCheck(RootName + ".hasOneUse()"); @@ -3318,10 +3315,9 @@ PatternsByOpcode[Node->getOperator()].push_back(&PatternsToMatch[i]); } else { const ComplexPattern *CP; - if (IntInit *II = - dynamic_cast(Node->getLeafValue())) { + if (dynamic_cast(Node->getLeafValue())) { PatternsByOpcode[getSDNodeNamed("imm")].push_back(&PatternsToMatch[i]); - } else if ((CP = NodeGetComplexPattern(Node, *this))) { + } else if (NodeGetComplexPattern(Node, *this)) { std::vector OpNodes = CP->getRootNodes(); for (unsigned j = 0, e = OpNodes.size(); j != e; j++) { PatternsByOpcode[OpNodes[j]] Index: llvm/utils/TableGen/Record.cpp diff -u llvm/utils/TableGen/Record.cpp:1.53 llvm/utils/TableGen/Record.cpp:1.54 --- llvm/utils/TableGen/Record.cpp:1.53 Fri Mar 31 15:53:49 2006 +++ llvm/utils/TableGen/Record.cpp Thu Nov 2 14:46:16 2006 @@ -498,7 +498,7 @@ } Init *VarInit::getFieldInit(Record &R, const std::string &FieldName) const { - if (RecordRecTy *RTy = dynamic_cast(getType())) + if (dynamic_cast(getType())) if (const RecordVal *RV = R.getValue(VarName)) { Init *TheInit = RV->getValue(); assert(TheInit != this && "Infinite loop detected!"); Index: llvm/utils/TableGen/SubtargetEmitter.cpp diff -u llvm/utils/TableGen/SubtargetEmitter.cpp:1.19 llvm/utils/TableGen/SubtargetEmitter.cpp:1.20 --- llvm/utils/TableGen/SubtargetEmitter.cpp:1.19 Wed May 24 12:31:02 2006 +++ llvm/utils/TableGen/SubtargetEmitter.cpp Thu Nov 2 14:46:16 2006 @@ -355,7 +355,6 @@ // For each itinerary class std::vector &ItinList = *ProcListIter++; - unsigned ItinIndex = 0; for (unsigned j = 0, M = ItinList.size(); j < M;) { InstrItinerary &Intinerary = ItinList[j]; From reid at x10sys.com Thu Nov 2 14:55:55 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:55:55 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp Message-ID: <200611022055.kA2KttaS010520@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.92 -> 1.93 --- Log message: Remove unused variable. --- Diffs of the changes: (+0 -1) DwarfWriter.cpp | 1 - 1 files changed, 1 deletion(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.92 llvm/lib/CodeGen/DwarfWriter.cpp:1.93 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.92 Thu Nov 2 14:25:49 2006 +++ llvm/lib/CodeGen/DwarfWriter.cpp Thu Nov 2 14:55:40 2006 @@ -1508,7 +1508,6 @@ // Extract the basic information. const std::string &Name = MemberDesc->getName(); - TypeDesc *MemTy = MemberDesc->getFromType(); uint64_t Size = MemberDesc->getSize(); uint64_t Align = MemberDesc->getAlign(); uint64_t Offset = MemberDesc->getOffset(); From reid at x10sys.com Thu Nov 2 15:07:54 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 15:07:54 -0600 Subject: [llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp Message-ID: <200611022107.kA2L7sMj010760@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.275 -> 1.276 --- Log message: Revert last patch which causes tblgen to segfault (why, I'm not sure). --- Diffs of the changes: (+6 -2) DAGISelEmitter.cpp | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.275 llvm/utils/TableGen/DAGISelEmitter.cpp:1.276 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.275 Thu Nov 2 14:46:16 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Thu Nov 2 15:07:40 2006 @@ -2259,11 +2259,13 @@ unsigned OpNo = 0; bool NodeHasChain = NodeHasProperty (N, SDNPHasChain, ISE); bool HasChain = PatternHasProperty(N, SDNPHasChain, ISE); + bool HasOutFlag = PatternHasProperty(N, SDNPOutFlag, ISE); bool EmittedUseCheck = false; if (HasChain) { if (NodeHasChain) OpNo = 1; if (!isRoot) { + const SDNodeInfo &CInfo = ISE.getSDNodeInfo(N->getOperator()); // Multiple uses of actual result? emitCheck(RootName + ".hasOneUse()"); EmittedUseCheck = true; @@ -2327,6 +2329,7 @@ (PatternHasProperty(N, SDNPInFlag, ISE) || PatternHasProperty(N, SDNPOptInFlag, ISE) || PatternHasProperty(N, SDNPOutFlag, ISE))) { + const SDNodeInfo &CInfo = ISE.getSDNodeInfo(N->getOperator()); if (!EmittedUseCheck) { // Multiple uses of actual result? emitCheck(RootName + ".hasOneUse()"); @@ -3315,9 +3318,10 @@ PatternsByOpcode[Node->getOperator()].push_back(&PatternsToMatch[i]); } else { const ComplexPattern *CP; - if (dynamic_cast(Node->getLeafValue())) { + if (IntInit *II = + dynamic_cast(Node->getLeafValue())) { PatternsByOpcode[getSDNodeNamed("imm")].push_back(&PatternsToMatch[i]); - } else if (NodeGetComplexPattern(Node, *this)) { + } else if ((CP = NodeGetComplexPattern(Node, *this))) { std::vector OpNodes = CP->getRootNodes(); for (unsigned j = 0, e = OpNodes.size(); j != e; j++) { PatternsByOpcode[OpNodes[j]] From reid at x10sys.com Thu Nov 2 14:27:03 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:03 -0600 Subject: [llvm-commits] CVS: llvm/lib/Analysis/IPA/Andersens.cpp Message-ID: <200611022027.kA2KR3Wi009898@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/IPA: Andersens.cpp updated: 1.33 -> 1.34 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+0 -1) Andersens.cpp | 1 - 1 files changed, 1 deletion(-) Index: llvm/lib/Analysis/IPA/Andersens.cpp diff -u llvm/lib/Analysis/IPA/Andersens.cpp:1.33 llvm/lib/Analysis/IPA/Andersens.cpp:1.34 --- llvm/lib/Analysis/IPA/Andersens.cpp:1.33 Sun Aug 27 20:02:49 2006 +++ llvm/lib/Analysis/IPA/Andersens.cpp Thu Nov 2 14:25:49 2006 @@ -374,7 +374,6 @@ if (Function *F = CS.getCalledFunction()) if (F->isExternal()) { Node *N1 = getNode(P); - bool PointsToUniversalSet = false; if (N1->begin() == N1->end()) return NoModRef; // P doesn't point to anything. From reid at x10sys.com Thu Nov 2 14:27:00 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:00 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Message-ID: <200611022027.kA2KR0bs009833@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64ISelDAGToDAG.cpp updated: 1.59 -> 1.60 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+3 -5) IA64ISelDAGToDAG.cpp | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) Index: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp diff -u llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.59 llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.60 --- llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.59 Tue Oct 24 12:09:43 2006 +++ llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Thu Nov 2 14:25:49 2006 @@ -337,11 +337,9 @@ dyn_cast(N->getOperand(1))) { CallOpcode = IA64::BRCALL_IPREL_GA; CallOperand = CurDAG->getTargetGlobalAddress(GASD->getGlobal(), MVT::i64); - } else if (ExternalSymbolSDNode *ESSDN = // FIXME: we currently NEED this - // case for correctness, to avoid - // "non-pic code with imm reloc.n - // against dynamic symbol" errors - dyn_cast(N->getOperand(1))) { + } else if (isa(N->getOperand(1))) { + // FIXME: we currently NEED this case for correctness, to avoid + // "non-pic code with imm reloc.n against dynamic symbol" errors CallOpcode = IA64::BRCALL_IPREL_ES; CallOperand = N->getOperand(1); } else { From reid at x10sys.com Thu Nov 2 14:27:01 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 14:27:01 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp PPCCodeEmitter.cpp PPCISelDAGToDAG.cpp PPCISelLowering.cpp PPCMachOWriter.cpp PPCRegisterInfo.cpp Message-ID: <200611022027.kA2KR1dG009862@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCAsmPrinter.cpp updated: 1.205 -> 1.206 PPCCodeEmitter.cpp updated: 1.67 -> 1.68 PPCISelDAGToDAG.cpp updated: 1.212 -> 1.213 PPCISelLowering.cpp updated: 1.217 -> 1.218 PPCMachOWriter.cpp updated: 1.5 -> 1.6 PPCRegisterInfo.cpp updated: 1.76 -> 1.77 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+1 -9) PPCAsmPrinter.cpp | 2 -- PPCCodeEmitter.cpp | 1 - PPCISelDAGToDAG.cpp | 2 -- PPCISelLowering.cpp | 2 -- PPCMachOWriter.cpp | 2 +- PPCRegisterInfo.cpp | 1 - 6 files changed, 1 insertion(+), 9 deletions(-) Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.205 llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.206 --- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.205 Tue Oct 31 02:31:24 2006 +++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Thu Nov 2 14:25:49 2006 @@ -249,7 +249,6 @@ DarwinAsmPrinter(std::ostream &O, PPCTargetMachine &TM, const TargetAsmInfo *T) : PPCAsmPrinter(O, TM, T), DW(O, this, T) { - bool isPPC64 = Subtarget.isPPC64(); } virtual const char *getPassName() const { @@ -308,7 +307,6 @@ // Computing the address of a global symbol, not calling it. GlobalValue *GV = MO.getGlobal(); std::string Name = Mang->getValueName(GV); - int offset = MO.getOffset(); // External or weakly linked global variables need non-lazily-resolved stubs if (TM.getRelocationModel() != Reloc::Static) { Index: llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp diff -u llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.67 llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.68 --- llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.67 Sun Aug 27 07:54:01 2006 +++ llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp Thu Nov 2 14:25:49 2006 @@ -91,7 +91,6 @@ for (MachineBasicBlock::iterator I = MBB.begin(), E = MBB.end(); I != E; ++I){ MachineInstr &MI = *I; - unsigned Opcode = MI.getOpcode(); switch (MI.getOpcode()) { default: MCE.emitWordBE(getBinaryCodeForInstr(*I)); Index: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp diff -u llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.212 llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.213 --- llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.212 Mon Oct 30 17:02:25 2006 +++ llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Thu Nov 2 14:25:49 2006 @@ -1134,7 +1134,6 @@ SDOperand CCReg = SelectCC(N->getOperand(0), N->getOperand(1), CC); unsigned BROpc = getBCCForSetCC(CC); - bool isFP = MVT::isFloatingPoint(N->getValueType(0)); unsigned SelectCCOp; if (N->getValueType(0) == MVT::i32) SelectCCOp = PPC::SELECT_CC_I4; @@ -1218,7 +1217,6 @@ SDOperand Chain(0, 0); SDOperand N1(0, 0); SDOperand Tmp0(0, 0); - SDNode *ResNode; Chain = N.getOperand(0); N1 = N.getOperand(1); Index: llvm/lib/Target/PowerPC/PPCISelLowering.cpp diff -u llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.217 llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.218 --- llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.217 Wed Nov 1 19:44:04 2006 +++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp Thu Nov 2 14:25:49 2006 @@ -942,9 +942,7 @@ static SDOperand LowerCALL(SDOperand Op, SelectionDAG &DAG) { SDOperand Chain = Op.getOperand(0); - unsigned CallingConv= cast(Op.getOperand(1))->getValue(); bool isVarArg = cast(Op.getOperand(2))->getValue() != 0; - bool isTailCall = cast(Op.getOperand(3))->getValue() != 0; SDOperand Callee = Op.getOperand(4); unsigned NumOps = (Op.getNumOperands() - 5) / 2; Index: llvm/lib/Target/PowerPC/PPCMachOWriter.cpp diff -u llvm/lib/Target/PowerPC/PPCMachOWriter.cpp:1.5 llvm/lib/Target/PowerPC/PPCMachOWriter.cpp:1.6 --- llvm/lib/Target/PowerPC/PPCMachOWriter.cpp:1.5 Sun Sep 10 18:03:44 2006 +++ llvm/lib/Target/PowerPC/PPCMachOWriter.cpp Thu Nov 2 14:25:49 2006 @@ -99,7 +99,7 @@ case PPC::reloc_pcrel_bx: Addr -= MR.getMachineCodeOffset(); Addr >>= 2; - Addr & 0xFFFFFF; + // ??? Addr & 0xFFFFFF; Possibly this was supposed to be Addr &= 0xFFFFFF ? Addr <<= 2; Addr |= (MOS.SectionData[MR.getMachineCodeOffset()] << 24); fixword(MOS.SectionData, Addr, MR.getMachineCodeOffset()); Index: llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp diff -u llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.76 llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.77 --- llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.76 Mon Sep 4 21:31:13 2006 +++ llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp Thu Nov 2 14:25:49 2006 @@ -370,7 +370,6 @@ // static bool hasFP(const MachineFunction &MF) { const MachineFrameInfo *MFI = MF.getFrameInfo(); - unsigned TargetAlign = MF.getTarget().getFrameInfo()->getStackAlignment(); // If frame pointers are forced, or if there are variable sized stack objects, // use a frame pointer. From jlaskey at apple.com Thu Nov 2 15:48:33 2006 From: jlaskey at apple.com (Jim Laskey) Date: Thu, 2 Nov 2006 15:48:33 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp Message-ID: <200611022148.kA2LmXoJ011710@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.93 -> 1.94 --- Log message: 1. Hash not quite right for DIEValues. 2. Not going to use Usage (no significant benefit.) --- Diffs of the changes: (+10 -25) DwarfWriter.cpp | 35 ++++++++++------------------------- 1 files changed, 10 insertions(+), 25 deletions(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.93 llvm/lib/CodeGen/DwarfWriter.cpp:1.94 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.93 Thu Nov 2 14:55:40 2006 +++ llvm/lib/CodeGen/DwarfWriter.cpp Thu Nov 2 15:48:18 2006 @@ -354,19 +354,13 @@ /// unsigned Type; - /// Usage - Number of uses of this value. - /// - unsigned Usage; - DIEValue(unsigned T) : Type(T) - , Usage(1) {} virtual ~DIEValue() {} + // Accessors unsigned getType() const { return Type; } - unsigned getUsage() const { return Usage; } - void IncUsage() { ++Usage; } // Implement isa/cast/dyncast. static bool classof(const DIEValue *) { return true; } @@ -445,6 +439,7 @@ /// Profile - Used to gather unique data for the value folding set. /// virtual void Profile(FoldingSetNodeID &ID) { + ID.AddInteger(isInteger); ID.AddInteger(Integer); } @@ -482,6 +477,7 @@ /// Profile - Used to gather unique data for the value folding set. /// virtual void Profile(FoldingSetNodeID &ID) { + ID.AddInteger(isString); ID.AddString(String); } @@ -517,6 +513,7 @@ /// Profile - Used to gather unique data for the value folding set. /// virtual void Profile(FoldingSetNodeID &ID) { + ID.AddInteger(isLabel); Label.Profile(ID); } @@ -553,6 +550,7 @@ /// Profile - Used to gather unique data for the value folding set. /// virtual void Profile(FoldingSetNodeID &ID) { + ID.AddInteger(isAsIsLabel); ID.AddString(Label); } @@ -589,6 +587,7 @@ /// Profile - Used to gather unique data for the value folding set. /// virtual void Profile(FoldingSetNodeID &ID){ + ID.AddInteger(isDelta); LabelHi.Profile(ID); LabelLo.Profile(ID); } @@ -630,6 +629,8 @@ /// Profile - Used to gather unique data for the value folding set. /// virtual void Profile(FoldingSetNodeID &ID) { + ID.AddInteger(isEntry); + if (Entry) { ID.AddPointer(Entry); } else { @@ -688,6 +689,7 @@ /// Profile - Used to gather unique data for the value folding set. /// virtual void DIEBlock::Profile(FoldingSetNodeID &ID) { + ID.AddInteger(isBlock); DIE::Profile(ID); } @@ -1147,10 +1149,7 @@ void *Where; Value = static_cast(ValuesSet.FindNodeOrInsertPos(ID, Where)); - if (Value) { - Value->IncUsage(); - return Value; - } + if (Value) return Value; Value = new DIEntry(Entry); ValuesSet.InsertNode(Value, Where); @@ -1184,8 +1183,6 @@ Value = new DIEInteger(Integer); ValuesSet.InsertNode(Value, Where); Values.push_back(Value); - } else { - Value->IncUsage(); } Die->AddValue(Attribute, Form, Value); @@ -1204,8 +1201,6 @@ Value = new DIEInteger(Integer); ValuesSet.InsertNode(Value, Where); Values.push_back(Value); - } else { - Value->IncUsage(); } Die->AddValue(Attribute, Form, Value); @@ -1223,8 +1218,6 @@ Value = new DIEString(String); ValuesSet.InsertNode(Value, Where); Values.push_back(Value); - } else { - Value->IncUsage(); } Die->AddValue(Attribute, Form, Value); @@ -1242,8 +1235,6 @@ Value = new DIEDwarfLabel(Label); ValuesSet.InsertNode(Value, Where); Values.push_back(Value); - } else { - Value->IncUsage(); } Die->AddValue(Attribute, Form, Value); @@ -1261,8 +1252,6 @@ Value = new DIEObjectLabel(Label); ValuesSet.InsertNode(Value, Where); Values.push_back(Value); - } else { - Value->IncUsage(); } Die->AddValue(Attribute, Form, Value); @@ -1281,8 +1270,6 @@ Value = new DIEDelta(Hi, Lo); ValuesSet.InsertNode(Value, Where); Values.push_back(Value); - } else { - Value->IncUsage(); } Die->AddValue(Attribute, Form, Value); @@ -1307,7 +1294,6 @@ ValuesSet.InsertNode(Value, Where); Values.push_back(Value); } else { - Value->IncUsage(); delete Block; } @@ -1402,7 +1388,6 @@ // If it exists then use the existing value. if (Slot) { - Slot->IncUsage(); Entity->AddValue(DW_AT_type, DW_FORM_ref4, Slot); return; } From rspencer at reidspencer.com Thu Nov 2 17:33:11 2006 From: rspencer at reidspencer.com (Reid Spencer) Date: Thu, 02 Nov 2006 15:33:11 -0800 Subject: [llvm-commits] SHR Patch (Updated) Message-ID: <1162510391.11568.201.camel@bashful.x10sys.com> Here are the SHR patches updated for recent changes on the HEAD. These replace the previous submission on Tuesday. If you're reviewing the SHR patches, please use this version now. ***NOTE: This is for review only, please don't commit any of this. Reid. -------------- next part -------------- A non-text attachment was scrubbed... Name: SHR.patch Type: text/x-patch Size: 94083 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20061102/f0cb9e6b/attachment.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: SHR.llvmgcc.patch Type: text/x-patch Size: 1862 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20061102/f0cb9e6b/attachment-0001.bin From sabre at nondot.org Thu Nov 2 17:40:08 2006 From: sabre at nondot.org (Chris Lattner) Date: Thu, 2 Nov 2006 17:40:08 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCMachOWriter.cpp Message-ID: <200611022340.kA2Ne8gq014087@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCMachOWriter.cpp updated: 1.6 -> 1.7 --- Log message: fix a bug reid noticed --- Diffs of the changes: (+1 -1) PPCMachOWriter.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/PowerPC/PPCMachOWriter.cpp diff -u llvm/lib/Target/PowerPC/PPCMachOWriter.cpp:1.6 llvm/lib/Target/PowerPC/PPCMachOWriter.cpp:1.7 --- llvm/lib/Target/PowerPC/PPCMachOWriter.cpp:1.6 Thu Nov 2 14:25:49 2006 +++ llvm/lib/Target/PowerPC/PPCMachOWriter.cpp Thu Nov 2 17:39:53 2006 @@ -99,7 +99,7 @@ case PPC::reloc_pcrel_bx: Addr -= MR.getMachineCodeOffset(); Addr >>= 2; - // ??? Addr & 0xFFFFFF; Possibly this was supposed to be Addr &= 0xFFFFFF ? + Addr &= 0xFFFFFF; Addr <<= 2; Addr |= (MOS.SectionData[MR.getMachineCodeOffset()] << 24); fixword(MOS.SectionData, Addr, MR.getMachineCodeOffset()); From rafael.espindola at gmail.com Thu Nov 2 17:49:07 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Thu, 2 Nov 2006 17:49:07 -0600 Subject: [llvm-commits] CVS: llvm/lib/Support/FoldingSet.cpp Message-ID: <200611022349.kA2Nn7TY014224@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: FoldingSet.cpp updated: 1.9 -> 1.10 --- Log message: #include --- Diffs of the changes: (+1 -0) FoldingSet.cpp | 1 + 1 files changed, 1 insertion(+) Index: llvm/lib/Support/FoldingSet.cpp diff -u llvm/lib/Support/FoldingSet.cpp:1.9 llvm/lib/Support/FoldingSet.cpp:1.10 --- llvm/lib/Support/FoldingSet.cpp:1.9 Thu Nov 2 08:21:26 2006 +++ llvm/lib/Support/FoldingSet.cpp Thu Nov 2 17:48:53 2006 @@ -16,6 +16,7 @@ #include "llvm/ADT/FoldingSet.h" #include "llvm/Support/MathExtras.h" +#include using namespace llvm; //===----------------------------------------------------------------------===// From reid at x10sys.com Thu Nov 2 17:56:35 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 17:56:35 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp Makefile Message-ID: <200611022356.kA2NuZU7014358@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.94 -> 1.95 Makefile updated: 1.28 -> 1.29 --- Log message: Make CodeGen libs -pedantic clean. --- Diffs of the changes: (+1 -4) DwarfWriter.cpp | 2 +- Makefile | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.94 llvm/lib/CodeGen/DwarfWriter.cpp:1.95 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.94 Thu Nov 2 15:48:18 2006 +++ llvm/lib/CodeGen/DwarfWriter.cpp Thu Nov 2 17:56:21 2006 @@ -688,7 +688,7 @@ /// Profile - Used to gather unique data for the value folding set. /// - virtual void DIEBlock::Profile(FoldingSetNodeID &ID) { + virtual void Profile(FoldingSetNodeID &ID) { ID.AddInteger(isBlock); DIE::Profile(ID); } Index: llvm/lib/CodeGen/Makefile diff -u llvm/lib/CodeGen/Makefile:1.28 llvm/lib/CodeGen/Makefile:1.29 --- llvm/lib/CodeGen/Makefile:1.28 Thu Jul 20 12:27:58 2006 +++ llvm/lib/CodeGen/Makefile Thu Nov 2 17:56:21 2006 @@ -13,6 +13,3 @@ BUILD_ARCHIVE = 1 include $(LEVEL)/Makefile.common - -CompileCommonOpts := $(filter-out -pedantic,$(CompileCommonOpts)) -CompileCommonOpts := $(filter-out -Wno-long-long,$(CompileCommonOpts)) From reid at x10sys.com Thu Nov 2 18:01:11 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 18:01:11 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/CBackend/Makefile Message-ID: <200611030001.kA301BxE014445@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/CBackend: Makefile updated: 1.7 -> 1.8 --- Log message: Make CBackend -pedantic clean. --- Diffs of the changes: (+1 -2) Makefile | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/lib/Target/CBackend/Makefile diff -u llvm/lib/Target/CBackend/Makefile:1.7 llvm/lib/Target/CBackend/Makefile:1.8 --- llvm/lib/Target/CBackend/Makefile:1.7 Thu Jun 1 00:49:51 2006 +++ llvm/lib/Target/CBackend/Makefile Thu Nov 2 18:00:57 2006 @@ -11,5 +11,4 @@ LIBRARYNAME = LLVMCBackend include $(LEVEL)/Makefile.common -CompileCommonOpts := $(filter-out -pedantic,$(CompileCommonOpts)) -CompileCommonOpts := $(filter-out -Wno-long-long,$(CompileCommonOpts)) +CompileCommonOpts := $(CompileCommonOpts) -Wno-format From reid at x10sys.com Thu Nov 2 18:05:30 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 18:05:30 -0600 Subject: [llvm-commits] CVS: llvm/tools/llvm2cpp/Makefile Message-ID: <200611030005.kA305UtV014529@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm2cpp: Makefile updated: 1.8 -> 1.9 --- Log message: Make llvm2cpp -pedantic clean. --- Diffs of the changes: (+1 -1) Makefile | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/tools/llvm2cpp/Makefile diff -u llvm/tools/llvm2cpp/Makefile:1.8 llvm/tools/llvm2cpp/Makefile:1.9 --- llvm/tools/llvm2cpp/Makefile:1.8 Mon Sep 4 00:59:09 2006 +++ llvm/tools/llvm2cpp/Makefile Thu Nov 2 18:05:16 2006 @@ -13,4 +13,4 @@ include $(LEVEL)/Makefile.common -CompileCommonOpts := $(filter-out -pedantic,$(CompileCommonOpts)) +CompileCommonOpts := $(CompileCommonOpts) -Wno-format From reid at x10sys.com Thu Nov 2 18:08:22 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 18:08:22 -0600 Subject: [llvm-commits] CVS: llvm/projects/Stacker/lib/runtime/Makefile stacker_rt.c Message-ID: <200611030008.kA308MtF014581@zion.cs.uiuc.edu> Changes in directory llvm/projects/Stacker/lib/runtime: Makefile updated: 1.5 -> 1.6 stacker_rt.c updated: 1.10 -> 1.11 --- Log message: Make Stacker Runtime -pedantic clean. --- Diffs of the changes: (+10 -12) Makefile | 3 --- stacker_rt.c | 19 ++++++++++--------- 2 files changed, 10 insertions(+), 12 deletions(-) Index: llvm/projects/Stacker/lib/runtime/Makefile diff -u llvm/projects/Stacker/lib/runtime/Makefile:1.5 llvm/projects/Stacker/lib/runtime/Makefile:1.6 --- llvm/projects/Stacker/lib/runtime/Makefile:1.5 Wed May 31 20:55:21 2006 +++ llvm/projects/Stacker/lib/runtime/Makefile Thu Nov 2 18:08:08 2006 @@ -12,6 +12,3 @@ MODULE_NAME = stkr_runtime include $(LEVEL)/Makefile.common - -CompileCommonOpts := $(filter-out -pedantic,$(CompileCommonOpts)) -CompileCommonOpts := $(filter-out -Wno-long-long,$(CompileCommonOpts)) Index: llvm/projects/Stacker/lib/runtime/stacker_rt.c diff -u llvm/projects/Stacker/lib/runtime/stacker_rt.c:1.10 llvm/projects/Stacker/lib/runtime/stacker_rt.c:1.11 --- llvm/projects/Stacker/lib/runtime/stacker_rt.c:1.10 Sat Apr 23 16:26:10 2005 +++ llvm/projects/Stacker/lib/runtime/stacker_rt.c Thu Nov 2 18:08:08 2006 @@ -1,4 +1,4 @@ -//===-- stacker_rt.c - Runtime Support For Stacker Compiler -----*- C++ -*-===// +/*===-- stacker_rt.c - Runtime Support For Stacker Compiler -----*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -15,7 +15,7 @@ // The real reason this is here is to test LLVM's ability to link with // separately compiled software. // -//===----------------------------------------------------------------------===// +//===----------------------------------------------------------------------===*/ #include #include @@ -40,14 +40,15 @@ int main ( int argc, char** argv ) { - // Avoid modifying argc + /* Avoid modifying argc */ int a = argc; - // Make sure we're starting with the right index + /* Make sure we're starting with the right index */ _index_ = 0; - // Copy the arguments to the stack in reverse order - // so that they get popped in the order presented + /* Copy the arguments to the stack in reverse order + * so that they get popped in the order presented + */ while ( a > 0 ) { if ( isdigit( (int) argv[--a][0] ) ) @@ -60,13 +61,13 @@ } } - // Put the argument count on the stack + /* Put the argument count on the stack */ _stack_[_index_] = argc; - // Invoke the user's main program + /* Invoke the user's main program */ _MAIN_(); - // Return last item on the stack + /* Return last item on the stack */ if ( _index_ >= 0 ) return _stack_[_index_]; return -1; From reid at x10sys.com Thu Nov 2 18:10:07 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 18:10:07 -0600 Subject: [llvm-commits] CVS: llvm/projects/sample/lib/sample/Makefile sample.c Message-ID: <200611030010.kA30A7Nv014628@zion.cs.uiuc.edu> Changes in directory llvm/projects/sample/lib/sample: Makefile updated: 1.8 -> 1.9 sample.c updated: 1.4 -> 1.5 --- Log message: Make sample project -pedantic clean. --- Diffs of the changes: (+3 -5) Makefile | 3 --- sample.c | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-) Index: llvm/projects/sample/lib/sample/Makefile diff -u llvm/projects/sample/lib/sample/Makefile:1.8 llvm/projects/sample/lib/sample/Makefile:1.9 --- llvm/projects/sample/lib/sample/Makefile:1.8 Mon Aug 7 18:12:15 2006 +++ llvm/projects/sample/lib/sample/Makefile Thu Nov 2 18:09:53 2006 @@ -16,6 +16,3 @@ # Include Makefile.common so we know what to do. # include $(LEVEL)/Makefile.common - -CompileCommonOpts := $(filter-out -pedantic,$(CompileCommonOpts)) -CompileCommonOpts := $(filter-out -Wno-long-long,$(CompileCommonOpts)) Index: llvm/projects/sample/lib/sample/sample.c diff -u llvm/projects/sample/lib/sample/sample.c:1.4 llvm/projects/sample/lib/sample/sample.c:1.5 --- llvm/projects/sample/lib/sample/sample.c:1.4 Sat Apr 23 16:26:10 2005 +++ llvm/projects/sample/lib/sample/sample.c Thu Nov 2 18:09:53 2006 @@ -10,10 +10,11 @@ #include #include -// LLVM Header File +/* LLVM Header File #include "llvm/Support/DataTypes.h" +*/ -// Header file global to this project +/* Header file global to this project */ #include "sample.h" int From sabre at nondot.org Thu Nov 2 19:11:04 2006 From: sabre at nondot.org (Chris Lattner) Date: Thu, 2 Nov 2006 19:11:04 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/Sparc.h Message-ID: <200611030111.kA31B4Zd015808@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: Sparc.h updated: 1.12 -> 1.13 --- Log message: silence warnings --- Diffs of the changes: (+1 -1) Sparc.h | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/Sparc/Sparc.h diff -u llvm/lib/Target/Sparc/Sparc.h:1.12 llvm/lib/Target/Sparc/Sparc.h:1.13 --- llvm/lib/Target/Sparc/Sparc.h:1.12 Wed May 24 12:04:04 2006 +++ llvm/lib/Target/Sparc/Sparc.h Thu Nov 2 19:10:49 2006 @@ -79,7 +79,7 @@ }; } - static const char *SPARCCondCodeToString(SPCC::CondCodes CC) { + inline static const char *SPARCCondCodeToString(SPCC::CondCodes CC) { switch (CC) { default: assert(0 && "Unknown condition code"); case SPCC::ICC_NE: return "ne"; From sabre at nondot.org Thu Nov 2 19:11:19 2006 From: sabre at nondot.org (Chris Lattner) Date: Thu, 2 Nov 2006 19:11:19 -0600 Subject: [llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp Message-ID: <200611030111.kA31BJAB015822@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.276 -> 1.277 --- Log message: silence warnings --- Diffs of the changes: (+1 -5) DAGISelEmitter.cpp | 6 +----- 1 files changed, 1 insertion(+), 5 deletions(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.276 llvm/utils/TableGen/DAGISelEmitter.cpp:1.277 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.276 Thu Nov 2 15:07:40 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Thu Nov 2 19:11:05 2006 @@ -2259,13 +2259,11 @@ unsigned OpNo = 0; bool NodeHasChain = NodeHasProperty (N, SDNPHasChain, ISE); bool HasChain = PatternHasProperty(N, SDNPHasChain, ISE); - bool HasOutFlag = PatternHasProperty(N, SDNPOutFlag, ISE); bool EmittedUseCheck = false; if (HasChain) { if (NodeHasChain) OpNo = 1; if (!isRoot) { - const SDNodeInfo &CInfo = ISE.getSDNodeInfo(N->getOperator()); // Multiple uses of actual result? emitCheck(RootName + ".hasOneUse()"); EmittedUseCheck = true; @@ -2329,7 +2327,6 @@ (PatternHasProperty(N, SDNPInFlag, ISE) || PatternHasProperty(N, SDNPOptInFlag, ISE) || PatternHasProperty(N, SDNPOutFlag, ISE))) { - const SDNodeInfo &CInfo = ISE.getSDNodeInfo(N->getOperator()); if (!EmittedUseCheck) { // Multiple uses of actual result? emitCheck(RootName + ".hasOneUse()"); @@ -3318,8 +3315,7 @@ PatternsByOpcode[Node->getOperator()].push_back(&PatternsToMatch[i]); } else { const ComplexPattern *CP; - if (IntInit *II = - dynamic_cast(Node->getLeafValue())) { + if (dynamic_cast(Node->getLeafValue())) { PatternsByOpcode[getSDNodeNamed("imm")].push_back(&PatternsToMatch[i]); } else if ((CP = NodeGetComplexPattern(Node, *this))) { std::vector OpNodes = CP->getRootNodes(); From sabre at nondot.org Thu Nov 2 19:13:29 2006 From: sabre at nondot.org (Chris Lattner) Date: Thu, 2 Nov 2006 19:13:29 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Message-ID: <200611030113.kA31DTOu015904@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelDAGToDAG.cpp updated: 1.120 -> 1.121 --- Log message: silence warning --- Diffs of the changes: (+0 -6) X86ISelDAGToDAG.cpp | 6 ------ 1 files changed, 6 deletions(-) Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.120 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.121 --- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.120 Mon Oct 16 01:34:55 2006 +++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Thu Nov 2 19:13:15 2006 @@ -931,12 +931,6 @@ return false; } -static bool isRegister0(SDOperand Op) { - if (RegisterSDNode *R = dyn_cast(Op)) - return (R->getReg() == 0); - return false; -} - /// getGlobalBaseReg - Output the instructions required to put the /// base address to use for accessing globals into a register. /// From sabre at nondot.org Thu Nov 2 19:18:44 2006 From: sabre at nondot.org (Chris Lattner) Date: Thu, 2 Nov 2006 19:18:44 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaISelLowering.cpp AlphaInstrInfo.td AlphaRegisterInfo.cpp Message-ID: <200611030118.kA31Ii3t016073@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Alpha: AlphaISelLowering.cpp updated: 1.73 -> 1.74 AlphaInstrInfo.td updated: 1.134 -> 1.135 AlphaRegisterInfo.cpp updated: 1.49 -> 1.50 --- Log message: silence warnings. --- Diffs of the changes: (+1 -12) AlphaISelLowering.cpp | 6 ------ AlphaInstrInfo.td | 1 + AlphaRegisterInfo.cpp | 6 ------ 3 files changed, 1 insertion(+), 12 deletions(-) Index: llvm/lib/Target/Alpha/AlphaISelLowering.cpp diff -u llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.73 llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.74 --- llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.73 Thu Nov 2 14:25:49 2006 +++ llvm/lib/Target/Alpha/AlphaISelLowering.cpp Thu Nov 2 19:18:29 2006 @@ -383,12 +383,6 @@ return std::make_pair(RetVal, Chain); } -static int getUID() -{ - static int id = 0; - return ++id; -} - /// LowerOperation - Provide custom lowering hooks for some operations. /// SDOperand AlphaTargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) { Index: llvm/lib/Target/Alpha/AlphaInstrInfo.td diff -u llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.134 llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.135 --- llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.134 Wed Nov 1 21:05:26 2006 +++ llvm/lib/Target/Alpha/AlphaInstrInfo.td Thu Nov 2 19:18:29 2006 @@ -96,6 +96,7 @@ }]>; def immFPZ : PatLeaf<(fpimm), [{ //the only fpconstant nodes are +/- 0.0 + (void)N; // silence warning. return true; }]>; Index: llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp diff -u llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.49 llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.50 --- llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.49 Tue Oct 31 17:46:56 2006 +++ llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp Thu Nov 2 19:18:29 2006 @@ -51,12 +51,6 @@ return l - h * IMM_MULT; } -static int getUID() -{ - static int id = 0; - return ++id; -} - AlphaRegisterInfo::AlphaRegisterInfo() : AlphaGenRegisterInfo(Alpha::ADJUSTSTACKDOWN, Alpha::ADJUSTSTACKUP) { From sabre at nondot.org Thu Nov 2 19:19:45 2006 From: sabre at nondot.org (Chris Lattner) Date: Thu, 2 Nov 2006 19:19:45 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelLowering.cpp Message-ID: <200611030119.kA31JjQ3016116@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64ISelLowering.cpp updated: 1.48 -> 1.49 --- Log message: silence warning --- Diffs of the changes: (+0 -13) IA64ISelLowering.cpp | 13 ------------- 1 files changed, 13 deletions(-) Index: llvm/lib/Target/IA64/IA64ISelLowering.cpp diff -u llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.48 llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.49 --- llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.48 Mon Oct 30 02:02:39 2006 +++ llvm/lib/Target/IA64/IA64ISelLowering.cpp Thu Nov 2 19:19:31 2006 @@ -130,19 +130,6 @@ } -/// isFloatingPointZero - Return true if this is 0.0 or -0.0. -static bool isFloatingPointZero(SDOperand Op) { - if (ConstantFPSDNode *CFP = dyn_cast(Op)) - return CFP->isExactlyValue(-0.0) || CFP->isExactlyValue(0.0); - else if (ISD::isEXTLoad(Op.Val) || ISD::isNON_EXTLoad(Op.Val)) { - // Maybe this has already been legalized into the constant pool? - if (ConstantPoolSDNode *CP = dyn_cast(Op.getOperand(1))) - if (ConstantFP *CFP = dyn_cast(CP->getConstVal())) - return CFP->isExactlyValue(-0.0) || CFP->isExactlyValue(0.0); - } - return false; -} - std::vector IA64TargetLowering::LowerArguments(Function &F, SelectionDAG &DAG) { std::vector ArgValues; From reid at x10sys.com Thu Nov 2 19:28:27 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 19:28:27 -0600 Subject: [llvm-commits] CVS: llvm/utils/TableGen/SubtargetEmitter.cpp Message-ID: <200611030128.kA31SRQE016293@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: SubtargetEmitter.cpp updated: 1.20 -> 1.21 --- Log message: Don't write out variables that are never used. --- Diffs of the changes: (+0 -3) SubtargetEmitter.cpp | 3 --- 1 files changed, 3 deletions(-) Index: llvm/utils/TableGen/SubtargetEmitter.cpp diff -u llvm/utils/TableGen/SubtargetEmitter.cpp:1.20 llvm/utils/TableGen/SubtargetEmitter.cpp:1.21 --- llvm/utils/TableGen/SubtargetEmitter.cpp:1.20 Thu Nov 2 14:46:16 2006 +++ llvm/utils/TableGen/SubtargetEmitter.cpp Thu Nov 2 19:28:12 2006 @@ -374,9 +374,6 @@ // End processor itinerary table OS << "};\n"; } - - OS << "\n"; - OS << "static llvm::InstrItinerary NoItineraries[] = { {0, 0} };\n"; } // From sabre at nondot.org Thu Nov 2 19:28:44 2006 From: sabre at nondot.org (Chris Lattner) Date: Thu, 2 Nov 2006 19:28:44 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp SelectionDAG.cpp Message-ID: <200611030128.kA31SiZG016312@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: ScheduleDAGRRList.cpp updated: 1.18 -> 1.19 SelectionDAG.cpp updated: 1.365 -> 1.366 --- Log message: silence warning --- Diffs of the changes: (+0 -50) ScheduleDAGRRList.cpp | 35 ----------------------------------- SelectionDAG.cpp | 15 --------------- 2 files changed, 50 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.18 llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.19 --- llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.18 Thu Nov 2 14:25:49 2006 +++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Thu Nov 2 19:28:29 2006 @@ -155,41 +155,6 @@ // Bottom-Up Scheduling //===----------------------------------------------------------------------===// -static const TargetRegisterClass *getRegClass(SUnit *SU, - const TargetInstrInfo *TII, - const MRegisterInfo *MRI, - SSARegMap *RegMap) { - if (SU->Node->isTargetOpcode()) { - unsigned Opc = SU->Node->getTargetOpcode(); - const TargetInstrDescriptor &II = TII->get(Opc); - return MRI->getRegClass(II.OpInfo->RegClass); - } else { - assert(SU->Node->getOpcode() == ISD::CopyFromReg); - unsigned SrcReg = cast(SU->Node->getOperand(1))->getReg(); - if (MRegisterInfo::isVirtualRegister(SrcReg)) - return RegMap->getRegClass(SrcReg); - else { - for (MRegisterInfo::regclass_iterator I = MRI->regclass_begin(), - E = MRI->regclass_end(); I != E; ++I) - if ((*I)->hasType(SU->Node->getValueType(0)) && - (*I)->contains(SrcReg)) - return *I; - assert(false && "Couldn't find register class for reg copy!"); - } - return NULL; - } -} - -static unsigned getNumResults(SUnit *SU) { - unsigned NumResults = 0; - for (unsigned i = 0, e = SU->Node->getNumValues(); i != e; ++i) { - MVT::ValueType VT = SU->Node->getValueType(i); - if (VT != MVT::Other && VT != MVT::Flag) - NumResults++; - } - return NumResults; -} - /// ReleasePred - Decrement the NumSuccsLeft count of a predecessor. Add it to /// the Available queue is the count reaches zero. Also update its cycle bound. void ScheduleDAGRRList::ReleasePred(SUnit *PredSU, bool isChain, Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.365 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.366 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.365 Thu Nov 2 14:25:49 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Thu Nov 2 19:28:29 2006 @@ -39,15 +39,6 @@ return Res; } -// isInvertibleForFree - Return true if there is no cost to emitting the logical -// inverse of this node. -static bool isInvertibleForFree(SDOperand N) { - if (isa(N.Val)) return true; - if (N.Val->getOpcode() == ISD::SETCC && N.Val->hasOneUse()) - return true; - return false; -} - //===----------------------------------------------------------------------===// // ConstantFPSDNode Class //===----------------------------------------------------------------------===// @@ -255,12 +246,6 @@ // SDNode Profile Support //===----------------------------------------------------------------------===// -/// getNodeIDOpcode - Return the opcode that has been set for this NodeID. -/// -static unsigned getNodeIDOpcode(FoldingSetNodeID &ID) { - return ID.getRawData(0); -} - /// AddNodeIDOpcode - Add the node opcode to the NodeID data. /// static void AddNodeIDOpcode(FoldingSetNodeID &ID, unsigned OpC) { From sabre at nondot.org Thu Nov 2 19:35:12 2006 From: sabre at nondot.org (Chris Lattner) Date: Thu, 2 Nov 2006 19:35:12 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp Message-ID: <200611030135.kA31ZCSl016488@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: CorrelatedExprs.cpp updated: 1.37 -> 1.38 --- Log message: remove dead code --- Diffs of the changes: (+0 -13) CorrelatedExprs.cpp | 13 ------------- 1 files changed, 13 deletions(-) Index: llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp diff -u llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.37 llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.38 --- llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.37 Thu Nov 2 14:25:50 2006 +++ llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp Thu Nov 2 19:34:58 2006 @@ -1146,19 +1146,6 @@ // Relation Implementation //===----------------------------------------------------------------------===// -// CheckCondition - Return true if the specified condition is false. Bound may -// be null. -static bool CheckCondition(Constant *Bound, Constant *C, - Instruction::BinaryOps BO) { - assert(C != 0 && "C is not specified!"); - if (Bound == 0) return false; - - Constant *Val = ConstantExpr::get(BO, Bound, C); - if (ConstantBool *CB = dyn_cast(Val)) - return !CB->getValue(); // Return true if the condition is false... - return false; -} - // contradicts - Return true if the relationship specified by the operand // contradicts already known information. // From rafael.espindola at gmail.com Thu Nov 2 19:38:28 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Thu, 2 Nov 2006 19:38:28 -0600 Subject: [llvm-commits] CVS: llvm/lib/Support/FoldingSet.cpp Message-ID: <200611030138.kA31cS2B016552@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: FoldingSet.cpp updated: 1.10 -> 1.11 --- Log message: assert.h -> cassert --- Diffs of the changes: (+1 -1) FoldingSet.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Support/FoldingSet.cpp diff -u llvm/lib/Support/FoldingSet.cpp:1.10 llvm/lib/Support/FoldingSet.cpp:1.11 --- llvm/lib/Support/FoldingSet.cpp:1.10 Thu Nov 2 17:48:53 2006 +++ llvm/lib/Support/FoldingSet.cpp Thu Nov 2 19:38:14 2006 @@ -16,7 +16,7 @@ #include "llvm/ADT/FoldingSet.h" #include "llvm/Support/MathExtras.h" -#include +#include using namespace llvm; //===----------------------------------------------------------------------===// From rafael.espindola at gmail.com Thu Nov 2 19:39:40 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Thu, 2 Nov 2006 19:39:40 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMTargetMachine.cpp Message-ID: <200611030139.kA31deGi016608@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMTargetMachine.cpp updated: 1.11 -> 1.12 --- Log message: add createCFGSimplificationPass to ARMTargetMachine::addInstSelector --- Diffs of the changes: (+2 -0) ARMTargetMachine.cpp | 2 ++ 1 files changed, 2 insertions(+) Index: llvm/lib/Target/ARM/ARMTargetMachine.cpp diff -u llvm/lib/Target/ARM/ARMTargetMachine.cpp:1.11 llvm/lib/Target/ARM/ARMTargetMachine.cpp:1.12 --- llvm/lib/Target/ARM/ARMTargetMachine.cpp:1.11 Mon Oct 9 09:12:15 2006 +++ llvm/lib/Target/ARM/ARMTargetMachine.cpp Thu Nov 2 19:39:25 2006 @@ -18,6 +18,7 @@ #include "llvm/Module.h" #include "llvm/PassManager.h" #include "llvm/Target/TargetMachineRegistry.h" +#include "llvm/Transforms/Scalar.h" using namespace llvm; namespace { @@ -51,6 +52,7 @@ // Pass Pipeline Configuration bool ARMTargetMachine::addInstSelector(FunctionPassManager &PM, bool Fast) { + PM.add(createCFGSimplificationPass()); PM.add(createARMISelDag(*this)); return false; } From sabre at nondot.org Thu Nov 2 19:44:01 2006 From: sabre at nondot.org (Chris Lattner) Date: Thu, 2 Nov 2006 19:44:01 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DataStructure/DSGraphTraits.h Message-ID: <200611030144.kA31i1Vf016710@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis/DataStructure: DSGraphTraits.h updated: 1.24 -> 1.25 --- Log message: silence warning --- Diffs of the changes: (+0 -1) DSGraphTraits.h | 1 - 1 files changed, 1 deletion(-) Index: llvm/include/llvm/Analysis/DataStructure/DSGraphTraits.h diff -u llvm/include/llvm/Analysis/DataStructure/DSGraphTraits.h:1.24 llvm/include/llvm/Analysis/DataStructure/DSGraphTraits.h:1.25 --- llvm/include/llvm/Analysis/DataStructure/DSGraphTraits.h:1.24 Thu Apr 21 15:18:05 2005 +++ llvm/include/llvm/Analysis/DataStructure/DSGraphTraits.h Thu Nov 2 19:43:47 2006 @@ -110,7 +110,6 @@ }; static DSNode &dereference ( DSNode *N) { return *N; } -static const DSNode &dereferenceC(const DSNode *N) { return *N; } template <> struct GraphTraits { typedef DSNode NodeType; From reid at x10sys.com Thu Nov 2 19:45:05 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 19:45:05 -0600 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/Analyzer.cpp Message-ID: <200611030145.kA31j5rW016736@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: Analyzer.cpp updated: 1.23 -> 1.24 --- Log message: Remove some dead code. --- Diffs of the changes: (+1 -2) Analyzer.cpp | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/lib/Bytecode/Reader/Analyzer.cpp diff -u llvm/lib/Bytecode/Reader/Analyzer.cpp:1.23 llvm/lib/Bytecode/Reader/Analyzer.cpp:1.24 --- llvm/lib/Bytecode/Reader/Analyzer.cpp:1.23 Sun Sep 17 08:06:18 2006 +++ llvm/lib/Bytecode/Reader/Analyzer.cpp Thu Nov 2 19:44:51 2006 @@ -704,8 +704,7 @@ print(Out, "# of VBR Compressed Bytes", I->second.vbrCompBytes); print(Out, "# of VBR Expanded Bytes", I->second.vbrExpdBytes); print(Out, "Bytes Saved With VBR", - double(I->second.vbrExpdBytes) - I->second.vbrCompBytes), - double(I->second.vbrExpdBytes); + double(I->second.vbrExpdBytes) - I->second.vbrCompBytes); } ++I; } From sabre at nondot.org Thu Nov 2 19:45:27 2006 From: sabre at nondot.org (Chris Lattner) Date: Thu, 2 Nov 2006 19:45:27 -0600 Subject: [llvm-commits] CVS: llvm/utils/PerfectShuffle/PerfectShuffle.cpp Message-ID: <200611030145.kA31jRnB016770@zion.cs.uiuc.edu> Changes in directory llvm/utils/PerfectShuffle: PerfectShuffle.cpp updated: 1.9 -> 1.10 --- Log message: silence warning --- Diffs of the changes: (+2 -0) PerfectShuffle.cpp | 2 ++ 1 files changed, 2 insertions(+) Index: llvm/utils/PerfectShuffle/PerfectShuffle.cpp diff -u llvm/utils/PerfectShuffle/PerfectShuffle.cpp:1.9 llvm/utils/PerfectShuffle/PerfectShuffle.cpp:1.10 --- llvm/utils/PerfectShuffle/PerfectShuffle.cpp:1.9 Thu Nov 2 14:25:50 2006 +++ llvm/utils/PerfectShuffle/PerfectShuffle.cpp Thu Nov 2 19:45:13 2006 @@ -61,9 +61,11 @@ /// getLHSOnlyMask - Given a mask that refers to its LHS and RHS, modify it to /// refer to the LHS only (for when one argument value is passed into the same /// function twice). +#if 0 static unsigned short getLHSOnlyMask(unsigned short Mask) { return Mask & 0xBBBB; // Keep only LHS and Undefs. } +#endif /// getCompressedMask - Turn a 16-bit uncompressed mask (where each elt uses 4 /// bits) into a compressed 13-bit mask, where each elt is multiplied by 9. From reid at x10sys.com Thu Nov 2 19:48:44 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 19:48:44 -0600 Subject: [llvm-commits] CVS: llvm/utils/TableGen/CodeEmitterGen.cpp Message-ID: <200611030148.kA31mi9v016832@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: CodeEmitterGen.cpp updated: 1.49 -> 1.50 --- Log message: Remove an unused variable. --- Diffs of the changes: (+1 -3) CodeEmitterGen.cpp | 4 +--- 1 files changed, 1 insertion(+), 3 deletions(-) Index: llvm/utils/TableGen/CodeEmitterGen.cpp diff -u llvm/utils/TableGen/CodeEmitterGen.cpp:1.49 llvm/utils/TableGen/CodeEmitterGen.cpp:1.50 --- llvm/utils/TableGen/CodeEmitterGen.cpp:1.49 Mon Sep 4 22:01:52 2006 +++ llvm/utils/TableGen/CodeEmitterGen.cpp Thu Nov 2 19:48:30 2006 @@ -100,10 +100,8 @@ BitsInit *BI = R->getValueAsBitsInit("Inst"); - unsigned Value = 0; - const std::vector &Vals = R->getValues(); - // Start by filling in fixed values... + unsigned Value = 0; for (unsigned i = 0, e = BI->getNumBits(); i != e; ++i) { if (BitInit *B = dynamic_cast(BI->getBit(e-i-1))) { Value |= B->getValue() << (e-i-1); From reid at x10sys.com Thu Nov 2 19:58:45 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 19:58:45 -0600 Subject: [llvm-commits] CVS: llvm/runtime/libprofile/CommonProfiling.c Message-ID: <200611030158.kA31wj8U016992@zion.cs.uiuc.edu> Changes in directory llvm/runtime/libprofile: CommonProfiling.c updated: 1.7 -> 1.8 --- Log message: Remove unused variable. --- Diffs of the changes: (+0 -1) CommonProfiling.c | 1 - 1 files changed, 1 deletion(-) Index: llvm/runtime/libprofile/CommonProfiling.c diff -u llvm/runtime/libprofile/CommonProfiling.c:1.7 llvm/runtime/libprofile/CommonProfiling.c:1.8 --- llvm/runtime/libprofile/CommonProfiling.c:1.7 Tue May 4 11:51:47 2004 +++ llvm/runtime/libprofile/CommonProfiling.c Thu Nov 2 19:58:30 2006 @@ -88,7 +88,6 @@ * appending, creating it if it does not already exist. */ if (OutFile == -1) { - off_t Offset; OutFile = open(OutputFilename, O_CREAT | O_WRONLY | O_APPEND, 0666); if (OutFile == -1) { fprintf(stderr, "LLVM profiling runtime: while opening '%s': ", From evan.cheng at apple.com Thu Nov 2 20:08:55 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 2 Nov 2006 20:08:55 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86RegisterInfo.cpp Message-ID: <200611030208.kA328tpc017231@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86RegisterInfo.cpp updated: 1.171 -> 1.172 --- Log message: Dead code. --- Diffs of the changes: (+0 -4) X86RegisterInfo.cpp | 4 ---- 1 files changed, 4 deletions(-) Index: llvm/lib/Target/X86/X86RegisterInfo.cpp diff -u llvm/lib/Target/X86/X86RegisterInfo.cpp:1.171 llvm/lib/Target/X86/X86RegisterInfo.cpp:1.172 --- llvm/lib/Target/X86/X86RegisterInfo.cpp:1.171 Fri Sep 22 16:43:59 2006 +++ llvm/lib/Target/X86/X86RegisterInfo.cpp Thu Nov 2 20:08:41 2006 @@ -1063,10 +1063,6 @@ } if (hasFP(MF)) { - // Get the offset of the stack slot for the EBP register... which is - // guaranteed to be the last slot by processFunctionBeforeFrameFinalized. - int EBPOffset = MFI->getObjectOffset(MFI->getObjectIndexEnd()-1)+SlotSize; - // mov ESP, EBP BuildMI(MBB, MBBI, Is64Bit ? X86::MOV64rr : X86::MOV32rr, 1, StackPtr). addReg(FramePtr); From evan.cheng at apple.com Thu Nov 2 21:02:32 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 2 Nov 2006 21:02:32 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h Message-ID: <200611030302.kA332Wdi018161@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: SelectionDAGNodes.h updated: 1.159 -> 1.160 --- Log message: Add isPredecessor to check whether a node is another's predecessor. --- Diffs of the changes: (+3 -0) SelectionDAGNodes.h | 3 +++ 1 files changed, 3 insertions(+) Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.159 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.160 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.159 Mon Oct 30 01:57:41 2006 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Thu Nov 2 21:02:18 2006 @@ -815,6 +815,9 @@ // isOperand - Return true if this node is an operand of N. bool isOperand(SDNode *N) const; + // isPredecessor - Return true if this node is a predecessor of N. + bool isPredecessor(SDNode *N) const; + /// getNumOperands - Return the number of values used by this operation. /// unsigned getNumOperands() const { return NumOperands; } From evan.cheng at apple.com Thu Nov 2 21:04:20 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 2 Nov 2006 21:04:20 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetLowering.h Message-ID: <200611030304.kA334K6H018207@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetLowering.h updated: 1.84 -> 1.85 --- Log message: Added a target specific hook to check whether / how a node can be transformed into a pair of base / offset nodes for pre-indexed load / store ops. --- Diffs of the changes: (+10 -0) TargetLowering.h | 10 ++++++++++ 1 files changed, 10 insertions(+) Index: llvm/include/llvm/Target/TargetLowering.h diff -u llvm/include/llvm/Target/TargetLowering.h:1.84 llvm/include/llvm/Target/TargetLowering.h:1.85 --- llvm/include/llvm/Target/TargetLowering.h:1.84 Wed Nov 1 19:39:10 2006 +++ llvm/include/llvm/Target/TargetLowering.h Thu Nov 2 21:04:06 2006 @@ -371,6 +371,16 @@ unsigned getJumpBufAlignment() const { return JumpBufAlignment; } + + /// getLegalPreIndexedAddressBase - returns true by value, base pointer and + /// offset pointer and addressing mode by reference if the node's address + /// can be legally represented as pre-indexed load / store address. + virtual bool getLegalPreIndexedAddressBase(SDNode *N, SDOperand &Base, + SDOperand &Offset, + ISD::MemOpAddrMode &AM, + SelectionDAG &DAG) { + return false; + } //===--------------------------------------------------------------------===// // TargetLowering Optimization Methods From evan.cheng at apple.com Thu Nov 2 21:05:01 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 2 Nov 2006 21:05:01 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Message-ID: <200611030305.kA33517F018231@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: LiveIntervalAnalysis.cpp updated: 1.188 -> 1.189 --- Log message: Proper check for two-addressness. --- Diffs of the changes: (+22 -7) LiveIntervalAnalysis.cpp | 29 ++++++++++++++++++++++------- 1 files changed, 22 insertions(+), 7 deletions(-) Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.188 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.189 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.188 Thu Nov 2 14:25:49 2006 +++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Thu Nov 2 21:04:46 2006 @@ -364,6 +364,25 @@ std::cerr << "%reg" << reg; } +/// isReDefinedByTwoAddr - Returns true if the Reg re-definition is due to +/// two addr elimination. +static bool isReDefinedByTwoAddr(MachineInstr *MI, unsigned Reg, + const TargetInstrInfo *TII) { + for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { + MachineOperand &MO1 = MI->getOperand(i); + if (MO1.isRegister() && MO1.isDef() && MO1.getReg() == Reg) { + for (unsigned j = i+1; j < e; ++j) { + MachineOperand &MO2 = MI->getOperand(j); + if (MO2.isRegister() && MO2.isUse() && MO2.getReg() == Reg && + TII->getOperandConstraint(MI->getOpcode(), j, + TargetInstrInfo::TIED_TO) == (int)i) + return true; + } + } + } + return false; +} + void LiveIntervals::handleVirtualRegisterDef(MachineBasicBlock *mbb, MachineBasicBlock::iterator mi, unsigned MIIdx, @@ -453,13 +472,9 @@ } else { // If this is the second time we see a virtual register definition, it // must be due to phi elimination or two addr elimination. If this is - // the result of two address elimination, then the vreg is the first - // operand, and is a def-and-use. - if (mi->getOperand(0).isRegister() && - mi->getOperand(0).getReg() == interval.reg && - mi->getNumOperands() > 1 && mi->getOperand(1).isRegister() && - mi->getOperand(1).getReg() == interval.reg && - mi->getOperand(0).isDef() && mi->getOperand(1).isUse()) { + // the result of two address elimination, then the vreg is one of the + // def-and-use register operand. + if (isReDefinedByTwoAddr(mi, interval.reg, tii_)) { // If this is a two-address definition, then we have already processed // the live range. The only problem is that we didn't realize there // are actually two values in the live interval. Because of this we From evan.cheng at apple.com Thu Nov 2 21:05:39 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 2 Nov 2006 21:05:39 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <200611030305.kA335dX9018254@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAG.cpp updated: 1.366 -> 1.367 --- Log message: Added isPredecessor. --- Diffs of the changes: (+23 -0) SelectionDAG.cpp | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.366 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.367 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.366 Thu Nov 2 19:28:29 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Thu Nov 2 21:05:24 2006 @@ -2563,6 +2563,29 @@ return false; } +static void findPredecessor(SDNode *N, const SDNode *P, bool &found, + std::set &Visited) { + if (found || !Visited.insert(N).second) + return; + + for (unsigned i = 0, e = N->getNumOperands(); !found && i != e; ++i) { + SDNode *Op = N->getOperand(i).Val; + if (Op == P) { + found = true; + return; + } + findPredecessor(Op, P, found, Visited); + } +} + +// isPredecessor - Return true if this node is a predecessor of N. +bool SDNode::isPredecessor(SDNode *N) const { + std::set Visited; + bool found = false; + findPredecessor(N, this, found, Visited); + return found; +} + uint64_t SDNode::getConstantOperandVal(unsigned Num) const { assert(Num < NumOperands && "Invalid child # of SDNode!"); return cast(OperandList[Num])->getValue(); From evan.cheng at apple.com Thu Nov 2 21:06:35 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 2 Nov 2006 21:06:35 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <200611030306.kA336ZTY018290@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.232 -> 1.233 --- Log message: Added DAG combiner transformation to generate pre-indexed loads. --- Diffs of the changes: (+112 -0) DAGCombiner.cpp | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 112 insertions(+) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.232 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.233 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.232 Thu Nov 2 14:25:49 2006 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu Nov 2 21:06:21 2006 @@ -174,6 +174,114 @@ return true; } + bool CombineToIndexedLoadStore(SDNode *N) { + SDOperand Ptr; + bool isLoad = true; + if (LoadSDNode *LD = dyn_cast(N)) { + Ptr = LD->getBasePtr(); + } else + return false; + + if (AfterLegalize && + (Ptr.getOpcode() == ISD::ADD || Ptr.getOpcode() == ISD::SUB) && + Ptr.Val->use_size() > 1) { + SDOperand BasePtr; + SDOperand Offset; + ISD::MemOpAddrMode AM = ISD::UNINDEXED; + if (TLI.getLegalPreIndexedAddressBase(N, BasePtr, Offset, AM, DAG)) { + // Try turning it into a pre-indexed load / store except when + // 1) Another use of base ptr is a predecessor of N. If ptr is folded + // that would create a cycle. + // 2) All uses are load / store ops that use it as base ptr and offset + // is just an addressing mode immediate. + // 3) If the would-be new base may not to be dead at N. FIXME: The + // proper check is too expensive (in turns of compile time) to + // check. Just make sure other uses of the new base are not also + // themselves use of loads / stores. + + bool OffIsAMImm = Offset.getOpcode() == ISD::Constant && + TLI.isLegalAddressImmediate(cast(Offset)->getValue()); + + // Check for #3. + if (OffIsAMImm && BasePtr.Val->use_size() > 1) { + for (SDNode::use_iterator I = BasePtr.Val->use_begin(), + E = BasePtr.Val->use_end(); I != E; ++I) { + SDNode *Use = *I; + if (Use == Ptr.Val) + continue; + if (Use->getOpcode() == ISD::ADD || Use->getOpcode() == ISD::SUB) { + for (SDNode::use_iterator II = Use->use_begin(), + EE = Use->use_end(); II != EE; ++II) { + SDNode *UseUse = *II; + if (UseUse->getOpcode() == ISD::LOAD && + cast(UseUse)->getBasePtr().Val == Use) + return false; + else if (UseUse->getOpcode() == ISD::STORE && + cast(UseUse)->getBasePtr().Val == Use) + return false; + } + } + } + } + + // Now check for #1 and #2. + unsigned NumRealUses = 0; + for (SDNode::use_iterator I = Ptr.Val->use_begin(), + E = Ptr.Val->use_end(); I != E; ++I) { + SDNode *Use = *I; + if (Use == N) + continue; + if (Use->isPredecessor(N)) + return false; + + if (!OffIsAMImm) + NumRealUses++; + // FIXME: Do we need a target hook here + else if (Use->getOpcode() == ISD::LOAD) { + if (cast(Use)->getBasePtr().Val != Ptr.Val) + NumRealUses++; + } else if (Use->getOpcode() == ISD::STORE) { + if (cast(Use)->getBasePtr().Val != Ptr.Val) + NumRealUses++; + } else + NumRealUses++; + } + if (NumRealUses == 0) + return false; + + SDOperand Result = + DAG.getIndexedLoad(SDOperand(N,0), BasePtr, Offset, AM); + ++NodesCombined; + DEBUG(std::cerr << "\nReplacing.4 "; N->dump(); + std::cerr << "\nWith: "; Result.Val->dump(&DAG); + std::cerr << '\n'); + std::vector NowDead; + DAG.ReplaceAllUsesOfValueWith(SDOperand(N, 0), Result.getValue(0), + NowDead); + DAG.ReplaceAllUsesOfValueWith(SDOperand(N, 1), Result.getValue(2), + NowDead); + + // Nodes can end up on the worklist more than once. Make sure we do + // not process a node that has been replaced. + for (unsigned i = 0, e = NowDead.size(); i != e; ++i) + removeFromWorkList(NowDead[i]); + // Finally, since the node is now dead, remove it from the graph. + DAG.DeleteNode(N); + + // Replace the uses of Ptr with uses of the updated base value. + DAG.ReplaceAllUsesOfValueWith(Ptr, Result.getValue(1), NowDead); + removeFromWorkList(Ptr.Val); + for (unsigned i = 0, e = NowDead.size(); i != e; ++i) + removeFromWorkList(NowDead[i]); + DAG.DeleteNode(Ptr.Val); + + return true; + } + } + + return false; + } + /// visit - call the node-specific routine that knows how to fold each /// particular type of node. SDOperand visit(SDNode *N); @@ -2752,6 +2860,10 @@ } } + // Try transforming N to an indexed load. + if (CombineToIndexedLoadStore(N)) + return SDOperand(N, 0); + return SDOperand(); } From rafael.espindola at gmail.com Thu Nov 2 21:08:42 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Thu, 2 Nov 2006 21:08:42 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMTargetMachine.cpp Message-ID: <200611030308.kA338ghD018342@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMTargetMachine.cpp updated: 1.12 -> 1.13 --- Log message: revert previous patch --- Diffs of the changes: (+0 -2) ARMTargetMachine.cpp | 2 -- 1 files changed, 2 deletions(-) Index: llvm/lib/Target/ARM/ARMTargetMachine.cpp diff -u llvm/lib/Target/ARM/ARMTargetMachine.cpp:1.12 llvm/lib/Target/ARM/ARMTargetMachine.cpp:1.13 --- llvm/lib/Target/ARM/ARMTargetMachine.cpp:1.12 Thu Nov 2 19:39:25 2006 +++ llvm/lib/Target/ARM/ARMTargetMachine.cpp Thu Nov 2 21:08:28 2006 @@ -18,7 +18,6 @@ #include "llvm/Module.h" #include "llvm/PassManager.h" #include "llvm/Target/TargetMachineRegistry.h" -#include "llvm/Transforms/Scalar.h" using namespace llvm; namespace { @@ -52,7 +51,6 @@ // Pass Pipeline Configuration bool ARMTargetMachine::addInstSelector(FunctionPassManager &PM, bool Fast) { - PM.add(createCFGSimplificationPass()); PM.add(createARMISelDag(*this)); return false; } From reid at x10sys.com Thu Nov 2 21:30:49 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Nov 2006 21:30:49 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <200611030330.kA33UnR9018684@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.233 -> 1.234 --- Log message: Remove dead variable. Fix 80 column violations. --- Diffs of the changes: (+3 -3) DAGCombiner.cpp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.233 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.234 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.233 Thu Nov 2 21:06:21 2006 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu Nov 2 21:30:34 2006 @@ -176,7 +176,6 @@ bool CombineToIndexedLoadStore(SDNode *N) { SDOperand Ptr; - bool isLoad = true; if (LoadSDNode *LD = dyn_cast(N)) { Ptr = LD->getBasePtr(); } else @@ -200,7 +199,8 @@ // themselves use of loads / stores. bool OffIsAMImm = Offset.getOpcode() == ISD::Constant && - TLI.isLegalAddressImmediate(cast(Offset)->getValue()); + TLI.isLegalAddressImmediate( + cast(Offset)->getValue()); // Check for #3. if (OffIsAMImm && BasePtr.Val->use_size() > 1) { @@ -209,7 +209,7 @@ SDNode *Use = *I; if (Use == Ptr.Val) continue; - if (Use->getOpcode() == ISD::ADD || Use->getOpcode() == ISD::SUB) { + if (Use->getOpcode() == ISD::ADD || Use->getOpcode() == ISD::SUB){ for (SDNode::use_iterator II = Use->use_begin(), EE = Use->use_end(); II != EE; ++II) { SDNode *UseUse = *II; From clattner at apple.com Thu Nov 2 23:01:02 2006 From: clattner at apple.com (Chris Lattner) Date: Thu, 2 Nov 2006 21:01:02 -0800 Subject: [llvm-commits] SHR Patch (Updated) [llvm-gccpart] In-Reply-To: <1162510391.11568.201.camel@bashful.x10sys.com> References: <1162510391.11568.201.camel@bashful.x10sys.com> Message-ID: The llvm-gcc part looks good, but you might as well do this for the future: Instead of: @@ -1723,7 +1728,8 @@ } Value *ShAmt = ConstantInt::get(Type::UByteTy, ValSizeInBits- LV.BitSize); - Val = new ShiftInst(Instruction::Shr, Val, ShAmt, "tmp", CurBB); + Val = new ShiftInst(Val->getType()->isSigned() ? + Instruction::AShr : Instruction::LShr, Val, ShAmt, "tmp", CurBB); } return CastToType(Val, ConvertType(TREE_TYPE(exp))); Select AShr or LShr based on TYPE_UNSIGNED(TREE_TYPE(exp)) instead of getType()->isSigned(). When you eliminate signedness you'll have to do this anyway. -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20061102/aab05033/attachment.html From clattner at apple.com Thu Nov 2 23:29:14 2006 From: clattner at apple.com (Chris Lattner) Date: Thu, 2 Nov 2006 21:29:14 -0800 Subject: [llvm-commits] SHR Patch (Updated) #2/3 [noninstcombine part] In-Reply-To: <1162510391.11568.201.camel@bashful.x10sys.com> References: <1162510391.11568.201.camel@bashful.x10sys.com> Message-ID: On Nov 2, 2006, at 3:33 PM, Reid Spencer wrote: > Here are the SHR patches updated for recent changes on the HEAD. These > replace the previous submission on Tuesday. If you're reviewing > the SHR > patches, please use this version now. > > ***NOTE: This is for review only, please don't commit any of this. > > Reid. > > > *** In LangRef.html, please make the "Overview" sections of each instr mention the word "logical" or "arithmetic". *** In a follow-on patch, please replace all uses of ConstantExpr::get [US]Shr with ConstantExpr::get[LA]Shr. Please do this after committing this patch though, to ease review. *** I should have asked for this before, but in CWriter::printConstExprCast, please name 'result' something more useful, like "NeedsExplicitCast" or something. likewise in writeInstructionCast. *** In SROA::ConvertUsesToScalar, the shift should always be a logical shift. Since the top bits are truncated away, it doesn't matter which one you use and lshr is cheaper. *** In ConstantFolding.cpp, all of these cases: static Constant *Shl(const ConstantPacked *V1, const ConstantPacked *V2) { return EvalVectorOp(V1, V2, ConstantExpr::getShl); } - static Constant *Shr(const ConstantPacked *V1, const ConstantPacked *V2) { - return EvalVectorOp(V1, V2, ConstantExpr::getShr); + static Constant *LShr(const ConstantPacked *V1, const ConstantPacked *V2) { + return EvalVectorOp(V1, V2, ConstantExpr::getLShr); + } + static Constant *AShr(const ConstantPacked *V1, const ConstantPacked *V2) { + return EvalVectorOp(V1, V2, ConstantExpr::getAShr); } are dead, because we don't support shifting of vectors. *** In ConstantFolding.cpp, this comment is incorrect: + case Instruction::AShr: + if (!isa(V2)) + return const_cast(V1); // undef ashr X --> X It is actually "... --> undef". Otherwise, looks good. -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20061102/e67034fd/attachment.html From clattner at apple.com Thu Nov 2 23:42:31 2006 From: clattner at apple.com (Chris Lattner) Date: Thu, 2 Nov 2006 21:42:31 -0800 Subject: [llvm-commits] SHR Patch (Updated) #3/3 instcombine part In-Reply-To: <1162510391.11568.201.camel@bashful.x10sys.com> References: <1162510391.11568.201.camel@bashful.x10sys.com> Message-ID: <004551B2-15C4-4779-8F3B-6F340B380E08@apple.com> On Nov 2, 2006, at 3:33 PM, Reid Spencer wrote: > Here are the SHR patches updated for recent changes on the HEAD. These > replace the previous submission on Tuesday. If you're reviewing > the SHR > patches, please use this version now. > > ***NOTE: This is for review only, please don't commit any of this. @@ -1143,52 +1175,40 @@ bool InstCombiner::SimplifyDemandedBits( ... + // If the input sign bit is known to be zero, or if none of the top bits + // are demanded, turn this into an unsigned shift right. + if ((KnownZero & SignBit) || (HighBits & ~DemandedMask) == HighBits) { + // Convert the input to unsigned. + Value *NewVal = InsertCastBefore(I->getOperand(0), + I->getType()->getUnsignedVersion(), *I); + // Perform the unsigned shift right. + NewVal = new ShiftInst(Instruction::LShr, NewVal, SA, I- >getName()); + InsertNewInstBefore(cast(NewVal), *I); + // Then cast that to the destination type. + NewVal = new CastInst(NewVal, I->getType(), I->getName()); + InsertNewInstBefore(cast(NewVal), *I); + return UpdateValueUsesWith(I, NewVal); No need for the casts: just replace the single instruction with an lshr. @@ -1897,33 +1917,50 @@ Instruction *InstCombiner::visitSub(Bina // -((uint)X >> 31) -> ((int)X >> 31) // -((int)X >> 31) -> ((uint)X >> 31) if (C->isNullValue()) { Value *NoopCastedRHS = RemoveNoopCast(Op1); if (ShiftInst *SI = dyn_cast(NoopCastedRHS)) - if (SI->getOpcode() == Instruction::Shr) + if (SI->getOpcode() == Instruction::LShr) { if (ConstantInt *CU = dyn_cast(SI->getOperand (1))) { - const Type *NewTy; - if (SI->getType()->isSigned()) - NewTy = SI->getType()->getUnsignedVersion(); - else - NewTy = SI->getType()->getSignedVersion(); + const Type *NewTy = SI->getType()->getSignedVersion(); // Check to see if we are shifting out everything but the sign bit. if (CU->getZExtValue() == SI->getType()->getPrimitiveSizeInBits()-1) { // Ok, the transformation is safe. Insert a cast of the incoming // value, then the new shift, then the new cast. Value *InV = InsertCastBefore(SI->getOperand(0), NewTy, I); - Instruction *NewShift = new ShiftInst (Instruction::Shr, InV, + Instruction *NewShift = new ShiftInst (Instruction::AShr, InV, CU, SI->getName ()); if (NewShift->getType() == I.getType()) return NewShift; else { InsertNewInstBefore(NewShift, I); return new CastInst(NewShift, I.getType()); } } } + } + else if (SI->getOpcode() == Instruction::AShr) { + if (ConstantInt *CU = dyn_cast(SI->getOperand (1))) { + const Type *NewTy = SI->getType()->getUnsignedVersion(); + // Check to see if we are shifting out everything but the sign bit. + if (CU->getZExtValue() == + SI->getType()->getPrimitiveSizeInBits()-1) { + // Ok, the transformation is safe. Insert a cast of the incoming + // value, then the new shift, then the new cast. + Value *InV = InsertCastBefore(SI->getOperand(0), NewTy, I); + Instruction *NewShift = new ShiftInst (Instruction::LShr, InV, + CU, SI->getName()); + if (NewShift->getType() == I.getType()) + return NewShift; + else { + InsertNewInstBefore(NewShift, I); + return new CastInst(NewShift, I.getType()); + } + } + } + } *** Likewise here, your transformation is fine, but please eliminate the cast insertion. @@ -2292,11 +2329,11 @@ Instruction *InstCombiner::visitUDiv(Bin N = InsertCastBefore(N, NTy, I); } Constant *C2V = ConstantInt::get(NTy, C2); N = InsertNewInstBefore(BinaryOperator::createAdd(N, C2V, "tmp"), I); } - Instruction* Result = new ShiftInst(Instruction::Shr, Op0, N); + Instruction* Result = new ShiftInst(Instruction::LShr, Op0, N); if (!isSigned) return Result; InsertNewInstBefore(Result, I); return new CastInst(Result, NTy->getSignedVersion(), I.getName()); } This hunk should be more aggressive, to eliminate cast insertion. I'd like to see something like this (this is a quick hack, please review it for correctness): // If the setcc is true iff the sign bit of X is set, then convert this // multiply into a shift/and combination. if (isa(SCIOp1) && isSignBitCheck(SCI->getOpcode(), SCIOp0, cast (SCIOp1))) { // Shift the X value right to turn it into "all signbits". Constant *Amt = ConstantInt::get(Type::UByteTy, SCOpTy- >getPrimitiveSizeInBits()-1); Value *V = InsertNewInstBefore(new ShiftInst(Instruction::LShr, SCIOp0, Amt, BoolCast->getOperand(0)- >getName()+ ".mask"), I); // If the multiply type is not the same as the source type, sign extend // or truncate to the multiply type. if (I.getType() != V->getType()) { if (V->getType()->isUnsigned()) V = InsertCastBefore(V, V->getType()->getSignedVersion (), I); V = InsertCastBefore(V, I.getType(), I); } @@ -2320,17 +2357,17 @@ Instruction *InstCombiner::visitUDiv(Bin if (isSigned) X = InsertCastBefore(X, X->getType()- >getUnsignedVersion(), I); // Construct the "on true" case of the select Constant *TC = ConstantInt::get(Type::UByteTy, TSA); Instruction *TSI = - new ShiftInst(Instruction::Shr, X, TC, SI->getName() +".t"); + new ShiftInst(Instruction::LShr, X, TC, SI->getName() +".t"); TSI = InsertNewInstBefore(TSI, I); Likewise. It looks like there are several other places (that I didn't list) where you could more aggressively eliminate casts. Please tackle these, then resend the patch for review. Thanks, -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20061102/bd55ff6b/attachment.html From evan.cheng at apple.com Fri Nov 3 01:19:17 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 3 Nov 2006 01:19:17 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetLowering.h Message-ID: <200611030719.kA37JH3v022743@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetLowering.h updated: 1.85 -> 1.86 --- Log message: Rename --- Diffs of the changes: (+5 -5) TargetLowering.h | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) Index: llvm/include/llvm/Target/TargetLowering.h diff -u llvm/include/llvm/Target/TargetLowering.h:1.85 llvm/include/llvm/Target/TargetLowering.h:1.86 --- llvm/include/llvm/Target/TargetLowering.h:1.85 Thu Nov 2 21:04:06 2006 +++ llvm/include/llvm/Target/TargetLowering.h Fri Nov 3 01:19:02 2006 @@ -372,13 +372,13 @@ return JumpBufAlignment; } - /// getLegalPreIndexedAddressBase - returns true by value, base pointer and + /// getPreIndexedAddressParts - returns true by value, base pointer and /// offset pointer and addressing mode by reference if the node's address /// can be legally represented as pre-indexed load / store address. - virtual bool getLegalPreIndexedAddressBase(SDNode *N, SDOperand &Base, - SDOperand &Offset, - ISD::MemOpAddrMode &AM, - SelectionDAG &DAG) { + virtual bool getPreIndexedAddressParts(SDNode *N, SDOperand &Base, + SDOperand &Offset, + ISD::MemOpAddrMode &AM, + SelectionDAG &DAG) { return false; } From evan.cheng at apple.com Fri Nov 3 01:21:31 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 3 Nov 2006 01:21:31 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <200611030721.kA37LVfO022810@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.234 -> 1.235 --- Log message: Rename --- Diffs of the changes: (+1 -1) DAGCombiner.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.234 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.235 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.234 Thu Nov 2 21:30:34 2006 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Fri Nov 3 01:21:16 2006 @@ -187,7 +187,7 @@ SDOperand BasePtr; SDOperand Offset; ISD::MemOpAddrMode AM = ISD::UNINDEXED; - if (TLI.getLegalPreIndexedAddressBase(N, BasePtr, Offset, AM, DAG)) { + if (TLI.getPreIndexedAddressParts(N, BasePtr, Offset, AM, DAG)) { // Try turning it into a pre-indexed load / store except when // 1) Another use of base ptr is a predecessor of N. If ptr is folded // that would create a cycle. From evan.cheng at apple.com Fri Nov 3 01:30:10 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 3 Nov 2006 01:30:10 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h Message-ID: <200611030730.kA37UAOS022965@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: SelectionDAGNodes.h updated: 1.160 -> 1.161 --- Log message: Fix comments. --- Diffs of the changes: (+8 -3) SelectionDAGNodes.h | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.160 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.161 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.160 Thu Nov 2 21:02:18 2006 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Fri Nov 3 01:29:55 2006 @@ -809,13 +809,18 @@ /// operation. bool hasNUsesOfValue(unsigned NUses, unsigned Value) const; - // isOnlyUse - Return true if this node is the only use of N. + /// isOnlyUse - Return true if this node is the only use of N. + /// bool isOnlyUse(SDNode *N) const; - // isOperand - Return true if this node is an operand of N. + /// isOperand - Return true if this node is an operand of N. + /// bool isOperand(SDNode *N) const; - // isPredecessor - Return true if this node is a predecessor of N. + /// isPredecessor - Return true if this node is a predecessor of N. This node + /// is either an operand of N or it can be reached by recursively traversing + /// up the operands. + /// NOTE: this is an expensive method. Use it carefully. bool isPredecessor(SDNode *N) const; /// getNumOperands - Return the number of values used by this operation. From evan.cheng at apple.com Fri Nov 3 01:31:46 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 3 Nov 2006 01:31:46 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <200611030731.kA37Vknu023015@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAG.cpp updated: 1.367 -> 1.368 --- Log message: Fix comments. --- Diffs of the changes: (+8 -3) SelectionDAG.cpp | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.367 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.368 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.367 Thu Nov 2 21:05:24 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Fri Nov 3 01:31:32 2006 @@ -2534,7 +2534,8 @@ } -// isOnlyUse - Return true if this node is the only use of N. +/// isOnlyUse - Return true if this node is the only use of N. +/// bool SDNode::isOnlyUse(SDNode *N) const { bool Seen = false; for (SDNode::use_iterator I = N->use_begin(), E = N->use_end(); I != E; ++I) { @@ -2548,7 +2549,8 @@ return Seen; } -// isOperand - Return true if this node is an operand of N. +/// isOperand - Return true if this node is an operand of N. +/// bool SDOperand::isOperand(SDNode *N) const { for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) if (*this == N->getOperand(i)) @@ -2578,7 +2580,10 @@ } } -// isPredecessor - Return true if this node is a predecessor of N. +/// isPredecessor - Return true if this node is a predecessor of N. This node +/// is either an operand of N or it can be reached by recursively traversing +/// up the operands. +/// NOTE: this is an expensive method. Use it carefully. bool SDNode::isPredecessor(SDNode *N) const { std::set Visited; bool found = false; From criswell at cs.uiuc.edu Fri Nov 3 10:32:49 2006 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri, 3 Nov 2006 10:32:49 -0600 Subject: [llvm-commits] CVS: CVSROOT/loginfo Message-ID: <200611031632.KAA19754@choi.cs.uiuc.edu> Changes in directory CVSROOT: loginfo updated: 1.12 -> 1.13 --- Log message: Testing new logging script. --- Diffs of the changes: (+1 -1) loginfo | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: CVSROOT/loginfo diff -u CVSROOT/loginfo:1.12 CVSROOT/loginfo:1.13 --- CVSROOT/loginfo:1.12 Mon Jun 26 10:55:56 2006 +++ CVSROOT/loginfo Fri Nov 3 10:32:39 2006 @@ -28,5 +28,5 @@ ^reopt /home/vadve/shared/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu ^llva-emu /home/vadve/shared/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-emu at nondot.org ^llvm-java /home/vadve/shared/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu -^privbracket /home/vadve/criswell/local/common/bin/commit-diffs.pl %{sVv} criswell at cs.uiuc.edu +^privbracket /home/vadve/criswell/local/common/bin/commit-diffs.pl %{sVv} criswell at cs.uiuc.edu jcriswel at bigw.org bpankaj2 at cs.uiuc.edu ^CVSROOT /home/vadve/shared/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu From criswell at cs.uiuc.edu Fri Nov 3 10:44:03 2006 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri, 3 Nov 2006 10:44:03 -0600 Subject: [llvm-commits] CVS: CVSROOT/commit-diffs.pl Message-ID: <200611031644.KAA19850@choi.cs.uiuc.edu> Changes in directory CVSROOT: commit-diffs.pl added (r1.1) --- Log message: Commit diffs script for InternalCVS repository. Simply is able to send email to multiple people. --- Diffs of the changes: (+240 -0) commit-diffs.pl | 240 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 240 insertions(+) Index: CVSROOT/commit-diffs.pl diff -c /dev/null CVSROOT/commit-diffs.pl:1.1 *** /dev/null Fri Nov 3 10:44:03 2006 --- CVSROOT/commit-diffs.pl Fri Nov 3 10:43:53 2006 *************** *** 0 **** --- 1,240 ---- + #! /usr/bin/perl + + use POSIX qw(uname); + + # We have to spawn another process to avoid CVS locking. + if (fork()) { + exit(0); + } + + $DEFAULT_ADMIN = 'llvm-commits\@cs.uiuc.edu'; + $DEBUG = 0; + %REALNAMESTABLE = ( + 'reid' => 'Reid Spencer ', + 'sampo' => 'Nate Begeman ', + 'jeffc' => 'Jeff Cohen ', + 'duraid' => 'Duraid Madina ', + 'jlaskey' => 'Jim Laskey ', + 'evancheng' => 'Evan Cheng ', + 'resistor' => 'Owen Anderson ', + 'rafael' => 'Rafael Espindola ', + 'ghost' => 'Vladimir Prus ', + 'dpatel' => 'Devang Patel ', + 'patjenk' => 'Patrick Jenkins ', + 'asl' => 'Anton Korobeynikov ', + 'void' => 'Bill Wendling ', + 'nicholas' => 'Nick Lewycky ', + 'lattner' => 'Chris Lattner ', + 'tbrethou' => 'Tanya Lattner ', + 'sheng' => 'Zhou Sheng ' + ); + + # A trivial script example to send mail on every CVS commit. + # The mail sent includes change summary, log message and a unidiff + # about the changes. + + # Original author: Jouni Heikniemi + # This script was improved by Misha & Chris: + # * Hacked to work under Unix + # * Displays contents of new files (`cvs diff -r0 -r1.1') + # * Displays branch name in the subject line + # Brian Gaeke added support for people who commit via 'pserver' + # using the separate CVSROOT/passwd file. + + ###################################################################### + # CVS loginfo format specifier '%{sVv}' produces items like + # 'source.c,1.2,1.3', 'source2.c,NONE,1.1' and 'source3.c,1.5,NONE' + # for change, add and remove, respectively. This method parses + # those to a hash and returns a ref to it. + + sub createChangeItem($) { #($) + my @arr = split(',', shift); + my %change; + $change{'filename'} = $arr[0]; + $change{'oldrev'} = $arr[1]; + $change{'newrev'} = $arr[2]; + if ($arr[1] eq 'NONE') { + $change{'type'} = 'add'; + } elsif ($arr[2] eq 'NONE') { + $change{'type'} = 'rm'; + } else { + $change{'type'} = 'c'; + } + return \%change; + } + + ## Main code: + + # Do a small delay so that the main CVS task finishes and + # releases locks first. + + sleep 10; + + if ($DEBUG) { + for (my $i = 0; $i <= $#ARGV; ++$i) { + print "ARGV[$i] = '$ARGV[$i]'\n"; + } + } + + # Find out who we shall send mail to + my $target = $ARGV[1] || $DEFAULT_ADMIN; + + # Manipulate the CVS's change info; see docs for further information. + my @changes = split(' ', $ARGV[0]); + my $changedir = shift @changes; + + if ($DEBUG) { + print join("\n--\n", @changes); + print "num changes: " .scalar(@changes) . "\n"; + } + + if ($changes[0] ne "-") { # Ignore " - New directory" messages + for ($j=0; $j < scalar(@changes); $j++) { + $changeItems[$j] = createChangeItem($changes[$j]); + } + } + + print "changedir: $changedir\n" if $DEBUG; + + my @loginfodata = ; + #print "loginfo: ". join("\n--\n", @loginfodata) if $DEBUG; + + # Pick up the committer's log message and branch from the loginfo we received + my @logmessage; + my $islogmessage = 0; + my $branch = ""; + + foreach $s (@loginfodata) { + if ($islogmessage) { + $s =~ s|([pP][rR]\s*([0-9]+))|$1: http://llvm.org/PR$2 |g; + $s =~ s|([bB][uU][gG]\s*([0-9]+))|$1: http://llvm.org/PR$2 |g; + @logmessage = (@logmessage, $s); + next; + } + + if ($s =~ /^Log Message:/) { + $islogmessage = 1; + next; + } elsif ($s =~ m/^\s+Tag:/) { + $branch = $s; + chop $branch; + $branch =~ s/^\s+Tag:\s(.+)/$1/; + } + } + + # Format the output + + my $msg = "\n\nChanges in directory $changedir:\n\n"; + + sub find_responsible_party { + my $newrev = $m->{'newrev'}; + my $path = "$changedir/$m->{'filename'}"; + my @histlines = + split ("\n", `cvs history -cal -f $path`); + my $DateRE = "[-:/0-9 ]+\\+[0-9]+"; + my $result = ""; + foreach my $line (@histlines) { + my ($Type, $Date, $UID, $Rev, $Filename); + if ($line =~ /([AMRUGC]) ($DateRE) ([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+)/) { + ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, $4, "$6/$5"); + if ($Rev eq $newrev && $Filename == $path) { return $UID; } + } + } + return undef; + } + + sub get_from { + my ($userid) = @_; + if (exists $REALNAMESTABLE{$userid}) { return $REALNAMESTABLE{$userid}; } + # try the system passwd database. + my ($name,$passwd,$uid,$gid,$quota,$cmnt,$gcos, at rest) = getpwnam ($userid); + if ($gcos) { return "\"$gcos\" <$userid>"; } + return "$userid"; # couldn't find it. + } + + my $diffs = ""; + my $filePath = "$changedir/"; + + foreach $m (@changeItems) { + $filePath .= "$m->{'filename'} "; + if ($m->{'type'} eq 'add') { + $msg .= "$m->{'filename'} added (r$m->{'newrev'})\n"; + $diffs .= `cvs -Qf rdiff -r0 -r$m->{'newrev'} $changedir/$m->{'filename'} 2> /dev/null` . "\n\n"; + } elsif ($m->{'type'} eq 'rm') { + $msg .= "$m->{'filename'} (r$m->{'oldrev'}) removed\n"; + } else { + $msg .= "$m->{'filename'} updated: $m->{'oldrev'} -> $m->{'newrev'}\n"; + $diffs .= `cvs -Qf rdiff -u -r $m->{'oldrev'} -r $m->{'newrev'} $changedir/$m->{'filename'} 2> /dev/null` . "\n\n"; + } + unless ($responsible_party) { + $responsible_party = get_from (find_responsible_party ()); + } + } + + # Do a simple rough count of the differences. + $msg .= "---\nLog message:\n\n" . join('', at logmessage); + my $pluses = 0; + my $minuses = 0; + foreach my $line (split /\n/, $diffs) { + if ($line !~ /^\+\+\+ /) { + if ($line !~ /^\-\-\- /) { + $pluses++ if $line =~ /^\+/; + $minuses++ if $line =~ /^\-/; + } + } + } + $msg .= "\n---\nDiffs of the changes: (+$pluses -$minuses)\n\n"; + + + # Give diffstat the diff to count. + use IPC::Open3; + my $DiffStatWrite; + my $DiffStatRead; + open3($DiffStatWrite, $DiffStatRead, "", "diffstat"); + print $DiffStatWrite $diffs; + close($DiffStatWrite); + + # Read the input back from diffstat. + my $Tmp = $/; + undef $/; # read all at once. + $msg .= <$DiffStatRead>; + $msg .= "\n\n"; + close $DiffStatRead; + $/ = $tmp; + + + # Finally, add on the diffs themselves. + $msg .= $diffs; + + # Include the branch, if applicable, into the subject line of the email + my $emailSubject = ""; + if ($branch ne "") { + $emailSubject = "[$branch]"; + } + $emailSubject .= " CVS: $filePath"; + + # The world cries out for a standard-issue version of Mail::Send. + sub send_msg { + my ($from, $to, $subject, $msg) = @_; + foreach my $prog ("/usr/lib/sendmail", "/usr/sbin/sendmail", + "/usr/libexec/sendmail") { + if (-x $prog) { $MAILERPROG = $prog; last; } + } + die "Can't find sendmail" unless $MAILERPROG && -x $MAILERPROG; + open (MAILER, "|$MAILERPROG -oi -oem -t") + or die "Can't run sendmail"; + print MAILER < Changes in directory CVSROOT: loginfo updated: 1.13 -> 1.14 --- Log message: Switch to using a new commit-diffs script for the SAFECode and Privilege Bracketing project. --- Diffs of the changes: (+2 -1) loginfo | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: CVSROOT/loginfo diff -u CVSROOT/loginfo:1.13 CVSROOT/loginfo:1.14 --- CVSROOT/loginfo:1.13 Fri Nov 3 10:32:39 2006 +++ CVSROOT/loginfo Fri Nov 3 10:48:30 2006 @@ -28,5 +28,6 @@ ^reopt /home/vadve/shared/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu ^llva-emu /home/vadve/shared/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-emu at nondot.org ^llvm-java /home/vadve/shared/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu -^privbracket /home/vadve/criswell/local/common/bin/commit-diffs.pl %{sVv} criswell at cs.uiuc.edu jcriswel at bigw.org bpankaj2 at cs.uiuc.edu +^privbracket /home/vadve/shared/InternalCVS/CVSROOT/commit-diffs.pl %{sVv} criswell at cs.uiuc.edu bpankaj2 at cs.uiuc.edu +^safecode /home/vadve/shared/InternalCVS/CVSROOT/commit-diffs.pl %{sVv} criswell at cs.uiuc.edu ^CVSROOT /home/vadve/shared/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu From dpatel at apple.com Fri Nov 3 11:34:59 2006 From: dpatel at apple.com (Devang Patel) Date: Fri, 3 Nov 2006 09:34:59 -0800 Subject: [llvm-commits] [PATCH] PR 974 -fno-unit-at-a-time should disable all ipo References: <174E92C8-E165-4BE4-A49C-B796595F5501@apple.com> Message-ID: http://llvm.org/bugs/show_bug.cgi?id=974 This patch enables IPO passes only if flag_unit_at_a_time is set. Applied. - Devang Index: llvm-backend.cpp =================================================================== --- llvm-backend.cpp (revision 119679) +++ llvm-backend.cpp (working copy) @@ -208,23 +208,28 @@ void llvm_asm_file_start(void) { if (optimize > 0) { HasPerModulePasses = true; PassManager *PM = PerModulePasses; - PM->add(createRaiseAllocationsPass()); // call %malloc -> malloc inst + if (flag_unit_at_a_time) + PM->add(createRaiseAllocationsPass()); // call %malloc -> malloc inst PM->add(createCFGSimplificationPass()); // Clean up disgusting code PM->add(createPromoteMemoryToRegisterPass());// Kill useless allocas - PM->add(createGlobalOptimizerPass()); // Optimize out global vars - PM->add(createGlobalDCEPass()); // Remove unused fns and globs - PM->add(createIPConstantPropagationPass());// IP Constant Propagation - PM->add(createDeadArgEliminationPass()); // Dead argument elimination + if (flag_unit_at_a_time) { + PM->add(createGlobalOptimizerPass()); // Optimize out global vars + PM->add(createGlobalDCEPass()); // Remove unused fns and globs + PM->add(createIPConstantPropagationPass());// IP Constant Propagation + PM->add(createDeadArgEliminationPass()); // Dead argument elimination + } PM->add(createInstructionCombiningPass()); // Clean up after IPCP & DAE // DISABLE PREDSIMPLIFY UNTIL PR967 is fixed. //PM->add(createPredicateSimplifierPass()); // Canonicalize registers PM->add(createCFGSimplificationPass()); // Clean up after IPCP & DAE - PM->add(createPruneEHPass()); // Remove dead EH info + if (flag_unit_at_a_time) + PM->add(createPruneEHPass()); // Remove dead EH info if (optimize > 1) { if (flag_inline_trees) // respect -fno-inline-functions PM->add(createFunctionInliningPass()); // Inline small functions - PM->add(createSimplifyLibCallsPass()); // Library Call Optimizations + if (flag_unit_at_a_time) + PM->add(createSimplifyLibCallsPass()); // Library Call Optimizations if (optimize > 2) PM->add(createArgumentPromotionPass()); // Scalarize uninlined fn args @@ -262,7 +267,7 @@ void llvm_asm_file_start(void) { PM->add(createAggressiveDCEPass()); // SSA based 'Aggressive DCE' PM->add(createCFGSimplificationPass()); // Merge & remove BBs - if (optimize > 1) + if (optimize > 1 && flag_unit_at_a_time) PM->add(createConstantMergePass()); // Merge dup global constants } From alenhar2 at cs.uiuc.edu Fri Nov 3 11:43:46 2006 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Fri, 3 Nov 2006 11:43:46 -0600 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Local.cpp Message-ID: <200611031743.kA3HhkYa023931@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: Local.cpp updated: 1.157 -> 1.158 --- Log message: Split the External and Intrinsic handling into seperate functions. This improves readability of the call handling code significantly, as well as makes it clear which parts are hacky (externals) and which parts are good (call handling). No functionality change. --- Diffs of the changes: (+505 -497) Local.cpp | 1002 +++++++++++++++++++++++++++++++------------------------------- 1 files changed, 505 insertions(+), 497 deletions(-) Index: llvm/lib/Analysis/DataStructure/Local.cpp diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.157 llvm/lib/Analysis/DataStructure/Local.cpp:1.158 --- llvm/lib/Analysis/DataStructure/Local.cpp:1.157 Thu Nov 2 14:25:49 2006 +++ llvm/lib/Analysis/DataStructure/Local.cpp Fri Nov 3 11:43:19 2006 @@ -131,6 +131,8 @@ void visitCastInst(CastInst &CI); void visitInstruction(Instruction &I); + bool visitIntrinsic(CallSite CS, Function* F); + bool visitExternal(CallSite CS, Function* F); void visitCallSite(CallSite CS); void visitVAArgInst(VAArgInst &I); @@ -406,8 +408,9 @@ for (gep_type_iterator I = gep_type_begin(GEP), E = gep_type_end(GEP); I != E; ++I) if (const StructType *STy = dyn_cast(*I)) { - unsigned FieldNo = - (unsigned)cast(I.getOperand())->getZExtValue(); + const ConstantInt* CUI = cast(I.getOperand()); + unsigned FieldNo = + CUI->getType()->isSigned() ? CUI->getSExtValue() : CUI->getZExtValue(); Offset += (unsigned)TD.getStructLayout(STy)->MemberOffsets[FieldNo]; } else if (isa(*I)) { if (!isa(I.getOperand()) || @@ -420,7 +423,9 @@ if (const SequentialType *STy = cast(*I)) { CurTy = STy->getElementType(); if (ConstantInt *CS = dyn_cast(GEP.getOperand(i))) { - Offset += CS->getValue()*TD.getTypeSize(CurTy); + Offset += + (CS->getType()->isSigned() ? CS->getSExtValue() : CS->getZExtValue()) + * TD.getTypeSize(CurTy); } else { // Variable index into a node. We must merge all of the elements of the // sequential type here. @@ -529,516 +534,519 @@ visitCallSite(&II); } +/// returns true if the intrinsic is handled +bool GraphBuilder::visitIntrinsic(CallSite CS, Function *F) { + switch (F->getIntrinsicID()) { + case Intrinsic::vastart: + getValueDest(*CS.getInstruction()).getNode()->setAllocaNodeMarker(); + return true; + case Intrinsic::vacopy: + getValueDest(*CS.getInstruction()). + mergeWith(getValueDest(**(CS.arg_begin()))); + return true; + case Intrinsic::vaend: + case Intrinsic::dbg_func_start: + case Intrinsic::dbg_region_end: + case Intrinsic::dbg_stoppoint: + return true; // noop + case Intrinsic::memcpy_i32: + case Intrinsic::memcpy_i64: + case Intrinsic::memmove_i32: + case Intrinsic::memmove_i64: { + // Merge the first & second arguments, and mark the memory read and + // modified. + DSNodeHandle RetNH = getValueDest(**CS.arg_begin()); + RetNH.mergeWith(getValueDest(**(CS.arg_begin()+1))); + if (DSNode *N = RetNH.getNode()) + N->setModifiedMarker()->setReadMarker(); + return true; + } + case Intrinsic::memset_i32: + case Intrinsic::memset_i64: + // Mark the memory modified. + if (DSNode *N = getValueDest(**CS.arg_begin()).getNode()) + N->setModifiedMarker(); + return true; + default: + DEBUG(std::cerr << "[dsa:local] Unhandled intrinsic: " << F->getName() << "\n"); + return false; + } +} + +/// returns true if the external is a recognized libc function with a +/// known (and generated) graph +bool GraphBuilder::visitExternal(CallSite CS, Function *F) { + if (F->getName() == "calloc" + || F->getName() == "posix_memalign" + || F->getName() == "memalign" || F->getName() == "valloc") { + setDestTo(*CS.getInstruction(), + createNode()->setHeapNodeMarker()->setModifiedMarker()); + return true; + } else if (F->getName() == "realloc") { + DSNodeHandle RetNH = getValueDest(*CS.getInstruction()); + if (CS.arg_begin() != CS.arg_end()) + RetNH.mergeWith(getValueDest(**CS.arg_begin())); + if (DSNode *N = RetNH.getNode()) + N->setHeapNodeMarker()->setModifiedMarker()->setReadMarker(); + return true; + } else if (F->getName() == "memmove") { + // Merge the first & second arguments, and mark the memory read and + // modified. + DSNodeHandle RetNH = getValueDest(**CS.arg_begin()); + RetNH.mergeWith(getValueDest(**(CS.arg_begin()+1))); + if (DSNode *N = RetNH.getNode()) + N->setModifiedMarker()->setReadMarker(); + return true; + } else if (F->getName() == "free") { + // Mark that the node is written to... + if (DSNode *N = getValueDest(**CS.arg_begin()).getNode()) + N->setModifiedMarker()->setHeapNodeMarker(); + } else if (F->getName() == "atoi" || F->getName() == "atof" || + F->getName() == "atol" || F->getName() == "atoll" || + F->getName() == "remove" || F->getName() == "unlink" || + F->getName() == "rename" || F->getName() == "memcmp" || + F->getName() == "strcmp" || F->getName() == "strncmp" || + F->getName() == "execl" || F->getName() == "execlp" || + F->getName() == "execle" || F->getName() == "execv" || + F->getName() == "execvp" || F->getName() == "chmod" || + F->getName() == "puts" || F->getName() == "write" || + F->getName() == "open" || F->getName() == "create" || + F->getName() == "truncate" || F->getName() == "chdir" || + F->getName() == "mkdir" || F->getName() == "rmdir" || + F->getName() == "strlen") { + // These functions read all of their pointer operands. + for (CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end(); + AI != E; ++AI) { + if (isPointerType((*AI)->getType())) + if (DSNode *N = getValueDest(**AI).getNode()) + N->setReadMarker(); + } + return true; + } else if (F->getName() == "memchr") { + DSNodeHandle RetNH = getValueDest(**CS.arg_begin()); + DSNodeHandle Result = getValueDest(*CS.getInstruction()); + RetNH.mergeWith(Result); + if (DSNode *N = RetNH.getNode()) + N->setReadMarker(); + return true; + } else if (F->getName() == "read" || F->getName() == "pipe" || + F->getName() == "wait" || F->getName() == "time" || + F->getName() == "getrusage") { + // These functions write all of their pointer operands. + for (CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end(); + AI != E; ++AI) { + if (isPointerType((*AI)->getType())) + if (DSNode *N = getValueDest(**AI).getNode()) + N->setModifiedMarker(); + } + return true; + } else if (F->getName() == "stat" || F->getName() == "fstat" || + F->getName() == "lstat") { + // These functions read their first operand if its a pointer. + CallSite::arg_iterator AI = CS.arg_begin(); + if (isPointerType((*AI)->getType())) { + DSNodeHandle Path = getValueDest(**AI); + if (DSNode *N = Path.getNode()) N->setReadMarker(); + } + + // Then they write into the stat buffer. + DSNodeHandle StatBuf = getValueDest(**++AI); + if (DSNode *N = StatBuf.getNode()) { + N->setModifiedMarker(); + const Type *StatTy = F->getFunctionType()->getParamType(1); + if (const PointerType *PTy = dyn_cast(StatTy)) + N->mergeTypeInfo(PTy->getElementType(), StatBuf.getOffset()); + } + return true; + } else if (F->getName() == "strtod" || F->getName() == "strtof" || + F->getName() == "strtold") { + // These functions read the first pointer + if (DSNode *Str = getValueDest(**CS.arg_begin()).getNode()) { + Str->setReadMarker(); + // If the second parameter is passed, it will point to the first + // argument node. + const DSNodeHandle &EndPtrNH = getValueDest(**(CS.arg_begin()+1)); + if (DSNode *End = EndPtrNH.getNode()) { + End->mergeTypeInfo(PointerType::get(Type::SByteTy), + EndPtrNH.getOffset(), false); + End->setModifiedMarker(); + DSNodeHandle &Link = getLink(EndPtrNH); + Link.mergeWith(getValueDest(**CS.arg_begin())); + } + } + return true; + } else if (F->getName() == "fopen" || F->getName() == "fdopen" || + F->getName() == "freopen") { + // These functions read all of their pointer operands. + for (CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end(); + AI != E; ++AI) + if (isPointerType((*AI)->getType())) + if (DSNode *N = getValueDest(**AI).getNode()) + N->setReadMarker(); + + // fopen allocates in an unknown way and writes to the file + // descriptor. Also, merge the allocated type into the node. + DSNodeHandle Result = getValueDest(*CS.getInstruction()); + if (DSNode *N = Result.getNode()) { + N->setModifiedMarker()->setUnknownNodeMarker(); + const Type *RetTy = F->getFunctionType()->getReturnType(); + if (const PointerType *PTy = dyn_cast(RetTy)) + N->mergeTypeInfo(PTy->getElementType(), Result.getOffset()); + } + + // If this is freopen, merge the file descriptor passed in with the + // result. + if (F->getName() == "freopen") { + // ICC doesn't handle getting the iterator, decrementing and + // dereferencing it in one operation without error. Do it in 2 steps + CallSite::arg_iterator compit = CS.arg_end(); + Result.mergeWith(getValueDest(**--compit)); + } + return true; + } else if (F->getName() == "fclose" && CS.arg_end()-CS.arg_begin() ==1){ + // fclose reads and deallocates the memory in an unknown way for the + // file descriptor. It merges the FILE type into the descriptor. + DSNodeHandle H = getValueDest(**CS.arg_begin()); + if (DSNode *N = H.getNode()) { + N->setReadMarker()->setUnknownNodeMarker(); + const Type *ArgTy = F->getFunctionType()->getParamType(0); + if (const PointerType *PTy = dyn_cast(ArgTy)) + N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); + } + return true; + } else if (CS.arg_end()-CS.arg_begin() == 1 && + (F->getName() == "fflush" || F->getName() == "feof" || + F->getName() == "fileno" || F->getName() == "clearerr" || + F->getName() == "rewind" || F->getName() == "ftell" || + F->getName() == "ferror" || F->getName() == "fgetc" || + F->getName() == "fgetc" || F->getName() == "_IO_getc")) { + // fflush reads and writes the memory for the file descriptor. It + // merges the FILE type into the descriptor. + DSNodeHandle H = getValueDest(**CS.arg_begin()); + if (DSNode *N = H.getNode()) { + N->setReadMarker()->setModifiedMarker(); + + const Type *ArgTy = F->getFunctionType()->getParamType(0); + if (const PointerType *PTy = dyn_cast(ArgTy)) + N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); + } + return true; + } else if (CS.arg_end()-CS.arg_begin() == 4 && + (F->getName() == "fwrite" || F->getName() == "fread")) { + // fread writes the first operand, fwrite reads it. They both + // read/write the FILE descriptor, and merges the FILE type. + CallSite::arg_iterator compit = CS.arg_end(); + DSNodeHandle H = getValueDest(**--compit); + if (DSNode *N = H.getNode()) { + N->setReadMarker()->setModifiedMarker(); + const Type *ArgTy = F->getFunctionType()->getParamType(3); + if (const PointerType *PTy = dyn_cast(ArgTy)) + N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); + } + + H = getValueDest(**CS.arg_begin()); + if (DSNode *N = H.getNode()) + if (F->getName() == "fwrite") + N->setReadMarker(); + else + N->setModifiedMarker(); + return true; + } else if (F->getName() == "fgets" && CS.arg_end()-CS.arg_begin() == 3){ + // fgets reads and writes the memory for the file descriptor. It + // merges the FILE type into the descriptor, and writes to the + // argument. It returns the argument as well. + CallSite::arg_iterator AI = CS.arg_begin(); + DSNodeHandle H = getValueDest(**AI); + if (DSNode *N = H.getNode()) + N->setModifiedMarker(); // Writes buffer + H.mergeWith(getValueDest(*CS.getInstruction())); // Returns buffer + ++AI; ++AI; + + // Reads and writes file descriptor, merge in FILE type. + H = getValueDest(**AI); + if (DSNode *N = H.getNode()) { + N->setReadMarker()->setModifiedMarker(); + const Type *ArgTy = F->getFunctionType()->getParamType(2); + if (const PointerType *PTy = dyn_cast(ArgTy)) + N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); + } + return true; + } else if (F->getName() == "ungetc" || F->getName() == "fputc" || + F->getName() == "fputs" || F->getName() == "putc" || + F->getName() == "ftell" || F->getName() == "rewind" || + F->getName() == "_IO_putc") { + // These functions read and write the memory for the file descriptor, + // which is passes as the last argument. + CallSite::arg_iterator compit = CS.arg_end(); + DSNodeHandle H = getValueDest(**--compit); + if (DSNode *N = H.getNode()) { + N->setReadMarker()->setModifiedMarker(); + FunctionType::param_iterator compit2 = F->getFunctionType()->param_end(); + const Type *ArgTy = *--compit2; + if (const PointerType *PTy = dyn_cast(ArgTy)) + N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); + } + + // Any pointer arguments are read. + for (CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end(); + AI != E; ++AI) + if (isPointerType((*AI)->getType())) + if (DSNode *N = getValueDest(**AI).getNode()) + N->setReadMarker(); + return true; + } else if (F->getName() == "fseek" || F->getName() == "fgetpos" || + F->getName() == "fsetpos") { + // These functions read and write the memory for the file descriptor, + // and read/write all other arguments. + DSNodeHandle H = getValueDest(**CS.arg_begin()); + if (DSNode *N = H.getNode()) { + FunctionType::param_iterator compit2 = F->getFunctionType()->param_end(); + const Type *ArgTy = *--compit2; + if (const PointerType *PTy = dyn_cast(ArgTy)) + N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); + } + + // Any pointer arguments are read. + for (CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end(); + AI != E; ++AI) + if (isPointerType((*AI)->getType())) + if (DSNode *N = getValueDest(**AI).getNode()) + N->setReadMarker()->setModifiedMarker(); + return true; + } else if (F->getName() == "printf" || F->getName() == "fprintf" || + F->getName() == "sprintf") { + CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end(); + + if (F->getName() == "fprintf") { + // fprintf reads and writes the FILE argument, and applies the type + // to it. + DSNodeHandle H = getValueDest(**AI); + if (DSNode *N = H.getNode()) { + N->setModifiedMarker(); + const Type *ArgTy = (*AI)->getType(); + if (const PointerType *PTy = dyn_cast(ArgTy)) + N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); + } + } else if (F->getName() == "sprintf") { + // sprintf writes the first string argument. + DSNodeHandle H = getValueDest(**AI++); + if (DSNode *N = H.getNode()) { + N->setModifiedMarker(); + const Type *ArgTy = (*AI)->getType(); + if (const PointerType *PTy = dyn_cast(ArgTy)) + N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); + } + } + + for (; AI != E; ++AI) { + // printf reads all pointer arguments. + if (isPointerType((*AI)->getType())) + if (DSNode *N = getValueDest(**AI).getNode()) + N->setReadMarker(); + } + return true; + } else if (F->getName() == "vprintf" || F->getName() == "vfprintf" || + F->getName() == "vsprintf") { + CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end(); + + if (F->getName() == "vfprintf") { + // ffprintf reads and writes the FILE argument, and applies the type + // to it. + DSNodeHandle H = getValueDest(**AI); + if (DSNode *N = H.getNode()) { + N->setModifiedMarker()->setReadMarker(); + const Type *ArgTy = (*AI)->getType(); + if (const PointerType *PTy = dyn_cast(ArgTy)) + N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); + } + ++AI; + } else if (F->getName() == "vsprintf") { + // vsprintf writes the first string argument. + DSNodeHandle H = getValueDest(**AI++); + if (DSNode *N = H.getNode()) { + N->setModifiedMarker(); + const Type *ArgTy = (*AI)->getType(); + if (const PointerType *PTy = dyn_cast(ArgTy)) + N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); + } + } + + // Read the format + if (AI != E) { + if (isPointerType((*AI)->getType())) + if (DSNode *N = getValueDest(**AI).getNode()) + N->setReadMarker(); + ++AI; + } + + // Read the valist, and the pointed-to objects. + if (AI != E && isPointerType((*AI)->getType())) { + const DSNodeHandle &VAList = getValueDest(**AI); + if (DSNode *N = VAList.getNode()) { + N->setReadMarker(); + N->mergeTypeInfo(PointerType::get(Type::SByteTy), + VAList.getOffset(), false); + + DSNodeHandle &VAListObjs = getLink(VAList); + VAListObjs.getNode()->setReadMarker(); + } + } + + return true; + } else if (F->getName() == "scanf" || F->getName() == "fscanf" || + F->getName() == "sscanf") { + CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end(); + + if (F->getName() == "fscanf") { + // fscanf reads and writes the FILE argument, and applies the type + // to it. + DSNodeHandle H = getValueDest(**AI); + if (DSNode *N = H.getNode()) { + N->setReadMarker(); + const Type *ArgTy = (*AI)->getType(); + if (const PointerType *PTy = dyn_cast(ArgTy)) + N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); + } + } else if (F->getName() == "sscanf") { + // sscanf reads the first string argument. + DSNodeHandle H = getValueDest(**AI++); + if (DSNode *N = H.getNode()) { + N->setReadMarker(); + const Type *ArgTy = (*AI)->getType(); + if (const PointerType *PTy = dyn_cast(ArgTy)) + N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); + } + } + + for (; AI != E; ++AI) { + // scanf writes all pointer arguments. + if (isPointerType((*AI)->getType())) + if (DSNode *N = getValueDest(**AI).getNode()) + N->setModifiedMarker(); + } + return true; + } else if (F->getName() == "strtok") { + // strtok reads and writes the first argument, returning it. It reads + // its second arg. FIXME: strtok also modifies some hidden static + // data. Someday this might matter. + CallSite::arg_iterator AI = CS.arg_begin(); + DSNodeHandle H = getValueDest(**AI++); + if (DSNode *N = H.getNode()) { + N->setReadMarker()->setModifiedMarker(); // Reads/Writes buffer + const Type *ArgTy = F->getFunctionType()->getParamType(0); + if (const PointerType *PTy = dyn_cast(ArgTy)) + N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); + } + H.mergeWith(getValueDest(*CS.getInstruction())); // Returns buffer + + H = getValueDest(**AI); // Reads delimiter + if (DSNode *N = H.getNode()) { + N->setReadMarker(); + const Type *ArgTy = F->getFunctionType()->getParamType(1); + if (const PointerType *PTy = dyn_cast(ArgTy)) + N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); + } + return true; + } else if (F->getName() == "strchr" || F->getName() == "strrchr" || + F->getName() == "strstr") { + // These read their arguments, and return the first one + DSNodeHandle H = getValueDest(**CS.arg_begin()); + H.mergeWith(getValueDest(*CS.getInstruction())); // Returns buffer + + for (CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end(); + AI != E; ++AI) + if (isPointerType((*AI)->getType())) + if (DSNode *N = getValueDest(**AI).getNode()) + N->setReadMarker(); + + if (DSNode *N = H.getNode()) + N->setReadMarker(); + return true; + } else if (F->getName() == "__assert_fail") { + for (CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end(); + AI != E; ++AI) + if (isPointerType((*AI)->getType())) + if (DSNode *N = getValueDest(**AI).getNode()) + N->setReadMarker(); + return true; + } else if (F->getName() == "modf" && CS.arg_end()-CS.arg_begin() == 2) { + // This writes its second argument, and forces it to double. + CallSite::arg_iterator compit = CS.arg_end(); + DSNodeHandle H = getValueDest(**--compit); + if (DSNode *N = H.getNode()) { + N->setModifiedMarker(); + N->mergeTypeInfo(Type::DoubleTy, H.getOffset()); + } + return true; + } else if (F->getName() == "strcat" || F->getName() == "strncat") { + //This might be making unsafe assumptions about usage + //Merge return and first arg + DSNodeHandle RetNH = getValueDest(*CS.getInstruction()); + RetNH.mergeWith(getValueDest(**CS.arg_begin())); + if (DSNode *N = RetNH.getNode()) + N->setHeapNodeMarker()->setModifiedMarker()->setReadMarker(); + //and read second pointer + if (DSNode *N = getValueDest(**(CS.arg_begin() + 1)).getNode()) + N->setReadMarker(); + return true; + } else if (F->getName() == "strcpy" || F->getName() == "strncpy") { + //This might be making unsafe assumptions about usage + //Merge return and first arg + DSNodeHandle RetNH = getValueDest(*CS.getInstruction()); + RetNH.mergeWith(getValueDest(**CS.arg_begin())); + if (DSNode *N = RetNH.getNode()) + N->setHeapNodeMarker()->setModifiedMarker(); + //and read second pointer + if (DSNode *N = getValueDest(**(CS.arg_begin() + 1)).getNode()) + N->setReadMarker(); + return true; + } + return false; +} + void GraphBuilder::visitCallSite(CallSite CS) { Value *Callee = CS.getCalledValue(); // Special case handling of certain libc allocation functions here. if (Function *F = dyn_cast(Callee)) if (F->isExternal()) - switch (F->getIntrinsicID()) { - case Intrinsic::vastart: - getValueDest(*CS.getInstruction()).getNode()->setAllocaNodeMarker(); - return; - case Intrinsic::vacopy: - getValueDest(*CS.getInstruction()). - mergeWith(getValueDest(**(CS.arg_begin()))); - return; - case Intrinsic::vaend: - case Intrinsic::dbg_func_start: - case Intrinsic::dbg_region_end: - case Intrinsic::dbg_stoppoint: - return; // noop - case Intrinsic::memcpy_i32: - case Intrinsic::memcpy_i64: - case Intrinsic::memmove_i32: - case Intrinsic::memmove_i64: { - // Merge the first & second arguments, and mark the memory read and - // modified. - DSNodeHandle RetNH = getValueDest(**CS.arg_begin()); - RetNH.mergeWith(getValueDest(**(CS.arg_begin()+1))); - if (DSNode *N = RetNH.getNode()) - N->setModifiedMarker()->setReadMarker(); + if (F->isIntrinsic() && visitIntrinsic(CS, F)) return; - } - case Intrinsic::memset_i32: - case Intrinsic::memset_i64: - // Mark the memory modified. - if (DSNode *N = getValueDest(**CS.arg_begin()).getNode()) - N->setModifiedMarker(); - return; - default: + else { // Determine if the called function is one of the specified heap // allocation functions - for (cl::list::iterator AllocFunc = AllocList.begin(), - LastAllocFunc = AllocList.end(); - AllocFunc != LastAllocFunc; - ++AllocFunc) { - if (F->getName() == *(AllocFunc)) { - setDestTo(*CS.getInstruction(), - createNode()->setHeapNodeMarker()->setModifiedMarker()); - return; - } - } + if (AllocList.end() != std::find(AllocList.begin(), AllocList.end(), F->getName())) { + setDestTo(*CS.getInstruction(), + createNode()->setHeapNodeMarker()->setModifiedMarker()); + return; + } // Determine if the called function is one of the specified heap // free functions - for (cl::list::iterator FreeFunc = FreeList.begin(), - LastFreeFunc = FreeList.end(); - FreeFunc != LastFreeFunc; - ++FreeFunc) { - if (F->getName() == *(FreeFunc)) { - // Mark that the node is written to... - if (DSNode *N = getValueDest(*(CS.getArgument(0))).getNode()) - N->setModifiedMarker()->setHeapNodeMarker(); - return; - } - } - - //gets select localtime ioctl - - if ((F->isExternal() && F->getName() == "calloc") - || F->getName() == "posix_memalign" - || F->getName() == "memalign" || F->getName() == "valloc") { - setDestTo(*CS.getInstruction(), - createNode()->setHeapNodeMarker()->setModifiedMarker()); - return; - } else if (F->getName() == "realloc") { - DSNodeHandle RetNH = getValueDest(*CS.getInstruction()); - if (CS.arg_begin() != CS.arg_end()) - RetNH.mergeWith(getValueDest(**CS.arg_begin())); - if (DSNode *N = RetNH.getNode()) - N->setHeapNodeMarker()->setModifiedMarker()->setReadMarker(); - return; - } else if (F->getName() == "memmove") { - // Merge the first & second arguments, and mark the memory read and - // modified. - DSNodeHandle RetNH = getValueDest(**CS.arg_begin()); - RetNH.mergeWith(getValueDest(**(CS.arg_begin()+1))); - if (DSNode *N = RetNH.getNode()) - N->setModifiedMarker()->setReadMarker(); - return; - } else if (F->getName() == "free") { - // Mark that the node is written to... - if (DSNode *N = getValueDest(**CS.arg_begin()).getNode()) - N->setModifiedMarker()->setHeapNodeMarker(); - } else if (F->getName() == "atoi" || F->getName() == "atof" || - F->getName() == "atol" || F->getName() == "atoll" || - F->getName() == "remove" || F->getName() == "unlink" || - F->getName() == "rename" || F->getName() == "memcmp" || - F->getName() == "strcmp" || F->getName() == "strncmp" || - F->getName() == "execl" || F->getName() == "execlp" || - F->getName() == "execle" || F->getName() == "execv" || - F->getName() == "execvp" || F->getName() == "chmod" || - F->getName() == "puts" || F->getName() == "write" || - F->getName() == "open" || F->getName() == "create" || - F->getName() == "truncate" || F->getName() == "chdir" || - F->getName() == "mkdir" || F->getName() == "rmdir" || - F->getName() == "strlen") { - // These functions read all of their pointer operands. - for (CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end(); - AI != E; ++AI) { - if (isPointerType((*AI)->getType())) - if (DSNode *N = getValueDest(**AI).getNode()) - N->setReadMarker(); - } - return; - } else if (F->getName() == "memchr") { - DSNodeHandle RetNH = getValueDest(**CS.arg_begin()); - DSNodeHandle Result = getValueDest(*CS.getInstruction()); - RetNH.mergeWith(Result); - if (DSNode *N = RetNH.getNode()) - N->setReadMarker(); - return; - } else if (F->getName() == "read" || F->getName() == "pipe" || - F->getName() == "wait" || F->getName() == "time" || - F->getName() == "getrusage") { - // These functions write all of their pointer operands. - for (CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end(); - AI != E; ++AI) { - if (isPointerType((*AI)->getType())) - if (DSNode *N = getValueDest(**AI).getNode()) - N->setModifiedMarker(); - } - return; - } else if (F->getName() == "stat" || F->getName() == "fstat" || - F->getName() == "lstat") { - // These functions read their first operand if its a pointer. - CallSite::arg_iterator AI = CS.arg_begin(); - if (isPointerType((*AI)->getType())) { - DSNodeHandle Path = getValueDest(**AI); - if (DSNode *N = Path.getNode()) N->setReadMarker(); - } - - // Then they write into the stat buffer. - DSNodeHandle StatBuf = getValueDest(**++AI); - if (DSNode *N = StatBuf.getNode()) { - N->setModifiedMarker(); - const Type *StatTy = F->getFunctionType()->getParamType(1); - if (const PointerType *PTy = dyn_cast(StatTy)) - N->mergeTypeInfo(PTy->getElementType(), StatBuf.getOffset()); - } - return; - } else if (F->getName() == "strtod" || F->getName() == "strtof" || - F->getName() == "strtold") { - // These functions read the first pointer - if (DSNode *Str = getValueDest(**CS.arg_begin()).getNode()) { - Str->setReadMarker(); - // If the second parameter is passed, it will point to the first - // argument node. - const DSNodeHandle &EndPtrNH = getValueDest(**(CS.arg_begin()+1)); - if (DSNode *End = EndPtrNH.getNode()) { - End->mergeTypeInfo(PointerType::get(Type::SByteTy), - EndPtrNH.getOffset(), false); - End->setModifiedMarker(); - DSNodeHandle &Link = getLink(EndPtrNH); - Link.mergeWith(getValueDest(**CS.arg_begin())); - } - } - return; - } else if (F->getName() == "fopen" || F->getName() == "fdopen" || - F->getName() == "freopen") { - // These functions read all of their pointer operands. - for (CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end(); - AI != E; ++AI) - if (isPointerType((*AI)->getType())) - if (DSNode *N = getValueDest(**AI).getNode()) - N->setReadMarker(); - - // fopen allocates in an unknown way and writes to the file - // descriptor. Also, merge the allocated type into the node. - DSNodeHandle Result = getValueDest(*CS.getInstruction()); - if (DSNode *N = Result.getNode()) { - N->setModifiedMarker()->setUnknownNodeMarker(); - const Type *RetTy = F->getFunctionType()->getReturnType(); - if (const PointerType *PTy = dyn_cast(RetTy)) - N->mergeTypeInfo(PTy->getElementType(), Result.getOffset()); - } - - // If this is freopen, merge the file descriptor passed in with the - // result. - if (F->getName() == "freopen") { - // ICC doesn't handle getting the iterator, decrementing and - // dereferencing it in one operation without error. Do it in 2 steps - CallSite::arg_iterator compit = CS.arg_end(); - Result.mergeWith(getValueDest(**--compit)); - } - return; - } else if (F->getName() == "fclose" && CS.arg_end()-CS.arg_begin() ==1){ - // fclose reads and deallocates the memory in an unknown way for the - // file descriptor. It merges the FILE type into the descriptor. - DSNodeHandle H = getValueDest(**CS.arg_begin()); - if (DSNode *N = H.getNode()) { - N->setReadMarker()->setUnknownNodeMarker(); - const Type *ArgTy = F->getFunctionType()->getParamType(0); - if (const PointerType *PTy = dyn_cast(ArgTy)) - N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); - } - return; - } else if (CS.arg_end()-CS.arg_begin() == 1 && - (F->getName() == "fflush" || F->getName() == "feof" || - F->getName() == "fileno" || F->getName() == "clearerr" || - F->getName() == "rewind" || F->getName() == "ftell" || - F->getName() == "ferror" || F->getName() == "fgetc" || - F->getName() == "fgetc" || F->getName() == "_IO_getc")) { - // fflush reads and writes the memory for the file descriptor. It - // merges the FILE type into the descriptor. - DSNodeHandle H = getValueDest(**CS.arg_begin()); - if (DSNode *N = H.getNode()) { - N->setReadMarker()->setModifiedMarker(); - - const Type *ArgTy = F->getFunctionType()->getParamType(0); - if (const PointerType *PTy = dyn_cast(ArgTy)) - N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); - } - return; - } else if (CS.arg_end()-CS.arg_begin() == 4 && - (F->getName() == "fwrite" || F->getName() == "fread")) { - // fread writes the first operand, fwrite reads it. They both - // read/write the FILE descriptor, and merges the FILE type. - CallSite::arg_iterator compit = CS.arg_end(); - DSNodeHandle H = getValueDest(**--compit); - if (DSNode *N = H.getNode()) { - N->setReadMarker()->setModifiedMarker(); - const Type *ArgTy = F->getFunctionType()->getParamType(3); - if (const PointerType *PTy = dyn_cast(ArgTy)) - N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); - } - - H = getValueDest(**CS.arg_begin()); - if (DSNode *N = H.getNode()) - if (F->getName() == "fwrite") - N->setReadMarker(); - else - N->setModifiedMarker(); - return; - } else if (F->getName() == "fgets" && CS.arg_end()-CS.arg_begin() == 3){ - // fgets reads and writes the memory for the file descriptor. It - // merges the FILE type into the descriptor, and writes to the - // argument. It returns the argument as well. - CallSite::arg_iterator AI = CS.arg_begin(); - DSNodeHandle H = getValueDest(**AI); - if (DSNode *N = H.getNode()) - N->setModifiedMarker(); // Writes buffer - H.mergeWith(getValueDest(*CS.getInstruction())); // Returns buffer - ++AI; ++AI; - - // Reads and writes file descriptor, merge in FILE type. - H = getValueDest(**AI); - if (DSNode *N = H.getNode()) { - N->setReadMarker()->setModifiedMarker(); - const Type *ArgTy = F->getFunctionType()->getParamType(2); - if (const PointerType *PTy = dyn_cast(ArgTy)) - N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); - } - return; - } else if (F->getName() == "ungetc" || F->getName() == "fputc" || - F->getName() == "fputs" || F->getName() == "putc" || - F->getName() == "ftell" || F->getName() == "rewind" || - F->getName() == "_IO_putc") { - // These functions read and write the memory for the file descriptor, - // which is passes as the last argument. - CallSite::arg_iterator compit = CS.arg_end(); - DSNodeHandle H = getValueDest(**--compit); - if (DSNode *N = H.getNode()) { - N->setReadMarker()->setModifiedMarker(); - FunctionType::param_iterator compit2 = F->getFunctionType()->param_end(); - const Type *ArgTy = *--compit2; - if (const PointerType *PTy = dyn_cast(ArgTy)) - N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); - } - - // Any pointer arguments are read. - for (CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end(); - AI != E; ++AI) - if (isPointerType((*AI)->getType())) - if (DSNode *N = getValueDest(**AI).getNode()) - N->setReadMarker(); - return; - } else if (F->getName() == "fseek" || F->getName() == "fgetpos" || - F->getName() == "fsetpos") { - // These functions read and write the memory for the file descriptor, - // and read/write all other arguments. - DSNodeHandle H = getValueDest(**CS.arg_begin()); - if (DSNode *N = H.getNode()) { - FunctionType::param_iterator compit2 = F->getFunctionType()->param_end(); - const Type *ArgTy = *--compit2; - if (const PointerType *PTy = dyn_cast(ArgTy)) - N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); - } - - // Any pointer arguments are read. - for (CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end(); - AI != E; ++AI) - if (isPointerType((*AI)->getType())) - if (DSNode *N = getValueDest(**AI).getNode()) - N->setReadMarker()->setModifiedMarker(); - return; - } else if (F->getName() == "printf" || F->getName() == "fprintf" || - F->getName() == "sprintf") { - CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end(); - - if (F->getName() == "fprintf") { - // fprintf reads and writes the FILE argument, and applies the type - // to it. - DSNodeHandle H = getValueDest(**AI); - if (DSNode *N = H.getNode()) { - N->setModifiedMarker(); - const Type *ArgTy = (*AI)->getType(); - if (const PointerType *PTy = dyn_cast(ArgTy)) - N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); + if (FreeList.end() != std::find(FreeList.begin(), FreeList.end(), F->getName())) { + // Mark that the node is written to... + if (DSNode *N = getValueDest(*(CS.getArgument(0))).getNode()) + N->setModifiedMarker()->setHeapNodeMarker(); + return; + } + if (visitExternal(CS,F)) + return; + // Unknown function, warn if it returns a pointer type or takes a + // pointer argument. + bool Warn = isPointerType(CS.getInstruction()->getType()); + if (!Warn) + for (CallSite::arg_iterator I = CS.arg_begin(), E = CS.arg_end(); + I != E; ++I) + if (isPointerType((*I)->getType())) { + Warn = true; + break; } - } else if (F->getName() == "sprintf") { - // sprintf writes the first string argument. - DSNodeHandle H = getValueDest(**AI++); - if (DSNode *N = H.getNode()) { - N->setModifiedMarker(); - const Type *ArgTy = (*AI)->getType(); - if (const PointerType *PTy = dyn_cast(ArgTy)) - N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); - } - } - - for (; AI != E; ++AI) { - // printf reads all pointer arguments. - if (isPointerType((*AI)->getType())) - if (DSNode *N = getValueDest(**AI).getNode()) - N->setReadMarker(); - } - return; - } else if (F->getName() == "vprintf" || F->getName() == "vfprintf" || - F->getName() == "vsprintf") { - CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end(); - - if (F->getName() == "vfprintf") { - // ffprintf reads and writes the FILE argument, and applies the type - // to it. - DSNodeHandle H = getValueDest(**AI); - if (DSNode *N = H.getNode()) { - N->setModifiedMarker()->setReadMarker(); - const Type *ArgTy = (*AI)->getType(); - if (const PointerType *PTy = dyn_cast(ArgTy)) - N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); - } - ++AI; - } else if (F->getName() == "vsprintf") { - // vsprintf writes the first string argument. - DSNodeHandle H = getValueDest(**AI++); - if (DSNode *N = H.getNode()) { - N->setModifiedMarker(); - const Type *ArgTy = (*AI)->getType(); - if (const PointerType *PTy = dyn_cast(ArgTy)) - N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); - } - } - - // Read the format - if (AI != E) { - if (isPointerType((*AI)->getType())) - if (DSNode *N = getValueDest(**AI).getNode()) - N->setReadMarker(); - ++AI; - } - - // Read the valist, and the pointed-to objects. - if (AI != E && isPointerType((*AI)->getType())) { - const DSNodeHandle &VAList = getValueDest(**AI); - if (DSNode *N = VAList.getNode()) { - N->setReadMarker(); - N->mergeTypeInfo(PointerType::get(Type::SByteTy), - VAList.getOffset(), false); - - DSNodeHandle &VAListObjs = getLink(VAList); - VAListObjs.getNode()->setReadMarker(); - } - } - - return; - } else if (F->getName() == "scanf" || F->getName() == "fscanf" || - F->getName() == "sscanf") { - CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end(); - - if (F->getName() == "fscanf") { - // fscanf reads and writes the FILE argument, and applies the type - // to it. - DSNodeHandle H = getValueDest(**AI); - if (DSNode *N = H.getNode()) { - N->setReadMarker(); - const Type *ArgTy = (*AI)->getType(); - if (const PointerType *PTy = dyn_cast(ArgTy)) - N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); - } - } else if (F->getName() == "sscanf") { - // sscanf reads the first string argument. - DSNodeHandle H = getValueDest(**AI++); - if (DSNode *N = H.getNode()) { - N->setReadMarker(); - const Type *ArgTy = (*AI)->getType(); - if (const PointerType *PTy = dyn_cast(ArgTy)) - N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); - } - } - - for (; AI != E; ++AI) { - // scanf writes all pointer arguments. - if (isPointerType((*AI)->getType())) - if (DSNode *N = getValueDest(**AI).getNode()) - N->setModifiedMarker(); - } - return; - } else if (F->getName() == "strtok") { - // strtok reads and writes the first argument, returning it. It reads - // its second arg. FIXME: strtok also modifies some hidden static - // data. Someday this might matter. - CallSite::arg_iterator AI = CS.arg_begin(); - DSNodeHandle H = getValueDest(**AI++); - if (DSNode *N = H.getNode()) { - N->setReadMarker()->setModifiedMarker(); // Reads/Writes buffer - const Type *ArgTy = F->getFunctionType()->getParamType(0); - if (const PointerType *PTy = dyn_cast(ArgTy)) - N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); - } - H.mergeWith(getValueDest(*CS.getInstruction())); // Returns buffer - - H = getValueDest(**AI); // Reads delimiter - if (DSNode *N = H.getNode()) { - N->setReadMarker(); - const Type *ArgTy = F->getFunctionType()->getParamType(1); - if (const PointerType *PTy = dyn_cast(ArgTy)) - N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); - } - return; - } else if (F->getName() == "strchr" || F->getName() == "strrchr" || - F->getName() == "strstr") { - // These read their arguments, and return the first one - DSNodeHandle H = getValueDest(**CS.arg_begin()); - H.mergeWith(getValueDest(*CS.getInstruction())); // Returns buffer - - for (CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end(); - AI != E; ++AI) - if (isPointerType((*AI)->getType())) - if (DSNode *N = getValueDest(**AI).getNode()) - N->setReadMarker(); - - if (DSNode *N = H.getNode()) - N->setReadMarker(); - return; - } else if (F->getName() == "__assert_fail") { - for (CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end(); - AI != E; ++AI) - if (isPointerType((*AI)->getType())) - if (DSNode *N = getValueDest(**AI).getNode()) - N->setReadMarker(); - return; - } else if (F->getName() == "modf" && CS.arg_end()-CS.arg_begin() == 2) { - // This writes its second argument, and forces it to double. - CallSite::arg_iterator compit = CS.arg_end(); - DSNodeHandle H = getValueDest(**--compit); - if (DSNode *N = H.getNode()) { - N->setModifiedMarker(); - N->mergeTypeInfo(Type::DoubleTy, H.getOffset()); - } - return; - } else if (F->getName() == "strcat" || F->getName() == "strncat") { - //This might be making unsafe assumptions about usage - //Merge return and first arg - DSNodeHandle RetNH = getValueDest(*CS.getInstruction()); - RetNH.mergeWith(getValueDest(**CS.arg_begin())); - if (DSNode *N = RetNH.getNode()) - N->setHeapNodeMarker()->setModifiedMarker()->setReadMarker(); - //and read second pointer - if (DSNode *N = getValueDest(**(CS.arg_begin() + 1)).getNode()) - N->setReadMarker(); - return; - } else if (F->getName() == "strcpy" || F->getName() == "strncpy") { - //This might be making unsafe assumptions about usage - //Merge return and first arg - DSNodeHandle RetNH = getValueDest(*CS.getInstruction()); - RetNH.mergeWith(getValueDest(**CS.arg_begin())); - if (DSNode *N = RetNH.getNode()) - N->setHeapNodeMarker()->setModifiedMarker(); - //and read second pointer - if (DSNode *N = getValueDest(**(CS.arg_begin() + 1)).getNode()) - N->setReadMarker(); - return; - } else { - // Unknown function, warn if it returns a pointer type or takes a - // pointer argument. - bool Warn = isPointerType(CS.getInstruction()->getType()); - if (!Warn) - for (CallSite::arg_iterator I = CS.arg_begin(), E = CS.arg_end(); - I != E; ++I) - if (isPointerType((*I)->getType())) { - Warn = true; - break; - } - if (Warn) { - DEBUG(std::cerr << "WARNING: Call to unknown external function '" - << F->getName() << "' will cause pessimistic results!\n"); - } + if (Warn) { + DEBUG(std::cerr << "WARNING: Call to unknown external function '" + << F->getName() << "' will cause pessimistic results!\n"); } } - // Set up the return value... DSNodeHandle RetVal; Instruction *I = CS.getInstruction(); From reid at x10sys.com Fri Nov 3 12:04:26 2006 From: reid at x10sys.com (Reid Spencer) Date: Fri, 3 Nov 2006 12:04:26 -0600 Subject: [llvm-commits] CVS: llvm/configure Makefile.config.in Message-ID: <200611031804.kA3I4QmF025351@zion.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.251 -> 1.252 Makefile.config.in updated: 1.64 -> 1.65 --- Log message: Add a check to see if HUGE_VAL is sane or not. --- Diffs of the changes: (+109 -25) Makefile.config.in | 4 + configure | 130 ++++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 109 insertions(+), 25 deletions(-) Index: llvm/configure diff -u llvm/configure:1.251 llvm/configure:1.252 --- llvm/configure:1.251 Mon Oct 2 12:24:55 2006 +++ llvm/configure Fri Nov 3 12:04:08 2006 @@ -895,6 +895,7 @@ ETAGSFLAGS LLVMGCC LLVMGXX +HUGE_VAL_SANITY ALLOCA MMAP_FILE LLVMCC1 @@ -10268,7 +10269,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext + echo '#line 12416 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -14130,11 +14131,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14133: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14134: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14137: \$? = $ac_status" >&5 + echo "$as_me:14138: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14398,11 +14399,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14401: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14402: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14405: \$? = $ac_status" >&5 + echo "$as_me:14406: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14502,11 +14503,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14505: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14506: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14509: \$? = $ac_status" >&5 + echo "$as_me:14510: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -16954,7 +16955,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:19426: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:19429: \$? = $ac_status" >&5 + echo "$as_me:19430: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -19526,11 +19527,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:19529: $lt_compile\"" >&5) + (eval echo "\"\$as_me:19530: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:19533: \$? = $ac_status" >&5 + echo "$as_me:19534: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -21096,11 +21097,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21099: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21100: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:21103: \$? = $ac_status" >&5 + echo "$as_me:21104: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -21200,11 +21201,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21203: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21204: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:21207: \$? = $ac_status" >&5 + echo "$as_me:21208: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -23435,11 +23436,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:23438: $lt_compile\"" >&5) + (eval echo "\"\$as_me:23439: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:23442: \$? = $ac_status" >&5 + echo "$as_me:23443: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -23703,11 +23704,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:23706: $lt_compile\"" >&5) + (eval echo "\"\$as_me:23707: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:23710: \$? = $ac_status" >&5 + echo "$as_me:23711: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -23807,11 +23808,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:23810: $lt_compile\"" >&5) + (eval echo "\"\$as_me:23811: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:23814: \$? = $ac_status" >&5 + echo "$as_me:23815: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -29175,6 +29176,84 @@ fi + + { echo "$as_me:$LINENO: checking for HUGE_VAL sanity" >&5 +echo $ECHO_N "checking for HUGE_VAL sanity... $ECHO_C" >&6; } +if test "${ac_cv_huge_val_sanity+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + CPPFLAGS=-pedantic + if test "$cross_compiling" = yes; then + ac_cv_huge_val_sanity=yes +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +double x = HUGE_VAL; return x != x; + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_huge_val_sanity=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_huge_val_sanity=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_huge_val_sanity" >&5 +echo "${ECHO_T}$ac_cv_huge_val_sanity" >&6; } + HUGE_VAL_SANITY=$ac_cv_huge_val_sanity + + { echo "$as_me:$LINENO: checking for pid_t" >&5 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } if test "${ac_cv_type_pid_t+set}" = set; then @@ -34167,6 +34246,7 @@ ETAGSFLAGS!$ETAGSFLAGS$ac_delim LLVMGCC!$LLVMGCC$ac_delim LLVMGXX!$LLVMGXX$ac_delim +HUGE_VAL_SANITY!$HUGE_VAL_SANITY$ac_delim ALLOCA!$ALLOCA$ac_delim MMAP_FILE!$MMAP_FILE$ac_delim LLVMCC1!$LLVMCC1$ac_delim @@ -34189,7 +34269,7 @@ LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 62; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 63; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 Index: llvm/Makefile.config.in diff -u llvm/Makefile.config.in:1.64 llvm/Makefile.config.in:1.65 --- llvm/Makefile.config.in:1.64 Mon Aug 7 18:23:39 2006 +++ llvm/Makefile.config.in Fri Nov 3 12:04:08 2006 @@ -240,3 +240,7 @@ # available to those loadable modules. LINKALL := @LINKALL@ NOLINKALL := @NOLINKALL@ + +# Get the value of HUGE_VAL_SANITY which will be either "yes" or "no" depending +# on the check. +HUGE_VAL_SANITY = @HUGE_VAL_SANITY@ From reid at x10sys.com Fri Nov 3 12:04:24 2006 From: reid at x10sys.com (Reid Spencer) Date: Fri, 3 Nov 2006 12:04:24 -0600 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200611031804.kA3I4Owr025339@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.247 -> 1.248 --- Log message: Add a check to see if HUGE_VAL is sane or not. --- Diffs of the changes: (+1 -0) configure.ac | 1 + 1 files changed, 1 insertion(+) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.247 llvm/autoconf/configure.ac:1.248 --- llvm/autoconf/configure.ac:1.247 Mon Oct 2 12:23:42 2006 +++ llvm/autoconf/configure.ac Fri Nov 3 12:04:08 2006 @@ -630,6 +630,7 @@ dnl=== dnl===-----------------------------------------------------------------------=== +AC_HUGE_VAL_CHECK AC_TYPE_PID_T AC_TYPE_SIZE_T AC_TYPE_SIGNAL From reid at x10sys.com Fri Nov 3 12:04:25 2006 From: reid at x10sys.com (Reid Spencer) Date: Fri, 3 Nov 2006 12:04:25 -0600 Subject: [llvm-commits] CVS: llvm/autoconf/m4/huge_val.m4 Message-ID: <200611031804.kA3I4PVu025344@zion.cs.uiuc.edu> Changes in directory llvm/autoconf/m4: huge_val.m4 added (r1.1) --- Log message: Add a check to see if HUGE_VAL is sane or not. --- Diffs of the changes: (+18 -0) huge_val.m4 | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+) Index: llvm/autoconf/m4/huge_val.m4 diff -c /dev/null llvm/autoconf/m4/huge_val.m4:1.1 *** /dev/null Fri Nov 3 12:04:18 2006 --- llvm/autoconf/m4/huge_val.m4 Fri Nov 3 12:04:08 2006 *************** *** 0 **** --- 1,18 ---- + # + # This function determins if the the HUGE_VAL macro is compilable with the + # -pedantic switch or not. XCode < 2.4.1 doesn't get it right. + # + AC_DEFUN([AC_HUGE_VAL_CHECK],[ + AC_CACHE_CHECK([for HUGE_VAL sanity], [ac_cv_huge_val_sanity],[ + AC_LANG_PUSH(C) + CPPFLAGS=-pedantic + AC_RUN_IFELSE( + AC_LANG_PROGRAM( + [#include ], + [double x = HUGE_VAL; return x != x; ]), + [ac_cv_huge_val_sanity=yes],[ac_cv_huge_val_sanity=no], + [ac_cv_huge_val_sanity=yes]) + AC_LANG_POP(C) + ]) + AC_SUBST(HUGE_VAL_SANITY,$ac_cv_huge_val_sanity) + ]) From criswell at cs.uiuc.edu Fri Nov 3 12:36:56 2006 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri, 3 Nov 2006 12:36:56 -0600 Subject: [llvm-commits] CVS: CVSROOT/loginfo Message-ID: <200611031836.kA3IauQN025986@zion.cs.uiuc.edu> Changes in directory CVSROOT: loginfo updated: 1.36 -> 1.37 --- Log message: Log SAFECode commits by sending me email. --- Diffs of the changes: (+1 -0) Index: CVSROOT/loginfo diff -u CVSROOT/loginfo:1.36 CVSROOT/loginfo:1.37 --- CVSROOT/loginfo:1.36 Sun Jan 11 22:38:18 2004 +++ CVSROOT/loginfo Fri Nov 3 12:36:45 2006 @@ -30,6 +30,7 @@ #^llvm/www ( /home/vadve/vadve/Research/DynOpt/CVSRepository/CVSROOT/update-www.sh &); /home/vadve/vadve/Research/DynOpt/CVSRepository/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu #^llvm /home/vadve/vadve/Research/DynOpt/CVSRepository/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu #^reopt /home/vadve/vadve/Research/DynOpt/CVSRepository/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu +^safecode /home/vadve/shared/InternalCVS/CVSROOT/commit-diffs.pl %{sVv} criswell at uiuc.edu ^poolalloc /home/vadve/vadve/Research/DynOpt/CVSRepository/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu ^gcc-3.4 /home/vadve/vadve/Research/DynOpt/CVSRepository/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu ^CVSROOT /home/vadve/vadve/Research/DynOpt/CVSRepository/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu From sabre at nondot.org Fri Nov 3 13:14:16 2006 From: sabre at nondot.org (Chris Lattner) Date: Fri, 3 Nov 2006 13:14:16 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/Makefile Message-ID: <200611031914.kA3JEGsf027742@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: Makefile updated: 1.29 -> 1.30 --- Log message: Fix the build on xcode < 2.4 --- Diffs of the changes: (+7 -0) Makefile | 7 +++++++ 1 files changed, 7 insertions(+) Index: llvm/lib/CodeGen/Makefile diff -u llvm/lib/CodeGen/Makefile:1.29 llvm/lib/CodeGen/Makefile:1.30 --- llvm/lib/CodeGen/Makefile:1.29 Thu Nov 2 17:56:21 2006 +++ llvm/lib/CodeGen/Makefile Fri Nov 3 13:13:59 2006 @@ -8,8 +8,15 @@ ##===----------------------------------------------------------------------===## LEVEL = ../.. +include $(LEVEL)/Makefile.config LIBRARYNAME = LLVMCodeGen PARALLEL_DIRS = SelectionDAG BUILD_ARCHIVE = 1 +# Xcode prior to 2.4 generates an error in -pedantic mode with use of HUGE_VAL +# in this directory. Disable -pedantic for this broken compiler. +ifneq ($(HUGE_VAL_SANITY),yes) +CompileCommonOpts := $(filter-out -pedantic, $(CompileCommonOpts)) +endif + include $(LEVEL)/Makefile.common From alenhar2 at cs.uiuc.edu Fri Nov 3 13:14:19 2006 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Fri, 3 Nov 2006 13:14:19 -0600 Subject: [llvm-commits] CVS: llvm-test/External/SPEC/CINT2000/252.eon/Makefile Message-ID: <200611031914.kA3JEJV2027750@zion.cs.uiuc.edu> Changes in directory llvm-test/External/SPEC/CINT2000/252.eon: Makefile updated: 1.13 -> 1.14 --- Log message: Yea, this helps --- Diffs of the changes: (+3 -0) Makefile | 3 +++ 1 files changed, 3 insertions(+) Index: llvm-test/External/SPEC/CINT2000/252.eon/Makefile diff -u llvm-test/External/SPEC/CINT2000/252.eon/Makefile:1.13 llvm-test/External/SPEC/CINT2000/252.eon/Makefile:1.14 --- llvm-test/External/SPEC/CINT2000/252.eon/Makefile:1.13 Wed Jan 25 12:57:56 2006 +++ llvm-test/External/SPEC/CINT2000/252.eon/Makefile Fri Nov 3 13:14:05 2006 @@ -15,6 +15,9 @@ CPPFLAGS += -DFMAX_IS_DOUBLE endif +ifeq ($(ARCH),Alpha) + CPPFLAGS += -DSPEC_CPU2000_LP64 +endif Source = $(addprefix $(SPEC_BENCH_DIR)/src/, \ ggCoverageSolidTexture.cc ggPathDielectricMaterial.cc ggBox2.cc \ From sabre at nondot.org Fri Nov 3 13:16:10 2006 From: sabre at nondot.org (Chris Lattner) Date: Fri, 3 Nov 2006 13:16:10 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/Makefile Message-ID: <200611031916.kA3JGA41027823@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: Makefile updated: 1.30 -> 1.31 --- Log message: this will work better --- Diffs of the changes: (+2 -2) Makefile | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/Makefile diff -u llvm/lib/CodeGen/Makefile:1.30 llvm/lib/CodeGen/Makefile:1.31 --- llvm/lib/CodeGen/Makefile:1.30 Fri Nov 3 13:13:59 2006 +++ llvm/lib/CodeGen/Makefile Fri Nov 3 13:15:55 2006 @@ -8,15 +8,15 @@ ##===----------------------------------------------------------------------===## LEVEL = ../.. -include $(LEVEL)/Makefile.config LIBRARYNAME = LLVMCodeGen PARALLEL_DIRS = SelectionDAG BUILD_ARCHIVE = 1 +include $(LEVEL)/Makefile.common + # Xcode prior to 2.4 generates an error in -pedantic mode with use of HUGE_VAL # in this directory. Disable -pedantic for this broken compiler. ifneq ($(HUGE_VAL_SANITY),yes) CompileCommonOpts := $(filter-out -pedantic, $(CompileCommonOpts)) endif -include $(LEVEL)/Makefile.common From jlaskey at apple.com Fri Nov 3 13:47:33 2006 From: jlaskey at apple.com (Jim Laskey) Date: Fri, 3 Nov 2006 13:47:33 -0600 Subject: [llvm-commits] CVS: nightlytest-serverside/ProgramResults.php Message-ID: <200611031947.kA3JlXIV031146@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: ProgramResults.php updated: 1.97 -> 1.98 --- Log message: Test #1 --- Diffs of the changes: (+1 -1) ProgramResults.php | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: nightlytest-serverside/ProgramResults.php diff -u nightlytest-serverside/ProgramResults.php:1.97 nightlytest-serverside/ProgramResults.php:1.98 --- nightlytest-serverside/ProgramResults.php:1.97 Sat Oct 21 06:51:39 2006 +++ nightlytest-serverside/ProgramResults.php Fri Nov 3 13:47:19 2006 @@ -143,7 +143,7 @@ $data = str_replace("
", " ", $data); foreach ($array_of_measures as $x){ $value=array(); - $reg_exp="/$x:\s*([[0-9\.]+|\*|\-|n\/a|\?],)/"; + $reg_exp="/$x:\s*([[0-9\.]+|\*|\-|n\/a|\?])/"; #print "{$program} => running preg_match($reg_exp, $data, $value)
\n"; preg_match($reg_exp, $data, $value); if(isset($value[1])){ From jlaskey at apple.com Fri Nov 3 13:49:03 2006 From: jlaskey at apple.com (Jim Laskey) Date: Fri, 3 Nov 2006 13:49:03 -0600 Subject: [llvm-commits] CVS: nightlytest-serverside/ProgramResults.php Message-ID: <200611031949.kA3Jn3t4031246@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: ProgramResults.php updated: 1.98 -> 1.99 --- Log message: Test #2 --- Diffs of the changes: (+2 -2) ProgramResults.php | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: nightlytest-serverside/ProgramResults.php diff -u nightlytest-serverside/ProgramResults.php:1.98 nightlytest-serverside/ProgramResults.php:1.99 --- nightlytest-serverside/ProgramResults.php:1.98 Fri Nov 3 13:47:19 2006 +++ nightlytest-serverside/ProgramResults.php Fri Nov 3 13:48:48 2006 @@ -143,8 +143,8 @@ $data = str_replace("
", " ", $data); foreach ($array_of_measures as $x){ $value=array(); - $reg_exp="/$x:\s*([[0-9\.]+|\*|\-|n\/a|\?])/"; - #print "{$program} => running preg_match($reg_exp, $data, $value)
\n"; + $reg_exp="/$x:\s*([[0-9\.]+|\*|\-|n\/a|\?],)/"; + print "{$program} => running preg_match($reg_exp, $data, $value)
\n"; preg_match($reg_exp, $data, $value); if(isset($value[1])){ array_push($result[$program], $value[1]); From reid at x10sys.com Fri Nov 3 13:49:32 2006 From: reid at x10sys.com (Reid Spencer) Date: Fri, 3 Nov 2006 13:49:32 -0600 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200611031949.kA3JnWBu031274@zion.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.252 -> 1.253 --- Log message: Make the huge_val test run a C++ program not C --- Diffs of the changes: (+6 -6) configure | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) Index: llvm/configure diff -u llvm/configure:1.252 llvm/configure:1.253 --- llvm/configure:1.252 Fri Nov 3 12:04:08 2006 +++ llvm/configure Fri Nov 3 13:49:16 2006 @@ -29183,13 +29183,13 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - CPPFLAGS=-pedantic + CXXFLAGS=-pedantic if test "$cross_compiling" = yes; then ac_cv_huge_val_sanity=yes else From reid at x10sys.com Fri Nov 3 13:49:32 2006 From: reid at x10sys.com (Reid Spencer) Date: Fri, 3 Nov 2006 13:49:32 -0600 Subject: [llvm-commits] CVS: llvm/autoconf/m4/huge_val.m4 Message-ID: <200611031949.kA3JnWBX031280@zion.cs.uiuc.edu> Changes in directory llvm/autoconf/m4: huge_val.m4 updated: 1.1 -> 1.2 --- Log message: Make the huge_val test run a C++ program not C --- Diffs of the changes: (+3 -3) huge_val.m4 | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/autoconf/m4/huge_val.m4 diff -u llvm/autoconf/m4/huge_val.m4:1.1 llvm/autoconf/m4/huge_val.m4:1.2 --- llvm/autoconf/m4/huge_val.m4:1.1 Fri Nov 3 12:04:08 2006 +++ llvm/autoconf/m4/huge_val.m4 Fri Nov 3 13:49:16 2006 @@ -4,15 +4,15 @@ # AC_DEFUN([AC_HUGE_VAL_CHECK],[ AC_CACHE_CHECK([for HUGE_VAL sanity], [ac_cv_huge_val_sanity],[ - AC_LANG_PUSH(C) - CPPFLAGS=-pedantic + AC_LANG_PUSH([C++]) + CXXFLAGS=-pedantic AC_RUN_IFELSE( AC_LANG_PROGRAM( [#include ], [double x = HUGE_VAL; return x != x; ]), [ac_cv_huge_val_sanity=yes],[ac_cv_huge_val_sanity=no], [ac_cv_huge_val_sanity=yes]) - AC_LANG_POP(C) + AC_LANG_POP([C++]) ]) AC_SUBST(HUGE_VAL_SANITY,$ac_cv_huge_val_sanity) ]) From jlaskey at apple.com Fri Nov 3 13:52:18 2006 From: jlaskey at apple.com (Jim Laskey) Date: Fri, 3 Nov 2006 13:52:18 -0600 Subject: [llvm-commits] CVS: nightlytest-serverside/ProgramResults.php Message-ID: <200611031952.kA3JqI3p006099@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: ProgramResults.php updated: 1.99 -> 1.100 --- Log message: Test #3 --- Diffs of the changes: (+1 -1) ProgramResults.php | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: nightlytest-serverside/ProgramResults.php diff -u nightlytest-serverside/ProgramResults.php:1.99 nightlytest-serverside/ProgramResults.php:1.100 --- nightlytest-serverside/ProgramResults.php:1.99 Fri Nov 3 13:48:48 2006 +++ nightlytest-serverside/ProgramResults.php Fri Nov 3 13:52:02 2006 @@ -144,7 +144,7 @@ foreach ($array_of_measures as $x){ $value=array(); $reg_exp="/$x:\s*([[0-9\.]+|\*|\-|n\/a|\?],)/"; - print "{$program} => running preg_match($reg_exp, $data, $value)
\n"; + #print "{$program} => running preg_match($reg_exp, $data, $value)
\n"; preg_match($reg_exp, $data, $value); if(isset($value[1])){ array_push($result[$program], $value[1]); From criswell at cs.uiuc.edu Fri Nov 3 14:14:52 2006 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri, 3 Nov 2006 14:14:52 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp PointerCompress.cpp Message-ID: <200611032014.kA3KEqAT025839@zion.cs.uiuc.edu> Changes in directory llvm-poolalloc/lib/PoolAllocate: PoolAllocate.cpp updated: 1.126 -> 1.127 PointerCompress.cpp updated: 1.71 -> 1.72 --- Log message: Removed unused variables to quelch new warnings from the LLVM build system. --- Diffs of the changes: (+6 -6) PointerCompress.cpp | 8 ++++---- PoolAllocate.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) Index: llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.126 llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.127 --- llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.126 Tue Oct 24 16:43:50 2006 +++ llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp Fri Nov 3 14:14:34 2006 @@ -613,7 +613,7 @@ // Calculate which DSNodes are reachable from globals. If a node is reachable // from a global, we will create a global pool for it, so no argument passage // is required. - DSGraph &GG = ECGraphs->getGlobalsGraph(); + ECGraphs->getGlobalsGraph(); // Map all node reachable from this global to the corresponding nodes in // the globals graph. @@ -680,7 +680,7 @@ static void DeleteIfIsPoolFree(Instruction *I, AllocaInst *PD, std::multimap &PoolFrees) { std::multimap::iterator PFI, PFE; - if (CallInst *CI = dyn_cast(I)) + if (dyn_cast(I)) for (tie(PFI,PFE) = PoolFrees.equal_range(PD); PFI != PFE; ++PFI) if (PFI->second == I) { PoolFrees.erase(PFI); Index: llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp diff -u llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.71 llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.72 --- llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.71 Tue Oct 24 16:43:50 2006 +++ llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp Fri Nov 3 14:14:34 2006 @@ -234,7 +234,7 @@ const Type *CompressedPoolInfo:: ComputeCompressedType(const Type *OrigTy, unsigned NodeOffset, std::map &Nodes) { - if (const PointerType *PTY = dyn_cast(OrigTy)) { + if (dyn_cast(OrigTy)) { if (ADLFix) { DSNode *PointeeNode = getNode()->getLink(NodeOffset).getNode(); if (PointeeNode == getNode()) @@ -792,7 +792,7 @@ // Value *SrcVal = SI.getOperand(0); if (!isa(SrcVal)) { - if (const CompressedPoolInfo *SrcPI = getPoolInfo(SrcVal)) { + if (getPoolInfo(SrcVal)) { // If the stored value is compressed, get the xformed version SrcVal = getTransformedValue(SrcVal); @@ -886,7 +886,7 @@ Size = BinaryOperator::createAdd(Size, ConstantInt::get(Type::UIntTy, OldSizeV-1), "roundup", &CI); - Size = BinaryOperator::createDiv(Size, OldSize, "numnodes", &CI); + Size = BinaryOperator::createUDiv(Size, OldSize, "numnodes", &CI); Size = BinaryOperator::createMul(Size, NewSize, "newbytes", &CI); } @@ -1194,7 +1194,7 @@ // Calculate which DSNodes are reachable from globals. If a node is reachable // from a global, we check to see if the global pool is compressed. - DSGraph &GG = ECG->getGlobalsGraph(); + ECG->getGlobalsGraph(); // Map all node reachable from this global to the corresponding nodes in the // globals graph. From criswell at cs.uiuc.edu Fri Nov 3 15:07:32 2006 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri, 3 Nov 2006 15:07:32 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/lib/PoolAllocate/PoolOptimize.cpp Message-ID: <200611032107.PAA07846@choi.cs.uiuc.edu> Changes in directory llvm-poolalloc/lib/PoolAllocate: PoolOptimize.cpp updated: 1.7 -> 1.8 --- Log message: Remove unused variables per the new warnings from the LLVM build system. --- Diffs of the changes: (+2 -2) PoolOptimize.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm-poolalloc/lib/PoolAllocate/PoolOptimize.cpp diff -u llvm-poolalloc/lib/PoolAllocate/PoolOptimize.cpp:1.7 llvm-poolalloc/lib/PoolAllocate/PoolOptimize.cpp:1.8 --- llvm-poolalloc/lib/PoolAllocate/PoolOptimize.cpp:1.7 Tue Oct 24 16:43:50 2006 +++ llvm-poolalloc/lib/PoolAllocate/PoolOptimize.cpp Fri Nov 3 15:07:06 2006 @@ -225,12 +225,12 @@ } else if (CI->getCalledFunction() == PoolInit) { Args.assign(CI->op_begin()+1, CI->op_end()); Args.erase(Args.begin()+1); // Drop the size argument. - Value *New = new CallInst(PoolInitBP, Args, "", CI); + new CallInst(PoolInitBP, Args, "", CI); CI->eraseFromParent(); } else { assert(CI->getCalledFunction() == PoolDestroy); Args.assign(CI->op_begin()+1, CI->op_end()); - Value *New = new CallInst(PoolDestroyBP, Args, "", CI); + new CallInst(PoolDestroyBP, Args, "", CI); CI->eraseFromParent(); } } From sabre at nondot.org Fri Nov 3 15:58:29 2006 From: sabre at nondot.org (Chris Lattner) Date: Fri, 3 Nov 2006 15:58:29 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/Analysis/BasicAA/2006-11-03-BasicAAVectorCrash.ll Message-ID: <200611032158.kA3LwTFk002560@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Analysis/BasicAA: 2006-11-03-BasicAAVectorCrash.ll added (r1.1) --- Log message: new testcase --- Diffs of the changes: (+51 -0) 2006-11-03-BasicAAVectorCrash.ll | 51 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 51 insertions(+) Index: llvm/test/Regression/Analysis/BasicAA/2006-11-03-BasicAAVectorCrash.ll diff -c /dev/null llvm/test/Regression/Analysis/BasicAA/2006-11-03-BasicAAVectorCrash.ll:1.1 *** /dev/null Fri Nov 3 15:58:24 2006 --- llvm/test/Regression/Analysis/BasicAA/2006-11-03-BasicAAVectorCrash.ll Fri Nov 3 15:58:14 2006 *************** *** 0 **** --- 1,51 ---- + ; RUN: llvm-as < %s | opt -licm -disable-output + target endian = big + target pointersize = 32 + target triple = "powerpc-apple-darwin8.7.0" + + implementation ; Functions: + + void %glgRunProcessor() { + entry: + br bool false, label %bb2037.i, label %cond_true.i18 + + cond_true.i18: ; preds = %entry + ret void + + bb205.i: ; preds = %bb2037.i + switch uint 0, label %bb1013.i [ + uint 14, label %bb239.i + uint 15, label %bb917.i + ] + + bb239.i: ; preds = %bb205.i + br bool false, label %cond_false277.i, label %cond_true264.i + + cond_true264.i: ; preds = %bb239.i + ret void + + cond_false277.i: ; preds = %bb239.i + %tmp1062.i = getelementptr [2 x <4 x int>]* null, int 0, int 1 ; <<4 x int>*> [#uses=1] + store <4 x int> zeroinitializer, <4 x int>* %tmp1062.i + br bool false, label %cond_true1032.i, label %cond_false1063.i85 + + bb917.i: ; preds = %bb205.i + ret void + + bb1013.i: ; preds = %bb205.i + ret void + + cond_true1032.i: ; preds = %cond_false277.i + %tmp1187.i = getelementptr [2 x <4 x int>]* null, int 0, int 0, int 7 ; [#uses=1] + store int 0, int* %tmp1187.i + br label %bb2037.i + + cond_false1063.i85: ; preds = %cond_false277.i + ret void + + bb2037.i: ; preds = %cond_true1032.i, %entry + br bool false, label %bb205.i, label %cond_next2042.i + + cond_next2042.i: ; preds = %bb2037.i + ret void + } From sabre at nondot.org Fri Nov 3 16:01:29 2006 From: sabre at nondot.org (Chris Lattner) Date: Fri, 3 Nov 2006 16:01:29 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/Generic/BasicInstrs.c Message-ID: <200611032201.kA3M1TpC002677@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/Generic: BasicInstrs.c updated: 1.4 -> 1.5 --- Log message: this started failing due to Reid's changes in the bc format. insulate it from future changes. --- Diffs of the changes: (+1 -1) BasicInstrs.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/Regression/CodeGen/Generic/BasicInstrs.c diff -u llvm/test/Regression/CodeGen/Generic/BasicInstrs.c:1.4 llvm/test/Regression/CodeGen/Generic/BasicInstrs.c:1.5 --- llvm/test/Regression/CodeGen/Generic/BasicInstrs.c:1.4 Sat Apr 23 16:26:11 2005 +++ llvm/test/Regression/CodeGen/Generic/BasicInstrs.c Fri Nov 3 16:01:15 2006 @@ -1,7 +1,7 @@ // This file can be used to see what a native C compiler is generating for a // variety of interesting operations. // -// RUN: %llvmgcc -c %s -o - | llc +// RUN: %llvmgcc -S %s -o - | llvm-as | llc unsigned int udiv(unsigned int X, unsigned int Y) { return X/Y; From sabre at nondot.org Fri Nov 3 16:27:54 2006 From: sabre at nondot.org (Chris Lattner) Date: Fri, 3 Nov 2006 16:27:54 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/README.txt Message-ID: <200611032227.kA3MRsZR009495@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: README.txt updated: 1.44 -> 1.45 --- Log message: add a note --- Diffs of the changes: (+6 -0) README.txt | 6 ++++++ 1 files changed, 6 insertions(+) Index: llvm/lib/Target/README.txt diff -u llvm/lib/Target/README.txt:1.44 llvm/lib/Target/README.txt:1.45 --- llvm/lib/Target/README.txt:1.44 Thu Oct 26 01:15:43 2006 +++ llvm/lib/Target/README.txt Fri Nov 3 16:27:39 2006 @@ -331,4 +331,10 @@ The SingleSource/Benchmarks/Shootout-C++/hash and hash2 tests have examples of this construct. + +//===---------------------------------------------------------------------===// + +Instcombine misses several of these cases (see the testcase in the patch): +http://gcc.gnu.org/ml/gcc-patches/2006-10/msg01519.html + //===---------------------------------------------------------------------===// From alenhar2 at cs.uiuc.edu Fri Nov 3 16:45:36 2006 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Fri, 3 Nov 2006 16:45:36 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/2007-11-03-Memmove64.ll Message-ID: <200611032245.kA3MjaLB027865@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/InstCombine: 2007-11-03-Memmove64.ll added (r1.1) --- Log message: add a regression for memmove --- Diffs of the changes: (+18 -0) 2007-11-03-Memmove64.ll | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+) Index: llvm/test/Regression/Transforms/InstCombine/2007-11-03-Memmove64.ll diff -c /dev/null llvm/test/Regression/Transforms/InstCombine/2007-11-03-Memmove64.ll:1.1 *** /dev/null Fri Nov 3 16:45:19 2006 --- llvm/test/Regression/Transforms/InstCombine/2007-11-03-Memmove64.ll Fri Nov 3 16:45:09 2006 *************** *** 0 **** --- 1,18 ---- + ;RUN: llvm-as < %s | opt -instcombine | llvm-dis |not grep memmove.i32 + ; Instcombine was trying to turn this into a memmove.i32 + + target datalayout = "e-p:64:64" + target endian = little + target pointersize = 64 + target triple = "alphaev67-unknown-linux-gnu" + %str10 = internal constant [1 x sbyte] zeroinitializer ; <[1 x sbyte]*> [#uses=1] + + implementation ; Functions: + + void %do_join(sbyte* %b) { + entry: + call void %llvm.memmove.i64( sbyte* %b, sbyte* getelementptr ([1 x sbyte]* %str10, int 0, ulong 0), ulong 1, uint 1 ) + ret void + } + + declare void %llvm.memmove.i64(sbyte*, sbyte*, ulong, uint) From alenhar2 at cs.uiuc.edu Fri Nov 3 16:46:09 2006 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Fri, 3 Nov 2006 16:46:09 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200611032246.kA3Mk9Rb027882@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.535 -> 1.536 --- Log message: The wrong parameter was being tested to deturmine i32 vs i64 --- Diffs of the changes: (+1 -1) InstructionCombining.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.535 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.536 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.535 Thu Nov 2 14:25:50 2006 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Fri Nov 3 16:45:50 2006 @@ -6405,7 +6405,7 @@ if (GVSrc->isConstant()) { Module *M = CI.getParent()->getParent()->getParent(); const char *Name; - if (CI.getCalledFunction()->getFunctionType()->getParamType(3) == + if (CI.getCalledFunction()->getFunctionType()->getParamType(2) == Type::UIntTy) Name = "llvm.memcpy.i32"; else From sabre at nondot.org Fri Nov 3 15:59:02 2006 From: sabre at nondot.org (Chris Lattner) Date: Fri, 3 Nov 2006 15:59:02 -0600 Subject: [llvm-commits] CVS: llvm/lib/Analysis/BasicAliasAnalysis.cpp Message-ID: <200611032159.kA3Lx2Jq002596@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: BasicAliasAnalysis.cpp updated: 1.88 -> 1.89 --- Log message: Fix BasicAA/2006-11-03-BasicAAVectorCrash.ll by handling out-of-range vector accesses like we handle out-of-range array accesses. --- Diffs of the changes: (+20 -8) BasicAliasAnalysis.cpp | 28 ++++++++++++++++++++-------- 1 files changed, 20 insertions(+), 8 deletions(-) Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp diff -u llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.88 llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.89 --- llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.88 Thu Nov 2 14:25:49 2006 +++ llvm/lib/Analysis/BasicAliasAnalysis.cpp Fri Nov 3 15:58:48 2006 @@ -555,20 +555,21 @@ } if (G1OC != G2OC) { - // Handle the "be careful" case above: if this is an array + // Handle the "be careful" case above: if this is an array/packed // subscript, scan for a subsequent variable array index. - if (isa(BasePtr1Ty)) { - const Type *NextTy =cast(BasePtr1Ty)->getElementType(); + if (isa(BasePtr1Ty)) { + const Type *NextTy = + cast(BasePtr1Ty)->getElementType(); bool isBadCase = false; for (unsigned Idx = FirstConstantOper+1; - Idx != MinOperands && isa(NextTy); ++Idx) { + Idx != MinOperands && isa(NextTy); ++Idx) { const Value *V1 = GEP1Ops[Idx], *V2 = GEP2Ops[Idx]; if (!isa(V1) || !isa(V2)) { isBadCase = true; break; } - NextTy = cast(NextTy)->getElementType(); + NextTy = cast(NextTy)->getElementType(); } if (isBadCase) G1OC = 0; @@ -668,10 +669,14 @@ if (Op1) { if (const ConstantInt *Op1C = dyn_cast(Op1)) { // If this is an array index, make sure the array element is in range. - if (const ArrayType *AT = dyn_cast(BasePtr1Ty)) + if (const ArrayType *AT = dyn_cast(BasePtr1Ty)) { if (Op1C->getZExtValue() >= AT->getNumElements()) return MayAlias; // Be conservative with out-of-range accesses - + } else if (const PackedType *PT = dyn_cast(BasePtr1Ty)) { + if (Op1C->getZExtValue() >= PT->getNumElements()) + return MayAlias; // Be conservative with out-of-range accesses + } + } else { // GEP1 is known to produce a value less than GEP2. To be // conservatively correct, we must assume the largest possible @@ -685,15 +690,22 @@ // if (const ArrayType *AT = dyn_cast(BasePtr1Ty)) GEP1Ops[i] = ConstantInt::get(Type::LongTy, AT->getNumElements()-1); + else if (const PackedType *PT = dyn_cast(BasePtr1Ty)) + GEP1Ops[i] = ConstantInt::get(Type::LongTy, PT->getNumElements()-1); + } } if (Op2) { if (const ConstantInt *Op2C = dyn_cast(Op2)) { // If this is an array index, make sure the array element is in range. - if (const ArrayType *AT = dyn_cast(BasePtr1Ty)) + if (const ArrayType *AT = dyn_cast(BasePtr1Ty)) { if (Op2C->getZExtValue() >= AT->getNumElements()) return MayAlias; // Be conservative with out-of-range accesses + } else if (const PackedType *PT = dyn_cast(BasePtr1Ty)) { + if (Op2C->getZExtValue() >= PT->getNumElements()) + return MayAlias; // Be conservative with out-of-range accesses + } } else { // Conservatively assume the minimum value for this index GEP2Ops[i] = Constant::getNullValue(Op2->getType()); } From sabre at nondot.org Fri Nov 3 17:45:31 2006 From: sabre at nondot.org (Chris Lattner) Date: Fri, 3 Nov 2006 17:45:31 -0600 Subject: [llvm-commits] CVS: llvm/utils/TableGen/CodeGenTarget.cpp Message-ID: <200611032345.kA3NjVlG017244@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: CodeGenTarget.cpp updated: 1.71 -> 1.72 --- Log message: eliminate need for the NumMIOperands field in Operand. --- Diffs of the changes: (+13 -1) CodeGenTarget.cpp | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletion(-) Index: llvm/utils/TableGen/CodeGenTarget.cpp diff -u llvm/utils/TableGen/CodeGenTarget.cpp:1.71 llvm/utils/TableGen/CodeGenTarget.cpp:1.72 --- llvm/utils/TableGen/CodeGenTarget.cpp:1.71 Wed Nov 1 17:03:11 2006 +++ llvm/utils/TableGen/CodeGenTarget.cpp Fri Nov 3 17:45:17 2006 @@ -365,8 +365,20 @@ DagInit *MIOpInfo = 0; if (Rec->isSubClassOf("Operand")) { PrintMethod = Rec->getValueAsString("PrintMethod"); - NumOps = Rec->getValueAsInt("NumMIOperands"); MIOpInfo = Rec->getValueAsDag("MIOperandInfo"); + + // Verify that MIOpInfo has an 'ops' root value. + if (!dynamic_cast(MIOpInfo->getOperator()) || + dynamic_cast(MIOpInfo->getOperator()) + ->getDef()->getName() != "ops") + throw "Bad value for MIOperandInfo in operand '" + Rec->getName() + + "'\n"; + + // If we have MIOpInfo, then we have #operands equal to number of entries + // in MIOperandInfo. + if (unsigned NumArgs = MIOpInfo->getNumArgs()) + NumOps = NumArgs; + } else if (Rec->getName() == "variable_ops") { hasVariableNumberOfOperands = true; continue; From sabre at nondot.org Fri Nov 3 17:47:00 2006 From: sabre at nondot.org (Chris Lattner) Date: Fri, 3 Nov 2006 17:47:00 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstrInfo.td Message-ID: <200611032347.kA3Nl0ff017337@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCInstrInfo.td updated: 1.249 -> 1.250 --- Log message: remove dead vars --- Diffs of the changes: (+0 -3) PPCInstrInfo.td | 3 --- 1 files changed, 3 deletions(-) Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.249 llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.250 --- llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.249 Mon Oct 23 20:08:42 2006 +++ llvm/lib/Target/PowerPC/PPCInstrInfo.td Fri Nov 3 17:46:45 2006 @@ -244,17 +244,14 @@ // Address operands def memri : Operand { let PrintMethod = "printMemRegImm"; - let NumMIOperands = 2; let MIOperandInfo = (ops i32imm, ptr_rc); } def memrr : Operand { let PrintMethod = "printMemRegReg"; - let NumMIOperands = 2; let MIOperandInfo = (ops ptr_rc, ptr_rc); } def memrix : Operand { // memri where the imm is shifted 2 bits. let PrintMethod = "printMemRegImmShifted"; - let NumMIOperands = 2; let MIOperandInfo = (ops i32imm, ptr_rc); } From sabre at nondot.org Fri Nov 3 17:47:34 2006 From: sabre at nondot.org (Chris Lattner) Date: Fri, 3 Nov 2006 17:47:34 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/SparcInstrInfo.td Message-ID: <200611032347.kA3NlYno017372@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: SparcInstrInfo.td updated: 1.131 -> 1.132 --- Log message: remove redundant/dead vars --- Diffs of the changes: (+0 -2) SparcInstrInfo.td | 2 -- 1 files changed, 2 deletions(-) Index: llvm/lib/Target/Sparc/SparcInstrInfo.td diff -u llvm/lib/Target/Sparc/SparcInstrInfo.td:1.131 llvm/lib/Target/Sparc/SparcInstrInfo.td:1.132 --- llvm/lib/Target/Sparc/SparcInstrInfo.td:1.131 Fri Oct 13 16:14:26 2006 +++ llvm/lib/Target/Sparc/SparcInstrInfo.td Fri Nov 3 17:47:20 2006 @@ -73,12 +73,10 @@ // Address operands def MEMrr : Operand { let PrintMethod = "printMemOperand"; - let NumMIOperands = 2; let MIOperandInfo = (ops IntRegs, IntRegs); } def MEMri : Operand { let PrintMethod = "printMemOperand"; - let NumMIOperands = 2; let MIOperandInfo = (ops IntRegs, i32imm); } From sabre at nondot.org Fri Nov 3 17:48:01 2006 From: sabre at nondot.org (Chris Lattner) Date: Fri, 3 Nov 2006 17:48:01 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.td Message-ID: <200611032348.kA3Nm1NN017410@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMInstrInfo.td updated: 1.72 -> 1.73 --- Log message: remove dead/redundant vars --- Diffs of the changes: (+0 -3) ARMInstrInfo.td | 3 --- 1 files changed, 3 deletions(-) Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.72 llvm/lib/Target/ARM/ARMInstrInfo.td:1.73 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.72 Wed Nov 1 08:13:27 2006 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Fri Nov 3 17:47:46 2006 @@ -15,19 +15,16 @@ // Address operands def op_addr_mode1 : Operand { let PrintMethod = "printAddrMode1"; - let NumMIOperands = 3; let MIOperandInfo = (ops ptr_rc, ptr_rc, i32imm); } def op_addr_mode5 : Operand { let PrintMethod = "printAddrMode5"; - let NumMIOperands = 2; let MIOperandInfo = (ops ptr_rc, i32imm); } def memri : Operand { let PrintMethod = "printMemRegImm"; - let NumMIOperands = 2; let MIOperandInfo = (ops i32imm, ptr_rc); } From sabre at nondot.org Fri Nov 3 17:49:10 2006 From: sabre at nondot.org (Chris Lattner) Date: Fri, 3 Nov 2006 17:49:10 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86InstrInfo.td X86InstrSSE.td X86InstrX86-64.td Message-ID: <200611032349.kA3NnAcE017483@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86InstrInfo.td updated: 1.293 -> 1.294 X86InstrSSE.td updated: 1.168 -> 1.169 X86InstrX86-64.td updated: 1.5 -> 1.6 --- Log message: remove dead/redundant vars --- Diffs of the changes: (+0 -6) X86InstrInfo.td | 2 -- X86InstrSSE.td | 2 -- X86InstrX86-64.td | 2 -- 3 files changed, 6 deletions(-) Index: llvm/lib/Target/X86/X86InstrInfo.td diff -u llvm/lib/Target/X86/X86InstrInfo.td:1.293 llvm/lib/Target/X86/X86InstrInfo.td:1.294 --- llvm/lib/Target/X86/X86InstrInfo.td:1.293 Mon Oct 30 16:32:30 2006 +++ llvm/lib/Target/X86/X86InstrInfo.td Fri Nov 3 17:48:55 2006 @@ -94,7 +94,6 @@ // class X86MemOperand : Operand { let PrintMethod = printMethod; - let NumMIOperands = 4; let MIOperandInfo = (ops ptr_rc, i8imm, ptr_rc, i32imm); } @@ -109,7 +108,6 @@ def lea32mem : Operand { let PrintMethod = "printi32mem"; - let NumMIOperands = 4; let MIOperandInfo = (ops GR32, i8imm, GR32, i32imm); } Index: llvm/lib/Target/X86/X86InstrSSE.td diff -u llvm/lib/Target/X86/X86InstrSSE.td:1.168 llvm/lib/Target/X86/X86InstrSSE.td:1.169 --- llvm/lib/Target/X86/X86InstrSSE.td:1.168 Wed Nov 1 00:53:52 2006 +++ llvm/lib/Target/X86/X86InstrSSE.td Fri Nov 3 17:48:56 2006 @@ -46,12 +46,10 @@ def ssmem : Operand { let PrintMethod = "printf32mem"; - let NumMIOperands = 4; let MIOperandInfo = (ops ptr_rc, i8imm, ptr_rc, i32imm); } def sdmem : Operand { let PrintMethod = "printf64mem"; - let NumMIOperands = 4; let MIOperandInfo = (ops ptr_rc, i8imm, ptr_rc, i32imm); } Index: llvm/lib/Target/X86/X86InstrX86-64.td diff -u llvm/lib/Target/X86/X86InstrX86-64.td:1.5 llvm/lib/Target/X86/X86InstrX86-64.td:1.6 --- llvm/lib/Target/X86/X86InstrX86-64.td:1.5 Wed Oct 11 16:03:53 2006 +++ llvm/lib/Target/X86/X86InstrX86-64.td Fri Nov 3 17:48:56 2006 @@ -24,13 +24,11 @@ def lea64mem : Operand { let PrintMethod = "printi64mem"; - let NumMIOperands = 4; let MIOperandInfo = (ops GR64, i8imm, GR64, i32imm); } def lea64_32mem : Operand { let PrintMethod = "printlea64_32mem"; - let NumMIOperands = 4; let MIOperandInfo = (ops GR32, i8imm, GR32, i32imm); } From sabre at nondot.org Fri Nov 3 17:50:29 2006 From: sabre at nondot.org (Chris Lattner) Date: Fri, 3 Nov 2006 17:50:29 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/Target.td Message-ID: <200611032350.kA3NoTm1017557@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: Target.td updated: 1.87 -> 1.88 --- Log message: remove dead var --- Diffs of the changes: (+0 -1) Target.td | 1 - 1 files changed, 1 deletion(-) Index: llvm/lib/Target/Target.td diff -u llvm/lib/Target/Target.td:1.87 llvm/lib/Target/Target.td:1.88 --- llvm/lib/Target/Target.td:1.87 Tue Oct 31 18:26:27 2006 +++ llvm/lib/Target/Target.td Fri Nov 3 17:50:15 2006 @@ -213,7 +213,6 @@ class Operand { ValueType Type = ty; string PrintMethod = "printOperand"; - int NumMIOperands = 1; dag MIOperandInfo = (ops); } From sabre at nondot.org Fri Nov 3 17:52:32 2006 From: sabre at nondot.org (Chris Lattner) Date: Fri, 3 Nov 2006 17:52:32 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/Target.td Message-ID: <200611032352.kA3NqWeV017630@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: Target.td updated: 1.88 -> 1.89 --- Log message: initial steps to getting the predicate on PPC::BLR right. --- Diffs of the changes: (+11 -0) Target.td | 11 +++++++++++ 1 files changed, 11 insertions(+) Index: llvm/lib/Target/Target.td diff -u llvm/lib/Target/Target.td:1.88 llvm/lib/Target/Target.td:1.89 --- llvm/lib/Target/Target.td:1.88 Fri Nov 3 17:50:15 2006 +++ llvm/lib/Target/Target.td Fri Nov 3 17:52:18 2006 @@ -222,6 +222,17 @@ def i32imm : Operand; def i64imm : Operand; + +/// PredicateOperand - This can be used to define a predicate operand for an +/// instruction. OpTypes specifies the MIOperandInfo for the operand, and +/// AlwaysVal specifies the value of this predicate when set to "always +/// execute". +class PredicateOperand : Operand { + let MIOperandInfo = OpTypes; + dag ExecuteAlways = AlwaysVal; +} + + // InstrInfo - This class should only be instantiated once to provide parameters // which are global to the the target machine. // From sabre at nondot.org Fri Nov 3 17:53:40 2006 From: sabre at nondot.org (Chris Lattner) Date: Fri, 3 Nov 2006 17:53:40 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstrInfo.td Message-ID: <200611032353.kA3NreMD017721@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCInstrInfo.td updated: 1.250 -> 1.251 --- Log message: Describe PPC predicates, which are a pair of CR# and condition. --- Diffs of the changes: (+4 -0) PPCInstrInfo.td | 4 ++++ 1 files changed, 4 insertions(+) Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.250 llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.251 --- llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.250 Fri Nov 3 17:46:45 2006 +++ llvm/lib/Target/PowerPC/PPCInstrInfo.td Fri Nov 3 17:53:25 2006 @@ -255,6 +255,10 @@ let MIOperandInfo = (ops i32imm, ptr_rc); } +// PowerPC Predicate operand. 20 = always, CR0 is a dummy reg that doesn't +// matter. +def pred : PredicateOperand<(ops imm, CRRC), (ops 20, CR0)>; + // Define PowerPC specific addressing mode. def iaddr : ComplexPattern; def xaddr : ComplexPattern; From evan.cheng at apple.com Fri Nov 3 18:22:10 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 3 Nov 2006 18:22:10 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/VirtRegMap.cpp Message-ID: <200611040022.kA40MA3B018340@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: VirtRegMap.cpp updated: 1.78 -> 1.79 --- Log message: Fixed some spiller bugs exposed by the recent two-address code changes. Now there may be other def(s) apart from the use&def two-address operand. We need to check if the register reuse for a use&def operand may conflicts with another def. Provide a mean to recover from the conflict if it is detected when the defs are processed later. --- Diffs of the changes: (+53 -21) VirtRegMap.cpp | 74 ++++++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 53 insertions(+), 21 deletions(-) Index: llvm/lib/CodeGen/VirtRegMap.cpp diff -u llvm/lib/CodeGen/VirtRegMap.cpp:1.78 llvm/lib/CodeGen/VirtRegMap.cpp:1.79 --- llvm/lib/CodeGen/VirtRegMap.cpp:1.78 Wed Nov 1 17:18:32 2006 +++ llvm/lib/CodeGen/VirtRegMap.cpp Fri Nov 3 18:21:55 2006 @@ -394,8 +394,15 @@ class VISIBILITY_HIDDEN ReuseInfo { MachineInstr &MI; std::vector Reuses; + bool *PhysRegsClobbered; public: - ReuseInfo(MachineInstr &mi) : MI(mi) {} + ReuseInfo(MachineInstr &mi, const MRegisterInfo *mri) : MI(mi) { + PhysRegsClobbered = new bool[mri->getNumRegs()]; + std::fill(PhysRegsClobbered, PhysRegsClobbered+mri->getNumRegs(), false); + } + ~ReuseInfo() { + delete[] PhysRegsClobbered; + } bool hasReuses() const { return !Reuses.empty(); @@ -414,6 +421,14 @@ Reuses.push_back(ReusedOp(OpNo, StackSlot, PhysRegReused, AssignedPhysReg, VirtReg)); } + + void markClobbered(unsigned PhysReg) { + PhysRegsClobbered[PhysReg] = true; + } + + bool isClobbered(unsigned PhysReg) const { + return PhysRegsClobbered[PhysReg]; + } /// GetRegForReload - We are about to emit a reload into PhysReg. If there /// is some other operand that is using the specified register, either pick @@ -430,11 +445,7 @@ // register. if (Op.PhysRegReused == PhysReg) { // Yup, use the reload register that we didn't use before. - unsigned NewReg = Op.AssignedPhysReg; - - // Remove the record for the previous reuse. We know it can never be - // invalidated now. - Reuses.erase(Reuses.begin()+ro); + unsigned NewReg = Op.AssignedPhysReg; return GetRegForReload(NewReg, MI, Spills, MaybeDeadStores); } else { // Otherwise, we might also have a problem if a previously reused @@ -518,8 +529,19 @@ /// ReusedOperands - Keep track of operand reuse in case we need to undo /// reuse. - ReuseInfo ReusedOperands(MI); - + ReuseInfo ReusedOperands(MI, MRI); + + // Loop over all of the implicit defs, clearing them from our available + // sets. + const unsigned *ImpDef = TII->getImplicitDefs(MI.getOpcode()); + if (ImpDef) { + for ( ; *ImpDef; ++ImpDef) { + PhysRegsUsed[*ImpDef] = true; + ReusedOperands.markClobbered(*ImpDef); + Spills.ClobberPhysReg(*ImpDef); + } + } + // Process all of the spilled uses and all non spilled reg references. for (unsigned i = 0, e = MI.getNumOperands(); i != e; ++i) { MachineOperand &MO = MI.getOperand(i); @@ -530,6 +552,7 @@ // Ignore physregs for spilling, but remember that it is used by this // function. PhysRegsUsed[MO.getReg()] = true; + ReusedOperands.markClobbered(MO.getReg()); continue; } @@ -541,6 +564,8 @@ // This virtual register was assigned a physreg! unsigned Phys = VRM.getPhys(VirtReg); PhysRegsUsed[Phys] = true; + if (MO.isDef()) + ReusedOperands.markClobbered(Phys); MI.getOperand(i).setReg(Phys); continue; } @@ -567,8 +592,10 @@ MI.getOperand(ti).isReg() && MI.getOperand(ti).getReg() == VirtReg) { // Okay, we have a two address operand. We can reuse this physreg as - // long as we are allowed to clobber the value. - CanReuse = Spills.canClobberPhysReg(StackSlot); + // long as we are allowed to clobber the value and there is an earlier + // def that has already clobbered the physreg. + CanReuse = Spills.canClobberPhysReg(StackSlot) && + !ReusedOperands.isClobbered(PhysReg); } if (CanReuse) { @@ -595,6 +622,9 @@ // we can get at R0 or its alias. ReusedOperands.addReuse(i, StackSlot, PhysReg, VRM.getPhys(VirtReg), VirtReg); + if (ti != -1) + // Only mark it clobbered if this is a use&def operand. + ReusedOperands.markClobbered(PhysReg); ++NumReused; continue; } @@ -629,6 +659,7 @@ << VirtReg << " instead of reloading into same physreg.\n"); MI.getOperand(i).setReg(PhysReg); + ReusedOperands.markClobbered(PhysReg); ++NumReused; continue; } @@ -637,6 +668,7 @@ MBB.getParent()->getSSARegMap()->getRegClass(VirtReg); PhysRegsUsed[DesignatedReg] = true; + ReusedOperands.markClobbered(DesignatedReg); MRI->copyRegToReg(MBB, &MI, DesignatedReg, PhysReg, RC); // This invalidates DesignatedReg. @@ -664,6 +696,7 @@ Spills, MaybeDeadStores); PhysRegsUsed[PhysReg] = true; + ReusedOperands.markClobbered(PhysReg); MRI->loadRegFromStackSlot(MBB, &MI, PhysReg, StackSlot, RC); // This invalidates PhysReg. Spills.ClobberPhysReg(PhysReg); @@ -676,16 +709,6 @@ DEBUG(std::cerr << '\t' << *prior(MII)); } - // Loop over all of the implicit defs, clearing them from our available - // sets. - const unsigned *ImpDef = TII->getImplicitDefs(MI.getOpcode()); - if (ImpDef) { - for ( ; *ImpDef; ++ImpDef) { - PhysRegsUsed[*ImpDef] = true; - Spills.ClobberPhysReg(*ImpDef); - } - } - DEBUG(std::cerr << '\t' << MI); // If we have folded references to memory operands, make sure we clear all @@ -798,6 +821,7 @@ // If it's not a no-op copy, it clobbers the value in the destreg. Spills.ClobberPhysReg(VirtReg); + ReusedOperands.markClobbered(VirtReg); // Check to see if this instruction is a load from a stack slot into // a register. If so, this provides the stack slot value in the reg. @@ -824,10 +848,18 @@ int TiedOp = TII->findTiedToSrcOperand(MI.getOpcode(), i); if (TiedOp != -1) PhysReg = MI.getOperand(TiedOp).getReg(); - else + else { PhysReg = VRM.getPhys(VirtReg); + if (ReusedOperands.isClobbered(PhysReg)) { + // Another def has taken the assigned physreg. It must have been a + // use&def which got it due to reuse. Undo the reuse! + PhysReg = ReusedOperands.GetRegForReload(PhysReg, &MI, + Spills, MaybeDeadStores); + } + } PhysRegsUsed[PhysReg] = true; + ReusedOperands.markClobbered(PhysReg); MRI->storeRegToStackSlot(MBB, next(MII), PhysReg, StackSlot, RC); DEBUG(std::cerr << "Store:\t" << *next(MII)); MI.getOperand(i).setReg(PhysReg); From reid at x10sys.com Fri Nov 3 18:33:57 2006 From: reid at x10sys.com (Reid Spencer) Date: Fri, 3 Nov 2006 18:33:57 -0600 Subject: [llvm-commits] CVS: llvm/docs/GettingStarted.html Message-ID: <200611040033.kA40XvHD018581@zion.cs.uiuc.edu> Changes in directory llvm/docs: GettingStarted.html updated: 1.146 -> 1.147 --- Log message: Add a note about warnings from the GNU ld 2.16.X linker. --- Diffs of the changes: (+6 -1) GettingStarted.html | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletion(-) Index: llvm/docs/GettingStarted.html diff -u llvm/docs/GettingStarted.html:1.146 llvm/docs/GettingStarted.html:1.147 --- llvm/docs/GettingStarted.html:1.146 Thu Sep 7 12:34:27 2006 +++ llvm/docs/GettingStarted.html Fri Nov 3 18:33:42 2006 @@ -533,6 +533,11 @@

GCC 4.1.1: GCC fails to build LLVM with template concept check errors compiling some files. At the time of this writing, GCC mainline (4.2) did not share the problem.

+

GNU ld 2.16.X. Some 2.16.X versions of the ld linker will produce very +long warning messages complaining that some ".gnu.linkonce.t.*" symbol was +defined in a discarded section. You can safely ignore these messages as they are +erroneous and the linkage is correct. These messages disappear using ld +2.17.

@@ -1688,7 +1693,7 @@ Chris Lattner
Reid Spencer
The LLVM Compiler Infrastructure
- Last modified: $Date: 2006/09/07 17:34:27 $ + Last modified: $Date: 2006/11/04 00:33:42 $ From reid at x10sys.com Fri Nov 3 18:50:06 2006 From: reid at x10sys.com (Reid Spencer) Date: Fri, 3 Nov 2006 18:50:06 -0600 Subject: [llvm-commits] CVS: llvm/test/Scripts/notcast Message-ID: <200611040050.kA40o6oL018832@zion.cs.uiuc.edu> Changes in directory llvm/test/Scripts: notcast added (r1.1) --- Log message: For PR950: http://llvm.org/PR950 : A little script to return 1 if it encounters any of the cast instructions on the stdin. --- Diffs of the changes: (+12 -0) notcast | 12 ++++++++++++ 1 files changed, 12 insertions(+) Index: llvm/test/Scripts/notcast diff -c /dev/null llvm/test/Scripts/notcast:1.1 *** /dev/null Fri Nov 3 18:50:02 2006 --- llvm/test/Scripts/notcast Fri Nov 3 18:49:52 2006 *************** *** 0 **** --- 1,12 ---- + #!/bin/sh + # + # Program: notcast + # + # Synopsis: Returns 0 if the input does not contain a cast operator + # + # Syntax: notcast + + if grep '\([sz]ext\)\|\(trunc\)\|\(fp2[us]int\)\|\([us]int2fp\)\|\(bitconvert\)\|\(fpext\)\|\(fptrunc\)' + then exit 1 + else exit 0 + fi From reid at x10sys.com Fri Nov 3 18:58:53 2006 From: reid at x10sys.com (Reid Spencer) Date: Fri, 3 Nov 2006 18:58:53 -0600 Subject: [llvm-commits] CVS: llvm/test/Scripts/notcast Message-ID: <200611040058.kA40wrlT018964@zion.cs.uiuc.edu> Changes in directory llvm/test/Scripts: notcast updated: 1.1 -> 1.2 --- Log message: Allow the regular expression to be extended by a parameter. --- Diffs of the changes: (+5 -2) notcast | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) Index: llvm/test/Scripts/notcast diff -u llvm/test/Scripts/notcast:1.1 llvm/test/Scripts/notcast:1.2 --- llvm/test/Scripts/notcast:1.1 Fri Nov 3 18:49:52 2006 +++ llvm/test/Scripts/notcast Fri Nov 3 18:58:39 2006 @@ -4,9 +4,12 @@ # # Synopsis: Returns 0 if the input does not contain a cast operator # -# Syntax: notcast +# Syntax: notcast tailexpr +# +# tailexpr - optionally allows a regular expression to go at the end +# -if grep '\([sz]ext\)\|\(trunc\)\|\(fp2[us]int\)\|\([us]int2fp\)\|\(bitconvert\)\|\(fpext\)\|\(fptrunc\)' +if grep '\(\([sz]ext\)\|\(trunc\)\|\(fp2[us]int\)\|\([us]int2fp\)\|\(bitconvert\)\|\(fpext\)\|\(fptrunc\)\)'"$1" then exit 1 else exit 0 fi From reid at x10sys.com Fri Nov 3 19:11:33 2006 From: reid at x10sys.com (Reid Spencer) Date: Fri, 3 Nov 2006 19:11:33 -0600 Subject: [llvm-commits] CVS: llvm/test/Scripts/notcast Message-ID: <200611040111.kA41BXHR019181@zion.cs.uiuc.edu> Changes in directory llvm/test/Scripts: notcast updated: 1.2 -> 1.3 --- Log message: Okay, need a pattern before and after the cast pattern. --- Diffs of the changes: (+3 -2) notcast | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Index: llvm/test/Scripts/notcast diff -u llvm/test/Scripts/notcast:1.2 llvm/test/Scripts/notcast:1.3 --- llvm/test/Scripts/notcast:1.2 Fri Nov 3 18:58:39 2006 +++ llvm/test/Scripts/notcast Fri Nov 3 19:11:19 2006 @@ -6,10 +6,11 @@ # # Syntax: notcast tailexpr # -# tailexpr - optionally allows a regular expression to go at the end +# postpat - optionally allows a regular expression to go at the end +# prepat - optionally allow a regular expression to go at the start # -if grep '\(\([sz]ext\)\|\(trunc\)\|\(fp2[us]int\)\|\([us]int2fp\)\|\(bitconvert\)\|\(fpext\)\|\(fptrunc\)\)'"$1" +if grep "$2"'\(\([sz]ext\)\|\(trunc\)\|\(fp2[us]int\)\|\([us]int2fp\)\|\(bitconvert\)\|\(fpext\)\|\(fptrunc\)\)'"$1" then exit 1 else exit 0 fi From zhousheng00 at gmail.com Fri Nov 3 18:52:28 2006 From: zhousheng00 at gmail.com (Zhou Sheng) Date: Sat, 4 Nov 2006 08:52:28 +0800 Subject: [llvm-commits] SHR Patch (Updated) Message-ID: <8abe0dc60611031652p564f9448j145c24b56ad7a471@mail.gmail.com> Hi, Chris, i'm Sheng. Here are the SHR patches modified according to your suggestion. Please review them, thanks:) ***NOTE: This is for review only, please don't commit any of this. Sheng. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20061104/b60a3ccb/attachment.html -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: SHR.patch Url: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20061104/b60a3ccb/attachment.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: SHR-LLVMGCC.patch Url: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20061104/b60a3ccb/attachment-0001.pl From sabre at nondot.org Fri Nov 3 19:36:04 2006 From: sabre at nondot.org (Chris Lattner) Date: Fri, 3 Nov 2006 19:36:04 -0600 Subject: [llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp Message-ID: <200611040136.kA41a4VI019558@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.277 -> 1.278 --- Log message: First steps to getting PredicateOperand's to work. This handles instruction and pat pattern definitions. Codegen is not right for them yet. --- Diffs of the changes: (+37 -14) DAGISelEmitter.cpp | 51 +++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 37 insertions(+), 14 deletions(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.277 llvm/utils/TableGen/DAGISelEmitter.cpp:1.278 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.277 Thu Nov 2 19:11:05 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Fri Nov 3 19:35:50 2006 @@ -759,27 +759,40 @@ MadeChange = UpdateNodeType(ConvertVTs(RC.getValueTypes()), TP); } - if (getNumChildren() != Inst.getNumOperands()) - TP.error("Instruction '" + getOperator()->getName() + " expects " + - utostr(Inst.getNumOperands()) + " operands, not " + - utostr(getNumChildren()) + " operands!"); - for (unsigned i = 0, e = getNumChildren(); i != e; ++i) { + unsigned ChildNo = 0; + for (unsigned i = 0, e = Inst.getNumOperands(); i != e; ++i) { Record *OperandNode = Inst.getOperand(i); + + // If the instruction expects a predicate operand, we codegen this by + // setting the predicate to it's "execute always" value. + if (OperandNode->isSubClassOf("PredicateOperand")) + continue; + + // Verify that we didn't run out of provided operands. + if (ChildNo >= getNumChildren()) + TP.error("Instruction '" + getOperator()->getName() + + "' expects more operands than were provided."); + MVT::ValueType VT; + TreePatternNode *Child = getChild(ChildNo++); if (OperandNode->isSubClassOf("RegisterClass")) { const CodeGenRegisterClass &RC = ISE.getTargetInfo().getRegisterClass(OperandNode); - MadeChange |=getChild(i)->UpdateNodeType(ConvertVTs(RC.getValueTypes()), - TP); + MadeChange |= Child->UpdateNodeType(ConvertVTs(RC.getValueTypes()), TP); } else if (OperandNode->isSubClassOf("Operand")) { VT = getValueType(OperandNode->getValueAsDef("Type")); - MadeChange |= getChild(i)->UpdateNodeType(VT, TP); + MadeChange |= Child->UpdateNodeType(VT, TP); } else { assert(0 && "Unknown operand type!"); abort(); } - MadeChange |= getChild(i)->ApplyTypeConstraints(TP, NotRegisters); + MadeChange |= Child->ApplyTypeConstraints(TP, NotRegisters); } + + if (ChildNo != getNumChildren()) + TP.error("Instruction '" + getOperator()->getName() + + "' was provided too many operands!"); + return MadeChange; } else { assert(getOperator()->isSubClassOf("SDNodeXForm") && "Unknown node type!"); @@ -1471,25 +1484,35 @@ std::vector ResultNodeOperands; std::vector Operands; for (unsigned i = NumResults, e = CGI.OperandList.size(); i != e; ++i) { - const std::string &OpName = CGI.OperandList[i].Name; + CodeGenInstruction::OperandInfo &Op = CGI.OperandList[i]; + const std::string &OpName = Op.Name; if (OpName.empty()) I->error("Operand #" + utostr(i) + " in operands list has no name!"); - if (!InstInputsCheck.count(OpName)) + if (!InstInputsCheck.count(OpName)) { + // If this is an predicate operand with an ExecuteAlways set filled in, + // we can ignore this. When we codegen it, we will do so as always + // executed. + if (Op.Rec->isSubClassOf("PredicateOperand")) { + // Does it have a non-empty ExecuteAlways field? If so, ignore this + // operand. + if (Op.Rec->getValueAsDag("ExecuteAlways")->getNumArgs()) + continue; + } I->error("Operand $" + OpName + " does not appear in the instruction pattern"); + } TreePatternNode *InVal = InstInputsCheck[OpName]; InstInputsCheck.erase(OpName); // It occurred, remove from map. if (InVal->isLeaf() && dynamic_cast(InVal->getLeafValue())) { Record *InRec = static_cast(InVal->getLeafValue())->getDef(); - if (CGI.OperandList[i].Rec != InRec && - !InRec->isSubClassOf("ComplexPattern")) + if (Op.Rec != InRec && !InRec->isSubClassOf("ComplexPattern")) I->error("Operand $" + OpName + "'s register class disagrees" " between the operand and pattern"); } - Operands.push_back(CGI.OperandList[i].Rec); + Operands.push_back(Op.Rec); // Construct the result for the dest-pattern operand list. TreePatternNode *OpNode = InVal->clone(); From sabre at nondot.org Fri Nov 3 20:35:49 2006 From: sabre at nondot.org (Chris Lattner) Date: Fri, 3 Nov 2006 20:35:49 -0600 Subject: [llvm-commits] CVS: llvm-test/GenerateReport.pl Message-ID: <200611040235.kA42ZnnW020517@zion.cs.uiuc.edu> Changes in directory llvm-test: GenerateReport.pl updated: 1.28 -> 1.29 --- Log message: Fix an issue with CSV output where the last header column label wouldn't be emitted. This caused the LLC/LLC-BETA column to be empty on the nightly tester --- Diffs of the changes: (+6 -0) GenerateReport.pl | 6 ++++++ 1 files changed, 6 insertions(+) Index: llvm-test/GenerateReport.pl diff -u llvm-test/GenerateReport.pl:1.28 llvm-test/GenerateReport.pl:1.29 --- llvm-test/GenerateReport.pl:1.28 Fri Mar 17 00:54:41 2006 +++ llvm-test/GenerateReport.pl Fri Nov 3 20:35:35 2006 @@ -372,11 +372,17 @@ # # Print out the table as csv # + my $firstrow = 1; foreach $Value (@Values) { printf "$$Value[0]"; for ($i = 1; $i < @$Value-1; $i++) { print ",$$Value[$i]" if ($$Value[$i] ne "|"); } + if ($firstrow) { + # Print an extra column for the header. + print ",$$Value[@$Value-1]"; + $firstrow = 0; + } print "\n"; } } else { From sabre at nondot.org Fri Nov 3 20:52:46 2006 From: sabre at nondot.org (Chris Lattner) Date: Fri, 3 Nov 2006 20:52:46 -0600 Subject: [llvm-commits] CVS: llvm-test/SingleSource/Makefile.singlesrc Message-ID: <200611040252.kA42qkbc020827@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource: Makefile.singlesrc updated: 1.30 -> 1.31 --- Log message: add a helpful message for people trying to use bugpoint-llc targets --- Diffs of the changes: (+6 -0) Makefile.singlesrc | 6 ++++++ 1 files changed, 6 insertions(+) Index: llvm-test/SingleSource/Makefile.singlesrc diff -u llvm-test/SingleSource/Makefile.singlesrc:1.30 llvm-test/SingleSource/Makefile.singlesrc:1.31 --- llvm-test/SingleSource/Makefile.singlesrc:1.30 Tue Jun 6 19:05:16 2006 +++ llvm-test/SingleSource/Makefile.singlesrc Fri Nov 3 20:52:31 2006 @@ -38,3 +38,9 @@ -$(CC) $(CFLAGS) -O2 $(TARGET_FLAGS) $< -lm -o $@ $(LDFLAGS) Output/%.native: $(SourceDir)/%.cpp Output/.dir -$(CXX) $(CXXFLAGS) -O2 $(TARGET_FLAGS) $< -lm -o $@ $(LDFLAGS) + + +bugpoint-gccas bugpoint-gccld bugpoint-jit bugpoint-llc \ +bugpoint-llc-beta: + @echo "The $@ target doesn't work in SingleSource. Try:" + @echo " 'make Output/[programname].$@' instead." From sabre at nondot.org Fri Nov 3 23:12:17 2006 From: sabre at nondot.org (Chris Lattner) Date: Fri, 3 Nov 2006 23:12:17 -0600 Subject: [llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp DAGISelEmitter.h Message-ID: <200611040512.kA45CHHE022997@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.278 -> 1.279 DAGISelEmitter.h updated: 1.70 -> 1.71 --- Log message: Parse PredicateOperand's. When an instruction takes one, have the generated isel fill in the instruction operands with the 'execute always' value automatically. --- Diffs of the changes: (+86 -6) DAGISelEmitter.cpp | 80 +++++++++++++++++++++++++++++++++++++++++++++++++---- DAGISelEmitter.h | 12 +++++++ 2 files changed, 86 insertions(+), 6 deletions(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.278 llvm/utils/TableGen/DAGISelEmitter.cpp:1.279 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.278 Fri Nov 3 19:35:50 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Fri Nov 3 23:12:02 2006 @@ -1230,6 +1230,50 @@ } } +void DAGISelEmitter::ParsePredicateOperands() { + std::vector PredOps = + Records.getAllDerivedDefinitions("PredicateOperand"); + + // Find some SDNode. + assert(!SDNodes.empty() && "No SDNodes parsed?"); + Init *SomeSDNode = new DefInit(SDNodes.begin()->first); + + for (unsigned i = 0, e = PredOps.size(); i != e; ++i) { + DagInit *AlwaysInfo = PredOps[i]->getValueAsDag("ExecuteAlways"); + + // Clone the AlwaysInfo dag node, changing the operator from 'ops' to + // SomeSDnode so that we can parse this. + std::vector > Ops; + for (unsigned op = 0, e = AlwaysInfo->getNumArgs(); op != e; ++op) + Ops.push_back(std::make_pair(AlwaysInfo->getArg(op), + AlwaysInfo->getArgName(op))); + DagInit *DI = new DagInit(SomeSDNode, Ops); + + // Create a TreePattern to parse this. + TreePattern P(PredOps[i], DI, false, *this); + assert(P.getNumTrees() == 1 && "This ctor can only produce one tree!"); + + // Copy the operands over into a DAGPredicateOperand. + DAGPredicateOperand PredOpInfo; + + TreePatternNode *T = P.getTree(0); + for (unsigned op = 0, e = T->getNumChildren(); op != e; ++op) { + TreePatternNode *TPN = T->getChild(op); + while (TPN->ApplyTypeConstraints(P, false)) + /* Resolve all types */; + + if (TPN->ContainsUnresolvedType()) + throw "Value #" + utostr(i) + " of PredicateOperand '" + + PredOps[i]->getName() + "' doesn't have a concrete type!"; + + PredOpInfo.AlwaysOps.push_back(TPN); + } + + // Insert it into the PredicateOperands map so we can find it later. + PredicateOperands[PredOps[i]] = PredOpInfo; + } +} + /// HandleUse - Given "Pat" a leaf in the pattern, check to see if it is an /// instruction input. Return true if this is a real use. static bool HandleUse(TreePattern *I, TreePatternNode *Pat, @@ -1496,7 +1540,7 @@ if (Op.Rec->isSubClassOf("PredicateOperand")) { // Does it have a non-empty ExecuteAlways field? If so, ignore this // operand. - if (Op.Rec->getValueAsDag("ExecuteAlways")->getNumArgs()) + if (!getPredicateOperand(Op.Rec).AlwaysOps.empty()) continue; } I->error("Operand $" + OpName + @@ -2690,6 +2734,7 @@ PatternHasProperty(InstPatNode, SDNPHasChain, ISE); bool InputHasChain = isRoot && NodeHasProperty(Pattern, SDNPHasChain, ISE); + unsigned NumResults = Inst.getNumResults(); if (NodeHasOptInFlag) { emitCode("bool HasInFlag = " @@ -2726,11 +2771,34 @@ "&InChains[0], InChains.size());"); } + // Loop over all of the operands of the instruction pattern, emitting code + // to fill them all in. The node 'N' usually has number children equal to + // the number of input operands of the instruction. However, in cases + // where there are predicate operands for an instruction, we need to fill + // in the 'execute always' values. Match up the node operands to the + // instruction operands to do this. std::vector AllOps; - for (unsigned i = 0, e = N->getNumChildren(); i != e; ++i) { - std::vector Ops = EmitResultCode(N->getChild(i), - RetSelected, InFlagDecled, ResNodeDecled); - AllOps.insert(AllOps.end(), Ops.begin(), Ops.end()); + for (unsigned ChildNo = 0, InstOpNo = NumResults; + InstOpNo != II.OperandList.size(); ++InstOpNo) { + std::vector Ops; + + // If this is a normal operand, emit it. + if (!II.OperandList[InstOpNo].Rec->isSubClassOf("PredicateOperand")) { + Ops = EmitResultCode(N->getChild(ChildNo), RetSelected, + InFlagDecled, ResNodeDecled); + AllOps.insert(AllOps.end(), Ops.begin(), Ops.end()); + ++ChildNo; + } else { + // Otherwise, this is a predicate operand, emit the 'execute always' + // operands. + const DAGPredicateOperand &Pred = + ISE.getPredicateOperand(II.OperandList[InstOpNo].Rec); + for (unsigned i = 0, e = Pred.AlwaysOps.size(); i != e; ++i) { + Ops = EmitResultCode(Pred.AlwaysOps[i], RetSelected, + InFlagDecled, ResNodeDecled); + AllOps.insert(AllOps.end(), Ops.begin(), Ops.end()); + } + } } // Emit all the chain and CopyToReg stuff. @@ -2753,7 +2821,6 @@ } } - unsigned NumResults = Inst.getNumResults(); unsigned ResNo = TmpNo++; if (!isRoot || InputHasChain || NodeHasChain || NodeHasOutFlag || NodeHasOptInFlag) { @@ -3820,6 +3887,7 @@ ParseNodeTransforms(OS); ParseComplexPatterns(); ParsePatternFragments(OS); + ParsePredicateOperands(); ParseInstructions(); ParsePatterns(); Index: llvm/utils/TableGen/DAGISelEmitter.h diff -u llvm/utils/TableGen/DAGISelEmitter.h:1.70 llvm/utils/TableGen/DAGISelEmitter.h:1.71 --- llvm/utils/TableGen/DAGISelEmitter.h:1.70 Wed Oct 11 16:02:01 2006 +++ llvm/utils/TableGen/DAGISelEmitter.h Fri Nov 3 23:12:02 2006 @@ -343,6 +343,11 @@ TreePatternNode *ParseTreePattern(DagInit *DI); }; + /// DAGPredicateOperand - One of these is created for each PredicateOperand + /// that has a set ExecuteAlways field. + struct DAGPredicateOperand { + std::vector AlwaysOps; + }; class DAGInstruction { TreePattern *Pattern; @@ -425,6 +430,7 @@ std::map > SDNodeXForms; std::map ComplexPatterns; std::map PatternFragments; + std::map PredicateOperands; std::map Instructions; // Specific SDNode definitions: @@ -479,6 +485,11 @@ abort(); } + const DAGPredicateOperand &getPredicateOperand(Record *R) { + assert(PredicateOperands.count(R) &&"Isn't an analyzed predicate operand!"); + return PredicateOperands.find(R)->second; + } + TreePattern *getPatternFragment(Record *R) const { assert(PatternFragments.count(R) && "Invalid pattern fragment request!"); return PatternFragments.find(R)->second; @@ -505,6 +516,7 @@ void ParseNodeTransforms(std::ostream &OS); void ParseComplexPatterns(); void ParsePatternFragments(std::ostream &OS); + void ParsePredicateOperands(); void ParseInstructions(); void ParsePatterns(); void GenerateVariants(); From sabre at nondot.org Fri Nov 3 23:27:53 2006 From: sabre at nondot.org (Chris Lattner) Date: Fri, 3 Nov 2006 23:27:53 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC.h PPCAsmPrinter.cpp PPCInstrInfo.td Message-ID: <200611040527.kA45RrC7023254@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC.h updated: 1.34 -> 1.35 PPCAsmPrinter.cpp updated: 1.206 -> 1.207 PPCInstrInfo.td updated: 1.251 -> 1.252 --- Log message: Go through all kinds of trouble to mark 'blr' as having a predicate operand that takes a register and condition code. Print these pieces of BLR the right way, even though it is currently set to 'always'. Next up: get the JIT encoding right, then enhance branch folding to produce predicated blr for simple examples. --- Diffs of the changes: (+62 -12) PPC.h | 31 +++++++++++++++++++++++-------- PPCAsmPrinter.cpp | 30 ++++++++++++++++++++++++++++++ PPCInstrInfo.td | 13 +++++++++---- 3 files changed, 62 insertions(+), 12 deletions(-) Index: llvm/lib/Target/PowerPC/PPC.h diff -u llvm/lib/Target/PowerPC/PPC.h:1.34 llvm/lib/Target/PowerPC/PPC.h:1.35 --- llvm/lib/Target/PowerPC/PPC.h:1.34 Wed Sep 20 12:12:19 2006 +++ llvm/lib/Target/PowerPC/PPC.h Fri Nov 3 23:27:39 2006 @@ -17,13 +17,31 @@ #include -namespace llvm { -class PPCTargetMachine; -class FunctionPassManager; -class FunctionPass; -class MachineCodeEmitter; +// GCC #defines PPC on Linux but we use it as our namespace name +#undef PPC +namespace llvm { + class PPCTargetMachine; + class FunctionPassManager; + class FunctionPass; + class MachineCodeEmitter; + + namespace PPC { + /// Predicate - These are "(BO << 5) | BI" for various predicates. + enum Predicate { + PRED_ALWAYS = (20 << 5) | 0, + PRED_LT = (12 << 5) | 0, + PRED_LE = ( 4 << 5) | 1, + PRED_EQ = (12 << 5) | 2, + PRED_GE = ( 4 << 5) | 0, + PRED_GT = (12 << 5) | 1, + PRED_NE = ( 4 << 5) | 2, + PRED_UN = (12 << 5) | 3, + PRED_NU = ( 4 << 5) | 3 + }; + } + FunctionPass *createPPCBranchSelectionPass(); FunctionPass *createPPCISelDag(PPCTargetMachine &TM); FunctionPass *createPPCAsmPrinterPass(std::ostream &OS, @@ -34,9 +52,6 @@ PPCTargetMachine &tm); } // end namespace llvm; -// GCC #defines PPC on Linux but we use it as our namespace name -#undef PPC - // Defines symbolic names for PowerPC registers. This defines a mapping from // register name to register number. // Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.206 llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.207 --- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.206 Thu Nov 2 14:25:49 2006 +++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Fri Nov 3 23:27:39 2006 @@ -236,6 +236,9 @@ printOperand(MI, OpNo+1); } + void printPredicateOperand(const MachineInstr *MI, unsigned OpNo, + const char *Modifier); + virtual bool runOnMachineFunction(MachineFunction &F) = 0; virtual bool doFinalization(Module &M) = 0; }; @@ -363,6 +366,33 @@ return false; } +void PPCAsmPrinter::printPredicateOperand(const MachineInstr *MI, unsigned OpNo, + const char *Modifier) { + assert(Modifier && "Must specify 'cc' or 'reg' as predicate op modifier!"); + unsigned Code = MI->getOperand(OpNo).getImm(); + if (!strcmp(Modifier, "cc")) { + switch ((PPC::Predicate)Code) { + case PPC::PRED_ALWAYS: return; // Don't print anything for always. + case PPC::PRED_LT: O << "lt"; return; + case PPC::PRED_LE: O << "le"; return; + case PPC::PRED_EQ: O << "eq"; return; + case PPC::PRED_GE: O << "ge"; return; + case PPC::PRED_GT: O << "gt"; return; + case PPC::PRED_NE: O << "ne"; return; + case PPC::PRED_UN: O << "un"; return; + case PPC::PRED_NU: O << "nu"; return; + } + + } else { + assert(!strcmp(Modifier, "reg") && + "Need to specify 'cc' or 'reg' as predicate op modifier!"); + // Don't print the register for 'always'. + if (Code == PPC::PRED_ALWAYS) return; + printOperand(MI, OpNo+1); + } +} + + /// printMachineInstruction -- Print out a single PowerPC MI in Darwin syntax to /// the current output stream. /// Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.251 llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.252 --- llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.251 Fri Nov 3 17:53:25 2006 +++ llvm/lib/Target/PowerPC/PPCInstrInfo.td Fri Nov 3 23:27:39 2006 @@ -255,9 +255,11 @@ let MIOperandInfo = (ops i32imm, ptr_rc); } -// PowerPC Predicate operand. 20 = always, CR0 is a dummy reg that doesn't -// matter. -def pred : PredicateOperand<(ops imm, CRRC), (ops 20, CR0)>; +// PowerPC Predicate operand. 640 = ((20<<5)|0) = always, CR0 is a dummy reg +// that doesn't matter. +def pred : PredicateOperand<(ops imm, CRRC), (ops (i32 640), CR0)> { + let PrintMethod = "printPredicateOperand"; +} // Define PowerPC specific addressing mode. def iaddr : ComplexPattern; @@ -315,10 +317,13 @@ let isTerminator = 1, isBarrier = 1, noResults = 1, PPC970_Unit = 7 in { let isReturn = 1 in - def BLR : XLForm_2_ext<19, 16, 20, 0, 0, (ops), "blr", BrB, [(retflag)]>; + def BLR : XLForm_2_ext<19, 16, 20, 0, 0, + (ops pred:$p), + "b${p:cc}lr ${p:reg}", BrB, [(retflag)]>; def BCTR : XLForm_2_ext<19, 528, 20, 0, 0, (ops), "bctr", BrB, []>; } + let Defs = [LR] in def MovePCtoLR : Pseudo<(ops piclabel:$label), "bl $label", []>, PPC970_Unit_BRU; From sabre at nondot.org Fri Nov 3 23:43:03 2006 From: sabre at nondot.org (Chris Lattner) Date: Fri, 3 Nov 2006 23:43:03 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC.h PPCInstrFormats.td PPCInstrInfo.td Message-ID: <200611040543.kA45h3Zx023533@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC.h updated: 1.35 -> 1.36 PPCInstrFormats.td updated: 1.79 -> 1.80 PPCInstrInfo.td updated: 1.252 -> 1.253 --- Log message: encode BLR predicate info for the JIT --- Diffs of the changes: (+29 -15) PPC.h | 20 ++++++++++---------- PPCInstrFormats.td | 13 +++++++++++++ PPCInstrInfo.td | 11 ++++++----- 3 files changed, 29 insertions(+), 15 deletions(-) Index: llvm/lib/Target/PowerPC/PPC.h diff -u llvm/lib/Target/PowerPC/PPC.h:1.35 llvm/lib/Target/PowerPC/PPC.h:1.36 --- llvm/lib/Target/PowerPC/PPC.h:1.35 Fri Nov 3 23:27:39 2006 +++ llvm/lib/Target/PowerPC/PPC.h Fri Nov 3 23:42:48 2006 @@ -28,17 +28,17 @@ class MachineCodeEmitter; namespace PPC { - /// Predicate - These are "(BO << 5) | BI" for various predicates. + /// Predicate - These are "(BI << 5) | BO" for various predicates. enum Predicate { - PRED_ALWAYS = (20 << 5) | 0, - PRED_LT = (12 << 5) | 0, - PRED_LE = ( 4 << 5) | 1, - PRED_EQ = (12 << 5) | 2, - PRED_GE = ( 4 << 5) | 0, - PRED_GT = (12 << 5) | 1, - PRED_NE = ( 4 << 5) | 2, - PRED_UN = (12 << 5) | 3, - PRED_NU = ( 4 << 5) | 3 + PRED_ALWAYS = (0 << 5) | 20, + PRED_LT = (0 << 5) | 12, + PRED_LE = (1 << 5) | 4, + PRED_EQ = (2 << 5) | 12, + PRED_GE = (0 << 5) | 4, + PRED_GT = (1 << 5) | 12, + PRED_NE = (2 << 5) | 4, + PRED_UN = (3 << 5) | 12, + PRED_NU = (3 << 5) | 4 }; } Index: llvm/lib/Target/PowerPC/PPCInstrFormats.td diff -u llvm/lib/Target/PowerPC/PPCInstrFormats.td:1.79 llvm/lib/Target/PowerPC/PPCInstrFormats.td:1.80 --- llvm/lib/Target/PowerPC/PPCInstrFormats.td:1.79 Thu Jul 13 16:52:41 2006 +++ llvm/lib/Target/PowerPC/PPCInstrFormats.td Fri Nov 3 23:42:48 2006 @@ -399,6 +399,19 @@ let Inst{31} = lk; } +class XLForm_2_br opcode, bits<10> xo, bit lk, + dag OL, string asmstr, InstrItinClass itin, list pattern> + : XLForm_2 { + bits<7> BIBO; // 2 bits of BI and 5 bits of BO. + bits<3> CR; + + let BO = BIBO{0-4}; + let BI{0-1} = BIBO{5-6}; + let BI{2-4} = CR; + let BH = 0; +} + + class XLForm_2_ext opcode, bits<10> xo, bits<5> bo, bits<5> bi, bit lk, dag OL, string asmstr, InstrItinClass itin, list pattern> : XLForm_2 { Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.252 llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.253 --- llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.252 Fri Nov 3 23:27:39 2006 +++ llvm/lib/Target/PowerPC/PPCInstrInfo.td Fri Nov 3 23:42:48 2006 @@ -255,9 +255,9 @@ let MIOperandInfo = (ops i32imm, ptr_rc); } -// PowerPC Predicate operand. 640 = ((20<<5)|0) = always, CR0 is a dummy reg +// PowerPC Predicate operand. 20 = (0<<5)|20 = always, CR0 is a dummy reg // that doesn't matter. -def pred : PredicateOperand<(ops imm, CRRC), (ops (i32 640), CR0)> { +def pred : PredicateOperand<(ops imm, CRRC), (ops (i32 20), CR0)> { let PrintMethod = "printPredicateOperand"; } @@ -317,9 +317,10 @@ let isTerminator = 1, isBarrier = 1, noResults = 1, PPC970_Unit = 7 in { let isReturn = 1 in - def BLR : XLForm_2_ext<19, 16, 20, 0, 0, - (ops pred:$p), - "b${p:cc}lr ${p:reg}", BrB, [(retflag)]>; + def BLR : XLForm_2_br<19, 16, 0, + (ops pred:$p), + "b${p:cc}lr ${p:reg}", BrB, + [(retflag)]>; def BCTR : XLForm_2_ext<19, 528, 20, 0, 0, (ops), "bctr", BrB, []>; } From evan.cheng at apple.com Sat Nov 4 03:40:38 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Sat, 4 Nov 2006 03:40:38 -0600 Subject: [llvm-commits] CVS: llvm/utils/TableGen/CodeGenTarget.cpp InstrInfoEmitter.cpp Message-ID: <200611040940.kA49ecrm003103@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: CodeGenTarget.cpp updated: 1.72 -> 1.73 InstrInfoEmitter.cpp updated: 1.46 -> 1.47 --- Log message: Clean up some code. --- Diffs of the changes: (+5 -2) CodeGenTarget.cpp | 4 +++- InstrInfoEmitter.cpp | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) Index: llvm/utils/TableGen/CodeGenTarget.cpp diff -u llvm/utils/TableGen/CodeGenTarget.cpp:1.72 llvm/utils/TableGen/CodeGenTarget.cpp:1.73 --- llvm/utils/TableGen/CodeGenTarget.cpp:1.72 Fri Nov 3 17:45:17 2006 +++ llvm/utils/TableGen/CodeGenTarget.cpp Sat Nov 4 03:40:23 2006 @@ -19,6 +19,7 @@ #include "Record.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Support/CommandLine.h" +#include "llvm/Target/TargetInstrInfo.h" #include #include using namespace llvm; @@ -294,7 +295,8 @@ unsigned TIdx = I->getOperandNamed(Name); if (TIdx >= FIdx) throw "Illegal tied-to operand constraint '" + CStr + "'"; - return std::make_pair(FIdx, (TIdx << 16) | 1); + return std::make_pair(FIdx, (TIdx << 16) | + (1 << (unsigned)TargetInstrInfo::TIED_TO)); } static std::vector parseConstraints(const std::string &CStr, Index: llvm/utils/TableGen/InstrInfoEmitter.cpp diff -u llvm/utils/TableGen/InstrInfoEmitter.cpp:1.46 llvm/utils/TableGen/InstrInfoEmitter.cpp:1.47 --- llvm/utils/TableGen/InstrInfoEmitter.cpp:1.46 Tue Oct 31 18:27:05 2006 +++ llvm/utils/TableGen/InstrInfoEmitter.cpp Sat Nov 4 03:40:23 2006 @@ -14,6 +14,7 @@ #include "InstrInfoEmitter.h" #include "CodeGenTarget.h" +#include "llvm/Target/TargetInstrInfo.h" #include "Record.h" #include using namespace llvm; @@ -89,7 +90,7 @@ // For backward compatibility: isTwoAddress means operand 1 is tied to // operand 0. if (Inst.isTwoAddress) - Result[1].second |= 1; + Result[1].second |= (0 << 16) | (1 << (unsigned)TargetInstrInfo::TIED_TO); return Result; } From evan.cheng at apple.com Sat Nov 4 03:44:45 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Sat, 4 Nov 2006 03:44:45 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp ScheduleDAGList.cpp ScheduleDAGRRList.cpp Message-ID: <200611040944.kA49ij2p003220@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: ScheduleDAG.cpp updated: 1.105 -> 1.106 ScheduleDAGList.cpp updated: 1.67 -> 1.68 ScheduleDAGRRList.cpp updated: 1.19 -> 1.20 --- Log message: Changes to use operand constraints to process two-address instructions. --- Diffs of the changes: (+140 -50) ScheduleDAG.cpp | 13 ++- ScheduleDAGList.cpp | 5 - ScheduleDAGRRList.cpp | 172 +++++++++++++++++++++++++++++++++++++------------- 3 files changed, 140 insertions(+), 50 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.105 llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.106 --- llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.105 Tue Oct 31 14:01:56 2006 +++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Sat Nov 4 03:44:31 2006 @@ -126,8 +126,13 @@ if (MainNode->isTargetOpcode()) { unsigned Opc = MainNode->getTargetOpcode(); - if (TII->isTwoAddrInstr(Opc)) - SU->isTwoAddress = true; + for (unsigned i = 0, ee = TII->getNumOperands(Opc); i != ee; ++i) { + if (TII->getOperandConstraint(Opc, i, + TargetInstrInfo::TIED_TO) != -1) { + SU->isTwoAddress = true; + break; + } + } if (TII->isCommutableInstr(Opc)) SU->isCommutable = true; } @@ -210,7 +215,7 @@ /// CountResults - The results of target nodes have register or immediate /// operands first, then an optional chain, and optional flag operands (which do /// not go into the machine instrs.) -static unsigned CountResults(SDNode *Node) { +unsigned ScheduleDAG::CountResults(SDNode *Node) { unsigned N = Node->getNumValues(); while (N && Node->getValueType(N - 1) == MVT::Flag) --N; @@ -222,7 +227,7 @@ /// CountOperands The inputs to target nodes have any actual inputs first, /// followed by an optional chain operand, then flag operands. Compute the /// number of actual operands that will go into the machine instr. -static unsigned CountOperands(SDNode *Node) { +unsigned ScheduleDAG::CountOperands(SDNode *Node) { unsigned N = Node->getNumOperands(); while (N && Node->getOperand(N - 1).getValueType() == MVT::Flag) --N; Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp:1.67 llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp:1.68 --- llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp:1.67 Sun Aug 27 07:54:01 2006 +++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp Sat Nov 4 03:44:31 2006 @@ -98,7 +98,7 @@ // Build scheduling units. BuildSchedUnits(); - AvailableQueue->initNodes(SUnits); + AvailableQueue->initNodes(SUnitMap, SUnits); ListScheduleTopDown(); @@ -331,7 +331,8 @@ LatencyPriorityQueue() : Queue(latency_sort(this)) { } - void initNodes(std::vector &sunits) { + void initNodes(std::map &sumap, + std::vector &sunits) { SUnits = &sunits; // Calculate node priorities. CalculatePriorities(); Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.19 llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.20 --- llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.19 Thu Nov 2 19:28:29 2006 +++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Sat Nov 4 03:44:31 2006 @@ -95,7 +95,7 @@ CalculateDepths(); CalculateHeights(); - AvailableQueue->initNodes(SUnits); + AvailableQueue->initNodes(SUnitMap, SUnits); // Execute the actual scheduling loop Top-Down or Bottom-Up as appropriate. if (isBottomUp) @@ -115,7 +115,7 @@ EmitSchedule(); } -/// CommuteNodesToReducePressure - Is a node is two-address and commutable, and +/// CommuteNodesToReducePressure - If a node is two-address and commutable, and /// it is not the last use of its first operand, add it to the CommuteSet if /// possible. It will be commuted when it is translated to a MI. void ScheduleDAGRRList::CommuteNodesToReducePressure() { @@ -123,23 +123,38 @@ for (unsigned i = Sequence.size()-1; i != 0; --i) { // Ignore first node. SUnit *SU = Sequence[i]; if (!SU) continue; - if (SU->isTwoAddress && SU->isCommutable) { - SDNode *OpN = SU->Node->getOperand(0).Val; - SUnit *OpSU = SUnitMap[OpN]; - if (OpSU && OperandSeen.count(OpSU) == 1) { - // Ok, so SU is not the last use of OpSU, but SU is two-address so - // it will clobber OpSU. Try to commute it if possible. - bool DoCommute = true; - for (unsigned j = 1, e = SU->Node->getNumOperands(); j != e; ++j) { - OpN = SU->Node->getOperand(j).Val; - OpSU = SUnitMap[OpN]; - if (OpSU && OperandSeen.count(OpSU) == 1) { - DoCommute = false; - break; + if (SU->isCommutable) { + unsigned Opc = SU->Node->getTargetOpcode(); + unsigned NumRes = CountResults(SU->Node); + unsigned NumOps = CountOperands(SU->Node); + for (unsigned j = 0; j != NumOps; ++j) { + if (TII->getOperandConstraint(Opc, j+NumRes, + TargetInstrInfo::TIED_TO) == -1) + continue; + + SDNode *OpN = SU->Node->getOperand(j).Val; + SUnit *OpSU = SUnitMap[OpN]; + if (OpSU && OperandSeen.count(OpSU) == 1) { + // Ok, so SU is not the last use of OpSU, but SU is two-address so + // it will clobber OpSU. Try to commute SU if no other source operands + // are live below. + bool DoCommute = true; + for (unsigned k = 0; k < NumOps; ++k) { + if (k != j) { + OpN = SU->Node->getOperand(k).Val; + OpSU = SUnitMap[OpN]; + if (OpSU && OperandSeen.count(OpSU) == 1) { + DoCommute = false; + break; + } + } } + if (DoCommute) + CommuteSet.insert(SU->Node); } - if (DoCommute) - CommuteSet.insert(SU->Node); + + // Only look at the first use&def node for now. + break; } } @@ -411,7 +426,8 @@ RegReductionPriorityQueue() : Queue(SF(this)) {} - virtual void initNodes(std::vector &sunits) {} + virtual void initNodes(std::map &sumap, + std::vector &sunits) {} virtual void releaseState() {} virtual int getSethiUllmanNumber(unsigned NodeNum) const { @@ -434,21 +450,32 @@ Queue.pop(); return V; } + + virtual bool isDUOperand(const SUnit *SU1, const SUnit *SU2) { + return false; + } }; template class VISIBILITY_HIDDEN BURegReductionPriorityQueue : public RegReductionPriorityQueue { + // SUnitMap SDNode to SUnit mapping (n -> 1). + std::map *SUnitMap; + // SUnits - The SUnits for the current graph. const std::vector *SUnits; // SethiUllmanNumbers - The SethiUllman number for each node. std::vector SethiUllmanNumbers; + const TargetInstrInfo *TII; public: - BURegReductionPriorityQueue() {} + BURegReductionPriorityQueue(const TargetInstrInfo *tii) + : TII(tii) {} - void initNodes(std::vector &sunits) { + void initNodes(std::map &sumap, + std::vector &sunits) { + SUnitMap = &sumap; SUnits = &sunits; // Add pseudo dependency edges for two-address nodes. AddPseudoTwoAddrDeps(); @@ -466,7 +493,21 @@ return SethiUllmanNumbers[NodeNum]; } + bool isDUOperand(const SUnit *SU1, const SUnit *SU2) { + unsigned Opc = SU1->Node->getTargetOpcode(); + unsigned NumRes = ScheduleDAG::CountResults(SU1->Node); + unsigned NumOps = ScheduleDAG::CountOperands(SU1->Node); + for (unsigned i = 0; i != NumOps; ++i) { + if (TII->getOperandConstraint(Opc, i+NumRes, + TargetInstrInfo::TIED_TO) == -1) + continue; + if (SU1->Node->getOperand(i).isOperand(SU2->Node)) + return true; + } + return false; + } private: + bool canClobber(SUnit *SU, SUnit *Op); void AddPseudoTwoAddrDeps(); void CalculatePriorities(); int CalcNodePriority(const SUnit *SU); @@ -475,6 +516,9 @@ template class TDRegReductionPriorityQueue : public RegReductionPriorityQueue { + // SUnitMap SDNode to SUnit mapping (n -> 1). + std::map *SUnitMap; + // SUnits - The SUnits for the current graph. const std::vector *SUnits; @@ -484,7 +528,9 @@ public: TDRegReductionPriorityQueue() {} - void initNodes(std::vector &sunits) { + void initNodes(std::map &sumap, + std::vector &sunits) { + SUnitMap = &sumap; SUnits = &sunits; // Calculate node priorities. CalculatePriorities(); @@ -563,13 +609,11 @@ // as a def&use operand is preferred. if (LIsTarget && RIsTarget) { if (left->isTwoAddress && !right->isTwoAddress) { - SDNode *DUNode = left->Node->getOperand(0).Val; - if (DUNode->isOperand(right->Node)) + if (SPQ->isDUOperand(left, right)) LBonus += 2; } if (!left->isTwoAddress && right->isTwoAddress) { - SDNode *DUNode = right->Node->getOperand(0).Val; - if (DUNode->isOperand(left->Node)) + if (SPQ->isDUOperand(right, left)) RBonus += 2; } } @@ -616,32 +660,70 @@ return Reached; } -static SUnit *getDefUsePredecessor(SUnit *SU) { - SDNode *DU = SU->Node->getOperand(0).Val; - for (SUnit::pred_iterator I = SU->Preds.begin(), E = SU->Preds.end(); - I != E; ++I) { - if (I->second) continue; // ignore chain preds - SUnit *PredSU = I->first; - if (PredSU->Node == DU) - return PredSU; +template +bool BURegReductionPriorityQueue::canClobber(SUnit *SU, SUnit *Op) { + if (SU->isTwoAddress) { + unsigned Opc = SU->Node->getTargetOpcode(); + unsigned NumRes = ScheduleDAG::CountResults(SU->Node); + unsigned NumOps = ScheduleDAG::CountOperands(SU->Node); + for (unsigned i = 0; i != NumOps; ++i) { + if (TII->getOperandConstraint(Opc, i+NumRes, + TargetInstrInfo::TIED_TO) != -1) { + SDNode *DU = SU->Node->getOperand(i).Val; + if (Op == (*SUnitMap)[DU]) + return true; + } + } } - - // Must be flagged. - return NULL; -} - -static bool canClobber(SUnit *SU, SUnit *Op) { - if (SU->isTwoAddress) - return Op == getDefUsePredecessor(SU); return false; } + /// AddPseudoTwoAddrDeps - If two nodes share an operand and one of them uses /// it as a def&use operand. Add a pseudo control edge from it to the other /// node (if it won't create a cycle) so the two-address one will be scheduled /// first (lower in the schedule). template void BURegReductionPriorityQueue::AddPseudoTwoAddrDeps() { +#if 1 + for (unsigned i = 0, e = SUnits->size(); i != e; ++i) { + SUnit *SU = (SUnit *)&((*SUnits)[i]); + if (!SU->isTwoAddress) + continue; + + SDNode *Node = SU->Node; + if (!Node->isTargetOpcode()) + continue; + + unsigned Opc = Node->getTargetOpcode(); + unsigned NumRes = ScheduleDAG::CountResults(Node); + unsigned NumOps = ScheduleDAG::CountOperands(Node); + for (unsigned j = 0; j != NumOps; ++j) { + if (TII->getOperandConstraint(Opc, j+NumRes, + TargetInstrInfo::TIED_TO) != -1) { + SDNode *DU = SU->Node->getOperand(j).Val; + SUnit *DUSU = (*SUnitMap)[DU]; + for (SUnit::succ_iterator I = DUSU->Succs.begin(),E = DUSU->Succs.end(); + I != E; ++I) { + if (I->second) continue; + SUnit *SuccSU = I->first; + if (SuccSU != SU && + (!canClobber(SuccSU, DUSU) || + (!SU->isCommutable && SuccSU->isCommutable))){ + if (SuccSU->Depth == SU->Depth && !isReachable(SuccSU, SU)) { + DEBUG(std::cerr << "Adding an edge from SU # " << SU->NodeNum + << " to SU #" << SuccSU->NodeNum << "\n"); + if (SU->addPred(SuccSU, true)) + SU->NumChainPredsLeft++; + if (SuccSU->addSucc(SU, true)) + SuccSU->NumChainSuccsLeft++; + } + } + } + } + } + } +#else for (unsigned i = 0, e = SUnits->size(); i != e; ++i) { SUnit *SU = (SUnit *)&((*SUnits)[i]); SDNode *Node = SU->Node; @@ -649,7 +731,7 @@ continue; if (SU->isTwoAddress) { - SUnit *DUSU = getDefUsePredecessor(SU); + SUnit *DUSU = getDefUsePredecessor(SU, TII); if (!DUSU) continue; for (SUnit::succ_iterator I = DUSU->Succs.begin(), E = DUSU->Succs.end(); @@ -657,7 +739,7 @@ if (I->second) continue; SUnit *SuccSU = I->first; if (SuccSU != SU && - (!canClobber(SuccSU, DUSU) || + (!canClobber(SuccSU, DUSU, TII) || (!SU->isCommutable && SuccSU->isCommutable))){ if (SuccSU->Depth == SU->Depth && !isReachable(SuccSU, SU)) { DEBUG(std::cerr << "Adding an edge from SU # " << SU->NodeNum @@ -671,6 +753,7 @@ } } } +#endif } /// CalcNodePriority - Priority is the Sethi Ullman number. @@ -858,8 +941,9 @@ llvm::ScheduleDAG* llvm::createBURRListDAGScheduler(SelectionDAGISel *IS, SelectionDAG *DAG, MachineBasicBlock *BB) { + const TargetInstrInfo *TII = DAG->getTarget().getInstrInfo(); return new ScheduleDAGRRList(*DAG, BB, DAG->getTarget(), true, - new BURegReductionPriorityQueue()); + new BURegReductionPriorityQueue(TII)); } llvm::ScheduleDAG* llvm::createTDRRListDAGScheduler(SelectionDAGISel *IS, From jlaskey at apple.com Sat Nov 4 04:48:22 2006 From: jlaskey at apple.com (Jim Laskey) Date: Sat, 4 Nov 2006 04:48:22 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp Message-ID: <200611041048.kA4AmMJ8004706@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.95 -> 1.96 --- Log message: Live local variables are being dropped because the begin or end labels marking their scope are being deleted. Workaround is to widen scope to full function. --- Diffs of the changes: (+4 -3) DwarfWriter.cpp | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.95 llvm/lib/CodeGen/DwarfWriter.cpp:1.96 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.95 Thu Nov 2 17:56:21 2006 +++ llvm/lib/CodeGen/DwarfWriter.cpp Sat Nov 4 04:48:07 2006 @@ -1862,9 +1862,10 @@ unsigned StartID = Scope->getStartLabelID(); unsigned EndID = Scope->getEndLabelID(); - // Throw out scope if block is discarded. - if (StartID && !DebugInfo->isLabelValid(StartID)) continue; - if (EndID && !DebugInfo->isLabelValid(EndID)) continue; + // Widen scope if label is discarded. + // FIXME - really need to find a GOOD label if a block is dead. + if (StartID && !DebugInfo->isLabelValid(StartID)) StartID = 0; + if (EndID && !DebugInfo->isLabelValid(EndID)) EndID = 0; DIE *ScopeDie = new DIE(DW_TAG_lexical_block); From evan.cheng at apple.com Sat Nov 4 03:43:07 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Sat, 4 Nov 2006 03:43:07 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/ScheduleDAG.h Message-ID: <200611040943.kA49h7qM003160@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: ScheduleDAG.h updated: 1.32 -> 1.33 --- Log message: Move to operand constraints for two-address instructions. --- Diffs of the changes: (+12 -1) ScheduleDAG.h | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/ScheduleDAG.h diff -u llvm/include/llvm/CodeGen/ScheduleDAG.h:1.32 llvm/include/llvm/CodeGen/ScheduleDAG.h:1.33 --- llvm/include/llvm/CodeGen/ScheduleDAG.h:1.32 Wed Aug 16 19:09:56 2006 +++ llvm/include/llvm/CodeGen/ScheduleDAG.h Sat Nov 4 03:42:53 2006 @@ -154,7 +154,8 @@ public: virtual ~SchedulingPriorityQueue() {} - virtual void initNodes(std::vector &SUnits) = 0; + virtual void initNodes(std::map &SUMap, + std::vector &SUnits) = 0; virtual void releaseState() = 0; virtual bool empty() const = 0; @@ -225,6 +226,16 @@ void CalculateDepths(); void CalculateHeights(); + /// CountResults - The results of target nodes have register or immediate + /// operands first, then an optional chain, and optional flag operands + /// (which do not go into the machine instrs.) + static unsigned CountResults(SDNode *Node); + + /// CountOperands The inputs to target nodes have any actual inputs first, + /// followed by an optional chain operand, then flag operands. Compute the + /// number of actual operands that will go into the machine instr. + static unsigned CountOperands(SDNode *Node); + /// EmitNode - Generate machine code for an node and needed dependencies. /// VRBaseMap contains, for each already emitted node, the first virtual /// register number for the results of the node. From reid at x10sys.com Sat Nov 4 21:58:59 2006 From: reid at x10sys.com (Reid Spencer) Date: Sat, 4 Nov 2006 21:58:59 -0600 Subject: [llvm-commits] CVS: llvm/projects/Stacker/lib/Makefile Message-ID: <200611050358.kA53wx6K026316@zion.cs.uiuc.edu> Changes in directory llvm/projects/Stacker/lib: Makefile updated: 1.7 -> 1.8 --- Log message: Don't check variables before they are set. Be careful about blanks when checking LLVMGCC variable. --- Diffs of the changes: (+3 -2) Makefile | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Index: llvm/projects/Stacker/lib/Makefile diff -u llvm/projects/Stacker/lib/Makefile:1.7 llvm/projects/Stacker/lib/Makefile:1.8 --- llvm/projects/Stacker/lib/Makefile:1.7 Mon Oct 2 14:10:56 2006 +++ llvm/projects/Stacker/lib/Makefile Sat Nov 4 21:58:44 2006 @@ -7,9 +7,10 @@ LEVEL = .. DIRS = compiler runtime +include $(LEVEL)/Makefile.common + # Don't generate the runtime if we don't have LLVMGCC -ifeq ($(LLVMGCC),) +ifeq ($(strip $(LLVMGCC)),) DIRS := $(filter-out runtime, $(DIRS)) endif -include $(LEVEL)/Makefile.common From evan.cheng at apple.com Sun Nov 5 03:29:32 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Sun, 5 Nov 2006 03:29:32 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAG.h Message-ID: <200611050929.kA59TWdW007293@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: SelectionDAG.h updated: 1.142 -> 1.143 --- Log message: Added getIndexedStore. --- Diffs of the changes: (+2 -0) SelectionDAG.h | 2 ++ 1 files changed, 2 insertions(+) Index: llvm/include/llvm/CodeGen/SelectionDAG.h diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.142 llvm/include/llvm/CodeGen/SelectionDAG.h:1.143 --- llvm/include/llvm/CodeGen/SelectionDAG.h:1.142 Fri Oct 27 20:34:21 2006 +++ llvm/include/llvm/CodeGen/SelectionDAG.h Sun Nov 5 03:29:04 2006 @@ -327,6 +327,8 @@ SDOperand getTruncStore(SDOperand Chain, SDOperand Value, SDOperand Ptr, const Value *SV, int SVOffset, MVT::ValueType TVT, bool isVolatile=false); + SDOperand getIndexedStore(SDOperand OrigStoe, SDOperand Base, + SDOperand Offset, ISD::MemOpAddrMode AM); // getSrcValue - construct a node to track a Value* through the backend SDOperand getSrcValue(const Value* I, int offset = 0); From evan.cheng at apple.com Sun Nov 5 03:30:24 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Sun, 5 Nov 2006 03:30:24 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <200611050930.kA59UOqd007335@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAG.cpp updated: 1.368 -> 1.369 --- Log message: Added getIndexedStore. --- Diffs of the changes: (+30 -0) SelectionDAG.cpp | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.368 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.369 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.368 Fri Nov 3 01:31:32 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sun Nov 5 03:30:09 2006 @@ -1723,6 +1723,36 @@ return SDOperand(N, 0); } +SDOperand SelectionDAG::getIndexedStore(SDOperand OrigStore, SDOperand Base, + SDOperand Offset, ISD::MemOpAddrMode AM){ + StoreSDNode *ST = cast(OrigStore); + assert(ST->getOffset().getOpcode() == ISD::UNDEF && + "Store is already a indexed store!"); + SDVTList VTs = getVTList(Base.getValueType(), MVT::Other); + SDOperand Ops[] = { ST->getChain(), ST->getValue(), Base, Offset }; + FoldingSetNodeID ID; + AddNodeIDNode(ID, ISD::STORE, VTs, Ops, 4); + ID.AddInteger(AM); + ID.AddInteger(ST->isTruncatingStore()); + ID.AddInteger(ST->getStoredVT()); + ID.AddPointer(ST->getSrcValue()); + ID.AddInteger(ST->getSrcValueOffset()); + ID.AddInteger(ST->getAlignment()); + ID.AddInteger(ST->isVolatile()); + void *IP = 0; + if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP)) + return SDOperand(E, 0); + SDNode *N = new StoreSDNode(ST->getChain(), ST->getValue(), + Base, Offset, AM, + ST->isTruncatingStore(), ST->getStoredVT(), + ST->getSrcValue(), ST->getSrcValueOffset(), + ST->getAlignment(), ST->isVolatile()); + N->setValueTypes(VTs); + CSEMap.InsertNode(N, IP); + AllNodes.push_back(N); + return SDOperand(N, 0); +} + SDOperand SelectionDAG::getVAArg(MVT::ValueType VT, SDOperand Chain, SDOperand Ptr, SDOperand SV) { From evan.cheng at apple.com Sun Nov 5 03:31:29 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Sun, 5 Nov 2006 03:31:29 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <200611050931.kA59VTZw007364@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.235 -> 1.236 --- Log message: Added pre-indexed store support. --- Diffs of the changes: (+24 -10) DAGCombiner.cpp | 34 ++++++++++++++++++++++++---------- 1 files changed, 24 insertions(+), 10 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.235 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.236 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.235 Fri Nov 3 01:21:16 2006 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Sun Nov 5 03:31:14 2006 @@ -175,9 +175,13 @@ } bool CombineToIndexedLoadStore(SDNode *N) { + bool isLoad = true; SDOperand Ptr; if (LoadSDNode *LD = dyn_cast(N)) { Ptr = LD->getBasePtr(); + } else if (StoreSDNode *ST = dyn_cast(N)) { + Ptr = ST->getBasePtr(); + isLoad = false; } else return false; @@ -234,10 +238,9 @@ if (Use->isPredecessor(N)) return false; - if (!OffIsAMImm) + if (!OffIsAMImm) { NumRealUses++; - // FIXME: Do we need a target hook here - else if (Use->getOpcode() == ISD::LOAD) { + } else if (Use->getOpcode() == ISD::LOAD) { if (cast(Use)->getBasePtr().Val != Ptr.Val) NumRealUses++; } else if (Use->getOpcode() == ISD::STORE) { @@ -249,17 +252,23 @@ if (NumRealUses == 0) return false; - SDOperand Result = - DAG.getIndexedLoad(SDOperand(N,0), BasePtr, Offset, AM); + SDOperand Result = isLoad + ? DAG.getIndexedLoad(SDOperand(N,0), BasePtr, Offset, AM) + : DAG.getIndexedStore(SDOperand(N,0), BasePtr, Offset, AM); ++NodesCombined; DEBUG(std::cerr << "\nReplacing.4 "; N->dump(); std::cerr << "\nWith: "; Result.Val->dump(&DAG); std::cerr << '\n'); std::vector NowDead; - DAG.ReplaceAllUsesOfValueWith(SDOperand(N, 0), Result.getValue(0), - NowDead); - DAG.ReplaceAllUsesOfValueWith(SDOperand(N, 1), Result.getValue(2), - NowDead); + if (isLoad) { + DAG.ReplaceAllUsesOfValueWith(SDOperand(N, 0), Result.getValue(0), + NowDead); + DAG.ReplaceAllUsesOfValueWith(SDOperand(N, 1), Result.getValue(2), + NowDead); + } else { + DAG.ReplaceAllUsesOfValueWith(SDOperand(N, 0), Result.getValue(1), + NowDead); + } // Nodes can end up on the worklist more than once. Make sure we do // not process a node that has been replaced. @@ -269,7 +278,8 @@ DAG.DeleteNode(N); // Replace the uses of Ptr with uses of the updated base value. - DAG.ReplaceAllUsesOfValueWith(Ptr, Result.getValue(1), NowDead); + DAG.ReplaceAllUsesOfValueWith(Ptr, Result.getValue(isLoad ? 1 : 0), + NowDead); removeFromWorkList(Ptr.Val); for (unsigned i = 0, e = NowDead.size(); i != e; ++i) removeFromWorkList(NowDead[i]); @@ -2906,6 +2916,10 @@ } } + // Try transforming N to an indexed store. + if (CombineToIndexedLoadStore(N)) + return SDOperand(N, 0); + return SDOperand(); } From nicholas at mxc.ca Sun Nov 5 08:20:01 2006 From: nicholas at mxc.ca (Nick Lewycky) Date: Sun, 5 Nov 2006 08:20:01 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp Message-ID: <200611051420.kA5EK16l004916@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: PredicateSimplifier.cpp updated: 1.31 -> 1.32 --- Log message: Remove commented line from earlier debugging. --- Diffs of the changes: (+0 -2) PredicateSimplifier.cpp | 2 -- 1 files changed, 2 deletions(-) Index: llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp diff -u llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.31 llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.32 --- llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.31 Wed Nov 1 19:53:58 2006 +++ llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp Sun Nov 5 08:19:40 2006 @@ -427,8 +427,6 @@ // "setlt/gt int %a, %b" EQ true then %a NE %b // "setlt/gt int %a, %b" NE false then %a NE %b - // "setlt int %a, %b" NE true then %a EQ %b - if (ConstantBool *CB = dyn_cast(V1)) { if (CB->getValue() ^ Opcode==NE) addNotEqual(BO->getOperand(0), BO->getOperand(1)); From reid at x10sys.com Sun Nov 5 11:08:35 2006 From: reid at x10sys.com (Reid Spencer) Date: Sun, 5 Nov 2006 11:08:35 -0600 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200611051708.kA5H8ZEO007408@zion.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.253 -> 1.254 --- Log message: Add a -disable-cbe-printf-a option so that the output of the C Backend stands a chance of being compiled with a non C99 C compiler. The default is enabled so you must specifically disable this feature if you want the CBE output compiled with an older C compiler. --- Diffs of the changes: (+57 -27) configure | 84 ++++++++++++++++++++++++++++++++++++++++++-------------------- 1 files changed, 57 insertions(+), 27 deletions(-) Index: llvm/configure diff -u llvm/configure:1.253 llvm/configure:1.254 --- llvm/configure:1.253 Fri Nov 3 13:49:16 2006 +++ llvm/configure Sun Nov 5 11:08:18 2006 @@ -836,6 +836,7 @@ ENABLE_DOXYGEN ENABLE_THREADS TARGETS_TO_BUILD +ENABLE_CBE_PRINTF_A EXTRA_OPTIONS CXX CXXFLAGS @@ -1525,6 +1526,8 @@ --enable-threads Use threads if available (default is YES) --enable-targets Build specific host targets: all,host-only,{target-name} (default=all) + --enable-cbe-printf-a Enable C Backend output with hex floating point via + %a (default is YES) --enable-ltdl-install install libltdl --enable-shared[=PKGS] build shared libraries [default=enable_shared_default] @@ -4628,7 +4631,7 @@ if test "${enable_threads+set}" = set; then enableval=$enable_threads; else - enableval=yes + enableval=default fi case "$enableval" in @@ -4636,6 +4639,8 @@ ;; no) ENABLE_THREADS=0 ;; + default) ENABLE_THREADS=1 + ;; *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-threads. Use \"yes\" or \"no\"" >&5 echo "$as_me: error: Invalid setting for --enable-threads. Use \"yes\" or \"no\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -4688,6 +4693,30 @@ TARGETS_TO_BUILD=$TARGETS_TO_BUILD +# Check whether --enable-cbe-printf-a was given. +if test "${enable_cbe_printf_a+set}" = set; then + enableval=$enable_cbe_printf_a; +else + enableval=default +fi + +case "$enableval" in + yes) ENABLE_CBE_PRINTF_A=1 + ;; + no) ENABLE_CBE_PRINTF_A=0 + ;; + default) ENABLE_CBE_PRINTF_A=1 + ;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-cbe-printf-a. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-cbe-printf-a. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; +esac + +cat >>confdefs.h <<_ACEOF +#define ENABLE_CBE_PRINTF_A $ENABLE_CBE_PRINTF_A +_ACEOF + + # Check whether --with-llvmgccdir was given. if test "${with_llvmgccdir+set}" = set; then @@ -10269,7 +10298,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext + echo '#line 12445 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -14131,11 +14160,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14134: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14163: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14138: \$? = $ac_status" >&5 + echo "$as_me:14167: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14399,11 +14428,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14402: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14431: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14406: \$? = $ac_status" >&5 + echo "$as_me:14435: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14503,11 +14532,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14506: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14535: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14510: \$? = $ac_status" >&5 + echo "$as_me:14539: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -16955,7 +16984,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:19455: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:19430: \$? = $ac_status" >&5 + echo "$as_me:19459: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -19527,11 +19556,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:19530: $lt_compile\"" >&5) + (eval echo "\"\$as_me:19559: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:19534: \$? = $ac_status" >&5 + echo "$as_me:19563: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -21097,11 +21126,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21100: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21129: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:21104: \$? = $ac_status" >&5 + echo "$as_me:21133: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -21201,11 +21230,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21204: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21233: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:21208: \$? = $ac_status" >&5 + echo "$as_me:21237: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -23436,11 +23465,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:23439: $lt_compile\"" >&5) + (eval echo "\"\$as_me:23468: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:23443: \$? = $ac_status" >&5 + echo "$as_me:23472: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -23704,11 +23733,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:23707: $lt_compile\"" >&5) + (eval echo "\"\$as_me:23736: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:23711: \$? = $ac_status" >&5 + echo "$as_me:23740: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -23808,11 +23837,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:23811: $lt_compile\"" >&5) + (eval echo "\"\$as_me:23840: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:23815: \$? = $ac_status" >&5 + echo "$as_me:23844: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -34146,6 +34175,7 @@ ENABLE_DOXYGEN!$ENABLE_DOXYGEN$ac_delim ENABLE_THREADS!$ENABLE_THREADS$ac_delim TARGETS_TO_BUILD!$TARGETS_TO_BUILD$ac_delim +ENABLE_CBE_PRINTF_A!$ENABLE_CBE_PRINTF_A$ac_delim EXTRA_OPTIONS!$EXTRA_OPTIONS$ac_delim CXX!$CXX$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim @@ -34162,7 +34192,6 @@ LN_S!$LN_S$ac_delim CMP!$CMP$ac_delim CP!$CP$ac_delim -DATE!$DATE$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -34204,6 +34233,7 @@ ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +DATE!$DATE$ac_delim FIND!$FIND$ac_delim MKDIR!$MKDIR$ac_delim MV!$MV$ac_delim @@ -34269,7 +34299,7 @@ LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 63; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 64; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 From reid at x10sys.com Sun Nov 5 11:08:35 2006 From: reid at x10sys.com (Reid Spencer) Date: Sun, 5 Nov 2006 11:08:35 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Config/config.h.in Message-ID: <200611051708.kA5H8Z5T007413@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Config: config.h.in updated: 1.69 -> 1.70 --- Log message: Add a -disable-cbe-printf-a option so that the output of the C Backend stands a chance of being compiled with a non C99 C compiler. The default is enabled so you must specifically disable this feature if you want the CBE output compiled with an older C compiler. --- Diffs of the changes: (+3 -0) config.h.in | 3 +++ 1 files changed, 3 insertions(+) Index: llvm/include/llvm/Config/config.h.in diff -u llvm/include/llvm/Config/config.h.in:1.69 llvm/include/llvm/Config/config.h.in:1.70 --- llvm/include/llvm/Config/config.h.in:1.69 Thu Sep 14 01:17:20 2006 +++ llvm/include/llvm/Config/config.h.in Sun Nov 5 11:08:18 2006 @@ -11,6 +11,9 @@ /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA +/* Define if CBE is enabled for printf %a output */ +#undef ENABLE_CBE_PRINTF_A + /* Define if threads enabled */ #undef ENABLE_THREADS From reid at x10sys.com Sun Nov 5 11:08:34 2006 From: reid at x10sys.com (Reid Spencer) Date: Sun, 5 Nov 2006 11:08:34 -0600 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200611051708.kA5H8YMc007402@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.248 -> 1.249 --- Log message: Add a -disable-cbe-printf-a option so that the output of the C Backend stands a chance of being compiled with a non C99 C compiler. The default is enabled so you must specifically disable this feature if you want the CBE output compiled with an older C compiler. --- Diffs of the changes: (+17 -1) configure.ac | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletion(-) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.248 llvm/autoconf/configure.ac:1.249 --- llvm/autoconf/configure.ac:1.248 Fri Nov 3 12:04:08 2006 +++ llvm/autoconf/configure.ac Sun Nov 5 11:08:18 2006 @@ -313,10 +313,11 @@ AC_ARG_ENABLE(threads, AS_HELP_STRING([--enable-threads], [Use threads if available (default is YES)]),, - enableval=yes) + enableval=default) case "$enableval" in yes) AC_SUBST(ENABLE_THREADS,[1]) ;; no) AC_SUBST(ENABLE_THREADS,[0]) ;; + default) AC_SUBST(ENABLE_THREADS,[1]) ;; *) AC_MSG_ERROR([Invalid setting for --enable-threads. Use "yes" or "no"]) ;; esac AC_DEFINE_UNQUOTED([ENABLE_THREADS],$ENABLE_THREADS,[Define if threads enabled]) @@ -355,6 +356,21 @@ TARGETS_TO_BUILD="CBackend $TARGETS_TO_BUILD" AC_SUBST(TARGETS_TO_BUILD,$TARGETS_TO_BUILD) +dnl Prevent the CBackend from using printf("%a") for floating point so older +dnl C compilers that cannot deal with the 0x0p+0 hex floating point format +dnl can still compile the CBE's output +AC_ARG_ENABLE([cbe-printf-a],AS_HELP_STRING([--enable-cbe-printf-a], + [Enable C Backend output with hex floating point via %a (default is YES)]),, + enableval=default) +case "$enableval" in + yes) AC_SUBST(ENABLE_CBE_PRINTF_A,[1]) ;; + no) AC_SUBST(ENABLE_CBE_PRINTF_A,[0]) ;; + default) AC_SUBST(ENABLE_CBE_PRINTF_A,[1]) ;; + *) AC_MSG_ERROR([Invalid setting for --enable-cbe-printf-a. Use "yes" or "no"]) ;; +esac +AC_DEFINE_UNQUOTED([ENABLE_CBE_PRINTF_A],$ENABLE_CBE_PRINTF_A, + [Define if CBE is enabled for printf %a output]) + dnl Allow a specific llvm-gcc/llvm-g++ pair to be used with this LLVM config. AC_ARG_WITH(llvmgccdir, AS_HELP_STRING([--with-llvmgccdir], From reid at x10sys.com Sun Nov 5 11:09:55 2006 From: reid at x10sys.com (Reid Spencer) Date: Sun, 5 Nov 2006 11:09:55 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp Message-ID: <200611051709.kA5H9tAa007451@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/CBackend: Writer.cpp updated: 1.278 -> 1.279 --- Log message: Implement the -enabled-cbe-printf-a feature. --- Diffs of the changes: (+2 -2) Writer.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Target/CBackend/Writer.cpp diff -u llvm/lib/Target/CBackend/Writer.cpp:1.278 llvm/lib/Target/CBackend/Writer.cpp:1.279 --- llvm/lib/Target/CBackend/Writer.cpp:1.278 Thu Nov 2 14:25:49 2006 +++ llvm/lib/Target/CBackend/Writer.cpp Sun Nov 5 11:09:41 2006 @@ -534,7 +534,7 @@ // only deal in IEEE FP). // static bool isFPCSafeToPrint(const ConstantFP *CFP) { -#if HAVE_PRINTF_A +#if HAVE_PRINTF_A & ENABLED_CBE_PRINTF_A char Buffer[100]; sprintf(Buffer, "%a", CFP->getValue()); @@ -726,7 +726,7 @@ << " /*inf*/ "; } else { std::string Num; -#if HAVE_PRINTF_A +#if HAVE_PRINTF_A & ENABLE_CBE_PRINTF_A // Print out the constant as a floating point number. char Buffer[100]; sprintf(Buffer, "%a", FPC->getValue()); From reid at x10sys.com Sun Nov 5 13:26:51 2006 From: reid at x10sys.com (Reid Spencer) Date: Sun, 5 Nov 2006 13:26:51 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp Message-ID: <200611051926.kA5JQpU7009564@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/CBackend: Writer.cpp updated: 1.279 -> 1.280 --- Log message: Fix a bug in the last patch and convert to && instead of & for logical expr. --- Diffs of the changes: (+2 -2) Writer.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Target/CBackend/Writer.cpp diff -u llvm/lib/Target/CBackend/Writer.cpp:1.279 llvm/lib/Target/CBackend/Writer.cpp:1.280 --- llvm/lib/Target/CBackend/Writer.cpp:1.279 Sun Nov 5 11:09:41 2006 +++ llvm/lib/Target/CBackend/Writer.cpp Sun Nov 5 13:26:37 2006 @@ -534,7 +534,7 @@ // only deal in IEEE FP). // static bool isFPCSafeToPrint(const ConstantFP *CFP) { -#if HAVE_PRINTF_A & ENABLED_CBE_PRINTF_A +#if HAVE_PRINTF_A && ENABLE_CBE_PRINTF_A char Buffer[100]; sprintf(Buffer, "%a", CFP->getValue()); @@ -726,7 +726,7 @@ << " /*inf*/ "; } else { std::string Num; -#if HAVE_PRINTF_A & ENABLE_CBE_PRINTF_A +#if HAVE_PRINTF_A && ENABLE_CBE_PRINTF_A // Print out the constant as a floating point number. char Buffer[100]; sprintf(Buffer, "%a", FPC->getValue()); From jeffc at jolt-lang.org Sun Nov 5 13:32:26 2006 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Sun, 5 Nov 2006 13:32:26 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineConstantPool.h SelectionDAG.h Message-ID: <200611051932.kA5JWQFG009839@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: MachineConstantPool.h updated: 1.21 -> 1.22 SelectionDAG.h updated: 1.143 -> 1.144 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+4 -3) MachineConstantPool.h | 3 ++- SelectionDAG.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) Index: llvm/include/llvm/CodeGen/MachineConstantPool.h diff -u llvm/include/llvm/CodeGen/MachineConstantPool.h:1.21 llvm/include/llvm/CodeGen/MachineConstantPool.h:1.22 --- llvm/include/llvm/CodeGen/MachineConstantPool.h:1.21 Fri Oct 27 18:46:08 2006 +++ llvm/include/llvm/CodeGen/MachineConstantPool.h Sun Nov 5 13:31:28 2006 @@ -61,7 +61,8 @@ /// 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 { +class MachineConstantPoolEntry { +public: /// The constant itself. union { Constant *ConstVal; Index: llvm/include/llvm/CodeGen/SelectionDAG.h diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.143 llvm/include/llvm/CodeGen/SelectionDAG.h:1.144 --- llvm/include/llvm/CodeGen/SelectionDAG.h:1.143 Sun Nov 5 03:29:04 2006 +++ llvm/include/llvm/CodeGen/SelectionDAG.h Sun Nov 5 13:31:28 2006 @@ -322,9 +322,9 @@ /// getStore - Helper function to build ISD::STORE nodes. /// - SDOperand getStore(SDOperand Chain, SDOperand Value, SDOperand Ptr, + SDOperand getStore(SDOperand Chain, SDOperand Val, SDOperand Ptr, const Value *SV, int SVOffset, bool isVolatile=false); - SDOperand getTruncStore(SDOperand Chain, SDOperand Value, SDOperand Ptr, + SDOperand getTruncStore(SDOperand Chain, SDOperand Val, SDOperand Ptr, const Value *SV, int SVOffset, MVT::ValueType TVT, bool isVolatile=false); SDOperand getIndexedStore(SDOperand OrigStoe, SDOperand Base, From jeffc at jolt-lang.org Sun Nov 5 13:32:26 2006 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Sun, 5 Nov 2006 13:32:26 -0600 Subject: [llvm-commits] CVS: llvm/win32/analyze/analyze.vcproj Message-ID: <200611051932.kA5JWQ0D009844@zion.cs.uiuc.edu> Changes in directory llvm/win32/analyze: analyze.vcproj updated: 1.7 -> 1.8 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+0 -9) analyze.vcproj | 9 --------- 1 files changed, 9 deletions(-) Index: llvm/win32/analyze/analyze.vcproj diff -u llvm/win32/analyze/analyze.vcproj:1.7 llvm/win32/analyze/analyze.vcproj:1.8 --- llvm/win32/analyze/analyze.vcproj:1.7 Sun Jan 29 22:07:07 2006 +++ llvm/win32/analyze/analyze.vcproj Sun Nov 5 13:31:28 2006 @@ -124,15 +124,6 @@ Name="Source Files" Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> - - - - - - Changes in directory llvm/win32/bugpoint: bugpoint.vcproj updated: 1.4 -> 1.5 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+9 -0) bugpoint.vcproj | 9 +++++++++ 1 files changed, 9 insertions(+) Index: llvm/win32/bugpoint/bugpoint.vcproj diff -u llvm/win32/bugpoint/bugpoint.vcproj:1.4 llvm/win32/bugpoint/bugpoint.vcproj:1.5 --- llvm/win32/bugpoint/bugpoint.vcproj:1.4 Sun Jan 29 22:07:07 2006 +++ llvm/win32/bugpoint/bugpoint.vcproj Sun Nov 5 13:31:28 2006 @@ -140,6 +140,9 @@ RelativePath="..\..\tools\bugpoint\ExtractFunction.cpp"> + + + + + + From jeffc at jolt-lang.org Sun Nov 5 13:32:28 2006 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Sun, 5 Nov 2006 13:32:28 -0600 Subject: [llvm-commits] CVS: llvm/tools/llvm-ld/llvm-ld.cpp Message-ID: <200611051932.kA5JWSWB009875@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-ld: llvm-ld.cpp updated: 1.38 -> 1.39 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+1 -1) llvm-ld.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/tools/llvm-ld/llvm-ld.cpp diff -u llvm/tools/llvm-ld/llvm-ld.cpp:1.38 llvm/tools/llvm-ld/llvm-ld.cpp:1.39 --- llvm/tools/llvm-ld/llvm-ld.cpp:1.38 Fri Sep 1 15:35:17 2006 +++ llvm/tools/llvm-ld/llvm-ld.cpp Sun Nov 5 13:31:28 2006 @@ -499,7 +499,7 @@ // Get the program arguments sys::Path tmp_output("opt_result"); std::string ErrMsg; - if (tmp_output.createTemporaryFileOnDisk(&ErrMsg)) { + if (tmp_output.createTemporaryFileOnDisk(true)) { return PrintAndReturn(ErrMsg); } const char* args[4]; From jeffc at jolt-lang.org Sun Nov 5 13:32:33 2006 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Sun, 5 Nov 2006 13:32:33 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp Message-ID: <200611051932.kA5JWXnr009926@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: PredicateSimplifier.cpp updated: 1.32 -> 1.33 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+3 -3) PredicateSimplifier.cpp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp diff -u llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.32 llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.33 --- llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.32 Sun Nov 5 08:19:40 2006 +++ llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp Sun Nov 5 13:31:28 2006 @@ -428,7 +428,7 @@ // "setlt/gt int %a, %b" NE false then %a NE %b if (ConstantBool *CB = dyn_cast(V1)) { - if (CB->getValue() ^ Opcode==NE) + if (CB->getValue() ^ (Opcode==NE)) addNotEqual(BO->getOperand(0), BO->getOperand(1)); } break; @@ -437,7 +437,7 @@ // "setle/ge int %a, %b" EQ false then %a NE %b // "setle/ge int %a, %b" NE true then %a NE %b if (ConstantBool *CB = dyn_cast(V1)) { - if (CB->getValue() ^ Opcode==EQ) + if (CB->getValue() ^ (Opcode==EQ)) addNotEqual(BO->getOperand(0), BO->getOperand(1)); } break; @@ -486,7 +486,7 @@ if (ConstantBool *CB = dyn_cast(V1)) { if (ConstantBool *A = dyn_cast(LHS)) { addEqual(RHS, ConstantBool::get(A->getValue() ^ CB->getValue() - ^ Opcode==NE)); + ^ (Opcode==NE))); } } else if (ConstantIntegral *CI = dyn_cast(V1)) { From jeffc at jolt-lang.org Sun Nov 5 13:32:26 2006 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Sun, 5 Nov 2006 13:32:26 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Support/Compressor.h Message-ID: <200611051932.kA5JWQKJ009850@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Support: Compressor.h updated: 1.8 -> 1.9 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+1 -0) Compressor.h | 1 + 1 files changed, 1 insertion(+) Index: llvm/include/llvm/Support/Compressor.h diff -u llvm/include/llvm/Support/Compressor.h:1.8 llvm/include/llvm/Support/Compressor.h:1.9 --- llvm/include/llvm/Support/Compressor.h:1.8 Fri Jul 7 12:00:12 2006 +++ llvm/include/llvm/Support/Compressor.h Sun Nov 5 13:31:28 2006 @@ -16,6 +16,7 @@ #include "llvm/Support/DataTypes.h" #include +#include namespace llvm { From jeffc at jolt-lang.org Sun Nov 5 13:32:28 2006 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Sun, 5 Nov 2006 13:32:28 -0600 Subject: [llvm-commits] CVS: llvm/win32/config.h llvm.sln Message-ID: <200611051932.kA5JWST4009897@zion.cs.uiuc.edu> Changes in directory llvm/win32: config.h updated: 1.2 -> 1.3 llvm.sln updated: 1.26 -> 1.27 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+4 -17) config.h | 2 ++ llvm.sln | 19 ++----------------- 2 files changed, 4 insertions(+), 17 deletions(-) Index: llvm/win32/config.h diff -u llvm/win32/config.h:1.2 llvm/win32/config.h:1.3 --- llvm/win32/config.h:1.2 Mon Jan 23 22:40:19 2006 +++ llvm/win32/config.h Sun Nov 5 13:31:28 2006 @@ -20,3 +20,5 @@ #define LTDL_SHLIB_EXT ".dll" #define LTDL_SYSSEARCHPATH "" #define LLVM_ON_WIN32 1 + +#define strtoll strtol Index: llvm/win32/llvm.sln diff -u llvm/win32/llvm.sln:1.26 llvm/win32/llvm.sln:1.27 --- llvm/win32/llvm.sln:1.26 Thu Mar 9 21:57:45 2006 +++ llvm/win32/llvm.sln Sun Nov 5 13:31:28 2006 @@ -220,19 +220,6 @@ {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "analyze", "analyze\analyze.vcproj", "{DF8506B5-28D2-4D2E-9A6C-57D5BC98BF76}" - ProjectSection(ProjectDependencies) = postProject - {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} - {C59374C1-9FC0-4147-B836-327DFDC52D99} = {C59374C1-9FC0-4147-B836-327DFDC52D99} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - {3DC216F5-1DDD-478A-84F8-C124E5C31982} = {3DC216F5-1DDD-478A-84F8-C124E5C31982} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bugpoint", "bugpoint\bugpoint.vcproj", "{57249192-8E29-4D85-8B7A-FEFF1760B1DA}" ProjectSection(ProjectDependencies) = postProject {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} @@ -252,6 +239,8 @@ Debug = Debug Release = Release EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {28AA9146-3482-4F41-9CC6-407B1D258508}.Debug.ActiveCfg = Debug|Win32 {28AA9146-3482-4F41-9CC6-407B1D258508}.Debug.Build.0 = Debug|Win32 @@ -365,10 +354,6 @@ {ACBE81D9-64B1-4133-823A-807A4E60B454}.Debug.Build.0 = Debug|Win32 {ACBE81D9-64B1-4133-823A-807A4E60B454}.Release.ActiveCfg = Release|Win32 {ACBE81D9-64B1-4133-823A-807A4E60B454}.Release.Build.0 = Release|Win32 - {DF8506B5-28D2-4D2E-9A6C-57D5BC98BF76}.Debug.ActiveCfg = Debug|Win32 - {DF8506B5-28D2-4D2E-9A6C-57D5BC98BF76}.Debug.Build.0 = Debug|Win32 - {DF8506B5-28D2-4D2E-9A6C-57D5BC98BF76}.Release.ActiveCfg = Release|Win32 - {DF8506B5-28D2-4D2E-9A6C-57D5BC98BF76}.Release.Build.0 = Release|Win32 {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Debug.ActiveCfg = Debug|Win32 {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Debug.Build.0 = Debug|Win32 {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Release.ActiveCfg = Release|Win32 From jeffc at jolt-lang.org Sun Nov 5 13:32:33 2006 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Sun, 5 Nov 2006 13:32:33 -0600 Subject: [llvm-commits] CVS: llvm/win32/opt/opt.vcproj Message-ID: <200611051932.kA5JWXYj009948@zion.cs.uiuc.edu> Changes in directory llvm/win32/opt: opt.vcproj updated: 1.4 -> 1.5 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+9 -0) opt.vcproj | 9 +++++++++ 1 files changed, 9 insertions(+) Index: llvm/win32/opt/opt.vcproj diff -u llvm/win32/opt/opt.vcproj:1.4 llvm/win32/opt/opt.vcproj:1.5 --- llvm/win32/opt/opt.vcproj:1.4 Sun Jan 29 22:07:08 2006 +++ llvm/win32/opt/opt.vcproj Sun Nov 5 13:31:28 2006 @@ -125,8 +125,17 @@ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> + + + + + + Changes in directory llvm/win32/Support: Support.vcproj updated: 1.15 -> 1.16 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+36 -6) Support.vcproj | 42 ++++++++++++++++++++++++++++++++++++------ 1 files changed, 36 insertions(+), 6 deletions(-) Index: llvm/win32/Support/Support.vcproj diff -u llvm/win32/Support/Support.vcproj:1.15 llvm/win32/Support/Support.vcproj:1.16 --- llvm/win32/Support/Support.vcproj:1.15 Mon Mar 6 20:58:13 2006 +++ llvm/win32/Support/Support.vcproj Sun Nov 5 13:31:28 2006 @@ -110,6 +110,9 @@ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> + + + + + + + + + + - - @@ -212,6 +224,9 @@ RelativePath="..\..\include\llvm\Support\AIXDataTypesFix.h"> + + + + + + - - + + + + + + + + Changes in directory llvm/win32/Analysis: Analysis.vcproj updated: 1.19 -> 1.20 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+6 -0) Analysis.vcproj | 6 ++++++ 1 files changed, 6 insertions(+) Index: llvm/win32/Analysis/Analysis.vcproj diff -u llvm/win32/Analysis/Analysis.vcproj:1.19 llvm/win32/Analysis/Analysis.vcproj:1.20 --- llvm/win32/Analysis/Analysis.vcproj:1.19 Fri Apr 7 19:43:03 2006 +++ llvm/win32/Analysis/Analysis.vcproj Sun Nov 5 13:31:28 2006 @@ -197,6 +197,9 @@ RelativePath="..\..\lib\Analysis\DataStructure\BottomUpClosure.cpp"> + + + + Changes in directory llvm/include/llvm/Bytecode: Archive.h updated: 1.18 -> 1.19 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+1 -1) Archive.h | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/Bytecode/Archive.h diff -u llvm/include/llvm/Bytecode/Archive.h:1.18 llvm/include/llvm/Bytecode/Archive.h:1.19 --- llvm/include/llvm/Bytecode/Archive.h:1.18 Thu Aug 24 18:45:08 2006 +++ llvm/include/llvm/Bytecode/Archive.h Sun Nov 5 13:31:28 2006 @@ -95,7 +95,7 @@ /// @returns the size of the archive member in bytes. /// @brief Get the size of the archive member. - unsigned getSize() const { return info.getSize(); } + uint64_t getSize() const { return info.getSize(); } /// This method returns the total size of the archive member as it /// appears on disk. This includes the file content, the header, the From jeffc at jolt-lang.org Sun Nov 5 13:32:32 2006 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Sun, 5 Nov 2006 13:32:32 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/BranchFolding.cpp Message-ID: <200611051932.kA5JWWma009918@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: BranchFolding.cpp updated: 1.31 -> 1.32 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+1 -0) BranchFolding.cpp | 1 + 1 files changed, 1 insertion(+) Index: llvm/lib/CodeGen/BranchFolding.cpp diff -u llvm/lib/CodeGen/BranchFolding.cpp:1.31 llvm/lib/CodeGen/BranchFolding.cpp:1.32 --- llvm/lib/CodeGen/BranchFolding.cpp:1.31 Thu Nov 2 14:25:49 2006 +++ llvm/lib/CodeGen/BranchFolding.cpp Sun Nov 5 13:31:28 2006 @@ -25,6 +25,7 @@ #include "llvm/Support/CommandLine.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/STLExtras.h" +#include using namespace llvm; static Statistic<> NumDeadBlocks("branchfold", "Number of dead blocks removed"); From jeffc at jolt-lang.org Sun Nov 5 13:32:28 2006 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Sun, 5 Nov 2006 13:32:28 -0600 Subject: [llvm-commits] CVS: llvm/utils/TableGen/AsmWriterEmitter.cpp CodeGenInstruction.h FileLexer.l InstrInfoEmitter.h Message-ID: <200611051932.kA5JWSGN009888@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: AsmWriterEmitter.cpp updated: 1.44 -> 1.45 CodeGenInstruction.h updated: 1.20 -> 1.21 FileLexer.l updated: 1.31 -> 1.32 InstrInfoEmitter.h updated: 1.13 -> 1.14 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+6 -3) AsmWriterEmitter.cpp | 3 ++- CodeGenInstruction.h | 3 ++- FileLexer.l | 1 + InstrInfoEmitter.h | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) Index: llvm/utils/TableGen/AsmWriterEmitter.cpp diff -u llvm/utils/TableGen/AsmWriterEmitter.cpp:1.44 llvm/utils/TableGen/AsmWriterEmitter.cpp:1.45 --- llvm/utils/TableGen/AsmWriterEmitter.cpp:1.44 Wed Sep 27 11:44:09 2006 +++ llvm/utils/TableGen/AsmWriterEmitter.cpp Sun Nov 5 13:31:28 2006 @@ -69,7 +69,8 @@ } namespace llvm { - struct AsmWriterInst { + class AsmWriterInst { + public: std::vector Operands; const CodeGenInstruction *CGI; Index: llvm/utils/TableGen/CodeGenInstruction.h diff -u llvm/utils/TableGen/CodeGenInstruction.h:1.20 llvm/utils/TableGen/CodeGenInstruction.h:1.21 --- llvm/utils/TableGen/CodeGenInstruction.h:1.20 Tue Oct 31 18:27:05 2006 +++ llvm/utils/TableGen/CodeGenInstruction.h Sun Nov 5 13:31:28 2006 @@ -23,7 +23,8 @@ class Record; class DagInit; - struct CodeGenInstruction { + class CodeGenInstruction { + public: Record *TheDef; // The actual record defining this instruction. std::string Name; // Contents of the 'Name' field. std::string Namespace; // The namespace the instruction is in. Index: llvm/utils/TableGen/FileLexer.l diff -u llvm/utils/TableGen/FileLexer.l:1.31 llvm/utils/TableGen/FileLexer.l:1.32 --- llvm/utils/TableGen/FileLexer.l:1.31 Mon Sep 18 17:28:27 2006 +++ llvm/utils/TableGen/FileLexer.l Sun Nov 5 13:31:28 2006 @@ -27,6 +27,7 @@ %x comment %{ +#include "llvm/Config/config.h" #include "Record.h" typedef std::pair*> SubClassRefTy; #include "FileParser.h" Index: llvm/utils/TableGen/InstrInfoEmitter.h diff -u llvm/utils/TableGen/InstrInfoEmitter.h:1.13 llvm/utils/TableGen/InstrInfoEmitter.h:1.14 --- llvm/utils/TableGen/InstrInfoEmitter.h:1.13 Tue Oct 31 18:27:05 2006 +++ llvm/utils/TableGen/InstrInfoEmitter.h Sun Nov 5 13:31:28 2006 @@ -24,7 +24,7 @@ class StringInit; class IntInit; class ListInit; -struct CodeGenInstruction; +class CodeGenInstruction; class InstrInfoEmitter : public TableGenBackend { RecordKeeper &Records; From jeffc at jolt-lang.org Sun Nov 5 13:32:28 2006 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Sun, 5 Nov 2006 13:32:28 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp X86RegisterInfo.h Message-ID: <200611051932.kA5JWSLI009891@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelDAGToDAG.cpp updated: 1.121 -> 1.122 X86RegisterInfo.h updated: 1.41 -> 1.42 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+4 -2) X86ISelDAGToDAG.cpp | 2 +- X86RegisterInfo.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.121 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.122 --- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.121 Thu Nov 2 19:13:15 2006 +++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Sun Nov 5 13:31:28 2006 @@ -663,7 +663,7 @@ AM.IndexReg = ShVal.Val->getOperand(0); ConstantSDNode *AddVal = cast(ShVal.Val->getOperand(1)); - uint64_t Disp = AM.Disp + AddVal->getValue() << Val; + uint64_t Disp = AM.Disp + (AddVal->getValue() << Val); if (isInt32(Disp)) AM.Disp = Disp; else Index: llvm/lib/Target/X86/X86RegisterInfo.h diff -u llvm/lib/Target/X86/X86RegisterInfo.h:1.41 llvm/lib/Target/X86/X86RegisterInfo.h:1.42 --- llvm/lib/Target/X86/X86RegisterInfo.h:1.41 Fri Sep 8 01:48:29 2006 +++ llvm/lib/Target/X86/X86RegisterInfo.h Sun Nov 5 13:31:28 2006 @@ -22,9 +22,11 @@ class TargetInstrInfo; class X86TargetMachine; -struct X86RegisterInfo : public X86GenRegisterInfo { +class X86RegisterInfo : public X86GenRegisterInfo { +public: X86TargetMachine &TM; const TargetInstrInfo &TII; + private: /// Is64Bit - Is the target 64-bits. bool Is64Bit; From jeffc at jolt-lang.org Sun Nov 5 13:32:27 2006 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Sun, 5 Nov 2006 13:32:27 -0600 Subject: [llvm-commits] CVS: llvm/tools/bugpoint/ExecutionDriver.cpp Message-ID: <200611051932.kA5JWRno009859@zion.cs.uiuc.edu> Changes in directory llvm/tools/bugpoint: ExecutionDriver.cpp updated: 1.65 -> 1.66 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+1 -1) ExecutionDriver.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/tools/bugpoint/ExecutionDriver.cpp diff -u llvm/tools/bugpoint/ExecutionDriver.cpp:1.65 llvm/tools/bugpoint/ExecutionDriver.cpp:1.66 --- llvm/tools/bugpoint/ExecutionDriver.cpp:1.65 Fri Sep 15 16:29:15 2006 +++ llvm/tools/bugpoint/ExecutionDriver.cpp Sun Nov 5 13:31:28 2006 @@ -320,7 +320,7 @@ bool BugDriver::createReferenceFile(Module *M, const std::string &Filename) { try { compileProgram(Program); - } catch (ToolExecutionError &TEE) { + } catch (ToolExecutionError &) { return false; } try { From jeffc at jolt-lang.org Sun Nov 5 13:32:27 2006 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Sun, 5 Nov 2006 13:32:27 -0600 Subject: [llvm-commits] CVS: llvm/win32/Target/Target.vcproj Message-ID: <200611051932.kA5JWRLd009870@zion.cs.uiuc.edu> Changes in directory llvm/win32/Target: Target.vcproj updated: 1.14 -> 1.15 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+6 -3) Target.vcproj | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) Index: llvm/win32/Target/Target.vcproj diff -u llvm/win32/Target/Target.vcproj:1.14 llvm/win32/Target/Target.vcproj:1.15 --- llvm/win32/Target/Target.vcproj:1.14 Thu Apr 20 17:19:06 2006 +++ llvm/win32/Target/Target.vcproj Sun Nov 5 13:31:28 2006 @@ -115,6 +115,9 @@ RelativePath="..\..\lib\Target\SubtargetFeature.cpp"> + + - - + + Changes in directory llvm/include/llvm/ADT: FoldingSet.h updated: 1.4 -> 1.5 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+2 -0) FoldingSet.h | 2 ++ 1 files changed, 2 insertions(+) Index: llvm/include/llvm/ADT/FoldingSet.h diff -u llvm/include/llvm/ADT/FoldingSet.h:1.4 llvm/include/llvm/ADT/FoldingSet.h:1.5 --- llvm/include/llvm/ADT/FoldingSet.h:1.4 Thu Nov 2 08:21:26 2006 +++ llvm/include/llvm/ADT/FoldingSet.h Sun Nov 5 13:31:28 2006 @@ -16,7 +16,9 @@ #ifndef LLVM_ADT_FOLDINGSET_H #define LLVM_ADT_FOLDINGSET_H +#include "llvm/Support/DataTypes.h" #include "llvm/ADT/SmallVector.h" +#include namespace llvm { From jeffc at jolt-lang.org Sun Nov 5 13:32:33 2006 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Sun, 5 Nov 2006 13:32:33 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/System/Path.h Message-ID: <200611051932.kA5JWXIg009985@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/System: Path.h updated: 1.42 -> 1.43 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+1 -1) Path.h | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/System/Path.h diff -u llvm/include/llvm/System/Path.h:1.42 llvm/include/llvm/System/Path.h:1.43 --- llvm/include/llvm/System/Path.h:1.42 Wed Aug 23 15:34:57 2006 +++ llvm/include/llvm/System/Path.h Sun Nov 5 13:31:28 2006 @@ -47,7 +47,7 @@ group(999), isDir(false) { } TimeValue getTimestamp() const { return modTime; } - size_t getSize() const { return fileSize; } + uint64_t getSize() const { return fileSize; } uint32_t getMode() const { return mode; } uint32_t getUser() const { return user; } uint32_t getGroup() const { return group; } From jeffc at jolt-lang.org Sun Nov 5 13:32:33 2006 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Sun, 5 Nov 2006 13:32:33 -0600 Subject: [llvm-commits] CVS: llvm/win32/System/System.vcproj Message-ID: <200611051932.kA5JWXu3009934@zion.cs.uiuc.edu> Changes in directory llvm/win32/System: System.vcproj updated: 1.17 -> 1.18 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+12 -0) System.vcproj | 12 ++++++++++++ 1 files changed, 12 insertions(+) Index: llvm/win32/System/System.vcproj diff -u llvm/win32/System/System.vcproj:1.17 llvm/win32/System/System.vcproj:1.18 --- llvm/win32/System/System.vcproj:1.17 Sun Jan 29 22:07:07 2006 +++ llvm/win32/System/System.vcproj Sun Nov 5 13:31:28 2006 @@ -110,9 +110,15 @@ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> + + + + + + + + Changes in directory llvm/include/llvm/Transforms/Utils: FunctionUtils.h updated: 1.8 -> 1.9 PromoteMemToReg.h updated: 1.8 -> 1.9 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+3 -3) FunctionUtils.h | 2 +- PromoteMemToReg.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/include/llvm/Transforms/Utils/FunctionUtils.h diff -u llvm/include/llvm/Transforms/Utils/FunctionUtils.h:1.8 llvm/include/llvm/Transforms/Utils/FunctionUtils.h:1.9 --- llvm/include/llvm/Transforms/Utils/FunctionUtils.h:1.8 Thu Apr 21 15:59:05 2005 +++ llvm/include/llvm/Transforms/Utils/FunctionUtils.h Sun Nov 5 13:31:28 2006 @@ -18,7 +18,7 @@ namespace llvm { class BasicBlock; - struct DominatorSet; + class DominatorSet; class Function; class Loop; Index: llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h diff -u llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h:1.8 llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h:1.9 --- llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h:1.8 Thu Apr 21 15:59:05 2005 +++ llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h Sun Nov 5 13:31:28 2006 @@ -20,8 +20,8 @@ namespace llvm { class AllocaInst; -struct DominatorTree; -struct DominanceFrontier; +class DominatorTree; +class DominanceFrontier; class TargetData; class AliasSetTracker; From jeffc at jolt-lang.org Sun Nov 5 13:32:33 2006 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Sun, 5 Nov 2006 13:32:33 -0600 Subject: [llvm-commits] CVS: llvm/win32/VMCore/VMCore.vcproj Message-ID: <200611051932.kA5JWXx1009944@zion.cs.uiuc.edu> Changes in directory llvm/win32/VMCore: VMCore.vcproj updated: 1.21 -> 1.22 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+3 -0) VMCore.vcproj | 3 +++ 1 files changed, 3 insertions(+) Index: llvm/win32/VMCore/VMCore.vcproj diff -u llvm/win32/VMCore/VMCore.vcproj:1.21 llvm/win32/VMCore/VMCore.vcproj:1.22 --- llvm/win32/VMCore/VMCore.vcproj:1.21 Fri Apr 7 19:43:03 2006 +++ llvm/win32/VMCore/VMCore.vcproj Sun Nov 5 13:31:28 2006 @@ -199,6 +199,9 @@ RelativePath="..\..\lib\VMCore\ValueSymbolTable.cpp"> + + From jeffc at jolt-lang.org Sun Nov 5 13:32:33 2006 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Sun, 5 Nov 2006 13:32:33 -0600 Subject: [llvm-commits] CVS: llvm/win32/Transforms/Transforms.vcproj Message-ID: <200611051932.kA5JWXo5009958@zion.cs.uiuc.edu> Changes in directory llvm/win32/Transforms: Transforms.vcproj updated: 1.22 -> 1.23 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+19 -16) Transforms.vcproj | 35 +++++++++++++++++++---------------- 1 files changed, 19 insertions(+), 16 deletions(-) Index: llvm/win32/Transforms/Transforms.vcproj diff -u llvm/win32/Transforms/Transforms.vcproj:1.22 llvm/win32/Transforms/Transforms.vcproj:1.23 --- llvm/win32/Transforms/Transforms.vcproj:1.22 Mon Apr 10 21:01:22 2006 +++ llvm/win32/Transforms/Transforms.vcproj Sun Nov 5 13:31:28 2006 @@ -261,25 +261,13 @@ RelativePath="..\..\lib\Transforms\Scalar\LoopUnswitch.cpp"> - - - - - - - - + RelativePath="..\..\lib\Transforms\Scalar\PredicateSimplifier.cpp"> @@ -335,12 +323,30 @@ RelativePath="..\..\lib\Transforms\Utils\InlineFunction.cpp"> + + + + + + + + + + + + - - Changes in directory llvm/win32/x86: x86.vcproj updated: 1.24 -> 1.25 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+30 -18) x86.vcproj | 48 ++++++++++++++++++++++++++++++------------------ 1 files changed, 30 insertions(+), 18 deletions(-) Index: llvm/win32/x86/x86.vcproj diff -u llvm/win32/x86/x86.vcproj:1.24 llvm/win32/x86/x86.vcproj:1.25 --- llvm/win32/x86/x86.vcproj:1.24 Wed Apr 5 00:19:18 2006 +++ llvm/win32/x86/x86.vcproj Sun Nov 5 13:31:28 2006 @@ -116,15 +116,15 @@ @@ -134,15 +134,15 @@ @@ -167,6 +167,9 @@ RelativePath="..\..\lib\Target\X86\X86InstrInfo.cpp"> + + + + @@ -235,6 +241,9 @@ RelativePath="..\..\lib\Target\X86\X86JITInfo.h"> + + + + From jeffc at jolt-lang.org Sun Nov 5 13:32:33 2006 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Sun, 5 Nov 2006 13:32:33 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp SelectionDAG.cpp Message-ID: <200611051932.kA5JWXTe009970@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.236 -> 1.237 SelectionDAG.cpp updated: 1.369 -> 1.370 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+9 -9) DAGCombiner.cpp | 2 +- SelectionDAG.cpp | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.236 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.237 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.236 Sun Nov 5 03:31:14 2006 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Sun Nov 5 13:31:28 2006 @@ -383,7 +383,7 @@ bool isAlias(SDOperand Ptr1, int64_t Size1, const Value *SrcValue1, int SrcValueOffset1, SDOperand Ptr2, int64_t Size2, - const Value *SrcValue2, int SrcValueOffset1); + const Value *SrcValue2, int SrcValueOffset2); /// FindAliasInfo - Extracts the relevant alias information from the memory /// node. Returns true if the operand was a load. Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.369 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.370 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.369 Sun Nov 5 03:30:09 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sun Nov 5 13:31:28 2006 @@ -1657,16 +1657,16 @@ return getNode(ISD::VLOAD, getVTList(MVT::Vector, MVT::Other), Ops, 5); } -SDOperand SelectionDAG::getStore(SDOperand Chain, SDOperand Value, +SDOperand SelectionDAG::getStore(SDOperand Chain, SDOperand Val, SDOperand Ptr, const Value *SV, int SVOffset, bool isVolatile) { - MVT::ValueType VT = Value.getValueType(); + MVT::ValueType VT = Val.getValueType(); // FIXME: Alignment == 1 for now. unsigned Alignment = 1; SDVTList VTs = getVTList(MVT::Other); SDOperand Undef = getNode(ISD::UNDEF, Ptr.getValueType()); - SDOperand Ops[] = { Chain, Value, Ptr, Undef }; + SDOperand Ops[] = { Chain, Val, Ptr, Undef }; FoldingSetNodeID ID; AddNodeIDNode(ID, ISD::STORE, VTs, Ops, 4); ID.AddInteger(ISD::UNINDEXED); @@ -1679,7 +1679,7 @@ void *IP = 0; if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP)) return SDOperand(E, 0); - SDNode *N = new StoreSDNode(Chain, Value, Ptr, Undef, ISD::UNINDEXED, false, + SDNode *N = new StoreSDNode(Chain, Val, Ptr, Undef, ISD::UNINDEXED, false, VT, SV, SVOffset, Alignment, isVolatile); N->setValueTypes(VTs); CSEMap.InsertNode(N, IP); @@ -1687,11 +1687,11 @@ return SDOperand(N, 0); } -SDOperand SelectionDAG::getTruncStore(SDOperand Chain, SDOperand Value, +SDOperand SelectionDAG::getTruncStore(SDOperand Chain, SDOperand Val, SDOperand Ptr, const Value *SV, int SVOffset, MVT::ValueType SVT, bool isVolatile) { - MVT::ValueType VT = Value.getValueType(); + MVT::ValueType VT = Val.getValueType(); bool isTrunc = VT != SVT; assert(VT > SVT && "Not a truncation?"); @@ -1702,7 +1702,7 @@ unsigned Alignment = 1; SDVTList VTs = getVTList(MVT::Other); SDOperand Undef = getNode(ISD::UNDEF, Ptr.getValueType()); - SDOperand Ops[] = { Chain, Value, Ptr, Undef }; + SDOperand Ops[] = { Chain, Val, Ptr, Undef }; FoldingSetNodeID ID; AddNodeIDNode(ID, ISD::STORE, VTs, Ops, 4); ID.AddInteger(ISD::UNINDEXED); @@ -1715,7 +1715,7 @@ void *IP = 0; if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP)) return SDOperand(E, 0); - SDNode *N = new StoreSDNode(Chain, Value, Ptr, Undef, ISD::UNINDEXED, isTrunc, + SDNode *N = new StoreSDNode(Chain, Val, Ptr, Undef, ISD::UNINDEXED, isTrunc, SVT, SV, SVOffset, Alignment, isVolatile); N->setValueTypes(VTs); CSEMap.InsertNode(N, IP); From jeffc at jolt-lang.org Sun Nov 5 13:32:33 2006 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Sun, 5 Nov 2006 13:32:33 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/CloneFunction.cpp Message-ID: <200611051932.kA5JWXYK009980@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: CloneFunction.cpp updated: 1.32 -> 1.33 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+3 -3) CloneFunction.cpp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/lib/Transforms/Utils/CloneFunction.cpp diff -u llvm/lib/Transforms/Utils/CloneFunction.cpp:1.32 llvm/lib/Transforms/Utils/CloneFunction.cpp:1.33 --- llvm/lib/Transforms/Utils/CloneFunction.cpp:1.32 Thu Nov 2 14:25:50 2006 +++ llvm/lib/Transforms/Utils/CloneFunction.cpp Sun Nov 5 13:31:28 2006 @@ -313,9 +313,9 @@ assert(NameSuffix && "NameSuffix cannot be null!"); #ifndef NDEBUG - for (Function::const_arg_iterator I = OldFunc->arg_begin(), - E = OldFunc->arg_end(); I != E; ++I) - assert(ValueMap.count(I) && "No mapping from source argument specified!"); + for (Function::const_arg_iterator II = OldFunc->arg_begin(), + E = OldFunc->arg_end(); II != E; ++II) + assert(ValueMap.count(II) && "No mapping from source argument specified!"); #endif PruningFunctionCloner PFC(NewFunc, OldFunc, ValueMap, Returns, From jeffc at jolt-lang.org Sun Nov 5 13:32:32 2006 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Sun, 5 Nov 2006 13:32:32 -0600 Subject: [llvm-commits] CVS: llvm/lib/System/Win32/Path.inc Message-ID: <200611051932.kA5JWWpF009920@zion.cs.uiuc.edu> Changes in directory llvm/lib/System/Win32: Path.inc updated: 1.58 -> 1.59 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+5 -0) Path.inc | 5 +++++ 1 files changed, 5 insertions(+) Index: llvm/lib/System/Win32/Path.inc diff -u llvm/lib/System/Win32/Path.inc:1.58 llvm/lib/System/Win32/Path.inc:1.59 --- llvm/lib/System/Win32/Path.inc:1.58 Fri Sep 1 15:35:17 2006 +++ llvm/lib/System/Win32/Path.inc Sun Nov 5 13:31:28 2006 @@ -124,7 +124,12 @@ // Append a subdirectory passed on our process id so multiple LLVMs don't // step on each other's toes. +#ifdef __MINGW32__ + // Mingw's Win32 header files are broken. sprintf(pathname, "LLVM_%u", unsigned(GetCurrentProcessId())); +#else + sprintf(pathname, "LLVM_%u", GetCurrentProcessId()); +#endif result.appendComponent(pathname); // If there's a directory left over from a previous LLVM execution that From jeffc at jolt-lang.org Sun Nov 5 13:32:32 2006 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Sun, 5 Nov 2006 13:32:32 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/Dominators.h LoopInfo.h Message-ID: <200611051932.kA5JWWw0009922@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: Dominators.h updated: 1.61 -> 1.62 LoopInfo.h updated: 1.59 -> 1.60 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+3 -3) Dominators.h | 4 ++-- LoopInfo.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/include/llvm/Analysis/Dominators.h diff -u llvm/include/llvm/Analysis/Dominators.h:1.61 llvm/include/llvm/Analysis/Dominators.h:1.62 --- llvm/include/llvm/Analysis/Dominators.h:1.61 Tue Oct 3 00:24:56 2006 +++ llvm/include/llvm/Analysis/Dominators.h Sun Nov 5 13:31:28 2006 @@ -304,9 +304,9 @@ Node *RootNode; public: class Node { - friend struct DominatorTree; + friend class DominatorTree; friend struct PostDominatorTree; - friend struct DominatorTreeBase; + friend class DominatorTreeBase; BasicBlock *TheBB; Node *IDom; std::vector Children; Index: llvm/include/llvm/Analysis/LoopInfo.h diff -u llvm/include/llvm/Analysis/LoopInfo.h:1.59 llvm/include/llvm/Analysis/LoopInfo.h:1.60 --- llvm/include/llvm/Analysis/LoopInfo.h:1.59 Fri Oct 27 20:24:05 2006 +++ llvm/include/llvm/Analysis/LoopInfo.h Sun Nov 5 13:31:28 2006 @@ -35,7 +35,7 @@ namespace llvm { -struct ETForest; +class ETForest; class LoopInfo; class PHINode; class Instruction; From jeffc at jolt-lang.org Sun Nov 5 13:32:33 2006 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Sun, 5 Nov 2006 13:32:33 -0600 Subject: [llvm-commits] CVS: llvm/win32/CodeGen/CodeGen.vcproj Message-ID: <200611051932.kA5JWXfw009930@zion.cs.uiuc.edu> Changes in directory llvm/win32/CodeGen: CodeGen.vcproj updated: 1.24 -> 1.25 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+27 -6) CodeGen.vcproj | 33 +++++++++++++++++++++++++++------ 1 files changed, 27 insertions(+), 6 deletions(-) Index: llvm/win32/CodeGen/CodeGen.vcproj diff -u llvm/win32/CodeGen/CodeGen.vcproj:1.24 llvm/win32/CodeGen/CodeGen.vcproj:1.25 --- llvm/win32/CodeGen/CodeGen.vcproj:1.24 Tue May 2 19:28:50 2006 +++ llvm/win32/CodeGen/CodeGen.vcproj Sun Nov 5 13:31:28 2006 @@ -133,6 +133,9 @@ RelativePath="..\..\lib\CodeGen\LiveVariables.cpp"> + + + + - - + + + + + + + + + + + + + + - - References: <8abe0dc60611031652p564f9448j145c24b56ad7a471@mail.gmail.com> Message-ID: On Nov 3, 2006, at 4:52 PM, Zhou Sheng wrote: > Hi, Chris, > > i'm Sheng. Here are the SHR patches modified according to your > suggestion. Please review them, thanks:) > > ***NOTE: This is for review only, please don't commit any of this. > Hi Sheng, This is looking really good. In the InstCombine.cpp file, there are still places where you can eliminate more casts and there is still a bug. Notes below, -Chris @@ -1117,21 +1127,43 @@ bool InstCombiner::SimplifyDemandedBits( ... + case Instruction::AShr: // If this is an arithmetic shift right and only the low-bit is set, we can // always convert this into a logical shr, even if the shift amount is // variable. The low bit of the shift cannot be an input sign bit unless // the shift amount is >= the size of the datatype, which is undefined. - if (DemandedMask == 1 && I->getType()->isSigned()) { + if (DemandedMask == 1) { // Convert the input to unsigned. Value *NewVal = InsertCastBefore(I->getOperand(0), I->getType()- >getUnsignedVersion(), *I); // Perform the unsigned shift right. - NewVal = new ShiftInst(Instruction::Shr, NewVal, I->getOperand (1), + NewVal = new ShiftInst(Instruction::LShr, NewVal, I->getOperand (1), I->getName()); InsertNewInstBefore(cast(NewVal), *I); // Then cast that to the destination type. NewVal = new CastInst(NewVal, I->getType(), I->getName()); InsertNewInstBefore(cast(NewVal), *I); There is no reason to turn an ashr into two casts + a lshr: just turn it into a lshr instead. In this hunk: @@ -1897,33 +1912,46 @@ Instruction *InstCombiner::visitSub(Bina ... the two copies of: if (NewShift->getType() == I.getType()) return NewShift; else { InsertNewInstBefore(NewShift, I); return new CastInst(NewShift, I.getType()); } Can be turned into: return NewShift; This allows you to simplify them into code like this (likewise for the LShr case): + else if (SI->getOpcode() == Instruction::AShr) { + if (ConstantInt *CU = dyn_cast(SI->getOperand (1))) { + // Check to see if we are shifting out everything but the sign bit. + if (CU->getZExtValue() == + SI->getType()->getPrimitiveSizeInBits()-1) { + // Ok, the transformation is safe. Insert LShr. + return new ShiftInst(Instruction::LShr, SI->getOperand (0), + CU, SI->getName()); + } + } + } In this hunk: @@ -2260,22 +2288,14 @@ Instruction *InstCombiner::visitUDiv(Bin Please simplify the code to just "return new ShiftInst(...)", eliminating the Result variable. This occurs many times, please simplify them all. In these chunks: @@ -2805,18 +2808,19 @@ Instruction *InstCombiner::OptAndOp(Inst @@ -2826,19 +2830,19 @@ Instruction *InstCombiner::OptAndOp(Inst You shouldn't be checking 'AndRHS->getType()->isUnsigned()' to determine if it's a LShr or AShr. This is a bug. In the same chunks, there are also unneeded casts being inserted, please remove them. In this hunk: @@ -5086,12 +5096,14 @@ Instruction *InstCombiner::FoldShiftByCo case Instruction::Or: case Instruction::Xor: // These operators commute. // Turn (Y + (X >> C)) << C -> (X + (Y << C)) & (~0 << C) if (isLeftShift && Op0BO->getOperand(1)->hasOneUse() && - match(Op0BO->getOperand(1), - m_Shr(m_Value(V1), m_ConstantInt(CC))) && CC == Op1) { + (match(Op0BO->getOperand(1), + m_LShr(m_Value(V1), m_ConstantInt(CC))) || + match(Op0BO->getOperand(1), + m_AShr(m_Value(V1), m_ConstantInt(CC)))) && CC == Op1) { It seems that it would be better to introduce a new 'm_Shr' predicate that matches either shift right operation. Likewise in: @@ -5103,13 +5115,16 @@ Instruction *InstCombiner::FoldShiftByCo @@ -5123,12 +5138,14 @@ Instruction *InstCombiner::FoldShiftByCo @@ -5140,13 +5157,16 @@ Instruction *InstCombiner::FoldShiftByCo etc. There is still unneeded casting happening in: @@ -5282,14 +5302,14 @@ Instruction *InstCombiner::FoldShiftByCo return new ShiftInst(I.getOpcode(), Mask, ConstantInt::get(Type::UByteTy, ShiftAmt2- ShiftAmt1)); } else if (isShiftOfUnsignedShift || isShiftOfLeftShift) { if (isShiftOfUnsignedShift && !isShiftOfLeftShift && isSignedShift) { // Make sure to emit an unsigned shift right, not a signed one. - Mask = InsertNewInstBefore(new CastInst(Mask, + Mask = InsertNewInstBefore(new CastInst(Mask, Mask->getType()- >getUnsignedVersion(), Op->getName()), I); - Mask = new ShiftInst(Instruction::Shr, Mask, + Mask = new ShiftInst(Instruction::LShr, Mask, ConstantInt::get(Type::UByteTy, ShiftAmt1- ShiftAmt2)); InsertNewInstBefore(Mask, I); return new CastInst(Mask, I.getType()); } else { return new ShiftInst(ShiftOp->getOpcode(), Mask, In this chunk: @@ -5798,23 +5818,25 @@ Instruction *InstCombiner::visitCastInst (DestBitSize < SrcBitSize && isa(Op1))) { Value *Op0c = InsertOperandCastBefore(Op0, DestTy, SrcI); return new ShiftInst(Instruction::Shl, Op0c, Op1); } break; - case Instruction::Shr: + case Instruction::LShr: + break; + case Instruction::AShr: // If this is a signed shr, and if all bits shifted in are about to be // truncated off, turn it into an unsigned shr to allow greater // simplifications. - if (DestBitSize < SrcBitSize && Src->getType()->isSigned() && + if (DestBitSize < SrcBitSize && isa(Op1)) { unsigned ShiftAmt = cast(Op1)->getZExtValue(); if (SrcBitSize > ShiftAmt && SrcBitSize-ShiftAmt >= DestBitSize) { // Convert to unsigned. Value *N1 = InsertOperandCastBefore(Op0, Op0->getType()- >getUnsignedVersion(), &CI); // Insert the new shift, which is now unsigned. - N1 = InsertNewInstBefore(new ShiftInst(Instruction::Shr, N1, + N1 = InsertNewInstBefore(new ShiftInst (Instruction::LShr, N1, Op1, Src->getName ()), CI); return new CastInst(N1, CI.getType()); } } break; ... Please remove: " + case Instruction::LShr: + break; " And eliminate the casting. In this chunk: @@ -5857,11 +5879,11 @@ Instruction *InstCombiner::visitCastInst // unsigned if it is signed. if (In->getType()->isSigned()) In = InsertCastBefore( In, In->getType()->getUnsignedVersion(), CI); // Insert the shift to put the result in the low bit. - In = InsertNewInstBefore(new ShiftInst (Instruction::Shr, In, + In = InsertNewInstBefore(new ShiftInst (Instruction::LShr, In, ConstantInt::get(Type::UByteTy, ShiftAmt), In->getName()+".lobit"), CI); } if ((Op1CV != 0) == isSetNE) { // Toggle the low bit. Remove the casting. Please resend with the appropriate modifications, thanks. -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20061105/47754ced/attachment.html From llvm at cs.uiuc.edu Sun Nov 5 13:38:34 2006 From: llvm at cs.uiuc.edu (LLVM) Date: Sun, 5 Nov 2006 13:38:34 -0600 Subject: [llvm-commits] CVS: llvm/win32/analyze/analyze.vcproj Message-ID: <200611051938.kA5JcYi9010110@zion.cs.uiuc.edu> Changes in directory llvm/win32/analyze: analyze.vcproj (r1.8) removed --- Log message: Remove obsolete VS project. --- Diffs of the changes: (+0 -0) 0 files changed From reid at x10sys.com Sun Nov 5 13:53:23 2006 From: reid at x10sys.com (Reid Spencer) Date: Sun, 5 Nov 2006 13:53:23 -0600 Subject: [llvm-commits] CVS: llvm/tools/llvm-ld/llvm-ld.cpp Message-ID: <200611051953.kA5JrN7M010366@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-ld: llvm-ld.cpp updated: 1.39 -> 1.40 --- Log message: Fix a problem in the the last patch that subverts error message printing. --- Diffs of the changes: (+1 -1) llvm-ld.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/tools/llvm-ld/llvm-ld.cpp diff -u llvm/tools/llvm-ld/llvm-ld.cpp:1.39 llvm/tools/llvm-ld/llvm-ld.cpp:1.40 --- llvm/tools/llvm-ld/llvm-ld.cpp:1.39 Sun Nov 5 13:31:28 2006 +++ llvm/tools/llvm-ld/llvm-ld.cpp Sun Nov 5 13:53:08 2006 @@ -499,7 +499,7 @@ // Get the program arguments sys::Path tmp_output("opt_result"); std::string ErrMsg; - if (tmp_output.createTemporaryFileOnDisk(true)) { + if (tmp_output.createTemporaryFileOnDisk(true, &ErrMsg)) { return PrintAndReturn(ErrMsg); } const char* args[4]; From reid at x10sys.com Sun Nov 5 14:10:30 2006 From: reid at x10sys.com (Reid Spencer) Date: Sun, 5 Nov 2006 14:10:30 -0600 Subject: [llvm-commits] CVS: llvm/Makefile.config.in Message-ID: <200611052010.kA5KAUVS010654@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.config.in updated: 1.65 -> 1.66 --- Log message: Get LLVMGCCARCH right regardless of the llvm-gcc version being used. --- Diffs of the changes: (+4 -0) Makefile.config.in | 4 ++++ 1 files changed, 4 insertions(+) Index: llvm/Makefile.config.in diff -u llvm/Makefile.config.in:1.65 llvm/Makefile.config.in:1.66 --- llvm/Makefile.config.in:1.65 Fri Nov 3 12:04:08 2006 +++ llvm/Makefile.config.in Sun Nov 5 14:10:16 2006 @@ -174,7 +174,11 @@ LLVMGCCDIR := @LLVMGCCDIR@ # Determine the target for which LLVM should generate code. +ifeq (@LLVMGCC_MAJVERS@,3) LLVMGCCARCH := @target@/3.4-llvm +else +LLVMGCCARCH := @target@/@LLVMGCC_VERSION@ +endif # Full pathnames of LLVM C/C++ front-end 'cc1' and 'cc1plus' binaries: LLVMGCC := @LLVMGCC@ From jlaskey at apple.com Sun Nov 5 15:01:09 2006 From: jlaskey at apple.com (Jim Laskey) Date: Sun, 5 Nov 2006 15:01:09 -0600 Subject: [llvm-commits] CVS: llvm/Xcode/LLVM.xcodeproj/project.pbxproj Message-ID: <200611052101.kA5L194E011775@zion.cs.uiuc.edu> Changes in directory llvm/Xcode/LLVM.xcodeproj: project.pbxproj updated: 1.24 -> 1.25 --- Log message: Up to date for 1.9 --- Diffs of the changes: (+404 -51) project.pbxproj | 455 +++++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 404 insertions(+), 51 deletions(-) Index: llvm/Xcode/LLVM.xcodeproj/project.pbxproj diff -u llvm/Xcode/LLVM.xcodeproj/project.pbxproj:1.24 llvm/Xcode/LLVM.xcodeproj/project.pbxproj:1.25 --- llvm/Xcode/LLVM.xcodeproj/project.pbxproj:1.24 Thu Sep 7 17:07:57 2006 +++ llvm/Xcode/LLVM.xcodeproj/project.pbxproj Sun Nov 5 15:00:54 2006 @@ -19,6 +19,18 @@ name = "LLVM full llc"; productName = "LLVM full llc"; }; + CFDF86D00ADE820000D40A3D /* LLVM full llc release */ = { + isa = PBXAggregateTarget; + buildConfigurationList = CFDF86D50ADE820000D40A3D /* Build configuration list for PBXAggregateTarget "LLVM full llc release" */; + buildPhases = ( + ); + dependencies = ( + CFDF86DA0ADE822100D40A3D /* PBXTargetDependency */, + CFDF86DC0ADE822100D40A3D /* PBXTargetDependency */, + ); + name = "LLVM full llc release"; + productName = "LLVM full llc"; + }; /* End PBXAggregateTarget section */ /* Begin PBXContainerItemProxy section */ @@ -36,15 +48,30 @@ remoteGlobalIDString = CF0329BB08D1BE5D0030FD33; remoteInfo = "LLVM llc"; }; + CFDF86D90ADE822100D40A3D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = CFDF86BD0ADE819D00D40A3D; + remoteInfo = "LLVM lib release"; + }; + CFDF86DB0ADE822100D40A3D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = CFDF86C60ADE81D000D40A3D; + remoteInfo = "LLVM llc release"; + }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ CF1ACC9709C9DE4400D3C5EB /* IntrinsicInst.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IntrinsicInst.cpp; path = ../lib/VMCore/IntrinsicInst.cpp; sourceTree = ""; }; CF26835B09178F5500C5F253 /* TargetInstrItineraries.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetInstrItineraries.h; sourceTree = ""; }; + CF32AF5C0AEE6A4E00D24CD4 /* LLVMTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LLVMTargetMachine.cpp; sourceTree = ""; }; + CF33BE150AF62B4200E93805 /* CStringMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CStringMap.h; sourceTree = ""; }; + CF33BE160AF62B4200E93805 /* SmallString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmallString.h; sourceTree = ""; }; CF341DAD0AB07A8B0099B064 /* AlphaTargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlphaTargetAsmInfo.h; sourceTree = ""; }; CF341DAE0AB07A8B0099B064 /* AlphaTargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaTargetAsmInfo.cpp; sourceTree = ""; }; - CF341DC30AB07E6B0099B064 /* ARMTargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMTargetAsmInfo.h; sourceTree = ""; }; - CF341DC40AB07E6B0099B064 /* ARMTargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMTargetAsmInfo.cpp; sourceTree = ""; }; CF341DE80AB07F890099B064 /* IA64TargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IA64TargetAsmInfo.h; sourceTree = ""; }; CF341DE90AB07F890099B064 /* IA64TargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IA64TargetAsmInfo.cpp; sourceTree = ""; }; CF341E010AB080220099B064 /* PPCTargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCTargetAsmInfo.h; sourceTree = ""; }; @@ -53,6 +80,8 @@ CF341E230AB0814B0099B064 /* SparcTargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SparcTargetAsmInfo.cpp; sourceTree = ""; }; CF341E320AB082D60099B064 /* X86TargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = X86TargetAsmInfo.h; sourceTree = ""; }; CF341E330AB082D60099B064 /* X86TargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = X86TargetAsmInfo.cpp; sourceTree = ""; }; + CF42B6BF0AF24F5300D5D47C /* FoldingSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FoldingSet.h; sourceTree = ""; }; + CF42B6C40AF2512000D5D47C /* FoldingSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FoldingSet.cpp; sourceTree = ""; }; CF47BD380AAF40BC00A8B13E /* TargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetAsmInfo.h; sourceTree = ""; }; CF47BD860AAF487E00A8B13E /* TargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TargetAsmInfo.cpp; sourceTree = ""; }; CF490D14090541D30072DB1C /* TargetSchedule.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TargetSchedule.td; sourceTree = ""; }; @@ -93,6 +122,7 @@ CF6529A6095B21A8007F884E /* MachineDebugInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MachineDebugInfo.cpp; sourceTree = ""; }; CF6B5AFD095C82C300D1EA42 /* DAGCombiner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DAGCombiner.cpp; sourceTree = ""; }; CF6F487109505E1500BC9E82 /* MachineDebugInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachineDebugInfo.h; sourceTree = ""; }; + CF71B60F0AC45EDA0007F57C /* SmallVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmallVector.h; sourceTree = ""; }; CF73C0A2098A4FDF00627152 /* InlineAsm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InlineAsm.h; sourceTree = ""; }; CF73C0A3098A4FDF00627152 /* TypeSymbolTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypeSymbolTable.h; sourceTree = ""; }; CF73C0A4098A4FDF00627152 /* ValueSymbolTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ValueSymbolTable.h; sourceTree = ""; }; @@ -119,26 +149,11 @@ CF8D62FA09C2226F006017BA /* Intrinsics.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Intrinsics.td; sourceTree = ""; }; CF8E00490989162500DA2399 /* Dwarf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Dwarf.h; sourceTree = ""; }; CF9720240A9F3969002CEEDD /* MachOWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachOWriter.h; sourceTree = ""; }; - CF9720250A9F3969002CEEDD /* SelectionDAGCSEMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SelectionDAGCSEMap.h; sourceTree = ""; }; CF9720260A9F39B9002CEEDD /* LinkAllPasses.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkAllPasses.h; sourceTree = ""; }; CF9720270A9F39B9002CEEDD /* LinkTimeOptimizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkTimeOptimizer.h; sourceTree = ""; }; CF9720340A9F3A41002CEEDD /* IncludeFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IncludeFile.h; sourceTree = ""; }; CF9720350A9F3ADC002CEEDD /* MachOWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MachOWriter.cpp; sourceTree = ""; }; - CF9720360A9F3B1C002CEEDD /* SelectionDAGCSEMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SelectionDAGCSEMap.cpp; sourceTree = ""; }; CF9720370A9F3B1C002CEEDD /* TargetLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TargetLowering.cpp; sourceTree = ""; }; - CF97203A0A9F3BBC002CEEDD /* ARM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARM.h; sourceTree = ""; }; - CF97203B0A9F3BBC002CEEDD /* ARM.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ARM.td; sourceTree = ""; }; - CF97203C0A9F3BBC002CEEDD /* ARMAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMAsmPrinter.cpp; sourceTree = ""; }; - CF97203D0A9F3BBC002CEEDD /* ARMFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMFrameInfo.h; sourceTree = ""; }; - CF9720450A9F3BBC002CEEDD /* ARMInstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMInstrInfo.cpp; sourceTree = ""; }; - CF9720460A9F3BBC002CEEDD /* ARMInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMInstrInfo.h; sourceTree = ""; }; - CF9720470A9F3BBC002CEEDD /* ARMInstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ARMInstrInfo.td; sourceTree = ""; }; - CF9720480A9F3BBC002CEEDD /* ARMISelDAGToDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMISelDAGToDAG.cpp; sourceTree = ""; }; - CF9720490A9F3BBC002CEEDD /* ARMRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMRegisterInfo.cpp; sourceTree = ""; }; - CF97204A0A9F3BBC002CEEDD /* ARMRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMRegisterInfo.h; sourceTree = ""; }; - CF97204B0A9F3BBC002CEEDD /* ARMRegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ARMRegisterInfo.td; sourceTree = ""; }; - CF97204C0A9F3BBC002CEEDD /* ARMTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMTargetMachine.cpp; sourceTree = ""; }; - CF97204D0A9F3BBC002CEEDD /* ARMTargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMTargetMachine.h; sourceTree = ""; }; CF9720890A9F3C04002CEEDD /* PPCMachOWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCMachOWriter.cpp; sourceTree = ""; }; CF97208A0A9F3C6F002CEEDD /* LCSSA.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LCSSA.cpp; sourceTree = ""; }; CF97208B0A9F3C6F002CEEDD /* LowerAllocations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LowerAllocations.cpp; sourceTree = ""; }; @@ -172,7 +187,7 @@ CFA702CA0A6FA8910006009A /* IA64GenRegisterNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = IA64GenRegisterNames.inc; sourceTree = ""; }; CFA702CB0A6FA8AD0006009A /* PPCGenAsmWriter.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenAsmWriter.inc; sourceTree = ""; }; CFA702CC0A6FA8AD0006009A /* PPCGenCodeEmitter.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenCodeEmitter.inc; sourceTree = ""; }; - CFA702CD0A6FA8AD0006009A /* PPCGenDAGISel.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenDAGISel.inc; sourceTree = ""; }; + CFA702CD0A6FA8AD0006009A /* PPCGenDAGISel.inc */ = {isa = PBXFileReference; explicitFileType = sourcecode.pascal; fileEncoding = 4; path = PPCGenDAGISel.inc; sourceTree = ""; }; CFA702CE0A6FA8AD0006009A /* PPCGenInstrInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenInstrInfo.inc; sourceTree = ""; }; CFA702CF0A6FA8AD0006009A /* PPCGenInstrNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenInstrNames.inc; sourceTree = ""; }; CFA702D00A6FA8AD0006009A /* PPCGenRegisterInfo.h.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenRegisterInfo.h.inc; sourceTree = ""; }; @@ -188,6 +203,8 @@ CFA702DA0A6FA8DD0006009A /* X86GenRegisterInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = X86GenRegisterInfo.inc; sourceTree = ""; }; CFA702DB0A6FA8DD0006009A /* X86GenRegisterNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = X86GenRegisterNames.inc; sourceTree = ""; }; CFA702DC0A6FA8DD0006009A /* X86GenSubtarget.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = X86GenSubtarget.inc; sourceTree = ""; }; + CFAA44870AE3BE6C0064BC97 /* HereStringSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HereStringSupport.h; sourceTree = ""; }; + CFAA448A0AE3BE890064BC97 /* HereStringSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HereStringSupport.cpp; sourceTree = ""; }; CFBD8B1A090E76540020B107 /* AlphaISelDAGToDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaISelDAGToDAG.cpp; sourceTree = ""; }; CFBD8B1B090E76540020B107 /* AlphaISelLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaISelLowering.cpp; sourceTree = ""; }; CFBD8B1C090E76540020B107 /* AlphaISelLowering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlphaISelLowering.h; sourceTree = ""; }; @@ -201,6 +218,56 @@ CFC244C00959F2E3009F8C47 /* IA64ISelLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IA64ISelLowering.cpp; sourceTree = ""; }; CFC244C10959F2E3009F8C47 /* IA64ISelLowering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IA64ISelLowering.h; sourceTree = ""; }; CFD7E4F30A798FC3000C7379 /* LinkAllCodegenComponents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkAllCodegenComponents.h; sourceTree = ""; }; + CFD99A8B0AFE82160068D19C /* ARM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARM.h; path = ../lib/Target/ARM/ARM.h; sourceTree = SOURCE_ROOT; }; + CFD99A8C0AFE82160068D19C /* ARM.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = ARM.td; path = ../lib/Target/ARM/ARM.td; sourceTree = SOURCE_ROOT; }; + CFD99A8D0AFE82160068D19C /* ARMAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ARMAsmPrinter.cpp; path = ../lib/Target/ARM/ARMAsmPrinter.cpp; sourceTree = SOURCE_ROOT; }; + CFD99A8E0AFE82160068D19C /* ARMFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARMFrameInfo.h; path = ../lib/Target/ARM/ARMFrameInfo.h; sourceTree = SOURCE_ROOT; }; + CFD99A8F0AFE82160068D19C /* ARMGenAsmWriter.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = ARMGenAsmWriter.inc; path = ../lib/Target/ARM/ARMGenAsmWriter.inc; sourceTree = SOURCE_ROOT; }; + CFD99A900AFE82160068D19C /* ARMGenDAGISel.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = ARMGenDAGISel.inc; path = ../lib/Target/ARM/ARMGenDAGISel.inc; sourceTree = SOURCE_ROOT; }; + CFD99A910AFE82160068D19C /* ARMGenInstrInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = ARMGenInstrInfo.inc; path = ../lib/Target/ARM/ARMGenInstrInfo.inc; sourceTree = SOURCE_ROOT; }; + CFD99A920AFE82160068D19C /* ARMGenInstrNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = ARMGenInstrNames.inc; path = ../lib/Target/ARM/ARMGenInstrNames.inc; sourceTree = SOURCE_ROOT; }; + CFD99A930AFE82160068D19C /* ARMGenRegisterInfo.h.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = ARMGenRegisterInfo.h.inc; path = ../lib/Target/ARM/ARMGenRegisterInfo.h.inc; sourceTree = SOURCE_ROOT; }; + CFD99A940AFE82160068D19C /* ARMGenRegisterInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = ARMGenRegisterInfo.inc; path = ../lib/Target/ARM/ARMGenRegisterInfo.inc; sourceTree = SOURCE_ROOT; }; + CFD99A950AFE82160068D19C /* ARMGenRegisterNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = ARMGenRegisterNames.inc; path = ../lib/Target/ARM/ARMGenRegisterNames.inc; sourceTree = SOURCE_ROOT; }; + CFD99A960AFE82160068D19C /* ARMInstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ARMInstrInfo.cpp; path = ../lib/Target/ARM/ARMInstrInfo.cpp; sourceTree = SOURCE_ROOT; }; + CFD99A970AFE82160068D19C /* ARMInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARMInstrInfo.h; path = ../lib/Target/ARM/ARMInstrInfo.h; sourceTree = SOURCE_ROOT; }; + CFD99A980AFE82160068D19C /* ARMInstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = ARMInstrInfo.td; path = ../lib/Target/ARM/ARMInstrInfo.td; sourceTree = SOURCE_ROOT; }; + CFD99A990AFE82160068D19C /* ARMISelDAGToDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ARMISelDAGToDAG.cpp; path = ../lib/Target/ARM/ARMISelDAGToDAG.cpp; sourceTree = SOURCE_ROOT; }; + CFD99A9A0AFE82160068D19C /* ARMMul.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ARMMul.cpp; path = ../lib/Target/ARM/ARMMul.cpp; sourceTree = SOURCE_ROOT; }; + CFD99A9B0AFE82160068D19C /* ARMRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ARMRegisterInfo.cpp; path = ../lib/Target/ARM/ARMRegisterInfo.cpp; sourceTree = SOURCE_ROOT; }; + CFD99A9C0AFE82160068D19C /* ARMRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARMRegisterInfo.h; path = ../lib/Target/ARM/ARMRegisterInfo.h; sourceTree = SOURCE_ROOT; }; + CFD99A9D0AFE82160068D19C /* ARMRegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = ARMRegisterInfo.td; path = ../lib/Target/ARM/ARMRegisterInfo.td; sourceTree = SOURCE_ROOT; }; + CFD99A9E0AFE82160068D19C /* ARMTargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ARMTargetAsmInfo.cpp; path = ../lib/Target/ARM/ARMTargetAsmInfo.cpp; sourceTree = SOURCE_ROOT; }; + CFD99A9F0AFE82160068D19C /* ARMTargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARMTargetAsmInfo.h; path = ../lib/Target/ARM/ARMTargetAsmInfo.h; sourceTree = SOURCE_ROOT; }; + CFD99AA00AFE82160068D19C /* ARMTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ARMTargetMachine.cpp; path = ../lib/Target/ARM/ARMTargetMachine.cpp; sourceTree = SOURCE_ROOT; }; + CFD99AA10AFE82160068D19C /* ARMTargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARMTargetMachine.h; path = ../lib/Target/ARM/ARMTargetMachine.h; sourceTree = SOURCE_ROOT; }; + CFD99AA20AFE82160068D19C /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; name = Makefile; path = ../lib/Target/ARM/Makefile; sourceTree = SOURCE_ROOT; }; + CFD99AA30AFE82160068D19C /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.txt; path = ../lib/Target/ARM/README.txt; sourceTree = SOURCE_ROOT; }; + CFD99AA80AFE827B0068D19C /* LICENSE.TXT */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = LICENSE.TXT; path = ../LICENSE.TXT; sourceTree = SOURCE_ROOT; }; + CFD99AAD0AFE827B0068D19C /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.txt; path = ../README.txt; sourceTree = SOURCE_ROOT; }; + CFD99AB40AFE83910068D19C /* Allocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Allocator.h; sourceTree = ""; }; + CFD99AB50AFE83910068D19C /* Compiler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Compiler.h; sourceTree = ""; }; + CFD99AB60AFE83910068D19C /* ManagedStatic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ManagedStatic.h; sourceTree = ""; }; + CFD99AB70AFE848A0068D19C /* Allocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Allocator.cpp; sourceTree = ""; }; + CFD99AB80AFE848A0068D19C /* CStringMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CStringMap.cpp; sourceTree = ""; }; + CFD99AB90AFE848A0068D19C /* ManagedStatic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ManagedStatic.cpp; sourceTree = ""; }; + CFD99ABA0AFE84D70068D19C /* IncludeFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IncludeFile.cpp; sourceTree = ""; }; + CFD99ABB0AFE84EF0068D19C /* Alarm.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = Alarm.inc; sourceTree = ""; }; + CFD99ABC0AFE852E0068D19C /* AlphaBranchSelector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaBranchSelector.cpp; sourceTree = ""; }; + CFD99ABD0AFE852E0068D19C /* AlphaLLRP.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaLLRP.cpp; sourceTree = ""; }; + CFD99ABE0AFE857A0068D19C /* README-X86-64.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "README-X86-64.txt"; sourceTree = ""; }; + CFD99ABF0AFE857A0068D19C /* X86InstrX86-64.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "X86InstrX86-64.td"; sourceTree = ""; }; + CFD99AC00AFE860B0068D19C /* PredicateSimplifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PredicateSimplifier.cpp; sourceTree = ""; }; + CFD99AC10AFE87030068D19C /* llvm-stub.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "llvm-stub.c"; path = "llvm-stub/llvm-stub.c"; sourceTree = ""; }; + CFD99AC20AFE87260068D19C /* CppWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CppWriter.cpp; path = llvm2cpp/CppWriter.cpp; sourceTree = ""; }; + CFD99AC30AFE87260068D19C /* CppWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CppWriter.h; path = llvm2cpp/CppWriter.h; sourceTree = ""; }; + CFD99AC40AFE87260068D19C /* llvm2cpp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = llvm2cpp.cpp; path = llvm2cpp/llvm2cpp.cpp; sourceTree = ""; }; + CFD99ADA0AFE87650068D19C /* lto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = lto.cpp; path = lto/lto.cpp; sourceTree = ""; }; + CFD99ADB0AFE87870068D19C /* AnalysisWrappers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AnalysisWrappers.cpp; path = opt/AnalysisWrappers.cpp; sourceTree = ""; }; + CFD99ADC0AFE87870068D19C /* GraphPrinters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GraphPrinters.cpp; path = opt/GraphPrinters.cpp; sourceTree = ""; }; + CFD99ADD0AFE87870068D19C /* opt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = opt.cpp; path = opt/opt.cpp; sourceTree = ""; }; + CFD99ADE0AFE87870068D19C /* PrintSCC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PrintSCC.cpp; path = opt/PrintSCC.cpp; sourceTree = ""; }; + CFD99AE00AFE87DC0068D19C /* CodeGenIntrinsics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeGenIntrinsics.h; sourceTree = ""; }; CFE21C780A80CC0600D3E908 /* RegAllocRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegAllocRegistry.h; sourceTree = ""; }; CFE21C7B0A80CC1C00D3E908 /* SchedulerRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SchedulerRegistry.h; sourceTree = ""; }; CFE420FA0A66F67300AB4BF6 /* CallTargets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallTargets.h; sourceTree = ""; }; @@ -211,7 +278,6 @@ CFE420FF0A66F67300AB4BF6 /* IntrinsicsPowerPC.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IntrinsicsPowerPC.td; sourceTree = ""; }; CFE421000A66F67300AB4BF6 /* IntrinsicsX86.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IntrinsicsX86.td; sourceTree = ""; }; CFE421010A66F67300AB4BF6 /* LinkAllVMCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkAllVMCore.h; sourceTree = ""; }; - CFE421030A66F67300AB4BF6 /* Visibility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Visibility.h; sourceTree = ""; }; CFE421040A66F7AB00AB4BF6 /* ConstantRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConstantRange.cpp; sourceTree = ""; }; CFE421050A66F7D800AB4BF6 /* CallTargets.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CallTargets.cpp; sourceTree = ""; }; CFE421060A66F86D00AB4BF6 /* ScheduleDAGRRList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScheduleDAGRRList.cpp; sourceTree = ""; }; @@ -808,7 +874,6 @@ DE66F37108ABF14500323D32 /* cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = cpp; sourceTree = ""; }; DE66F37D08ABF14500323D32 /* ll */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ll; sourceTree = ""; }; DE66F37E08ABF14500323D32 /* llvmc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llvmc.cpp; sourceTree = ""; }; - DE66F38708ABF14500323D32 /* opt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = opt.cpp; path = opt/opt.cpp; sourceTree = ""; }; DE66F38C08ABF35300323D32 /* CREDITS.TXT */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = CREDITS.TXT; path = ../CREDITS.TXT; sourceTree = SOURCE_ROOT; }; DE66F38F08ABF35C00323D32 /* AliasAnalysis.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = AliasAnalysis.html; sourceTree = ""; }; DE66F39008ABF35C00323D32 /* Bugpoint.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = Bugpoint.html; sourceTree = ""; }; @@ -816,7 +881,6 @@ DE66F39208ABF35C00323D32 /* CFEBuildInstrs.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = CFEBuildInstrs.html; sourceTree = ""; }; DE66F39308ABF35C00323D32 /* CodeGenerator.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = CodeGenerator.html; sourceTree = ""; }; DE66F39408ABF35C00323D32 /* CodingStandards.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = CodingStandards.html; sourceTree = ""; }; - DE66F39708ABF35C00323D32 /* analyze.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = analyze.pod; sourceTree = ""; }; DE66F39808ABF35C00323D32 /* bugpoint.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = bugpoint.pod; sourceTree = ""; }; DE66F39908ABF35C00323D32 /* gccas.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = gccas.pod; sourceTree = ""; }; DE66F39A08ABF35C00323D32 /* gccld.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = gccld.pod; sourceTree = ""; }; @@ -884,7 +948,6 @@ DE694D9F08B51E0C0039C106 /* ScheduleDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ScheduleDAG.cpp; sourceTree = ""; }; DE81704008CFB44D0093BDEF /* fpcmp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = fpcmp.cpp; path = fpcmp/fpcmp.cpp; sourceTree = ""; }; DE81704F08CFB44D0093BDEF /* NightlyTest.gnuplot */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = NightlyTest.gnuplot; sourceTree = ""; }; - DE81705008CFB44D0093BDEF /* NightlyTest.pl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.perl; path = NightlyTest.pl; sourceTree = ""; }; DE81705108CFB44D0093BDEF /* NightlyTestTemplate.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = NightlyTestTemplate.html; sourceTree = ""; }; DE81705908CFB44D0093BDEF /* AsmWriterEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AsmWriterEmitter.cpp; sourceTree = ""; }; DE81705A08CFB44D0093BDEF /* AsmWriterEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AsmWriterEmitter.h; sourceTree = ""; }; @@ -932,30 +995,64 @@ DE66F38D08ABF35C00323D32 /* docs */, DE66F3FD08ABF37000323D32 /* examples */, DE66F38C08ABF35300323D32 /* CREDITS.TXT */, + CFD99AA80AFE827B0068D19C /* LICENSE.TXT */, + CFD99AAD0AFE827B0068D19C /* README.txt */, ); name = LLVM; sourceTree = ""; }; - CF9720380A9F3BBC002CEEDD /* ARM */ = { + CF065B2D0ABB318900555029 /* ARM */ = { isa = PBXGroup; children = ( - CF97203A0A9F3BBC002CEEDD /* ARM.h */, - CF97203B0A9F3BBC002CEEDD /* ARM.td */, - CF97203C0A9F3BBC002CEEDD /* ARMAsmPrinter.cpp */, - CF97203D0A9F3BBC002CEEDD /* ARMFrameInfo.h */, - CF9720450A9F3BBC002CEEDD /* ARMInstrInfo.cpp */, - CF9720460A9F3BBC002CEEDD /* ARMInstrInfo.h */, - CF9720470A9F3BBC002CEEDD /* ARMInstrInfo.td */, - CF9720480A9F3BBC002CEEDD /* ARMISelDAGToDAG.cpp */, - CF9720490A9F3BBC002CEEDD /* ARMRegisterInfo.cpp */, - CF97204A0A9F3BBC002CEEDD /* ARMRegisterInfo.h */, - CF97204B0A9F3BBC002CEEDD /* ARMRegisterInfo.td */, - CF341DC40AB07E6B0099B064 /* ARMTargetAsmInfo.cpp */, - CF341DC30AB07E6B0099B064 /* ARMTargetAsmInfo.h */, - CF97204C0A9F3BBC002CEEDD /* ARMTargetMachine.cpp */, - CF97204D0A9F3BBC002CEEDD /* ARMTargetMachine.h */, + CFD99A8B0AFE82160068D19C /* ARM.h */, + CFD99A8C0AFE82160068D19C /* ARM.td */, + CFD99A8D0AFE82160068D19C /* ARMAsmPrinter.cpp */, + CFD99A8E0AFE82160068D19C /* ARMFrameInfo.h */, + CFD99A8F0AFE82160068D19C /* ARMGenAsmWriter.inc */, + CFD99A900AFE82160068D19C /* ARMGenDAGISel.inc */, + CFD99A910AFE82160068D19C /* ARMGenInstrInfo.inc */, + CFD99A920AFE82160068D19C /* ARMGenInstrNames.inc */, + CFD99A930AFE82160068D19C /* ARMGenRegisterInfo.h.inc */, + CFD99A940AFE82160068D19C /* ARMGenRegisterInfo.inc */, + CFD99A950AFE82160068D19C /* ARMGenRegisterNames.inc */, + CFD99A960AFE82160068D19C /* ARMInstrInfo.cpp */, + CFD99A970AFE82160068D19C /* ARMInstrInfo.h */, + CFD99A980AFE82160068D19C /* ARMInstrInfo.td */, + CFD99A990AFE82160068D19C /* ARMISelDAGToDAG.cpp */, + CFD99A9A0AFE82160068D19C /* ARMMul.cpp */, + CFD99A9B0AFE82160068D19C /* ARMRegisterInfo.cpp */, + CFD99A9C0AFE82160068D19C /* ARMRegisterInfo.h */, + CFD99A9D0AFE82160068D19C /* ARMRegisterInfo.td */, + CFD99A9E0AFE82160068D19C /* ARMTargetAsmInfo.cpp */, + CFD99A9F0AFE82160068D19C /* ARMTargetAsmInfo.h */, + CFD99AA00AFE82160068D19C /* ARMTargetMachine.cpp */, + CFD99AA10AFE82160068D19C /* ARMTargetMachine.h */, + CFD99AA20AFE82160068D19C /* Makefile */, + CFD99AA30AFE82160068D19C /* README.txt */, + ); + name = ARM; + path = ARMV6; + sourceTree = ""; + }; + CFD99AC50AFE872B0068D19C /* llvm2cpp */ = { + isa = PBXGroup; + children = ( + CFD99AC20AFE87260068D19C /* CppWriter.cpp */, + CFD99AC30AFE87260068D19C /* CppWriter.h */, + CFD99AC40AFE87260068D19C /* llvm2cpp.cpp */, + ); + name = llvm2cpp; + sourceTree = ""; + }; + CFD99ADF0AFE878F0068D19C /* opt */ = { + isa = PBXGroup; + children = ( + CFD99ADB0AFE87870068D19C /* AnalysisWrappers.cpp */, + CFD99ADC0AFE87870068D19C /* GraphPrinters.cpp */, + CFD99ADD0AFE87870068D19C /* opt.cpp */, + CFD99ADE0AFE87870068D19C /* PrintSCC.cpp */, ); - path = ARM; + name = opt; sourceTree = ""; }; CFE4213C0A66FAE100AB4BF6 /* Hello */ = { @@ -1133,6 +1230,7 @@ DE66ED7108ABEC2B00323D32 /* LiveInterval.cpp */, DE66ED7308ABEC2B00323D32 /* LiveIntervalAnalysis.cpp */, DE66ED7508ABEC2B00323D32 /* LiveVariables.cpp */, + CF32AF5C0AEE6A4E00D24CD4 /* LLVMTargetMachine.cpp */, DE66ED7608ABEC2B00323D32 /* MachineBasicBlock.cpp */, CF6529A6095B21A8007F884E /* MachineDebugInfo.cpp */, DE66ED7808ABEC2B00323D32 /* MachineFunction.cpp */, @@ -1164,7 +1262,6 @@ CF7FFA200985081C008B0087 /* ScheduleDAGSimple.cpp */, DE694D9F08B51E0C0039C106 /* ScheduleDAG.cpp */, DE66ED9208ABEC2B00323D32 /* SelectionDAG.cpp */, - CF9720360A9F3B1C002CEEDD /* SelectionDAGCSEMap.cpp */, DE66ED9308ABEC2B00323D32 /* SelectionDAGISel.cpp */, DE66ED9408ABEC2B00323D32 /* SelectionDAGPrinter.cpp */, CFE421060A66F86D00AB4BF6 /* ScheduleDAGRRList.cpp */, @@ -1240,15 +1337,19 @@ isa = PBXGroup; children = ( DE66EDFD08ABEDE600323D32 /* bzip2 */, + CFD99AB70AFE848A0068D19C /* Allocator.cpp */, DE66EDFC08ABEDE600323D32 /* Annotation.cpp */, DE66EE1D08ABEDE600323D32 /* CommandLine.cpp */, DE66EE1E08ABEDE600323D32 /* Compressor.cpp */, + CFD99AB80AFE848A0068D19C /* CStringMap.cpp */, DE66EE3D08ABEDE600323D32 /* Debug.cpp */, CF79495D09B326D4005ADFCA /* Dwarf.cpp */, DE66EE3E08ABEDE600323D32 /* FileUtilities.cpp */, + CF42B6C40AF2512000D5D47C /* FoldingSet.cpp */, CFE421070A66F8DC00AB4BF6 /* GraphWriter.cpp */, DE66EE3F08ABEDE600323D32 /* IsInf.cpp */, DE66EE4008ABEDE600323D32 /* IsNAN.cpp */, + CFD99AB90AFE848A0068D19C /* ManagedStatic.cpp */, DE66EE4208ABEDE600323D32 /* PluginLoader.cpp */, DE66EE4308ABEDE600323D32 /* SlowOperationInformer.cpp */, DE66EE4408ABEDE600323D32 /* Statistic.cpp */, @@ -1289,6 +1390,7 @@ CFE421090A66F93300AB4BF6 /* Alarm.cpp */, DE66EE6008ABEE3400323D32 /* DynamicLibrary.cpp */, DE66EE6108ABEE3400323D32 /* LICENSE.TXT */, + CFD99ABA0AFE84D70068D19C /* IncludeFile.cpp */, DE66EE6208ABEE3400323D32 /* ltdl.c */, DE66EE6308ABEE3400323D32 /* ltdl.h */, DE66EE6508ABEE3400323D32 /* MappedFile.cpp */, @@ -1308,6 +1410,7 @@ DE66EE7E08ABEE3500323D32 /* Unix */ = { isa = PBXGroup; children = ( + CFD99ABB0AFE84EF0068D19C /* Alarm.inc */, DE66EE7F08ABEE3500323D32 /* MappedFile.inc */, DE66EE8008ABEE3500323D32 /* Memory.inc */, DE66EE8108ABEE3500323D32 /* Mutex.inc */, @@ -1352,10 +1455,9 @@ DE66EE9608ABEE5D00323D32 /* lib/Target */ = { isa = PBXGroup; children = ( - CF47BD860AAF487E00A8B13E /* TargetAsmInfo.cpp */, DE66EE9708ABEE5D00323D32 /* Alpha */, - CF9720380A9F3BBC002CEEDD /* ARM */, DE66EEC908ABEE5E00323D32 /* CBackend */, + CF065B2D0ABB318900555029 /* ARM */, DE66EEE508ABEE5E00323D32 /* IA64 */, DE66EF1108ABEE5E00323D32 /* PowerPC */, DE66EF7008ABEE5F00323D32 /* Sparc */, @@ -1363,6 +1465,7 @@ DE66EF1008ABEE5E00323D32 /* MRegisterInfo.cpp */, CF9BCD1508C75070001E7011 /* SubtargetFeature.cpp */, DE66F08A08ABEE6000323D32 /* Target.td */, + CF47BD860AAF487E00A8B13E /* TargetAsmInfo.cpp */, DE66F08B08ABEE6000323D32 /* TargetData.cpp */, DE66F08C08ABEE6000323D32 /* TargetFrameInfo.cpp */, DE66F08D08ABEE6000323D32 /* TargetInstrInfo.cpp */, @@ -1389,6 +1492,7 @@ CFA702C20A6FA85F0006009A /* AlphaGenRegisterNames.inc */, CFA702C30A6FA85F0006009A /* AlphaGenSubtarget.inc */, DE66EE9808ABEE5E00323D32 /* Alpha.h */, + CFD99ABC0AFE852E0068D19C /* AlphaBranchSelector.cpp */, CFBD8B1A090E76540020B107 /* AlphaISelDAGToDAG.cpp */, CFBD8B1B090E76540020B107 /* AlphaISelLowering.cpp */, CFBD8B1C090E76540020B107 /* AlphaISelLowering.h */, @@ -1403,6 +1507,7 @@ DE66EEA608ABEE5E00323D32 /* AlphaInstrInfo.td */, DE66EEA908ABEE5E00323D32 /* AlphaJITInfo.cpp */, DE66EEAA08ABEE5E00323D32 /* AlphaJITInfo.h */, + CFD99ABD0AFE852E0068D19C /* AlphaLLRP.cpp */, CFE4210B0A66F96400AB4BF6 /* AlphaSchedule.td */, DE66EEAB08ABEE5E00323D32 /* AlphaRegisterInfo.cpp */, DE66EEAC08ABEE5E00323D32 /* AlphaRegisterInfo.h */, @@ -1566,6 +1671,7 @@ CFA702DC0A6FA8DD0006009A /* X86GenSubtarget.inc */, CFE421380A66FA8000AB4BF6 /* README-FPStack.txt */, CFE421390A66FA8000AB4BF6 /* README-SSE.txt */, + CFD99ABE0AFE857A0068D19C /* README-X86-64.txt */, CFE4213A0A66FA8000AB4BF6 /* README.txt */, CFF0DE6309BF6C360031957F /* X86InstrFPStack.td */, CFF0DE6409BF6C360031957F /* X86InstrMMX.td */, @@ -1583,6 +1689,7 @@ DE66F0CD08ABEE6000323D32 /* X86InstrInfo.cpp */, DE66F0CE08ABEE6000323D32 /* X86InstrInfo.h */, DE66F0CF08ABEE6100323D32 /* X86InstrInfo.td */, + CFD99ABF0AFE857A0068D19C /* X86InstrX86-64.td */, DE66F0D008ABEE6100323D32 /* X86IntelAsmPrinter.cpp */, DE66F0D108ABEE6100323D32 /* X86IntelAsmPrinter.h */, DE66F0D508ABEE6100323D32 /* X86JITInfo.cpp */, @@ -1684,6 +1791,7 @@ DE66F1AA08ABEFB400323D32 /* LoopUnswitch.cpp */, DE66F1AD08ABEFB400323D32 /* LowerGC.cpp */, DE66F1AF08ABEFB400323D32 /* LowerPacked.cpp */, + CFD99AC00AFE860B0068D19C /* PredicateSimplifier.cpp */, DE66F1B508ABEFB400323D32 /* Reassociate.cpp */, CF73C0B9098A546000627152 /* Reg2Mem.cpp */, DE66F1B608ABEFB400323D32 /* ScalarReplAggregates.cpp */, @@ -1787,9 +1895,11 @@ isa = PBXGroup; children = ( DE66F1ED08ABF03100323D32 /* BitSetVector.h */, + CF33BE150AF62B4200E93805 /* CStringMap.h */, DE66F1EE08ABF03100323D32 /* DenseMap.h */, DE66F1EF08ABF03100323D32 /* DepthFirstIterator.h */, DE66F1F008ABF03100323D32 /* EquivalenceClasses.h */, + CF42B6BF0AF24F5300D5D47C /* FoldingSet.h */, DE66F1F108ABF03100323D32 /* GraphTraits.h */, DE66F1F308ABF03100323D32 /* hash_map.in */, DE66F1F508ABF03100323D32 /* hash_set.in */, @@ -1800,6 +1910,8 @@ DE66F1FB08ABF03100323D32 /* SCCIterator.h */, DE66F1FC08ABF03100323D32 /* SetOperations.h */, DE66F1FD08ABF03100323D32 /* SetVector.h */, + CF33BE160AF62B4200E93805 /* SmallString.h */, + CF71B60F0AC45EDA0007F57C /* SmallVector.h */, DE66F1FE08ABF03100323D32 /* Statistic.h */, DE66F1FF08ABF03100323D32 /* STLExtras.h */, DE66F20008ABF03100323D32 /* StringExtras.h */, @@ -1915,7 +2027,6 @@ CF7FFA2109850864008B0087 /* ScheduleDAG.h */, CFE21C7B0A80CC1C00D3E908 /* SchedulerRegistry.h */, DE66F24608ABF03100323D32 /* SelectionDAG.h */, - CF9720250A9F3969002CEEDD /* SelectionDAGCSEMap.h */, DE66F24708ABF03100323D32 /* SelectionDAGISel.h */, DE66F24808ABF03100323D32 /* SelectionDAGNodes.h */, DE66F24908ABF03100323D32 /* SSARegMap.h */, @@ -1963,11 +2074,13 @@ isa = PBXGroup; children = ( DE66F27008ABF03200323D32 /* AIXDataTypesFix.h */, + CFD99AB40AFE83910068D19C /* Allocator.h */, DE66F27108ABF03200323D32 /* Annotation.h */, DE66F27208ABF03200323D32 /* CallSite.h */, DE66F27308ABF03200323D32 /* Casting.h */, DE66F27408ABF03200323D32 /* CFG.h */, DE66F27508ABF03200323D32 /* CommandLine.h */, + CFD99AB50AFE83910068D19C /* Compiler.h */, DE66F27608ABF03200323D32 /* Compressor.h */, DE66F27708ABF03200323D32 /* ConstantRange.h */, CF73C0AD098A519400627152 /* DataTypes.h */, @@ -1983,6 +2096,7 @@ DE66F28108ABF03200323D32 /* InstIterator.h */, DE66F28208ABF03200323D32 /* InstVisitor.h */, DE66F28308ABF03200323D32 /* LeakDetector.h */, + CFD99AB60AFE83910068D19C /* ManagedStatic.h */, DE66F28408ABF03200323D32 /* Mangler.h */, DE66F28508ABF03200323D32 /* MathExtras.h */, DE66F28608ABF03200323D32 /* MutexGuard.h */, @@ -1995,7 +2109,6 @@ DE66F28E08ABF03200323D32 /* Timer.h */, DE66F29008ABF03200323D32 /* type_traits.h */, DE66F29108ABF03200323D32 /* TypeInfo.h */, - CFE421030A66F67300AB4BF6 /* Visibility.h */, ); path = Support; sourceTree = ""; @@ -2067,12 +2180,15 @@ DE66F2BD08ABF14400323D32 /* tools */ = { isa = PBXGroup; children = ( + CFD99ADF0AFE878F0068D19C /* opt */, DE66F2CB08ABF14400323D32 /* bugpoint */, DE66F2F008ABF14400323D32 /* gccld */, DE66F31E08ABF14400323D32 /* llvm-db */, DE66F33B08ABF14400323D32 /* llvm-ld */, DE66F36808ABF14500323D32 /* llvmc */, + CFD99AC50AFE872B0068D19C /* llvm2cpp */, DE66F2EE08ABF14400323D32 /* gccas.cpp */, + CFD99ADA0AFE87650068D19C /* lto.cpp */, DE66F30008ABF14400323D32 /* llc.cpp */, DE66F30708ABF14400323D32 /* lli.cpp */, DE66F30E08ABF14400323D32 /* llvm-ar.cpp */, @@ -2084,7 +2200,7 @@ DE66F35108ABF14400323D32 /* llvm-nm.cpp */, DE66F35808ABF14500323D32 /* llvm-prof.cpp */, DE66F35F08ABF14500323D32 /* llvm-ranlib.cpp */, - DE66F38708ABF14500323D32 /* opt.cpp */, + CFD99AC10AFE87030068D19C /* llvm-stub.c */, ); name = tools; path = ../tools; @@ -2207,7 +2323,6 @@ DE66F39508ABF35C00323D32 /* CommandGuide */ = { isa = PBXGroup; children = ( - DE66F39708ABF35C00323D32 /* analyze.pod */, DE66F39808ABF35C00323D32 /* bugpoint.pod */, DE66F39908ABF35C00323D32 /* gccas.pod */, DE66F39A08ABF35C00323D32 /* gccld.pod */, @@ -2267,7 +2382,6 @@ DE81705708CFB44D0093BDEF /* TableGen */, DE81704008CFB44D0093BDEF /* fpcmp.cpp */, DE81704F08CFB44D0093BDEF /* NightlyTest.gnuplot */, - DE81705008CFB44D0093BDEF /* NightlyTest.pl */, DE81705108CFB44D0093BDEF /* NightlyTestTemplate.html */, ); name = utils; @@ -2282,6 +2396,7 @@ DE81705B08CFB44D0093BDEF /* CodeEmitterGen.cpp */, DE81705C08CFB44D0093BDEF /* CodeEmitterGen.h */, DE81705D08CFB44D0093BDEF /* CodeGenInstruction.h */, + CFD99AE00AFE87DC0068D19C /* CodeGenIntrinsics.h */, DE81705E08CFB44D0093BDEF /* CodeGenRegisters.h */, DE81705F08CFB44D0093BDEF /* CodeGenTarget.cpp */, DE81706008CFB44D0093BDEF /* CodeGenTarget.h */, @@ -2289,6 +2404,8 @@ DE81706808CFB44D0093BDEF /* DAGISelEmitter.h */, DE81708408CFB44D0093BDEF /* FileLexer.l */, DE81708808CFB44D0093BDEF /* FileParser.y */, + CFAA448A0AE3BE890064BC97 /* HereStringSupport.cpp */, + CFAA44870AE3BE6C0064BC97 /* HereStringSupport.h */, CF9720970A9F3D4D002CEEDD /* IntrinsicEmitter.cpp */, CF9720980A9F3D4D002CEEDD /* IntrinsicEmitter.h */, DE81708908CFB44D0093BDEF /* InstrInfoEmitter.cpp */, @@ -2313,7 +2430,7 @@ /* Begin PBXLegacyTarget section */ CF0329B608D1BE110030FD33 /* LLVM lib */ = { isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j4 "; + buildArgumentsString = "$(ACTION) -j 2"; buildConfigurationList = CF0329B708D1BE530030FD33 /* Build configuration list for PBXLegacyTarget "LLVM lib" */; buildPhases = ( ); @@ -2327,7 +2444,7 @@ }; CF0329BB08D1BE5D0030FD33 /* LLVM llc */ = { isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j 4"; + buildArgumentsString = "$(ACTION) -j 2"; buildConfigurationList = CF0329C308D1BEC40030FD33 /* Build configuration list for PBXLegacyTarget "LLVM llc" */; buildPhases = ( ); @@ -2341,7 +2458,7 @@ }; CF490E830907CDAB0072DB1C /* LLVM TableGen */ = { isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j 4 "; + buildArgumentsString = "$(ACTION) -j 2"; buildConfigurationList = CF490E840907CDAB0072DB1C /* Build configuration list for PBXLegacyTarget "LLVM TableGen" */; buildPhases = ( ); @@ -2353,9 +2470,37 @@ passBuildSettingsInEnvironment = 0; productName = "LLVM llc"; }; + CFDF86BD0ADE819D00D40A3D /* LLVM lib release */ = { + isa = PBXLegacyTarget; + buildArgumentsString = "$(ACTION) -j 2 ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1"; + buildConfigurationList = CFDF86BE0ADE819D00D40A3D /* Build configuration list for PBXLegacyTarget "LLVM lib release" */; + buildPhases = ( + ); + buildToolPath = /usr/bin/make; + buildWorkingDirectory = "$(SRCROOT)/../lib"; + dependencies = ( + ); + name = "LLVM lib release"; + passBuildSettingsInEnvironment = 0; + productName = "LLVM lib"; + }; + CFDF86C60ADE81D000D40A3D /* LLVM llc release */ = { + isa = PBXLegacyTarget; + buildArgumentsString = "$(ACTION) -j 2 ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1"; + buildConfigurationList = CFDF86C70ADE81D000D40A3D /* Build configuration list for PBXLegacyTarget "LLVM llc release" */; + buildPhases = ( + ); + buildToolPath = /usr/bin/make; + buildWorkingDirectory = "$(SRCROOT)/../tools/llc"; + dependencies = ( + ); + name = "LLVM llc release"; + passBuildSettingsInEnvironment = 0; + productName = "LLVM llc"; + }; D28A88AD04BDD90700651E21 /* LLVM */ = { isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j 4 "; + buildArgumentsString = "$(ACTION) -j 2"; buildConfigurationList = DE66EC4C08ABE78900323D32 /* Build configuration list for PBXLegacyTarget "LLVM" */; buildPhases = ( ); @@ -2382,6 +2527,9 @@ CF0329BB08D1BE5D0030FD33 /* LLVM llc */, CF0329BC08D1BE8E0030FD33 /* LLVM full llc */, CF490E830907CDAB0072DB1C /* LLVM TableGen */, + CFDF86BD0ADE819D00D40A3D /* LLVM lib release */, + CFDF86C60ADE81D000D40A3D /* LLVM llc release */, + CFDF86D00ADE820000D40A3D /* LLVM full llc release */, ); }; /* End PBXProject section */ @@ -2397,6 +2545,16 @@ target = CF0329BB08D1BE5D0030FD33 /* LLVM llc */; targetProxy = CF0329BF08D1BE9B0030FD33 /* PBXContainerItemProxy */; }; + CFDF86DA0ADE822100D40A3D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = CFDF86BD0ADE819D00D40A3D /* LLVM lib release */; + targetProxy = CFDF86D90ADE822100D40A3D /* PBXContainerItemProxy */; + }; + CFDF86DC0ADE822100D40A3D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = CFDF86C60ADE81D000D40A3D /* LLVM llc release */; + targetProxy = CFDF86DB0ADE822100D40A3D /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ @@ -2620,6 +2778,171 @@ }; name = Default; }; + CFDF86BF0ADE819D00D40A3D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + OPTIMIZATION_CFLAGS = "-O0"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "LLVM lib"; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Debug; + }; + CFDF86C00ADE819D00D40A3D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + OPTIMIZATION_CFLAGS = "-O0"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "LLVM lib"; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Release; + }; + CFDF86C10ADE819D00D40A3D /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + OPTIMIZATION_CFLAGS = "-O0"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "LLVM lib"; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Default; + }; + CFDF86C80ADE81D000D40A3D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + OPTIMIZATION_CFLAGS = "-O0"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "LLVM llc"; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Debug; + }; + CFDF86C90ADE81D000D40A3D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + OPTIMIZATION_CFLAGS = "-O0"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "LLVM llc"; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Release; + }; + CFDF86CA0ADE81D000D40A3D /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + OPTIMIZATION_CFLAGS = "-O0"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "LLVM llc"; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Default; + }; + CFDF86D60ADE820000D40A3D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + OPTIMIZATION_CFLAGS = "-O0"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "LLVM full llc"; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Debug; + }; + CFDF86D70ADE820000D40A3D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + OPTIMIZATION_CFLAGS = "-O0"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "LLVM full llc"; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Release; + }; + CFDF86D80ADE820000D40A3D /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + OPTIMIZATION_CFLAGS = "-O0"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "LLVM full llc"; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Default; + }; DE66EC4D08ABE78900323D32 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -2720,6 +3043,36 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Default; }; + CFDF86BE0ADE819D00D40A3D /* Build configuration list for PBXLegacyTarget "LLVM lib release" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + CFDF86BF0ADE819D00D40A3D /* Debug */, + CFDF86C00ADE819D00D40A3D /* Release */, + CFDF86C10ADE819D00D40A3D /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; + CFDF86C70ADE81D000D40A3D /* Build configuration list for PBXLegacyTarget "LLVM llc release" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + CFDF86C80ADE81D000D40A3D /* Debug */, + CFDF86C90ADE81D000D40A3D /* Release */, + CFDF86CA0ADE81D000D40A3D /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; + CFDF86D50ADE820000D40A3D /* Build configuration list for PBXAggregateTarget "LLVM full llc release" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + CFDF86D60ADE820000D40A3D /* Debug */, + CFDF86D70ADE820000D40A3D /* Release */, + CFDF86D80ADE820000D40A3D /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; DE66EC4C08ABE78900323D32 /* Build configuration list for PBXLegacyTarget "LLVM" */ = { isa = XCConfigurationList; buildConfigurations = ( From jlaskey at apple.com Sun Nov 5 15:20:19 2006 From: jlaskey at apple.com (Jim Laskey) Date: Sun, 5 Nov 2006 15:20:19 -0600 Subject: [llvm-commits] CVS: llvm/Xcode/LLVM.xcodeproj/project.pbxproj Message-ID: <200611052120.kA5LKIgh012112@zion.cs.uiuc.edu> Changes in directory llvm/Xcode/LLVM.xcodeproj: project.pbxproj updated: 1.25 -> 1.26 --- Log message: Misfire. --- Diffs of the changes: (+51 -404) project.pbxproj | 455 ++++++-------------------------------------------------- 1 files changed, 51 insertions(+), 404 deletions(-) Index: llvm/Xcode/LLVM.xcodeproj/project.pbxproj diff -u llvm/Xcode/LLVM.xcodeproj/project.pbxproj:1.25 llvm/Xcode/LLVM.xcodeproj/project.pbxproj:1.26 --- llvm/Xcode/LLVM.xcodeproj/project.pbxproj:1.25 Sun Nov 5 15:00:54 2006 +++ llvm/Xcode/LLVM.xcodeproj/project.pbxproj Sun Nov 5 15:20:04 2006 @@ -19,18 +19,6 @@ name = "LLVM full llc"; productName = "LLVM full llc"; }; - CFDF86D00ADE820000D40A3D /* LLVM full llc release */ = { - isa = PBXAggregateTarget; - buildConfigurationList = CFDF86D50ADE820000D40A3D /* Build configuration list for PBXAggregateTarget "LLVM full llc release" */; - buildPhases = ( - ); - dependencies = ( - CFDF86DA0ADE822100D40A3D /* PBXTargetDependency */, - CFDF86DC0ADE822100D40A3D /* PBXTargetDependency */, - ); - name = "LLVM full llc release"; - productName = "LLVM full llc"; - }; /* End PBXAggregateTarget section */ /* Begin PBXContainerItemProxy section */ @@ -48,30 +36,15 @@ remoteGlobalIDString = CF0329BB08D1BE5D0030FD33; remoteInfo = "LLVM llc"; }; - CFDF86D90ADE822100D40A3D /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; - proxyType = 1; - remoteGlobalIDString = CFDF86BD0ADE819D00D40A3D; - remoteInfo = "LLVM lib release"; - }; - CFDF86DB0ADE822100D40A3D /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; - proxyType = 1; - remoteGlobalIDString = CFDF86C60ADE81D000D40A3D; - remoteInfo = "LLVM llc release"; - }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ CF1ACC9709C9DE4400D3C5EB /* IntrinsicInst.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IntrinsicInst.cpp; path = ../lib/VMCore/IntrinsicInst.cpp; sourceTree = ""; }; CF26835B09178F5500C5F253 /* TargetInstrItineraries.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetInstrItineraries.h; sourceTree = ""; }; - CF32AF5C0AEE6A4E00D24CD4 /* LLVMTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LLVMTargetMachine.cpp; sourceTree = ""; }; - CF33BE150AF62B4200E93805 /* CStringMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CStringMap.h; sourceTree = ""; }; - CF33BE160AF62B4200E93805 /* SmallString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmallString.h; sourceTree = ""; }; CF341DAD0AB07A8B0099B064 /* AlphaTargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlphaTargetAsmInfo.h; sourceTree = ""; }; CF341DAE0AB07A8B0099B064 /* AlphaTargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaTargetAsmInfo.cpp; sourceTree = ""; }; + CF341DC30AB07E6B0099B064 /* ARMTargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMTargetAsmInfo.h; sourceTree = ""; }; + CF341DC40AB07E6B0099B064 /* ARMTargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMTargetAsmInfo.cpp; sourceTree = ""; }; CF341DE80AB07F890099B064 /* IA64TargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IA64TargetAsmInfo.h; sourceTree = ""; }; CF341DE90AB07F890099B064 /* IA64TargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IA64TargetAsmInfo.cpp; sourceTree = ""; }; CF341E010AB080220099B064 /* PPCTargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCTargetAsmInfo.h; sourceTree = ""; }; @@ -80,8 +53,6 @@ CF341E230AB0814B0099B064 /* SparcTargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SparcTargetAsmInfo.cpp; sourceTree = ""; }; CF341E320AB082D60099B064 /* X86TargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = X86TargetAsmInfo.h; sourceTree = ""; }; CF341E330AB082D60099B064 /* X86TargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = X86TargetAsmInfo.cpp; sourceTree = ""; }; - CF42B6BF0AF24F5300D5D47C /* FoldingSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FoldingSet.h; sourceTree = ""; }; - CF42B6C40AF2512000D5D47C /* FoldingSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FoldingSet.cpp; sourceTree = ""; }; CF47BD380AAF40BC00A8B13E /* TargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetAsmInfo.h; sourceTree = ""; }; CF47BD860AAF487E00A8B13E /* TargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TargetAsmInfo.cpp; sourceTree = ""; }; CF490D14090541D30072DB1C /* TargetSchedule.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TargetSchedule.td; sourceTree = ""; }; @@ -122,7 +93,6 @@ CF6529A6095B21A8007F884E /* MachineDebugInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MachineDebugInfo.cpp; sourceTree = ""; }; CF6B5AFD095C82C300D1EA42 /* DAGCombiner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DAGCombiner.cpp; sourceTree = ""; }; CF6F487109505E1500BC9E82 /* MachineDebugInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachineDebugInfo.h; sourceTree = ""; }; - CF71B60F0AC45EDA0007F57C /* SmallVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmallVector.h; sourceTree = ""; }; CF73C0A2098A4FDF00627152 /* InlineAsm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InlineAsm.h; sourceTree = ""; }; CF73C0A3098A4FDF00627152 /* TypeSymbolTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypeSymbolTable.h; sourceTree = ""; }; CF73C0A4098A4FDF00627152 /* ValueSymbolTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ValueSymbolTable.h; sourceTree = ""; }; @@ -149,11 +119,26 @@ CF8D62FA09C2226F006017BA /* Intrinsics.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Intrinsics.td; sourceTree = ""; }; CF8E00490989162500DA2399 /* Dwarf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Dwarf.h; sourceTree = ""; }; CF9720240A9F3969002CEEDD /* MachOWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachOWriter.h; sourceTree = ""; }; + CF9720250A9F3969002CEEDD /* SelectionDAGCSEMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SelectionDAGCSEMap.h; sourceTree = ""; }; CF9720260A9F39B9002CEEDD /* LinkAllPasses.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkAllPasses.h; sourceTree = ""; }; CF9720270A9F39B9002CEEDD /* LinkTimeOptimizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkTimeOptimizer.h; sourceTree = ""; }; CF9720340A9F3A41002CEEDD /* IncludeFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IncludeFile.h; sourceTree = ""; }; CF9720350A9F3ADC002CEEDD /* MachOWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MachOWriter.cpp; sourceTree = ""; }; + CF9720360A9F3B1C002CEEDD /* SelectionDAGCSEMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SelectionDAGCSEMap.cpp; sourceTree = ""; }; CF9720370A9F3B1C002CEEDD /* TargetLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TargetLowering.cpp; sourceTree = ""; }; + CF97203A0A9F3BBC002CEEDD /* ARM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARM.h; sourceTree = ""; }; + CF97203B0A9F3BBC002CEEDD /* ARM.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ARM.td; sourceTree = ""; }; + CF97203C0A9F3BBC002CEEDD /* ARMAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMAsmPrinter.cpp; sourceTree = ""; }; + CF97203D0A9F3BBC002CEEDD /* ARMFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMFrameInfo.h; sourceTree = ""; }; + CF9720450A9F3BBC002CEEDD /* ARMInstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMInstrInfo.cpp; sourceTree = ""; }; + CF9720460A9F3BBC002CEEDD /* ARMInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMInstrInfo.h; sourceTree = ""; }; + CF9720470A9F3BBC002CEEDD /* ARMInstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ARMInstrInfo.td; sourceTree = ""; }; + CF9720480A9F3BBC002CEEDD /* ARMISelDAGToDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMISelDAGToDAG.cpp; sourceTree = ""; }; + CF9720490A9F3BBC002CEEDD /* ARMRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMRegisterInfo.cpp; sourceTree = ""; }; + CF97204A0A9F3BBC002CEEDD /* ARMRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMRegisterInfo.h; sourceTree = ""; }; + CF97204B0A9F3BBC002CEEDD /* ARMRegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ARMRegisterInfo.td; sourceTree = ""; }; + CF97204C0A9F3BBC002CEEDD /* ARMTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMTargetMachine.cpp; sourceTree = ""; }; + CF97204D0A9F3BBC002CEEDD /* ARMTargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMTargetMachine.h; sourceTree = ""; }; CF9720890A9F3C04002CEEDD /* PPCMachOWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCMachOWriter.cpp; sourceTree = ""; }; CF97208A0A9F3C6F002CEEDD /* LCSSA.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LCSSA.cpp; sourceTree = ""; }; CF97208B0A9F3C6F002CEEDD /* LowerAllocations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LowerAllocations.cpp; sourceTree = ""; }; @@ -187,7 +172,7 @@ CFA702CA0A6FA8910006009A /* IA64GenRegisterNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = IA64GenRegisterNames.inc; sourceTree = ""; }; CFA702CB0A6FA8AD0006009A /* PPCGenAsmWriter.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenAsmWriter.inc; sourceTree = ""; }; CFA702CC0A6FA8AD0006009A /* PPCGenCodeEmitter.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenCodeEmitter.inc; sourceTree = ""; }; - CFA702CD0A6FA8AD0006009A /* PPCGenDAGISel.inc */ = {isa = PBXFileReference; explicitFileType = sourcecode.pascal; fileEncoding = 4; path = PPCGenDAGISel.inc; sourceTree = ""; }; + CFA702CD0A6FA8AD0006009A /* PPCGenDAGISel.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenDAGISel.inc; sourceTree = ""; }; CFA702CE0A6FA8AD0006009A /* PPCGenInstrInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenInstrInfo.inc; sourceTree = ""; }; CFA702CF0A6FA8AD0006009A /* PPCGenInstrNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenInstrNames.inc; sourceTree = ""; }; CFA702D00A6FA8AD0006009A /* PPCGenRegisterInfo.h.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenRegisterInfo.h.inc; sourceTree = ""; }; @@ -203,8 +188,6 @@ CFA702DA0A6FA8DD0006009A /* X86GenRegisterInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = X86GenRegisterInfo.inc; sourceTree = ""; }; CFA702DB0A6FA8DD0006009A /* X86GenRegisterNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = X86GenRegisterNames.inc; sourceTree = ""; }; CFA702DC0A6FA8DD0006009A /* X86GenSubtarget.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = X86GenSubtarget.inc; sourceTree = ""; }; - CFAA44870AE3BE6C0064BC97 /* HereStringSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HereStringSupport.h; sourceTree = ""; }; - CFAA448A0AE3BE890064BC97 /* HereStringSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HereStringSupport.cpp; sourceTree = ""; }; CFBD8B1A090E76540020B107 /* AlphaISelDAGToDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaISelDAGToDAG.cpp; sourceTree = ""; }; CFBD8B1B090E76540020B107 /* AlphaISelLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaISelLowering.cpp; sourceTree = ""; }; CFBD8B1C090E76540020B107 /* AlphaISelLowering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlphaISelLowering.h; sourceTree = ""; }; @@ -218,56 +201,6 @@ CFC244C00959F2E3009F8C47 /* IA64ISelLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IA64ISelLowering.cpp; sourceTree = ""; }; CFC244C10959F2E3009F8C47 /* IA64ISelLowering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IA64ISelLowering.h; sourceTree = ""; }; CFD7E4F30A798FC3000C7379 /* LinkAllCodegenComponents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkAllCodegenComponents.h; sourceTree = ""; }; - CFD99A8B0AFE82160068D19C /* ARM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARM.h; path = ../lib/Target/ARM/ARM.h; sourceTree = SOURCE_ROOT; }; - CFD99A8C0AFE82160068D19C /* ARM.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = ARM.td; path = ../lib/Target/ARM/ARM.td; sourceTree = SOURCE_ROOT; }; - CFD99A8D0AFE82160068D19C /* ARMAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ARMAsmPrinter.cpp; path = ../lib/Target/ARM/ARMAsmPrinter.cpp; sourceTree = SOURCE_ROOT; }; - CFD99A8E0AFE82160068D19C /* ARMFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARMFrameInfo.h; path = ../lib/Target/ARM/ARMFrameInfo.h; sourceTree = SOURCE_ROOT; }; - CFD99A8F0AFE82160068D19C /* ARMGenAsmWriter.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = ARMGenAsmWriter.inc; path = ../lib/Target/ARM/ARMGenAsmWriter.inc; sourceTree = SOURCE_ROOT; }; - CFD99A900AFE82160068D19C /* ARMGenDAGISel.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = ARMGenDAGISel.inc; path = ../lib/Target/ARM/ARMGenDAGISel.inc; sourceTree = SOURCE_ROOT; }; - CFD99A910AFE82160068D19C /* ARMGenInstrInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = ARMGenInstrInfo.inc; path = ../lib/Target/ARM/ARMGenInstrInfo.inc; sourceTree = SOURCE_ROOT; }; - CFD99A920AFE82160068D19C /* ARMGenInstrNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = ARMGenInstrNames.inc; path = ../lib/Target/ARM/ARMGenInstrNames.inc; sourceTree = SOURCE_ROOT; }; - CFD99A930AFE82160068D19C /* ARMGenRegisterInfo.h.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = ARMGenRegisterInfo.h.inc; path = ../lib/Target/ARM/ARMGenRegisterInfo.h.inc; sourceTree = SOURCE_ROOT; }; - CFD99A940AFE82160068D19C /* ARMGenRegisterInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = ARMGenRegisterInfo.inc; path = ../lib/Target/ARM/ARMGenRegisterInfo.inc; sourceTree = SOURCE_ROOT; }; - CFD99A950AFE82160068D19C /* ARMGenRegisterNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = ARMGenRegisterNames.inc; path = ../lib/Target/ARM/ARMGenRegisterNames.inc; sourceTree = SOURCE_ROOT; }; - CFD99A960AFE82160068D19C /* ARMInstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ARMInstrInfo.cpp; path = ../lib/Target/ARM/ARMInstrInfo.cpp; sourceTree = SOURCE_ROOT; }; - CFD99A970AFE82160068D19C /* ARMInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARMInstrInfo.h; path = ../lib/Target/ARM/ARMInstrInfo.h; sourceTree = SOURCE_ROOT; }; - CFD99A980AFE82160068D19C /* ARMInstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = ARMInstrInfo.td; path = ../lib/Target/ARM/ARMInstrInfo.td; sourceTree = SOURCE_ROOT; }; - CFD99A990AFE82160068D19C /* ARMISelDAGToDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ARMISelDAGToDAG.cpp; path = ../lib/Target/ARM/ARMISelDAGToDAG.cpp; sourceTree = SOURCE_ROOT; }; - CFD99A9A0AFE82160068D19C /* ARMMul.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ARMMul.cpp; path = ../lib/Target/ARM/ARMMul.cpp; sourceTree = SOURCE_ROOT; }; - CFD99A9B0AFE82160068D19C /* ARMRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ARMRegisterInfo.cpp; path = ../lib/Target/ARM/ARMRegisterInfo.cpp; sourceTree = SOURCE_ROOT; }; - CFD99A9C0AFE82160068D19C /* ARMRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARMRegisterInfo.h; path = ../lib/Target/ARM/ARMRegisterInfo.h; sourceTree = SOURCE_ROOT; }; - CFD99A9D0AFE82160068D19C /* ARMRegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = ARMRegisterInfo.td; path = ../lib/Target/ARM/ARMRegisterInfo.td; sourceTree = SOURCE_ROOT; }; - CFD99A9E0AFE82160068D19C /* ARMTargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ARMTargetAsmInfo.cpp; path = ../lib/Target/ARM/ARMTargetAsmInfo.cpp; sourceTree = SOURCE_ROOT; }; - CFD99A9F0AFE82160068D19C /* ARMTargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARMTargetAsmInfo.h; path = ../lib/Target/ARM/ARMTargetAsmInfo.h; sourceTree = SOURCE_ROOT; }; - CFD99AA00AFE82160068D19C /* ARMTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ARMTargetMachine.cpp; path = ../lib/Target/ARM/ARMTargetMachine.cpp; sourceTree = SOURCE_ROOT; }; - CFD99AA10AFE82160068D19C /* ARMTargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARMTargetMachine.h; path = ../lib/Target/ARM/ARMTargetMachine.h; sourceTree = SOURCE_ROOT; }; - CFD99AA20AFE82160068D19C /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; name = Makefile; path = ../lib/Target/ARM/Makefile; sourceTree = SOURCE_ROOT; }; - CFD99AA30AFE82160068D19C /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.txt; path = ../lib/Target/ARM/README.txt; sourceTree = SOURCE_ROOT; }; - CFD99AA80AFE827B0068D19C /* LICENSE.TXT */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = LICENSE.TXT; path = ../LICENSE.TXT; sourceTree = SOURCE_ROOT; }; - CFD99AAD0AFE827B0068D19C /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.txt; path = ../README.txt; sourceTree = SOURCE_ROOT; }; - CFD99AB40AFE83910068D19C /* Allocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Allocator.h; sourceTree = ""; }; - CFD99AB50AFE83910068D19C /* Compiler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Compiler.h; sourceTree = ""; }; - CFD99AB60AFE83910068D19C /* ManagedStatic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ManagedStatic.h; sourceTree = ""; }; - CFD99AB70AFE848A0068D19C /* Allocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Allocator.cpp; sourceTree = ""; }; - CFD99AB80AFE848A0068D19C /* CStringMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CStringMap.cpp; sourceTree = ""; }; - CFD99AB90AFE848A0068D19C /* ManagedStatic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ManagedStatic.cpp; sourceTree = ""; }; - CFD99ABA0AFE84D70068D19C /* IncludeFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IncludeFile.cpp; sourceTree = ""; }; - CFD99ABB0AFE84EF0068D19C /* Alarm.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = Alarm.inc; sourceTree = ""; }; - CFD99ABC0AFE852E0068D19C /* AlphaBranchSelector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaBranchSelector.cpp; sourceTree = ""; }; - CFD99ABD0AFE852E0068D19C /* AlphaLLRP.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaLLRP.cpp; sourceTree = ""; }; - CFD99ABE0AFE857A0068D19C /* README-X86-64.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "README-X86-64.txt"; sourceTree = ""; }; - CFD99ABF0AFE857A0068D19C /* X86InstrX86-64.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "X86InstrX86-64.td"; sourceTree = ""; }; - CFD99AC00AFE860B0068D19C /* PredicateSimplifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PredicateSimplifier.cpp; sourceTree = ""; }; - CFD99AC10AFE87030068D19C /* llvm-stub.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "llvm-stub.c"; path = "llvm-stub/llvm-stub.c"; sourceTree = ""; }; - CFD99AC20AFE87260068D19C /* CppWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CppWriter.cpp; path = llvm2cpp/CppWriter.cpp; sourceTree = ""; }; - CFD99AC30AFE87260068D19C /* CppWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CppWriter.h; path = llvm2cpp/CppWriter.h; sourceTree = ""; }; - CFD99AC40AFE87260068D19C /* llvm2cpp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = llvm2cpp.cpp; path = llvm2cpp/llvm2cpp.cpp; sourceTree = ""; }; - CFD99ADA0AFE87650068D19C /* lto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = lto.cpp; path = lto/lto.cpp; sourceTree = ""; }; - CFD99ADB0AFE87870068D19C /* AnalysisWrappers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AnalysisWrappers.cpp; path = opt/AnalysisWrappers.cpp; sourceTree = ""; }; - CFD99ADC0AFE87870068D19C /* GraphPrinters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GraphPrinters.cpp; path = opt/GraphPrinters.cpp; sourceTree = ""; }; - CFD99ADD0AFE87870068D19C /* opt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = opt.cpp; path = opt/opt.cpp; sourceTree = ""; }; - CFD99ADE0AFE87870068D19C /* PrintSCC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PrintSCC.cpp; path = opt/PrintSCC.cpp; sourceTree = ""; }; - CFD99AE00AFE87DC0068D19C /* CodeGenIntrinsics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeGenIntrinsics.h; sourceTree = ""; }; CFE21C780A80CC0600D3E908 /* RegAllocRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegAllocRegistry.h; sourceTree = ""; }; CFE21C7B0A80CC1C00D3E908 /* SchedulerRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SchedulerRegistry.h; sourceTree = ""; }; CFE420FA0A66F67300AB4BF6 /* CallTargets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallTargets.h; sourceTree = ""; }; @@ -278,6 +211,7 @@ CFE420FF0A66F67300AB4BF6 /* IntrinsicsPowerPC.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IntrinsicsPowerPC.td; sourceTree = ""; }; CFE421000A66F67300AB4BF6 /* IntrinsicsX86.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IntrinsicsX86.td; sourceTree = ""; }; CFE421010A66F67300AB4BF6 /* LinkAllVMCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkAllVMCore.h; sourceTree = ""; }; + CFE421030A66F67300AB4BF6 /* Visibility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Visibility.h; sourceTree = ""; }; CFE421040A66F7AB00AB4BF6 /* ConstantRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConstantRange.cpp; sourceTree = ""; }; CFE421050A66F7D800AB4BF6 /* CallTargets.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CallTargets.cpp; sourceTree = ""; }; CFE421060A66F86D00AB4BF6 /* ScheduleDAGRRList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScheduleDAGRRList.cpp; sourceTree = ""; }; @@ -874,6 +808,7 @@ DE66F37108ABF14500323D32 /* cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = cpp; sourceTree = ""; }; DE66F37D08ABF14500323D32 /* ll */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ll; sourceTree = ""; }; DE66F37E08ABF14500323D32 /* llvmc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llvmc.cpp; sourceTree = ""; }; + DE66F38708ABF14500323D32 /* opt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = opt.cpp; path = opt/opt.cpp; sourceTree = ""; }; DE66F38C08ABF35300323D32 /* CREDITS.TXT */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = CREDITS.TXT; path = ../CREDITS.TXT; sourceTree = SOURCE_ROOT; }; DE66F38F08ABF35C00323D32 /* AliasAnalysis.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = AliasAnalysis.html; sourceTree = ""; }; DE66F39008ABF35C00323D32 /* Bugpoint.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = Bugpoint.html; sourceTree = ""; }; @@ -881,6 +816,7 @@ DE66F39208ABF35C00323D32 /* CFEBuildInstrs.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = CFEBuildInstrs.html; sourceTree = ""; }; DE66F39308ABF35C00323D32 /* CodeGenerator.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = CodeGenerator.html; sourceTree = ""; }; DE66F39408ABF35C00323D32 /* CodingStandards.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = CodingStandards.html; sourceTree = ""; }; + DE66F39708ABF35C00323D32 /* analyze.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = analyze.pod; sourceTree = ""; }; DE66F39808ABF35C00323D32 /* bugpoint.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = bugpoint.pod; sourceTree = ""; }; DE66F39908ABF35C00323D32 /* gccas.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = gccas.pod; sourceTree = ""; }; DE66F39A08ABF35C00323D32 /* gccld.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = gccld.pod; sourceTree = ""; }; @@ -948,6 +884,7 @@ DE694D9F08B51E0C0039C106 /* ScheduleDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ScheduleDAG.cpp; sourceTree = ""; }; DE81704008CFB44D0093BDEF /* fpcmp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = fpcmp.cpp; path = fpcmp/fpcmp.cpp; sourceTree = ""; }; DE81704F08CFB44D0093BDEF /* NightlyTest.gnuplot */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = NightlyTest.gnuplot; sourceTree = ""; }; + DE81705008CFB44D0093BDEF /* NightlyTest.pl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.perl; path = NightlyTest.pl; sourceTree = ""; }; DE81705108CFB44D0093BDEF /* NightlyTestTemplate.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = NightlyTestTemplate.html; sourceTree = ""; }; DE81705908CFB44D0093BDEF /* AsmWriterEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AsmWriterEmitter.cpp; sourceTree = ""; }; DE81705A08CFB44D0093BDEF /* AsmWriterEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AsmWriterEmitter.h; sourceTree = ""; }; @@ -995,64 +932,30 @@ DE66F38D08ABF35C00323D32 /* docs */, DE66F3FD08ABF37000323D32 /* examples */, DE66F38C08ABF35300323D32 /* CREDITS.TXT */, - CFD99AA80AFE827B0068D19C /* LICENSE.TXT */, - CFD99AAD0AFE827B0068D19C /* README.txt */, ); name = LLVM; sourceTree = ""; }; - CF065B2D0ABB318900555029 /* ARM */ = { + CF9720380A9F3BBC002CEEDD /* ARM */ = { isa = PBXGroup; children = ( - CFD99A8B0AFE82160068D19C /* ARM.h */, - CFD99A8C0AFE82160068D19C /* ARM.td */, - CFD99A8D0AFE82160068D19C /* ARMAsmPrinter.cpp */, - CFD99A8E0AFE82160068D19C /* ARMFrameInfo.h */, - CFD99A8F0AFE82160068D19C /* ARMGenAsmWriter.inc */, - CFD99A900AFE82160068D19C /* ARMGenDAGISel.inc */, - CFD99A910AFE82160068D19C /* ARMGenInstrInfo.inc */, - CFD99A920AFE82160068D19C /* ARMGenInstrNames.inc */, - CFD99A930AFE82160068D19C /* ARMGenRegisterInfo.h.inc */, - CFD99A940AFE82160068D19C /* ARMGenRegisterInfo.inc */, - CFD99A950AFE82160068D19C /* ARMGenRegisterNames.inc */, - CFD99A960AFE82160068D19C /* ARMInstrInfo.cpp */, - CFD99A970AFE82160068D19C /* ARMInstrInfo.h */, - CFD99A980AFE82160068D19C /* ARMInstrInfo.td */, - CFD99A990AFE82160068D19C /* ARMISelDAGToDAG.cpp */, - CFD99A9A0AFE82160068D19C /* ARMMul.cpp */, - CFD99A9B0AFE82160068D19C /* ARMRegisterInfo.cpp */, - CFD99A9C0AFE82160068D19C /* ARMRegisterInfo.h */, - CFD99A9D0AFE82160068D19C /* ARMRegisterInfo.td */, - CFD99A9E0AFE82160068D19C /* ARMTargetAsmInfo.cpp */, - CFD99A9F0AFE82160068D19C /* ARMTargetAsmInfo.h */, - CFD99AA00AFE82160068D19C /* ARMTargetMachine.cpp */, - CFD99AA10AFE82160068D19C /* ARMTargetMachine.h */, - CFD99AA20AFE82160068D19C /* Makefile */, - CFD99AA30AFE82160068D19C /* README.txt */, - ); - name = ARM; - path = ARMV6; - sourceTree = ""; - }; - CFD99AC50AFE872B0068D19C /* llvm2cpp */ = { - isa = PBXGroup; - children = ( - CFD99AC20AFE87260068D19C /* CppWriter.cpp */, - CFD99AC30AFE87260068D19C /* CppWriter.h */, - CFD99AC40AFE87260068D19C /* llvm2cpp.cpp */, - ); - name = llvm2cpp; - sourceTree = ""; - }; - CFD99ADF0AFE878F0068D19C /* opt */ = { - isa = PBXGroup; - children = ( - CFD99ADB0AFE87870068D19C /* AnalysisWrappers.cpp */, - CFD99ADC0AFE87870068D19C /* GraphPrinters.cpp */, - CFD99ADD0AFE87870068D19C /* opt.cpp */, - CFD99ADE0AFE87870068D19C /* PrintSCC.cpp */, + CF97203A0A9F3BBC002CEEDD /* ARM.h */, + CF97203B0A9F3BBC002CEEDD /* ARM.td */, + CF97203C0A9F3BBC002CEEDD /* ARMAsmPrinter.cpp */, + CF97203D0A9F3BBC002CEEDD /* ARMFrameInfo.h */, + CF9720450A9F3BBC002CEEDD /* ARMInstrInfo.cpp */, + CF9720460A9F3BBC002CEEDD /* ARMInstrInfo.h */, + CF9720470A9F3BBC002CEEDD /* ARMInstrInfo.td */, + CF9720480A9F3BBC002CEEDD /* ARMISelDAGToDAG.cpp */, + CF9720490A9F3BBC002CEEDD /* ARMRegisterInfo.cpp */, + CF97204A0A9F3BBC002CEEDD /* ARMRegisterInfo.h */, + CF97204B0A9F3BBC002CEEDD /* ARMRegisterInfo.td */, + CF341DC40AB07E6B0099B064 /* ARMTargetAsmInfo.cpp */, + CF341DC30AB07E6B0099B064 /* ARMTargetAsmInfo.h */, + CF97204C0A9F3BBC002CEEDD /* ARMTargetMachine.cpp */, + CF97204D0A9F3BBC002CEEDD /* ARMTargetMachine.h */, ); - name = opt; + path = ARM; sourceTree = ""; }; CFE4213C0A66FAE100AB4BF6 /* Hello */ = { @@ -1230,7 +1133,6 @@ DE66ED7108ABEC2B00323D32 /* LiveInterval.cpp */, DE66ED7308ABEC2B00323D32 /* LiveIntervalAnalysis.cpp */, DE66ED7508ABEC2B00323D32 /* LiveVariables.cpp */, - CF32AF5C0AEE6A4E00D24CD4 /* LLVMTargetMachine.cpp */, DE66ED7608ABEC2B00323D32 /* MachineBasicBlock.cpp */, CF6529A6095B21A8007F884E /* MachineDebugInfo.cpp */, DE66ED7808ABEC2B00323D32 /* MachineFunction.cpp */, @@ -1262,6 +1164,7 @@ CF7FFA200985081C008B0087 /* ScheduleDAGSimple.cpp */, DE694D9F08B51E0C0039C106 /* ScheduleDAG.cpp */, DE66ED9208ABEC2B00323D32 /* SelectionDAG.cpp */, + CF9720360A9F3B1C002CEEDD /* SelectionDAGCSEMap.cpp */, DE66ED9308ABEC2B00323D32 /* SelectionDAGISel.cpp */, DE66ED9408ABEC2B00323D32 /* SelectionDAGPrinter.cpp */, CFE421060A66F86D00AB4BF6 /* ScheduleDAGRRList.cpp */, @@ -1337,19 +1240,15 @@ isa = PBXGroup; children = ( DE66EDFD08ABEDE600323D32 /* bzip2 */, - CFD99AB70AFE848A0068D19C /* Allocator.cpp */, DE66EDFC08ABEDE600323D32 /* Annotation.cpp */, DE66EE1D08ABEDE600323D32 /* CommandLine.cpp */, DE66EE1E08ABEDE600323D32 /* Compressor.cpp */, - CFD99AB80AFE848A0068D19C /* CStringMap.cpp */, DE66EE3D08ABEDE600323D32 /* Debug.cpp */, CF79495D09B326D4005ADFCA /* Dwarf.cpp */, DE66EE3E08ABEDE600323D32 /* FileUtilities.cpp */, - CF42B6C40AF2512000D5D47C /* FoldingSet.cpp */, CFE421070A66F8DC00AB4BF6 /* GraphWriter.cpp */, DE66EE3F08ABEDE600323D32 /* IsInf.cpp */, DE66EE4008ABEDE600323D32 /* IsNAN.cpp */, - CFD99AB90AFE848A0068D19C /* ManagedStatic.cpp */, DE66EE4208ABEDE600323D32 /* PluginLoader.cpp */, DE66EE4308ABEDE600323D32 /* SlowOperationInformer.cpp */, DE66EE4408ABEDE600323D32 /* Statistic.cpp */, @@ -1390,7 +1289,6 @@ CFE421090A66F93300AB4BF6 /* Alarm.cpp */, DE66EE6008ABEE3400323D32 /* DynamicLibrary.cpp */, DE66EE6108ABEE3400323D32 /* LICENSE.TXT */, - CFD99ABA0AFE84D70068D19C /* IncludeFile.cpp */, DE66EE6208ABEE3400323D32 /* ltdl.c */, DE66EE6308ABEE3400323D32 /* ltdl.h */, DE66EE6508ABEE3400323D32 /* MappedFile.cpp */, @@ -1410,7 +1308,6 @@ DE66EE7E08ABEE3500323D32 /* Unix */ = { isa = PBXGroup; children = ( - CFD99ABB0AFE84EF0068D19C /* Alarm.inc */, DE66EE7F08ABEE3500323D32 /* MappedFile.inc */, DE66EE8008ABEE3500323D32 /* Memory.inc */, DE66EE8108ABEE3500323D32 /* Mutex.inc */, @@ -1455,9 +1352,10 @@ DE66EE9608ABEE5D00323D32 /* lib/Target */ = { isa = PBXGroup; children = ( + CF47BD860AAF487E00A8B13E /* TargetAsmInfo.cpp */, DE66EE9708ABEE5D00323D32 /* Alpha */, + CF9720380A9F3BBC002CEEDD /* ARM */, DE66EEC908ABEE5E00323D32 /* CBackend */, - CF065B2D0ABB318900555029 /* ARM */, DE66EEE508ABEE5E00323D32 /* IA64 */, DE66EF1108ABEE5E00323D32 /* PowerPC */, DE66EF7008ABEE5F00323D32 /* Sparc */, @@ -1465,7 +1363,6 @@ DE66EF1008ABEE5E00323D32 /* MRegisterInfo.cpp */, CF9BCD1508C75070001E7011 /* SubtargetFeature.cpp */, DE66F08A08ABEE6000323D32 /* Target.td */, - CF47BD860AAF487E00A8B13E /* TargetAsmInfo.cpp */, DE66F08B08ABEE6000323D32 /* TargetData.cpp */, DE66F08C08ABEE6000323D32 /* TargetFrameInfo.cpp */, DE66F08D08ABEE6000323D32 /* TargetInstrInfo.cpp */, @@ -1492,7 +1389,6 @@ CFA702C20A6FA85F0006009A /* AlphaGenRegisterNames.inc */, CFA702C30A6FA85F0006009A /* AlphaGenSubtarget.inc */, DE66EE9808ABEE5E00323D32 /* Alpha.h */, - CFD99ABC0AFE852E0068D19C /* AlphaBranchSelector.cpp */, CFBD8B1A090E76540020B107 /* AlphaISelDAGToDAG.cpp */, CFBD8B1B090E76540020B107 /* AlphaISelLowering.cpp */, CFBD8B1C090E76540020B107 /* AlphaISelLowering.h */, @@ -1507,7 +1403,6 @@ DE66EEA608ABEE5E00323D32 /* AlphaInstrInfo.td */, DE66EEA908ABEE5E00323D32 /* AlphaJITInfo.cpp */, DE66EEAA08ABEE5E00323D32 /* AlphaJITInfo.h */, - CFD99ABD0AFE852E0068D19C /* AlphaLLRP.cpp */, CFE4210B0A66F96400AB4BF6 /* AlphaSchedule.td */, DE66EEAB08ABEE5E00323D32 /* AlphaRegisterInfo.cpp */, DE66EEAC08ABEE5E00323D32 /* AlphaRegisterInfo.h */, @@ -1671,7 +1566,6 @@ CFA702DC0A6FA8DD0006009A /* X86GenSubtarget.inc */, CFE421380A66FA8000AB4BF6 /* README-FPStack.txt */, CFE421390A66FA8000AB4BF6 /* README-SSE.txt */, - CFD99ABE0AFE857A0068D19C /* README-X86-64.txt */, CFE4213A0A66FA8000AB4BF6 /* README.txt */, CFF0DE6309BF6C360031957F /* X86InstrFPStack.td */, CFF0DE6409BF6C360031957F /* X86InstrMMX.td */, @@ -1689,7 +1583,6 @@ DE66F0CD08ABEE6000323D32 /* X86InstrInfo.cpp */, DE66F0CE08ABEE6000323D32 /* X86InstrInfo.h */, DE66F0CF08ABEE6100323D32 /* X86InstrInfo.td */, - CFD99ABF0AFE857A0068D19C /* X86InstrX86-64.td */, DE66F0D008ABEE6100323D32 /* X86IntelAsmPrinter.cpp */, DE66F0D108ABEE6100323D32 /* X86IntelAsmPrinter.h */, DE66F0D508ABEE6100323D32 /* X86JITInfo.cpp */, @@ -1791,7 +1684,6 @@ DE66F1AA08ABEFB400323D32 /* LoopUnswitch.cpp */, DE66F1AD08ABEFB400323D32 /* LowerGC.cpp */, DE66F1AF08ABEFB400323D32 /* LowerPacked.cpp */, - CFD99AC00AFE860B0068D19C /* PredicateSimplifier.cpp */, DE66F1B508ABEFB400323D32 /* Reassociate.cpp */, CF73C0B9098A546000627152 /* Reg2Mem.cpp */, DE66F1B608ABEFB400323D32 /* ScalarReplAggregates.cpp */, @@ -1895,11 +1787,9 @@ isa = PBXGroup; children = ( DE66F1ED08ABF03100323D32 /* BitSetVector.h */, - CF33BE150AF62B4200E93805 /* CStringMap.h */, DE66F1EE08ABF03100323D32 /* DenseMap.h */, DE66F1EF08ABF03100323D32 /* DepthFirstIterator.h */, DE66F1F008ABF03100323D32 /* EquivalenceClasses.h */, - CF42B6BF0AF24F5300D5D47C /* FoldingSet.h */, DE66F1F108ABF03100323D32 /* GraphTraits.h */, DE66F1F308ABF03100323D32 /* hash_map.in */, DE66F1F508ABF03100323D32 /* hash_set.in */, @@ -1910,8 +1800,6 @@ DE66F1FB08ABF03100323D32 /* SCCIterator.h */, DE66F1FC08ABF03100323D32 /* SetOperations.h */, DE66F1FD08ABF03100323D32 /* SetVector.h */, - CF33BE160AF62B4200E93805 /* SmallString.h */, - CF71B60F0AC45EDA0007F57C /* SmallVector.h */, DE66F1FE08ABF03100323D32 /* Statistic.h */, DE66F1FF08ABF03100323D32 /* STLExtras.h */, DE66F20008ABF03100323D32 /* StringExtras.h */, @@ -2027,6 +1915,7 @@ CF7FFA2109850864008B0087 /* ScheduleDAG.h */, CFE21C7B0A80CC1C00D3E908 /* SchedulerRegistry.h */, DE66F24608ABF03100323D32 /* SelectionDAG.h */, + CF9720250A9F3969002CEEDD /* SelectionDAGCSEMap.h */, DE66F24708ABF03100323D32 /* SelectionDAGISel.h */, DE66F24808ABF03100323D32 /* SelectionDAGNodes.h */, DE66F24908ABF03100323D32 /* SSARegMap.h */, @@ -2074,13 +1963,11 @@ isa = PBXGroup; children = ( DE66F27008ABF03200323D32 /* AIXDataTypesFix.h */, - CFD99AB40AFE83910068D19C /* Allocator.h */, DE66F27108ABF03200323D32 /* Annotation.h */, DE66F27208ABF03200323D32 /* CallSite.h */, DE66F27308ABF03200323D32 /* Casting.h */, DE66F27408ABF03200323D32 /* CFG.h */, DE66F27508ABF03200323D32 /* CommandLine.h */, - CFD99AB50AFE83910068D19C /* Compiler.h */, DE66F27608ABF03200323D32 /* Compressor.h */, DE66F27708ABF03200323D32 /* ConstantRange.h */, CF73C0AD098A519400627152 /* DataTypes.h */, @@ -2096,7 +1983,6 @@ DE66F28108ABF03200323D32 /* InstIterator.h */, DE66F28208ABF03200323D32 /* InstVisitor.h */, DE66F28308ABF03200323D32 /* LeakDetector.h */, - CFD99AB60AFE83910068D19C /* ManagedStatic.h */, DE66F28408ABF03200323D32 /* Mangler.h */, DE66F28508ABF03200323D32 /* MathExtras.h */, DE66F28608ABF03200323D32 /* MutexGuard.h */, @@ -2109,6 +1995,7 @@ DE66F28E08ABF03200323D32 /* Timer.h */, DE66F29008ABF03200323D32 /* type_traits.h */, DE66F29108ABF03200323D32 /* TypeInfo.h */, + CFE421030A66F67300AB4BF6 /* Visibility.h */, ); path = Support; sourceTree = ""; @@ -2180,15 +2067,12 @@ DE66F2BD08ABF14400323D32 /* tools */ = { isa = PBXGroup; children = ( - CFD99ADF0AFE878F0068D19C /* opt */, DE66F2CB08ABF14400323D32 /* bugpoint */, DE66F2F008ABF14400323D32 /* gccld */, DE66F31E08ABF14400323D32 /* llvm-db */, DE66F33B08ABF14400323D32 /* llvm-ld */, DE66F36808ABF14500323D32 /* llvmc */, - CFD99AC50AFE872B0068D19C /* llvm2cpp */, DE66F2EE08ABF14400323D32 /* gccas.cpp */, - CFD99ADA0AFE87650068D19C /* lto.cpp */, DE66F30008ABF14400323D32 /* llc.cpp */, DE66F30708ABF14400323D32 /* lli.cpp */, DE66F30E08ABF14400323D32 /* llvm-ar.cpp */, @@ -2200,7 +2084,7 @@ DE66F35108ABF14400323D32 /* llvm-nm.cpp */, DE66F35808ABF14500323D32 /* llvm-prof.cpp */, DE66F35F08ABF14500323D32 /* llvm-ranlib.cpp */, - CFD99AC10AFE87030068D19C /* llvm-stub.c */, + DE66F38708ABF14500323D32 /* opt.cpp */, ); name = tools; path = ../tools; @@ -2323,6 +2207,7 @@ DE66F39508ABF35C00323D32 /* CommandGuide */ = { isa = PBXGroup; children = ( + DE66F39708ABF35C00323D32 /* analyze.pod */, DE66F39808ABF35C00323D32 /* bugpoint.pod */, DE66F39908ABF35C00323D32 /* gccas.pod */, DE66F39A08ABF35C00323D32 /* gccld.pod */, @@ -2382,6 +2267,7 @@ DE81705708CFB44D0093BDEF /* TableGen */, DE81704008CFB44D0093BDEF /* fpcmp.cpp */, DE81704F08CFB44D0093BDEF /* NightlyTest.gnuplot */, + DE81705008CFB44D0093BDEF /* NightlyTest.pl */, DE81705108CFB44D0093BDEF /* NightlyTestTemplate.html */, ); name = utils; @@ -2396,7 +2282,6 @@ DE81705B08CFB44D0093BDEF /* CodeEmitterGen.cpp */, DE81705C08CFB44D0093BDEF /* CodeEmitterGen.h */, DE81705D08CFB44D0093BDEF /* CodeGenInstruction.h */, - CFD99AE00AFE87DC0068D19C /* CodeGenIntrinsics.h */, DE81705E08CFB44D0093BDEF /* CodeGenRegisters.h */, DE81705F08CFB44D0093BDEF /* CodeGenTarget.cpp */, DE81706008CFB44D0093BDEF /* CodeGenTarget.h */, @@ -2404,8 +2289,6 @@ DE81706808CFB44D0093BDEF /* DAGISelEmitter.h */, DE81708408CFB44D0093BDEF /* FileLexer.l */, DE81708808CFB44D0093BDEF /* FileParser.y */, - CFAA448A0AE3BE890064BC97 /* HereStringSupport.cpp */, - CFAA44870AE3BE6C0064BC97 /* HereStringSupport.h */, CF9720970A9F3D4D002CEEDD /* IntrinsicEmitter.cpp */, CF9720980A9F3D4D002CEEDD /* IntrinsicEmitter.h */, DE81708908CFB44D0093BDEF /* InstrInfoEmitter.cpp */, @@ -2430,7 +2313,7 @@ /* Begin PBXLegacyTarget section */ CF0329B608D1BE110030FD33 /* LLVM lib */ = { isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j 2"; + buildArgumentsString = "$(ACTION) -j4 "; buildConfigurationList = CF0329B708D1BE530030FD33 /* Build configuration list for PBXLegacyTarget "LLVM lib" */; buildPhases = ( ); @@ -2444,7 +2327,7 @@ }; CF0329BB08D1BE5D0030FD33 /* LLVM llc */ = { isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j 2"; + buildArgumentsString = "$(ACTION) -j 4"; buildConfigurationList = CF0329C308D1BEC40030FD33 /* Build configuration list for PBXLegacyTarget "LLVM llc" */; buildPhases = ( ); @@ -2458,7 +2341,7 @@ }; CF490E830907CDAB0072DB1C /* LLVM TableGen */ = { isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j 2"; + buildArgumentsString = "$(ACTION) -j 4 "; buildConfigurationList = CF490E840907CDAB0072DB1C /* Build configuration list for PBXLegacyTarget "LLVM TableGen" */; buildPhases = ( ); @@ -2470,37 +2353,9 @@ passBuildSettingsInEnvironment = 0; productName = "LLVM llc"; }; - CFDF86BD0ADE819D00D40A3D /* LLVM lib release */ = { - isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j 2 ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1"; - buildConfigurationList = CFDF86BE0ADE819D00D40A3D /* Build configuration list for PBXLegacyTarget "LLVM lib release" */; - buildPhases = ( - ); - buildToolPath = /usr/bin/make; - buildWorkingDirectory = "$(SRCROOT)/../lib"; - dependencies = ( - ); - name = "LLVM lib release"; - passBuildSettingsInEnvironment = 0; - productName = "LLVM lib"; - }; - CFDF86C60ADE81D000D40A3D /* LLVM llc release */ = { - isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j 2 ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1"; - buildConfigurationList = CFDF86C70ADE81D000D40A3D /* Build configuration list for PBXLegacyTarget "LLVM llc release" */; - buildPhases = ( - ); - buildToolPath = /usr/bin/make; - buildWorkingDirectory = "$(SRCROOT)/../tools/llc"; - dependencies = ( - ); - name = "LLVM llc release"; - passBuildSettingsInEnvironment = 0; - productName = "LLVM llc"; - }; D28A88AD04BDD90700651E21 /* LLVM */ = { isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j 2"; + buildArgumentsString = "$(ACTION) -j 4 "; buildConfigurationList = DE66EC4C08ABE78900323D32 /* Build configuration list for PBXLegacyTarget "LLVM" */; buildPhases = ( ); @@ -2527,9 +2382,6 @@ CF0329BB08D1BE5D0030FD33 /* LLVM llc */, CF0329BC08D1BE8E0030FD33 /* LLVM full llc */, CF490E830907CDAB0072DB1C /* LLVM TableGen */, - CFDF86BD0ADE819D00D40A3D /* LLVM lib release */, - CFDF86C60ADE81D000D40A3D /* LLVM llc release */, - CFDF86D00ADE820000D40A3D /* LLVM full llc release */, ); }; /* End PBXProject section */ @@ -2545,16 +2397,6 @@ target = CF0329BB08D1BE5D0030FD33 /* LLVM llc */; targetProxy = CF0329BF08D1BE9B0030FD33 /* PBXContainerItemProxy */; }; - CFDF86DA0ADE822100D40A3D /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = CFDF86BD0ADE819D00D40A3D /* LLVM lib release */; - targetProxy = CFDF86D90ADE822100D40A3D /* PBXContainerItemProxy */; - }; - CFDF86DC0ADE822100D40A3D /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = CFDF86C60ADE81D000D40A3D /* LLVM llc release */; - targetProxy = CFDF86DB0ADE822100D40A3D /* PBXContainerItemProxy */; - }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ @@ -2778,171 +2620,6 @@ }; name = Default; }; - CFDF86BF0ADE819D00D40A3D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM lib"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Debug; - }; - CFDF86C00ADE819D00D40A3D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM lib"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Release; - }; - CFDF86C10ADE819D00D40A3D /* Default */ = { - isa = XCBuildConfiguration; - buildSettings = { - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM lib"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Default; - }; - CFDF86C80ADE81D000D40A3D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Debug; - }; - CFDF86C90ADE81D000D40A3D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Release; - }; - CFDF86CA0ADE81D000D40A3D /* Default */ = { - isa = XCBuildConfiguration; - buildSettings = { - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Default; - }; - CFDF86D60ADE820000D40A3D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM full llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Debug; - }; - CFDF86D70ADE820000D40A3D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM full llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Release; - }; - CFDF86D80ADE820000D40A3D /* Default */ = { - isa = XCBuildConfiguration; - buildSettings = { - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM full llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Default; - }; DE66EC4D08ABE78900323D32 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -3043,36 +2720,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Default; }; - CFDF86BE0ADE819D00D40A3D /* Build configuration list for PBXLegacyTarget "LLVM lib release" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CFDF86BF0ADE819D00D40A3D /* Debug */, - CFDF86C00ADE819D00D40A3D /* Release */, - CFDF86C10ADE819D00D40A3D /* Default */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Default; - }; - CFDF86C70ADE81D000D40A3D /* Build configuration list for PBXLegacyTarget "LLVM llc release" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CFDF86C80ADE81D000D40A3D /* Debug */, - CFDF86C90ADE81D000D40A3D /* Release */, - CFDF86CA0ADE81D000D40A3D /* Default */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Default; - }; - CFDF86D50ADE820000D40A3D /* Build configuration list for PBXAggregateTarget "LLVM full llc release" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CFDF86D60ADE820000D40A3D /* Debug */, - CFDF86D70ADE820000D40A3D /* Release */, - CFDF86D80ADE820000D40A3D /* Default */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Default; - }; DE66EC4C08ABE78900323D32 /* Build configuration list for PBXLegacyTarget "LLVM" */ = { isa = XCConfigurationList; buildConfigurations = ( From jlaskey at apple.com Sun Nov 5 15:21:34 2006 From: jlaskey at apple.com (Jim Laskey) Date: Sun, 5 Nov 2006 15:21:34 -0600 Subject: [llvm-commits] CVS: llvm/Xcode/LLVM.xcodeproj/project.pbxproj Message-ID: <200611052121.kA5LLYV1012142@zion.cs.uiuc.edu> Changes in directory llvm/Xcode/LLVM.xcodeproj: project.pbxproj updated: 1.26 -> 1.27 --- Log message: Try again. --- Diffs of the changes: (+403 -50) project.pbxproj | 453 +++++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 403 insertions(+), 50 deletions(-) Index: llvm/Xcode/LLVM.xcodeproj/project.pbxproj diff -u llvm/Xcode/LLVM.xcodeproj/project.pbxproj:1.26 llvm/Xcode/LLVM.xcodeproj/project.pbxproj:1.27 --- llvm/Xcode/LLVM.xcodeproj/project.pbxproj:1.26 Sun Nov 5 15:20:04 2006 +++ llvm/Xcode/LLVM.xcodeproj/project.pbxproj Sun Nov 5 15:21:20 2006 @@ -19,6 +19,18 @@ name = "LLVM full llc"; productName = "LLVM full llc"; }; + CFDF86D00ADE820000D40A3D /* LLVM full llc release */ = { + isa = PBXAggregateTarget; + buildConfigurationList = CFDF86D50ADE820000D40A3D /* Build configuration list for PBXAggregateTarget "LLVM full llc release" */; + buildPhases = ( + ); + dependencies = ( + CFDF86DA0ADE822100D40A3D /* PBXTargetDependency */, + CFDF86DC0ADE822100D40A3D /* PBXTargetDependency */, + ); + name = "LLVM full llc release"; + productName = "LLVM full llc"; + }; /* End PBXAggregateTarget section */ /* Begin PBXContainerItemProxy section */ @@ -36,15 +48,30 @@ remoteGlobalIDString = CF0329BB08D1BE5D0030FD33; remoteInfo = "LLVM llc"; }; + CFDF86D90ADE822100D40A3D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = CFDF86BD0ADE819D00D40A3D; + remoteInfo = "LLVM lib release"; + }; + CFDF86DB0ADE822100D40A3D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = CFDF86C60ADE81D000D40A3D; + remoteInfo = "LLVM llc release"; + }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ CF1ACC9709C9DE4400D3C5EB /* IntrinsicInst.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IntrinsicInst.cpp; path = ../lib/VMCore/IntrinsicInst.cpp; sourceTree = ""; }; CF26835B09178F5500C5F253 /* TargetInstrItineraries.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetInstrItineraries.h; sourceTree = ""; }; + CF32AF5C0AEE6A4E00D24CD4 /* LLVMTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LLVMTargetMachine.cpp; sourceTree = ""; }; + CF33BE150AF62B4200E93805 /* CStringMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CStringMap.h; sourceTree = ""; }; + CF33BE160AF62B4200E93805 /* SmallString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmallString.h; sourceTree = ""; }; CF341DAD0AB07A8B0099B064 /* AlphaTargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlphaTargetAsmInfo.h; sourceTree = ""; }; CF341DAE0AB07A8B0099B064 /* AlphaTargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaTargetAsmInfo.cpp; sourceTree = ""; }; - CF341DC30AB07E6B0099B064 /* ARMTargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMTargetAsmInfo.h; sourceTree = ""; }; - CF341DC40AB07E6B0099B064 /* ARMTargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMTargetAsmInfo.cpp; sourceTree = ""; }; CF341DE80AB07F890099B064 /* IA64TargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IA64TargetAsmInfo.h; sourceTree = ""; }; CF341DE90AB07F890099B064 /* IA64TargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IA64TargetAsmInfo.cpp; sourceTree = ""; }; CF341E010AB080220099B064 /* PPCTargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCTargetAsmInfo.h; sourceTree = ""; }; @@ -53,6 +80,8 @@ CF341E230AB0814B0099B064 /* SparcTargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SparcTargetAsmInfo.cpp; sourceTree = ""; }; CF341E320AB082D60099B064 /* X86TargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = X86TargetAsmInfo.h; sourceTree = ""; }; CF341E330AB082D60099B064 /* X86TargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = X86TargetAsmInfo.cpp; sourceTree = ""; }; + CF42B6BF0AF24F5300D5D47C /* FoldingSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FoldingSet.h; sourceTree = ""; }; + CF42B6C40AF2512000D5D47C /* FoldingSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FoldingSet.cpp; sourceTree = ""; }; CF47BD380AAF40BC00A8B13E /* TargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetAsmInfo.h; sourceTree = ""; }; CF47BD860AAF487E00A8B13E /* TargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TargetAsmInfo.cpp; sourceTree = ""; }; CF490D14090541D30072DB1C /* TargetSchedule.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TargetSchedule.td; sourceTree = ""; }; @@ -93,6 +122,7 @@ CF6529A6095B21A8007F884E /* MachineDebugInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MachineDebugInfo.cpp; sourceTree = ""; }; CF6B5AFD095C82C300D1EA42 /* DAGCombiner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DAGCombiner.cpp; sourceTree = ""; }; CF6F487109505E1500BC9E82 /* MachineDebugInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachineDebugInfo.h; sourceTree = ""; }; + CF71B60F0AC45EDA0007F57C /* SmallVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmallVector.h; sourceTree = ""; }; CF73C0A2098A4FDF00627152 /* InlineAsm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InlineAsm.h; sourceTree = ""; }; CF73C0A3098A4FDF00627152 /* TypeSymbolTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypeSymbolTable.h; sourceTree = ""; }; CF73C0A4098A4FDF00627152 /* ValueSymbolTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ValueSymbolTable.h; sourceTree = ""; }; @@ -119,26 +149,11 @@ CF8D62FA09C2226F006017BA /* Intrinsics.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Intrinsics.td; sourceTree = ""; }; CF8E00490989162500DA2399 /* Dwarf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Dwarf.h; sourceTree = ""; }; CF9720240A9F3969002CEEDD /* MachOWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachOWriter.h; sourceTree = ""; }; - CF9720250A9F3969002CEEDD /* SelectionDAGCSEMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SelectionDAGCSEMap.h; sourceTree = ""; }; CF9720260A9F39B9002CEEDD /* LinkAllPasses.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkAllPasses.h; sourceTree = ""; }; CF9720270A9F39B9002CEEDD /* LinkTimeOptimizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkTimeOptimizer.h; sourceTree = ""; }; CF9720340A9F3A41002CEEDD /* IncludeFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IncludeFile.h; sourceTree = ""; }; CF9720350A9F3ADC002CEEDD /* MachOWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MachOWriter.cpp; sourceTree = ""; }; - CF9720360A9F3B1C002CEEDD /* SelectionDAGCSEMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SelectionDAGCSEMap.cpp; sourceTree = ""; }; CF9720370A9F3B1C002CEEDD /* TargetLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TargetLowering.cpp; sourceTree = ""; }; - CF97203A0A9F3BBC002CEEDD /* ARM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARM.h; sourceTree = ""; }; - CF97203B0A9F3BBC002CEEDD /* ARM.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ARM.td; sourceTree = ""; }; - CF97203C0A9F3BBC002CEEDD /* ARMAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMAsmPrinter.cpp; sourceTree = ""; }; - CF97203D0A9F3BBC002CEEDD /* ARMFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMFrameInfo.h; sourceTree = ""; }; - CF9720450A9F3BBC002CEEDD /* ARMInstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMInstrInfo.cpp; sourceTree = ""; }; - CF9720460A9F3BBC002CEEDD /* ARMInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMInstrInfo.h; sourceTree = ""; }; - CF9720470A9F3BBC002CEEDD /* ARMInstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ARMInstrInfo.td; sourceTree = ""; }; - CF9720480A9F3BBC002CEEDD /* ARMISelDAGToDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMISelDAGToDAG.cpp; sourceTree = ""; }; - CF9720490A9F3BBC002CEEDD /* ARMRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMRegisterInfo.cpp; sourceTree = ""; }; - CF97204A0A9F3BBC002CEEDD /* ARMRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMRegisterInfo.h; sourceTree = ""; }; - CF97204B0A9F3BBC002CEEDD /* ARMRegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ARMRegisterInfo.td; sourceTree = ""; }; - CF97204C0A9F3BBC002CEEDD /* ARMTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMTargetMachine.cpp; sourceTree = ""; }; - CF97204D0A9F3BBC002CEEDD /* ARMTargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMTargetMachine.h; sourceTree = ""; }; CF9720890A9F3C04002CEEDD /* PPCMachOWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCMachOWriter.cpp; sourceTree = ""; }; CF97208A0A9F3C6F002CEEDD /* LCSSA.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LCSSA.cpp; sourceTree = ""; }; CF97208B0A9F3C6F002CEEDD /* LowerAllocations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LowerAllocations.cpp; sourceTree = ""; }; @@ -172,7 +187,7 @@ CFA702CA0A6FA8910006009A /* IA64GenRegisterNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = IA64GenRegisterNames.inc; sourceTree = ""; }; CFA702CB0A6FA8AD0006009A /* PPCGenAsmWriter.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenAsmWriter.inc; sourceTree = ""; }; CFA702CC0A6FA8AD0006009A /* PPCGenCodeEmitter.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenCodeEmitter.inc; sourceTree = ""; }; - CFA702CD0A6FA8AD0006009A /* PPCGenDAGISel.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenDAGISel.inc; sourceTree = ""; }; + CFA702CD0A6FA8AD0006009A /* PPCGenDAGISel.inc */ = {isa = PBXFileReference; explicitFileType = sourcecode.pascal; fileEncoding = 4; path = PPCGenDAGISel.inc; sourceTree = ""; }; CFA702CE0A6FA8AD0006009A /* PPCGenInstrInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenInstrInfo.inc; sourceTree = ""; }; CFA702CF0A6FA8AD0006009A /* PPCGenInstrNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenInstrNames.inc; sourceTree = ""; }; CFA702D00A6FA8AD0006009A /* PPCGenRegisterInfo.h.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenRegisterInfo.h.inc; sourceTree = ""; }; @@ -188,6 +203,8 @@ CFA702DA0A6FA8DD0006009A /* X86GenRegisterInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = X86GenRegisterInfo.inc; sourceTree = ""; }; CFA702DB0A6FA8DD0006009A /* X86GenRegisterNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = X86GenRegisterNames.inc; sourceTree = ""; }; CFA702DC0A6FA8DD0006009A /* X86GenSubtarget.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = X86GenSubtarget.inc; sourceTree = ""; }; + CFAA44870AE3BE6C0064BC97 /* HereStringSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HereStringSupport.h; sourceTree = ""; }; + CFAA448A0AE3BE890064BC97 /* HereStringSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HereStringSupport.cpp; sourceTree = ""; }; CFBD8B1A090E76540020B107 /* AlphaISelDAGToDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaISelDAGToDAG.cpp; sourceTree = ""; }; CFBD8B1B090E76540020B107 /* AlphaISelLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaISelLowering.cpp; sourceTree = ""; }; CFBD8B1C090E76540020B107 /* AlphaISelLowering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlphaISelLowering.h; sourceTree = ""; }; @@ -201,6 +218,56 @@ CFC244C00959F2E3009F8C47 /* IA64ISelLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IA64ISelLowering.cpp; sourceTree = ""; }; CFC244C10959F2E3009F8C47 /* IA64ISelLowering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IA64ISelLowering.h; sourceTree = ""; }; CFD7E4F30A798FC3000C7379 /* LinkAllCodegenComponents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkAllCodegenComponents.h; sourceTree = ""; }; + CFD99A8B0AFE82160068D19C /* ARM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARM.h; path = ../lib/Target/ARM/ARM.h; sourceTree = SOURCE_ROOT; }; + CFD99A8C0AFE82160068D19C /* ARM.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = ARM.td; path = ../lib/Target/ARM/ARM.td; sourceTree = SOURCE_ROOT; }; + CFD99A8D0AFE82160068D19C /* ARMAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ARMAsmPrinter.cpp; path = ../lib/Target/ARM/ARMAsmPrinter.cpp; sourceTree = SOURCE_ROOT; }; + CFD99A8E0AFE82160068D19C /* ARMFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARMFrameInfo.h; path = ../lib/Target/ARM/ARMFrameInfo.h; sourceTree = SOURCE_ROOT; }; + CFD99A8F0AFE82160068D19C /* ARMGenAsmWriter.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = ARMGenAsmWriter.inc; path = ../lib/Target/ARM/ARMGenAsmWriter.inc; sourceTree = SOURCE_ROOT; }; + CFD99A900AFE82160068D19C /* ARMGenDAGISel.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = ARMGenDAGISel.inc; path = ../lib/Target/ARM/ARMGenDAGISel.inc; sourceTree = SOURCE_ROOT; }; + CFD99A910AFE82160068D19C /* ARMGenInstrInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = ARMGenInstrInfo.inc; path = ../lib/Target/ARM/ARMGenInstrInfo.inc; sourceTree = SOURCE_ROOT; }; + CFD99A920AFE82160068D19C /* ARMGenInstrNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = ARMGenInstrNames.inc; path = ../lib/Target/ARM/ARMGenInstrNames.inc; sourceTree = SOURCE_ROOT; }; + CFD99A930AFE82160068D19C /* ARMGenRegisterInfo.h.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = ARMGenRegisterInfo.h.inc; path = ../lib/Target/ARM/ARMGenRegisterInfo.h.inc; sourceTree = SOURCE_ROOT; }; + CFD99A940AFE82160068D19C /* ARMGenRegisterInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = ARMGenRegisterInfo.inc; path = ../lib/Target/ARM/ARMGenRegisterInfo.inc; sourceTree = SOURCE_ROOT; }; + CFD99A950AFE82160068D19C /* ARMGenRegisterNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = ARMGenRegisterNames.inc; path = ../lib/Target/ARM/ARMGenRegisterNames.inc; sourceTree = SOURCE_ROOT; }; + CFD99A960AFE82160068D19C /* ARMInstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ARMInstrInfo.cpp; path = ../lib/Target/ARM/ARMInstrInfo.cpp; sourceTree = SOURCE_ROOT; }; + CFD99A970AFE82160068D19C /* ARMInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARMInstrInfo.h; path = ../lib/Target/ARM/ARMInstrInfo.h; sourceTree = SOURCE_ROOT; }; + CFD99A980AFE82160068D19C /* ARMInstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = ARMInstrInfo.td; path = ../lib/Target/ARM/ARMInstrInfo.td; sourceTree = SOURCE_ROOT; }; + CFD99A990AFE82160068D19C /* ARMISelDAGToDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ARMISelDAGToDAG.cpp; path = ../lib/Target/ARM/ARMISelDAGToDAG.cpp; sourceTree = SOURCE_ROOT; }; + CFD99A9A0AFE82160068D19C /* ARMMul.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ARMMul.cpp; path = ../lib/Target/ARM/ARMMul.cpp; sourceTree = SOURCE_ROOT; }; + CFD99A9B0AFE82160068D19C /* ARMRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ARMRegisterInfo.cpp; path = ../lib/Target/ARM/ARMRegisterInfo.cpp; sourceTree = SOURCE_ROOT; }; + CFD99A9C0AFE82160068D19C /* ARMRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARMRegisterInfo.h; path = ../lib/Target/ARM/ARMRegisterInfo.h; sourceTree = SOURCE_ROOT; }; + CFD99A9D0AFE82160068D19C /* ARMRegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = ARMRegisterInfo.td; path = ../lib/Target/ARM/ARMRegisterInfo.td; sourceTree = SOURCE_ROOT; }; + CFD99A9E0AFE82160068D19C /* ARMTargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ARMTargetAsmInfo.cpp; path = ../lib/Target/ARM/ARMTargetAsmInfo.cpp; sourceTree = SOURCE_ROOT; }; + CFD99A9F0AFE82160068D19C /* ARMTargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARMTargetAsmInfo.h; path = ../lib/Target/ARM/ARMTargetAsmInfo.h; sourceTree = SOURCE_ROOT; }; + CFD99AA00AFE82160068D19C /* ARMTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ARMTargetMachine.cpp; path = ../lib/Target/ARM/ARMTargetMachine.cpp; sourceTree = SOURCE_ROOT; }; + CFD99AA10AFE82160068D19C /* ARMTargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARMTargetMachine.h; path = ../lib/Target/ARM/ARMTargetMachine.h; sourceTree = SOURCE_ROOT; }; + CFD99AA20AFE82160068D19C /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; name = Makefile; path = ../lib/Target/ARM/Makefile; sourceTree = SOURCE_ROOT; }; + CFD99AA30AFE82160068D19C /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.txt; path = ../lib/Target/ARM/README.txt; sourceTree = SOURCE_ROOT; }; + CFD99AA80AFE827B0068D19C /* LICENSE.TXT */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = LICENSE.TXT; path = ../LICENSE.TXT; sourceTree = SOURCE_ROOT; }; + CFD99AAD0AFE827B0068D19C /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.txt; path = ../README.txt; sourceTree = SOURCE_ROOT; }; + CFD99AB40AFE83910068D19C /* Allocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Allocator.h; sourceTree = ""; }; + CFD99AB50AFE83910068D19C /* Compiler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Compiler.h; sourceTree = ""; }; + CFD99AB60AFE83910068D19C /* ManagedStatic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ManagedStatic.h; sourceTree = ""; }; + CFD99AB70AFE848A0068D19C /* Allocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Allocator.cpp; sourceTree = ""; }; + CFD99AB80AFE848A0068D19C /* CStringMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CStringMap.cpp; sourceTree = ""; }; + CFD99AB90AFE848A0068D19C /* ManagedStatic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ManagedStatic.cpp; sourceTree = ""; }; + CFD99ABA0AFE84D70068D19C /* IncludeFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IncludeFile.cpp; sourceTree = ""; }; + CFD99ABB0AFE84EF0068D19C /* Alarm.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = Alarm.inc; sourceTree = ""; }; + CFD99ABC0AFE852E0068D19C /* AlphaBranchSelector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaBranchSelector.cpp; sourceTree = ""; }; + CFD99ABD0AFE852E0068D19C /* AlphaLLRP.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaLLRP.cpp; sourceTree = ""; }; + CFD99ABE0AFE857A0068D19C /* README-X86-64.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "README-X86-64.txt"; sourceTree = ""; }; + CFD99ABF0AFE857A0068D19C /* X86InstrX86-64.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "X86InstrX86-64.td"; sourceTree = ""; }; + CFD99AC00AFE860B0068D19C /* PredicateSimplifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PredicateSimplifier.cpp; sourceTree = ""; }; + CFD99AC10AFE87030068D19C /* llvm-stub.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "llvm-stub.c"; path = "llvm-stub/llvm-stub.c"; sourceTree = ""; }; + CFD99AC20AFE87260068D19C /* CppWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CppWriter.cpp; path = llvm2cpp/CppWriter.cpp; sourceTree = ""; }; + CFD99AC30AFE87260068D19C /* CppWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CppWriter.h; path = llvm2cpp/CppWriter.h; sourceTree = ""; }; + CFD99AC40AFE87260068D19C /* llvm2cpp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = llvm2cpp.cpp; path = llvm2cpp/llvm2cpp.cpp; sourceTree = ""; }; + CFD99ADA0AFE87650068D19C /* lto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = lto.cpp; path = lto/lto.cpp; sourceTree = ""; }; + CFD99ADB0AFE87870068D19C /* AnalysisWrappers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AnalysisWrappers.cpp; path = opt/AnalysisWrappers.cpp; sourceTree = ""; }; + CFD99ADC0AFE87870068D19C /* GraphPrinters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GraphPrinters.cpp; path = opt/GraphPrinters.cpp; sourceTree = ""; }; + CFD99ADD0AFE87870068D19C /* opt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = opt.cpp; path = opt/opt.cpp; sourceTree = ""; }; + CFD99ADE0AFE87870068D19C /* PrintSCC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PrintSCC.cpp; path = opt/PrintSCC.cpp; sourceTree = ""; }; + CFD99AE00AFE87DC0068D19C /* CodeGenIntrinsics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeGenIntrinsics.h; sourceTree = ""; }; CFE21C780A80CC0600D3E908 /* RegAllocRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegAllocRegistry.h; sourceTree = ""; }; CFE21C7B0A80CC1C00D3E908 /* SchedulerRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SchedulerRegistry.h; sourceTree = ""; }; CFE420FA0A66F67300AB4BF6 /* CallTargets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallTargets.h; sourceTree = ""; }; @@ -211,7 +278,6 @@ CFE420FF0A66F67300AB4BF6 /* IntrinsicsPowerPC.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IntrinsicsPowerPC.td; sourceTree = ""; }; CFE421000A66F67300AB4BF6 /* IntrinsicsX86.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IntrinsicsX86.td; sourceTree = ""; }; CFE421010A66F67300AB4BF6 /* LinkAllVMCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkAllVMCore.h; sourceTree = ""; }; - CFE421030A66F67300AB4BF6 /* Visibility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Visibility.h; sourceTree = ""; }; CFE421040A66F7AB00AB4BF6 /* ConstantRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConstantRange.cpp; sourceTree = ""; }; CFE421050A66F7D800AB4BF6 /* CallTargets.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CallTargets.cpp; sourceTree = ""; }; CFE421060A66F86D00AB4BF6 /* ScheduleDAGRRList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScheduleDAGRRList.cpp; sourceTree = ""; }; @@ -808,7 +874,6 @@ DE66F37108ABF14500323D32 /* cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = cpp; sourceTree = ""; }; DE66F37D08ABF14500323D32 /* ll */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ll; sourceTree = ""; }; DE66F37E08ABF14500323D32 /* llvmc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llvmc.cpp; sourceTree = ""; }; - DE66F38708ABF14500323D32 /* opt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = opt.cpp; path = opt/opt.cpp; sourceTree = ""; }; DE66F38C08ABF35300323D32 /* CREDITS.TXT */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = CREDITS.TXT; path = ../CREDITS.TXT; sourceTree = SOURCE_ROOT; }; DE66F38F08ABF35C00323D32 /* AliasAnalysis.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = AliasAnalysis.html; sourceTree = ""; }; DE66F39008ABF35C00323D32 /* Bugpoint.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = Bugpoint.html; sourceTree = ""; }; @@ -816,7 +881,6 @@ DE66F39208ABF35C00323D32 /* CFEBuildInstrs.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = CFEBuildInstrs.html; sourceTree = ""; }; DE66F39308ABF35C00323D32 /* CodeGenerator.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = CodeGenerator.html; sourceTree = ""; }; DE66F39408ABF35C00323D32 /* CodingStandards.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = CodingStandards.html; sourceTree = ""; }; - DE66F39708ABF35C00323D32 /* analyze.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = analyze.pod; sourceTree = ""; }; DE66F39808ABF35C00323D32 /* bugpoint.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = bugpoint.pod; sourceTree = ""; }; DE66F39908ABF35C00323D32 /* gccas.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = gccas.pod; sourceTree = ""; }; DE66F39A08ABF35C00323D32 /* gccld.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = gccld.pod; sourceTree = ""; }; @@ -884,7 +948,6 @@ DE694D9F08B51E0C0039C106 /* ScheduleDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ScheduleDAG.cpp; sourceTree = ""; }; DE81704008CFB44D0093BDEF /* fpcmp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = fpcmp.cpp; path = fpcmp/fpcmp.cpp; sourceTree = ""; }; DE81704F08CFB44D0093BDEF /* NightlyTest.gnuplot */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = NightlyTest.gnuplot; sourceTree = ""; }; - DE81705008CFB44D0093BDEF /* NightlyTest.pl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.perl; path = NightlyTest.pl; sourceTree = ""; }; DE81705108CFB44D0093BDEF /* NightlyTestTemplate.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = NightlyTestTemplate.html; sourceTree = ""; }; DE81705908CFB44D0093BDEF /* AsmWriterEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AsmWriterEmitter.cpp; sourceTree = ""; }; DE81705A08CFB44D0093BDEF /* AsmWriterEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AsmWriterEmitter.h; sourceTree = ""; }; @@ -932,32 +995,66 @@ DE66F38D08ABF35C00323D32 /* docs */, DE66F3FD08ABF37000323D32 /* examples */, DE66F38C08ABF35300323D32 /* CREDITS.TXT */, + CFD99AA80AFE827B0068D19C /* LICENSE.TXT */, + CFD99AAD0AFE827B0068D19C /* README.txt */, ); name = LLVM; sourceTree = ""; }; - CF9720380A9F3BBC002CEEDD /* ARM */ = { + CF065B2D0ABB318900555029 /* ARM */ = { isa = PBXGroup; children = ( - CF97203A0A9F3BBC002CEEDD /* ARM.h */, - CF97203B0A9F3BBC002CEEDD /* ARM.td */, - CF97203C0A9F3BBC002CEEDD /* ARMAsmPrinter.cpp */, - CF97203D0A9F3BBC002CEEDD /* ARMFrameInfo.h */, - CF9720450A9F3BBC002CEEDD /* ARMInstrInfo.cpp */, - CF9720460A9F3BBC002CEEDD /* ARMInstrInfo.h */, - CF9720470A9F3BBC002CEEDD /* ARMInstrInfo.td */, - CF9720480A9F3BBC002CEEDD /* ARMISelDAGToDAG.cpp */, - CF9720490A9F3BBC002CEEDD /* ARMRegisterInfo.cpp */, - CF97204A0A9F3BBC002CEEDD /* ARMRegisterInfo.h */, - CF97204B0A9F3BBC002CEEDD /* ARMRegisterInfo.td */, - CF341DC40AB07E6B0099B064 /* ARMTargetAsmInfo.cpp */, - CF341DC30AB07E6B0099B064 /* ARMTargetAsmInfo.h */, - CF97204C0A9F3BBC002CEEDD /* ARMTargetMachine.cpp */, - CF97204D0A9F3BBC002CEEDD /* ARMTargetMachine.h */, + CFD99A8B0AFE82160068D19C /* ARM.h */, + CFD99A8C0AFE82160068D19C /* ARM.td */, + CFD99A8D0AFE82160068D19C /* ARMAsmPrinter.cpp */, + CFD99A8E0AFE82160068D19C /* ARMFrameInfo.h */, + CFD99A8F0AFE82160068D19C /* ARMGenAsmWriter.inc */, + CFD99A900AFE82160068D19C /* ARMGenDAGISel.inc */, + CFD99A910AFE82160068D19C /* ARMGenInstrInfo.inc */, + CFD99A920AFE82160068D19C /* ARMGenInstrNames.inc */, + CFD99A930AFE82160068D19C /* ARMGenRegisterInfo.h.inc */, + CFD99A940AFE82160068D19C /* ARMGenRegisterInfo.inc */, + CFD99A950AFE82160068D19C /* ARMGenRegisterNames.inc */, + CFD99A960AFE82160068D19C /* ARMInstrInfo.cpp */, + CFD99A970AFE82160068D19C /* ARMInstrInfo.h */, + CFD99A980AFE82160068D19C /* ARMInstrInfo.td */, + CFD99A990AFE82160068D19C /* ARMISelDAGToDAG.cpp */, + CFD99A9A0AFE82160068D19C /* ARMMul.cpp */, + CFD99A9B0AFE82160068D19C /* ARMRegisterInfo.cpp */, + CFD99A9C0AFE82160068D19C /* ARMRegisterInfo.h */, + CFD99A9D0AFE82160068D19C /* ARMRegisterInfo.td */, + CFD99A9E0AFE82160068D19C /* ARMTargetAsmInfo.cpp */, + CFD99A9F0AFE82160068D19C /* ARMTargetAsmInfo.h */, + CFD99AA00AFE82160068D19C /* ARMTargetMachine.cpp */, + CFD99AA10AFE82160068D19C /* ARMTargetMachine.h */, + CFD99AA20AFE82160068D19C /* Makefile */, + CFD99AA30AFE82160068D19C /* README.txt */, ); + name = ARM; path = ARM; sourceTree = ""; }; + CFD99AC50AFE872B0068D19C /* llvm2cpp */ = { + isa = PBXGroup; + children = ( + CFD99AC20AFE87260068D19C /* CppWriter.cpp */, + CFD99AC30AFE87260068D19C /* CppWriter.h */, + CFD99AC40AFE87260068D19C /* llvm2cpp.cpp */, + ); + name = llvm2cpp; + sourceTree = ""; + }; + CFD99ADF0AFE878F0068D19C /* opt */ = { + isa = PBXGroup; + children = ( + CFD99ADB0AFE87870068D19C /* AnalysisWrappers.cpp */, + CFD99ADC0AFE87870068D19C /* GraphPrinters.cpp */, + CFD99ADD0AFE87870068D19C /* opt.cpp */, + CFD99ADE0AFE87870068D19C /* PrintSCC.cpp */, + ); + name = opt; + sourceTree = ""; + }; CFE4213C0A66FAE100AB4BF6 /* Hello */ = { isa = PBXGroup; children = ( @@ -1133,6 +1230,7 @@ DE66ED7108ABEC2B00323D32 /* LiveInterval.cpp */, DE66ED7308ABEC2B00323D32 /* LiveIntervalAnalysis.cpp */, DE66ED7508ABEC2B00323D32 /* LiveVariables.cpp */, + CF32AF5C0AEE6A4E00D24CD4 /* LLVMTargetMachine.cpp */, DE66ED7608ABEC2B00323D32 /* MachineBasicBlock.cpp */, CF6529A6095B21A8007F884E /* MachineDebugInfo.cpp */, DE66ED7808ABEC2B00323D32 /* MachineFunction.cpp */, @@ -1164,7 +1262,6 @@ CF7FFA200985081C008B0087 /* ScheduleDAGSimple.cpp */, DE694D9F08B51E0C0039C106 /* ScheduleDAG.cpp */, DE66ED9208ABEC2B00323D32 /* SelectionDAG.cpp */, - CF9720360A9F3B1C002CEEDD /* SelectionDAGCSEMap.cpp */, DE66ED9308ABEC2B00323D32 /* SelectionDAGISel.cpp */, DE66ED9408ABEC2B00323D32 /* SelectionDAGPrinter.cpp */, CFE421060A66F86D00AB4BF6 /* ScheduleDAGRRList.cpp */, @@ -1240,15 +1337,19 @@ isa = PBXGroup; children = ( DE66EDFD08ABEDE600323D32 /* bzip2 */, + CFD99AB70AFE848A0068D19C /* Allocator.cpp */, DE66EDFC08ABEDE600323D32 /* Annotation.cpp */, DE66EE1D08ABEDE600323D32 /* CommandLine.cpp */, DE66EE1E08ABEDE600323D32 /* Compressor.cpp */, + CFD99AB80AFE848A0068D19C /* CStringMap.cpp */, DE66EE3D08ABEDE600323D32 /* Debug.cpp */, CF79495D09B326D4005ADFCA /* Dwarf.cpp */, DE66EE3E08ABEDE600323D32 /* FileUtilities.cpp */, + CF42B6C40AF2512000D5D47C /* FoldingSet.cpp */, CFE421070A66F8DC00AB4BF6 /* GraphWriter.cpp */, DE66EE3F08ABEDE600323D32 /* IsInf.cpp */, DE66EE4008ABEDE600323D32 /* IsNAN.cpp */, + CFD99AB90AFE848A0068D19C /* ManagedStatic.cpp */, DE66EE4208ABEDE600323D32 /* PluginLoader.cpp */, DE66EE4308ABEDE600323D32 /* SlowOperationInformer.cpp */, DE66EE4408ABEDE600323D32 /* Statistic.cpp */, @@ -1289,6 +1390,7 @@ CFE421090A66F93300AB4BF6 /* Alarm.cpp */, DE66EE6008ABEE3400323D32 /* DynamicLibrary.cpp */, DE66EE6108ABEE3400323D32 /* LICENSE.TXT */, + CFD99ABA0AFE84D70068D19C /* IncludeFile.cpp */, DE66EE6208ABEE3400323D32 /* ltdl.c */, DE66EE6308ABEE3400323D32 /* ltdl.h */, DE66EE6508ABEE3400323D32 /* MappedFile.cpp */, @@ -1308,6 +1410,7 @@ DE66EE7E08ABEE3500323D32 /* Unix */ = { isa = PBXGroup; children = ( + CFD99ABB0AFE84EF0068D19C /* Alarm.inc */, DE66EE7F08ABEE3500323D32 /* MappedFile.inc */, DE66EE8008ABEE3500323D32 /* Memory.inc */, DE66EE8108ABEE3500323D32 /* Mutex.inc */, @@ -1352,10 +1455,9 @@ DE66EE9608ABEE5D00323D32 /* lib/Target */ = { isa = PBXGroup; children = ( - CF47BD860AAF487E00A8B13E /* TargetAsmInfo.cpp */, DE66EE9708ABEE5D00323D32 /* Alpha */, - CF9720380A9F3BBC002CEEDD /* ARM */, DE66EEC908ABEE5E00323D32 /* CBackend */, + CF065B2D0ABB318900555029 /* ARM */, DE66EEE508ABEE5E00323D32 /* IA64 */, DE66EF1108ABEE5E00323D32 /* PowerPC */, DE66EF7008ABEE5F00323D32 /* Sparc */, @@ -1363,6 +1465,7 @@ DE66EF1008ABEE5E00323D32 /* MRegisterInfo.cpp */, CF9BCD1508C75070001E7011 /* SubtargetFeature.cpp */, DE66F08A08ABEE6000323D32 /* Target.td */, + CF47BD860AAF487E00A8B13E /* TargetAsmInfo.cpp */, DE66F08B08ABEE6000323D32 /* TargetData.cpp */, DE66F08C08ABEE6000323D32 /* TargetFrameInfo.cpp */, DE66F08D08ABEE6000323D32 /* TargetInstrInfo.cpp */, @@ -1389,6 +1492,7 @@ CFA702C20A6FA85F0006009A /* AlphaGenRegisterNames.inc */, CFA702C30A6FA85F0006009A /* AlphaGenSubtarget.inc */, DE66EE9808ABEE5E00323D32 /* Alpha.h */, + CFD99ABC0AFE852E0068D19C /* AlphaBranchSelector.cpp */, CFBD8B1A090E76540020B107 /* AlphaISelDAGToDAG.cpp */, CFBD8B1B090E76540020B107 /* AlphaISelLowering.cpp */, CFBD8B1C090E76540020B107 /* AlphaISelLowering.h */, @@ -1403,6 +1507,7 @@ DE66EEA608ABEE5E00323D32 /* AlphaInstrInfo.td */, DE66EEA908ABEE5E00323D32 /* AlphaJITInfo.cpp */, DE66EEAA08ABEE5E00323D32 /* AlphaJITInfo.h */, + CFD99ABD0AFE852E0068D19C /* AlphaLLRP.cpp */, CFE4210B0A66F96400AB4BF6 /* AlphaSchedule.td */, DE66EEAB08ABEE5E00323D32 /* AlphaRegisterInfo.cpp */, DE66EEAC08ABEE5E00323D32 /* AlphaRegisterInfo.h */, @@ -1566,6 +1671,7 @@ CFA702DC0A6FA8DD0006009A /* X86GenSubtarget.inc */, CFE421380A66FA8000AB4BF6 /* README-FPStack.txt */, CFE421390A66FA8000AB4BF6 /* README-SSE.txt */, + CFD99ABE0AFE857A0068D19C /* README-X86-64.txt */, CFE4213A0A66FA8000AB4BF6 /* README.txt */, CFF0DE6309BF6C360031957F /* X86InstrFPStack.td */, CFF0DE6409BF6C360031957F /* X86InstrMMX.td */, @@ -1583,6 +1689,7 @@ DE66F0CD08ABEE6000323D32 /* X86InstrInfo.cpp */, DE66F0CE08ABEE6000323D32 /* X86InstrInfo.h */, DE66F0CF08ABEE6100323D32 /* X86InstrInfo.td */, + CFD99ABF0AFE857A0068D19C /* X86InstrX86-64.td */, DE66F0D008ABEE6100323D32 /* X86IntelAsmPrinter.cpp */, DE66F0D108ABEE6100323D32 /* X86IntelAsmPrinter.h */, DE66F0D508ABEE6100323D32 /* X86JITInfo.cpp */, @@ -1684,6 +1791,7 @@ DE66F1AA08ABEFB400323D32 /* LoopUnswitch.cpp */, DE66F1AD08ABEFB400323D32 /* LowerGC.cpp */, DE66F1AF08ABEFB400323D32 /* LowerPacked.cpp */, + CFD99AC00AFE860B0068D19C /* PredicateSimplifier.cpp */, DE66F1B508ABEFB400323D32 /* Reassociate.cpp */, CF73C0B9098A546000627152 /* Reg2Mem.cpp */, DE66F1B608ABEFB400323D32 /* ScalarReplAggregates.cpp */, @@ -1787,9 +1895,11 @@ isa = PBXGroup; children = ( DE66F1ED08ABF03100323D32 /* BitSetVector.h */, + CF33BE150AF62B4200E93805 /* CStringMap.h */, DE66F1EE08ABF03100323D32 /* DenseMap.h */, DE66F1EF08ABF03100323D32 /* DepthFirstIterator.h */, DE66F1F008ABF03100323D32 /* EquivalenceClasses.h */, + CF42B6BF0AF24F5300D5D47C /* FoldingSet.h */, DE66F1F108ABF03100323D32 /* GraphTraits.h */, DE66F1F308ABF03100323D32 /* hash_map.in */, DE66F1F508ABF03100323D32 /* hash_set.in */, @@ -1800,6 +1910,8 @@ DE66F1FB08ABF03100323D32 /* SCCIterator.h */, DE66F1FC08ABF03100323D32 /* SetOperations.h */, DE66F1FD08ABF03100323D32 /* SetVector.h */, + CF33BE160AF62B4200E93805 /* SmallString.h */, + CF71B60F0AC45EDA0007F57C /* SmallVector.h */, DE66F1FE08ABF03100323D32 /* Statistic.h */, DE66F1FF08ABF03100323D32 /* STLExtras.h */, DE66F20008ABF03100323D32 /* StringExtras.h */, @@ -1915,7 +2027,6 @@ CF7FFA2109850864008B0087 /* ScheduleDAG.h */, CFE21C7B0A80CC1C00D3E908 /* SchedulerRegistry.h */, DE66F24608ABF03100323D32 /* SelectionDAG.h */, - CF9720250A9F3969002CEEDD /* SelectionDAGCSEMap.h */, DE66F24708ABF03100323D32 /* SelectionDAGISel.h */, DE66F24808ABF03100323D32 /* SelectionDAGNodes.h */, DE66F24908ABF03100323D32 /* SSARegMap.h */, @@ -1963,11 +2074,13 @@ isa = PBXGroup; children = ( DE66F27008ABF03200323D32 /* AIXDataTypesFix.h */, + CFD99AB40AFE83910068D19C /* Allocator.h */, DE66F27108ABF03200323D32 /* Annotation.h */, DE66F27208ABF03200323D32 /* CallSite.h */, DE66F27308ABF03200323D32 /* Casting.h */, DE66F27408ABF03200323D32 /* CFG.h */, DE66F27508ABF03200323D32 /* CommandLine.h */, + CFD99AB50AFE83910068D19C /* Compiler.h */, DE66F27608ABF03200323D32 /* Compressor.h */, DE66F27708ABF03200323D32 /* ConstantRange.h */, CF73C0AD098A519400627152 /* DataTypes.h */, @@ -1983,6 +2096,7 @@ DE66F28108ABF03200323D32 /* InstIterator.h */, DE66F28208ABF03200323D32 /* InstVisitor.h */, DE66F28308ABF03200323D32 /* LeakDetector.h */, + CFD99AB60AFE83910068D19C /* ManagedStatic.h */, DE66F28408ABF03200323D32 /* Mangler.h */, DE66F28508ABF03200323D32 /* MathExtras.h */, DE66F28608ABF03200323D32 /* MutexGuard.h */, @@ -1995,7 +2109,6 @@ DE66F28E08ABF03200323D32 /* Timer.h */, DE66F29008ABF03200323D32 /* type_traits.h */, DE66F29108ABF03200323D32 /* TypeInfo.h */, - CFE421030A66F67300AB4BF6 /* Visibility.h */, ); path = Support; sourceTree = ""; @@ -2067,12 +2180,15 @@ DE66F2BD08ABF14400323D32 /* tools */ = { isa = PBXGroup; children = ( + CFD99ADF0AFE878F0068D19C /* opt */, DE66F2CB08ABF14400323D32 /* bugpoint */, DE66F2F008ABF14400323D32 /* gccld */, DE66F31E08ABF14400323D32 /* llvm-db */, DE66F33B08ABF14400323D32 /* llvm-ld */, DE66F36808ABF14500323D32 /* llvmc */, + CFD99AC50AFE872B0068D19C /* llvm2cpp */, DE66F2EE08ABF14400323D32 /* gccas.cpp */, + CFD99ADA0AFE87650068D19C /* lto.cpp */, DE66F30008ABF14400323D32 /* llc.cpp */, DE66F30708ABF14400323D32 /* lli.cpp */, DE66F30E08ABF14400323D32 /* llvm-ar.cpp */, @@ -2084,7 +2200,7 @@ DE66F35108ABF14400323D32 /* llvm-nm.cpp */, DE66F35808ABF14500323D32 /* llvm-prof.cpp */, DE66F35F08ABF14500323D32 /* llvm-ranlib.cpp */, - DE66F38708ABF14500323D32 /* opt.cpp */, + CFD99AC10AFE87030068D19C /* llvm-stub.c */, ); name = tools; path = ../tools; @@ -2207,7 +2323,6 @@ DE66F39508ABF35C00323D32 /* CommandGuide */ = { isa = PBXGroup; children = ( - DE66F39708ABF35C00323D32 /* analyze.pod */, DE66F39808ABF35C00323D32 /* bugpoint.pod */, DE66F39908ABF35C00323D32 /* gccas.pod */, DE66F39A08ABF35C00323D32 /* gccld.pod */, @@ -2267,7 +2382,6 @@ DE81705708CFB44D0093BDEF /* TableGen */, DE81704008CFB44D0093BDEF /* fpcmp.cpp */, DE81704F08CFB44D0093BDEF /* NightlyTest.gnuplot */, - DE81705008CFB44D0093BDEF /* NightlyTest.pl */, DE81705108CFB44D0093BDEF /* NightlyTestTemplate.html */, ); name = utils; @@ -2282,6 +2396,7 @@ DE81705B08CFB44D0093BDEF /* CodeEmitterGen.cpp */, DE81705C08CFB44D0093BDEF /* CodeEmitterGen.h */, DE81705D08CFB44D0093BDEF /* CodeGenInstruction.h */, + CFD99AE00AFE87DC0068D19C /* CodeGenIntrinsics.h */, DE81705E08CFB44D0093BDEF /* CodeGenRegisters.h */, DE81705F08CFB44D0093BDEF /* CodeGenTarget.cpp */, DE81706008CFB44D0093BDEF /* CodeGenTarget.h */, @@ -2289,6 +2404,8 @@ DE81706808CFB44D0093BDEF /* DAGISelEmitter.h */, DE81708408CFB44D0093BDEF /* FileLexer.l */, DE81708808CFB44D0093BDEF /* FileParser.y */, + CFAA448A0AE3BE890064BC97 /* HereStringSupport.cpp */, + CFAA44870AE3BE6C0064BC97 /* HereStringSupport.h */, CF9720970A9F3D4D002CEEDD /* IntrinsicEmitter.cpp */, CF9720980A9F3D4D002CEEDD /* IntrinsicEmitter.h */, DE81708908CFB44D0093BDEF /* InstrInfoEmitter.cpp */, @@ -2313,7 +2430,7 @@ /* Begin PBXLegacyTarget section */ CF0329B608D1BE110030FD33 /* LLVM lib */ = { isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j4 "; + buildArgumentsString = "$(ACTION) -j 2"; buildConfigurationList = CF0329B708D1BE530030FD33 /* Build configuration list for PBXLegacyTarget "LLVM lib" */; buildPhases = ( ); @@ -2327,7 +2444,7 @@ }; CF0329BB08D1BE5D0030FD33 /* LLVM llc */ = { isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j 4"; + buildArgumentsString = "$(ACTION) -j 2"; buildConfigurationList = CF0329C308D1BEC40030FD33 /* Build configuration list for PBXLegacyTarget "LLVM llc" */; buildPhases = ( ); @@ -2341,7 +2458,7 @@ }; CF490E830907CDAB0072DB1C /* LLVM TableGen */ = { isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j 4 "; + buildArgumentsString = "$(ACTION) -j 2"; buildConfigurationList = CF490E840907CDAB0072DB1C /* Build configuration list for PBXLegacyTarget "LLVM TableGen" */; buildPhases = ( ); @@ -2353,9 +2470,37 @@ passBuildSettingsInEnvironment = 0; productName = "LLVM llc"; }; + CFDF86BD0ADE819D00D40A3D /* LLVM lib release */ = { + isa = PBXLegacyTarget; + buildArgumentsString = "$(ACTION) -j 2 ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1"; + buildConfigurationList = CFDF86BE0ADE819D00D40A3D /* Build configuration list for PBXLegacyTarget "LLVM lib release" */; + buildPhases = ( + ); + buildToolPath = /usr/bin/make; + buildWorkingDirectory = "$(SRCROOT)/../lib"; + dependencies = ( + ); + name = "LLVM lib release"; + passBuildSettingsInEnvironment = 0; + productName = "LLVM lib"; + }; + CFDF86C60ADE81D000D40A3D /* LLVM llc release */ = { + isa = PBXLegacyTarget; + buildArgumentsString = "$(ACTION) -j 2 ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1"; + buildConfigurationList = CFDF86C70ADE81D000D40A3D /* Build configuration list for PBXLegacyTarget "LLVM llc release" */; + buildPhases = ( + ); + buildToolPath = /usr/bin/make; + buildWorkingDirectory = "$(SRCROOT)/../tools/llc"; + dependencies = ( + ); + name = "LLVM llc release"; + passBuildSettingsInEnvironment = 0; + productName = "LLVM llc"; + }; D28A88AD04BDD90700651E21 /* LLVM */ = { isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j 4 "; + buildArgumentsString = "$(ACTION) -j 2"; buildConfigurationList = DE66EC4C08ABE78900323D32 /* Build configuration list for PBXLegacyTarget "LLVM" */; buildPhases = ( ); @@ -2382,6 +2527,9 @@ CF0329BB08D1BE5D0030FD33 /* LLVM llc */, CF0329BC08D1BE8E0030FD33 /* LLVM full llc */, CF490E830907CDAB0072DB1C /* LLVM TableGen */, + CFDF86BD0ADE819D00D40A3D /* LLVM lib release */, + CFDF86C60ADE81D000D40A3D /* LLVM llc release */, + CFDF86D00ADE820000D40A3D /* LLVM full llc release */, ); }; /* End PBXProject section */ @@ -2397,6 +2545,16 @@ target = CF0329BB08D1BE5D0030FD33 /* LLVM llc */; targetProxy = CF0329BF08D1BE9B0030FD33 /* PBXContainerItemProxy */; }; + CFDF86DA0ADE822100D40A3D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = CFDF86BD0ADE819D00D40A3D /* LLVM lib release */; + targetProxy = CFDF86D90ADE822100D40A3D /* PBXContainerItemProxy */; + }; + CFDF86DC0ADE822100D40A3D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = CFDF86C60ADE81D000D40A3D /* LLVM llc release */; + targetProxy = CFDF86DB0ADE822100D40A3D /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ @@ -2620,6 +2778,171 @@ }; name = Default; }; + CFDF86BF0ADE819D00D40A3D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + OPTIMIZATION_CFLAGS = "-O0"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "LLVM lib"; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Debug; + }; + CFDF86C00ADE819D00D40A3D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + OPTIMIZATION_CFLAGS = "-O0"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "LLVM lib"; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Release; + }; + CFDF86C10ADE819D00D40A3D /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + OPTIMIZATION_CFLAGS = "-O0"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "LLVM lib"; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Default; + }; + CFDF86C80ADE81D000D40A3D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + OPTIMIZATION_CFLAGS = "-O0"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "LLVM llc"; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Debug; + }; + CFDF86C90ADE81D000D40A3D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + OPTIMIZATION_CFLAGS = "-O0"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "LLVM llc"; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Release; + }; + CFDF86CA0ADE81D000D40A3D /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + OPTIMIZATION_CFLAGS = "-O0"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "LLVM llc"; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Default; + }; + CFDF86D60ADE820000D40A3D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + OPTIMIZATION_CFLAGS = "-O0"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "LLVM full llc"; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Debug; + }; + CFDF86D70ADE820000D40A3D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + OPTIMIZATION_CFLAGS = "-O0"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "LLVM full llc"; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Release; + }; + CFDF86D80ADE820000D40A3D /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + OPTIMIZATION_CFLAGS = "-O0"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "LLVM full llc"; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Default; + }; DE66EC4D08ABE78900323D32 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -2720,6 +3043,36 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Default; }; + CFDF86BE0ADE819D00D40A3D /* Build configuration list for PBXLegacyTarget "LLVM lib release" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + CFDF86BF0ADE819D00D40A3D /* Debug */, + CFDF86C00ADE819D00D40A3D /* Release */, + CFDF86C10ADE819D00D40A3D /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; + CFDF86C70ADE81D000D40A3D /* Build configuration list for PBXLegacyTarget "LLVM llc release" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + CFDF86C80ADE81D000D40A3D /* Debug */, + CFDF86C90ADE81D000D40A3D /* Release */, + CFDF86CA0ADE81D000D40A3D /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; + CFDF86D50ADE820000D40A3D /* Build configuration list for PBXAggregateTarget "LLVM full llc release" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + CFDF86D60ADE820000D40A3D /* Debug */, + CFDF86D70ADE820000D40A3D /* Release */, + CFDF86D80ADE820000D40A3D /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; DE66EC4C08ABE78900323D32 /* Build configuration list for PBXLegacyTarget "LLVM" */ = { isa = XCConfigurationList; buildConfigurations = ( From sabre at nondot.org Sun Nov 5 17:27:50 2006 From: sabre at nondot.org (Chris Lattner) Date: Sun, 5 Nov 2006 17:27:50 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/C++Frontend/2003-11-02-WeakLinkage.cpp.tr Message-ID: <200611052327.kA5NRo6v014127@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/C++Frontend: 2003-11-02-WeakLinkage.cpp.tr updated: 1.1 -> 1.2 --- Log message: xfail this for the 1.9 release. This is PR984: http://llvm.org/PR984 . --- Diffs of the changes: (+1 -0) 2003-11-02-WeakLinkage.cpp.tr | 1 + 1 files changed, 1 insertion(+) Index: llvm/test/Regression/C++Frontend/2003-11-02-WeakLinkage.cpp.tr diff -u llvm/test/Regression/C++Frontend/2003-11-02-WeakLinkage.cpp.tr:1.1 llvm/test/Regression/C++Frontend/2003-11-02-WeakLinkage.cpp.tr:1.2 --- llvm/test/Regression/C++Frontend/2003-11-02-WeakLinkage.cpp.tr:1.1 Sun Nov 2 00:30:39 2003 +++ llvm/test/Regression/C++Frontend/2003-11-02-WeakLinkage.cpp.tr Sun Nov 5 17:27:36 2006 @@ -1,4 +1,5 @@ // RUN: %llvmgcc -xc++ -S -o - %s | not grep weak +// XFAIL: * template void thefunc(); From sabre at nondot.org Sun Nov 5 17:29:13 2006 From: sabre at nondot.org (Chris Lattner) Date: Sun, 5 Nov 2006 17:29:13 -0600 Subject: [llvm-commits] CVS: llvm/utils/TableGen/FileLexer.cpp.cvs FileLexer.l.cvs Message-ID: <200611052329.kA5NTDWE014234@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: FileLexer.cpp.cvs updated: 1.7 -> 1.8 FileLexer.l.cvs updated: 1.6 -> 1.7 --- Log message: regenerate --- Diffs of the changes: (+45 -43) FileLexer.cpp.cvs | 87 +++++++++++++++++++++++++++--------------------------- FileLexer.l.cvs | 1 2 files changed, 45 insertions(+), 43 deletions(-) Index: llvm/utils/TableGen/FileLexer.cpp.cvs diff -u llvm/utils/TableGen/FileLexer.cpp.cvs:1.7 llvm/utils/TableGen/FileLexer.cpp.cvs:1.8 --- llvm/utils/TableGen/FileLexer.cpp.cvs:1.7 Mon Sep 18 17:28:27 2006 +++ llvm/utils/TableGen/FileLexer.cpp.cvs Sun Nov 5 17:28:58 2006 @@ -21,7 +21,7 @@ /* A lexical scanner generated by flex */ /* Scanner skeleton version: - * $Header: /home/vadve/shared/PublicCVS/llvm/utils/TableGen/FileLexer.cpp.cvs,v 1.7 2006/09/18 22:28:27 lattner Exp $ + * $Header: /home/vadve/shared/PublicCVS/llvm/utils/TableGen/FileLexer.cpp.cvs,v 1.8 2006/11/05 23:28:58 lattner Exp $ */ #define FLEX_SCANNER @@ -501,7 +501,7 @@ #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; -#line 1 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 1 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" #define INITIAL 0 /*===-- FileLexer.l - Scanner for TableGen Files ----------------*- C++ -*-===// // @@ -519,7 +519,8 @@ #define YY_NEVER_INTERACTIVE 1 #define comment 1 -#line 30 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 30 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" +#include "llvm/Config/config.h" #include "Record.h" typedef std::pair*> SubClassRefTy; #include "FileParser.h" @@ -660,7 +661,7 @@ using namespace llvm; -#line 664 "Lexer.cpp" +#line 665 "Lexer.cpp" /* Macros after this point can all be overridden by user definitions in * section 1. @@ -811,10 +812,10 @@ register char *yy_cp, *yy_bp; register int yy_act; -#line 180 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 181 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" -#line 818 "Lexer.cpp" +#line 819 "Lexer.cpp" if ( yy_init ) { @@ -907,183 +908,183 @@ { /* beginning of action switch */ case 1: YY_RULE_SETUP -#line 182 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 183 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { /* Ignore comments */ } YY_BREAK case 2: YY_RULE_SETUP -#line 184 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 185 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { HandleInclude(yytext); } YY_BREAK case 3: YY_RULE_SETUP -#line 185 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 186 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { Filelval.StrVal = new std::string(yytext+2, yytext+yyleng-2); return CODEFRAGMENT; } YY_BREAK case 4: YY_RULE_SETUP -#line 188 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 189 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { return INT; } YY_BREAK case 5: YY_RULE_SETUP -#line 189 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 190 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { return BIT; } YY_BREAK case 6: YY_RULE_SETUP -#line 190 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 191 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { return BITS; } YY_BREAK case 7: YY_RULE_SETUP -#line 191 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 192 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { return STRING; } YY_BREAK case 8: YY_RULE_SETUP -#line 192 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 193 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { return LIST; } YY_BREAK case 9: YY_RULE_SETUP -#line 193 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 194 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { return CODE; } YY_BREAK case 10: YY_RULE_SETUP -#line 194 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 195 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { return DAG; } YY_BREAK case 11: YY_RULE_SETUP -#line 196 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 197 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { return CLASS; } YY_BREAK case 12: YY_RULE_SETUP -#line 197 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 198 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { return DEF; } YY_BREAK case 13: YY_RULE_SETUP -#line 198 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 199 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { return DEFM; } YY_BREAK case 14: YY_RULE_SETUP -#line 199 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 200 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { return MULTICLASS; } YY_BREAK case 15: YY_RULE_SETUP -#line 200 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 201 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { return FIELD; } YY_BREAK case 16: YY_RULE_SETUP -#line 201 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 202 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { return LET; } YY_BREAK case 17: YY_RULE_SETUP -#line 202 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 203 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { return IN; } YY_BREAK case 18: YY_RULE_SETUP -#line 204 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 205 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { return SRATOK; } YY_BREAK case 19: YY_RULE_SETUP -#line 205 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 206 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { return SRLTOK; } YY_BREAK case 20: YY_RULE_SETUP -#line 206 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 207 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { return SHLTOK; } YY_BREAK case 21: YY_RULE_SETUP -#line 207 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 208 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { return STRCONCATTOK; } YY_BREAK case 22: YY_RULE_SETUP -#line 210 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 211 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { Filelval.StrVal = new std::string(yytext, yytext+yyleng); return ID; } YY_BREAK case 23: YY_RULE_SETUP -#line 212 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 213 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { Filelval.StrVal = new std::string(yytext+1, yytext+yyleng); return VARNAME; } YY_BREAK case 24: YY_RULE_SETUP -#line 215 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 216 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { Filelval.StrVal = new std::string(yytext+1, yytext+yyleng-1); return STRVAL; } YY_BREAK case 25: YY_RULE_SETUP -#line 218 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 219 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { Filelval.IntVal = ParseInt(Filetext); return INTVAL; } YY_BREAK case 26: YY_RULE_SETUP -#line 220 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 221 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { /* Ignore whitespace */ } YY_BREAK case 27: YY_RULE_SETUP -#line 223 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 224 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { BEGIN(comment); CommentDepth++; } YY_BREAK case 28: YY_RULE_SETUP -#line 224 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 225 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" {} /* eat anything that's not a '*' or '/' */ YY_BREAK case 29: YY_RULE_SETUP -#line 225 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 226 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" {} /* eat up '*'s not followed by '/'s */ YY_BREAK case 30: YY_RULE_SETUP -#line 226 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 227 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { ++CommentDepth; } YY_BREAK case 31: YY_RULE_SETUP -#line 227 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 228 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" {} /* eat up /'s not followed by *'s */ YY_BREAK case 32: YY_RULE_SETUP -#line 228 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 229 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { if (!--CommentDepth) { BEGIN(INITIAL); } } YY_BREAK case YY_STATE_EOF(comment): -#line 229 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 230 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { err() << "Unterminated comment!\n"; exit(1); } YY_BREAK case 33: YY_RULE_SETUP -#line 231 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 232 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" { return Filetext[0]; } YY_BREAK case 34: YY_RULE_SETUP -#line 233 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 234 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 1087 "Lexer.cpp" +#line 1088 "Lexer.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1967,6 +1968,6 @@ return 0; } #endif -#line 233 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 234 "/Users/sabre/cvs/llvm/utils/TableGen/FileLexer.l" Index: llvm/utils/TableGen/FileLexer.l.cvs diff -u llvm/utils/TableGen/FileLexer.l.cvs:1.6 llvm/utils/TableGen/FileLexer.l.cvs:1.7 --- llvm/utils/TableGen/FileLexer.l.cvs:1.6 Mon Sep 18 17:28:27 2006 +++ llvm/utils/TableGen/FileLexer.l.cvs Sun Nov 5 17:28:58 2006 @@ -27,6 +27,7 @@ %x comment %{ +#include "llvm/Config/config.h" #include "Record.h" typedef std::pair*> SubClassRefTy; #include "FileParser.h"