2019-08-08 22:16:33 +00:00
|
|
|
//===- DeltaManager.h - Runs Delta Passes to reduce Input -----------------===//
|
|
|
|
//
|
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file calls each specialized Delta pass in order to reduce the input IR
|
|
|
|
// file.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "TestRunner.h"
|
|
|
|
#include "deltas/Delta.h"
|
2020-10-28 13:06:42 +00:00
|
|
|
#include "deltas/ReduceAliases.h"
|
2019-09-12 01:20:48 +00:00
|
|
|
#include "deltas/ReduceArguments.h"
|
[llvm-reduce] Reducing attributes
Summary:
This handles all three places where attributes could currently be - `GlobalVariable`, `Function` and `CallBase`.
For last two, it correctly handles all three possible attribute locations (return value, arguments and function itself)
There was a previous attempt at it D73853,
which was committed in rGfc62b36a000681c01e993242b583c5ec4ab48a3c,
but then reverted all the way back in rGb12176d2aafa0ccb2585aa218fc3b454ba84f2a9
due to some (osx?) test failures.
Reviewers: nickdesaulniers, dblaikie, diegotf, george.burgess.iv, jdoerfert, Tyker, arsenm
Reviewed By: nickdesaulniers
Subscribers: wdng, MaskRay, arsenm, llvm-commits, mgorny
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83351
2020-07-09 23:06:59 +03:00
|
|
|
#include "deltas/ReduceAttributes.h"
|
2019-09-18 21:45:05 +00:00
|
|
|
#include "deltas/ReduceBasicBlocks.h"
|
2020-07-25 21:43:36 +03:00
|
|
|
#include "deltas/ReduceFunctionBodies.h"
|
2019-08-08 22:16:33 +00:00
|
|
|
#include "deltas/ReduceFunctions.h"
|
2021-03-28 21:18:45 -07:00
|
|
|
#include "deltas/ReduceGlobalValues.h"
|
2021-01-02 19:56:27 +03:00
|
|
|
#include "deltas/ReduceGlobalVarInitializers.h"
|
2019-08-15 22:54:09 +00:00
|
|
|
#include "deltas/ReduceGlobalVars.h"
|
2020-02-05 14:15:11 -05:00
|
|
|
#include "deltas/ReduceInstructions.h"
|
2020-07-07 01:16:37 +03:00
|
|
|
#include "deltas/ReduceMetadata.h"
|
|
|
|
#include "deltas/ReduceOperandBundles.h"
|
2020-11-10 19:44:18 +00:00
|
|
|
#include "deltas/ReduceSpecialGlobals.h"
|
2019-08-08 22:16:33 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
2019-08-15 22:54:09 +00:00
|
|
|
// TODO: Add CLI option to run only specified Passes (for unit tests)
|
2019-08-08 22:16:33 +00:00
|
|
|
inline void runDeltaPasses(TestRunner &Tester) {
|
2020-11-10 19:44:18 +00:00
|
|
|
reduceSpecialGlobalsDeltaPass(Tester);
|
2020-10-28 13:06:42 +00:00
|
|
|
reduceAliasesDeltaPass(Tester);
|
2020-07-25 21:43:36 +03:00
|
|
|
reduceFunctionBodiesDeltaPass(Tester);
|
2019-08-08 22:16:33 +00:00
|
|
|
reduceFunctionsDeltaPass(Tester);
|
2019-09-18 21:45:05 +00:00
|
|
|
reduceBasicBlocksDeltaPass(Tester);
|
2021-03-28 21:18:45 -07:00
|
|
|
reduceGlobalValuesDeltaPass(Tester);
|
2021-01-02 19:56:27 +03:00
|
|
|
reduceGlobalsInitializersDeltaPass(Tester);
|
2019-08-15 22:54:09 +00:00
|
|
|
reduceGlobalsDeltaPass(Tester);
|
2019-09-10 22:09:58 +00:00
|
|
|
reduceMetadataDeltaPass(Tester);
|
2019-09-12 01:20:48 +00:00
|
|
|
reduceArgumentsDeltaPass(Tester);
|
2019-09-19 00:59:27 +00:00
|
|
|
reduceInstructionsDeltaPass(Tester);
|
2020-07-07 01:16:37 +03:00
|
|
|
reduceOperandBundesDeltaPass(Tester);
|
[llvm-reduce] Reducing attributes
Summary:
This handles all three places where attributes could currently be - `GlobalVariable`, `Function` and `CallBase`.
For last two, it correctly handles all three possible attribute locations (return value, arguments and function itself)
There was a previous attempt at it D73853,
which was committed in rGfc62b36a000681c01e993242b583c5ec4ab48a3c,
but then reverted all the way back in rGb12176d2aafa0ccb2585aa218fc3b454ba84f2a9
due to some (osx?) test failures.
Reviewers: nickdesaulniers, dblaikie, diegotf, george.burgess.iv, jdoerfert, Tyker, arsenm
Reviewed By: nickdesaulniers
Subscribers: wdng, MaskRay, arsenm, llvm-commits, mgorny
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83351
2020-07-09 23:06:59 +03:00
|
|
|
reduceAttributesDeltaPass(Tester);
|
2019-08-08 22:16:33 +00:00
|
|
|
// TODO: Implement the remaining Delta Passes
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace llvm
|