[llvm-commits] [poolalloc] r57983 - /poolalloc/trunk/lib/DSA/Local.cpp
Andrew Lenharth
alenhar2 at cs.uiuc.edu
Wed Oct 22 09:13:58 PDT 2008
Author: alenhar2
Date: Wed Oct 22 11:13:58 2008
New Revision: 57983
URL: http://llvm.org/viewvc/llvm-project?rev=57983&view=rev
Log:
It really helps if ALL the fields of globals are added to the globals graph
Modified:
poolalloc/trunk/lib/DSA/Local.cpp
Modified: poolalloc/trunk/lib/DSA/Local.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/Local.cpp?rev=57983&r1=57982&r2=57983&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/Local.cpp (original)
+++ poolalloc/trunk/lib/DSA/Local.cpp Wed Oct 22 11:13:58 2008
@@ -271,11 +271,14 @@
}
void GraphBuilder::visitSelectInst(SelectInst &SI) {
- if (!isa<PointerType>(SI.getType())) return; // Only pointer Selects
+ if (!isa<PointerType>(SI.getType()))
+ return; // Only pointer Selects
DSNodeHandle &Dest = G.getNodeForValue(&SI);
- Dest.mergeWith(getValueDest(*SI.getOperand(1)));
- Dest.mergeWith(getValueDest(*SI.getOperand(2)));
+ DSNodeHandle S1 = getValueDest(*SI.getOperand(1));
+ DSNodeHandle S2 = getValueDest(*SI.getOperand(2));
+ Dest.mergeWith(S1);
+ Dest.mergeWith(S2);
}
void GraphBuilder::visitLoadInst(LoadInst &LI) {
@@ -700,13 +703,14 @@
DSNode *NHN = NH.getNode();
NHN->mergeTypeInfo(Ty, NH.getOffset());
- if (Ty->isFirstClassType()) {
- if (isa<PointerType>(Ty))
- // Avoid adding edges from null, or processing non-"pointer" stores
- NH.addEdgeTo(getValueDest(*C));
+ if (isa<PointerType>(Ty)) {
+ // Avoid adding edges from null, or processing non-"pointer" stores
+ NH.addEdgeTo(getValueDest(*C));
return;
}
+ if (Ty->isIntOrIntVector() || Ty->isFPOrFPVector()) return;
+
const TargetData &TD = NH.getNode()->getTargetData();
if (ConstantArray *CA = dyn_cast<ConstantArray>(C)) {
More information about the llvm-commits
mailing list