[PATCH] D13257: [LAA] LLE 4/6: APIs to access the dependent instructions for a dependence, NFC
Adam Nemet via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 3 15:52:30 PST 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL252015: [LAA] LLE 4/6: APIs to access the dependent instructions for a dependence, NFC (authored by anemet).
Changed prior to commit:
http://reviews.llvm.org/D13257?vs=36001&id=39129#toc
Repository:
rL LLVM
http://reviews.llvm.org/D13257
Files:
llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h
Index: llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h
===================================================================
--- llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h
+++ llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h
@@ -33,6 +33,7 @@
class Loop;
class SCEV;
class SCEVUnionPredicate;
+class LoopAccessInfo;
/// Optimization analysis message produced during vectorization. Messages inform
/// the user why vectorization did not occur.
@@ -170,6 +171,11 @@
Dependence(unsigned Source, unsigned Destination, DepType Type)
: Source(Source), Destination(Destination), Type(Type) {}
+ /// \brief Return the source instruction of the dependence.
+ Instruction *getSource(const LoopAccessInfo &LAI) const;
+ /// \brief Return the destination instruction of the dependence.
+ Instruction *getDestination(const LoopAccessInfo &LAI) const;
+
/// \brief Dependence types that don't prevent vectorization.
static bool isSafeForVectorization(DepType Type);
@@ -679,6 +685,17 @@
DominatorTree *DT;
LoopInfo *LI;
};
+
+inline Instruction *MemoryDepChecker::Dependence::getSource(
+ const LoopAccessInfo &LAI) const {
+ return LAI.getDepChecker().getMemoryInstructions()[Source];
+}
+
+inline Instruction *MemoryDepChecker::Dependence::getDestination(
+ const LoopAccessInfo &LAI) const {
+ return LAI.getDepChecker().getMemoryInstructions()[Destination];
+}
+
} // End llvm namespace
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13257.39129.patch
Type: text/x-patch
Size: 1470 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151103/2941715b/attachment.bin>
More information about the llvm-commits
mailing list