PIPS
Instruction constructors

Functions

instruction make_call_instruction (entity e, list l)
 Build an instruction that call a function entity with an argument list. More...
 
instruction MakeNullaryCallInst (entity f)
 Creates a call instruction to a function with no argument. More...
 
instruction MakeUnaryCallInst (entity f, expression e)
 Creates a call instruction to a function with one argument. More...
 
instruction make_continue_instruction ()
 Creates a CONTINUE instruction, that is the FORTRAN nop, the ";" in C or the "pass" in Python for example. More...
 
instruction make_assign_instruction (expression l, expression r)
 
instruction make_instruction_block (list statements)
 Build an instruction block from a list of statements. More...
 

Detailed Description

Function Documentation

◆ make_assign_instruction()

instruction make_assign_instruction ( expression  l,
expression  r 
)

SG: not true in C pips_assert("make_assign_statement", syntax_reference_p(expression_syntax(l)));

Definition at line 87 of file instruction.c.

89 {
90  call c = call_undefined;
92 
93 /* SG: not true in C
94  * pips_assert("make_assign_statement",
95  syntax_reference_p(expression_syntax(l)));*/
97  CONS(EXPRESSION, l, CONS(EXPRESSION, r, NIL)));
99 
100  return i;
101 }
call make_call(entity a1, list a2)
Definition: ri.c:269
instruction make_instruction(enum instruction_utype tag, void *val)
Definition: ri.c:1166
#define NIL
The empty list (nil in Lisp)
Definition: newgen_list.h:47
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
Definition: newgen_list.h:150
#define ASSIGN_OPERATOR_NAME
Definition: ri-util-local.h:95
entity entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
Definition: entity.c:1292
#define EXPRESSION(x)
EXPRESSION.
Definition: ri.h:1217
#define instruction_undefined
Definition: ri.h:1454
@ is_instruction_call
Definition: ri.h:1474
#define call_undefined
Definition: ri.h:685

References ASSIGN_OPERATOR_NAME, call_undefined, CONS, entity_intrinsic(), EXPRESSION, instruction_undefined, is_instruction_call, make_call(), make_instruction(), and NIL.

Referenced by C_MakeReturnStatement(), generate_compact(), generate_prelude(), gfc2pips_code2instruction_(), make_assign_statement(), make_phi_assign_instruction(), MakeAssignInst(), MakeDoInst(), and st_compute_ith_local_index().

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

◆ make_call_instruction()

instruction make_call_instruction ( entity  e,
list  l 
)

Build an instruction that call a function entity with an argument list.

instruction.c

Parameters
eis the function entity to call
lis the list of argument expressions given to the function to call

Definition at line 51 of file instruction.c.

51  {
53 }

References is_instruction_call, make_call(), and make_instruction().

Referenced by do_split_structure(), Generate_C_ReturnStatement(), make_fields_assignment_instruction(), MakeNullaryCallInst(), MakeUnaryCallInst(), and replace_reductions_in_statement().

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

◆ make_continue_instruction()

instruction make_continue_instruction ( void  )

Creates a CONTINUE instruction, that is the FORTRAN nop, the ";" in C or the "pass" in Python for example.

Definition at line 79 of file instruction.c.

79  {
80  entity called_function;
81  called_function = entity_intrinsic(CONTINUE_FUNCTION_NAME);
82  return MakeNullaryCallInst(called_function);
83 }
instruction MakeNullaryCallInst(entity f)
Creates a call instruction to a function with no argument.
Definition: instruction.c:60
#define CONTINUE_FUNCTION_NAME

References CONTINUE_FUNCTION_NAME, entity_intrinsic(), and MakeNullaryCallInst().

Referenced by compact_phi_functions(), controlize_goto(), delay_communications_call(), do_redundant_load_store_elimination(), EndOfProcedure(), FindDefinitionsOf_rewrite(), FixCReturnStatements(), freia_cleanup_sequence_rec(), freia_shuffle_move_forward(), gen_flat_mpi(), gfc2pips_code2instruction_(), hpfc_overlap_kill_unused_scalars_rewrite(), hwac_replace_statement(), loop_expansion(), MakeElseInst(), MakeEnddoInst(), MakeEndifInst(), outliner_call(), ReuseLabelledStatement(), sww_seq_rwt(), take_out_the_exit_node_if_not_a_continue(), and terapixify_loop_purge().

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

◆ make_instruction_block()

instruction make_instruction_block ( list  statements)

Build an instruction block from a list of statements.

Parameters
statementstatements

Definition at line 106 of file instruction.c.

106  {
107  return make_instruction_sequence(make_sequence(statements));
108 }
instruction make_instruction_sequence(sequence _field_)
Definition: ri.c:1169
sequence make_sequence(list a)
Definition: ri.c:2125

References make_instruction_sequence(), and make_sequence().

Referenced by __attribute__(), add_delay_information(), begin_omp_construct(), build_third_comb(), C_MakeReturnStatement(), clean_statement(), compact_list(), controlize_list(), create_block_if_needed(), do_loop_unroll_with_epilogue(), do_loop_unroll_with_prologue(), do_symbolic_tiling(), dowhile_to_while_walker(), fs_filter(), full_loop_unroll(), fuse_2_control_nodes(), gather_and_remove_all_format_statements_rewrite(), GenerateReturn(), gfc2pips_code2instruction(), gfc2pips_code2instruction_(), gfc2pips_code2instruction__TOP(), hpfc_translate_call_with_distributed_args(), icm_loop_rwt(), if_conv_init_statement(), insert_before_current_statement(), io_filter(), iteration_domain_from_statement(), loop_rewrite(), make_block_statement(), MakeAssignedOrComputedGotoInst(), MakeAssignInst(), MakeDoInst(), MakeEmptyInstructionBlock(), MakeEntry(), makeloopbody(), MakeReturn(), phrase_remove_dependences_rwt(), re_do_it(), reindexing(), sa_do_it(), simd_insert_statement(), simdize_simple_statements(), statement_filter(), take_out_the_entry_node_of_the_unstructured(), and take_out_the_exit_node_if_not_a_continue().

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

◆ MakeNullaryCallInst()

instruction MakeNullaryCallInst ( entity  f)

Creates a call instruction to a function with no argument.

Parameters
fis the function entity to call

Definition at line 60 of file instruction.c.

60  {
61  return make_call_instruction(f, NIL);
62 }
instruction make_call_instruction(entity e, list l)
Build an instruction that call a function entity with an argument list.
Definition: instruction.c:51
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
Definition: offsets.c:15

References f(), make_call_instruction(), and NIL.

Referenced by gfc2pips_code2instruction_(), and make_continue_instruction().

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

◆ MakeUnaryCallInst()

instruction MakeUnaryCallInst ( entity  f,
expression  e 
)

Creates a call instruction to a function with one argument.

Parameters
fis the function entity to call
eis the argument expression given to the function to call

Definition at line 70 of file instruction.c.

71  {
73 }

References CONS, EXPRESSION, f(), make_call_instruction(), and NIL.

Referenced by gfc2pips_code2instruction_().

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