[PATCH] D15405: [EHPersonality] Add a new personality enum to represent langindPad of token type

Chen Li via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 10 16:47:09 PST 2015


chenli added a comment.

> Ah, ok.  That makes sense, though it means that "similar to Unknown, except that LandingPads have token type" isn't exactly correct as a description for Token_LP.  Since you're wanting both token-valued landingpads and to opt into isNoOpWithoutInvoke, I wonder if it wouldn't be better to go ahead and be specific about your runtime like the other non-Unknown enum values ... call it AzulJVM or whatever in the enum and use the name of an appropriate function in your runtime as the string.  If you want the code in SelectionDAG to be more general, you could add a property like usesTokenLandingPads(EHPersonality Pers) to EHPersonalities.h which returns true for AzulJVM, and have SelectionDAG query through that.


I don't know if we should tie the token-valued landingpad to a specific runtime. I think it should be same as any other landingpads. The only reason we need to make it special today is that we don't have the support of extracting exception pointers or selector values from it, and therefore we need a way to recognize it and not assign those registers to it. In a long term, I think we should remove it from EHPersonality enum after having the support of extracting exception pointers and selector values, and make it the same as landingpad of struct type.


http://reviews.llvm.org/D15405





More information about the llvm-commits mailing list