summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-alias.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-12-04 14:42:23 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-12-04 14:42:23 +0000
commit0d3ca08e1e03c5b1259f47dac776d8fb6b1a66bb (patch)
treed8d0f684663c0bb845825520cd93a658972b443f /gcc/tree-ssa-alias.c
parentc22477bd9b1ceafa4f51598158e0e89e29910b69 (diff)
downloadgcc-0d3ca08e1e03c5b1259f47dac776d8fb6b1a66bb.tar.gz
2009-12-04 Richard Guenther <rguenther@suse.de>
* tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Handle BUILT_IN_MALLOC. (call_may_clobber_ref_p_1): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154979 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. */