-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[SandboxIR] Implement ReturnInst #99784
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
Conversation
llvm/lib/SandboxIR/SandboxIR.cpp
Outdated
@@ -540,6 +540,48 @@ void StoreInst::dump() const { | |||
dump(dbgs()); | |||
dbgs() << "\n"; | |||
} | |||
#endif // NDEBUG | |||
|
|||
Value *ReturnInst::create(Value *RetVal, Instruction *InsertBefore, |
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.
Return type should be ReturnInst * to be consistent with definition and other create*Inst()
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.
Ah yes, in this case we can return RetunInst *
. In some other cases it gets folded by the IRBuilder, but not here.
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.
LGTM and inline and consistent with how other instructions like StoreInst were added, approving it.
This patch add the implementation of the SandboxIR ReturnInst which mirrors llvm::ReturnInst.
Summary: This patch adds the implementation of the SandboxIR ReturnInst which mirrors llvm::ReturnInst. Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251325
This patch add the implementation of the SandboxIR ReturnInst which mirrors llvm::ReturnInst.