summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineModuleInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/MachineModuleInfo.h')
-rw-r--r--include/llvm/CodeGen/MachineModuleInfo.h42
1 files changed, 13 insertions, 29 deletions
diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h
index 4cdfe2463c99..77571124a1b8 100644
--- a/include/llvm/CodeGen/MachineModuleInfo.h
+++ b/include/llvm/CodeGen/MachineModuleInfo.h
@@ -35,11 +35,12 @@
#include "llvm/ADT/PointerIntPair.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
-#include "llvm/Analysis/LibCallSemantics.h"
+#include "llvm/Analysis/EHPersonalities.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/ValueHandle.h"
#include "llvm/MC/MCContext.h"
+#include "llvm/MC/MCSymbol.h"
#include "llvm/MC/MachineLocation.h"
#include "llvm/Pass.h"
#include "llvm/Support/DataTypes.h"
@@ -59,7 +60,6 @@ class MachineFunction;
class Module;
class PointerType;
class StructType;
-struct WinEHFuncInfo;
struct SEHHandler {
// Filter or finally function. Null indicates a catch-all.
@@ -79,13 +79,10 @@ struct LandingPadInfo {
SmallVector<MCSymbol *, 1> EndLabels; // Labels after invoke.
SmallVector<SEHHandler, 1> SEHHandlers; // SEH handlers active at this lpad.
MCSymbol *LandingPadLabel; // Label at beginning of landing pad.
- const Function *Personality; // Personality function.
std::vector<int> TypeIds; // List of type ids (filters negative).
- int WinEHState; // WinEH specific state number.
explicit LandingPadInfo(MachineBasicBlock *MBB)
- : LandingPadBlock(MBB), LandingPadLabel(nullptr), Personality(nullptr),
- WinEHState(-1) {}
+ : LandingPadBlock(MBB), LandingPadLabel(nullptr) {}
};
//===----------------------------------------------------------------------===//
@@ -163,6 +160,13 @@ class MachineModuleInfo : public ImmutablePass {
bool CallsEHReturn;
bool CallsUnwindInit;
+ bool HasEHFunclets;
+
+ // TODO: Ideally, what we'd like is to have a switch that allows emitting
+ // synchronous (precise at call-sites only) CFA into .eh_frame. However,
+ // even under this switch, we'd like .debug_frame to be precise when using.
+ // -g. At this moment, there's no way to specify that some CFI directives
+ // go into .eh_frame only, while others go into .debug_frame only.
/// DbgInfoAvailable - True if debugging information is available
/// in this module.
@@ -182,8 +186,6 @@ class MachineModuleInfo : public ImmutablePass {
EHPersonality PersonalityTypeCache;
- DenseMap<const Function *, std::unique_ptr<WinEHFuncInfo>> FuncInfoMap;
-
public:
static char ID; // Pass identification, replacement for typeid
@@ -220,12 +222,6 @@ public:
void setModule(const Module *M) { TheModule = M; }
const Module *getModule() const { return TheModule; }
- const Function *getWinEHParent(const Function *F) const;
- WinEHFuncInfo &getWinEHFuncInfo(const Function *F);
- bool hasWinEHFuncInfo(const Function *F) const {
- return FuncInfoMap.count(getWinEHParent(F)) > 0;
- }
-
/// getInfo - Keep track of various per-function pieces of information for
/// backends that would like to do so.
///
@@ -252,6 +248,9 @@ public:
bool callsUnwindInit() const { return CallsUnwindInit; }
void setCallsUnwindInit(bool b) { CallsUnwindInit = b; }
+ bool hasEHFunclets() const { return HasEHFunclets; }
+ void setHasEHFunclets(bool V) { HasEHFunclets = V; }
+
bool usesVAFloatArgument() const {
return UsesVAFloatArgument;
}
@@ -318,16 +317,8 @@ public:
/// addPersonality - Provide the personality function for the exception
/// information.
- void addPersonality(MachineBasicBlock *LandingPad,
- const Function *Personality);
void addPersonality(const Function *Personality);
- void addWinEHState(MachineBasicBlock *LandingPad, int State);
-
- /// getPersonalityIndex - Get index of the current personality function inside
- /// Personalitites array
- unsigned getPersonalityIndex() const;
-
/// getPersonalities - Return array of personality functions ever seen.
const std::vector<const Function *>& getPersonalities() const {
return Personalities;
@@ -426,13 +417,6 @@ public:
return FilterIds;
}
- /// getPersonality - Return a personality function if available. The presence
- /// of one is required to emit exception handling info.
- const Function *getPersonality() const;
-
- /// Classify the personality function amongst known EH styles.
- EHPersonality getPersonalityType();
-
/// setVariableDbgInfo - Collect information used to emit debugging
/// information of a variable.
void setVariableDbgInfo(const DILocalVariable *Var, const DIExpression *Expr,