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/UseDefChains.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/UseDefChains.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/includes/compiler/UseDefChains.h b/includes/compiler/UseDefChains.h index bcdbfe0..6957897 100644 --- a/includes/compiler/UseDefChains.h +++ b/includes/compiler/UseDefChains.h @@ -2,5 +2,65 @@ #define COMPILER_USEDEFCHAINS_H #include "compiler/common.h" +#include "compiler/Registers.h" +#include "compiler/PCodeInfo.h" + +#ifdef __MWERKS__ +#pragma options align=mac68k +#endif +typedef struct TinyValue { + PCOpKind kind; + unsigned char arg; + union { + short reg; + Object *object; + } u; +} TinyValue; + +typedef struct UseDefInfo { + UInt32 *defvec0; + UInt32 *defvec4; + UInt32 *defvec8; + UInt32 *defvecC; + UInt32 *usevec10; + UInt32 *usevec14; + UInt32 *usevec18; + UInt32 *usevec1C; +} UseDefInfo; + +typedef struct UseOrDef { + PCode *pcode; + TinyValue v; +} UseOrDef; + +typedef struct RegUseOrDef { + struct RegUseOrDef *next; + int id; +} RegUseOrDef; + +typedef struct ObjectUseDef { + struct ObjectUseDef *next; + struct ObjectUseDef *leftchild; + struct ObjectUseDef *rightchild; + Object *object; + RegUseOrDef *uses; + RegUseOrDef *defs; +} ObjectUseDef; +#ifdef __MWERKS__ +#pragma options align=reset +#endif + +extern int number_of_Defs; +extern UseOrDef *Defs; +extern RegUseOrDef **reg_Defs[RegClassMax]; +extern int number_of_Uses; +extern UseOrDef *Uses; +extern RegUseOrDef **reg_Uses[RegClassMax]; +extern UseDefInfo *usedefinfo; +extern ObjectUseDef *objectusedefs; +extern ObjectUseDef *objectusedeflist; + +extern ObjectUseDef *findobjectusedef(Object *object); +extern void computeusedefchains(int flag); #endif |