[PATCH] D12533: [WinEH] Add llvm.eh.padparam intrinsic

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 1 09:28:28 PDT 2015


rnk added a comment.

This seems like it's kind of splitting the difference between extracttoken and specific intrinsics. Based on your proposal, I was envisioning having a family of intrinsics like:

  declare i32 @llvm.eh.exceptioncode(token)
  declare i8* @llvm.eh.exceptioninfo(token) ; I guess this is for SEH filters only, which we don't have yet...
  declare i8 @llvm.eh.abnormaltermination(token)
  declare i32 @llvm.eh.exceptionstate(token)

Then we don't need the llvm_any_ty mangling, and the IR seems more readable.

What use cases do you have for the additional parameters to padparam? If the extra parameters are used like an enum, where the backend has to switch on it and use custom code for different cases, then I think individual intrinsics are the way to go. If the extra parameters are more like an index into a list of register parameters (RCX, RDX, R8, R9, ...) or an index into argument stack slots, then llvm.eh.padparam seems like a reasonable approach.

We should also see what Sanjoy needs for GC.


http://reviews.llvm.org/D12533





More information about the llvm-commits mailing list