diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-12 10:36:08 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-12 10:36:08 +0000 |
commit | 153c3b5050025f879d92be6cd675dbb0686255e3 (patch) | |
tree | 9a3a2a1cd2ab3e673bfae829eadbac8146e824a5 /gcc/tree-flow.h | |
parent | aadb75a702993e265e9f0dbda27187420f0a9b1f (diff) | |
download | gcc-153c3b5050025f879d92be6cd675dbb0686255e3.tar.gz |
2010-08-12 Richard Guenther <rguenther@suse.de>
* tree-flow.h (struct ptr_info_def): Add align and misalign fields.
* tree-ssa-alias.c (get_ptr_info): Move ...
* tree-ssanames.c (get_ptr_info): ... here. Initialize
align and misalign fields conservatively.
* tree-ssa-ccp.c (ccp_finalize): From partially constant pointers
derive alignment information.
(evaluate_stmt): Derive alignment information from memory
allocation functions.
* tree.h (get_pointer_alignment): Make unsigned.
* builtins.c (get_object_alignment): Use alignment information we
have computed for pointers.
(get_pointer_alignment): Likewise. Make conservative, return
and unsigned value.
(expand_builtin_strlen): Adjust.
(expand_builtin_memcmp): Likewise.
(expand_builtin_strcmp): Likewise.
(expand_builtin_strncmp): Likewise.
(get_builtin_sync_mem): Use at least mode alignment.
(fold_builtin_memset): Adjust.
(fold_builtin_memory_op): Likewise.
* gimple-pretty-print.c (dump_gimple_phi): Alongside alias
information also dump pointer alignment knowledge.
(dump_gimple_stmt): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163189 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-flow.h')
-rw-r--r-- | gcc/tree-flow.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h index abbf9172a1c..04ba5325f11 100644 --- a/gcc/tree-flow.h +++ b/gcc/tree-flow.h @@ -119,6 +119,18 @@ struct GTY(()) ptr_info_def { /* The points-to solution. */ struct pt_solution pt; + + /* Alignment and misalignment of the pointer in bytes. Together + align and misalign specify low known bits of the pointer. + ptr & (align - 1) == misalign. */ + + /* The power-of-two byte alignment of the object this pointer + points into. This is usually DECL_ALIGN_UNIT for decls and + MALLOC_ABI_ALIGNMENT for allocated storage. */ + unsigned int align; + + /* The byte offset this pointer differs from the above alignment. */ + unsigned int misalign; }; |