The current bounds checking infrastructure inserts checks like: ``` for (i, 0, bounds[n]) { if (likely(i < bounds[n]) { ... } } ``` into the TVM IR which is currently not removed by simplification infrastructure. This is a little unclean, as these are trivially true since for a loop var `i` with a given min and extent, we are guaranteed that `i >= min` and `i < min + extent`. Thus, we can insert these checks into the IR and use them to eliminate trivial bounds checks early on.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
analyzer.cc | Loading commit data... | |
bound_deducer.cc | Loading commit data... | |
canonical_simplify.cc | Loading commit data... | |
compute_expr.h | Loading commit data... | |
const_fold.h | Loading commit data... | |
const_int_bound.cc | Loading commit data... | |
detect_linear_equation.cc | Loading commit data... | |
domain_touched.cc | Loading commit data... | |
int_operator.h | Loading commit data... | |
int_set.cc | Loading commit data... | |
int_set.h | Loading commit data... | |
ir_mutator_with_analyzer.cc | Loading commit data... | |
ir_mutator_with_analyzer.h | Loading commit data... | |
ir_visitor_with_analyzer.h | Loading commit data... | |
modular_set.cc | Loading commit data... | |
pattern_match.h | Loading commit data... | |
rewrite_simplify.cc | Loading commit data... | |
rewrite_simplify.h | Loading commit data... | |
stmt_simplify.cc | Loading commit data... |