X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Ftv%2Ftv.h;h=e4224e97286ac6f4bbf2a62f71864094b464c68c;hb=717a8a9d53b61fd59130a161215358e52aa063d1;hp=3fabedd7831b1b408ac9190fb4f483b881b17eb0;hpb=01a3313c06e5f704d86b7a884f58460d938fdc43;p=libfirm diff --git a/ir/tv/tv.h b/ir/tv/tv.h index 3fabedd78..e4224e972 100644 --- a/ir/tv/tv.h +++ b/ir/tv/tv.h @@ -288,16 +288,11 @@ extern tarval *tarval_b_true; /** Returns the mode_b tarval 'true'. */ tarval *get_tarval_b_true(void); -/** The 'void' pointer tarval. */ -extern tarval *tarval_P_void; -/** Returns the 'void' pointer tarval. */ -tarval *get_tarval_P_void(void); - /* These functions calculate and return a tarval representing the requested * value. * The functions get_mode_{Max,Min,...} return tarvals retrieved from these * functions, but these are stored on initialization of the irmode module and - * therefore the irmode functions should be prefered to the functions below. */ + * therefore the irmode functions should be preferred to the functions below. */ /** Returns the maximum value of a given mode. */ tarval *get_tarval_max(ir_mode *mode); @@ -305,7 +300,8 @@ tarval *get_tarval_max(ir_mode *mode); /** Returns the minimum value of a given mode. */ tarval *get_tarval_min(ir_mode *mode); -/** Returns the 0 value (additive neutral) of a given mode. */ +/** Returns the 0 value (additive neutral) of a given mode. + For reference modes, the NULL value is returned (old tarval_P_void) */ tarval *get_tarval_null(ir_mode *mode); /** Returns the 1 value (multiplicative neutral) of a given mode. */ @@ -385,7 +381,7 @@ pn_Cmp tarval_cmp(tarval *a, tarval *b); * FIRM documentation for conversion rules * mode_is_smaller defined in irmode.h */ -tarval *tarval_convert_to(tarval *src, ir_mode *m); +tarval *tarval_convert_to(tarval *src, ir_mode *mode); /* * These function implement basic computations representable as opcodes @@ -582,15 +578,23 @@ typedef enum _tarval_classification_t { /** * Identifying tarvals values for algebraic simplifications. - * @param tv + * + * @param tv the tarval + * * @return - * - TV_CLASSIFY_NULL for additive neutral, + * - TV_CLASSIFY_NULL for additive neutral or the NULL tarval for reference modes, * - TV_CLASSIFY_ONE for multiplicative neutral, * - TV_CLASSIFY_ALL_ONE for bitwise-and neutral * - TV_CLASSIFY_OTHER else */ tarval_classification_t classify_tarval(tarval *tv); +/** + * Returns non-zero if a given (integer) tarval has only one single bit + * set. + */ +int is_single_bit_tarval(tarval *tv); + /** * Output of tarvals to a buffer. */