[PATCH] D69868: Allow "callbr" to return non-void values

2020-02-24 Thread Bill Wendling via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG23c2a5ce33f0: Allow callbr to return non-void values (authored by void). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69868/new/

[PATCH] D69868: Allow "callbr" to return non-void values

2020-02-24 Thread Bill Wendling via Phabricator via cfe-commits
void marked 2 inline comments as done. void added inline comments. Comment at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:137 + /// List of indirect targets of the callbr of a basic block. + SmallPtrSet InlineAsmBrIndirectTargets; + nickdesaulniers wrote: >

[PATCH] D69868: Allow "callbr" to return non-void values

2020-02-21 Thread Quentin Colombet via Phabricator via cfe-commits
qcolombet added a comment. > I've been concerned about the register live-ins too (I'm less concerned about > the successors issue). Is there documentation on the original decision to > disallow physical register live-ins for MBBs before register allocation? We > could then check to see if

[PATCH] D69868: Allow "callbr" to return non-void values

2020-02-19 Thread Chris Lattner via Phabricator via cfe-commits
lattner accepted this revision. lattner added a comment. I'm super excited to see this progress towards supporting 'asm goto' with results! Great work! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69868/new/ https://reviews.llvm.org/D69868

[PATCH] D69868: Allow "callbr" to return non-void values

2020-02-19 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. Would you be okay with me submitting this and working on making INLINEASM_BR a non-terminator? I'd like to give this feature some bake time. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69868/new/

[PATCH] D69868: Allow "callbr" to return non-void values

2020-02-19 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D69868#1883687 , @jyknight wrote: > Ugh, it's actually been that long, hasn't it...I'm really sorry about that. :( No worries. Thanks for getting back to us! > I've been actively spending time to look at this over the last

[PATCH] D69868: Allow "callbr" to return non-void values

2020-02-19 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. Ugh, it's actually been that long, hasn't it...I'm really sorry about that. :( I've been actively spending time to look at this over the last couple weeks. I haven't been able to convince myself that the weird-successors and having allocatable registers across BBs

[PATCH] D69868: Allow "callbr" to return non-void values

2020-02-19 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. This revision is now accepted and ready to land. This code has now been tested on a running Linux kernel making use of the feature. I still would like @jyknight to clarify his comments, consider explicitly requesting

[PATCH] D69868: Allow "callbr" to return non-void values

2020-02-18 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D69868#1881985 , @void wrote: > It's been almost a month since the last comments on this review. If you need > more time, please comment here. Otherwise, I will submit this with the > current approvals by the end of the

[PATCH] D69868: Allow "callbr" to return non-void values

2020-02-18 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. It's been almost a month since the last comments on this review. If you need more time, please comment here. Otherwise, I will submit this with the current approvals by the end of the week. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D69868: Allow "callbr" to return non-void values

2020-02-15 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 244840. void added a comment. Use the BB when creating the MBB. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69868/new/ https://reviews.llvm.org/D69868 Files: llvm/docs/LangRef.rst

[PATCH] D69868: Allow "callbr" to return non-void values

2020-02-14 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. Another friendly ping. :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69868/new/ https://reviews.llvm.org/D69868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D69868: Allow "callbr" to return non-void values

2020-02-05 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 242752. void added a comment. Use iterator for machine operands. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69868/new/ https://reviews.llvm.org/D69868 Files: llvm/docs/LangRef.rst

[PATCH] D69868: Allow "callbr" to return non-void values

2020-02-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. I think this is fine, but want to hear from @jyknight and @rnk. Comment at: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp:1039 + auto = BB->back(); + for (unsigned i = 0; i < Last.getNumOperands(); ++i)

[PATCH] D69868: Allow "callbr" to return non-void values

2020-02-05 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. My apologies for being a pest, but I wanted to know the status of reviews for this bug. @jyknight & @rnk, do you have further comments or need more time? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69868/new/

[PATCH] D69868: Allow "callbr" to return non-void values

