2022-11-20 05:07:22 +00:00
|
|
|
#ifndef COMPILER_ALIAS_H
|
|
|
|
#define COMPILER_ALIAS_H
|
|
|
|
|
|
|
|
#include "compiler/common.h"
|
|
|
|
|
2022-12-14 00:16:59 +00:00
|
|
|
#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);
|
|
|
|
|
2022-11-20 05:07:22 +00:00
|
|
|
#endif
|