#include "ctrump/common/dll.h"
Go to the source code of this file.
Functions | |
CTRUMP_EXTDEF struct ctrump_expr * | ctrump_peel_bitequality_cast_expr (struct ctrump_expr *expr, const struct ctrump_abi *abi) |
remove cast if cast expr not convert bit-expression. ex) (unsigned int32) -> (int32) : remove (_Bool32) -> (int32) : remove | |
CTRUMP_EXTDEF struct ctrump_expr * | ctrump_peel_cast_to_pointer_from_array (struct ctrump_expr *expr) |
配列型からポインタ型への変換を取り除いた式を返す | |
CTRUMP_EXTDEF struct ctrump_expr * | ctrump_peel_paren (struct ctrump_expr *expr) |
括弧を取り除いた式を返す | |
CTRUMP_EXTDEF struct ctrump_expr * | ctrump_peel_sign (int *is_sign, struct ctrump_expr *expr) |
符号反転を取り除いた式を返す 符号反転している場合は is_sign に1を、それ以外は0を入れる |
Definition in file peel.h.
CTRUMP_EXTDEF struct ctrump_expr* ctrump_peel_bitequality_cast_expr | ( | struct ctrump_expr * | expr, | |
const struct ctrump_abi * | abi | |||
) | [read] |
remove cast if cast expr not convert bit-expression. ex) (unsigned int32) -> (int32) : remove (_Bool32) -> (int32) : remove
(int16) -> (int32) : not remove .. may cause sign extension (float32) -> (int32) : not remove (float64) -> (float32) : not remove (int32) -> (_Bool32) : not remove .. may cause boolean conversion (int32[4]) -> (int*) : not remove
Definition at line 41 of file peel.c.
References ctrump_expr::cast, ctrump_cast_expr::cast_to, ctrump_implicit_cast_expr::cast_to, ctrump_expr::code, CTRUMP_EXPR_CAST, CTRUMP_EXPR_IMPLICIT_CAST, CTRUMP_EXPR_PAREN, ctrump_is_bitconvertion_on_type_conversion(), ctrump_paren_expr::expr, ctrump_cast_expr::expr, ctrump_implicit_cast_expr::expr, ctrump_expr::implicit_cast, ctrump_expr::paren, ctrump_expr::type, and ctrump_expr::u.
CTRUMP_EXTDEF struct ctrump_expr* ctrump_peel_cast_to_pointer_from_array | ( | struct ctrump_expr * | expr | ) | [read] |
配列型からポインタ型への変換を取り除いた式を返す
Definition at line 83 of file peel.c.
References ctrump_expr::cast, ctrump_texpr::code, ctrump_expr::code, CTRUMP_EXPR_CAST, CTRUMP_EXPR_IMPLICIT_CAST, CTRUMP_EXPR_PAREN, CTRUMP_TYPE_ARRAY, ctrump_paren_expr::expr, ctrump_cast_expr::expr, ctrump_implicit_cast_expr::expr, ctrump_expr::implicit_cast, ctrump_expr::paren, ctrump_expr::type, and ctrump_expr::u.
Referenced by recog_array_access(), and recog_array_index().
CTRUMP_EXTDEF struct ctrump_expr* ctrump_peel_paren | ( | struct ctrump_expr * | expr | ) | [read] |
括弧を取り除いた式を返す
Definition at line 115 of file peel.c.
References ctrump_expr::code, CTRUMP_EXPR_PAREN, ctrump_paren_expr::expr, ctrump_expr::paren, and ctrump_expr::u.
Referenced by analyze_subscript_coef(), expr_subscripts_to_loop_subscript(), extract_load_store_assign(), and single_expr_subscripts_to_loop_subscript().
CTRUMP_EXTDEF struct ctrump_expr* ctrump_peel_sign | ( | int * | is_sign, | |
struct ctrump_expr * | expr | |||
) | [read] |
符号反転を取り除いた式を返す 符号反転している場合は is_sign に1を、それ以外は0を入れる
Definition at line 125 of file peel.c.
References ctrump_expr::code, CTRUMP_EXPR_PAREN, CTRUMP_EXPR_UNA_NEG, CTRUMP_EXPR_UNA_POS, ctrump_unary_expr::expr, ctrump_paren_expr::expr, ctrump_expr::paren, ctrump_expr::u, and ctrump_expr::unary.