PIPS
|
Methods dealing with instructions. More...
#include <stdlib.h>
#include <stdio.h>
#include "linear.h"
#include "genC.h"
#include "misc.h"
#include "ri.h"
#include "ri-util.h"
Go to the source code of this file.
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... | |
bool | native_call_p (call c, string op_name) |
Test if a call is a native instruction of the language. More... | |
bool | native_instruction_p (instruction i, string op_name) |
Test if an instruction is a native instruction of the language. More... | |
bool | instruction_assign_p (instruction i) |
Test if an instruction is an assignment. More... | |
bool | instruction_continue_p (instruction i) |
Test if an instruction is a CONTINUE, that is the FORTRAN nop, the ";" in C or the "pass" in Python... More... | |
bool | return_instruction_p (instruction i) |
Test if an instruction is a C or Fortran "return". More... | |
bool | fortran_return_instruction_p (instruction i) |
bool | C_return_instruction_p (instruction i) |
bool | exit_instruction_p (instruction i) |
bool | abort_instruction_p (instruction i) |
bool | instruction_stop_p (instruction i) |
Test if an instruction is a Fortran STOP. More... | |
bool | instruction_format_p (instruction i) |
Test if an instruction is a Fortran FORMAT. More... | |
bool | assignment_block_p (instruction i) |
Checks if an instruction block is a list of assignments, possibly followed by a continue. More... | |
void | flatten_block_if_necessary (instruction i) |
Flatten an instruction block if necessary. More... | |
string | instruction_identification (instruction i) |
Return a constant string representing symbolically the instruction type. More... | |
string | safe_instruction_identification (instruction i) |
Methods dealing with instructions.
Definition in file instruction.c.
void flatten_block_if_necessary | ( | instruction | i | ) |
Flatten an instruction block if necessary.
Detects sequences of sequences and reorder as one sequence.
Some memory leaks. Should not be used. Use the functions from control instead.
This function cannot be used for C code as local declarations are discarded without warnings.
Definition at line 259 of file instruction.c.
References CONS, FOREACH, gen_free_list(), gen_nconc(), instruction_block, instruction_block_p, NIL, STATEMENT, and statement_instruction.
string instruction_identification | ( | instruction | i | ) |
Return a constant string representing symbolically the instruction type.
Does not work for undefined instructions: core dump.
Definition at line 284 of file instruction.c.
References instruction_assign_p(), instruction_continue_p(), instruction_format_p(), instruction_stop_p(), instruction_tag, is_instruction_block, is_instruction_call, is_instruction_expression, is_instruction_forloop, is_instruction_goto, is_instruction_loop, is_instruction_test, is_instruction_unstructured, is_instruction_whileloop, pips_internal_error, and return_instruction_p().
Referenced by external_statement_identification(), LinkInstToCurrentBlock(), MakeNewLabelledStatement(), MakeStatement(), safe_instruction_identification(), statement_identification(), and statement_to_postcondition().
string safe_instruction_identification | ( | instruction | i | ) |
Definition at line 337 of file instruction.c.
References instruction_identification(), instruction_undefined_p, and string_undefined.