<commit_before>//===-- llvm/Support/Mangler.h - Self-contained name mangler ----*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// Unified name mangler for various backends.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_SUPPORT_MANGLER_H
#define LLVM_SUPPORT_MANGLER_H

#include <map>
#include <set>
#include <string>

namespace llvm {
class Type;
class Module;
class Value;
class GlobalValue;

class Mangler {
  /// Prefix - This string is added to each symbol that is emitted, unless the
  /// symbol is marked as not needing this prefix.
  const char *Prefix;
  
  /// UseQuotes - If this is set, the target accepts global names in quotes, 
  /// e.g. "foo bar" is a legal name.  This syntax is used instead of escaping
  /// the space character.  By default, this is false.
  bool UseQuotes;
  
  /// PreserveAsmNames - If this is set, the asm escape character is not removed
  /// from names with 'asm' specifiers. 
  bool PreserveAsmNames;
  
  /// Memo - This is used to remember the name that we assign a value.
  ///
  std::map<const Value*, std::string> Memo;

  /// Count - This simple counter is used to unique value names.
  ///
  unsigned Count;
  
  /// TypeMap - If the client wants us to unique types, this keeps track of the<commit_msg>Use a DenseMap instead of an std::map for mangled name lookup.  This is  improves AsmPrinter runtime on instcombine from 0.3920s to 0.3836s.<commit_after>//===-- llvm/Support/Mangler.h - Self-contained name mangler ----*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// Unified name mangler for various backends.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_SUPPORT_MANGLER_H
#define LLVM_SUPPORT_MANGLER_H

#include "llvm/ADT/DenseMap.h"
#include <map>
#include <set>
#include <string>

namespace llvm {
class Type;
class Module;
class Value;
class GlobalValue;

class Mangler {
  /// Prefix - This string is added to each symbol that is emitted, unless the
  /// symbol is marked as not needing this prefix.
  const char *Prefix;
  
  /// UseQuotes - If this is set, the target accepts global names in quotes, 
  /// e.g. "foo bar" is a legal name.  This syntax is used instead of escaping
  /// the space character.  By default, this is false.
  bool UseQuotes;
  
  /// PreserveAsmNames - If this is set, the asm escape character is not removed
  /// from names with 'asm' specifiers. 
  bool PreserveAsmNames;
  
  /// Memo - This is used to remember the name that we assign a value.
  ///
  DenseMap<const Value*, std::string> Memo;

  /// Count - This simple counter is used to unique value names.
  ///
  unsigned Count;
  
  /// TypeMap - If the client wants us to unique types, this keeps track of the
{'fraction_non_alphanumeric': 0.19183168316831684, 'fraction_numerical': 0.003094059405940594, 'mean_word_length': 1.9962928637627433, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4015193', 'n_tokens_mistral': 913, 'n_tokens_neox': 887, 'n_words': 374}