[llvm-commits] [Patch] New EH CodeGen

Bill Wendling wendling at apple.com
Tue Aug 2 11:30:20 PDT 2011


On Aug 2, 2011, at 11:18 AM, Jakob Stoklund Olesen wrote:

> 
> 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.
> 
Yeah. I forgot to remove the comment...

>> +//--------- NEW EH - Begin ---------
> 
> Was that left in intentionally?
> 
Yeah. Though it's not necessary. I can remove it easily.

> It looks like your patch is taking the same approach to codegen as before. That is only a temporary thing, right?
> 
Yes. I'm leveraging the existing system to get basic functionality down first. :)

> 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.
> 
Okay. I will try to avoid using them.

Thanks for the review!

-bw




More information about the llvm-commits mailing list