mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-02 15:51:54 +00:00

Summary: Tool parses input IR file, and runs the delta debugging algorithm to reduce the functions inside the input file. Reviewers: alexshap, chandlerc Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63672 > llvm-svn: 368071 llvm-svn: 368112
29 lines
988 B
C++
29 lines
988 B
C++
//===- 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
|