Commit 912442c2 by Nathan Sidwell Committed by Nathan Sidwell

nvptx.c (bb_pair_t, [...]): New types.

	gcc/
	* config/nvptx/nvptx.c (bb_pair_t, bb_pair_vec_t): New types.
	(pseudo_node_t, struct bracket, bracket_vec_t): New types.
	(struct bb_sese): New struct.
	(bb_sese::~bb_sese, bb_sese::append, bb_sese::remove): New.
	(BB_GET_SESE, BB_SET_SESE): Define.
	(nvptx_sese_number, nvptx_sese_pseudo, nvptx_sese_color): New.
	(nvptx_find_sese): New.
	(nvptx_neuter_pars): Find SESE regions when optimizing.

	gcc/testsuite/
	* gcc.dg/goacc/nvptx-sese-1.c: New.

From-SVN: r230561
parent 482a338d
2015-11-18 Nathan Sidwell <nathan@codesourcery.com>
* config/nvptx/nvptx.c (bb_pair_t, bb_pair_vec_t): New types.
(pseudo_node_t, struct bracket, bracket_vec_t): New types.
(struct bb_sese): New struct.
(bb_sese::~bb_sese, bb_sese::append, bb_sese::remove): New.
(BB_GET_SESE, BB_SET_SESE): Define.
(nvptx_sese_number, nvptx_sese_pseudo, nvptx_sese_color): New.
(nvptx_find_sese): New.
(nvptx_neuter_pars): Find SESE regions when optimizing.
2015-11-18 Alan Modra <amodra@gmail.com>
* config/rs6000/rs6000.c (use_toc_relative_ref): Ignore
2015-11-18 Nathan Sidwell <nathan@codesourcery.com>
* gcc.dg/goacc/nvptx-sese-1.c: New.
2015-11-18 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/renaming7.adb: New test.
......
/* { dg-do link } */
/* { dg-require-effective-target offload_nvptx } */
/* { dg-options "-fopenacc -O2 -foffload=-fdump-rtl-mach\\ -dumpbase\\ nvptx-sese-1.c\\ -Wa,--no-verify" } */
#pragma acc routine seq
int __attribute__((noinline)) foo (int x)
{
return x & 2;
}
int main ()
{
int r = 0;
#pragma acc parallel copy(r) vector_length(32)
{
#pragma acc loop vector reduction (+:r)
for (int i = 00; i < 40; i++)
r += i;
/* This piece is a multi-block SESE region */
if (foo (r))
r *= 2;
if (r & 1) /* to here. */
#pragma acc loop vector reduction (+:r)
for (int i = 00; i < 40; i++)
r += i;
}
return 0;
}
/* Match {N->N(.N)+} */
/* { dg-final { scan-rtl-dump "SESE regions:.* \[0-9\]+{\[0-9\]+->\[0-9\]+(\\.\[0-9\]+)+}" "mach" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment