X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Ftv%2Ftv.h;h=e4224e97286ac6f4bbf2a62f71864094b464c68c;hb=f4b573078c5509e015658201dc96234efe162332;hp=32f28af45688e674fafd4f3d2c72b4056c6bdf9e;hpb=a4be639f2dba8624ab37a2b77ac3ca33c0b7eb10;p=libfirm diff --git a/ir/tv/tv.h b/ir/tv/tv.h index 32f28af45..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. */ @@ -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. */