PIPS
cloning.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _newgen_struct_clone_context_
 

Macros

#define _gen_cloning_start   169
 
#define _newgen_entity_domain_defined_
 
#define ENTITY_NEWGEN_DOMAIN   (entity_domain)
 
#define entity_NEWGEN_DOMAIN   (entity_domain)
 
#define _newgen_statement_domain_defined_
 newgen_entity_domain_defined More...
 
#define STATEMENT_NEWGEN_DOMAIN   (statement_domain)
 
#define statement_NEWGEN_DOMAIN   (statement_domain)
 
#define clone_context_domain   (_gen_cloning_start+0)
 newgen_statement_domain_defined More...
 
#define _newgen_clone_context_domain_defined_
 
#define CLONE_CONTEXT_NEWGEN_DOMAIN   (clone_context_domain)
 
#define clone_context_NEWGEN_DOMAIN   (clone_context_domain)
 
#define CLONE_CONTEXT(x)   ((clone_context)((x).p))
 newgen_clone_context_domain_defined More...
 
#define clone_context_CAST(x)   CLONE_CONTEXT(x)
 
#define CLONE_CONTEXT_CAST(x)   CLONE_CONTEXT(x)
 
#define CLONE_CONTEXT_(x)   ((x).e)
 
#define CLONE_CONTEXT_TYPE   clone_context
 
#define clone_context_TYPE   clone_context
 
#define clone_context_undefined   ((clone_context)gen_chunk_undefined)
 
#define clone_context_undefined_p(x)   ((x)==clone_context_undefined)
 
#define gen_CLONE_CONTEXT_cons   gen_clone_context_cons
 
#define clone_context_domain_number(x)   ((x)->_type_)
 
#define clone_context_previous_module_(x)   clone_context_previous_module(x) /**old hack compatible */
 
#define clone_context_previous_module(x)   ((x)->_clone_context_previous_module_)
 
#define clone_context_new_module_(x)   clone_context_new_module(x) /**old hack compatible */
 
#define clone_context_new_module(x)   ((x)->_clone_context_new_module_)
 
#define clone_context_labels_(x)   clone_context_labels(x) /**old hack compatible */
 
#define clone_context_labels(x)   ((x)->_clone_context_labels_)
 
#define clone_context_new_module_statement_(x)   clone_context_new_module_statement(x) /**old hack compatible */
 
#define clone_context_new_module_statement(x)   ((x)->_clone_context_new_module_statement_)
 
#define cloning_spec   "\--NEWGEN-START 169\n\import entity from \"ri.newgen\";\n\import statement from \"ri.newgen\";\n\clone_context = previous_module:entity x new_module:entity x labels:entity* x persistant new_module_statement:statement;\n\"
 

Typedefs

typedef struct _newgen_struct_entity_entity
 
typedef struct _newgen_struct_statement_statement
 
typedef struct _newgen_struct_clone_context_clone_context
 

Functions

clone_context copy_clone_context (clone_context)
 CLONE_CONTEXT. More...
 
void free_clone_context (clone_context)
 
clone_context check_clone_context (clone_context)
 
bool clone_context_consistent_p (clone_context)
 
bool clone_context_defined_p (clone_context)
 
list gen_clone_context_cons (clone_context, list)
 
void clone_context_assign_contents (clone_context, clone_context)
 
void clone_context_non_recursive_free (clone_context)
 
void write_clone_context (FILE *, clone_context)
 
clone_context read_clone_context (FILE *)
 
clone_context make_clone_context (entity, entity, list, statement)
 

Macro Definition Documentation

◆ _gen_cloning_start

#define _gen_cloning_start   169

Definition at line 3 of file cloning.h.

◆ _newgen_clone_context_domain_defined_

#define _newgen_clone_context_domain_defined_

Definition at line 26 of file cloning.h.

◆ _newgen_entity_domain_defined_

#define _newgen_entity_domain_defined_

Definition at line 11 of file cloning.h.

◆ _newgen_statement_domain_defined_

#define _newgen_statement_domain_defined_

newgen_entity_domain_defined

Definition at line 18 of file cloning.h.

◆ CLONE_CONTEXT

#define CLONE_CONTEXT (   x)    ((clone_context)((x).p))

newgen_clone_context_domain_defined

CLONE_CONTEXT

Definition at line 34 of file cloning.h.

◆ CLONE_CONTEXT_

#define CLONE_CONTEXT_ (   x)    ((x).e)

Definition at line 37 of file cloning.h.

◆ clone_context_CAST

#define clone_context_CAST (   x)    CLONE_CONTEXT(x)

Definition at line 35 of file cloning.h.

◆ CLONE_CONTEXT_CAST

#define CLONE_CONTEXT_CAST (   x)    CLONE_CONTEXT(x)

Definition at line 36 of file cloning.h.

◆ clone_context_domain

