blob: 8033d76f1d5f48b405edd8d7ab70a885dbf1af54 [file] [log] [blame]
Diego Trevino Ferrerddc64eb2019-08-08 22:16:33 +00001//===- DeltaManager.h - Runs Delta Passes to reduce Input -----------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file calls each specialized Delta pass in order to reduce the input IR
10// file.
11//
12//===----------------------------------------------------------------------===//
13
14#include "TestRunner.h"
15#include "deltas/Delta.h"
16#include "deltas/ReduceFunctions.h"
Diego Trevino Ferrer0ffe6872019-08-15 22:54:09 +000017#include "deltas/ReduceGlobalVars.h"
Diego Trevino Ferrerddc64eb2019-08-08 22:16:33 +000018
19namespace llvm {
20
Diego Trevino Ferrer0ffe6872019-08-15 22:54:09 +000021// TODO: Add CLI option to run only specified Passes (for unit tests)
Diego Trevino Ferrerddc64eb2019-08-08 22:16:33 +000022inline void runDeltaPasses(TestRunner &Tester) {
Diego Trevino Ferrer0ffe6872019-08-15 22:54:09 +000023 outs() << "Reducing functions...\n";
Diego Trevino Ferrerddc64eb2019-08-08 22:16:33 +000024 reduceFunctionsDeltaPass(Tester);
Diego Trevino Ferrer0ffe6872019-08-15 22:54:09 +000025 outs() << "Reducing GVs...\n";
26 reduceGlobalsDeltaPass(Tester);
Diego Trevino Ferrerddc64eb2019-08-08 22:16:33 +000027 // TODO: Implement the remaining Delta Passes
28}
29
30} // namespace llvm