[llvm-dev] RFC: New function attribute HasInaccessibleState
David Majnemer via llvm-dev
llvm-dev at lists.llvm.org
Fri Dec 4 09:16:29 PST 2015
I'd like to suggest a different direction which should accomplish similar
ends.
I think it would make sense to introduce an attribute: csecandidate.
If we see a call-site "X" marked as csecandidate, it would imply that it
can be replaced with any other call-site "Y" with the same arguments which
dominate the call-site at "X".
However, there are some cases that this would not be able to optimize. For
example, if we have two csecandidates ("X" and "Y") which do not dominate
one another. This is solvable using another attribute: speculatable. This
attribute would tell us that we can hoist the call out of arbitrary
conditions. This would allow us to move our csecandidate call-site to the
common dominator of "X" and "Y" and RAUW.
On Fri, Dec 4, 2015 at 8:54 AM, Krzysztof Parzyszek via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> On 12/4/2015 10:48 AM, Vaivaswatha Nagaraj via llvm-dev wrote:
>
>> This point however reminds me to add, functions that transitively call
>> functions with HasInaccessibleState must also have the flag set.
>>
>
> That's in practice impossible to guarantee, both by the compiler and by
> the programmer.
>
> -Krzysztof
>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
> by The Linux Foundation
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151204/19233c23/attachment.html>
More information about the llvm-dev
mailing list