summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beirg.h
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-02-15 02:04:32 +0100
committerMatthias Braun <matze@braunis.de>2016-04-04 00:20:12 +0200
commitb6787e36eb0d99eb28f4fb478932e0c9ed094e90 (patch)
tree6ebad7cccab3ec6cf31ed7ce87ac3b9139f5d04f /ir/be/beirg.h
parentf2b6fca42c0970aa27fcdc5657968995b818a477 (diff)
be: Rewrite stack frame handling
This is a bigger rewrite of stack frame handling in the backend: - Do the stack frame type layout late, after all the spill slots have been created. This way we can avoid (and remove) the brittle frame_alloc_area(). - Standardize the meaning of stack entity offsets. After stack frame type layout they are relative to the stack pointer position at the beginning of the function. It is all in one type now, no splitting into "arg", "between" and "stack_frame" type anymore. - Generalize the stack pointer simulation code to work with a single callback. Represent stack state as current offset and align_padding number. Now that callbacks can access and modify them both we do not need custom code in the sparc backend anymore. - Remove alignment specification on IncSP, only keep a ignore_align flag used for the last IncSP that has to remove all existing sp adjustments and may end up on a misaligned SP on ia32/amd64. - Align stack by default on ia32+amd64 backends.
Diffstat (limited to 'ir/be/beirg.h')
-rw-r--r--ir/be/beirg.h30
1 files changed, 0 insertions, 30 deletions
diff --git a/ir/be/beirg.h b/ir/be/beirg.h
index 5877576..3cd72ec 100644
--- a/ir/be/beirg.h
+++ b/ir/be/beirg.h
@@ -36,30 +36,6 @@ void be_invalidate_live_chk(ir_graph *irg);
*/
void be_free_birg(ir_graph *irg);
-/** The number of parts of the stack layout. */
-#define N_FRAME_TYPES 3
-
-/**
- * This type describes the stack layout.
- * The stack is divided into 3 parts:
- * - arg_type: A struct type describing the stack arguments and its order.
- * - between_type: A struct type describing the stack layout between arguments
- * and frame type. In architectures that put the return address
- * automatically on the stack, the return address is put here.
- * - frame_type: A class type describing the frame layout.
- */
-struct be_stack_layout_t {
- ir_type *arg_type;
- ir_type *between_type;
- ir_type *frame_type;
- ir_type *order[N_FRAME_TYPES]; /**< arg, between and frame types ordered. */
- /** the initial difference between stack pointer and frame pointer */
- int initial_offset;
- int initial_bias; /**< the initial stack bias */
- /** entities are addressed relative to stack pointer (omit-fp mode) */
- bool sp_relative : 1;
-};
-
/**
* An ir_graph with additional analysis data about this irg. Also includes some
* backend structures
@@ -67,7 +43,6 @@ struct be_stack_layout_t {
typedef struct be_irg_t {
be_main_env_t *main_env;
be_lv_t *lv;
- be_stack_layout_t stack_layout;
/** bitset of registers available for the allocator */
unsigned *allocatable_regs;
/** bitset of registers for which verification errors are not reported.
@@ -104,9 +79,4 @@ static inline struct obstack *be_get_be_obst(const ir_graph *irg)
return obst;
}
-static inline be_stack_layout_t *be_get_irg_stack_layout(const ir_graph *irg)
-{
- return &be_birg_from_irg(irg)->stack_layout;
-}
-
#endif