#include "coretypes.h"
#include "tm.h"
#include "rtl.h"
-#include "input.h"
#include "alias.h"
#include "symtab.h"
#include "tree.h"
#include "tree-ssa-alias.h"
#include "internal-fn.h"
#include "gimple-expr.h"
-#include "is-a.h"
#include "gimple.h"
#include "gimple-ssa.h"
-#include "plugin-api.h"
-#include "ipa-ref.h"
#include "cgraph.h"
#include "tree-ssanames.h"
#include "target.h"
Thus the following special case checks need only
check the second operand. */
if (TREE_CODE (treeop0) == INTEGER_CST)
- {
- tree t1 = treeop0;
- treeop0 = treeop1;
- treeop1 = t1;
- }
+ std::swap (treeop0, treeop1);
/* First, check if we have a multiplication of one signed and one
unsigned operand. */
def0 = get_def_for_expr (treeop1, NEGATE_EXPR);
/* Swap operands if the 2nd operand is fed by a negate. */
if (def0)
- {
- tree tem = treeop0;
- treeop0 = treeop1;
- treeop1 = tem;
- }
+ std::swap (treeop0, treeop1);
}
def2 = get_def_for_expr (treeop2, NEGATE_EXPR);
Thus the following special case checks need only
check the second operand. */
if (TREE_CODE (treeop0) == INTEGER_CST)
- {
- tree t1 = treeop0;
- treeop0 = treeop1;
- treeop1 = t1;
- }
+ std::swap (treeop0, treeop1);
/* Attempt to return something suitable for generating an
indexed address, for machines that support that. */
rtx op0, op1, temp, decl_rtl;
tree type;
int unsignedp;
- machine_mode mode, dmode;
+ machine_mode mode;
enum tree_code code = TREE_CODE (exp);
rtx subtarget, original_target;
int ignore;
if (g == NULL
&& modifier == EXPAND_INITIALIZER
&& !SSA_NAME_IS_DEFAULT_DEF (exp)
- && (optimize || !SSA_NAME_VAR (exp)
- || DECL_IGNORED_P (SSA_NAME_VAR (exp)))
+ && (optimize || DECL_IGNORED_P (SSA_NAME_VAR (exp)))
&& stmt_is_replaceable_p (SSA_NAME_DEF_STMT (exp)))
g = SSA_NAME_DEF_STMT (exp);
if (g)
/* Ensure variable marked as used even if it doesn't go through
a parser. If it hasn't be used yet, write out an external
definition. */
- if (exp)
- TREE_USED (exp) = 1;
+ TREE_USED (exp) = 1;
/* Show we haven't gotten RTL for this yet. */
temp = 0;
/* Variables inherited from containing functions should have
been lowered by this point. */
- if (exp)
- context = decl_function_context (exp);
- gcc_assert (!exp
- || SCOPE_FILE_SCOPE_P (context)
+ context = decl_function_context (exp);
+ gcc_assert (SCOPE_FILE_SCOPE_P (context)
|| context == current_function_decl
|| TREE_STATIC (exp)
|| DECL_EXTERNAL (exp)
decl_rtl = use_anchored_address (decl_rtl);
if (modifier != EXPAND_CONST_ADDRESS
&& modifier != EXPAND_SUM
- && !memory_address_addr_space_p (exp ? DECL_MODE (exp)
- : GET_MODE (decl_rtl),
+ && !memory_address_addr_space_p (DECL_MODE (exp),
XEXP (decl_rtl, 0),
MEM_ADDR_SPACE (decl_rtl)))
temp = replace_equiv_address (decl_rtl,
if the address is a register. */
if (temp != 0)
{
- if (exp && MEM_P (temp) && REG_P (XEXP (temp, 0)))
+ if (MEM_P (temp) && REG_P (XEXP (temp, 0)))
mark_reg_pointer (XEXP (temp, 0), DECL_ALIGN (exp));
return temp;
}
- if (exp)
- dmode = DECL_MODE (exp);
- else
- dmode = TYPE_MODE (TREE_TYPE (ssa_name));
-
/* If the mode of DECL_RTL does not match that of the decl,
there are two cases: we are dealing with a BLKmode value
that is returned in a register, or we are dealing with
of the wanted mode, but mark it so that we know that it
was already extended. */
if (REG_P (decl_rtl)
- && dmode != BLKmode
- && GET_MODE (decl_rtl) != dmode)
+ && DECL_MODE (exp) != BLKmode
+ && GET_MODE (decl_rtl) != DECL_MODE (exp))
{
machine_mode pmode;
/* Get the signedness to be used for this variable. Ensure we get
the same mode we got when the variable was declared. */
- if (code != SSA_NAME)
- pmode = promote_decl_mode (exp, &unsignedp);
- else if ((g = SSA_NAME_DEF_STMT (ssa_name))
- && gimple_code (g) == GIMPLE_CALL
- && !gimple_call_internal_p (g))
+ if (code == SSA_NAME
+ && (g = SSA_NAME_DEF_STMT (ssa_name))
+ && gimple_code (g) == GIMPLE_CALL
+ && !gimple_call_internal_p (g))
pmode = promote_function_mode (type, mode, &unsignedp,
gimple_call_fntype (g),
2);
else
- pmode = promote_ssa_mode (ssa_name, &unsignedp);
+ pmode = promote_decl_mode (exp, &unsignedp);
gcc_assert (GET_MODE (decl_rtl) == pmode);
temp = gen_lowpart_SUBREG (mode, decl_rtl);
{
enum rtx_code code;
tree arg0, arg1, type;
- tree tem;
machine_mode operand_mode;
int unsignedp;
rtx op0, op1;
if (TREE_CODE (arg0) == REAL_CST || TREE_CODE (arg0) == INTEGER_CST
|| TREE_CODE (arg0) == FIXED_CST)
{
- tem = arg0; arg0 = arg1; arg1 = tem;
+ std::swap (arg0, arg1);
code = swap_condition (code);
}