PIPS
|
#include <stdio.h>
#include <stdlib.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "effects.h"
#include "misc.h"
#include "ri-util.h"
#include "effects-util.h"
#include "resources.h"
#include "pipsdbm.h"
Go to the source code of this file.
Data Structures | |
struct | inst_sel_ctx |
Macros | |
#define | DEBUG_NAME "INSTRUCTION_SELECTION_DEBUG_LEVEL" |
Functions | |
static list | is_this_op (expression e, entity op, size_t len) |
whether e is a call to op with len parameters if ok, the list of arguments is returned. More... | |
static void | update_call (call c, entity op, expression e, list le) |
static void | select_op_rwt (call c, inst_sel_ctx *ctx) |
bool | instruction_selection (const char *module_name) |
instruction_selection.c More... | |
#define DEBUG_NAME "INSTRUCTION_SELECTION_DEBUG_LEVEL" |
Definition at line 43 of file instruction_selection.c.
bool instruction_selection | ( | const char * | module_name | ) |
get data from pipsdbm
init gen_recurse context
Do not optimize subscript expressions
store statement back to pipsdbm
module_name | odule_name |
Definition at line 144 of file instruction_selection.c.
References inst_sel_ctx::bminus, inst_sel_ctx::bmult, inst_sel_ctx::bplus, call_domain, db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, DEBUG_NAME, debug_off, debug_on, entity_intrinsic(), gen_context_multi_recurse(), gen_false(), gen_null(), gen_true(), get_current_module_statement(), IMA_OPERATOR_NAME, inst_sel_ctx::imaop, IMS_OPERATOR_NAME, inst_sel_ctx::imsop, local_name_to_top_level_entity(), MINUS_OPERATOR_NAME, module_name(), MULTIPLY_OPERATOR_NAME, inst_sel_ctx::n_ima, inst_sel_ctx::n_ims, PLUS_OPERATOR_NAME, reference_domain, reset_current_module_entity(), reset_current_module_statement(), select_op_rwt(), set_current_module_entity(), set_current_module_statement(), inst_sel_ctx::uminus, and UNARY_MINUS_OPERATOR_NAME.
|
static |
whether e is a call to op with len parameters if ok, the list of arguments is returned.
if not, NIL is returned. of expression
Definition at line 63 of file instruction_selection.c.
References call_arguments, call_function, expression_call_p(), expression_syntax, gen_length(), NIL, and syntax_call.
Referenced by select_op_rwt().
|
static |
of expression
of expression
a * b + c -> ima(a,b,c)
a + b * c -> ima(b,c,a)
a * b + -c -> ims(a,b,c)
-a + b * c -> ims(b,c,a)
of expression
a * b - c -> ims(a,b,c)
a - b * c -> -ims(b,c,a)
-a - b * c -> -ima(b,c,a)
Definition at line 86 of file instruction_selection.c.
References inst_sel_ctx::bminus, inst_sel_ctx::bmult, inst_sel_ctx::bplus, call_arguments, call_function, EXPRESSION, gen_length(), gen_nth(), inst_sel_ctx::imaop, inst_sel_ctx::imsop, is_this_op(), inst_sel_ctx::n_ima, inst_sel_ctx::n_ims, and update_call().
Referenced by instruction_selection().
|
static |
??? MEMORY LEAK
Definition at line 75 of file instruction_selection.c.
References call_arguments, call_function, EXPRESSION, expression_domain, gen_make_list(), gen_nth(), and NIL.
Referenced by select_op_rwt().