diff options
author | Reid Kleckner <rnk@google.com> | 2015-11-17 21:10:25 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2015-11-17 21:10:25 +0000 |
commit | c20276d0b2da8bff1e3da2fd80fc4d17f861eddd (patch) | |
tree | b9a45ab78fbb27616e40726209077d3acac213cc /llvm/lib/CodeGen/AsmPrinter/WinException.h | |
parent | c4e2bed73885b35ba82dd872cc20c9aa46ec774a (diff) | |
download | bcm5719-llvm-c20276d0b2da8bff1e3da2fd80fc4d17f861eddd.tar.gz bcm5719-llvm-c20276d0b2da8bff1e3da2fd80fc4d17f861eddd.zip |
[WinEH] Move WinEHFuncInfo from MachineModuleInfo to MachineFunction
Summary:
Now that there is a one-to-one mapping from MachineFunction to
WinEHFuncInfo, we don't need to use a DenseMap to select the right
WinEHFuncInfo for the current funclet.
The main challenge here is that X86WinEHStatePass is an IR pass that
doesn't have access to the MachineFunction. I gave it its own
WinEHFuncInfo object that it uses to calculate state numbers, which it
then throws away. As long as nobody creates or removes EH pads between
this pass and SDAG construction, we will get the same state numbers.
The other thing X86WinEHStatePass does is to mark the EH registration
node. Instead of communicating which alloca was the registration through
WinEHFuncInfo, I added the llvm.x86.seh.ehregnode intrinsic. This
intrinsic generates no code and simply marks the alloca in use.
Reviewers: JCTremoulet
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D14668
llvm-svn: 253378
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/WinException.h')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/WinException.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/WinException.h b/llvm/lib/CodeGen/AsmPrinter/WinException.h index 54c5f3a9a0e..acb30101691 100644 --- a/llvm/lib/CodeGen/AsmPrinter/WinException.h +++ b/llvm/lib/CodeGen/AsmPrinter/WinException.h @@ -42,7 +42,7 @@ class LLVM_LIBRARY_VISIBILITY WinException : public EHStreamer { void emitCSpecificHandlerTable(const MachineFunction *MF); - void emitSEHActionsForRange(WinEHFuncInfo &FuncInfo, + void emitSEHActionsForRange(const WinEHFuncInfo &FuncInfo, const MCSymbol *BeginLabel, const MCSymbol *EndLabel, int State); @@ -58,7 +58,7 @@ class LLVM_LIBRARY_VISIBILITY WinException : public EHStreamer { void emitCLRExceptionTable(const MachineFunction *MF); void computeIP2StateTable( - const MachineFunction *MF, WinEHFuncInfo &FuncInfo, + const MachineFunction *MF, const WinEHFuncInfo &FuncInfo, SmallVectorImpl<std::pair<const MCExpr *, int>> &IPToStateTable); /// Emits the label used with llvm.x86.seh.recoverfp, which is used by @@ -77,7 +77,7 @@ class LLVM_LIBRARY_VISIBILITY WinException : public EHStreamer { /// given index. For targets using CFI (Win64, etc), this is relative to the /// established SP at the end of the prologue. For targets without CFI (Win32 /// only), it is relative to the frame pointer. - int getFrameIndexOffset(int FrameIndex, WinEHFuncInfo &FuncInfo); + int getFrameIndexOffset(int FrameIndex, const WinEHFuncInfo &FuncInfo); public: //===--------------------------------------------------------------------===// |