Loading...
Searching...
No Matches
HexagonOptimize.h
Go to the documentation of this file.
#ifndef HALIDE_IR_HEXAGON_OPTIMIZE_H
#define HALIDE_IR_HEXAGON_OPTIMIZE_H
/** \file
* Tools for optimizing IR for Hexagon.
*/
#include "Expr.h"
namespace Halide {
struct Target;
namespace Internal {
/** Replace indirect and other loads with simple loads + vlut
* calls. */
Stmt optimize_hexagon_shuffles(const Stmt &s, int lut_alignment);
/* Generate vscatter-vgather instructions on Hexagon using VTCM memory.
* The pass should be run before generating shuffles.
* Some expressions which generate vscatter-vgathers are:
* 1. out(x) = lut(foo(x)) -> vgather
* 2. out(idx(x)) = foo(x) -> vscatter */
Stmt scatter_gather_generator(Stmt s);
/** Hexagon deinterleaves when performing widening operations, and
* interleaves when performing narrowing operations. This pass
* rewrites widenings/narrowings to be explicit in the IR, and
* attempts to simplify away most of the
* interleaving/deinterleaving. */
Stmt optimize_hexagon_instructions(Stmt s, const Target &t);
/** Generate deinterleave or interleave operations, operating on
* groups of vectors at a time. */
//@{
Expr native_deinterleave(const Expr &x);
Expr native_interleave(const Expr &x);
bool is_native_deinterleave(const Expr &x);
bool is_native_interleave(const Expr &x);
//@}
std::string type_suffix(Type type, bool signed_variants = true);
std::string type_suffix(const Expr &a, bool signed_variants = true);
std::string type_suffix(const Expr &a, const Expr &b, bool signed_variants = true);
std::string type_suffix(const std::vector<Expr> &ops, bool signed_variants = true);
} // namespace Internal
} // namespace Halide
#endif
Expr.h
Base classes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt).
Halide::Internal
Definition AbstractGenerator.h:24
Halide::Internal::optimize_hexagon_instructions
Stmt optimize_hexagon_instructions(Stmt s, const Target &t)
Hexagon deinterleaves when performing widening operations, and interleaves when performing narrowing ...
Halide::Internal::native_deinterleave
Expr native_deinterleave(const Expr &x)
Generate deinterleave or interleave operations, operating on groups of vectors at a time.
Halide::Internal::optimize_hexagon_shuffles
Stmt optimize_hexagon_shuffles(const Stmt &s, int lut_alignment)
Replace indirect and other loads with simple loads + vlut calls.
Halide::Internal::is_native_interleave
bool is_native_interleave(const Expr &x)
Halide::Internal::is_native_deinterleave
bool is_native_deinterleave(const Expr &x)
Halide::Internal::scatter_gather_generator
Stmt scatter_gather_generator(Stmt s)
Halide::Internal::native_interleave
Expr native_interleave(const Expr &x)
Halide::Internal::type_suffix
std::string type_suffix(Type type, bool signed_variants=true)
Halide
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Definition AbstractGenerator.h:19
Halide::Expr
A fragment of Halide syntax.
Definition Expr.h:258
Halide::Internal::Stmt
A reference-counted handle to a statement node.
Definition Expr.h:427
Halide::Target
A struct representing a target machine and os to generate code for.
Definition Target.h:19
Halide::Type
Types in the halide type system.
Definition Type.h:283