[llvm-commits] [poolalloc] r72124 - /poolalloc/branches/SVA/lib/DSA/Local.cpp
John Criswell
criswell at uiuc.edu
Tue May 19 12:36:08 PDT 2009
Author: criswell
Date: Tue May 19 14:35:52 2009
New Revision: 72124
URL: http://llvm.org/viewvc/llvm-project?rev=72124&view=rev
Log:
Moved the kmem_cache_alloc() hack from the local DSA pass to the Top-Down DSA
pass (where more aliasing information is available).
Modified:
poolalloc/branches/SVA/lib/DSA/Local.cpp
Modified: poolalloc/branches/SVA/lib/DSA/Local.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/branches/SVA/lib/DSA/Local.cpp?rev=72124&r1=72123&r2=72124&view=diff
==============================================================================
--- poolalloc/branches/SVA/lib/DSA/Local.cpp (original)
+++ poolalloc/branches/SVA/lib/DSA/Local.cpp Tue May 19 14:35:52 2009
@@ -1911,33 +1911,6 @@
EliminateUsesOfECGlobals(*I->second, ECGlobals);
}
-#ifdef LLVA_KERNEL
-
- // Ugly hack. kmem_cache_allocs are in the same pool also if the kmem_cache_t's are the same
- // this only works on global kmem_cache_ts
- Function* KMA = M.getNamedFunction("kmem_cache_alloc");
- if (KMA) {
- for (Value::use_iterator ii = KMA->use_begin(), ee = KMA->use_end();
- ii != ee; ++ii) {
- std::map<Value*, MetaPool*> locs;
- if (CallInst* CI = dyn_cast<CallInst>(*ii)) {
- if (CI->getCalledFunction() == KMA && isa<GlobalValue>(CI->getOperand(1))) {
- Value* V = CI->getOperand(1); //the kmem_cache_alloc
- DSNodeHandle DSH = DSInfo[CI->getParent()->getParent()]->getNodeForValue(CI);
- MetaPoolHandle L(locs[V]), N(DSH.getNode()->getMP());
- if (L.getPool() != N.getPool()) {
- std::cerr << "kmem_cache_alloc recovered merge\n";
- MetaPoolHandle L(locs[V]), N(DSH.getNode()->getMP());
- DSH.getNode()->getMP()->merge(locs[V]);
- }
- locs[V] = DSH.getNode()->getMP();
- }
- }
- }
- }
-
-#endif
-
return true;
}
More information about the llvm-commits
mailing list