/* Producing binary form of HSA BRIG from our internal representation.
- Copyright (C) 2013-2017 Free Software Foundation, Inc.
+ Copyright (C) 2013-2020 Free Software Foundation, Inc.
Contributed by Martin Jambor <mjambor@suse.cz> and
Martin Liska <mliska@suse.cz>.
#include "stor-layout.h"
#include "output.h"
#include "basic-block.h"
-#include "cfg.h"
#include "function.h"
+#include "cfg.h"
#include "fold-const.h"
#include "stringpool.h"
#include "gimple-pretty-print.h"
#include "cgraph.h"
#include "dumpfile.h"
#include "print-tree.h"
+#include "alloc-pool.h"
#include "symbol-summary.h"
#include "hsa-common.h"
#include "gomp-constants.h"
/* Structure representing a BRIG section, holding and writing its data. */
-class hsa_brig_section
+struct hsa_brig_section
{
-public:
/* Section name that will be output to the BRIG. */
const char *section_name;
/* Size in bytes of all data stored in the section. */
/* List of sbr instructions. */
static vec <hsa_insn_sbr *> *switch_instructions;
-struct function_linkage_pair
+class function_linkage_pair
{
+public:
function_linkage_pair (tree decl, unsigned int off)
: function_decl (decl), offset (off) {}
Return the offset of the directive. */
static unsigned
-emit_directive_variable (struct hsa_symbol *symbol)
+emit_directive_variable (class hsa_symbol *symbol)
{
struct BrigDirectiveVariable dirvar;
unsigned name_offset;
if (TREE_CODE (m_tree_value) == VECTOR_CST)
{
- int i, num = VECTOR_CST_NELTS (m_tree_value);
+ /* Variable-length vectors aren't supported. */
+ int i, num = VECTOR_CST_NELTS (m_tree_value).to_constant ();
for (i = 0; i < num; i++)
{
tree v = VECTOR_CST_ELT (m_tree_value, i);