Treat EntryToken nodes as "passive" so that they aren't added to the
authorDan Gohman <gohman@apple.com>
Tue, 15 Apr 2008 01:22:18 +0000 (01:22 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 15 Apr 2008 01:22:18 +0000 (01:22 +0000)
commit80792f3ddec43aff7f0758c9096f8cb53dcc1e40
treebafff231c1d86725c17901a10fe0c9f4e42743cb
parent89bf0a6b05c8c353890c88ed1c10dec96a9a7bd8
Treat EntryToken nodes as "passive" so that they aren't added to the
ScheduleDAG; they don't correspond to any actual instructions so they
don't need to be scheduled.

This fixes a bug where the EntryToken was being scheduled multiple
times in some cases, though it ended up not causing any trouble because
EntryToken doesn't expand into anything. With this fixed the schedulers
reliably schedule the expected number of units, so we can check this
with an assertion.

This requires a tweak to test/CodeGen/X86/loop-hoist.ll because it
ends up getting scheduled differently in a trivial way, though it was
enough to fool the prcontext+grep that the test does.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49701 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/ScheduleDAG.h
lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
test/CodeGen/X86/loop-hoist.ll