matrix-reorg.c: New file.
2007-05-07 Razya Ladelsky <razya@il.ibm.com> * matrix-reorg.c: New file. Implement matrix flattening and transposing optimization. * tree-pass.h: Add matrix reorg pass. * common.opt: Add fipa-mreorg flag. * Makefile.in: Add matrix-reorg.c. * passes.c: Add matrix reorg pass. * varpool.c (add_new_static_var): New function. * cgraph.h (add_new_static_var): Declare. From-SVN: r125126
This commit is contained in:
parent
4322c52f38
commit
43d861a5bc
8 changed files with 2406 additions and 1 deletions
|
@ -1,3 +1,15 @@
|
|||
2007-05-07 Razya Ladelsky <razya@il.ibm.com>
|
||||
|
||||
* matrix-reorg.c: New file. Implement matrix flattening and transposing
|
||||
optimization.
|
||||
* tree-pass.h: Add matrix reorg pass.
|
||||
* common.opt: Add fipa-mreorg flag.
|
||||
* Makefile.in: Add matrix-reorg.c.
|
||||
* passes.c: Add matrix reorg pass.
|
||||
* varpool.c (add_new_static_var): New function.
|
||||
* cgraph.h (add_new_static_var): Declare.
|
||||
|
||||
|
||||
2007-05-27 Eric Christopher <echristo@apple.com>
|
||||
|
||||
* config/rs6000/rs6000.c (rs6000_emit_prologue): Update
|
||||
|
|
|
@ -1178,6 +1178,7 @@ OBJS-archive = \
|
|||
ipa-type-escape.o \
|
||||
ipa-utils.o \
|
||||
ipa.o \
|
||||
matrix-reorg.o \
|
||||
tree-inline.o \
|
||||
tree-nomudflap.o \
|
||||
varpool.o
|
||||
|
@ -2400,6 +2401,9 @@ ipa-prop.o : ipa-prop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
|
|||
ipa-cp.o : ipa-cp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
|
||||
langhooks.h $(TARGET_H) $(CGRAPH_H) ipa-prop.h tree-inline.h tree-dump.h \
|
||||
$(TREE_FLOW_H) $(TM_H) tree-pass.h $(FLAGS_H) $(TREE_H) $(DIAGNOSTIC_H)
|
||||
matrix-reorg.o : matrix-reorg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
|
||||
$(TARGET_H) $(CGRAPH_H) $(TREE_FLOW_H) $(TM_H) tree-pass.h \
|
||||
$(FLAGS_H) $(TREE_H) $(DIAGNOSTIC_H)
|
||||
ipa-inline.o : ipa-inline.c gt-ipa-inline.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
||||
$(TREE_H) langhooks.h $(TREE_INLINE_H) $(FLAGS_H) $(CGRAPH_H) intl.h \
|
||||
$(DIAGNOSTIC_H) $(FIBHEAP_H) $(PARAMS_H) $(TIMEVAR_H) tree-pass.h \
|
||||
|
@ -2959,7 +2963,7 @@ GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h \
|
|||
$(srcdir)/cselib.h $(srcdir)/basic-block.h $(srcdir)/cgraph.h \
|
||||
$(srcdir)/reload.h \
|
||||
$(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c $(srcdir)/cgraph.c \
|
||||
$(srcdir)/ipa-prop.c $(srcdir)/ipa-cp.c $(srcdir)/ipa-inline.c \
|
||||
$(srcdir)/ipa-prop.c $(srcdir)/ipa-cp.c $(srcdir)/ipa-inline.c $(srcdir)/matrix-reorg.c \
|
||||
$(srcdir)/dbxout.c $(srcdir)/dwarf2out.c $(srcdir)/dwarf2asm.c \
|
||||
$(srcdir)/dojump.c \
|
||||
$(srcdir)/emit-rtl.c $(srcdir)/except.c $(srcdir)/explow.c $(srcdir)/expr.c \
|
||||
|
|
|
@ -410,4 +410,9 @@ varpool_next_static_initializer (struct varpool_node *node)
|
|||
void cgraph_clone_inlined_nodes (struct cgraph_edge *, bool, bool);
|
||||
void cgraph_mark_inline_edge (struct cgraph_edge *, bool);
|
||||
bool cgraph_default_inline_p (struct cgraph_node *, const char **);
|
||||
|
||||
|
||||
/* Create a new static variable of type TYPE. */
|
||||
tree add_new_static_var (tree type);
|
||||
|
||||
#endif /* GCC_CGRAPH_H */
|
||||
|
|
|
@ -584,6 +584,11 @@ fipa-type-escape
|
|||
Common Report Var(flag_ipa_type_escape) Init(0) Optimization
|
||||
Type based escape and alias analysis
|
||||
|
||||
fipa-matrix-reorg
|
||||
Common Report Var(flag_ipa_matrix_reorg)
|
||||
Perform matrix layout flattening and transposing based
|
||||
on profiling information.
|
||||
|
||||
fivopts
|
||||
Common Report Var(flag_ivopts) Init(1) Optimization
|
||||
Optimize induction variables on trees
|
||||
|
|
2351
gcc/matrix-reorg.c
Normal file
2351
gcc/matrix-reorg.c
Normal file
File diff suppressed because it is too large
Load diff
|
@ -506,6 +506,7 @@ init_optimization_passes (void)
|
|||
NEXT_PASS (pass_inline_parameters);
|
||||
}
|
||||
NEXT_PASS (pass_ipa_increase_alignment);
|
||||
NEXT_PASS (pass_ipa_matrix_reorg);
|
||||
NEXT_PASS (pass_ipa_cp);
|
||||
NEXT_PASS (pass_ipa_inline);
|
||||
NEXT_PASS (pass_ipa_reference);
|
||||
|
|
|
@ -316,6 +316,7 @@ extern struct tree_opt_pass pass_build_cgraph_edges;
|
|||
extern struct tree_opt_pass pass_reset_cc_flags;
|
||||
|
||||
/* IPA Passes */
|
||||
extern struct tree_opt_pass pass_ipa_matrix_reorg;
|
||||
extern struct tree_opt_pass pass_ipa_cp;
|
||||
extern struct tree_opt_pass pass_ipa_inline;
|
||||
extern struct tree_opt_pass pass_ipa_early_inline;
|
||||
|
|
|
@ -33,6 +33,8 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
|
|||
#include "debug.h"
|
||||
#include "target.h"
|
||||
#include "output.h"
|
||||
#include "tree-gimple.h"
|
||||
#include "tree-flow.h"
|
||||
|
||||
/* This file contains basic routines manipulating variable pool.
|
||||
|
||||
|
@ -459,4 +461,28 @@ varpool_output_debug_info (void)
|
|||
timevar_pop (TV_SYMOUT);
|
||||
}
|
||||
|
||||
/* Create a new global variable of type TYPE. */
|
||||
tree
|
||||
add_new_static_var (tree type)
|
||||
{
|
||||
tree new_decl;
|
||||
struct varpool_node *new_node;
|
||||
|
||||
new_decl = create_tmp_var (type, NULL);
|
||||
DECL_NAME (new_decl) = create_tmp_var_name (NULL);
|
||||
TREE_READONLY (new_decl) = 0;
|
||||
TREE_STATIC (new_decl) = 1;
|
||||
TREE_USED (new_decl) = 1;
|
||||
DECL_CONTEXT (new_decl) = NULL_TREE;
|
||||
DECL_ABSTRACT (new_decl) = 0;
|
||||
lang_hooks.dup_lang_specific_decl (new_decl);
|
||||
create_var_ann (new_decl);
|
||||
new_node = varpool_node (new_decl);
|
||||
varpool_mark_needed_node (new_node);
|
||||
add_referenced_var (new_decl);
|
||||
varpool_finalize_decl (new_decl);
|
||||
|
||||
return new_node->decl;
|
||||
}
|
||||
|
||||
#include "gt-varpool.h"
|
||||
|
|
Loading…
Add table
Reference in a new issue