5 * The "storage" that underlies an incoming/outgoing pseudo. It's
6 * basically the backing store for a pseudo, and may be a real hw
7 * register, a stack slot or a static symbol. Or nothing at all,
8 * since some pseudos can just be recalculated on the fly.
26 DECLARE_PTR_LIST(storage_ptr_list
, struct storage
*);
29 enum storage_type type
;
31 struct storage_ptr_list
*users
;
39 DECLARE_PTR_LIST(storage_list
, struct storage
);
42 struct basic_block
*bb
;
44 enum inout_enum inout
;
45 struct storage
*storage
;
49 DECLARE_PTR_LIST(storage_hash_list
, struct storage_hash
);
51 extern struct storage_hash_list
*gather_storage(struct basic_block
*, enum inout_enum
);
52 extern void free_storage(void);
53 extern const char *show_storage(struct storage
*);
54 extern void set_up_storage(struct entrypoint
*);
55 struct storage
*lookup_storage(struct basic_block
*, pseudo_t
, enum inout_enum
);
56 void add_storage(struct storage
*, struct basic_block
*, pseudo_t
, enum inout_enum
);
58 DECLARE_ALLOCATOR(storage
);
59 DECLARE_ALLOCATOR(storage_hash
);
61 static inline struct storage
*alloc_storage(void)
63 return __alloc_storage(0);
66 static inline struct storage_hash
*alloc_storage_hash(struct storage
*s
)
68 struct storage_hash
*entry
= __alloc_storage_hash(0);
69 struct storage
**usep
= &entry
->storage
;
72 add_ptr_list(&s
->users
, usep
);
76 #endif /* STORAGE_H */