summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-alias.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-12-04 20:36:35 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-12-04 20:36:35 +0000
commit4dc2c60a897ef762e6ddbd6c52774bc37bd56fd3 (patch)
tree88a7abfd78b2c2c60c7ad216cd53ff0145afa88e /gcc/tree-ssa-alias.c
parente715205f2655663612e993567369dd71e16b1b29 (diff)
downloadgcc-4dc2c60a897ef762e6ddbd6c52774bc37bd56fd3.tar.gz
2009-12-04 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 154988 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@154994 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r--gcc/tree-ssa-alias.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index e7137087625..cbb43b5bfea 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -963,6 +963,7 @@ ref_maybe_used_by_call_p_1 (gimple call, ao_ref *ref)
}
/* The following builtins do not read from memory. */
case BUILT_IN_FREE:
+ case BUILT_IN_MALLOC:
case BUILT_IN_MEMSET:
case BUILT_IN_FREXP:
case BUILT_IN_FREXPF:
@@ -1187,6 +1188,10 @@ call_may_clobber_ref_p_1 (gimple call, ao_ref *ref)
size);
return refs_may_alias_p_1 (&dref, ref, false);
}
+ /* Allocating memory does not have any side-effects apart from
+ being the definition point for the pointer. */
+ case BUILT_IN_MALLOC:
+ return false;
/* Freeing memory kills the pointed-to memory. More importantly
the call has to serve as a barrier for moving loads and stores
across it. */