<commit_before>//===- ReduceArguments.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 a function which calls the Generic Delta pass in order
// to reduce uninteresting Arguments from defined functions.
//
//===----------------------------------------------------------------------===//

#include "ReduceInstructions.h"

using namespace llvm;

/// Removes out-of-chunk arguments from functions, and modifies their calls
/// accordingly. It also removes allocations of out-of-chunk arguments.
/// @returns the Module stripped of out-of-chunk functions
static void extractInstrFromModule(std::vector<Chunk> ChunksToKeep,
                                   Module *Program) {
  int I = 0, InstCount = 0;
  std::set<Instruction *> InstToKeep;

  for (auto &F : *Program)
    for (auto &BB : F)
      for (auto &Inst : BB)
        if (I < (int)ChunksToKeep.size()) {
          if (ChunksToKeep[I].contains(++InstCount))
            InstToKeep.insert(&Inst);
          if (ChunksToKeep[I].end == InstCount)
            ++I;<commit_msg>Fix -Wdocumentation "@returns in a void function" warning. NFCI.<commit_after>//===- ReduceArguments.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 a function which calls the Generic Delta pass in order
// to reduce uninteresting Arguments from defined functions.
//
//===----------------------------------------------------------------------===//

#include "ReduceInstructions.h"

using namespace llvm;

/// Removes out-of-chunk arguments from functions, and modifies their calls
/// accordingly. It also removes allocations of out-of-chunk arguments.
static void extractInstrFromModule(std::vector<Chunk> ChunksToKeep,
                                   Module *Program) {
  int I = 0, InstCount = 0;
  std::set<Instruction *> InstToKeep;

  for (auto &F : *Program)
    for (auto &BB : F)
      for (auto &Inst : BB)
        if (I < (int)ChunksToKeep.size()) {
          if (ChunksToKeep[I].contains(++InstCount))
            InstToKeep.insert(&Inst);
          if (ChunksToKeep[I].end == InstCount)
            ++I;
{'fraction_non_alphanumeric': 0.23943661971830985, 'fraction_numerical': 0.004447739065974796, 'mean_word_length': 1.8440463645943097, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4547612', 'n_tokens_mistral': 709, 'n_tokens_neox': 693, 'n_words': 222}