Halide 19.0.0
Halide compiler and libraries
Loading...
Searching...
No Matches
HexagonOptimize.h
Go to the documentation of this file.
1#ifndef HALIDE_IR_HEXAGON_OPTIMIZE_H
2#define HALIDE_IR_HEXAGON_OPTIMIZE_H
3
4/** \file
5 * Tools for optimizing IR for Hexagon.
6 */
7
8#include "Expr.h"
9
10namespace Halide {
11
12struct Target;
13
14namespace Internal {
15
16/** Replace indirect and other loads with simple loads + vlut
17 * calls. */
18Stmt optimize_hexagon_shuffles(const Stmt &s, int lut_alignment);
19
20/* Generate vscatter-vgather instructions on Hexagon using VTCM memory.
21 * The pass should be run before generating shuffles.
22 * Some expressions which generate vscatter-vgathers are:
23 * 1. out(x) = lut(foo(x)) -> vgather
24 * 2. out(idx(x)) = foo(x) -> vscatter */
26
27/** Hexagon deinterleaves when performing widening operations, and
28 * interleaves when performing narrowing operations. This pass
29 * rewrites widenings/narrowings to be explicit in the IR, and
30 * attempts to simplify away most of the
31 * interleaving/deinterleaving. */
33
34/** Generate deinterleave or interleave operations, operating on
35 * groups of vectors at a time. */
36//@{
41//@}
42
43std::string type_suffix(Type type, bool signed_variants = true);
44
45std::string type_suffix(const Expr &a, bool signed_variants = true);
46
47std::string type_suffix(const Expr &a, const Expr &b, bool signed_variants = true);
48
49std::string type_suffix(const std::vector<Expr> &ops, bool signed_variants = true);
50
51} // namespace Internal
52} // namespace Halide
53
54#endif
Base classes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt)
Stmt optimize_hexagon_instructions(Stmt s, const Target &t)
Hexagon deinterleaves when performing widening operations, and interleaves when performing narrowing ...
Expr native_deinterleave(const Expr &x)
Generate deinterleave or interleave operations, operating on groups of vectors at a time.
Stmt optimize_hexagon_shuffles(const Stmt &s, int lut_alignment)
Replace indirect and other loads with simple loads + vlut calls.
bool is_native_interleave(const Expr &x)
bool is_native_deinterleave(const Expr &x)
Stmt scatter_gather_generator(Stmt s)
Expr native_interleave(const Expr &x)
std::string type_suffix(Type type, bool signed_variants=true)
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
@ Internal
Not visible externally, similar to 'static' linkage in C.
A fragment of Halide syntax.
Definition Expr.h:258
A reference-counted handle to a statement node.
Definition Expr.h:427
A struct representing a target machine and os to generate code for.
Definition Target.h:19
Types in the halide type system.
Definition Type.h:283