i = ~0U;
else if (internal_store_fn_p (ifn))
{
- /* For stores use the tyep of the stored value. */
+ /* For stores use the type of the stored value. */
i = internal_fn_stored_value_index (ifn);
scalar_type = TREE_TYPE (gimple_call_arg (call, i));
i = ~0U;
return true;
/* If there is a loop invariant read involved we might vectorize it in
- the prologue, breaking scalar oder with respect to the in-loop store. */
+ the prologue, breaking scalar order with respect to the in-loop store. */
if ((DR_IS_READ (dr_info_a->dr) && integer_zerop (DR_STEP (dr_info_a->dr)))
|| (DR_IS_READ (dr_info_b->dr) && integer_zerop (DR_STEP (dr_info_b->dr))))
return false;
/* For now concern ourselves with write-after-read as we also
only look for re-use of the store within the same SLP instance.
- We can still get a RAW here when the instance contais a PHI
+ We can still get a RAW here when the instance contains a PHI
with a backedge though, thus this test. */
if (! vect_stmt_dominates_stmt_p (STMT_VINFO_STMT (load_info),
STMT_VINFO_STMT (store_info)))
|| !slpeel_can_duplicate_loop_p (loop, LOOP_VINFO_MAIN_EXIT (loop_vinfo),
loop_preheader_edge (loop))
|| loop->inner
- /* We don't currently maintaing the LCSSA for prologue peeled inversed
+ /* We don't currently maintain the LCSSA for prologue peeled inversed
loops. */
|| (LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo)
&& !LOOP_VINFO_NITERS_UNCOUNTED_P (loop_vinfo)))
/* In pattern recog we simply used a ZERO else value that
we need to correct here. To that end just re-use the
- (already succesful) check if we support a gather IFN
+ (already successful) check if we support a gather IFN
and have it populate the else values. */
if (DR_IS_READ (dr) && internal_fn_mask_index (ifn) >= 0 && elsvals)
supports_vec_gather_load_p (TYPE_MODE (vectype), elsvals);
if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
"the size of the group of accesses"
- " is not a power of 2 or not eqaul to 3\n");
+ " is not a power of 2 or not equal to 3\n");
return false;
}
ARRAY_REF expression.
GSI is required to insert temporary variables while building a
- refernece to the element of the vector VECT.
+ reference to the element of the vector VECT.
PTMPVEC is a pointer to the temporary variable for caching
purposes. In case when PTMPVEC is NULL new temporary variable
continue;
Where the constant is built with elements at most VF - 1 and
- repetitions according to max_nscalars_per_iter which is guarnateed
+ repetitions according to max_nscalars_per_iter which is guaranteed
to be the same within a group. */
/* Convert NITERS to the determined IV type. */
where the contents of the loop body are split but the iteration space of both
copies remains the same.
- If UPDATED_DOMS is not NULL it is update with the list of basic blocks whoms
+ If UPDATED_DOMS is not NULL it is update with the list of basic blocks whose
dominators were updated during the peeling. When doing early break vectorization
then LOOP_VINFO needs to be provided and is used to keep track of any newly created
memory references that need to be updated should we decide to vectorize. */
= STMT_VINFO_LOOP_PHI_EVOLUTION_TYPE (stmt_info);
tree niters_skip;
/* Init_expr will be update by vect_update_ivs_after_vectorizer,
- if niters or vf is unkown:
+ if niters or vf is unknown:
For shift, when shift mount >= precision, there would be UD.
For mult, don't known how to generate
init_expr * pow (step, niters) for variable niters.
}
}
- /* Also doens't support peel for neg when niter is variable.
+ /* Also doesn't support peel for neg when niter is variable.
??? generate something like niter_expr & 1 ? init_expr : -init_expr? */
niters_skip = LOOP_VINFO_MASK_SKIP_NITERS (loop_vinfo);
if ((niters_skip != NULL_TREE
{
if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
- "Peeling for alignement is not supported"
+ "Peeling for alignment is not supported"
" for nonlinear induction when niters_skip"
" is not constant.\n");
return false;
introduces clobbers of the temporary vector array, which in turn
needs new vdefs. If the scalar loop doesn't write to memory, these
new vdefs will be the only ones in the vector loop.
- We are currently defering updating virtual SSA form and creating
+ We are currently deferring updating virtual SSA form and creating
of a virtual PHI for this case so we do not have to make sure the
newly introduced virtual def is in LCSSA form. */
niters_no_overflow);
if (!integer_onep (*step_vector))
{
- /* On exit from the loop we will have an easy way of calcalating
+ /* On exit from the loop we will have an easy way of calculating
NITERS_VECTOR / STEP * STEP. Install a dummy definition
until then. */
niters_vector_mult_vf
vec_init_loop_exit_info (class loop *loop)
{
/* Before we begin we must first determine which exit is the main one and
- which are auxilary exits. */
+ which are auxiliary exits. */
auto_vec<edge> exits = get_loop_exit_edges (loop);
if (exits.length () == 0)
return NULL;
return true;
}
-/* Check whether we can use vector access with length based on precison
+/* Check whether we can use vector access with length based on precision
comparison. So far, to keep it simple, we only allow the case that the
precision of the target supported length is larger than the precision
required by loop niters. */
- the Pmode precision
If min_ni_prec is less than the precision of the current niters,
- we perfer to still use the niters type. Prefer to use Pmode and
+ we prefer to still use the niters type. Prefer to use Pmode and
wider IV to avoid narrow conversions. */
unsigned int ni_prec
/* If we know the number of iterations we can do better, for the
epilogue we can also decide whether the main loop leaves us
- with enough iterations, prefering a smaller vector epilog then
+ with enough iterations, preferring a smaller vector epilog then
also possibly used for the case we skip the vector loop. */
if (LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo))
{
orig_loop_vinfo = loop_vinfo;
gcc_assert (orig_loop_vinfo);
- /* We can't mask on niters for uncounted loops due to unkown upper bound. */
+ /* We can't mask on niters for uncounted loops due to unknown upper bound. */
if (LOOP_VINFO_NITERS_UNCOUNTED_P (loop_vinfo))
LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo) = false;
gcc_assert (LOOP_VINFO_MASKS (loop_vinfo).is_empty ());
/* Apply the suggested unrolling factor, this was determined by the backend
- during finish_cost the first time we ran the analyzis for this
+ during finish_cost the first time we ran the analysis for this
vector mode. */
if (applying_suggested_uf)
LOOP_VINFO_VECT_FACTOR (loop_vinfo) *= loop_vinfo->suggested_unroll_factor;
if (loop_vinfo)
{
- /* Analyzis has been successful so update the VF value. The
+ /* Analysis has been successful so update the VF value. The
VF should always be a multiple of unroll_factor and we want to
capture the original VF here. */
cached_vf_per_mode[last_mode_i]
break;
}
- /* Revert back to the default from the suggested prefered
+ /* Revert back to the default from the suggested preferred
epilogue vectorization mode. */
masked_p = -1;
if (mode_i == vector_modes.length ())
}
/* If this isn't a nested cycle or if the nested cycle reduction value
- is used ouside of the inner loop we cannot handle uses of the reduction
+ is used outside of the inner loop we cannot handle uses of the reduction
value. */
if (nlatch_def_loop_uses > 1 || nphi_def_loop_uses > 1)
{
neutral_op);
for (unsigned int i = 0; i < group_size; ++i)
{
- /* If there's no univeral neutral value, we can use the
+ /* If there's no universal neutral value, we can use the
initial scalar value from the original PHI. This is used
for MIN and MAX reduction, for example. */
if (!neutral_op)
return false;
/* Lane-reducing pattern inside any inner loop of LOOP_VINFO is not
- recoginized. */
+ recognized. */
gcc_assert (!nested_in_vect_loop_p (LOOP_VINFO_LOOP (loop_vinfo), stmt_info));
gcc_assert (VECT_REDUC_INFO_TYPE (reduc_info) == TREE_CODE_REDUCTION);
else if (needs_fold_left_reduction_p (op.type, orig_code))
{
/* When vectorizing a reduction chain w/o SLP the reduction PHI
- is not directy used in stmt. */
+ is not directly used in stmt. */
if (reduc_chain_length != 1)
{
if (dump_enabled_p ())
if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
"Using original scalar computation for "
- "live lane because use preceeds vector "
+ "live lane because use precedes vector "
"def\n");
continue;
}
/* Given a complete set of lengths LENS, extract length number INDEX
for an rgroup that operates on NVECTORS vectors of type VECTYPE,
where 0 <= INDEX < NVECTORS. Return a value that contains FACTOR
- multipled by the number of elements that should be processed.
+ multiplied by the number of elements that should be processed.
Insert any set-up statements before GSI. */
tree
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file,
"Vectorization factor %i seems too large for profile "
- "prevoiusly believed to be consistent; reducing.\n", vf);
+ "previously believed to be consistent; reducing.\n", vf);
vf /= 2;
}
/* Write the init_stmts in the loop-preheader block. */
auto psi = gsi_last_nondebug_bb (pe->src);
gsi_insert_seq_after (&psi, init_stmts, GSI_LAST_NEW_STMT);
- /* Wite the adjustments in the header block. */
+ /* Write the adjustments in the header block. */
basic_block bb = loop->header;
auto si = gsi_after_labels (bb);
gsi_insert_seq_before (&si, stmts, GSI_SAME_STMT);
needed to maintain the type correctness of the IR.
vect_determine_precisions has already determined the minimum
- precison of the operation and the minimum precision required
+ precision of the operation and the minimum precision required
by users of the result. */
static gimple *
* _10 = -_9;
* _12 = _7 | _10;
*
- * And then simplied to
+ * And then simplified to
* _12 = .SAT_ADD (_4, _6);
*/
* _10 = (long unsigned int) _7;
* _9 = _8 * _10;
*
- * And then simplied to
+ * And then simplified to
* _9 = .SAT_SUB (_1, _2);
*
* Signed:
* _41 = _42 & _44;
* iftmp.2_11 = _41 ? _26 : minus_19;
*
- * And then simplied to
+ * And then simplified to
* iftmp.2_11 = .SAT_SUB (x_16, y_18);
*/
* _3 = -_2;
* _6 = _1 | _3;
*
- * And then simplied to
+ * And then simplified to
* _6 = .SAT_TRUNC (x_4(D));
*/
unsigned HOST_WIDE_INT mid_d = (abs_d - 1) >> 1;
if (!unsigned_p)
{
- // check availibility of abs expression for vector
+ // check availability of abs expression for vector
if (!target_has_vecop_for_code (ABS_EXPR, vectype))
return NULL;
// abs (r)
/* Function vect_recog_mask_conversion_pattern
Try to find statements which require boolean type
- converison. Additional conversion statements are
+ conversion. Additional conversion statements are
added to handle such cases. For example:
bool m_1, m_2, m_3;
};
/* Note that ordering matters - the first pattern matching on a stmt is
- taken which means usually the more complex one needs to preceed the
+ taken which means usually the more complex one needs to precede the
less comples onex (widen_sum only after dot_prod or sad for example). */
static vect_recog_func vect_vect_recog_func_ptrs[] = {
{ vect_recog_bitfield_ref_pattern, "bitfield_ref" },
******************************************************************************/
/* Default implementation of recognize that performs matching, validation and
- replacement of nodes but that can be overriden if required. */
+ replacement of nodes but that can be overridden if required. */
static bool
vect_pattern_validate_optab (internal_fn ifn, slp_tree node)
statement is created as call to internal function IFN with m_num_args
arguments.
- Futhermore the new pattern is also added to the vectorization information
+ Furthermore the new pattern is also added to the vectorization information
structure VINFO and the old statement STMT_INFO is marked as unused while
the new statement is marked as used and the number of SLP uses of the new
statement is incremented.
}
-/* Check to see if the oprands to two multiplies, 2 each in LEFT_OP and
+/* Check to see if the operands to two multiplies, 2 each in LEFT_OP and
RIGHT_OP match a complex multiplication or complex multiply-and-accumulate
or complex multiply-and-subtract pattern. Do this using the permute cache
PERM_CACHE and the combination compatibility list COMPAT_CACHE. If
- the operation is successful the macthing operands are returned in OPS and
+ the operation is successful the matching operands are returned in OPS and
_STATUS indicates if the operation matched includes a conjugate of one of the
operands. If the operation succeeds True is returned, otherwise False and
the values in ops are meaningless. */
gcc_assert (SLP_TREE_DEF_TYPE (node) == vect_constant_def
|| SLP_TREE_DEF_TYPE (node) == vect_external_def);
- /* Pre-exsting vectors. */
+ /* Pre-existing vectors. */
if (SLP_TREE_SCALAR_OPS (node).is_empty ())
return false;
- for each child node, the index of the argument associated with that node.
The special index -1 is the first operand of an embedded comparison and
the special index -2 is the second operand of an embedded comparison.
- The special indes -3 is the offset of a gather as analyzed by
+ The special index -3 is the offset of a gather as analyzed by
vect_check_gather_scatter.
SWAP is as for vect_get_and_check_slp_defs. */
operands. Set SWAP[i] to 1 if stmt I is COND_EXPR and isomorphic to
the first stmt by swapping the two operands of comparison; set SWAP[i]
to 2 if stmt I is isormorphic to the first stmt by inverting the code
- of comparison. Take A1 >= B1 ? X1 : Y1 as an exmple, it can be swapped
+ of comparison. Take A1 >= B1 ? X1 : Y1 as an example, it can be swapped
to (B1 <= A1 ? X1 : Y1); or be inverted to (A1 < B1) ? Y1 : X1. */
static bool
}
/* If the SLP build for operand zero failed and operand zero
- and one can be commutated try that for the scalar stmts
+ and one can be commuted try that for the scalar stmts
that failed the match. */
if (i == 0
/* A first scalar stmt mismatch signals a fatal mismatch. */
substmts.release ();
if (end - start == 1)
{
- /* Single-lane discovery failed. Free ressources. */
+ /* Single-lane discovery failed. Free resources. */
for (auto node : rhs_nodes)
vect_free_slp_tree (node);
scalar_stmts.release ();
interleaving scheme. For this try to compute whether all
elements needed for this load are in even or odd elements of
an even/odd decomposition with N consecutive elements.
- Thus { e, e, o, o, e, e, o, o } woud be an even/odd decomposition
+ Thus { e, e, o, o, e, e, o, o } would be an even/odd decomposition
with N == 2. */
/* ??? Only an even number of lanes can be handed this way, but the
fallback below could work for any number. We have to make sure
return true;
}
-/* Return the cost (in arbtirary units) of going from layout FROM_LAYOUT_I
+/* Return the cost (in arbitrary units) of going from layout FROM_LAYOUT_I
to layout TO_LAYOUT_I for a node like NODE. Return -1 if either of the
layouts is incompatible with NODE or if the change is not possible for
some other reason.
/* Prepare the pointer IVs which needs to be updated by a variable amount.
Such variable amount is the outcome of .SELECT_VL. In this case, we can
allow each iteration process the flexible number of elements as long as
- the number <= vf elments.
+ the number <= vf elements.
Return data reference according to SELECT_VL.
If new statements are needed, insert them before GSI. */
unsigned int num_calls;
/* The number of arguments in the call and the number of parameters in
the simdclone should match. However, when the simdclone is
- 'inbranch', it could have one more paramater than nargs when using
+ 'inbranch', it could have one more parameter than nargs when using
an inbranch simdclone to call a non-inbranch call, either in a
non-masked loop using a all true constant mask, or inside a masked
loop using it's mask. */
during transform but it is allowed during analysis.
Shouldn't go with length-based approach if fully masked. */
if (cost_vec == NULL)
- /* The cost_vec is NULL during transfrom. */
+ /* The cost_vec is NULL during transform. */
gcc_assert ((!loop_lens || !loop_masks));
/* Targets with store-lane instructions must not require explicit
during transform but it is allowed during analysis.
Shouldn't go with length-based approach if fully masked. */
if (cost_vec == NULL)
- /* The cost_vec is NULL during transfrom. */
+ /* The cost_vec is NULL during transform. */
gcc_assert ((!loop_lens || !loop_masks));
/* Targets with store-lane instructions must not require explicit
/* If we decided to apply a loop mask to the result of the vector
comparison, AND the comparison with the mask now. Later passes
- should then be able to reuse the AND results between mulitple
+ should then be able to reuse the AND results between multiple
vector statements.
For example:
return true;
}
- /* Tranform. */
+ /* Transform. */
tree new_temp = NULL_TREE;
gimple *new_stmt = NULL;
auto_vec<tree> stmts;
stmts.safe_splice (SLP_TREE_VEC_DEFS (slp_node));
- /* If we're comparing against a previous forall we need to negate the resullts
+ /* If we're comparing against a previous forall we need to negate the results
before we do the final comparison or reduction. */
if (flipped)
{
HOST_WIDE_INT est_rel_other_max
= estimated_poly_value (rel_other, POLY_VALUE_MAX);
- /* Check first if we can make out an unambigous total order from the minimum
+ /* Check first if we can make out an unambiguous total order from the minimum
and maximum estimates. */
if (est_rel_this_min < est_rel_other_min
&& est_rel_this_max < est_rel_other_max)
for (int i = 0; i < VF; ++i)
res = res OP val[i];
- (with no reassocation). */
+ (with no reassociation). */
FOLD_LEFT_REDUCTION
};
_loop_vec_info *main_loop_info;
/* For loops being epilogues of already vectorized loops
- this points to the preceeding vectorized (possibly epilogue) loop.
+ this points to the preceding vectorized (possibly epilogue) loop.
Otherwise NULL. */
_loop_vec_info *orig_loop_info;
auto_vec<gimple*> early_break_vuses;
/* The IV adjustment value for inductions that needs to be materialized
- inside the relavent exit blocks in order to adjust for early break. */
+ inside the relevant exit blocks in order to adjust for early break. */
tree early_break_niters_var;
/* The type of the variable to be used to create the scalar IV for early break
The following routines are provided to simplify costing decisions in
target code. Please add more as needed. */
-/* Return true if an operaton of kind KIND for STMT_INFO represents
+/* Return true if an operation of kind KIND for STMT_INFO represents
the extraction of an element from a vector in preparation for
storing the element to memory. */
inline bool