diff options
author | Ash Wolf <ninji@wuffs.org> | 2022-12-14 00:16:59 +0000 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2022-12-14 00:16:59 +0000 |
commit | 25bab8b1fb2fc851ea3f1f630b3de65ca6afdc22 (patch) | |
tree | c0ee632aa3752884b996c562622e2ece88216ea4 /includes/compiler/Alias.h | |
parent | 9d2728a5605f651934fe67a6fe6986b3e4a2c011 (diff) | |
download | MWCC-25bab8b1fb2fc851ea3f1f630b3de65ca6afdc22.tar.gz MWCC-25bab8b1fb2fc851ea3f1f630b3de65ca6afdc22.zip |
haha it's been a while since i last committed, hasn't it
Diffstat (limited to '')
-rw-r--r-- | includes/compiler/Alias.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/includes/compiler/Alias.h b/includes/compiler/Alias.h index 39f7220..08dbb00 100644 --- a/includes/compiler/Alias.h +++ b/includes/compiler/Alias.h @@ -3,4 +3,57 @@ #include "compiler/common.h" +#ifdef __MWERKS__ +#pragma options align=mac68k +#endif +typedef struct AliasMember AliasMember; + +typedef enum AliasType { + AliasType0, + AliasType1, + AliasType2 +} AliasType; + +struct Alias { + Alias *next; + Alias *hashNext; + AliasMember *children; + AliasMember *parents; + Object *object; + SInt32 offset; + SInt32 size; + int valuenumber; + PCode *valuepcode; + UInt32 *vec24; + int index; + AliasType type; +}; + +struct AliasMember { + AliasMember *nextParent; + AliasMember *nextChild; + Alias *parent; + Alias *child; +}; +#ifdef __MWERKS__ +#pragma options align=reset +#endif + +extern Alias *worst_case; +extern Object worst_case_obj; + +extern void initialize_aliases(void); +extern Alias *make_alias(Object *object, SInt32 offset, SInt32 size); +extern Alias *make_alias_set(void); +extern void add_alias_member(Alias *parent, Alias *child); +extern Alias *make_alias_set_from_IR(void); +extern void gather_alias_info(void); +extern Boolean may_alias(PCode *a, PCode *b); +extern Boolean uniquely_aliases(PCode *a, PCode *b); +extern Boolean may_alias_worst_case(PCode *pcode); +extern Boolean may_alias_object(PCode *pcode, Object *object); +extern void initialize_alias_values(void); +extern void update_alias_value(Alias *alias, PCode *pcode); +extern void update_all_alias_values(void); + #endif |