LLVM  14.0.0git
ValueMap.h
Go to the documentation of this file.
1 //===- ValueMap.h - Safe map from Values to data ----------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file defines the ValueMap class. ValueMap maps Value* or any subclass
10 // to an arbitrary other type. It provides the DenseMap interface but updates
11 // itself to remain safe when keys are RAUWed or deleted. By default, when a
12 // key is RAUWed from V1 to V2, the old mapping V1->target is removed, and a new
13 // mapping V2->target is added. If V2 already existed, its old target is
14 // overwritten. When a key is deleted, its mapping is removed.
15 //
16 // You can override a ValueMap's Config parameter to control exactly what
17 // happens on RAUW and destruction and to get called back on each event. It's
18 // legal to call back into the ValueMap from a Config's callbacks. Config
19 // parameters should inherit from ValueMapConfig<KeyT> to get default
20 // implementations of all the methods ValueMap uses. See ValueMapConfig for
21 // documentation of the functions you can override.
22 //
23 //===----------------------------------------------------------------------===//
24 
25 #ifndef LLVM_IR_VALUEMAP_H
26 #define LLVM_IR_VALUEMAP_H
27 
28 #include "llvm/ADT/DenseMap.h"
29 #include "llvm/ADT/DenseMapInfo.h"
30 #include "llvm/ADT/None.h"
31 #include "llvm/ADT/Optional.h"
32 #include "llvm/IR/TrackingMDRef.h"
33 #include "llvm/IR/ValueHandle.h"
34 #include "llvm/Support/Casting.h"
35 #include "llvm/Support/Mutex.h"
36 #include <algorithm>
37 #include <cassert>
38 #include <cstddef>
39 #include <iterator>
40 #include <mutex>
41 #include <type_traits>
42 #include <utility>
43 
44 namespace llvm {
45 
46 template<typename KeyT, typename ValueT, typename Config>
48 template<typename DenseMapT, typename KeyT>
50 template<typename DenseMapT, typename KeyT>
52 
53 /// This class defines the default behavior for configurable aspects of
54 /// ValueMap<>. User Configs should inherit from this class to be as compatible
55 /// as possible with future versions of ValueMap.
56 template<typename KeyT, typename MutexT = sys::Mutex>
58  using mutex_type = MutexT;
59 
60  /// If FollowRAUW is true, the ValueMap will update mappings on RAUW. If it's
61  /// false, the ValueMap will leave the original mapping in place.
62  enum { FollowRAUW = true };
63 
64  // All methods will be called with a first argument of type ExtraData. The
65  // default implementations in this class take a templated first argument so
66  // that users' subclasses can use any type they want without having to
67  // override all the defaults.
68  struct ExtraData {};
69 
70  template<typename ExtraDataT>
71  static void onRAUW(const ExtraDataT & /*Data*/, KeyT /*Old*/, KeyT /*New*/) {}
72  template<typename ExtraDataT>
73  static void onDelete(const ExtraDataT &/*Data*/, KeyT /*Old*/) {}
74 
75  /// Returns a mutex that should be acquired around any changes to the map.
76  /// This is only acquired from the CallbackVH (and held around calls to onRAUW
77  /// and onDelete) and not inside other ValueMap methods. NULL means that no
78  /// mutex is necessary.
79  template<typename ExtraDataT>
80  static mutex_type *getMutex(const ExtraDataT &/*Data*/) { return nullptr; }
81 };
82 
83 /// See the file comment.
84 template<typename KeyT, typename ValueT, typename Config =ValueMapConfig<KeyT>>
85 class ValueMap {
86  friend class ValueMapCallbackVH<KeyT, ValueT, Config>;
87 
91  using ExtraData = typename Config::ExtraData;
92 
93  MapT Map;
94  Optional<MDMapT> MDMap;
95  ExtraData Data;
96 
97 public:
98  using key_type = KeyT;
100  using value_type = std::pair<KeyT, ValueT>;
101  using size_type = unsigned;
102 
103  explicit ValueMap(unsigned NumInitBuckets = 64)
104  : Map(NumInitBuckets), Data() {}
105  explicit ValueMap(const ExtraData &Data, unsigned NumInitBuckets = 64)
106  : Map(NumInitBuckets), Data(Data) {}
107  // ValueMap can't be copied nor moved, beucase the callbacks store pointer
108  // to it.
109  ValueMap(const ValueMap &) = delete;
110  ValueMap(ValueMap &&) = delete;
111  ValueMap &operator=(const ValueMap &) = delete;
112  ValueMap &operator=(ValueMap &&) = delete;
113 
114  bool hasMD() const { return bool(MDMap); }
115  MDMapT &MD() {
116  if (!MDMap)
117  MDMap.emplace();
118  return *MDMap;
119  }
120  Optional<MDMapT> &getMDMap() { return MDMap; }
121 
122  /// Get the mapped metadata, if it's in the map.
124  if (!MDMap)
125  return None;
126  auto Where = MDMap->find(MD);
127  if (Where == MDMap->end())
128  return None;
129  return Where->second.get();
130  }
131 
134 
135  inline iterator begin() { return iterator(Map.begin()); }
136  inline iterator end() { return iterator(Map.end()); }
137  inline const_iterator begin() const { return const_iterator(Map.begin()); }
138  inline const_iterator end() const { return const_iterator(Map.end()); }
139 
140  bool empty() const { return Map.empty(); }
141  size_type size() const { return Map.size(); }
142 
143  /// Grow the map so that it has at least Size buckets. Does not shrink
144  void resize(size_t Size) { Map.resize(Size); }
145 
146  void clear() {
147  Map.clear();
148  MDMap.reset();
149  }
150 
151  /// Return 1 if the specified key is in the map, 0 otherwise.
152  size_type count(const KeyT &Val) const {
153  return Map.find_as(Val) == Map.end() ? 0 : 1;
154  }
155 
156  iterator find(const KeyT &Val) {
157  return iterator(Map.find_as(Val));
158  }
159  const_iterator find(const KeyT &Val) const {
160  return const_iterator(Map.find_as(Val));
161  }
162 
163  /// lookup - Return the entry for the specified key, or a default
164  /// constructed value if no such entry exists.
165  ValueT lookup(const KeyT &Val) const {
166  typename MapT::const_iterator I = Map.find_as(Val);
167  return I != Map.end() ? I->second : ValueT();
168  }
169 
170  // Inserts key,value pair into the map if the key isn't already in the map.
171  // If the key is already in the map, it returns false and doesn't update the
172  // value.
173  std::pair<iterator, bool> insert(const std::pair<KeyT, ValueT> &KV) {
174  auto MapResult = Map.insert(std::make_pair(Wrap(KV.first), KV.second));
175  return std::make_pair(iterator(MapResult.first), MapResult.second);
176  }
177 
178  std::pair<iterator, bool> insert(std::pair<KeyT, ValueT> &&KV) {
179  auto MapResult =
180  Map.insert(std::make_pair(Wrap(KV.first), std::move(KV.second)));
181  return std::make_pair(iterator(MapResult.first), MapResult.second);
182  }
183 
184  /// insert - Range insertion of pairs.
185  template<typename InputIt>
186  void insert(InputIt I, InputIt E) {
187  for (; I != E; ++I)
188  insert(*I);
189  }
190 
191  bool erase(const KeyT &Val) {
192  typename MapT::iterator I = Map.find_as(Val);
193  if (I == Map.end())
194  return false;
195 
196  Map.erase(I);
197  return true;
198  }
199  void erase(iterator I) {
200  return Map.erase(I.base());
201  }
202 
204  return Map.FindAndConstruct(Wrap(Key));
205  }
206 
208  return Map[Wrap(Key)];
209  }
210 
211  /// isPointerIntoBucketsArray - Return true if the specified pointer points
212  /// somewhere into the ValueMap's array of buckets (i.e. either to a key or
213  /// value in the ValueMap).
214  bool isPointerIntoBucketsArray(const void *Ptr) const {
215  return Map.isPointerIntoBucketsArray(Ptr);
216  }
217 
218  /// getPointerIntoBucketsArray() - Return an opaque pointer into the buckets
219  /// array. In conjunction with the previous method, this can be used to
220  /// determine whether an insertion caused the ValueMap to reallocate.
221  const void *getPointerIntoBucketsArray() const {
222  return Map.getPointerIntoBucketsArray();
223  }
224 
225 private:
226  // Takes a key being looked up in the map and wraps it into a
227  // ValueMapCallbackVH, the actual key type of the map. We use a helper
228  // function because ValueMapCVH is constructed with a second parameter.
229  ValueMapCVH Wrap(KeyT key) const {
230  // The only way the resulting CallbackVH could try to modify *this (making
231  // the const_cast incorrect) is if it gets inserted into the map. But then
232  // this function must have been called from a non-const method, making the
233  // const_cast ok.
234  return ValueMapCVH(key, const_cast<ValueMap*>(this));
235  }
236 };
237 
238 // This CallbackVH updates its ValueMap when the contained Value changes,
239 // according to the user's preferences expressed through the Config object.
240 template <typename KeyT, typename ValueT, typename Config>
241 class ValueMapCallbackVH final : public CallbackVH {
242  friend class ValueMap<KeyT, ValueT, Config>;
244 
246  using KeySansPointerT = std::remove_pointer_t<KeyT>;
247 
248  ValueMapT *Map;
249 
251  : CallbackVH(const_cast<Value*>(static_cast<const Value*>(Key))),
252  Map(Map) {}
253 
254  // Private constructor used to create empty/tombstone DenseMap keys.
255  ValueMapCallbackVH(Value *V) : CallbackVH(V), Map(nullptr) {}
256 
257 public:
258  KeyT Unwrap() const { return cast_or_null<KeySansPointerT>(getValPtr()); }
259 
260  void deleted() override {
261  // Make a copy that won't get changed even when *this is destroyed.
262  ValueMapCallbackVH Copy(*this);
263  typename Config::mutex_type *M = Config::getMutex(Copy.Map->Data);
264  std::unique_lock<typename Config::mutex_type> Guard;
265  if (M)
266  Guard = std::unique_lock<typename Config::mutex_type>(*M);
267  Config::onDelete(Copy.Map->Data, Copy.Unwrap()); // May destroy *this.
268  Copy.Map->Map.erase(Copy); // Definitely destroys *this.
269  }
270 
271  void allUsesReplacedWith(Value *new_key) override {
272  assert(isa<KeySansPointerT>(new_key) &&
273  "Invalid RAUW on key of ValueMap<>");
274  // Make a copy that won't get changed even when *this is destroyed.
275  ValueMapCallbackVH Copy(*this);
276  typename Config::mutex_type *M = Config::getMutex(Copy.Map->Data);
277  std::unique_lock<typename Config::mutex_type> Guard;
278  if (M)
279  Guard = std::unique_lock<typename Config::mutex_type>(*M);
280 
281  KeyT typed_new_key = cast<KeySansPointerT>(new_key);
282  // Can destroy *this:
283  Config::onRAUW(Copy.Map->Data, Copy.Unwrap(), typed_new_key);
284  if (Config::FollowRAUW) {
285  typename ValueMapT::MapT::iterator I = Copy.Map->Map.find(Copy);
286  // I could == Copy.Map->Map.end() if the onRAUW callback already
287  // removed the old mapping.
288  if (I != Copy.Map->Map.end()) {
289  ValueT Target(std::move(I->second));
290  Copy.Map->Map.erase(I); // Definitely destroys *this.
291  Copy.Map->insert(std::make_pair(typed_new_key, std::move(Target)));
292  }
293  }
294  }
295 };
296 
297 template<typename KeyT, typename ValueT, typename Config>
300 
301  static inline VH getEmptyKey() {
303  }
304 
305  static inline VH getTombstoneKey() {
307  }
308 
309  static unsigned getHashValue(const VH &Val) {
311  }
312 
313  static unsigned getHashValue(const KeyT &Val) {
315  }
316 
317  static bool isEqual(const VH &LHS, const VH &RHS) {
318  return LHS == RHS;
319  }
320 
321  static bool isEqual(const KeyT &LHS, const VH &RHS) {
322  return LHS == RHS.getValPtr();
323  }
324 };
325 
326 template <typename DenseMapT, typename KeyT> class ValueMapIterator {
327  using BaseT = typename DenseMapT::iterator;
328  using ValueT = typename DenseMapT::mapped_type;
329 
330  BaseT I;
331 
332 public:
333  using iterator_category = std::forward_iterator_tag;
334  using value_type = std::pair<KeyT, typename DenseMapT::mapped_type>;
335  using difference_type = std::ptrdiff_t;
336  using pointer = value_type *;
338 
340  ValueMapIterator(BaseT I) : I(I) {}
341 
342  BaseT base() const { return I; }
343 
344  struct ValueTypeProxy {
345  const KeyT first;
346  ValueT& second;
347 
348  ValueTypeProxy *operator->() { return this; }
349 
350  operator std::pair<KeyT, ValueT>() const {
351  return std::make_pair(first, second);
352  }
353  };
354 
356  ValueTypeProxy Result = {I->first.Unwrap(), I->second};
357  return Result;
358  }
359 
361  return operator*();
362  }
363 
364  bool operator==(const ValueMapIterator &RHS) const {
365  return I == RHS.I;
366  }
367  bool operator!=(const ValueMapIterator &RHS) const {
368  return I != RHS.I;
369  }
370 
371  inline ValueMapIterator& operator++() { // Preincrement
372  ++I;
373  return *this;
374  }
375  ValueMapIterator operator++(int) { // Postincrement
376  ValueMapIterator tmp = *this; ++*this; return tmp;
377  }
378 };
379 
380 template <typename DenseMapT, typename KeyT> class ValueMapConstIterator {
381  using BaseT = typename DenseMapT::const_iterator;
382  using ValueT = typename DenseMapT::mapped_type;
383 
384  BaseT I;
385 
386 public:
387  using iterator_category = std::forward_iterator_tag;
388  using value_type = std::pair<KeyT, typename DenseMapT::mapped_type>;
389  using difference_type = std::ptrdiff_t;
390  using pointer = value_type *;
392 
394  ValueMapConstIterator(BaseT I) : I(I) {}
396  : I(Other.base()) {}
397 
398  BaseT base() const { return I; }
399 
400  struct ValueTypeProxy {
401  const KeyT first;
402  const ValueT& second;
403  ValueTypeProxy *operator->() { return this; }
404  operator std::pair<KeyT, ValueT>() const {
405  return std::make_pair(first, second);
406  }
407  };
408 
410  ValueTypeProxy Result = {I->first.Unwrap(), I->second};
411  return Result;
412  }
413 
415  return operator*();
416  }
417 
418  bool operator==(const ValueMapConstIterator &RHS) const {
419  return I == RHS.I;
420  }
421  bool operator!=(const ValueMapConstIterator &RHS) const {
422  return I != RHS.I;
423  }
424 
425  inline ValueMapConstIterator& operator++() { // Preincrement
426  ++I;
427  return *this;
428  }
429  ValueMapConstIterator operator++(int) { // Postincrement
430  ValueMapConstIterator tmp = *this; ++*this; return tmp;
431  }
432 };
433 
434 } // end namespace llvm
435 
436 #endif // LLVM_IR_VALUEMAP_H
llvm::Check::Size
@ Size
Definition: FileCheck.h:73
llvm::ValueMapIterator::operator*
ValueTypeProxy operator*() const
Definition: ValueMap.h:355
llvm::ValueMap::getMDMap
Optional< MDMapT > & getMDMap()
Definition: ValueMap.h:120
llvm::ValueMap::find
const_iterator find(const KeyT &Val) const
Definition: ValueMap.h:159
llvm::DenseMapInfo< ValueMapCallbackVH< KeyT, ValueT, Config > >::isEqual
static bool isEqual(const KeyT &LHS, const VH &RHS)
Definition: ValueMap.h:321
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
KeyT
M
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
Definition: README.txt:252
llvm::ValueMapIterator::operator==
bool operator==(const ValueMapIterator &RHS) const
Definition: ValueMap.h:364
llvm::ValueMap::getMappedMD
Optional< Metadata * > getMappedMD(const Metadata *MD) const
Get the mapped metadata, if it's in the map.
Definition: ValueMap.h:123
Optional.h
llvm::ValueMap::insert
void insert(InputIt I, InputIt E)
insert - Range insertion of pairs.
Definition: ValueMap.h:186
llvm::ValueMap::begin
const_iterator begin() const
Definition: ValueMap.h:137
llvm::ValueMapIterator::ValueTypeProxy::first
const KeyT first
Definition: ValueMap.h:345
llvm::ValueMap::end
iterator end()
Definition: ValueMap.h:136
llvm::ValueMapConstIterator::pointer
value_type * pointer
Definition: ValueMap.h:390
llvm::Function
Definition: Function.h:62
llvm::ValueMapIterator::base
BaseT base() const
Definition: ValueMap.h:342
llvm::Target
Target - Wrapper for Target specific information.
Definition: TargetRegistry.h:137
llvm::ValueMap::hasMD
bool hasMD() const
Definition: ValueMap.h:114
llvm::ValueMap::empty
bool empty() const
Definition: ValueMap.h:140
llvm::ValueMapConstIterator::ValueMapConstIterator
ValueMapConstIterator(ValueMapIterator< DenseMapT, KeyT > Other)
Definition: ValueMap.h:395
llvm::ValueMapIterator::ValueMapIterator
ValueMapIterator()
Definition: ValueMap.h:339
llvm::ValueMap::iterator
ValueMapIterator< MapT, KeyT > iterator
Definition: ValueMap.h:132
llvm::DenseMapIterator
Definition: DenseMap.h:56
llvm::ValueMapIterator::iterator_category
std::forward_iterator_tag iterator_category
Definition: ValueMap.h:333
DenseMap.h
llvm::ValueMap::erase
void erase(iterator I)
Definition: ValueMap.h:199
llvm::ValueMapCallbackVH::allUsesReplacedWith
void allUsesReplacedWith(Value *new_key) override
Definition: ValueMap.h:271
llvm::ValueMapConstIterator::iterator_category
std::forward_iterator_tag iterator_category
Definition: ValueMap.h:387
llvm::AMDGPU::Exp::Target
Target
Definition: SIDefines.h:742
llvm::Optional
Definition: APInt.h:33
llvm::ValueMapConfig::ExtraData
Definition: ValueMap.h:68
tmp
alloca< 16 x float >, align 16 %tmp2=alloca< 16 x float >, align 16 store< 16 x float > %A,< 16 x float > *%tmp %s=bitcast< 16 x float > *%tmp to i8 *%s2=bitcast< 16 x float > *%tmp2 to i8 *call void @llvm.memcpy.i64(i8 *%s, i8 *%s2, i64 64, i32 16) %R=load< 16 x float > *%tmp2 ret< 16 x float > %R } declare void @llvm.memcpy.i64(i8 *nocapture, i8 *nocapture, i64, i32) nounwind which compiles to:_foo:subl $140, %esp movaps %xmm3, 112(%esp) movaps %xmm2, 96(%esp) movaps %xmm1, 80(%esp) movaps %xmm0, 64(%esp) movl 60(%esp), %eax movl %eax, 124(%esp) movl 56(%esp), %eax movl %eax, 120(%esp) movl 52(%esp), %eax< many many more 32-bit copies > movaps(%esp), %xmm0 movaps 16(%esp), %xmm1 movaps 32(%esp), %xmm2 movaps 48(%esp), %xmm3 addl $140, %esp ret On Nehalem, it may even be cheaper to just use movups when unaligned than to fall back to lower-granularity chunks. Implement processor-specific optimizations for parity with GCC on these processors. GCC does two optimizations:1. ix86_pad_returns inserts a noop before ret instructions if immediately preceded by a conditional branch or is the target of a jump. 2. ix86_avoid_jump_misspredicts inserts noops in cases where a 16-byte block of code contains more than 3 branches. The first one is done for all AMDs, Core2, and "Generic" The second one is done for:Atom, Pentium Pro, all AMDs, Pentium 4, Nocona, Core 2, and "Generic" Testcase:int x(int a) { return(a &0xf0)> >4 tmp
Definition: README.txt:1347
llvm::ValueMapConfig::onDelete
static void onDelete(const ExtraDataT &, KeyT)
Definition: ValueMap.h:73
llvm::Data
@ Data
Definition: SIMachineScheduler.h:55
llvm::ValueMapIterator::difference_type
std::ptrdiff_t difference_type
Definition: ValueMap.h:335
llvm::ValueMap::resize
void resize(size_t Size)
Grow the map so that it has at least Size buckets. Does not shrink.
Definition: ValueMap.h:144
llvm::ValueMapIterator::ValueMapIterator
ValueMapIterator(BaseT I)
Definition: ValueMap.h:340
llvm::ValueMapConstIterator::ValueTypeProxy::second
const ValueT & second
Definition: ValueMap.h:402
llvm::ValueMapCallbackVH::deleted
void deleted() override
Definition: ValueMap.h:260
llvm::ValueMap::size
size_type size() const
Definition: ValueMap.h:141
llvm::DenseMapInfo
Definition: APInt.h:34
E
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
llvm::ValueMapConstIterator::ValueMapConstIterator
ValueMapConstIterator()
Definition: ValueMap.h:393
llvm::AMDGPU::PALMD::Key
Key
PAL metadata keys.
Definition: AMDGPUMetadata.h:481
llvm::ValueMapConstIterator::ValueMapConstIterator
ValueMapConstIterator(BaseT I)
Definition: ValueMap.h:394
llvm::ValueMap::begin
iterator begin()
Definition: ValueMap.h:135
llvm::Metadata
Root of the metadata hierarchy.
Definition: Metadata.h:62
llvm::ValueMapConfig
This class defines the default behavior for configurable aspects of ValueMap<>.
Definition: ValueMap.h:57
llvm::sys::SmartMutex< false >
llvm::ValueMap::count
size_type count(const KeyT &Val) const
Return 1 if the specified key is in the map, 0 otherwise.
Definition: ValueMap.h:152
llvm::None
const NoneType None
Definition: None.h:23
llvm::ValueMap::clear
void clear()
Definition: ValueMap.h:146
llvm::ValueMapConstIterator::ValueTypeProxy::operator->
ValueTypeProxy * operator->()
Definition: ValueMap.h:403
llvm::ValueMap::operator=
ValueMap & operator=(const ValueMap &)=delete
llvm::ValueMapConstIterator::operator!=
bool operator!=(const ValueMapConstIterator &RHS) const
Definition: ValueMap.h:421
llvm::ValueMapIterator::reference
value_type & reference
Definition: ValueMap.h:337
llvm::ValueMapConstIterator::difference_type
std::ptrdiff_t difference_type
Definition: ValueMap.h:389
llvm::ValueMap::MD
MDMapT & MD()
Definition: ValueMap.h:115
llvm::ValueMapConfig::onRAUW
static void onRAUW(const ExtraDataT &, KeyT, KeyT)
Definition: ValueMap.h:71
llvm::ValueMapConfig::getMutex
static mutex_type * getMutex(const ExtraDataT &)
Returns a mutex that should be acquired around any changes to the map.
Definition: ValueMap.h:80
llvm::ValueMap::operator[]
ValueT & operator[](const KeyT &Key)
Definition: ValueMap.h:207
llvm::DenseMapInfo< ValueMapCallbackVH< KeyT, ValueT, Config > >::getEmptyKey
static VH getEmptyKey()
Definition: ValueMap.h:301
llvm::Optional::reset
void reset()
Definition: Optional.h:278
const
aarch64 promote const
Definition: AArch64PromoteConstant.cpp:232
llvm::ValueMapConstIterator::base
BaseT base() const
Definition: ValueMap.h:398
llvm::ValueMapIterator::ValueTypeProxy
Definition: ValueMap.h:344
llvm::Optional::emplace
void emplace(ArgTypes &&... Args)
Create a new object by constructing it in place with the given arguments.
Definition: Optional.h:264
llvm::ValueMapCallbackVH::Unwrap
KeyT Unwrap() const
Definition: ValueMap.h:258
move
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
Definition: README.txt:546
llvm::ValueMapIterator::operator->
ValueTypeProxy operator->() const
Definition: ValueMap.h:360
llvm::DenseMap< ValueMapCVH, FuncInfo, DenseMapInfo< ValueMapCVH > >
llvm::ValueMap::erase
bool erase(const KeyT &Val)
Definition: ValueMap.h:191
I
#define I(x, y, z)
Definition: MD5.cpp:59
llvm::ValueMapConstIterator::ValueTypeProxy::first
const KeyT first
Definition: ValueMap.h:401
llvm::DenseMapBase::find
iterator find(const_arg_type_t< KeyT > Val)
Definition: DenseMap.h:150
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::ValueMapIterator::ValueTypeProxy::second
ValueT & second
Definition: ValueMap.h:346
llvm::ValueMapIterator::operator!=
bool operator!=(const ValueMapIterator &RHS) const
Definition: ValueMap.h:367
llvm::ValueMap::insert
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &KV)
Definition: ValueMap.h:173
llvm::ValueMap::getPointerIntoBucketsArray
const void * getPointerIntoBucketsArray() const
getPointerIntoBucketsArray() - Return an opaque pointer into the buckets array.
Definition: ValueMap.h:221
None.h
ValueT
llvm::ValueMapIterator::ValueTypeProxy::operator->
ValueTypeProxy * operator->()
Definition: ValueMap.h:348
llvm::ValueMap
See the file comment.
Definition: ValueMap.h:85
Mutex.h
ValueHandle.h
llvm::ValueMapConstIterator::operator++
ValueMapConstIterator operator++(int)
Definition: ValueMap.h:429
llvm::ValueMap::end
const_iterator end() const
Definition: ValueMap.h:138
llvm::ValueMapConstIterator::operator*
ValueTypeProxy operator*() const
Definition: ValueMap.h:409
llvm::ValueMapIterator
Definition: ValueMap.h:49
llvm::ValueMapCallbackVH
Definition: ValueMap.h:47
llvm::DenseMapBase::end
iterator end()
Definition: DenseMap.h:83
llvm::ValueMapConstIterator
Definition: ValueMap.h:51
llvm::ValueMap::ValueMap
ValueMap(unsigned NumInitBuckets=64)
Definition: ValueMap.h:103
llvm::DenseMapInfo< ValueMapCallbackVH< KeyT, ValueT, Config > >::getHashValue
static unsigned getHashValue(const KeyT &Val)
Definition: ValueMap.h:313
Casting.h
TrackingMDRef.h
llvm::ValueMapConstIterator::operator++
ValueMapConstIterator & operator++()
Definition: ValueMap.h:425
llvm::ValueMap::find
iterator find(const KeyT &Val)
Definition: ValueMap.h:156
llvm::ValueMapIterator::operator++
ValueMapIterator & operator++()
Definition: ValueMap.h:371
llvm::ValueMap::insert
std::pair< iterator, bool > insert(std::pair< KeyT, ValueT > &&KV)
Definition: ValueMap.h:178
llvm::CallbackVH
Value handle with callbacks on RAUW and destruction.
Definition: ValueHandle.h:383
llvm::ValueMap::FindAndConstruct
value_type & FindAndConstruct(const KeyT &Key)
Definition: ValueMap.h:203
llvm::ValueMapConstIterator::reference
value_type & reference
Definition: ValueMap.h:391
llvm::DenseMapInfo< ValueMapCallbackVH< KeyT, ValueT, Config > >::getHashValue
static unsigned getHashValue(const VH &Val)
Definition: ValueMap.h:309
llvm::ValueMapIterator::value_type
std::pair< KeyT, typename DenseMapT::mapped_type > value_type
Definition: ValueMap.h:334
llvm::ValueMap< const Function *, FuncInfo >::value_type
std::pair< const Function *, FuncInfo > value_type
Definition: ValueMap.h:100
llvm::ValueMap::const_iterator
ValueMapConstIterator< MapT, KeyT > const_iterator
Definition: ValueMap.h:133
DenseMapInfo.h
llvm::ValueMap< const Function *, FuncInfo >::size_type
unsigned size_type
Definition: ValueMap.h:101
llvm::ValueMapIterator::pointer
value_type * pointer
Definition: ValueMap.h:336
llvm::DenseMapInfo< ValueMapCallbackVH< KeyT, ValueT, Config > >::isEqual
static bool isEqual(const VH &LHS, const VH &RHS)
Definition: ValueMap.h:317
llvm::ValueMapConstIterator::operator==
bool operator==(const ValueMapConstIterator &RHS) const
Definition: ValueMap.h:418
llvm::ValueMap::lookup
ValueT lookup(const KeyT &Val) const
lookup - Return the entry for the specified key, or a default constructed value if no such entry exis...
Definition: ValueMap.h:165
llvm::ValueMapIterator::operator++
ValueMapIterator operator++(int)
Definition: ValueMap.h:375
llvm::ValueMapConstIterator::ValueTypeProxy
Definition: ValueMap.h:400
llvm::Value
LLVM Value Representation.
Definition: Value.h:74
llvm::ValueMapConstIterator::value_type
std::pair< KeyT, typename DenseMapT::mapped_type > value_type
Definition: ValueMap.h:388
llvm::ValueMapConstIterator::operator->
ValueTypeProxy operator->() const
Definition: ValueMap.h:414
llvm::ValueMap::ValueMap
ValueMap(const ExtraData &Data, unsigned NumInitBuckets=64)
Definition: ValueMap.h:105
llvm::DenseMapInfo< ValueMapCallbackVH< KeyT, ValueT, Config > >::getTombstoneKey
static VH getTombstoneKey()
Definition: ValueMap.h:305
Other
Optional< std::vector< StOtherPiece > > Other
Definition: ELFYAML.cpp:1184
llvm::ValueMap< const Function *, FuncInfo >::mapped_type
FuncInfo mapped_type
Definition: ValueMap.h:99
llvm::ValueMapConfig::FollowRAUW
@ FollowRAUW
Definition: ValueMap.h:62
llvm::ValueMap::isPointerIntoBucketsArray
bool isPointerIntoBucketsArray(const void *Ptr) const
isPointerIntoBucketsArray - Return true if the specified pointer points somewhere into the ValueMap's...
Definition: ValueMap.h:214