1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Allow targets to select source order pre-RA scheduler.

llvm-svn: 148033
This commit is contained in:
Evan Cheng 2012-01-12 18:27:52 +00:00
parent d568674834
commit fc3ec91768
2 changed files with 3 additions and 1 deletions

View File

@ -56,6 +56,7 @@ namespace llvm {
namespace Sched {
enum Preference {
None, // No preference
Source, // Follow source order.
RegPressure, // Scheduling for lowest register pressure.
Hybrid, // Scheduling for both latency and register pressure.
ILP // Scheduling for ILP in low register pressure mode.

View File

@ -218,7 +218,8 @@ namespace llvm {
CodeGenOpt::Level OptLevel) {
const TargetLowering &TLI = IS->getTargetLowering();
if (OptLevel == CodeGenOpt::None)
if (OptLevel == CodeGenOpt::None ||
TLI.getSchedulingPreference() == Sched::Source)
return createSourceListDAGScheduler(IS, OptLevel);
if (TLI.getSchedulingPreference() == Sched::RegPressure)
return createBURRListDAGScheduler(IS, OptLevel);