Revision 1644e64926892ded4bb05e7f457783ec2639b96a authored by Fangrui Song on 07 September 2022, 18:28:08 UTC, committed by GitHub on 07 September 2022, 18:28:08 UTC
https://github.com/llvm/llvm-project/commit/93600eb50ceeec83c488ded24fa0fd25f997fec6
renamed ModuleAddressSanitizerPass to AddressSanitizerPass.
https://github.com/llvm/llvm-project/commit/4c18670776cd6ac31099a455b2b22b38b0408006
renamed ModuleSanitizerCoveragePass.
1 parent cbe2e63
Raw File
FindCalls.h
#ifndef FIND_CALLS_H
#define FIND_CALLS_H

/** \file
 *
 * Defines analyses to extract the functions called a function.
 */

#include <map>
#include <string>
#include <vector>

#include "Expr.h"

namespace Halide {
namespace Internal {

class Function;

/** Construct a map from name to Function definition object for all Halide
 *  functions called directly in the definition of the Function f, including
 *  in update definitions, update index expressions, and RDom extents. This map
 *  _does not_ include the Function f, unless it is called recursively by
 *  itself.
 */
std::map<std::string, Function> find_direct_calls(const Function &f);

/** Construct a map from name to Function definition object for all Halide
 *  functions called directly in the definition of the Function f, or
 *  indirectly in those functions' definitions, recursively. This map always
 *  _includes_ the Function f.
 */
std::map<std::string, Function> find_transitive_calls(const Function &f);

/** Find all Functions transitively referenced by any Function in `funcs` and return
 * a map of them. */
std::map<std::string, Function> build_environment(const std::vector<Function> &funcs);

}  // namespace Internal
}  // namespace Halide

#endif
back to top