[llvm-commits] [Patch] Resume Instruction
Bill Wendling
wendling at apple.com
Sat Jul 30 21:58:54 PDT 2011
On Jul 30, 2011, at 10:16 AM, Chris Lattner wrote:
> On Jul 29, 2011, at 11:41 PM, Bill Wendling wrote:
>
>> This patch defines the 'resume' instruction and includes parsing of IR and bitcode.
>>
>> Please review.
>
> +class ResumeInst : public TerminatorInst {
> + ResumeInst(const ResumeInst &RI);
> +
> + explicit ResumeInst(LLVMContext &C, Value *Exn, Instruction *InsertBefore=0);
> + ResumeInst(LLVMContext &C, Value *Exn, BasicBlock *InsertAtEnd);
>
> Exn is required, right? (I missed it or this wasn't clear in your langref patch, please clarify it there if needed). Please remove the Context arguments from these and the ::Create methods.
>
> + Value *getResumeValue() const { return Op<0>(); }
>
> This should just be "getValue()".
>
> +++ lib/Target/CBackend/CBackend.cpp (working copy)
> @@ -288,10 +288,12 @@
> void visitInvokeInst(InvokeInst &I) {
> llvm_unreachable("Lowerinvoke pass didn't work!");
> }
> -
> void visitUnwindInst(UnwindInst &I) {
> llvm_unreachable("Lowerinvoke pass didn't work!");
> }
> + void visitResumeInst(ResumeInst &I) {
> + llvm_unreachable("Lowerinvoke pass didn't work!");
> + }
>
> This doesn't seem sufficient: LowerInvoke isn't handling resume in your patch. I'll assume that is coming later.
>
Yeah. It's one of the later patches (the DwarfEHPrepare one). Though this should say "DwarfEHPrepare pass didn't work".
> Otherwise, this looks good. Please feel free to commit this (with the Context argument's removed) after we settle on the LangRef patch.
>
Okay thanks. The revised version of the patch is attached. I had some questions about the LangRef patch (see other email). :-)
-bw
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eh.2.diff
Type: application/octet-stream
Size: 31346 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110730/fc454c7b/attachment.obj>
-------------- next part --------------
More information about the llvm-commits
mailing list