[PATCH] [SEH] Add new intrinsics for recovering and restoring parent frames
David Majnemer
david.majnemer at gmail.com
Tue Jun 30 15:32:02 PDT 2015
LGTM with comments addressed.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:15019
@@ +15018,3 @@
+ default:
+ llvm_unreachable("can only recover FP for MSVC EH personality functions");
+ case EHPersonality::MSVC_X86SEH: RegNodeSize = 24; break;
----------------
Maybe make this a fatal error.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:15486-15491
@@ -15443,1 +15485,8 @@
+
+ case Intrinsic::x86_seh_recoverfp: {
+ SDValue FnOp = Op.getOperand(1);
+ SDValue IncomingFPOp = Op.getOperand(2);
+ auto *Fn = cast<Function>(cast<GlobalAddressSDNode>(FnOp)->getGlobal());
+ return recoverFramePointer(DAG, Fn, IncomingFPOp);
+ }
}
----------------
Does somebody need to make sure the argument is pointing at a function? (verifer or backend fatal error or somesuch).
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:15704
@@ -15655,1 +15703,3 @@
+ SelectionDAG &DAG) {
+ //llvm::errs() << "LowerSEHRESTOREFRAME\n";
MachineFunction &MF = DAG.getMachineFunction();
----------------
Dead code?
http://reviews.llvm.org/D10848
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list