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