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

Duncan Sands baldrick at free.fr
Sat Jun 2 09:54:13 PDT 2007



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 @@
   SmallVector<unsigned, 1> EndLabels;   // Labels after invoke.
   unsigned LandingPadLabel;             // Label at beginning of landing pad.
   Function *Personality;                // Personality function.
-  std::vector<unsigned> TypeIds;        // List of type ids.
-  bool IsFilter;                        // Indicate if the landing pad is a
-                                        // throw filter.
-  
+  std::vector<int> TypeIds;             // List of type ids (filters negative)
+
   LandingPadInfo(MachineBasicBlock *MBB)
   : LandingPadBlock(MBB)
   , LandingPadLabel(0)
   , Personality(NULL)  
   , TypeIds()
-  , IsFilter(false)
   {}
 };
 
@@ -1021,6 +1018,10 @@
   //
   std::vector<GlobalVariable *> TypeInfos;
 
+  // FilterIds - List of typeids encoding filters used in the current function.
+  //
+  std::vector<unsigned> FilterIds;
+
   // Personalities - Vector of all personality functions ever seen. Used to emit
   // common EH frames.
   std::vector<Function *> Personalities;
@@ -1213,20 +1214,25 @@
   const std::vector<Function *>& getPersonalities() const {
     return Personalities;
   }
-    
+
   /// addCatchTypeInfo - Provide the catch typeinfo for a landing pad.
   ///
   void addCatchTypeInfo(MachineBasicBlock *LandingPad,
                         std::vector<GlobalVariable *> &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::vector<GlobalVariable *> &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::vector<unsigned> &TyIds);
+
   /// TidyLandingPads - Remap landing pad labels and remove any deleted landing
   /// pads.
   void TidyLandingPads();
@@ -1242,7 +1248,13 @@
   const std::vector<GlobalVariable *> &getTypeInfos() const {
     return TypeInfos;
   }
-  
+
+  /// getFilterIds - Return a reference to the typeids encoding filters used in
+  /// the current function.
+  const std::vector<unsigned> &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;






More information about the llvm-commits mailing list