[PATCH] D11861: [IR] Add token types

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 20:53:31 PDT 2015


majnemer added a comment.

In http://reviews.llvm.org/D11861#223510, @rjmccall wrote:

> Could you clarify what, exactly, it is about your personality routine that requires a single exit to correspond to a single entry?  Is that on a runtime level or just on a backend-lowering level?  I am having trouble imagining what on a runtime level would rely on sniffing the address of the return instruction from the cleanup routine, but I am also having trouble imagining what it is about lowering that justifies such an incredibly invasive change to IR.  You're introducing a type of "value" that instantly becomes a massive exception to every single standard rule about values.  You can't put them in memory, you can't put them in PHIs, you can't put them in selects, you can't propagate them into or out of functions, you can't clone an instruction that contains a use, and I'm sure there are a dozen other difficulties.


There are already values which may not be PHI'd or stuck in selects: `LabelTy`, `MetadataTy`, `FunctionTy`
There are also values which may not be loaded or stores to in memory: `opaque` structures, `MetadataTy`, `FunctionTy`, `LabelTy`
There are also values which cannot be passed into or out of functions and instructions which may not be cloned.

> This seems like a wildly general attempt at a solution, but its restrictions will probably prevent it from being useful for anything other than your EH problem, and I am very concerned that you will eventually discover that it isn't even all that useful or important for your EH problem, leaving this as an unwanted fruit simply bit-rotting on the vine.


It was, in fact, originally designed to handle a JIT deopt problem.  I am merely reusing it for my EH purposes.


http://reviews.llvm.org/D11861





More information about the llvm-commits mailing list