https://github.com/halide/Halide
Raw File
Tip revision: 92aaa6824ad5bffb525a8279564e3f45f620dd36 authored by Steven Johnson on 05 March 2024, 17:58:23 UTC
Merge branch 'arm_sve_redux' into srj/test-arm_sve_redux
Tip revision: 92aaa68
RemoveDeadAllocations.h
#ifndef HALIDE_REMOVE_DEAD_ALLOCATIONS_H
#define HALIDE_REMOVE_DEAD_ALLOCATIONS_H

/** \file
 * Defines the lowering pass that removes allocate and free nodes that
 * are not used.
 */

#include "Expr.h"

namespace Halide {
namespace Internal {

/** Find Allocate/Free pairs that are never loaded from or stored to,
 *  and remove them from the Stmt. This doesn't touch Realize/Call
 *  nodes and so must be called after storage_flattening.
 */
Stmt remove_dead_allocations(const Stmt &s);

}  // namespace Internal
}  // namespace Halide

#endif
back to top