summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2015-10-28 22:13:41 +0000
committerHal Finkel <hfinkel@anl.gov>2015-10-28 22:13:41 +0000
commit1140e1704b146aad27841d3cdf49cb092eb2849c (patch)
tree4ee6f8ffa6569ac7dadf0511b3a1ac7558a78b80 /llvm/include
parentd7f3f118ffdf10acd99b9d229d0ebf6c67f81db2 (diff)
downloadbcm5719-llvm-1140e1704b146aad27841d3cdf49cb092eb2849c.tar.gz
bcm5719-llvm-1140e1704b146aad27841d3cdf49cb092eb2849c.zip
Revert "r251451 - [AliasSetTracker] Use mod/ref information for UnknownInstr"
It looks like this broke the stage 2 builder: http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto/6989/ Original commit message: AliasSetTracker does not need to convert the access mode to ModRefAccess if the new visited UnknownInst has only 'REF' modrefinfo to existing pointers in the sets. Patch by Andrew Zhogin! llvm-svn: 251562
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Analysis/AliasSetTracker.h37
1 files changed, 16 insertions, 21 deletions
diff --git a/llvm/include/llvm/Analysis/AliasSetTracker.h b/llvm/include/llvm/Analysis/AliasSetTracker.h
index e0a557ac9f5..37fd69b081c 100644
--- a/llvm/include/llvm/Analysis/AliasSetTracker.h
+++ b/llvm/include/llvm/Analysis/AliasSetTracker.h
@@ -124,7 +124,12 @@ class AliasSet : public ilist_node<AliasSet> {
/// memory (and not any particular access), whether it modifies or references
/// the memory, or whether it does both. The lattice goes from "NoAccess" to
/// either RefAccess or ModAccess, then to ModRefAccess as necessary.
- typedef ModRefInfo AccessLattice;
+ enum AccessLattice {
+ NoAccess = 0,
+ RefAccess = 1,
+ ModAccess = 2,
+ ModRefAccess = RefAccess | ModAccess
+ };
unsigned Access : 2;
/// The kind of alias relationship between pointers of the set.
@@ -155,8 +160,8 @@ class AliasSet : public ilist_node<AliasSet> {
public:
/// Accessors...
- bool isRef() const { return Access & MRI_Ref; }
- bool isMod() const { return Access & MRI_Mod; }
+ bool isRef() const { return Access & RefAccess; }
+ bool isMod() const { return Access & ModAccess; }
bool isMustAlias() const { return Alias == SetMustAlias; }
bool isMayAlias() const { return Alias == SetMayAlias; }
@@ -221,7 +226,7 @@ private:
friend struct ilist_sentinel_traits<AliasSet>;
AliasSet()
: PtrList(nullptr), PtrListEnd(&PtrList), Forward(nullptr), RefCount(0),
- Access(MRI_NoModRef), Alias(SetMustAlias), Volatile(false) {
+ Access(NoAccess), Alias(SetMustAlias), Volatile(false) {
}
AliasSet(const AliasSet &AS) = delete;
@@ -249,9 +254,9 @@ private:
void removeFromTracker(AliasSetTracker &AST);
void addPointer(AliasSetTracker &AST, PointerRec &Entry, uint64_t Size,
- const AAMDNodes &AAInfo, ModRefInfo MR,
+ const AAMDNodes &AAInfo,
bool KnownMustAlias = false);
- void addUnknownInst(Instruction *I, AliasAnalysis &AA, ModRefInfo MR);
+ void addUnknownInst(Instruction *I, AliasAnalysis &AA);
void removeUnknownInst(AliasSetTracker &AST, Instruction *I) {
bool WasEmpty = UnknownInsts.empty();
for (size_t i = 0, e = UnknownInsts.size(); i != e; ++i)
@@ -268,18 +273,10 @@ private:
public:
/// aliasesPointer - Return true if the specified pointer "may" (or must)
/// alias one of the members in the set.
- /// MRcommon - if Ptr is aliased by existing UnknownInsts,
- /// then not-null MRcommon will be set to the worst ModRefInfo met
- ///
+ ///
bool aliasesPointer(const Value *Ptr, uint64_t Size, const AAMDNodes &AAInfo,
- AliasAnalysis &AA, ModRefInfo* MRcommon = nullptr) const;
- /// aliasesUnknownInst - Return true if the specified UnknownInst
- /// has not-null ModRefInfo (not MRI_NoModRef) with some
- /// pointer or UnknownInst already existing in AliasSet
- /// MRcommon - not-null MRcommon will be set to the worst ModRefInfo met
- ///
- bool aliasesUnknownInst(const Instruction *Inst, AliasAnalysis &AA,
- ModRefInfo* MRcommon = nullptr) const;
+ AliasAnalysis &AA) const;
+ bool aliasesUnknownInst(const Instruction *Inst, AliasAnalysis &AA) const;
};
inline raw_ostream& operator<<(raw_ostream &OS, const AliasSet &AS) {
@@ -437,11 +434,9 @@ private:
return AS;
}
AliasSet *findAliasSetForPointer(const Value *Ptr, uint64_t Size,
- const AAMDNodes &AAInfo,
- ModRefInfo* MRcommonPtr = nullptr);
+ const AAMDNodes &AAInfo);
- AliasSet *findAliasSetForUnknownInst(Instruction *Inst,
- ModRefInfo* MRcommonPtr = nullptr);
+ AliasSet *findAliasSetForUnknownInst(Instruction *Inst);
};
inline raw_ostream& operator<<(raw_ostream &OS, const AliasSetTracker &AST) {
OpenPOWER on IntegriCloud