https://github.com/halide/Halide
Raw File
Tip revision: 04ec9c041fa3eb9f55d9783439eb5c3b36f540bd authored by Steven Johnson on 14 November 2019, 20:17:17 UTC
Merge branch 'master' into pdb_mul_div_mod_multi_thread
Tip revision: 04ec9c0
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 "IR.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(Stmt s);

}  // namespace Internal
}  // namespace Halide

#endif
back to top