2020-02-03 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. Friendly ping. :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69868/new/ https://reviews.llvm.org/D69868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D69868: Allow "callbr" to return non-void values

2020-01-29 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D69868#1848327 , @MaskRay wrote: > @rnk Thoughts on passing live-in formation (a bit similar to WinEH catchpad) > to `callbr` at the SelectionDAG stage? To help with the review, here are some of the assumptions I'm making about

[PATCH] D69868: Allow "callbr" to return non-void values

2020-01-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. @rnk Thoughts on passing live-in formation (a bit similar to WinEH catchpad) to `callbr` at the SelectionDAG stage? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69868/new/ https://reviews.llvm.org/D69868

[PATCH] D69868: Allow "callbr" to return non-void values

2020-01-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. It seems that callbr (with output) will now be similar to a catchpad. It can set live-in physical register information. (See `test/CodeGen/X86/{seh-catch-all.ll,seh-exception-code.ll,wineh-coreclr.ll,wineh-exceptionpointer.ll}`) Is there any caveat doing this? Add @rnk

[PATCH] D69868: Allow "callbr" to return non-void values

2020-01-23 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D69868#1836777 , @jyknight wrote: > The idea of moving the copies to a new MachineBasicBlock seems a reasonable > solution. That said, it does mean there will be allocatable physical > registers which are live-in to the

[PATCH] D69868: Allow "callbr" to return non-void values

2020-01-23 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. The idea of moving the copies to a new MachineBasicBlock seems a reasonable solution. That said, it does mean there will be allocatable physical registers which are live-in to the following block, which is generally not allowed. As far as I can tell, I _think_ that

[PATCH] D69868: Allow "callbr" to return non-void values

2020-01-23 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D69868#1832725 , @MaskRay wrote: > In D69868#1832559 , @void wrote: > > > @jyknight Do you think you'll have time to review this patch this week? I'd > > like to get it into the 10.0

[PATCH] D69868: Allow "callbr" to return non-void values

2020-01-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D69868#1832559 , @void wrote: > @jyknight Do you think you'll have time to review this patch this week? I'd > like to get it into the 10.0 release if possible. :-) I volunteer as a reviewer:) Repository: rG LLVM Github

[PATCH] D69868: Allow "callbr" to return non-void values

2020-01-21 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. @jyknight Do you think you'll have time to review this patch this week? I'd like to get it into the 10.0 release if possible. :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69868/new/ https://reviews.llvm.org/D69868

[PATCH] D69868: Allow "callbr" to return non-void values

2020-01-20 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 239231. void added a comment. Herald added a subscriber: MatzeB. Split the machine basic block after an INLINEASM_BR instruction that has outputs. The copies then end up in a separate block and the back end doesn't have to deal with COPY instructions between two

[PATCH] D69868: Allow "callbr" to return non-void values

2020-01-19 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 239026. void added a comment. Update so that each MBB has a list of indirect dests of INLINEASM_BR instructions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69868/new/ https://reviews.llvm.org/D69868 Files: llvm/docs/LangRef.rst

[PATCH] D69868: Allow "callbr" to return non-void values

