[llvm-commits] [PATCH] Revised LandingPadInst Patch

Duncan Sands baldrick at free.fr
Tue Aug 9 00:27:42 PDT 2011


Hi Bill,

> This is the next iteration of the landingpad instruction patch. It incorporates the feedback from Chris and Duncan. Notably, the values that are stored are now "Value*"s instead of "Function*" or "Constant*". Duncan pointed out that bitcasts can get in the way of things.

they are constant bitcasts (ConstExpr), so Constant* is fine.  I think Constant*
is better than Value*.

> The LandingPadInst has this ugly wart on it, namely the "Index" structure that Chris pointed out. I need a way to indicate the clause type for an object in the OperandList, it's index into that list, and how many "types" are associated with that. This is because of inlining. When we inline things, we are going to append the clauses to this list. And they need to be in the correct order so that the exception tables are generated correctly.

If you only had (say) filters and no catches, then you could use a null operand
to indicate the end of a sequence of filters, so you would have operands like
this:
not-null ... not-null null not-null ... not-null null
\___  filter1  ___/         \___  filter2  ___/
But you have both catches and filters, so need something more clever...  I
didn't come up with anything yet :)

Ciao, Duncan.



More information about the llvm-commits mailing list