3737#ifndef LLVM_ANALYSIS_ALIASANALYSIS_H
3838#define LLVM_ANALYSIS_ALIASANALYSIS_H
3939
40- #include " llvm/Support/Compiler.h"
4140#include " llvm/ADT/DenseMap.h"
4241#include " llvm/ADT/SmallVector.h"
4342#include " llvm/Analysis/MemoryLocation.h"
4443#include " llvm/IR/Function.h"
4544#include " llvm/IR/PassManager.h"
4645#include " llvm/Pass.h"
46+ #include " llvm/Support/Compiler.h"
4747#include " llvm/Support/ModRef.h"
4848#include < cstdint>
4949#include < functional>
@@ -340,7 +340,7 @@ class AAResults {
340340 // / The aggregation is invalidated if any of the underlying analyses is
341341 // / invalidated.
342342 LLVM_ABI bool invalidate (Function &F, const PreservedAnalyses &PA,
343- FunctionAnalysisManager::Invalidator &Inv);
343+ FunctionAnalysisManager::Invalidator &Inv);
344344
345345 // ===--------------------------------------------------------------------===//
346346 // / \name Alias Queries
@@ -350,7 +350,8 @@ class AAResults {
350350 // / Returns an AliasResult indicating whether the two pointers are aliased to
351351 // / each other. This is the interface that must be implemented by specific
352352 // / alias analysis implementations.
353- LLVM_ABI AliasResult alias (const MemoryLocation &LocA, const MemoryLocation &LocB);
353+ LLVM_ABI AliasResult alias (const MemoryLocation &LocA,
354+ const MemoryLocation &LocB);
354355
355356 // / A convenience wrapper around the primary \c alias interface.
356357 AliasResult alias (const Value *V1, LocationSize V1Size, const Value *V2,
@@ -419,7 +420,7 @@ class AAResults {
419420 // / If IgnoreLocals is true, then this method returns NoModRef for memory
420421 // / that points to a local alloca.
421422 LLVM_ABI ModRefInfo getModRefInfoMask (const MemoryLocation &Loc,
422- bool IgnoreLocals = false );
423+ bool IgnoreLocals = false );
423424
424425 // / A convenience wrapper around the primary \c getModRefInfoMask
425426 // / interface.
@@ -524,7 +525,8 @@ class AAResults {
524525
525526 // / Return information about whether two instructions may refer to the same
526527 // / memory locations.
527- LLVM_ABI ModRefInfo getModRefInfo (const Instruction *I1, const Instruction *I2);
528+ LLVM_ABI ModRefInfo getModRefInfo (const Instruction *I1,
529+ const Instruction *I2);
528530
529531 // / Return information about whether a particular call site modifies
530532 // / or reads the specified memory location \p MemLoc before instruction \p I
@@ -549,7 +551,8 @@ class AAResults {
549551
550552 // / Check if it is possible for execution of the specified basic block to
551553 // / modify the location Loc.
552- LLVM_ABI bool canBasicBlockModify (const BasicBlock &BB, const MemoryLocation &Loc);
554+ LLVM_ABI bool canBasicBlockModify (const BasicBlock &BB,
555+ const MemoryLocation &Loc);
553556
554557 // / A convenience wrapper synthesizing a memory location.
555558 bool canBasicBlockModify (const BasicBlock &BB, const Value *P,
@@ -562,9 +565,10 @@ class AAResults {
562565 // /
563566 // / The instructions to consider are all of the instructions in the range of
564567 // / [I1,I2] INCLUSIVE. I1 and I2 must be in the same basic block.
565- LLVM_ABI bool canInstructionRangeModRef (const Instruction &I1, const Instruction &I2,
566- const MemoryLocation &Loc,
567- const ModRefInfo Mode);
568+ LLVM_ABI bool canInstructionRangeModRef (const Instruction &I1,
569+ const Instruction &I2,
570+ const MemoryLocation &Loc,
571+ const ModRefInfo Mode);
568572
569573 // / A convenience wrapper synthesizing a memory location.
570574 bool canInstructionRangeModRef (const Instruction &I1, const Instruction &I2,
@@ -575,42 +579,54 @@ class AAResults {
575579
576580 // CtxI can be nullptr, in which case the query is whether or not the aliasing
577581 // relationship holds through the entire function.
578- LLVM_ABI AliasResult alias (const MemoryLocation &LocA, const MemoryLocation &LocB,
579- AAQueryInfo &AAQI, const Instruction *CtxI = nullptr );
582+ LLVM_ABI AliasResult alias (const MemoryLocation &LocA,
583+ const MemoryLocation &LocB, AAQueryInfo &AAQI,
584+ const Instruction *CtxI = nullptr );
580585
581- LLVM_ABI ModRefInfo getModRefInfoMask (const MemoryLocation &Loc, AAQueryInfo &AAQI,
582- bool IgnoreLocals = false );
586+ LLVM_ABI ModRefInfo getModRefInfoMask (const MemoryLocation &Loc,
587+ AAQueryInfo &AAQI,
588+ bool IgnoreLocals = false );
583589 LLVM_ABI ModRefInfo getModRefInfo (const Instruction *I, const CallBase *Call2,
584- AAQueryInfo &AAQIP);
585- LLVM_ABI ModRefInfo getModRefInfo (const CallBase *Call, const MemoryLocation &Loc,
586- AAQueryInfo &AAQI);
587- LLVM_ABI ModRefInfo getModRefInfo (const CallBase *Call1, const CallBase *Call2,
588- AAQueryInfo &AAQI);
589- LLVM_ABI ModRefInfo getModRefInfo (const VAArgInst *V, const MemoryLocation &Loc,
590- AAQueryInfo &AAQI);
591- LLVM_ABI ModRefInfo getModRefInfo (const LoadInst *L, const MemoryLocation &Loc,
592- AAQueryInfo &AAQI);
593- LLVM_ABI ModRefInfo getModRefInfo (const StoreInst *S, const MemoryLocation &Loc,
594- AAQueryInfo &AAQI);
595- LLVM_ABI ModRefInfo getModRefInfo (const FenceInst *S, const MemoryLocation &Loc,
596- AAQueryInfo &AAQI);
590+ AAQueryInfo &AAQIP);
591+ LLVM_ABI ModRefInfo getModRefInfo (const CallBase *Call,
592+ const MemoryLocation &Loc,
593+ AAQueryInfo &AAQI);
594+ LLVM_ABI ModRefInfo getModRefInfo (const CallBase *Call1,
595+ const CallBase *Call2, AAQueryInfo &AAQI);
596+ LLVM_ABI ModRefInfo getModRefInfo (const VAArgInst *V,
597+ const MemoryLocation &Loc,
598+ AAQueryInfo &AAQI);
599+ LLVM_ABI ModRefInfo getModRefInfo (const LoadInst *L,
600+ const MemoryLocation &Loc,
601+ AAQueryInfo &AAQI);
602+ LLVM_ABI ModRefInfo getModRefInfo (const StoreInst *S,
603+ const MemoryLocation &Loc,
604+ AAQueryInfo &AAQI);
605+ LLVM_ABI ModRefInfo getModRefInfo (const FenceInst *S,
606+ const MemoryLocation &Loc,
607+ AAQueryInfo &AAQI);
597608 LLVM_ABI ModRefInfo getModRefInfo (const AtomicCmpXchgInst *CX,
598- const MemoryLocation &Loc, AAQueryInfo &AAQI);
599- LLVM_ABI ModRefInfo getModRefInfo (const AtomicRMWInst *RMW, const MemoryLocation &Loc,
600- AAQueryInfo &AAQI);
601- LLVM_ABI ModRefInfo getModRefInfo (const CatchPadInst *I, const MemoryLocation &Loc,
602- AAQueryInfo &AAQI);
603- LLVM_ABI ModRefInfo getModRefInfo (const CatchReturnInst *I, const MemoryLocation &Loc,
604- AAQueryInfo &AAQI);
609+ const MemoryLocation &Loc,
610+ AAQueryInfo &AAQI);
611+ LLVM_ABI ModRefInfo getModRefInfo (const AtomicRMWInst *RMW,
612+ const MemoryLocation &Loc,
613+ AAQueryInfo &AAQI);
614+ LLVM_ABI ModRefInfo getModRefInfo (const CatchPadInst *I,
615+ const MemoryLocation &Loc,
616+ AAQueryInfo &AAQI);
617+ LLVM_ABI ModRefInfo getModRefInfo (const CatchReturnInst *I,
618+ const MemoryLocation &Loc,
619+ AAQueryInfo &AAQI);
605620 LLVM_ABI ModRefInfo getModRefInfo (const Instruction *I,
606- const std::optional<MemoryLocation> &OptLoc,
607- AAQueryInfo &AAQIP);
608- LLVM_ABI ModRefInfo getModRefInfo (const Instruction *I1, const Instruction *I2,
609- AAQueryInfo &AAQI);
621+ const std::optional<MemoryLocation> &OptLoc,
622+ AAQueryInfo &AAQIP);
623+ LLVM_ABI ModRefInfo getModRefInfo (const Instruction *I1,
624+ const Instruction *I2, AAQueryInfo &AAQI);
610625 LLVM_ABI ModRefInfo callCapturesBefore (const Instruction *I,
611- const MemoryLocation &MemLoc, DominatorTree *DT,
612- AAQueryInfo &AAQIP);
613- LLVM_ABI MemoryEffects getMemoryEffects (const CallBase *Call, AAQueryInfo &AAQI);
626+ const MemoryLocation &MemLoc,
627+ DominatorTree *DT, AAQueryInfo &AAQIP);
628+ LLVM_ABI MemoryEffects getMemoryEffects (const CallBase *Call,
629+ AAQueryInfo &AAQI);
614630
615631private:
616632 class Concept ;
@@ -905,7 +921,7 @@ LLVM_ABI bool isEscapeSource(const Value *V);
905921// / to true, then the memory is only not visible if the object has not been
906922// / captured prior to the unwind. Otherwise it is not visible even if captured.
907923LLVM_ABI bool isNotVisibleOnUnwind (const Value *Object,
908- bool &RequiresNoCaptureBeforeUnwind);
924+ bool &RequiresNoCaptureBeforeUnwind);
909925
910926// / Return true if the Object is writable, in the sense that any location based
911927// / on this pointer that can be loaded can also be stored to without trapping.
@@ -918,7 +934,8 @@ LLVM_ABI bool isNotVisibleOnUnwind(const Value *Object,
918934// / using the dereferenceable(N) attribute. It does not necessarily hold for
919935// / parts that are only known to be dereferenceable due to the presence of
920936// / loads.
921- LLVM_ABI bool isWritableObject (const Value *Object, bool &ExplicitlyDereferenceableOnly);
937+ LLVM_ABI bool isWritableObject (const Value *Object,
938+ bool &ExplicitlyDereferenceableOnly);
922939
923940// / A manager for alias analyses.
924941// /
0 commit comments