blob: 3a6e501dc93ac0c3803eb95ef69ae705af3aaa54 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
//===- llvm-reduce.cpp - The LLVM Delta Reduction utility -----------------===//
//
// 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 is a Specialized Delta Pass, which removes the functions that are
// not in the provided function-chunks.
//
//===----------------------------------------------------------------------===//
#include "Delta.h"
#include "llvm/Transforms/Utils/Cloning.h"
namespace llvm {
class RemoveFunctions {
public:
/// Outputs the number of Functions in the given Module
static int getTargetCount(Module *Program);
/// Clones module and returns it with chunk functions only
static std::unique_ptr<Module>
extractChunksFromModule(std::vector<Chunk> ChunksToKeep, Module *Program);
};
} // namespace llvm
|