[llvm] r201754 - Simplify the implementation of getUnderlyingObjectsForInstr, without intending to change the semantics at all.
Nick Lewycky
nicholas at mxc.ca
Wed Feb 19 21:06:26 PST 2014
Author: nicholas
Date: Wed Feb 19 23:06:26 2014
New Revision: 201754
URL: http://llvm.org/viewvc/llvm-project?rev=201754&view=rev
Log:
Simplify the implementation of getUnderlyingObjectsForInstr, without intending to change the semantics at all.
Modified:
llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp
Modified: llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp?rev=201754&r1=201753&r2=201754&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp (original)
+++ llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp Wed Feb 19 23:06:26 2014
@@ -148,31 +148,30 @@ static void getUnderlyingObjectsForInstr
if (!V)
return;
+ if (const PseudoSourceValue *PSV = dyn_cast<PseudoSourceValue>(V)) {
+ // For now, ignore PseudoSourceValues which may alias LLVM IR values
+ // because the code that uses this function has no way to cope with
+ // such aliases.
+ if (!PSV->isAliased(MFI))
+ Objects.push_back(UnderlyingObjectsVector::value_type(V, false));
+ return;
+ }
+
SmallVector<Value *, 4> Objs;
getUnderlyingObjects(V, Objs);
for (SmallVectorImpl<Value *>::iterator I = Objs.begin(), IE = Objs.end();
I != IE; ++I) {
- bool MayAlias = true;
V = *I;
- if (const PseudoSourceValue *PSV = dyn_cast<PseudoSourceValue>(V)) {
- // For now, ignore PseudoSourceValues which may alias LLVM IR values
- // because the code that uses this function has no way to cope with
- // such aliases.
-
- if (PSV->isAliased(MFI)) {
- Objects.clear();
- return;
- }
+ assert(!isa<PseudoSourceValue>(V) && "Underlying value is a stack slot!");
- MayAlias = PSV->mayAlias(MFI);
- } else if (!isIdentifiedObject(V)) {
+ if (!isIdentifiedObject(V)) {
Objects.clear();
return;
}
- Objects.push_back(UnderlyingObjectsVector::value_type(V, MayAlias));
+ Objects.push_back(UnderlyingObjectsVector::value_type(V, true));
}
}
More information about the llvm-commits
mailing list