* Handle internal functions in is_tm_pure_call
@ 2015-11-06 19:15 Richard Sandiford
2015-11-06 19:31 ` Jeff Law
0 siblings, 1 reply; 2+ messages in thread
From: Richard Sandiford @ 2015-11-06 19:15 UTC (permalink / raw)
To: gcc-patches
The upcoming changes to use internal functions for things like sqrt
caused a failure in gcc.dg/tm/20100610.c, because we were trying to get
call flags from the null gimple_call_fn of an IFN_SQRT call. We've been
making fairly heavy use of internal functions for a while now so I think
this might be latent.
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
OK to install?
Thanks,
Richard
gcc/
* trans-mem.c (is_tm_pure_call): Use gimple_call_flags for
internal functions.
diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c
index 45bc759..4583bd5 100644
--- a/gcc/trans-mem.c
+++ b/gcc/trans-mem.c
@@ -266,6 +266,9 @@ is_tm_safe (const_tree x)
static bool
is_tm_pure_call (gimple *call)
{
+ if (gimple_call_internal_p (call))
+ return (gimple_call_flags (call) & (ECF_CONST | ECF_TM_PURE)) != 0;
+
tree fn = gimple_call_fn (call);
if (TREE_CODE (fn) == ADDR_EXPR)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Handle internal functions in is_tm_pure_call
2015-11-06 19:15 Handle internal functions in is_tm_pure_call Richard Sandiford
@ 2015-11-06 19:31 ` Jeff Law
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2015-11-06 19:31 UTC (permalink / raw)
To: gcc-patches, richard.sandiford
On 11/06/2015 12:15 PM, Richard Sandiford wrote:
> The upcoming changes to use internal functions for things like sqrt
> caused a failure in gcc.dg/tm/20100610.c, because we were trying to get
> call flags from the null gimple_call_fn of an IFN_SQRT call. We've been
> making fairly heavy use of internal functions for a while now so I think
> this might be latent.
>
> Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
> OK to install?
>
> Thanks,
> Richard
>
>
> gcc/
> * trans-mem.c (is_tm_pure_call): Use gimple_call_flags for
> internal functions.
OK.
jeff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-06 19:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-06 19:15 Handle internal functions in is_tm_pure_call Richard Sandiford
2015-11-06 19:31 ` Jeff Law
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).