[llvm-commits] [Patch] New EH CodeGen

Jakob Stoklund Olesen stoklund at 2pi.dk
Tue Aug 2 11:18:43 PDT 2011


On Jul 30, 2011, at 12:23 AM, Bill Wendling wrote:

> This patch collects the information needed by the DWARF exception emitter from the new landingpad instruction. With this patch, we're able to compile a simple program with the new exception handling model.
> 
> Left to do: FastISel CodeGen.
> 
> Please review.

> +void SelectionDAGBuilder::visitLandingPad(const LandingPadInst &LP) {
> +  // FIXME: Handle this
> +  assert(FuncInfo.MBB->isLandingPad() &&
> +         "Call to landingpad not in landing pad!");

Isn't the assertion correct here? There is nothing to handle.

> +//--------- NEW EH - Begin ---------

Was that left in intentionally?


It looks like your patch is taking the same approach to codegen as before. That is only a temporary thing, right?

I think landing pads should be handled the same way we deal with the entry block. The values returned by the landingpad instruction are just like incoming function arguments. ISD::EXCEPTIONADDR and ISD::EHSELECTION shouldn't be necessary.

/jakob




More information about the llvm-commits mailing list