#define clone_context_domain   (_gen_cloning_start+0)

newgen_statement_domain_defined

Definition at line 24 of file cloning.h.

◆ clone_context_domain_number

#define clone_context_domain_number (   x)    ((x)->_type_)

Definition at line 64 of file cloning.h.

◆ clone_context_labels

#define clone_context_labels (   x)    ((x)->_clone_context_labels_)

Definition at line 70 of file cloning.h.

◆ clone_context_labels_

#define clone_context_labels_ (   x)    clone_context_labels(x) /**old hack compatible */

Definition at line 69 of file cloning.h.

◆ clone_context_new_module

#define clone_context_new_module (   x)    ((x)->_clone_context_new_module_)

Definition at line 68 of file cloning.h.

◆ clone_context_new_module_

#define clone_context_new_module_ (   x)    clone_context_new_module(x) /**old hack compatible */

Definition at line 67 of file cloning.h.

◆ clone_context_new_module_statement

#define clone_context_new_module_statement (   x)    ((x)->_clone_context_new_module_statement_)

Definition at line 72 of file cloning.h.

◆ clone_context_new_module_statement_

#define clone_context_new_module_statement_ (   x)    clone_context_new_module_statement(x) /**old hack compatible */

Definition at line 71 of file cloning.h.

◆ CLONE_CONTEXT_NEWGEN_DOMAIN

#define CLONE_CONTEXT_NEWGEN_DOMAIN   (clone_context_domain)

Definition at line 27 of file cloning.h.

◆ clone_context_NEWGEN_DOMAIN

#define clone_context_NEWGEN_DOMAIN   (clone_context_domain)

Definition at line 28 of file cloning.h.

◆ clone_context_previous_module

#define clone_context_previous_module (   x)    ((x)->_clone_context_previous_module_)

Definition at line 66 of file cloning.h.

◆ clone_context_previous_module_

#define clone_context_previous_module_ (   x)    clone_context_previous_module(x) /**old hack compatible */

Definition at line 65 of file cloning.h.

◆ CLONE_CONTEXT_TYPE

#define CLONE_CONTEXT_TYPE   clone_context

Definition at line 38 of file cloning.h.

◆ clone_context_TYPE

#define clone_context_TYPE   clone_context

Definition at line 39 of file cloning.h.

◆ clone_context_undefined

#define clone_context_undefined   ((clone_context)gen_chunk_undefined)

Definition at line 40 of file cloning.h.

◆ clone_context_undefined_p

#define clone_context_undefined_p (   x)    ((x)==clone_context_undefined)

Definition at line 41 of file cloning.h.

◆ cloning_spec

#define cloning_spec   "\--NEWGEN-START 169\n\import entity from \"ri.newgen\";\n\import statement from \"ri.newgen\";\n\clone_context = previous_module:entity x new_module:entity x labels:entity* x persistant new_module_statement:statement;\n\"

Definition at line 74 of file cloning.h.

◆ ENTITY_NEWGEN_DOMAIN

#define ENTITY_NEWGEN_DOMAIN   (entity_domain)

Definition at line 12 of file cloning.h.

◆ entity_NEWGEN_DOMAIN

#define entity_NEWGEN_DOMAIN   (entity_domain)

Definition at line 13 of file cloning.h.

◆ gen_CLONE_CONTEXT_cons

#define gen_CLONE_CONTEXT_cons   gen_clone_context_cons

Definition at line 48 of file cloning.h.

◆ STATEMENT_NEWGEN_DOMAIN

#define STATEMENT_NEWGEN_DOMAIN   (statement_domain)

Definition at line 19 of file cloning.h.

◆ statement_NEWGEN_DOMAIN

#define statement_NEWGEN_DOMAIN   (statement_domain)

Definition at line 20 of file cloning.h.

Typedef Documentation

◆ clone_context

Definition at line 29 of file cloning.h.

◆ entity

typedef struct _newgen_struct_entity_* entity

Definition at line 14 of file cloning.h.

◆ statement

Definition at line 21 of file cloning.h.

Function Documentation

◆ check_clone_context()

clone_context check_clone_context ( clone_context  p)

Definition at line 22 of file cloning.c.

22  {
24 }
#define clone_context_domain
newgen_statement_domain_defined
Definition: cloning.h:24
gen_chunk * gen_check(gen_chunk *obj, int t)
GEN_CHECK checks that the gen_chunk received OBJ is of the appropriate TYPE.
Definition: genClib.c:2356
A gen_chunk is used to store every object.
Definition: genC.h:58

References clone_context_domain, and gen_check().

Referenced by clone_context_assign_contents(), and clone_context_consistent_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clone_context_assign_contents()

void clone_context_assign_contents ( clone_context  r,
clone_context  v 
)

Definition at line 35 of file cloning.c.

