LLVM  16.0.0git
AliasSetTracker.h
Go to the documentation of this file.
1 //===- llvm/Analysis/AliasSetTracker.h - Build Alias Sets -------*- 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 two classes: AliasSetTracker and AliasSet. These interfaces
10 // are used to classify a collection of pointer references into a maximal number
11 // of disjoint sets. Each AliasSet object constructed by the AliasSetTracker
12 // object refers to memory disjoint from the other sets.
13 //
14 // An AliasSetTracker can only be used on immutable IR.
15 //
16 //===----------------------------------------------------------------------===//
17 
18 #ifndef LLVM_ANALYSIS_ALIASSETTRACKER_H
19 #define LLVM_ANALYSIS_ALIASSETTRACKER_H
20 
21 #include "llvm/ADT/DenseMap.h"
22 #include "llvm/ADT/DenseMapInfo.h"
23 #include "llvm/ADT/ilist.h"
24 #include "llvm/ADT/ilist_node.h"
26 #include "llvm/IR/Instruction.h"
27 #include "llvm/IR/PassManager.h"
28 #include "llvm/IR/ValueHandle.h"
29 #include <cassert>
30 #include <cstddef>
31 #include <iterator>
32 #include <vector>
33 
34 namespace llvm {
35 
36 class AAResults;
37 class AliasResult;
38 class AliasSetTracker;
39 class AnyMemSetInst;
40 class AnyMemTransferInst;
41 class BasicBlock;
42 class BatchAAResults;
43 class LoadInst;
44 class raw_ostream;
45 class StoreInst;
46 class VAArgInst;
47 class Value;
48 
49 class AliasSet : public ilist_node<AliasSet> {
50  friend class AliasSetTracker;
51 
52  class PointerRec {
53  Value *Val; // The pointer this record corresponds to.
54  PointerRec **PrevInList = nullptr;
55  PointerRec *NextInList = nullptr;
56  AliasSet *AS = nullptr;
58  AAMDNodes AAInfo;
59 
60  // Whether the size for this record has been set at all. This makes no
61  // guarantees about the size being known.
62  bool isSizeSet() const { return Size != LocationSize::mapEmpty(); }
63 
64  public:
65  PointerRec(Value *V)
66  : Val(V), AAInfo(DenseMapInfo<AAMDNodes>::getEmptyKey()) {}
67 
68  Value *getValue() const { return Val; }
69 
70  PointerRec *getNext() const { return NextInList; }
71  bool hasAliasSet() const { return AS != nullptr; }
72 
73  PointerRec** setPrevInList(PointerRec **PIL) {
74  PrevInList = PIL;
75  return &NextInList;
76  }
77 
78  bool updateSizeAndAAInfo(LocationSize NewSize, const AAMDNodes &NewAAInfo) {
79  bool SizeChanged = false;
80  if (NewSize != Size) {
81  LocationSize OldSize = Size;
82  Size = isSizeSet() ? Size.unionWith(NewSize) : NewSize;
83  SizeChanged = OldSize != Size;
84  }
85 
87  // We don't have a AAInfo yet. Set it to NewAAInfo.
88  AAInfo = NewAAInfo;
89  else {
90  AAMDNodes Intersection(AAInfo.intersect(NewAAInfo));
91  SizeChanged |= Intersection != AAInfo;
92  AAInfo = Intersection;
93  }
94  return SizeChanged;
95  }
96 
97  LocationSize getSize() const {
98  assert(isSizeSet() && "Getting an unset size!");
99  return Size;
100  }
101 
102  /// Return the AAInfo, or null if there is no information or conflicting
103  /// information.
104  AAMDNodes getAAInfo() const {
105  // If we have missing or conflicting AAInfo, return null.
106  if (AAInfo == DenseMapInfo<AAMDNodes>::getEmptyKey() ||
108  return AAMDNodes();
109  return AAInfo;
110  }
111 
112  AliasSet *getAliasSet(AliasSetTracker &AST) {
113  assert(AS && "No AliasSet yet!");
114  if (AS->Forward) {
115  AliasSet *OldAS = AS;
116  AS = OldAS->getForwardedTarget(AST);
117  AS->addRef();
118  OldAS->dropRef(AST);
119  }
120  return AS;
121  }
122 
123  void setAliasSet(AliasSet *as) {
124  assert(!AS && "Already have an alias set!");
125  AS = as;
126  }
127 
128  void eraseFromList() {
129  if (NextInList) NextInList->PrevInList = PrevInList;
130  *PrevInList = NextInList;
131  if (AS->PtrListEnd == &NextInList) {
132  AS->PtrListEnd = PrevInList;
133  assert(*AS->PtrListEnd == nullptr && "List not terminated right!");
134  }
135  delete this;
136  }
137  };
138 
139  // Doubly linked list of nodes.
140  PointerRec *PtrList = nullptr;
141  PointerRec **PtrListEnd;
142  // Forwarding pointer.
143  AliasSet *Forward = nullptr;
144 
145  /// All instructions without a specific address in this alias set.
146  std::vector<AssertingVH<Instruction>> UnknownInsts;
147 
148  /// Number of nodes pointing to this AliasSet plus the number of AliasSets
149  /// forwarding to it.
150  unsigned RefCount : 27;
151 
152  // Signifies that this set should be considered to alias any pointer.
153  // Use when the tracker holding this set is saturated.
154  unsigned AliasAny : 1;
155 
156  /// The kinds of access this alias set models.
157  ///
158  /// We keep track of whether this alias set merely refers to the locations of
159  /// memory (and not any particular access), whether it modifies or references
160  /// the memory, or whether it does both. The lattice goes from "NoAccess" to
161  /// either RefAccess or ModAccess, then to ModRefAccess as necessary.
162  enum AccessLattice {
163  NoAccess = 0,
164  RefAccess = 1,
165  ModAccess = 2,
166  ModRefAccess = RefAccess | ModAccess
167  };
168  unsigned Access : 2;
169 
170  /// The kind of alias relationship between pointers of the set.
171  ///
172  /// These represent conservatively correct alias results between any members
173  /// of the set. We represent these independently of the values of alias
174  /// results in order to pack it into a single bit. Lattice goes from
175  /// MustAlias to MayAlias.
176  enum AliasLattice {
177  SetMustAlias = 0, SetMayAlias = 1
178  };
179  unsigned Alias : 1;
180 
181  unsigned SetSize = 0;
182 
183  void addRef() { ++RefCount; }
184 
185  void dropRef(AliasSetTracker &AST) {
186  assert(RefCount >= 1 && "Invalid reference count detected!");
187  if (--RefCount == 0)
188  removeFromTracker(AST);
189  }
190 
191 public:
192  AliasSet(const AliasSet &) = delete;
193  AliasSet &operator=(const AliasSet &) = delete;
194 
195  /// Accessors...
196  bool isRef() const { return Access & RefAccess; }
197  bool isMod() const { return Access & ModAccess; }
198  bool isMustAlias() const { return Alias == SetMustAlias; }
199  bool isMayAlias() const { return Alias == SetMayAlias; }
200 
201  /// Return true if this alias set should be ignored as part of the
202  /// AliasSetTracker object.
203  bool isForwardingAliasSet() const { return Forward; }
204 
205  /// Merge the specified alias set into this alias set.
206  void mergeSetIn(AliasSet &AS, AliasSetTracker &AST, BatchAAResults &BatchAA);
207 
208  // Alias Set iteration - Allow access to all of the pointers which are part of
209  // this alias set.
210  class iterator;
211  iterator begin() const { return iterator(PtrList); }
212  iterator end() const { return iterator(); }
213  bool empty() const { return PtrList == nullptr; }
214 
215  // Unfortunately, ilist::size() is linear, so we have to add code to keep
216  // track of the list's exact size.
217  unsigned size() { return SetSize; }
218 
219  void print(raw_ostream &OS) const;
220  void dump() const;
221 
222  /// Define an iterator for alias sets... this is just a forward iterator.
223  class iterator {
224  PointerRec *CurNode;
225 
226  public:
227  using iterator_category = std::forward_iterator_tag;
228  using value_type = PointerRec;
229  using difference_type = std::ptrdiff_t;
230  using pointer = value_type *;
232 
233  explicit iterator(PointerRec *CN = nullptr) : CurNode(CN) {}
234 
235  bool operator==(const iterator& x) const {
236  return CurNode == x.CurNode;
237  }
238  bool operator!=(const iterator& x) const { return !operator==(x); }
239 
241  assert(CurNode && "Dereferencing AliasSet.end()!");
242  return *CurNode;
243  }
244  value_type *operator->() const { return &operator*(); }
245 
246  Value *getPointer() const { return CurNode->getValue(); }
247  LocationSize getSize() const { return CurNode->getSize(); }
248  AAMDNodes getAAInfo() const { return CurNode->getAAInfo(); }
249 
250  iterator& operator++() { // Preincrement
251  assert(CurNode && "Advancing past AliasSet.end()!");
252  CurNode = CurNode->getNext();
253  return *this;
254  }
255  iterator operator++(int) { // Postincrement
256  iterator tmp = *this; ++*this; return tmp;
257  }
258  };
259 
260 private:
261  // Can only be created by AliasSetTracker.
262  AliasSet()
263  : PtrListEnd(&PtrList), RefCount(0), AliasAny(false), Access(NoAccess),
264  Alias(SetMustAlias) {}
265 
266  PointerRec *getSomePointer() const {
267  return PtrList;
268  }
269 
270  /// Return the real alias set this represents. If this has been merged with
271  /// another set and is forwarding, return the ultimate destination set. This
272  /// also implements the union-find collapsing as well.
273  AliasSet *getForwardedTarget(AliasSetTracker &AST) {
274  if (!Forward) return this;
275 
276  AliasSet *Dest = Forward->getForwardedTarget(AST);
277  if (Dest != Forward) {
278  Dest->addRef();
279  Forward->dropRef(AST);
280  Forward = Dest;
281  }
282  return Dest;
283  }
284 
285  void removeFromTracker(AliasSetTracker &AST);
286 
287  void addPointer(AliasSetTracker &AST, PointerRec &Entry, LocationSize Size,
288  const AAMDNodes &AAInfo, bool KnownMustAlias = false,
289  bool SkipSizeUpdate = false);
290  void addUnknownInst(Instruction *I, AAResults &AA);
291 
292 public:
293  /// If the specified pointer "may" (or must) alias one of the members in the
294  /// set return the appropriate AliasResult. Otherwise return NoAlias.
295  AliasResult aliasesPointer(const Value *Ptr, LocationSize Size,
296  const AAMDNodes &AAInfo, BatchAAResults &AA) const;
297  bool aliasesUnknownInst(const Instruction *Inst, BatchAAResults &AA) const;
298 };
299 
300 inline raw_ostream& operator<<(raw_ostream &OS, const AliasSet &AS) {
301  AS.print(OS);
302  return OS;
303 }
304 
306  AAResults &AA;
307  ilist<AliasSet> AliasSets;
308 
309  using PointerMapType = DenseMap<AssertingVH<Value>, AliasSet::PointerRec *>;
310 
311  // Map from pointers to their node
312  PointerMapType PointerMap;
313 
314 public:
315  /// Create an empty collection of AliasSets, and use the specified alias
316  /// analysis object to disambiguate load and store addresses.
317  explicit AliasSetTracker(AAResults &AA) : AA(AA) {}
319 
320  /// These methods are used to add different types of instructions to the alias
321  /// sets. Adding a new instruction can result in one of three actions
322  /// happening:
323  ///
324  /// 1. If the instruction doesn't alias any other sets, create a new set.
325  /// 2. If the instruction aliases exactly one set, add it to the set
326  /// 3. If the instruction aliases multiple sets, merge the sets, and add
327  /// the instruction to the result.
328  ///
329  /// These methods return true if inserting the instruction resulted in the
330  /// addition of a new alias set (i.e., the pointer did not alias anything).
331  ///
332  void add(Value *Ptr, LocationSize Size, const AAMDNodes &AAInfo); // Add a loc
333  void add(LoadInst *LI);
334  void add(StoreInst *SI);
335  void add(VAArgInst *VAAI);
336  void add(AnyMemSetInst *MSI);
337  void add(AnyMemTransferInst *MTI);
338  void add(Instruction *I); // Dispatch to one of the other add methods...
339  void add(BasicBlock &BB); // Add all instructions in basic block
340  void add(const AliasSetTracker &AST); // Add alias relations from another AST
341  void addUnknown(Instruction *I);
342 
343  void clear();
344 
345  /// Return the alias sets that are active.
346  const ilist<AliasSet> &getAliasSets() const { return AliasSets; }
347 
348  /// Return the alias set which contains the specified memory location. If
349  /// the memory location aliases two or more existing alias sets, will have
350  /// the effect of merging those alias sets before the single resulting alias
351  /// set is returned.
352  AliasSet &getAliasSetFor(const MemoryLocation &MemLoc);
353 
354  /// Return the underlying alias analysis object used by this tracker.
355  AAResults &getAliasAnalysis() const { return AA; }
356 
359 
360  const_iterator begin() const { return AliasSets.begin(); }
361  const_iterator end() const { return AliasSets.end(); }
362 
363  iterator begin() { return AliasSets.begin(); }
364  iterator end() { return AliasSets.end(); }
365 
366  void print(raw_ostream &OS) const;
367  void dump() const;
368 
369 private:
370  friend class AliasSet;
371 
372  // The total number of pointers contained in all "may" alias sets.
373  unsigned TotalMayAliasSetSize = 0;
374 
375  // A non-null value signifies this AST is saturated. A saturated AST lumps
376  // all pointers into a single "May" set.
377  AliasSet *AliasAnyAS = nullptr;
378 
379  void removeAliasSet(AliasSet *AS);
380 
381  /// Just like operator[] on the map, except that it creates an entry for the
382  /// pointer if it doesn't already exist.
383  AliasSet::PointerRec &getEntryFor(Value *V) {
384  AliasSet::PointerRec *&Entry = PointerMap[V];
385  if (!Entry)
386  Entry = new AliasSet::PointerRec(V);
387  return *Entry;
388  }
389 
390  AliasSet &addPointer(MemoryLocation Loc, AliasSet::AccessLattice E);
391  AliasSet *mergeAliasSetsForPointer(const Value *Ptr, LocationSize Size,
392  const AAMDNodes &AAInfo,
393  bool &MustAliasAll);
394 
395  /// Merge all alias sets into a single set that is considered to alias any
396  /// pointer.
397  AliasSet &mergeAllAliasSets();
398 
399  AliasSet *findAliasSetForUnknownInst(Instruction *Inst);
400 };
401 
403  AST.print(OS);
404  return OS;
405 }
406 
407 class AliasSetsPrinterPass : public PassInfoMixin<AliasSetsPrinterPass> {
408  raw_ostream &OS;
409 
410 public:
411  explicit AliasSetsPrinterPass(raw_ostream &OS);
413 };
414 
415 } // end namespace llvm
416 
417 #endif // LLVM_ANALYSIS_ALIASSETTRACKER_H
llvm::Check::Size
@ Size
Definition: FileCheck.h:77
llvm::PreservedAnalyses
A set of analyses that are preserved following a run of a transformation pass.
Definition: PassManager.h:152
llvm::BatchAAResults
This class is a wrapper over an AAResults, and it is intended to be used only when there are no IR ch...
Definition: AliasAnalysis.h:609
llvm::AliasSetTracker::addUnknown
void addUnknown(Instruction *I)
Definition: AliasSetTracker.cpp:396
as
compiles conv shl5 shl ret i32 or10 it would be better as
Definition: README.txt:615
llvm::AliasSetTracker::~AliasSetTracker
~AliasSetTracker()
Definition: AliasSetTracker.h:318
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::VAArgInst
This class represents the va_arg llvm instruction, which returns an argument of the specified type gi...
Definition: Instructions.h:1832
llvm::AliasSetTracker::end
const_iterator end() const
Definition: AliasSetTracker.h:361
llvm::AliasSetTracker::getAliasSets
const ilist< AliasSet > & getAliasSets() const
Return the alias sets that are active.
Definition: AliasSetTracker.h:346
llvm::PassInfoMixin
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:371
llvm::Function
Definition: Function.h:60
llvm::AliasSet::AliasSet
AliasSet(const AliasSet &)=delete
ilist.h
llvm::AliasSet::isMod
bool isMod() const
Definition: AliasSetTracker.h:197
llvm::AliasSet::iterator::iterator
iterator(PointerRec *CN=nullptr)
Definition: AliasSetTracker.h:233
llvm::AliasSet::aliasesUnknownInst
bool aliasesUnknownInst(const Instruction *Inst, BatchAAResults &AA) const
Definition: AliasSetTracker.cpp:228
llvm::AliasSetTracker::print
void print(raw_ostream &OS) const
Definition: AliasSetTracker.cpp:604
llvm::AliasSetTracker
Definition: AliasSetTracker.h:305
llvm::AliasSet::iterator::getSize
LocationSize getSize() const
Definition: AliasSetTracker.h:247
llvm::AAMDNodes
A collection of metadata nodes that might be associated with a memory access used by the alias-analys...
Definition: Metadata.h:652
llvm::AliasSet::iterator::difference_type
std::ptrdiff_t difference_type
Definition: AliasSetTracker.h:229
DenseMap.h
llvm::AliasSetTracker::end
iterator end()
Definition: AliasSetTracker.h:364
llvm::AliasSet::isRef
bool isRef() const
Accessors...
Definition: AliasSetTracker.h:196
llvm::AliasSetsPrinterPass::AliasSetsPrinterPass
AliasSetsPrinterPass(raw_ostream &OS)
Definition: AliasSetTracker.cpp:623
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::AliasSet::print
void print(raw_ostream &OS) const
Definition: AliasSetTracker.cpp:564
llvm::iplist
An intrusive list with ownership and callbacks specified/controlled by ilist_traits,...
Definition: ilist.h:391
F
#define F(x, y, z)
Definition: MD5.cpp:55
llvm::BasicBlock
LLVM Basic Block Representation.
Definition: BasicBlock.h:55
llvm::AliasSetTracker::clear
void clear()
Definition: AliasSetTracker.cpp:253
llvm::AliasSet::iterator::operator*
value_type & operator*() const
Definition: AliasSetTracker.h:240
Instruction.h
llvm::AliasSet::end
iterator end() const
Definition: AliasSetTracker.h:212
llvm::DenseMapInfo
An information struct used to provide DenseMap with the various necessary components for a given valu...
Definition: APInt.h:34
llvm::AliasSet::iterator::iterator_category
std::forward_iterator_tag iterator_category
Definition: AliasSetTracker.h:227
llvm::AliasSet::iterator::pointer
value_type * pointer
Definition: AliasSetTracker.h:230
llvm::AliasSet::iterator::reference
value_type & reference
Definition: AliasSetTracker.h:231
llvm::AAResults
Definition: AliasAnalysis.h:294
E
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
llvm::LocationSize
Definition: MemoryLocation.h:66
llvm::AliasSetTracker::dump
void dump() const
Definition: AliasSetTracker.cpp:616
llvm::AliasSetsPrinterPass
Definition: AliasSetTracker.h:407
SI
@ SI
Definition: SIInstrInfo.cpp:7966
llvm::AliasSet
Definition: AliasSetTracker.h:49
llvm::AliasSet::iterator::operator!=
bool operator!=(const iterator &x) const
Definition: AliasSetTracker.h:238
false
Definition: StackSlotColoring.cpp:141
llvm::AliasSet::isForwardingAliasSet
bool isForwardingAliasSet() const
Return true if this alias set should be ignored as part of the AliasSetTracker object.
Definition: AliasSetTracker.h:203
llvm::AliasSetsPrinterPass::run
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
Definition: AliasSetTracker.cpp:625
llvm::Instruction
Definition: Instruction.h:42
llvm::AliasSet::iterator::getPointer
Value * getPointer() const
Definition: AliasSetTracker.h:246
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:53
llvm::operator<<
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)
Definition: APFixedPoint.h:291
llvm::AliasSet::empty
bool empty() const
Definition: AliasSetTracker.h:213
llvm::AliasSet::iterator::getAAInfo
AAMDNodes getAAInfo() const
Definition: AliasSetTracker.h:248
llvm::AnyMemTransferInst
Definition: IntrinsicInst.h:1220
llvm::AliasSet::operator=
AliasSet & operator=(const AliasSet &)=delete
llvm::StoreInst
An instruction for storing to memory.
Definition: Instructions.h:298
llvm::AliasSetTracker::add
void add(Value *Ptr, LocationSize Size, const AAMDNodes &AAInfo)
These methods are used to add different types of instructions to the alias sets.
Definition: AliasSetTracker.cpp:366
MemoryLocation.h
llvm::DenseMap< AssertingVH< Value >, AliasSet::PointerRec * >
llvm::AliasSet::size
unsigned size()
Definition: AliasSetTracker.h:217
I
#define I(x, y, z)
Definition: MD5.cpp:58
llvm::AliasSet::isMayAlias
bool isMayAlias() const
Definition: AliasSetTracker.h:199
llvm::AliasSet::dump
void dump() const
Definition: AliasSetTracker.cpp:615
llvm::AliasSetTracker::getAliasAnalysis
AAResults & getAliasAnalysis() const
Return the underlying alias analysis object used by this tracker.
Definition: AliasSetTracker.h:355
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::AliasSet::iterator::operator==
bool operator==(const iterator &x) const
Definition: AliasSetTracker.h:235
llvm::AAMDNodes::intersect
AAMDNodes intersect(const AAMDNodes &Other) const
Given two sets of AAMDNodes that apply to the same pointer, give the best AAMDNodes that are compatib...
Definition: Metadata.h:695
llvm::AliasSetTracker::getAliasSetFor
AliasSet & getAliasSetFor(const MemoryLocation &MemLoc)
Return the alias set which contains the specified memory location.
Definition: AliasSetTracker.cpp:315
llvm::AliasSet::aliasesPointer
AliasResult aliasesPointer(const Value *Ptr, LocationSize Size, const AAMDNodes &AAInfo, BatchAAResults &AA) const
If the specified pointer "may" (or must) alias one of the members in the set return the appropriate A...
Definition: AliasSetTracker.cpp:189
Ptr
@ Ptr
Definition: TargetLibraryInfo.cpp:60
llvm::ISD::BasicBlock
@ BasicBlock
Various leaf nodes.
Definition: ISDOpcodes.h:71
llvm::AliasSet::mergeSetIn
void mergeSetIn(AliasSet &AS, AliasSetTracker &AST, BatchAAResults &BatchAA)
Merge the specified alias set into this alias set.
Definition: AliasSetTracker.cpp:43
llvm::AliasSet::iterator
Define an iterator for alias sets... this is just a forward iterator.
Definition: AliasSetTracker.h:223
llvm::LocationSize::mapEmpty
constexpr static LocationSize mapEmpty()
Definition: MemoryLocation.h:138
llvm::DenseMapInfo< AAMDNodes >::getTombstoneKey
static AAMDNodes getTombstoneKey()
Definition: Metadata.h:749
llvm::LoadInst
An instruction for reading from memory.
Definition: Instructions.h:174
ValueHandle.h
llvm::ilist_node
Definition: ilist_node.h:149
llvm::AliasSet::iterator::operator++
iterator operator++(int)
Definition: AliasSetTracker.h:255
llvm::DenseMapInfo< AAMDNodes >::getEmptyKey
static AAMDNodes getEmptyKey()
Definition: Metadata.h:744
llvm::AnyMemSetInst
This class represents any memset intrinsic.
Definition: IntrinsicInst.h:1200
llvm::ilist_iterator
Iterator for intrusive lists based on ilist_node.
Definition: ilist_iterator.h:57
llvm::AliasSet::iterator::operator++
iterator & operator++()
Definition: AliasSetTracker.h:250
llvm::TargetStackID::Value
Value
Definition: TargetFrameLowering.h:27
PassManager.h
x
TODO unsigned x
Definition: README.txt:10
llvm::AliasSetTracker::begin
const_iterator begin() const
Definition: AliasSetTracker.h:360
llvm::AliasSetTracker::AliasSetTracker
AliasSetTracker(AAResults &AA)
Create an empty collection of AliasSets, and use the specified alias analysis object to disambiguate ...
Definition: AliasSetTracker.h:317
llvm::AliasSet::begin
iterator begin() const
Definition: AliasSetTracker.h:211
llvm::AliasSet::AliasSetTracker
friend class AliasSetTracker
Definition: AliasSetTracker.h:50
llvm::AliasSet::isMustAlias
bool isMustAlias() const
Definition: AliasSetTracker.h:198
ilist_node.h
DenseMapInfo.h
llvm::AnalysisManager
A container for analyses that lazily runs them and caches their results.
Definition: InstructionSimplify.h:42
llvm::AliasSet::iterator::value_type
PointerRec value_type
Definition: AliasSetTracker.h:228
BB
Common register allocation spilling lr str ldr sxth r3 ldr mla r4 can lr mov lr str ldr sxth r3 mla r4 and then merge mul and lr str ldr sxth r3 mla r4 It also increase the likelihood the store may become dead bb27 Successors according to LLVM BB
Definition: README.txt:39
InlinePriorityMode::Size
@ Size
llvm::AliasSet::iterator::operator->
value_type * operator->() const
Definition: AliasSetTracker.h:244
llvm::Value
LLVM Value Representation.
Definition: Value.h:74
llvm::MemoryLocation
Representation for a specific memory location.
Definition: MemoryLocation.h:210
llvm::AliasSetTracker::begin
iterator begin()
Definition: AliasSetTracker.h:363