Path: blob/main/contrib/llvm-project/llvm/lib/SandboxIR/PassManager.cpp
213766 views
//===- PassManager.cpp - Runs a pipeline of Sandbox IR passes -------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#include "llvm/SandboxIR/PassManager.h"910namespace llvm::sandboxir {1112bool FunctionPassManager::runOnFunction(Function &F, const Analyses &A) {13bool Change = false;14for (auto &Pass : Passes) {15Change |= Pass->runOnFunction(F, A);16// TODO: run the verifier.17}18// TODO: Check ChangeAll against hashes before/after.19return Change;20}2122bool RegionPassManager::runOnRegion(Region &R, const Analyses &A) {23bool Change = false;24for (auto &Pass : Passes) {25Change |= Pass->runOnRegion(R, A);26// TODO: run the verifier.27}28// TODO: Check ChangeAll against hashes before/after.29return Change;30}3132} // namespace llvm::sandboxir333435