Diego Trevino Ferrer | ddc64eb | 2019-08-08 22:16:33 +0000 | [diff] [blame] | 1 | //===- 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" |
Florian Hahn | 23c8da2 | 2020-10-28 13:06:42 +0000 | [diff] [blame] | 16 | #include "deltas/ReduceAliases.h" |
David Blaikie | 5adb3d2 | 2019-09-12 01:20:48 +0000 | [diff] [blame] | 17 | #include "deltas/ReduceArguments.h" |
Roman Lebedev | 03640ee | 2020-07-09 23:06:59 +0300 | [diff] [blame] | 18 | #include "deltas/ReduceAttributes.h" |
David Blaikie | 070598b | 2019-09-18 21:45:05 +0000 | [diff] [blame] | 19 | #include "deltas/ReduceBasicBlocks.h" |
Roman Lebedev | 136c8f5 | 2020-07-25 21:43:36 +0300 | [diff] [blame] | 20 | #include "deltas/ReduceFunctionBodies.h" |
Diego Trevino Ferrer | ddc64eb | 2019-08-08 22:16:33 +0000 | [diff] [blame] | 21 | #include "deltas/ReduceFunctions.h" |
Diego Trevino Ferrer | 0ffe687 | 2019-08-15 22:54:09 +0000 | [diff] [blame] | 22 | #include "deltas/ReduceGlobalVars.h" |
Nico Weber | b12176d | 2020-02-05 14:15:11 -0500 | [diff] [blame] | 23 | #include "deltas/ReduceInstructions.h" |
Roman Lebedev | 05f2b5c | 2020-07-07 01:16:37 +0300 | [diff] [blame] | 24 | #include "deltas/ReduceMetadata.h" |
| 25 | #include "deltas/ReduceOperandBundles.h" |
Florian Hahn | 250de73 | 2020-11-10 19:44:18 +0000 | [diff] [blame^] | 26 | #include "deltas/ReduceSpecialGlobals.h" |
Diego Trevino Ferrer | ddc64eb | 2019-08-08 22:16:33 +0000 | [diff] [blame] | 27 | |
| 28 | namespace llvm { |
| 29 | |
Diego Trevino Ferrer | 0ffe687 | 2019-08-15 22:54:09 +0000 | [diff] [blame] | 30 | // TODO: Add CLI option to run only specified Passes (for unit tests) |
Diego Trevino Ferrer | ddc64eb | 2019-08-08 22:16:33 +0000 | [diff] [blame] | 31 | inline void runDeltaPasses(TestRunner &Tester) { |
Florian Hahn | 250de73 | 2020-11-10 19:44:18 +0000 | [diff] [blame^] | 32 | reduceSpecialGlobalsDeltaPass(Tester); |
Florian Hahn | 23c8da2 | 2020-10-28 13:06:42 +0000 | [diff] [blame] | 33 | reduceAliasesDeltaPass(Tester); |
Roman Lebedev | 136c8f5 | 2020-07-25 21:43:36 +0300 | [diff] [blame] | 34 | reduceFunctionBodiesDeltaPass(Tester); |
Diego Trevino Ferrer | ddc64eb | 2019-08-08 22:16:33 +0000 | [diff] [blame] | 35 | reduceFunctionsDeltaPass(Tester); |
David Blaikie | 070598b | 2019-09-18 21:45:05 +0000 | [diff] [blame] | 36 | reduceBasicBlocksDeltaPass(Tester); |
Diego Trevino Ferrer | 0ffe687 | 2019-08-15 22:54:09 +0000 | [diff] [blame] | 37 | reduceGlobalsDeltaPass(Tester); |
David Blaikie | 477c1df | 2019-09-10 22:09:58 +0000 | [diff] [blame] | 38 | reduceMetadataDeltaPass(Tester); |
David Blaikie | 5adb3d2 | 2019-09-12 01:20:48 +0000 | [diff] [blame] | 39 | reduceArgumentsDeltaPass(Tester); |
David Blaikie | 798fe47 | 2019-09-19 00:59:27 +0000 | [diff] [blame] | 40 | reduceInstructionsDeltaPass(Tester); |
Roman Lebedev | 05f2b5c | 2020-07-07 01:16:37 +0300 | [diff] [blame] | 41 | reduceOperandBundesDeltaPass(Tester); |
Roman Lebedev | 03640ee | 2020-07-09 23:06:59 +0300 | [diff] [blame] | 42 | reduceAttributesDeltaPass(Tester); |
Diego Trevino Ferrer | ddc64eb | 2019-08-08 22:16:33 +0000 | [diff] [blame] | 43 | // TODO: Implement the remaining Delta Passes |
| 44 | } |
| 45 | |
| 46 | } // namespace llvm |