2020-01-15 Thread Bill Wendling via Phabricator via cfe-commits
void marked an inline comment as done. void added inline comments. Comment at: llvm/lib/CodeGen/MachineVerifier.cpp:701 + } else if (MBB->succ_size() == LandingPadSuccs.size() || + MBB->succ_size() == IndirectPadSuccs.size()) { // It's possible that

[PATCH] D69868: Allow "callbr" to return non-void values

2020-01-13 Thread Bill Wendling via Phabricator via cfe-commits
void marked 2 inline comments as done. void added inline comments. Comment at: llvm/lib/CodeGen/MachineVerifier.cpp:701 + } else if (MBB->succ_size() == LandingPadSuccs.size() || + MBB->succ_size() == IndirectPadSuccs.size()) { // It's possible that

[PATCH] D69868: Allow "callbr" to return non-void values

2020-01-10 Thread James Y Knight via Phabricator via cfe-commits
jyknight added inline comments. Comment at: llvm/lib/CodeGen/MachineVerifier.cpp:701 + } else if (MBB->succ_size() == LandingPadSuccs.size() || + MBB->succ_size() == IndirectPadSuccs.size()) { // It's possible that the block legitimately ends with a

[PATCH] D69868: Allow "callbr" to return non-void values

2020-01-10 Thread Bill Wendling via Phabricator via cfe-commits
void marked an inline comment as done. void added inline comments. Comment at: llvm/lib/CodeGen/MachineVerifier.cpp:701 + } else if (MBB->succ_size() == LandingPadSuccs.size() || + MBB->succ_size() == IndirectPadSuccs.size()) { // It's possible that

[PATCH] D69868: Allow "callbr" to return non-void values

2020-01-10 Thread James Y Knight via Phabricator via cfe-commits
jyknight added inline comments. Comment at: llvm/lib/CodeGen/MachineVerifier.cpp:701 + } else if (MBB->succ_size() == LandingPadSuccs.size() || + MBB->succ_size() == IndirectPadSuccs.size()) { // It's possible that the block legitimately ends with a

[PATCH] D69868: Allow "callbr" to return non-void values

2020-01-09 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 237224. void added a comment. The plus constraints are now at the end of the input/output/label list. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69868/new/ https://reviews.llvm.org/D69868 Files:

[PATCH] D69868: Allow "callbr" to return non-void values

2020-01-07 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 236716. void added a comment. Missed a change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69868/new/ https://reviews.llvm.org/D69868 Files: llvm/docs/LangRef.rst

[PATCH] D69868: Allow "callbr" to return non-void values

2020-01-07 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 236710. void added a comment. Remove check that the successor may be in the indirect list of a callbr instruction. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69868/new/ https://reviews.llvm.org/D69868 Files:

[PATCH] D69868: Allow "callbr" to return non-void values

2020-01-07 Thread Bill Wendling via Phabricator via cfe-commits
void marked 5 inline comments as done. void added inline comments. Comment at: llvm/lib/CodeGen/MachineBasicBlock.cpp:1115-1116 + if (Succ->hasAddressTaken()) +if (auto *bb = Succ->getBasicBlock()) + if (auto *cbr = dyn_cast(getBasicBlock()->getTerminator())) +

[PATCH] D69868: Allow "callbr" to return non-void values

2020-01-03 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added subscribers: MaskRay, echristo. rnk added a comment. More reviewers: +@echristo @MaskRay Comment at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:133 + /// Indicate that this basic block is the indirect dest of an INLINEASM_BR. + bool IsInlineAsmBrIndirectPad =

[PATCH] D69868: Allow "callbr" to return non-void values

2019-12-25 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added subscribers: aaron.ballman, xbolva00. xbolva00 added inline comments. Comment at: llvm/lib/CodeGen/MachineBasicBlock.cpp:1116 +if (auto *cbr = dyn_cast(getBasicBlock()->getTerminator())) + if (cbr->getDefaultDest() != bb) +for (unsigned i = 0, e =

[PATCH] D69868: Allow "callbr" to return non-void values

2019-12-17 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 234403. void added a comment. Fix bad update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69868/new/ https://reviews.llvm.org/D69868 Files: llvm/docs/LangRef.rst

[PATCH] D69868: Allow "callbr" to return non-void values

2019-12-17 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: llvm/lib/CodeGen/MachineBasicBlock.cpp:1116 +if (auto *cbr = dyn_cast(getBasicBlock()->getTerminator())) + if (cbr->getDefaultDest() != bb) +for (unsigned i = 0, e = cbr->getNumIndirectDests(); i != e; ++i)

[PATCH] D69868: Allow "callbr" to return non-void values

2019-12-17 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 234402. void marked 3 inline comments as done. void added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69868/new/