Go to the documentation of this file.
16 #include "llvm/Config/llvm-config.h"
30 #define DEBUG_TYPE "valuesymtab"
34 #ifndef NDEBUG // Only do this in -g mode...
35 for (
const auto &
VI : vmap)
36 dbgs() <<
"Value still in symbol table! Type = '"
37 << *
VI.getValue()->getType() <<
"' Name = '" <<
VI.getKeyData()
39 assert(vmap.empty() &&
"Values remain in symbol table!");
45 unsigned BaseSize = UniqueName.size();
48 UniqueName.
resize(BaseSize);
50 if (
auto *GV = dyn_cast<GlobalValue>(V)) {
57 const Module *
M = GV->getParent();
64 auto IterBool = vmap.
insert(std::make_pair(UniqueName.
str(), V));
66 return &*IterBool.first;
72 void ValueSymbolTable::reinsertValue(
Value *V) {
73 assert(V->
hasName() &&
"Can't insert nameless Value into symbol table");
89 ValueName *VN = makeUniqueName(V, UniqueName);
93 void ValueSymbolTable::removeValueName(
ValueName *V) {
103 if (MaxNameSize > -1 &&
Name.size() > (
unsigned)MaxNameSize)
107 auto IterBool = vmap.
insert(std::make_pair(
Name, V));
108 if (IterBool.second) {
111 return &*IterBool.first;
116 return makeUniqueName(V, UniqueName);
119 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
124 for (
const auto &
I : *
this) {
126 I.getValue()->dump();
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
This is an optimization pass for GlobalISel generic memory operations.
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
StringMapEntry - This is used to represent one value that is inserted into a StringMap.
void remove(MapEntryTy *KeyValue)
remove - Remove the specified key/value pair from the map, but do not erase it.
Triple - Helper class for working with autoconf configuration names.
Expected< ExpressionValue > max(const ExpressionValue &Lhs, const ExpressionValue &Rhs)
bool isNVPTX() const
Tests whether the target is NVPTX (32- or 64-bit).
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
bool insert(MapEntryTy *KeyValue)
insert - Insert the specified key/value pair into the map.
ValueName * getValueName() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
void setValueName(ValueName *VN)
void Destroy(AllocatorTy &allocator)
Destroy - Destroy this StringMapEntry, releasing memory back to the specified allocator.
A Module instance is used to store all the information related to an LLVM module.
StringRef - Represent a constant reference to a string, i.e.
void dump() const
This function can be used from the debugger to display the content of the symbol table while debuggin...
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
StringRef getName() const
Return a constant reference to the value's name.
StringRef str() const
Explicit conversion to StringRef.
A raw_ostream that writes to an SmallVector or SmallString.
LLVM Value Representation.