Re: [clang] 857bf5d - [FIX] Do not copy an llvm::function_ref if it has to be reused

2020-03-30 Thread David Blaikie via cfe-commits
On Fri, Mar 27, 2020 at 5:16 PM Arthur O'Dwyer via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Richard: Okay, filed https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94376 ! > > David: You are correct, the bug in function_ref appeared only when > constructing from `const function_ref&&`. When I

Re: [clang] 857bf5d - [FIX] Do not copy an llvm::function_ref if it has to be reused

2020-03-27 Thread Arthur O'Dwyer via cfe-commits
On Fri, Mar 27, 2020 at 8:16 PM Arthur O'Dwyer wrote: > Richard: Okay, filed https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94376 ! > > David: You are correct, the bug in function_ref appeared only when > constructing from `const function_ref&&`. When I said that the constructor > template suppress

Re: [clang] 857bf5d - [FIX] Do not copy an llvm::function_ref if it has to be reused

2020-03-27 Thread Arthur O'Dwyer via cfe-commits
Richard: Okay, filed https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94376 ! David: You are correct, the bug in function_ref appeared only when constructing from `const function_ref&&`. When I said that the constructor template suppressed the copy constructor, I was wrong. The implicitly generated co

Re: [clang] 857bf5d - [FIX] Do not copy an llvm::function_ref if it has to be reused

2020-03-27 Thread Richard Smith via cfe-commits
On Fri, 27 Mar 2020 at 16:35, David Blaikie via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Thu, Mar 26, 2020 at 8:49 PM Richard Smith > wrote: > >> On Thu, 26 Mar 2020 at 17:07, David Blaikie via cfe-commits < >> cfe-commits@lists.llvm.org> wrote: >> >>> On Thu, Mar 26, 2020 at 3:12 PM

Re: [clang] 857bf5d - [FIX] Do not copy an llvm::function_ref if it has to be reused

2020-03-27 Thread Richard Smith via cfe-commits
On Thu, 26 Mar 2020 at 21:50, Arthur O'Dwyer via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Thu, Mar 26, 2020 at 11:49 PM Richard Smith > wrote: > >> On Thu, 26 Mar 2020 at 17:07, David Blaikie via cfe-commits < >> cfe-commits@lists.llvm.org> wrote: >> >>> On Thu, Mar 26, 2020 at 3:12

Re: [clang] 857bf5d - [FIX] Do not copy an llvm::function_ref if it has to be reused

2020-03-27 Thread David Blaikie via cfe-commits
On Thu, Mar 26, 2020 at 8:49 PM Richard Smith wrote: > On Thu, 26 Mar 2020 at 17:07, David Blaikie via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> On Thu, Mar 26, 2020 at 3:12 PM Arthur O'Dwyer >> wrote: >> >>> I'm not sure, but I do see that the call stack contains a call to >>> >>>

Re: [clang] 857bf5d - [FIX] Do not copy an llvm::function_ref if it has to be reused

2020-03-26 Thread Arthur O'Dwyer via cfe-commits
On Thu, Mar 26, 2020 at 11:49 PM Richard Smith wrote: > On Thu, 26 Mar 2020 at 17:07, David Blaikie via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> On Thu, Mar 26, 2020 at 3:12 PM Arthur O'Dwyer >> wrote: >> >>> I'm not sure, but I do see that the call stack contains a call to >>> >>

Re: [clang] 857bf5d - [FIX] Do not copy an llvm::function_ref if it has to be reused

2020-03-26 Thread Richard Smith via cfe-commits
On Thu, 26 Mar 2020 at 17:07, David Blaikie via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Thu, Mar 26, 2020 at 3:12 PM Arthur O'Dwyer > wrote: > >> I'm not sure, but I do see that the call stack contains a call to >> >> bool llvm::function_ref> bool)>::callback_fn >> const>(long, cla

Re: [clang] 857bf5d - [FIX] Do not copy an llvm::function_ref if it has to be reused

2020-03-26 Thread David Blaikie via cfe-commits
On Thu, Mar 26, 2020 at 3:12 PM Arthur O'Dwyer wrote: > I'm not sure, but I do see that the call stack contains a call to > > bool llvm::function_ref bool)>::callback_fn > const>(long, clang::Expr*&, bool) > > Notice that this is function_ref::callback_fn instantiated with > T=function_ref itsel

