MemoryDependenceAnalysis.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- llvm/Analysis/MemoryDependenceAnalysis.h - Memory Deps ---*- C++ -*-===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. //
  14. // This file defines the MemoryDependenceAnalysis analysis pass.
  15. //
  16. //===----------------------------------------------------------------------===//
  17. #ifndef LLVM_ANALYSIS_MEMORYDEPENDENCEANALYSIS_H
  18. #define LLVM_ANALYSIS_MEMORYDEPENDENCEANALYSIS_H
  19. #include "llvm/ADT/DenseMap.h"
  20. #include "llvm/ADT/PointerEmbeddedInt.h"
  21. #include "llvm/ADT/PointerIntPair.h"
  22. #include "llvm/ADT/PointerSumType.h"
  23. #include "llvm/ADT/SmallPtrSet.h"
  24. #include "llvm/Analysis/MemoryLocation.h"
  25. #include "llvm/IR/PassManager.h"
  26. #include "llvm/IR/PredIteratorCache.h"
  27. #include "llvm/IR/ValueHandle.h"
  28. #include "llvm/Pass.h"
  29. #include <optional>
  30. namespace llvm {
  31. class AAResults;
  32. class AssumptionCache;
  33. class BatchAAResults;
  34. class DominatorTree;
  35. class PHITransAddr;
  36. /// A memory dependence query can return one of three different answers.
  37. class MemDepResult {
  38. enum DepType {
  39. /// Clients of MemDep never see this.
  40. ///
  41. /// Entries with this marker occur in a LocalDeps map or NonLocalDeps map
  42. /// when the instruction they previously referenced was removed from
  43. /// MemDep. In either case, the entry may include an instruction pointer.
  44. /// If so, the pointer is an instruction in the block where scanning can
  45. /// start from, saving some work.
  46. ///
  47. /// In a default-constructed MemDepResult object, the type will be Invalid
  48. /// and the instruction pointer will be null.
  49. Invalid = 0,
  50. /// This is a dependence on the specified instruction which clobbers the
  51. /// desired value. The pointer member of the MemDepResult pair holds the
  52. /// instruction that clobbers the memory. For example, this occurs when we
  53. /// see a may-aliased store to the memory location we care about.
  54. ///
  55. /// There are several cases that may be interesting here:
  56. /// 1. Loads are clobbered by may-alias stores.
  57. /// 2. Loads are considered clobbered by partially-aliased loads. The
  58. /// client may choose to analyze deeper into these cases.
  59. Clobber,
  60. /// This is a dependence on the specified instruction which defines or
  61. /// produces the desired memory location. The pointer member of the
  62. /// MemDepResult pair holds the instruction that defines the memory.
  63. ///
  64. /// Cases of interest:
  65. /// 1. This could be a load or store for dependence queries on
  66. /// load/store. The value loaded or stored is the produced value.
  67. /// Note that the pointer operand may be different than that of the
  68. /// queried pointer due to must aliases and phi translation. Note
  69. /// that the def may not be the same type as the query, the pointers
  70. /// may just be must aliases.
  71. /// 2. For loads and stores, this could be an allocation instruction. In
  72. /// this case, the load is loading an undef value or a store is the
  73. /// first store to (that part of) the allocation.
  74. /// 3. Dependence queries on calls return Def only when they are readonly
  75. /// calls or memory use intrinsics with identical callees and no
  76. /// intervening clobbers. No validation is done that the operands to
  77. /// the calls are the same.
  78. /// 4. For loads and stores, this could be a select instruction that
  79. /// defines pointer to this memory location. In this case, users can
  80. /// find non-clobbered Defs for both select values that are reaching
  81. // the desired memory location (there is still a guarantee that there
  82. // are no clobbers between analyzed memory location and select).
  83. Def,
  84. /// This marker indicates that the query has no known dependency in the
  85. /// specified block.
  86. ///
  87. /// More detailed state info is encoded in the upper part of the pair (i.e.
  88. /// the Instruction*)
  89. Other
  90. };
  91. /// If DepType is "Other", the upper part of the sum type is an encoding of
  92. /// the following more detailed type information.
  93. enum OtherType {
  94. /// This marker indicates that the query has no dependency in the specified
  95. /// block.
  96. ///
  97. /// To find out more, the client should query other predecessor blocks.
  98. NonLocal = 1,
  99. /// This marker indicates that the query has no dependency in the specified
  100. /// function.
  101. NonFuncLocal,
  102. /// This marker indicates that the query dependency is unknown.
  103. Unknown
  104. };
  105. using ValueTy = PointerSumType<
  106. DepType, PointerSumTypeMember<Invalid, Instruction *>,
  107. PointerSumTypeMember<Clobber, Instruction *>,
  108. PointerSumTypeMember<Def, Instruction *>,
  109. PointerSumTypeMember<Other, PointerEmbeddedInt<OtherType, 3>>>;
  110. ValueTy Value;
  111. explicit MemDepResult(ValueTy V) : Value(V) {}
  112. public:
  113. MemDepResult() = default;
  114. /// get methods: These are static ctor methods for creating various
  115. /// MemDepResult kinds.
  116. static MemDepResult getDef(Instruction *Inst) {
  117. assert(Inst && "Def requires inst");
  118. return MemDepResult(ValueTy::create<Def>(Inst));
  119. }
  120. static MemDepResult getClobber(Instruction *Inst) {
  121. assert(Inst && "Clobber requires inst");
  122. return MemDepResult(ValueTy::create<Clobber>(Inst));
  123. }
  124. static MemDepResult getNonLocal() {
  125. return MemDepResult(ValueTy::create<Other>(NonLocal));
  126. }
  127. static MemDepResult getNonFuncLocal() {
  128. return MemDepResult(ValueTy::create<Other>(NonFuncLocal));
  129. }
  130. static MemDepResult getUnknown() {
  131. return MemDepResult(ValueTy::create<Other>(Unknown));
  132. }
  133. /// Tests if this MemDepResult represents a query that is an instruction
  134. /// clobber dependency.
  135. bool isClobber() const { return Value.is<Clobber>(); }
  136. /// Tests if this MemDepResult represents a query that is an instruction
  137. /// definition dependency.
  138. bool isDef() const { return Value.is<Def>(); }
  139. /// Tests if this MemDepResult represents a valid local query (Clobber/Def).
  140. bool isLocal() const { return isClobber() || isDef(); }
  141. /// Tests if this MemDepResult represents a query that is transparent to the
  142. /// start of the block, but where a non-local hasn't been done.
  143. bool isNonLocal() const {
  144. return Value.is<Other>() && Value.cast<Other>() == NonLocal;
  145. }
  146. /// Tests if this MemDepResult represents a query that is transparent to the
  147. /// start of the function.
  148. bool isNonFuncLocal() const {
  149. return Value.is<Other>() && Value.cast<Other>() == NonFuncLocal;
  150. }
  151. /// Tests if this MemDepResult represents a query which cannot and/or will
  152. /// not be computed.
  153. bool isUnknown() const {
  154. return Value.is<Other>() && Value.cast<Other>() == Unknown;
  155. }
  156. /// If this is a normal dependency, returns the instruction that is depended
  157. /// on. Otherwise, returns null.
  158. Instruction *getInst() const {
  159. switch (Value.getTag()) {
  160. case Invalid:
  161. return Value.cast<Invalid>();
  162. case Clobber:
  163. return Value.cast<Clobber>();
  164. case Def:
  165. return Value.cast<Def>();
  166. case Other:
  167. return nullptr;
  168. }
  169. llvm_unreachable("Unknown discriminant!");
  170. }
  171. bool operator==(const MemDepResult &M) const { return Value == M.Value; }
  172. bool operator!=(const MemDepResult &M) const { return Value != M.Value; }
  173. bool operator<(const MemDepResult &M) const { return Value < M.Value; }
  174. bool operator>(const MemDepResult &M) const { return Value > M.Value; }
  175. private:
  176. friend class MemoryDependenceResults;
  177. /// Tests if this is a MemDepResult in its dirty/invalid. state.
  178. bool isDirty() const { return Value.is<Invalid>(); }
  179. static MemDepResult getDirty(Instruction *Inst) {
  180. return MemDepResult(ValueTy::create<Invalid>(Inst));
  181. }
  182. };
  183. /// This is an entry in the NonLocalDepInfo cache.
  184. ///
  185. /// For each BasicBlock (the BB entry) it keeps a MemDepResult.
  186. class NonLocalDepEntry {
  187. BasicBlock *BB;
  188. MemDepResult Result;
  189. public:
  190. NonLocalDepEntry(BasicBlock *bb, MemDepResult result)
  191. : BB(bb), Result(result) {}
  192. // This is used for searches.
  193. NonLocalDepEntry(BasicBlock *bb) : BB(bb) {}
  194. // BB is the sort key, it can't be changed.
  195. BasicBlock *getBB() const { return BB; }
  196. void setResult(const MemDepResult &R) { Result = R; }
  197. const MemDepResult &getResult() const { return Result; }
  198. bool operator<(const NonLocalDepEntry &RHS) const { return BB < RHS.BB; }
  199. };
  200. /// This is a result from a NonLocal dependence query.
  201. ///
  202. /// For each BasicBlock (the BB entry) it keeps a MemDepResult and the
  203. /// (potentially phi translated) address that was live in the block.
  204. class NonLocalDepResult {
  205. NonLocalDepEntry Entry;
  206. Value *Address;
  207. public:
  208. NonLocalDepResult(BasicBlock *bb, MemDepResult result, Value *address)
  209. : Entry(bb, result), Address(address) {}
  210. // BB is the sort key, it can't be changed.
  211. BasicBlock *getBB() const { return Entry.getBB(); }
  212. void setResult(const MemDepResult &R, Value *Addr) {
  213. Entry.setResult(R);
  214. Address = Addr;
  215. }
  216. const MemDepResult &getResult() const { return Entry.getResult(); }
  217. /// Returns the address of this pointer in this block.
  218. ///
  219. /// This can be different than the address queried for the non-local result
  220. /// because of phi translation. This returns null if the address was not
  221. /// available in a block (i.e. because phi translation failed) or if this is
  222. /// a cached result and that address was deleted.
  223. ///
  224. /// The address is always null for a non-local 'call' dependence.
  225. Value *getAddress() const { return Address; }
  226. };
  227. /// Provides a lazy, caching interface for making common memory aliasing
  228. /// information queries, backed by LLVM's alias analysis passes.
  229. ///
  230. /// The dependency information returned is somewhat unusual, but is pragmatic.
  231. /// If queried about a store or call that might modify memory, the analysis
  232. /// will return the instruction[s] that may either load from that memory or
  233. /// store to it. If queried with a load or call that can never modify memory,
  234. /// the analysis will return calls and stores that might modify the pointer,
  235. /// but generally does not return loads unless a) they are volatile, or
  236. /// b) they load from *must-aliased* pointers. Returning a dependence on
  237. /// must-alias'd pointers instead of all pointers interacts well with the
  238. /// internal caching mechanism.
  239. class MemoryDependenceResults {
  240. // A map from instructions to their dependency.
  241. using LocalDepMapType = DenseMap<Instruction *, MemDepResult>;
  242. LocalDepMapType LocalDeps;
  243. public:
  244. using NonLocalDepInfo = std::vector<NonLocalDepEntry>;
  245. private:
  246. /// A pair<Value*, bool> where the bool is true if the dependence is a read
  247. /// only dependence, false if read/write.
  248. using ValueIsLoadPair = PointerIntPair<const Value *, 1, bool>;
  249. /// This pair is used when caching information for a block.
  250. ///
  251. /// If the pointer is null, the cache value is not a full query that starts
  252. /// at the specified block. If non-null, the bool indicates whether or not
  253. /// the contents of the block was skipped.
  254. using BBSkipFirstBlockPair = PointerIntPair<BasicBlock *, 1, bool>;
  255. /// This record is the information kept for each (value, is load) pair.
  256. struct NonLocalPointerInfo {
  257. /// The pair of the block and the skip-first-block flag.
  258. BBSkipFirstBlockPair Pair;
  259. /// The results of the query for each relevant block.
  260. NonLocalDepInfo NonLocalDeps;
  261. /// The maximum size of the dereferences of the pointer.
  262. ///
  263. /// May be UnknownSize if the sizes are unknown.
  264. LocationSize Size = LocationSize::afterPointer();
  265. /// The AA tags associated with dereferences of the pointer.
  266. ///
  267. /// The members may be null if there are no tags or conflicting tags.
  268. AAMDNodes AATags;
  269. NonLocalPointerInfo() = default;
  270. };
  271. /// Cache storing single nonlocal def for the instruction.
  272. /// It is set when nonlocal def would be found in function returning only
  273. /// local dependencies.
  274. DenseMap<AssertingVH<const Value>, NonLocalDepResult> NonLocalDefsCache;
  275. using ReverseNonLocalDefsCacheTy =
  276. DenseMap<Instruction *, SmallPtrSet<const Value*, 4>>;
  277. ReverseNonLocalDefsCacheTy ReverseNonLocalDefsCache;
  278. /// This map stores the cached results of doing a pointer lookup at the
  279. /// bottom of a block.
  280. ///
  281. /// The key of this map is the pointer+isload bit, the value is a list of
  282. /// <bb->result> mappings.
  283. using CachedNonLocalPointerInfo =
  284. DenseMap<ValueIsLoadPair, NonLocalPointerInfo>;
  285. CachedNonLocalPointerInfo NonLocalPointerDeps;
  286. // A map from instructions to their non-local pointer dependencies.
  287. using ReverseNonLocalPtrDepTy =
  288. DenseMap<Instruction *, SmallPtrSet<ValueIsLoadPair, 4>>;
  289. ReverseNonLocalPtrDepTy ReverseNonLocalPtrDeps;
  290. /// This is the instruction we keep for each cached access that we have for
  291. /// an instruction.
  292. ///
  293. /// The pointer is an owning pointer and the bool indicates whether we have
  294. /// any dirty bits in the set.
  295. using PerInstNLInfo = std::pair<NonLocalDepInfo, bool>;
  296. // A map from instructions to their non-local dependencies.
  297. using NonLocalDepMapType = DenseMap<Instruction *, PerInstNLInfo>;
  298. NonLocalDepMapType NonLocalDepsMap;
  299. // A reverse mapping from dependencies to the dependees. This is
  300. // used when removing instructions to keep the cache coherent.
  301. using ReverseDepMapType =
  302. DenseMap<Instruction *, SmallPtrSet<Instruction *, 4>>;
  303. ReverseDepMapType ReverseLocalDeps;
  304. // A reverse mapping from dependencies to the non-local dependees.
  305. ReverseDepMapType ReverseNonLocalDeps;
  306. /// Current AA implementation, just a cache.
  307. AAResults &AA;
  308. AssumptionCache &AC;
  309. const TargetLibraryInfo &TLI;
  310. DominatorTree &DT;
  311. PredIteratorCache PredCache;
  312. unsigned DefaultBlockScanLimit;
  313. /// Offsets to dependant clobber loads.
  314. using ClobberOffsetsMapType = DenseMap<LoadInst *, int32_t>;
  315. ClobberOffsetsMapType ClobberOffsets;
  316. public:
  317. MemoryDependenceResults(AAResults &AA, AssumptionCache &AC,
  318. const TargetLibraryInfo &TLI, DominatorTree &DT,
  319. unsigned DefaultBlockScanLimit)
  320. : AA(AA), AC(AC), TLI(TLI), DT(DT),
  321. DefaultBlockScanLimit(DefaultBlockScanLimit) {}
  322. /// Handle invalidation in the new PM.
  323. bool invalidate(Function &F, const PreservedAnalyses &PA,
  324. FunctionAnalysisManager::Invalidator &Inv);
  325. /// Some methods limit the number of instructions they will examine.
  326. /// The return value of this method is the default limit that will be
  327. /// used if no limit is explicitly passed in.
  328. unsigned getDefaultBlockScanLimit() const;
  329. /// Returns the instruction on which a memory operation depends.
  330. ///
  331. /// See the class comment for more details. It is illegal to call this on
  332. /// non-memory instructions.
  333. MemDepResult getDependency(Instruction *QueryInst);
  334. /// Perform a full dependency query for the specified call, returning the set
  335. /// of blocks that the value is potentially live across.
  336. ///
  337. /// The returned set of results will include a "NonLocal" result for all
  338. /// blocks where the value is live across.
  339. ///
  340. /// This method assumes the instruction returns a "NonLocal" dependency
  341. /// within its own block.
  342. ///
  343. /// This returns a reference to an internal data structure that may be
  344. /// invalidated on the next non-local query or when an instruction is
  345. /// removed. Clients must copy this data if they want it around longer than
  346. /// that.
  347. const NonLocalDepInfo &getNonLocalCallDependency(CallBase *QueryCall);
  348. /// Perform a full dependency query for an access to the QueryInst's
  349. /// specified memory location, returning the set of instructions that either
  350. /// define or clobber the value.
  351. ///
  352. /// Warning: For a volatile query instruction, the dependencies will be
  353. /// accurate, and thus usable for reordering, but it is never legal to
  354. /// remove the query instruction.
  355. ///
  356. /// This method assumes the pointer has a "NonLocal" dependency within
  357. /// QueryInst's parent basic block.
  358. void getNonLocalPointerDependency(Instruction *QueryInst,
  359. SmallVectorImpl<NonLocalDepResult> &Result);
  360. /// Removes an instruction from the dependence analysis, updating the
  361. /// dependence of instructions that previously depended on it.
  362. void removeInstruction(Instruction *InstToRemove);
  363. /// Invalidates cached information about the specified pointer, because it
  364. /// may be too conservative in memdep.
  365. ///
  366. /// This is an optional call that can be used when the client detects an
  367. /// equivalence between the pointer and some other value and replaces the
  368. /// other value with ptr. This can make Ptr available in more places that
  369. /// cached info does not necessarily keep.
  370. void invalidateCachedPointerInfo(Value *Ptr);
  371. /// Clears the PredIteratorCache info.
  372. ///
  373. /// This needs to be done when the CFG changes, e.g., due to splitting
  374. /// critical edges.
  375. void invalidateCachedPredecessors();
  376. /// Returns the instruction on which a memory location depends.
  377. ///
  378. /// If isLoad is true, this routine ignores may-aliases with read-only
  379. /// operations. If isLoad is false, this routine ignores may-aliases
  380. /// with reads from read-only locations. If possible, pass the query
  381. /// instruction as well; this function may take advantage of the metadata
  382. /// annotated to the query instruction to refine the result. \p Limit
  383. /// can be used to set the maximum number of instructions that will be
  384. /// examined to find the pointer dependency. On return, it will be set to
  385. /// the number of instructions left to examine. If a null pointer is passed
  386. /// in, the limit will default to the value of -memdep-block-scan-limit.
  387. ///
  388. /// Note that this is an uncached query, and thus may be inefficient.
  389. MemDepResult getPointerDependencyFrom(const MemoryLocation &Loc, bool isLoad,
  390. BasicBlock::iterator ScanIt,
  391. BasicBlock *BB,
  392. Instruction *QueryInst = nullptr,
  393. unsigned *Limit = nullptr);
  394. MemDepResult getPointerDependencyFrom(const MemoryLocation &Loc, bool isLoad,
  395. BasicBlock::iterator ScanIt,
  396. BasicBlock *BB,
  397. Instruction *QueryInst,
  398. unsigned *Limit,
  399. BatchAAResults &BatchAA);
  400. MemDepResult
  401. getSimplePointerDependencyFrom(const MemoryLocation &MemLoc, bool isLoad,
  402. BasicBlock::iterator ScanIt, BasicBlock *BB,
  403. Instruction *QueryInst, unsigned *Limit,
  404. BatchAAResults &BatchAA);
  405. /// This analysis looks for other loads and stores with invariant.group
  406. /// metadata and the same pointer operand. Returns Unknown if it does not
  407. /// find anything, and Def if it can be assumed that 2 instructions load or
  408. /// store the same value and NonLocal which indicate that non-local Def was
  409. /// found, which can be retrieved by calling getNonLocalPointerDependency
  410. /// with the same queried instruction.
  411. MemDepResult getInvariantGroupPointerDependency(LoadInst *LI, BasicBlock *BB);
  412. /// Release memory in caches.
  413. void releaseMemory();
  414. /// Return the clobber offset to dependent instruction.
  415. std::optional<int32_t> getClobberOffset(LoadInst *DepInst) const {
  416. const auto Off = ClobberOffsets.find(DepInst);
  417. if (Off != ClobberOffsets.end())
  418. return Off->getSecond();
  419. return std::nullopt;
  420. }
  421. private:
  422. MemDepResult getCallDependencyFrom(CallBase *Call, bool isReadOnlyCall,
  423. BasicBlock::iterator ScanIt,
  424. BasicBlock *BB);
  425. bool getNonLocalPointerDepFromBB(Instruction *QueryInst,
  426. const PHITransAddr &Pointer,
  427. const MemoryLocation &Loc, bool isLoad,
  428. BasicBlock *BB,
  429. SmallVectorImpl<NonLocalDepResult> &Result,
  430. DenseMap<BasicBlock *, Value *> &Visited,
  431. bool SkipFirstBlock = false,
  432. bool IsIncomplete = false);
  433. MemDepResult getNonLocalInfoForBlock(Instruction *QueryInst,
  434. const MemoryLocation &Loc, bool isLoad,
  435. BasicBlock *BB, NonLocalDepInfo *Cache,
  436. unsigned NumSortedEntries,
  437. BatchAAResults &BatchAA);
  438. void removeCachedNonLocalPointerDependencies(ValueIsLoadPair P);
  439. void verifyRemoved(Instruction *Inst) const;
  440. };
  441. /// An analysis that produces \c MemoryDependenceResults for a function.
  442. ///
  443. /// This is essentially a no-op because the results are computed entirely
  444. /// lazily.
  445. class MemoryDependenceAnalysis
  446. : public AnalysisInfoMixin<MemoryDependenceAnalysis> {
  447. friend AnalysisInfoMixin<MemoryDependenceAnalysis>;
  448. static AnalysisKey Key;
  449. unsigned DefaultBlockScanLimit;
  450. public:
  451. using Result = MemoryDependenceResults;
  452. MemoryDependenceAnalysis();
  453. MemoryDependenceAnalysis(unsigned DefaultBlockScanLimit) : DefaultBlockScanLimit(DefaultBlockScanLimit) { }
  454. MemoryDependenceResults run(Function &F, FunctionAnalysisManager &AM);
  455. };
  456. /// A wrapper analysis pass for the legacy pass manager that exposes a \c
  457. /// MemoryDepnedenceResults instance.
  458. class MemoryDependenceWrapperPass : public FunctionPass {
  459. std::optional<MemoryDependenceResults> MemDep;
  460. public:
  461. static char ID;
  462. MemoryDependenceWrapperPass();
  463. ~MemoryDependenceWrapperPass() override;
  464. /// Pass Implementation stuff. This doesn't do any analysis eagerly.
  465. bool runOnFunction(Function &) override;
  466. /// Clean up memory in between runs
  467. void releaseMemory() override;
  468. /// Does not modify anything. It uses Value Numbering and Alias Analysis.
  469. void getAnalysisUsage(AnalysisUsage &AU) const override;
  470. MemoryDependenceResults &getMemDep() { return *MemDep; }
  471. };
  472. } // end namespace llvm
  473. #endif // LLVM_ANALYSIS_MEMORYDEPENDENCEANALYSIS_H
  474. #ifdef __GNUC__
  475. #pragma GCC diagnostic pop
  476. #endif