[llvm-commits] [poolalloc] r131865 - in /poolalloc/trunk: include/dsa/CallTargets.h lib/DSA/CallTargets.cpp
Arushi Aggarwal
aggarwa4 at illinois.edu
Sun May 22 13:05:26 PDT 2011
Author: aggarwa4
Date: Sun May 22 15:05:26 2011
New Revision: 131865
URL: http://llvm.org/viewvc/llvm-project?rev=131865&view=rev
Log:
Move accessor function definitions to the header
file.
Modified:
poolalloc/trunk/include/dsa/CallTargets.h
poolalloc/trunk/lib/DSA/CallTargets.cpp
Modified: poolalloc/trunk/include/dsa/CallTargets.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/CallTargets.h?rev=131865&r1=131864&r2=131865&view=diff
==============================================================================
--- poolalloc/trunk/include/dsa/CallTargets.h (original)
+++ poolalloc/trunk/include/dsa/CallTargets.h Sun May 22 15:05:26 2011
@@ -41,17 +41,29 @@
virtual void print(llvm::raw_ostream &O, const Module *M) const;
// Given a CallSite, get an iterator of callees
- std::vector<const Function*>::iterator begin(CallSite cs);
- std::vector<const Function*>::iterator end(CallSite cs);
- unsigned size(CallSite cs);
+ std::vector<const Function*>::iterator begin(CallSite cs){
+ return IndMap[cs].begin();
+ }
+ std::vector<const Function*>::iterator end(CallSite cs){
+ return IndMap[cs].end();
+ }
+ unsigned size(CallSite cs){
+ return IndMap[cs].size();
+ }
// Iterate over CallSites in program
- std::list<CallSite>::iterator cs_begin();
- std::list<CallSite>::iterator cs_end();
+ std::list<CallSite>::iterator cs_begin(){
+ return AllSites.begin();
+ }
+ std::list<CallSite>::iterator cs_end(){
+ return AllSites.end();
+ }
// Do we think we have complete knowledge of this site?
// That is, do we think there are no missing callees
- bool isComplete(CallSite cs) const;
+ bool isComplete(CallSite cs) const {
+ return CompleteSites.find(cs) != CompleteSites.end();
+ }
};
}
Modified: poolalloc/trunk/lib/DSA/CallTargets.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/CallTargets.cpp?rev=131865&r1=131864&r2=131865&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/CallTargets.cpp (original)
+++ poolalloc/trunk/lib/DSA/CallTargets.cpp Sun May 22 15:05:26 2011
@@ -158,26 +158,3 @@
AU.setPreservesAll();
AU.addRequired<EQTDDataStructures>();
}
-
-std::vector<const Function*>::iterator CallTargetFinder::begin(CallSite cs) {
- return IndMap[cs].begin();
-}
-
-std::vector<const Function*>::iterator CallTargetFinder::end(CallSite cs) {
- return IndMap[cs].end();
-}
-unsigned CallTargetFinder::size(CallSite cs) {
- return IndMap[cs].size();
-}
-
-bool CallTargetFinder::isComplete(CallSite cs) const {
- return CompleteSites.find(cs) != CompleteSites.end();
-}
-
-std::list<CallSite>::iterator CallTargetFinder::cs_begin() {
- return AllSites.begin();
-}
-
-std::list<CallSite>::iterator CallTargetFinder::cs_end() {
- return AllSites.end();
-}
More information about the llvm-commits
mailing list