Fix a post-RA scheduling dependency bug.

If a MachineInstr doesn't have a memoperand but has an opcode that
is known to load or store, assume its memory reference may alias
*anything*, including stack slots which the compiler completely
controls.

To partially compensate for this, teach the ScheduleDAG building
code to do basic getUnderlyingValue analysis. This greatly
reduces the number of instructions that require restrictive
dependencies. This code will need to be revisited when we start
doing real alias analysis, but it should suffice for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63370 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2009-01-30 02:49:14 +00:00
parent 9c8148ac93
commit 3311a1f8f0
3 changed files with 96 additions and 12 deletions
+1 -1
View File
@@ -80,7 +80,7 @@ static bool isNoAliasCall(const Value *V) {
/// ByVal and NoAlias Arguments
/// NoAlias returns
///
static bool isIdentifiedObject(const Value *V) {
bool llvm::isIdentifiedObject(const Value *V) {
if (isa<GlobalValue>(V) || isa<AllocationInst>(V) || isNoAliasCall(V))
return true;
if (const Argument *A = dyn_cast<Argument>(V))