forked from OSchip/llvm-project
parent
c397e7881a
commit
c0130a3fd0
|
@ -42,6 +42,7 @@ class AliasSet : public ilist_node<AliasSet> {
|
|||
AliasSet *AS;
|
||||
uint64_t Size;
|
||||
AAMDNodes AAInfo;
|
||||
|
||||
public:
|
||||
PointerRec(Value *V)
|
||||
: Val(V), PrevInList(nullptr), NextInList(nullptr), AS(nullptr), Size(0),
|
||||
|
@ -190,6 +191,7 @@ public:
|
|||
class iterator : public std::iterator<std::forward_iterator_tag,
|
||||
PointerRec, ptrdiff_t> {
|
||||
PointerRec *CurNode;
|
||||
|
||||
public:
|
||||
explicit iterator(PointerRec *CN = nullptr) : CurNode(CN) {}
|
||||
|
||||
|
@ -282,7 +284,6 @@ inline raw_ostream& operator<<(raw_ostream &OS, const AliasSet &AS) {
|
|||
return OS;
|
||||
}
|
||||
|
||||
|
||||
class AliasSetTracker {
|
||||
/// CallbackVH - A CallbackVH to arrange for AliasSetTracker to be
|
||||
/// notified whenever a Value is deleted.
|
||||
|
@ -290,6 +291,7 @@ class AliasSetTracker {
|
|||
AliasSetTracker *AST;
|
||||
void deleted() override;
|
||||
void allUsesReplacedWith(Value *) override;
|
||||
|
||||
public:
|
||||
ASTCallbackVH(Value *V, AliasSetTracker *AST = nullptr);
|
||||
ASTCallbackVH &operator=(Value *V);
|
||||
|
@ -398,7 +400,6 @@ public:
|
|||
///
|
||||
void copyValue(Value *From, Value *To);
|
||||
|
||||
|
||||
typedef ilist<AliasSet>::iterator iterator;
|
||||
typedef ilist<AliasSet>::const_iterator const_iterator;
|
||||
|
||||
|
|
|
@ -83,6 +83,7 @@ public:
|
|||
class CallGraphSCC {
|
||||
void *Context; // The CGPassManager object that is vending this.
|
||||
std::vector<CallGraphNode*> Nodes;
|
||||
|
||||
public:
|
||||
CallGraphSCC(void *context) : Context(context) {}
|
||||
|
||||
|
|
|
@ -210,13 +210,13 @@ namespace llvm {
|
|||
/// dump - For debugging purposes, dumps a dependence to OS.
|
||||
///
|
||||
void dump(raw_ostream &OS) const;
|
||||
|
||||
private:
|
||||
Instruction *Src, *Dst;
|
||||
const Dependence *NextPredecessor, *NextSuccessor;
|
||||
friend class DependenceAnalysis;
|
||||
};
|
||||
|
||||
|
||||
/// FullDependence - This class represents a dependence between two memory
|
||||
/// references in a function. It contains detailed information about the
|
||||
/// dependence (direction vectors, etc.) and is used when the compiler is
|
||||
|
@ -285,12 +285,12 @@ namespace llvm {
|
|||
friend class DependenceAnalysis;
|
||||
};
|
||||
|
||||
|
||||
/// DependenceAnalysis - This class is the main dependence-analysis driver.
|
||||
///
|
||||
class DependenceAnalysis : public FunctionPass {
|
||||
void operator=(const DependenceAnalysis &) = delete;
|
||||
DependenceAnalysis(const DependenceAnalysis &) = delete;
|
||||
|
||||
public:
|
||||
/// depends - Tests for a dependence between the Src and Dst instructions.
|
||||
/// Returns NULL if no dependence; otherwise, returns a Dependence (or a
|
||||
|
@ -400,6 +400,7 @@ namespace llvm {
|
|||
const SCEV *B;
|
||||
const SCEV *C;
|
||||
const Loop *AssociatedLoop;
|
||||
|
||||
public:
|
||||
/// isEmpty - Return true if the constraint is of kind Empty.
|
||||
bool isEmpty() const { return Kind == Empty; }
|
||||
|
@ -466,7 +467,6 @@ namespace llvm {
|
|||
void dump(raw_ostream &OS) const;
|
||||
};
|
||||
|
||||
|
||||
/// establishNestingLevels - Examines the loop nesting of the Src and Dst
|
||||
/// instructions and establishes their shared loops. Sets the variables
|
||||
/// CommonLevels, SrcLevels, and MaxLevels.
|
||||
|
@ -819,7 +819,6 @@ namespace llvm {
|
|||
const SCEV *Delta) const;
|
||||
|
||||
/// testBounds - Returns true iff the current bounds are plausible.
|
||||
///
|
||||
bool testBounds(unsigned char DirKind,
|
||||
unsigned Level,
|
||||
BoundInfo *Bound,
|
||||
|
|
|
@ -96,6 +96,7 @@ namespace llvm {
|
|||
typedef PointerIntPair<Instruction*, 2, DepType> PairTy;
|
||||
PairTy Value;
|
||||
explicit MemDepResult(PairTy V) : Value(V) {}
|
||||
|
||||
public:
|
||||
MemDepResult() : Value(nullptr, Invalid) {}
|
||||
|
||||
|
@ -163,6 +164,7 @@ namespace llvm {
|
|||
bool operator!=(const MemDepResult &M) const { return Value != M.Value; }
|
||||
bool operator<(const MemDepResult &M) const { return Value < M.Value; }
|
||||
bool operator>(const MemDepResult &M) const { return Value > M.Value; }
|
||||
|
||||
private:
|
||||
friend class MemoryDependenceAnalysis;
|
||||
/// Dirty - Entries with this marker occur in a LocalDeps map or
|
||||
|
@ -189,6 +191,7 @@ namespace llvm {
|
|||
class NonLocalDepEntry {
|
||||
BasicBlock *BB;
|
||||
MemDepResult Result;
|
||||
|
||||
public:
|
||||
NonLocalDepEntry(BasicBlock *bb, MemDepResult result)
|
||||
: BB(bb), Result(result) {}
|
||||
|
@ -214,6 +217,7 @@ namespace llvm {
|
|||
class NonLocalDepResult {
|
||||
NonLocalDepEntry Entry;
|
||||
Value *Address;
|
||||
|
||||
public:
|
||||
NonLocalDepResult(BasicBlock *bb, MemDepResult result, Value *address)
|
||||
: Entry(bb, result), Address(address) {}
|
||||
|
@ -260,6 +264,7 @@ namespace llvm {
|
|||
|
||||
public:
|
||||
typedef std::vector<NonLocalDepEntry> NonLocalDepInfo;
|
||||
|
||||
private:
|
||||
/// ValueIsLoadPair - This is a pair<Value*, bool> where the bool is true if
|
||||
/// the dependence is a read only dependence, false if read/write.
|
||||
|
@ -301,7 +306,6 @@ namespace llvm {
|
|||
SmallPtrSet<ValueIsLoadPair, 4> > ReverseNonLocalPtrDepTy;
|
||||
ReverseNonLocalPtrDepTy ReverseNonLocalPtrDeps;
|
||||
|
||||
|
||||
/// PerInstNLInfo - This is the instruction we keep for each cached access
|
||||
/// that we have for an instruction. The pointer is an owning pointer and
|
||||
/// the bool indicates whether we have any dirty bits in the set.
|
||||
|
@ -363,7 +367,6 @@ namespace llvm {
|
|||
/// that.
|
||||
const NonLocalDepInfo &getNonLocalCallDependency(CallSite QueryCS);
|
||||
|
||||
|
||||
/// getNonLocalPointerDependency - Perform a full dependency query for an
|
||||
/// access to the QueryInst's specified memory location, returning the set
|
||||
/// of instructions that either define or clobber the value.
|
||||
|
@ -442,7 +445,6 @@ namespace llvm {
|
|||
/// verifyRemoved - Verify that the specified instruction does not occur
|
||||
/// in our internal data structures.
|
||||
void verifyRemoved(Instruction *Inst) const;
|
||||
|
||||
};
|
||||
|
||||
} // End llvm namespace
|
||||
|
|
|
@ -48,6 +48,7 @@ class PHITransAddr {
|
|||
|
||||
/// InstInputs - The inputs for our symbolic address.
|
||||
SmallVector<Instruction*, 4> InstInputs;
|
||||
|
||||
public:
|
||||
PHITransAddr(Value *addr, const DataLayout &DL, AssumptionCache *AC)
|
||||
: Addr(addr), DL(DL), TLI(nullptr), AC(AC) {
|
||||
|
@ -98,6 +99,7 @@ public:
|
|||
/// structure is valid, it returns true. If invalid, it prints errors and
|
||||
/// returns false.
|
||||
bool Verify() const;
|
||||
|
||||
private:
|
||||
Value *PHITranslateSubExpr(Value *V, BasicBlock *CurBB, BasicBlock *PredBB,
|
||||
const DominatorTree *DT);
|
||||
|
@ -118,7 +120,6 @@ private:
|
|||
InstInputs.push_back(VI);
|
||||
return V;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
} // end namespace llvm
|
||||
|
|
|
@ -44,8 +44,10 @@ namespace llvm {
|
|||
class AbstractLatticeFunction {
|
||||
public:
|
||||
typedef void *LatticeVal;
|
||||
|
||||
private:
|
||||
LatticeVal UndefVal, OverdefinedVal, UntrackedVal;
|
||||
|
||||
public:
|
||||
AbstractLatticeFunction(LatticeVal undefVal, LatticeVal overdefinedVal,
|
||||
LatticeVal untrackedVal) {
|
||||
|
@ -108,7 +110,6 @@ public:
|
|||
virtual void PrintValue(LatticeVal V, raw_ostream &OS);
|
||||
};
|
||||
|
||||
|
||||
/// SparseSolver - This class is a general purpose solver for Sparse Conditional
|
||||
/// Propagation with a programmable lattice function.
|
||||
///
|
||||
|
@ -133,6 +134,7 @@ class SparseSolver {
|
|||
|
||||
SparseSolver(const SparseSolver&) = delete;
|
||||
void operator=(const SparseSolver&) = delete;
|
||||
|
||||
public:
|
||||
explicit SparseSolver(AbstractLatticeFunction *Lattice)
|
||||
: LatticeFunc(Lattice) {}
|
||||
|
@ -198,7 +200,6 @@ private:
|
|||
void visitInst(Instruction &I);
|
||||
void visitPHINode(PHINode &I);
|
||||
void visitTerminatorInst(TerminatorInst &TI);
|
||||
|
||||
};
|
||||
|
||||
} // end namespace llvm
|
||||
|
|
Loading…
Reference in New Issue