Move the compact encoding from the target-specific library to the code-gen
authorBill Wendling <isanbard@gmail.com>
Mon, 18 Jul 2011 23:38:40 +0000 (23:38 +0000)
committerBill Wendling <isanbard@gmail.com>
Mon, 18 Jul 2011 23:38:40 +0000 (23:38 +0000)
library.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135443 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineModuleInfo.h
lib/CodeGen/MachineModuleInfo.cpp

index 33d5ffd9c365e5e92341f8e4508c4174b4c5ca73..96f825991611af63461612e5ede470b4f138ca19 100644 (file)
@@ -111,6 +111,10 @@ class MachineModuleInfo : public ImmutablePass {
   // frame maps by debug and exception handling consumers.
   std::vector<MachineMove> FrameMoves;
 
+  // CompactEncoding - If the target supports it, this is the compact unwind
+  // encoding. It replaces a function's CIE and FDE.
+  uint32_t CompactEncoding;
+
   // LandingPads - List of LandingPadInfo describing the landing pad information
   // in the current function.
   std::vector<LandingPadInfo> LandingPads;
@@ -230,6 +234,11 @@ public:
   /// handling comsumers.
   std::vector<MachineMove> &getFrameMoves() { return FrameMoves; }
 
+  /// getCompactEncoding - Returns the compact unwind encoding for a function if
+  /// the target supports the encoding. This encoding replaces a function's CIE
+  /// and FDE.
+  uint32_t getCompactEncoding() const { return CompactEncoding; }
+
   /// getAddrLabelSymbol - Return the symbol to be used for the specified basic
   /// block when its address is taken.  This cannot be its normal LBB label
   /// because the block may be accessed outside its containing function.
index 2b1c385c1fd2d718cd5158ea98ee37b9e85d11ef..652d2078ce2ecb04b516e7bba0b1e09abc20e016 100644 (file)
@@ -257,9 +257,9 @@ MachineModuleInfo::MachineModuleInfo(const MCAsmInfo &MAI,
                                      const MCRegisterInfo &MRI,
                                      const TargetAsmInfo *TAI)
   : ImmutablePass(ID), Context(MAI, MRI, TAI),
-  ObjFileMMI(0),
-  CurCallSite(0), CallsEHReturn(0), CallsUnwindInit(0), DbgInfoAvailable(false),
-  CallsExternalVAFunctionWithFloatingPointArguments(false) {
+    ObjFileMMI(0), CompactEncoding(0), CurCallSite(0), CallsEHReturn(0),
+    CallsUnwindInit(0), DbgInfoAvailable(false),
+    CallsExternalVAFunctionWithFloatingPointArguments(false) {
   initializeMachineModuleInfoPass(*PassRegistry::getPassRegistry());
   // Always emit some info, by default "no personality" info.
   Personalities.push_back(NULL);
@@ -312,6 +312,7 @@ void MachineModuleInfo::EndFunction() {
   FilterEnds.clear();
   CallsEHReturn = 0;
   CallsUnwindInit = 0;
+  CompactEncoding = 0;
   VariableDbgInfo.clear();
 }