-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[SandboxIR] Implement InvokeInst #100796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SandboxIR] Implement InvokeInst #100796
Conversation
BasicBlock *IfNormal, BasicBlock *IfException, | ||
ArrayRef<Value *> Args, Instruction *InsertBefore, | ||
Context &Ctx, const Twine &NameStr = ""); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is InvokeInstr missing a constructor with "InsertAtEnd" parameter? CallInstr has it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the issue is that in other instructions we had just two create()
functions, one with InsertBefore
and one with InsertAtEnd
. But both of these can be replaced by one create() function that takes as arguments a BasicBlock::Iterator WhereIt
and a BasicBlock *WhereBB
. Anyway, it's probably OK to either keep all three variants, or keep only one. I would need to revisit them with a refactoring patch. Any preference?
But anyway, I will add the missing create()
function with the InsertAtEnd
parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a preference but the LLVM IR has InsertPosition. Should we just create one for SandboxIR too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we should introduce a similar class in SandboxIR.
This patch implements sandboxir::InvokeInst which mirrors llvm::InvokeInst.
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/2191 Here is the relevant piece of the build log for the reference:
|
This patch implements sandboxir::InvokeInst which mirrors llvm::InvokeInst.