OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [ifc-4.c] - Blame information for rev 749

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-c -O2 -ftree-vectorize -fdump-tree-ifcvt-stats" { target *-*-* } } */
3
 
4
struct ht
5
{
6
  void * (*alloc_subobject) (int);
7
};
8
typedef struct cpp_reader cpp_reader;
9
typedef struct cpp_token cpp_token;
10
typedef struct cpp_macro cpp_macro;
11
enum cpp_ttype
12
{
13
    CPP_PASTE,
14
};
15
struct cpp_token {
16
  __extension__ enum cpp_ttype type : 8;
17
} cpp_comment_table;
18
struct cpp_macro {
19
  union cpp_macro_u
20
  {
21
    cpp_token * tokens;
22
  } exp;
23
  unsigned int count;
24
};
25
struct cpp_reader
26
{
27
  struct ht *hash_table;
28
};
29
create_iso_definition (cpp_reader *pfile, cpp_macro *macro)
30
{
31
  unsigned int num_extra_tokens = 0;
32
  {
33
    cpp_token *tokns =
34
      (cpp_token *) pfile->hash_table->alloc_subobject (sizeof (cpp_token)
35
                                                        * macro->count);
36
    {
37
      cpp_token *normal_dest = tokns;
38
      cpp_token *extra_dest = tokns + macro->count - num_extra_tokens;
39
      unsigned int i;
40
      for (i = 0; i < macro->count; i++)
41
        {
42
          if (macro->exp.tokens[i].type == CPP_PASTE)
43
            *extra_dest++ = macro->exp.tokens[i];
44
          else
45
            *normal_dest++ = macro->exp.tokens[i];
46
        }
47
    }
48
  }
49
}
50
 
51
/* This cannot be if-converted because the stores are to aggregate types.  */
52
/* { dg-final { scan-tree-dump-times "Applying if-conversion" 0 "ifcvt" } } */
53
/* { dg-final { cleanup-tree-dump "ifcvt" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.