35  {
38  message_assert("defined references to domain clone_context",
40  memcpy(r, v, sizeof(struct _newgen_struct_clone_context_));
41 }
clone_context check_clone_context(clone_context p)
Definition: cloning.c:22
bool clone_context_defined_p(clone_context p)
Definition: cloning.c:29
#define message_assert(msg, ex)
Definition: newgen_assert.h:47

References check_clone_context(), clone_context_defined_p(), and message_assert.

+ Here is the call graph for this function:

◆ clone_context_consistent_p()

bool clone_context_consistent_p ( clone_context  p)

Definition at line 25 of file cloning.c.

25  {
27  return gen_consistent_p((gen_chunk*) p);
28 }
int gen_consistent_p(gen_chunk *obj)
GEN_CONSISTENT_P dynamically checks the type correctness of OBJ.
Definition: genClib.c:2398

References check_clone_context(), and gen_consistent_p().

+ Here is the call graph for this function:

◆ clone_context_defined_p()

bool clone_context_defined_p ( clone_context  p)

Definition at line 29 of file cloning.c.

29  {
30  return gen_defined_p((gen_chunk*) p);
31 }
int gen_defined_p(gen_chunk *obj)
Definition: genClib.c:2438

References gen_defined_p().

Referenced by clone_context_assign_contents().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clone_context_non_recursive_free()

void clone_context_non_recursive_free ( clone_context  p)

Definition at line 42 of file cloning.c.

42  {
43  // should clear up contents...
44  free(p);
45 }
void free(void *)

References free().

+ Here is the call graph for this function:

◆ copy_clone_context()

clone_context copy_clone_context ( clone_context  p)

CLONE_CONTEXT.

Definition at line 16 of file cloning.c.

16  {
17  return (clone_context) gen_copy_tree((gen_chunk*) p);
18 }
gen_chunk * gen_copy_tree(gen_chunk *obj)
Definition: genClib.c:1429

References gen_copy_tree().

+ Here is the call graph for this function:

◆ free_clone_context()

void free_clone_context ( clone_context  p)

Definition at line 19 of file cloning.c.

19  {
20  gen_free((gen_chunk*) p);
21 }
void gen_free(gen_chunk *obj)
version without shared_pointers.
Definition: genClib.c:992

References gen_free().

Referenced by do_loop_expansion_init(), do_loop_nest_unswitching_purge(), do_loop_unroll_with_epilogue(), do_loop_unroll_with_prologue(), do_simdizer_auto_tile_generate_all_tests(), dowhile_to_while_walker(), full_loop_unroll(), and make_new_loop_statement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gen_clone_context_cons()

list gen_clone_context_cons ( clone_context  p,
list  l 
)

Definition at line 32 of file cloning.c.

32  {
34 }
#define CLONE_CONTEXT_NEWGEN_DOMAIN
Definition: cloning.h:27
list gen_typed_cons(_int type, const void *item, const list next)
CONS a list with minimal type checking this cannot be done within the CONS macro because possible fun...
Definition: list.c:900

References CLONE_CONTEXT_NEWGEN_DOMAIN, and gen_typed_cons().

+ Here is the call graph for this function:

◆ make_clone_context()

clone_context make_clone_context ( entity  a1,
entity  a2,
list  a3,
statement  a4 
)

Definition at line 52 of file cloning.c.

52  {
53  return (clone_context) gen_alloc(5*sizeof(gen_chunk), GEN_CHECK_ALLOC, clone_context_domain, a1, a2, a3, a4);
54 }
#define GEN_CHECK_ALLOC
Definition: genC.h:307
gen_chunk * gen_alloc(int size, int gen_check_p, int dom,...)
allocates something in newgen.
Definition: genClib.c:298

References clone_context_domain, gen_alloc(), and GEN_CHECK_ALLOC.

Referenced by do_loop_expansion_init(), do_loop_nest_unswitching_purge(), do_loop_unroll_with_epilogue(), do_loop_unroll_with_prologue(), do_simdizer_auto_tile_generate_all_tests(), dowhile_to_while_walker(), full_loop_unroll(), and make_new_loop_statement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read_clone_context()

clone_context read_clone_context ( FILE *  f)

Definition at line 49 of file cloning.c.

49  {
50  return (clone_context) gen_read(f);
51 }
gen_chunk * gen_read(FILE *file)
GEN_READ reads any object from the FILE stream.
Definition: genClib.c:2323
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
Definition: offsets.c:15

References f(), and gen_read().

+ Here is the call graph for this function:

◆ write_clone_context()

void write_clone_context ( FILE *  f,
clone_context  p 
)

Definition at line 46 of file cloning.c.

46  {
47  gen_write(f, (gen_chunk*) p);
48 }
void gen_write(FILE *fd, gen_chunk *obj)
GEN_WRITE writes the OBJect on the stream FD.
Definition: genClib.c:1745

References f(), and gen_write().

+ Here is the call graph for this function: