llvm/llvm/tools/llvm-reduce/deltas/ReduceMetadata.cpp

//===- ReduceMetadata.cpp - Specialized Delta Pass ------------------------===//
//
// 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 implements two functions used by the Generic Delta Debugging
// Algorithm, which are used to reduce Metadata nodes.
//
//===----------------------------------------------------------------------===//

#include "ReduceMetadata.h"
#include "Delta.h"
#include "llvm/ADT/Sequence.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/IntrinsicInst.h"

usingnamespacellvm;

extern cl::OptionCategory LLVMReduceOptions;

static cl::opt<bool> AggressiveMetadataReduction(
    "aggressive-named-md-reduction",
    cl::desc("Reduce named metadata without taking its type into account"),
    cl::cat(LLVMReduceOptions));

static bool shouldKeepDebugIntrinsicMetadata(Instruction &I, MDNode &MD) {}

static bool shouldKeepDebugNamedMetadata(NamedMDNode &MD) {}

// Named metadata with simple list-like behavior, so that it's valid to remove
// operands individually.
static constexpr StringLiteral ListNamedMetadata[] =;

/// Remove unneeded arguments to named metadata.
static void reduceNamedMetadataOperands(Oracle &O, ReducerWorkItem &WorkItem) {}

/// Removes all the Named and Unnamed Metadata Nodes, as well as any debug
/// functions that aren't inside the desired Chunks.
static void extractMetadataFromModule(Oracle &O, ReducerWorkItem &WorkItem) {}

void llvm::reduceMetadataDeltaPass(TestRunner &Test) {}

void llvm::reduceNamedMetadataDeltaPass(TestRunner &Test) {}