[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineModuleInfo.h
Changes in directory llvm/include/llvm/CodeGen: MachineModuleInfo.h updated: 1.15 - 1.16 --- Log message: Integrate exception filter support and exception catch support. This simplifies the code in DwarfWriter, allows for multiple filters and makes it trivial to specify filters accompanied by cleanups or catch-all specifications (see next patch). What a deal! Patch blessed by Anton. --- Diffs of the changes: (+24 -12) MachineModuleInfo.h | 36 1 files changed, 24 insertions(+), 12 deletions(-) Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h diff -u llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.15 llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.16 --- llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.15 Wed May 23 06:08:30 2007 +++ llvm/include/llvm/CodeGen/MachineModuleInfo.h Sat Jun 2 11:53:42 2007 @@ -960,16 +960,13 @@ SmallVectorunsigned, 1 EndLabels; // Labels after invoke. unsigned LandingPadLabel; // Label at beginning of landing pad. Function *Personality;// Personality function. - std::vectorunsigned TypeIds;// List of type ids. - bool IsFilter;// Indicate if the landing pad is a -// throw filter. - + std::vectorint TypeIds; // List of type ids (filters negative) + LandingPadInfo(MachineBasicBlock *MBB) : LandingPadBlock(MBB) , LandingPadLabel(0) , Personality(NULL) , TypeIds() - , IsFilter(false) {} }; @@ -1021,6 +1018,10 @@ // std::vectorGlobalVariable * TypeInfos; + // FilterIds - List of typeids encoding filters used in the current function. + // + std::vectorunsigned FilterIds; + // Personalities - Vector of all personality functions ever seen. Used to emit // common EH frames. std::vectorFunction * Personalities; @@ -1213,20 +1214,25 @@ const std::vectorFunction * getPersonalities() const { return Personalities; } - + /// addCatchTypeInfo - Provide the catch typeinfo for a landing pad. /// void addCatchTypeInfo(MachineBasicBlock *LandingPad, std::vectorGlobalVariable * TyInfo); - - /// setIsFilterLandingPad - Indicates that the landing pad is a throw filter. + + /// addFilterTypeInfo - Provide the filter typeinfo for a landing pad. /// - void setIsFilterLandingPad(MachineBasicBlock *LandingPad); - + void addFilterTypeInfo(MachineBasicBlock *LandingPad, + std::vectorGlobalVariable * TyInfo); + /// getTypeIDFor - Return the type id for the specified typeinfo. This is /// function wide. unsigned getTypeIDFor(GlobalVariable *TI); - + + /// getFilterIDFor - Return the id of the filter encoded by TyIds. This is + /// function wide. + int getFilterIDFor(std::vectorunsigned TyIds); + /// TidyLandingPads - Remap landing pad labels and remove any deleted landing /// pads. void TidyLandingPads(); @@ -1242,7 +1248,13 @@ const std::vectorGlobalVariable * getTypeInfos() const { return TypeInfos; } - + + /// getFilterIds - Return a reference to the typeids encoding filters used in + /// the current function. + const std::vectorunsigned getFilterIds() const { +return FilterIds; + } + /// getPersonality - Return a personality function if available. The presence /// of one is required to emit exception handling info. Function *getPersonality() const; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineModuleInfo.h
Changes in directory llvm/include/llvm/CodeGen: MachineModuleInfo.h updated: 1.16 - 1.17 --- Log message: The semantics of invoke require that we always jump to the unwind block (landing pad) when an exception unwinds through the call. This doesn't quite match the way the dwarf unwinder works: by default it only jumps to the landing pad if the catch or filter specification matches, and otherwise it keeps on unwinding. There are two ways of specifying to the unwinder that it should always (more on why there are quotes here later) jump to the landing pad: follow the specification by a 0 typeid, or follow it by the typeid for the NULL typeinfo. GCC does the first, and this patch makes LLVM do the same as gcc. However there is a problem: the unwinder performs optimizations based on C++ semantics (it only expects destructors to be run if the 0 typeid fires - known as cleanups), meaning it assumes that no exceptions will be raised and that the raised exception will be reraised at the end of the cleanup code. So if someone writes their own LLVM code using the exception intrinsics they will get a nasty surprise if they don't follow these rules. The other possibility of using the typeid corresponding to NULL (catch-all) causes the unwinder to make no assumptions, so this is probably what we should use in the long-run. However since we are still having trouble getting exception handling working properly, for the moment it seems best to closely imitate GCC. --- Diffs of the changes: (+1 -1) MachineModuleInfo.h |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h diff -u llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.16 llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.17 --- llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.16 Sat Jun 2 11:53:42 2007 +++ llvm/include/llvm/CodeGen/MachineModuleInfo.h Sat Jun 2 12:16:06 2007 @@ -966,7 +966,7 @@ : LandingPadBlock(MBB) , LandingPadLabel(0) , Personality(NULL) - , TypeIds() + , TypeIds(1, 0) // Always have cleanups {} }; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineModuleInfo.h
Integrate exception filter support and exception catch support. This simplifies the code in DwarfWriter, allows for multiple filters and makes it trivial to specify filters accompanied by cleanups or catch-all specifications (see next patch). What a deal! Patch blessed by Anton. Very nice guys! -Chris ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineModuleInfo.h
Changes in directory llvm/include/llvm/CodeGen: MachineModuleInfo.h updated: 1.14 - 1.15 --- Log message: Mark all calls as could throw, when exceptions are enabled. Emit necessary LP info too. This fixes PR1439: http://llvm.org/PR1439 --- Diffs of the changes: (+1 -0) MachineModuleInfo.h |1 + 1 files changed, 1 insertion(+) Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h diff -u llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.14 llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.15 --- llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.14 Sun May 13 10:42:26 2007 +++ llvm/include/llvm/CodeGen/MachineModuleInfo.h Wed May 23 06:08:30 2007 @@ -967,6 +967,7 @@ LandingPadInfo(MachineBasicBlock *MBB) : LandingPadBlock(MBB) , LandingPadLabel(0) + , Personality(NULL) , TypeIds() , IsFilter(false) {} ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineModuleInfo.h
Changes in directory llvm/include/llvm/CodeGen: MachineModuleInfo.h updated: 1.13 - 1.14 --- Log message: Emit multiple common EH frames for multiple (including blank) personality functions. This partly fixes PR1414: http://llvm.org/PR1414 : now we're restricted only to one personality function per eh frame, not per module. Further work on multiple personalities topic needs representative example. --- Diffs of the changes: (+14 -3) MachineModuleInfo.h | 17 ++--- 1 files changed, 14 insertions(+), 3 deletions(-) Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h diff -u llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.13 llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.14 --- llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.13 Sat May 12 17:36:25 2007 +++ llvm/include/llvm/CodeGen/MachineModuleInfo.h Sun May 13 10:42:26 2007 @@ -1020,7 +1020,9 @@ // std::vectorGlobalVariable * TypeInfos; - Function *Personality; + // Personalities - Vector of all personality functions ever seen. Used to emit + // common EH frames. + std::vectorFunction * Personalities; public: static char ID; // Pass identification, replacement for typeid @@ -1201,7 +1203,16 @@ /// addPersonality - Provide the personality function for the exception /// information. void addPersonality(MachineBasicBlock *LandingPad, Function *Personality); - + + /// getPersonalityIndex - Get index of the current personality function inside + /// Personalitites array + unsigned getPersonalityIndex() const; + + /// getPersonalities - Return array of personality functions ever seen. + const std::vectorFunction * getPersonalities() const { +return Personalities; + } + /// addCatchTypeInfo - Provide the catch typeinfo for a landing pad. /// void addCatchTypeInfo(MachineBasicBlock *LandingPad, @@ -1219,7 +1230,7 @@ /// pads. void TidyLandingPads(); - /// getLandingPadInfos - Return a reference to the landing pad info for the + /// getLandingPads - Return a reference to the landing pad info for the /// current function. const std::vectorLandingPadInfo getLandingPads() const { return LandingPads; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineModuleInfo.h
Changes in directory llvm/include/llvm/CodeGen: MachineModuleInfo.h updated: 1.12 - 1.13 --- Log message: More DWARF-related things cleanup: 1. Fix PR1380: http://llvm.org/PR1380 2. Apply Duncan's patch from PR1410: http://llvm.org/PR1410 3. Insert workaround for one personality function per module as noted in PR1414: http://llvm.org/PR1414 4. Emit correct debug frames for x86/linux. This partly fixes DebugInfo/2006-11-06-StackTrace.cpp: stack trace is shown correctly, but arguments for function on top of stack are displayed incorrectly. --- Diffs of the changes: (+1 -0) MachineModuleInfo.h |1 + 1 files changed, 1 insertion(+) Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h diff -u llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.12 llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.13 --- llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.12 Thu May 10 17:34:59 2007 +++ llvm/include/llvm/CodeGen/MachineModuleInfo.h Sat May 12 17:36:25 2007 @@ -1020,6 +1020,7 @@ // std::vectorGlobalVariable * TypeInfos; + Function *Personality; public: static char ID; // Pass identification, replacement for typeid ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineModuleInfo.h
Changes in directory llvm/include/llvm/CodeGen: MachineModuleInfo.h updated: 1.11 - 1.12 --- Log message: Allow multiple invokes per landing pad. This (probably) fixes PR1410: http://llvm.org/PR1410 . --- Diffs of the changes: (+3 -4) MachineModuleInfo.h |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h diff -u llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.11 llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.12 --- llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.11 Sun May 6 08:37:16 2007 +++ llvm/include/llvm/CodeGen/MachineModuleInfo.h Thu May 10 17:34:59 2007 @@ -33,6 +33,7 @@ #include llvm/Support/Dwarf.h #include llvm/Support/DataTypes.h +#include llvm/ADT/SmallVector.h #include llvm/ADT/UniqueVector.h #include llvm/GlobalValue.h #include llvm/Pass.h @@ -955,8 +956,8 @@ /// struct LandingPadInfo { MachineBasicBlock *LandingPadBlock; // Landing pad block. - unsigned BeginLabel; // Label prior to invoke. - unsigned EndLabel;// Label after invoke. + SmallVectorunsigned, 1 BeginLabels; // Labels prior to invoke. + SmallVectorunsigned, 1 EndLabels; // Labels after invoke. unsigned LandingPadLabel; // Label at beginning of landing pad. Function *Personality;// Personality function. std::vectorunsigned TypeIds;// List of type ids. @@ -965,8 +966,6 @@ LandingPadInfo(MachineBasicBlock *MBB) : LandingPadBlock(MBB) - , BeginLabel(0) - , EndLabel(0) , LandingPadLabel(0) , TypeIds() , IsFilter(false) ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineModuleInfo.h
Changes in directory llvm/include/llvm/CodeGen: MachineModuleInfo.h updated: 1.6 - 1.7 --- Log message: Collect eh filter info. --- Diffs of the changes: (+7 -0) MachineModuleInfo.h |7 +++ 1 files changed, 7 insertions(+) Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h diff -u llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.6 llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.7 --- llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.6 Thu Feb 22 10:40:10 2007 +++ llvm/include/llvm/CodeGen/MachineModuleInfo.h Thu Mar 1 14:25:32 2007 @@ -960,6 +960,8 @@ unsigned LandingPadLabel; // Label at beginning of landing pad. Function *Personality;// Personality function. std::vectorunsigned TypeIds;// List of type ids. + bool IsFilter;// Indicate if the landing pad is a +// throw filter. LandingPadInfo(MachineBasicBlock *MBB) : LandingPadBlock(MBB) @@ -967,6 +969,7 @@ , EndLabel(0) , LandingPadLabel(0) , TypeIds() + , IsFilter(false) {} }; @@ -1202,6 +1205,10 @@ void addCatchTypeInfo(MachineBasicBlock *LandingPad, std::vectorGlobalVariable * TyInfo); + /// setIsFilterLandingPad - Indicates that the landing pad is a throw filter. + /// + void setIsFilterLandingPad(MachineBasicBlock *LandingPad); + /// getTypeIDFor - Return the type id for the specified typeinfo. This is /// function wide. unsigned getTypeIDFor(GlobalVariable *TI); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineModuleInfo.h
Changes in directory llvm/include/llvm/CodeGen: MachineModuleInfo.h updated: 1.5 - 1.6 --- Log message: Typo. --- Diffs of the changes: (+1 -1) MachineModuleInfo.h |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h diff -u llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.5 llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.6 --- llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.5 Wed Feb 21 16:38:31 2007 +++ llvm/include/llvm/CodeGen/MachineModuleInfo.h Thu Feb 22 10:40:10 2007 @@ -1014,7 +1014,7 @@ // in the current function. std::vectorLandingPadInfo LandingPads; - // TypeInfos - List of C++ TypeInfo used in the currect function. + // TypeInfos - List of C++ TypeInfo used in the current function. // std::vectorGlobalVariable * TypeInfos; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineModuleInfo.h
Changes in directory llvm/include/llvm/CodeGen: MachineModuleInfo.h updated: 1.4 - 1.5 --- Log message: Add structures used for collecting eh information. --- Diffs of the changes: (+78 -0) MachineModuleInfo.h | 78 1 files changed, 78 insertions(+) Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h diff -u llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.4 llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.5 --- llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.4 Thu Feb 1 10:31:34 2007 +++ llvm/include/llvm/CodeGen/MachineModuleInfo.h Wed Feb 21 16:38:31 2007 @@ -44,6 +44,7 @@ class Constant; class DebugInfoDesc; class GlobalVariable; +class MachineBasicBlock; class MachineFunction; class MachineMove; class Module; @@ -949,6 +950,27 @@ }; //===--===// +/// LandingPadInfo - This structure is used to retain landing pad info for +/// the current function. +/// +struct LandingPadInfo { + MachineBasicBlock *LandingPadBlock; // Landing pad block. + unsigned BeginLabel; // Label prior to invoke. + unsigned EndLabel;// Label after invoke. + unsigned LandingPadLabel; // Label at beginning of landing pad. + Function *Personality;// Personality function. + std::vectorunsigned TypeIds;// List of type ids. + + LandingPadInfo(MachineBasicBlock *MBB) + : LandingPadBlock(MBB) + , BeginLabel(0) + , EndLabel(0) + , LandingPadLabel(0) + , TypeIds() + {} +}; + +//===--===// /// MachineModuleInfo - This class contains meta information specific to a /// module. Queries can be made by different debugging and exception handling /// schemes and reformated for specific use. @@ -987,6 +1009,14 @@ // FrameMoves - List of moves done by a function's prolog. Used to construct // frame maps by debug and exception handling consumers. std::vectorMachineMove FrameMoves; + + // LandingPads - List of LandingPadInfo describing the landing pad information + // in the current function. + std::vectorLandingPadInfo LandingPads; + + // TypeInfos - List of C++ TypeInfo used in the currect function. + // + std::vectorGlobalVariable * TypeInfos; public: MachineModuleInfo(); @@ -1147,6 +1177,54 @@ /// function's prologue. Used to construct frame maps for debug and exception /// handling comsumers. std::vectorMachineMove getFrameMoves() { return FrameMoves; } + + //===-EH-===// + + /// getOrCreateLandingPadInfo - Find or create an LandingPadInfo for the + /// specified MachineBasicBlock. + LandingPadInfo getOrCreateLandingPadInfo(MachineBasicBlock *LandingPad); + + /// addInvoke - Provide the begin and end labels of an invoke style call and + /// associate it with a try landing pad block. + void addInvoke(MachineBasicBlock *LandingPad, unsigned BeginLabel, +unsigned EndLabel); + + /// addLandingPad - Add a new panding pad. Returns the label ID for the + /// landing pad entry. + unsigned addLandingPad(MachineBasicBlock *LandingPad); + + /// addPersonality - Provide the personality function for the exception + /// information. + void addPersonality(MachineBasicBlock *LandingPad, Function *Personality); + + /// addCatchTypeInfo - Provide the catch typeinfo for a landing pad. + /// + void addCatchTypeInfo(MachineBasicBlock *LandingPad, +std::vectorGlobalVariable * TyInfo); + + /// getTypeIDFor - Return the type id for the specified typeinfo. This is + /// function wide. + unsigned getTypeIDFor(GlobalVariable *TI); + + /// TidyLandingPads - Remap landing pad labels and remove any deleted landing + /// pads. + void TidyLandingPads(); + + /// getLandingPadInfos - Return a reference to the landing pad info for the + /// current function. + const std::vectorLandingPadInfo getLandingPads() const { +return LandingPads; + } + + /// getTypeInfos - Return a reference to the C++ typeinfo for the current + /// function. + const std::vectorGlobalVariable * getTypeInfos() const { +return TypeInfos; + } + + /// getPersonality - Return a personality function if available. The presence + /// of one is required to emit exception handling info. + Function *getPersonality() const; }; // End class MachineModuleInfo ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineModuleInfo.h
Changes in directory llvm/include/llvm/CodeGen: MachineModuleInfo.h updated: 1.3 - 1.4 --- Log message: Support for non-landing pad exception handling. --- Diffs of the changes: (+0 -5) MachineModuleInfo.h |5 - 1 files changed, 5 deletions(-) Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h diff -u llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.3 llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.4 --- llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.3 Mon Jan 29 17:40:33 2007 +++ llvm/include/llvm/CodeGen/MachineModuleInfo.h Thu Feb 1 10:31:34 2007 @@ -1090,11 +1090,6 @@ return Lines; } - // FIXME: nuke this. - void ClearLineInfo() { -Lines.clear(); - } - /// SetupCompileUnits - Set up the unique vector of compile units. /// void SetupCompileUnits(Module M); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineModuleInfo.h
Changes in directory llvm/include/llvm/CodeGen: MachineModuleInfo.h updated: 1.1 - 1.2 --- Log message: Only gather frame info if debug or eh. --- Diffs of the changes: (+5 -0) MachineModuleInfo.h |5 + 1 files changed, 5 insertions(+) Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h diff -u llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.1 llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.2 --- llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.1 Fri Jan 26 15:38:26 2007 +++ llvm/include/llvm/CodeGen/MachineModuleInfo.h Mon Jan 29 17:20:22 2007 @@ -36,6 +36,7 @@ #include llvm/ADT/UniqueVector.h #include llvm/GlobalValue.h #include llvm/Pass.h +#include llvm/Target/TargetOptions.h namespace llvm { @@ -1025,6 +1026,10 @@ /// bool hasDebugInfo() const { return !CompileUnits.empty(); } + /// needsFrameInfo - Returns true if we need to gather callee-saved register + /// move info for the frame. + bool needsFrameInfo() const { return hasDebugInfo() || ExceptionHandling; } + /// NextLabelID - Return the next unique label id. /// unsigned NextLabelID() { ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineModuleInfo.h
Changes in directory llvm/include/llvm/CodeGen: MachineModuleInfo.h updated: 1.2 - 1.3 --- Log message: Out of line function. --- Diffs of the changes: (+1 -2) MachineModuleInfo.h |3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h diff -u llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.2 llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.3 --- llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.2 Mon Jan 29 17:20:22 2007 +++ llvm/include/llvm/CodeGen/MachineModuleInfo.h Mon Jan 29 17:40:33 2007 @@ -36,7 +36,6 @@ #include llvm/ADT/UniqueVector.h #include llvm/GlobalValue.h #include llvm/Pass.h -#include llvm/Target/TargetOptions.h namespace llvm { @@ -1028,7 +1027,7 @@ /// needsFrameInfo - Returns true if we need to gather callee-saved register /// move info for the frame. - bool needsFrameInfo() const { return hasDebugInfo() || ExceptionHandling; } + bool needsFrameInfo() const; /// NextLabelID - Return the next unique label id. /// ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineModuleInfo.h MachineDebugInfo.h
Changes in directory llvm/include/llvm/CodeGen: MachineModuleInfo.h added (r1.1) MachineDebugInfo.h (r1.48) removed --- Log message: rename files --- Diffs of the changes: (+1156 -0) MachineModuleInfo.h | 1156 1 files changed, 1156 insertions(+) Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h diff -c /dev/null llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.1 *** /dev/null Fri Jan 26 15:38:36 2007 --- llvm/include/llvm/CodeGen/MachineModuleInfo.h Fri Jan 26 15:38:26 2007 *** *** 0 --- 1,1156 + //===-- llvm/CodeGen/MachineModuleInfo.h *- C++ -*-===// + // + // The LLVM Compiler Infrastructure + // + // This file was developed by James M. Laskey and is distributed under + // the University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===--===// + // + // Collect meta information for a module. This information should be in a + // neutral form that can be used by different debugging and exception handling + // schemes. + // + // The organization of information is primarily clustered around the source + // compile units. The main exception is source line correspondence where + // inlining may interleave code from various compile units. + // + // The following information can be retrieved from the MachineModuleInfo. + // + // -- Source directories - Directories are uniqued based on their canonical + // string and assigned a sequential numeric ID (base 1.) + // -- Source files - Files are also uniqued based on their name and directory + // ID. A file ID is sequential number (base 1.) + // -- Source line correspondence - A vector of file ID, line#, column# triples. + // A DEBUG_LOCATION instruction is generated by the DAG Legalizer + // corresponding to each entry in the source line list. This allows a debug + // emitter to generate labels referenced by debug information tables. + // + //===--===// + + #ifndef LLVM_CODEGEN_MACHINEMODULEINFO_H + #define LLVM_CODEGEN_MACHINEMODULEINFO_H + + #include llvm/Support/Dwarf.h + #include llvm/Support/DataTypes.h + #include llvm/ADT/UniqueVector.h + #include llvm/GlobalValue.h + #include llvm/Pass.h + + namespace llvm { + + //===--===// + // Forward declarations. + class Constant; + class DebugInfoDesc; + class GlobalVariable; + class MachineFunction; + class MachineMove; + class Module; + class PointerType; + class StructType; + + //===--===// + // Debug info constants. + + enum { + LLVMDebugVersion = (6 16), // Current version of debug information. + LLVMDebugVersion5 = (5 16),// Constant for version 5. + LLVMDebugVersion4 = (4 16),// Constant for version 4. + LLVMDebugVersionMask = 0x // Mask for version number. + }; + + //===--===// + /// DIVisitor - Subclasses of this class apply steps to each of the fields in + /// the supplied DebugInfoDesc. + class DIVisitor { + public: + DIVisitor() {} + virtual ~DIVisitor() {} + + /// ApplyToFields - Target the visitor to each field of the debug information + /// descriptor. + void ApplyToFields(DebugInfoDesc *DD); + + /// Apply - Subclasses override each of these methods to perform the + /// appropriate action for the type of field. + virtual void Apply(int Field) = 0; + virtual void Apply(unsigned Field) = 0; + virtual void Apply(int64_t Field) = 0; + virtual void Apply(uint64_t Field) = 0; + virtual void Apply(bool Field) = 0; + virtual void Apply(std::string Field) = 0; + virtual void Apply(DebugInfoDesc *Field) = 0; + virtual void Apply(GlobalVariable *Field) = 0; + virtual void Apply(std::vectorDebugInfoDesc * Field) = 0; + }; + + //===--===// + /// DebugInfoDesc - This class is the base class for debug info descriptors. + /// + class DebugInfoDesc { + private: + unsigned Tag; // Content indicator. Dwarf values are + // used but that does not limit use to + // Dwarf writers. + + protected: + DebugInfoDesc(unsigned T) : Tag(T | LLVMDebugVersion) {} + + public: + virtual ~DebugInfoDesc() {} + + // Accessors + unsigned getTag() const { return Tag ~LLVMDebugVersionMask; } + unsigned getVersion() const { return Tag LLVMDebugVersionMask; } + void setTag(unsigned T) { Tag = T | LLVMDebugVersion; } + + /// TagFromGlobal - Returns the tag number from a debug info descriptor + ///
Re: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineModuleInfo.h MachineDebugInfo.h
I assmue llvm-gcc/gcc/llvm-debug.{h|cpp} needs to be updated as well? They are including MachineDebugInfo.h Evan On Jan 26, 2007, at 1:38 PM, Jim Laskey wrote: Changes in directory llvm/include/llvm/CodeGen: MachineModuleInfo.h added (r1.1) MachineDebugInfo.h (r1.48) removed --- Log message: rename files --- Diffs of the changes: (+1156 -0) MachineModuleInfo.h | 1156 1 files changed, 1156 insertions(+) Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h diff -c /dev/null llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.1 *** /dev/null Fri Jan 26 15:38:36 2007 --- llvm/include/llvm/CodeGen/MachineModuleInfo.h Fri Jan 26 15:38:26 2007 *** *** 0 --- 1,1156 + //===-- llvm/CodeGen/MachineModuleInfo.h *- C++ -*-===// + // + // The LLVM Compiler Infrastructure + // + // This file was developed by James M. Laskey and is distributed under + // the University of Illinois Open Source License. See LICENSE.TXT for details. + // + // ===--- ---===// + // + // Collect meta information for a module. This information should be in a + // neutral form that can be used by different debugging and exception handling + // schemes. + // + // The organization of information is primarily clustered around the source + // compile units. The main exception is source line correspondence where + // inlining may interleave code from various compile units. + // + // The following information can be retrieved from the MachineModuleInfo. + // + // -- Source directories - Directories are uniqued based on their canonical + // string and assigned a sequential numeric ID (base 1.) + // -- Source files - Files are also uniqued based on their name and directory + // ID. A file ID is sequential number (base 1.) + // -- Source line correspondence - A vector of file ID, line#, column# triples. + // A DEBUG_LOCATION instruction is generated by the DAG Legalizer + // corresponding to each entry in the source line list. This allows a debug + // emitter to generate labels referenced by debug information tables. + // + // ===--- ---===// + + #ifndef LLVM_CODEGEN_MACHINEMODULEINFO_H + #define LLVM_CODEGEN_MACHINEMODULEINFO_H + + #include llvm/Support/Dwarf.h + #include llvm/Support/DataTypes.h + #include llvm/ADT/UniqueVector.h + #include llvm/GlobalValue.h + #include llvm/Pass.h + + namespace llvm { + + // ===--- ---===// + // Forward declarations. + class Constant; + class DebugInfoDesc; + class GlobalVariable; + class MachineFunction; + class MachineMove; + class Module; + class PointerType; + class StructType; + + // ===--- ---===// + // Debug info constants. + + enum { + LLVMDebugVersion = (6 16), // Current version of debug information. + LLVMDebugVersion5 = (5 16),// Constant for version 5. + LLVMDebugVersion4 = (4 16),// Constant for version 4. + LLVMDebugVersionMask = 0x // Mask for version number. + }; + + // ===--- ---===// + /// DIVisitor - Subclasses of this class apply steps to each of the fields in + /// the supplied DebugInfoDesc. + class DIVisitor { + public: + DIVisitor() {} + virtual ~DIVisitor() {} + + /// ApplyToFields - Target the visitor to each field of the debug information + /// descriptor. + void ApplyToFields(DebugInfoDesc *DD); + + /// Apply - Subclasses override each of these methods to perform the + /// appropriate action for the type of field. + virtual void Apply(int Field) = 0; + virtual void Apply(unsigned Field) = 0; + virtual void Apply(int64_t Field) = 0; + virtual void Apply(uint64_t Field) = 0; + virtual void Apply(bool Field) = 0; + virtual void Apply(std::string Field) = 0; + virtual void Apply(DebugInfoDesc *Field) = 0; + virtual void Apply(GlobalVariable *Field) = 0; + virtual void Apply(std::vectorDebugInfoDesc * Field) = 0; + }; + + // ===--- ---===// + /// DebugInfoDesc - This class is the base class for debug info descriptors. + /// + class DebugInfoDesc { + private: + unsigned Tag; // Content indicator. Dwarf values are + // used but that does not limit use to + // Dwarf writers. + + protected: + DebugInfoDesc(unsigned T) : Tag(T | LLVMDebugVersion) {} + + public: +
Re: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineModuleInfo.h MachineDebugInfo.h
yes indeed. Give me a few. -- Jim On 26-Jan-07, at 06:09 PM, Evan Cheng wrote: I assmue llvm-gcc/gcc/llvm-debug.{h|cpp} needs to be updated as well? They are including MachineDebugInfo.h Evan On Jan 26, 2007, at 1:38 PM, Jim Laskey wrote: Changes in directory llvm/include/llvm/CodeGen: MachineModuleInfo.h added (r1.1) MachineDebugInfo.h (r1.48) removed --- Log message: rename files --- Diffs of the changes: (+1156 -0) MachineModuleInfo.h | 1156 +++ + 1 files changed, 1156 insertions(+) Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h diff -c /dev/null llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.1 *** /dev/null Fri Jan 26 15:38:36 2007 --- llvm/include/llvm/CodeGen/MachineModuleInfo.h Fri Jan 26 15:38:26 2007 *** *** 0 --- 1,1156 + //===-- llvm/CodeGen/MachineModuleInfo.h *- C++ -*-===// + // + // The LLVM Compiler Infrastructure + // + // This file was developed by James M. Laskey and is distributed under + // the University of Illinois Open Source License. See LICENSE.TXT for details. + // + // ===-- ===// + // + // Collect meta information for a module. This information should be in a + // neutral form that can be used by different debugging and exception handling + // schemes. + // + // The organization of information is primarily clustered around the source + // compile units. The main exception is source line correspondence where + // inlining may interleave code from various compile units. + // + // The following information can be retrieved from the MachineModuleInfo. + // + // -- Source directories - Directories are uniqued based on their canonical + // string and assigned a sequential numeric ID (base 1.) + // -- Source files - Files are also uniqued based on their name and directory + // ID. A file ID is sequential number (base 1.) + // -- Source line correspondence - A vector of file ID, line#, column# triples. + // A DEBUG_LOCATION instruction is generated by the DAG Legalizer + // corresponding to each entry in the source line list. This allows a debug + // emitter to generate labels referenced by debug information tables. + // + // ===-- ===// + + #ifndef LLVM_CODEGEN_MACHINEMODULEINFO_H + #define LLVM_CODEGEN_MACHINEMODULEINFO_H + + #include llvm/Support/Dwarf.h + #include llvm/Support/DataTypes.h + #include llvm/ADT/UniqueVector.h + #include llvm/GlobalValue.h + #include llvm/Pass.h + + namespace llvm { + + // ===-- ===// + // Forward declarations. + class Constant; + class DebugInfoDesc; + class GlobalVariable; + class MachineFunction; + class MachineMove; + class Module; + class PointerType; + class StructType; + + // ===-- ===// + // Debug info constants. + + enum { + LLVMDebugVersion = (6 16), // Current version of debug information. + LLVMDebugVersion5 = (5 16),// Constant for version 5. + LLVMDebugVersion4 = (4 16),// Constant for version 4. + LLVMDebugVersionMask = 0x // Mask for version number. + }; + + // ===-- ===// + /// DIVisitor - Subclasses of this class apply steps to each of the fields in + /// the supplied DebugInfoDesc. + class DIVisitor { + public: + DIVisitor() {} + virtual ~DIVisitor() {} + + /// ApplyToFields - Target the visitor to each field of the debug information + /// descriptor. + void ApplyToFields(DebugInfoDesc *DD); + + /// Apply - Subclasses override each of these methods to perform the + /// appropriate action for the type of field. + virtual void Apply(int Field) = 0; + virtual void Apply(unsigned Field) = 0; + virtual void Apply(int64_t Field) = 0; + virtual void Apply(uint64_t Field) = 0; + virtual void Apply(bool Field) = 0; + virtual void Apply(std::string Field) = 0; + virtual void Apply(DebugInfoDesc *Field) = 0; + virtual void Apply(GlobalVariable *Field) = 0; + virtual void Apply(std::vectorDebugInfoDesc * Field) = 0; + }; + + // ===-- ===// + /// DebugInfoDesc - This class is the base class for debug info descriptors. + /// + class DebugInfoDesc { + private: + unsigned Tag; // Content indicator. Dwarf values are + // used but that does not limit use to + // Dwarf writers. + + protected: + DebugInfoDesc(unsigned T) : Tag(T | LLVMDebugVersion) {} + + public: + virtual ~DebugInfoDesc() {} + + // Accessors +