summaryrefslogtreecommitdiff
path: root/gcc/varpool.c
diff options
context:
space:
mode:
authorrazya <razya@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-28 11:10:27 +0000
committerrazya <razya@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-28 11:10:27 +0000
commit604cde738b5e08e4b7ec76087373e25e1ad3f07b (patch)
tree438fd56569603b56035ec8c6adb7973791f877e6 /gcc/varpool.c
parentac15809b87e138f25481c3e994e30bd946b4cc6d (diff)
downloadgcc-604cde738b5e08e4b7ec76087373e25e1ad3f07b.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125126 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/varpool.c')
-rw-r--r--gcc/varpool.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/varpool.c b/gcc/varpool.c
index 7791ada4bc3..17327260d5e 100644
--- a/gcc/varpool.c
+++ b/gcc/varpool.c
@@ -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"