On Sun, Jun 4, 2017 at 7:16 PM, Hal Finkel <hfinkel at anl.gov> wrote:> I'm not sure that it is a universal property of all intrinsics, strictly > speaking. patchpoints, for example, might recurse? It is certainly true for > most of them.Yes, patchpoints and statepoints may recurse. For instance void f() { llvm.patchpoint(&f); } has "mutual recursion" between the patchpoint intrinsic and f. -- Sanjoy
Piotr Padlewski via llvm-dev
2017-Jun-05 11:34 UTC
[llvm-dev] Is every intrinsic norecurse?
Oh right, here is a patch: https://reviews.llvm.org/D33889. I hope it will get through because I spent much time fixing all of the tests :) Piotr 2017-06-05 5:24 GMT+02:00 Sanjoy Das <sanjoy at playingwithpointers.com>:> On Sun, Jun 4, 2017 at 7:16 PM, Hal Finkel <hfinkel at anl.gov> wrote: > > I'm not sure that it is a universal property of all intrinsics, strictly > > speaking. patchpoints, for example, might recurse? It is certainly true > for > > most of them. > > Yes, patchpoints and statepoints may recurse. For instance > > void f() { > llvm.patchpoint(&f); > } > > has "mutual recursion" between the patchpoint intrinsic and f. > > -- Sanjoy >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170605/35c9822c/attachment.html>
Piotr Padlewski via llvm-dev
2017-Oct-16 15:33 UTC
[llvm-dev] Is every intrinsic norecurse?
(adding back llvm-dev) Hi David, The patch didn't get a lot of attention, so probably others does not consider it a huge deal. Anyway, if someone is willing to review this, I can pursue rebasing it. Piotr 2017-10-16 15:26 GMT+00:00 David Stenberg <david.stenberg at ericsson.com>:> Hi! > > What is the status of your patch? > > With our out-of-trunk target, we have seen a lot of cases where -g affects > code generation. This seems to be due to the lack of norecurse attributes > on dbg intrinsics affecting the parent function's norecurse attribute, > which in turn leads to GlobalOpt not localizing global variables that would > otherwise be localized. (This issue should probably also be present when > using clang on upstream targets, although I have not verified that.) > > Best regards, > David > > > -----Original Message----- > > From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of > > Piotr Padlewski via llvm-dev > > Sent: den 5 juni 2017 13:34 > > To: Sanjoy Das <sanjoy at playingwithpointers.com> > > Cc: llvm-dev <llvm-dev at lists.llvm.org> > > Subject: Re: [llvm-dev] Is every intrinsic norecurse? > > > > Oh right, here is a patch: https://reviews.llvm.org/D33889. I hope it > > will get through because I spent much time fixing all of the tests :) > > > > Piotr > > > > 2017-06-05 5:24 GMT+02:00 Sanjoy Das <sanjoy at playingwithpointers.com > > <mailto:sanjoy at playingwithpointers.com> >: > > > > > > On Sun, Jun 4, 2017 at 7:16 PM, Hal Finkel <hfinkel at anl.gov > > <mailto:hfinkel at anl.gov> > wrote: > > > I'm not sure that it is a universal property of all > > intrinsics, strictly > > > speaking. patchpoints, for example, might recurse? It is > > certainly true for > > > most of them. > > > > Yes, patchpoints and statepoints may recurse. For instance > > > > void f() { > > llvm.patchpoint(&f); > > } > > > > has "mutual recursion" between the patchpoint intrinsic and f. > > > > -- Sanjoy > > > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171016/2a086fbe/attachment.html>
David Stenberg via llvm-dev
2017-Oct-18 15:53 UTC
[llvm-dev] Is every intrinsic norecurse?
> From: piotrekpad at gmail.com [mailto:piotrekpad at gmail.com] On Behalf Of Piotr Padlewski > Sent: den 16 oktober 2017 17:33 > > Hi David, > The patch didn't get a lot of attention, so probably others does not > consider it a huge deal. Anyway, if someone is willing to review this, I > can pursue rebasing it.Okay. We are interested in getting something akin to your patch delivered; at least so that the dbg intrinsics gets marked as norecurse. Unfortunately I'm not very familiar with more "esoteric" intrinsics, so I can't bring anything special to the table when it comes to reviewing that the set of exempted intrinsics is correct. Other than that I can gladly help in whatever way to help this patch land. (I rebased your patch, and it seems like there where only a few, minor updates required in three files. Other than that, there are four tests in clang that need some smaller fixes.)> PiotrBest regards, David