Re: [clang] 857bf5d - [FIX] Do not copy an llvm::function_ref if it has to be reused

2020-03-26 Thread Arthur O'Dwyer via cfe-commits
I'm not sure, but I do see that the call stack contains a call to bool llvm::function_ref::callback_fn const>(long, clang::Expr*&, bool) Notice that this is function_ref::callback_fn instantiated with T=function_ref itself; i.e., we do have a function_ref to a function_ref. This is the thing I wa

Re: [clang] 857bf5d - [FIX] Do not copy an llvm::function_ref if it has to be reused

2020-03-26 Thread David Blaikie via cfe-commits
Hey Richard - could you help try to diagnose what's happening here? I reverted this patch in: https://github.com/llvm/llvm-project/commit/0d0b90105f92f6cd9cc7004d565834f4429183fb But that did actually cause buildbot failures, such as these ones: http://lab.llvm.org:8011/builders/clang-ppc64be-linu

Re: [clang] 857bf5d - [FIX] Do not copy an llvm::function_ref if it has to be reused

2020-03-23 Thread Johannes Doerfert via cfe-commits
Apologies for the confusion. I wrote the commit message after looking into this and I though the issue was related to the capture by copy in the inner llvm::any_of and the reuse in the outer. Looking back at the code I cannot say anymore how I got that impression. If you think the reference is

Re: [clang] 857bf5d - [FIX] Do not copy an llvm::function_ref if it has to be reused

2020-03-22 Thread David Blaikie via cfe-commits
Reverted in 0d0b90105f92f6cd9cc7004d565834f4429183fb & I'll see what happens with the buildbots. On Sun, Mar 22, 2020 at 5:47 PM Johannes Doerfert wrote: > > Apologies for the confusion. > > I wrote the commit message after looking into this and I though the > issue was related to the capture by

Re: [clang] 857bf5d - [FIX] Do not copy an llvm::function_ref if it has to be reused

2020-03-22 Thread Arthur O'Dwyer via cfe-commits
On Sun, Mar 22, 2020 at 1:48 PM David Blaikie via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Sun, Mar 22, 2020 at 10:40 AM Johannes Doerfert > wrote: > >> Some buildbots, I think only Windows buildbots for some reason, crashed >> in this function. >> >> The reason, as described, is tha

Re: [clang] 857bf5d - [FIX] Do not copy an llvm::function_ref if it has to be reused

2020-03-22 Thread Johannes Doerfert via cfe-commits
Some buildbots, I think only Windows buildbots for some reason, crashed in this function. The reason, as described, is that an `llvm::function_ref` cannot be copied and then reused. It just happened to work on almost all configurations. The change was not a "shot in the dark" but identified

Re: [clang] 857bf5d - [FIX] Do not copy an llvm::function_ref if it has to be reused

2020-03-22 Thread David Blaikie via cfe-commits
On Sun, Mar 22, 2020 at 10:40 AM Johannes Doerfert wrote: > Some buildbots, I think only Windows buildbots for some reason, crashed > in this function. > > The reason, as described, is that an `llvm::function_ref` cannot be > copied and then reused. It just happened to work on almost all > config

Re: [clang] 857bf5d - [FIX] Do not copy an llvm::function_ref if it has to be reused

2020-03-21 Thread David Blaikie via cfe-commits
"a problem" seems a smidge vague - was there a specific explanation for the kind of problem that was signalled? Or was this fix a bit of a shot in the dark? On Sat, Feb 15, 2020 at 10:55 PM Johannes Doerfert via cfe-commits < cfe-commits@lists.llvm.org> wrote: > > Author: Johannes Doerfert > Date

[clang] 857bf5d - [FIX] Do not copy an llvm::function_ref if it has to be reused

2020-02-15 Thread Johannes Doerfert via cfe-commits
Author: Johannes Doerfert Date: 2020-02-16T00:51:11-06:00 New Revision: 857bf5da35af8e1f9425e1865dab5f5fce5e38f2 URL: https://github.com/llvm/llvm-project/commit/857bf5da35af8e1f9425e1865dab5f5fce5e38f2 DIFF: https://github.com/llvm/llvm-project/commit/857bf5da35af8e1f9425e1865dab5f5fce5e38f2.d