mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 00:21:03 +00:00
Two sets of changes. Sorry they are intermingled.
1. Fix pre-ra scheduler so it doesn't try to push instructions above calls to "optimize for latency". Call instructions don't have the right latency and this is more likely to use introduce spills. 2. Fix if-converter cost function. For ARM, it should use instruction latencies, not # of micro-ops since multi-latency instructions is completely executed even when the predicate is false. Also, some instruction will be "slower" when they are predicated due to the register def becoming implicit input. rdar://8598427 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118135 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -247,6 +247,7 @@ namespace llvm {
|
||||
unsigned NumSuccs; // # of SDep::Data sucss.
|
||||
unsigned NumPredsLeft; // # of preds not scheduled.
|
||||
unsigned NumSuccsLeft; // # of succs not scheduled.
|
||||
bool isCall : 1; // Is a function call.
|
||||
bool isTwoAddress : 1; // Is a two-address instruction.
|
||||
bool isCommutable : 1; // Is a commutable instruction.
|
||||
bool hasPhysRegDefs : 1; // Has physreg defs that are being used.
|
||||
@@ -273,7 +274,8 @@ namespace llvm {
|
||||
SUnit(SDNode *node, unsigned nodenum)
|
||||
: Node(node), Instr(0), OrigNode(0), NodeNum(nodenum),
|
||||
NodeQueueId(0), Latency(0), NumPreds(0), NumSuccs(0), NumPredsLeft(0),
|
||||
NumSuccsLeft(0), isTwoAddress(false), isCommutable(false),
|
||||
NumSuccsLeft(0),
|
||||
isCall(false), isTwoAddress(false), isCommutable(false),
|
||||
hasPhysRegDefs(false), hasPhysRegClobbers(false),
|
||||
isPending(false), isAvailable(false), isScheduled(false),
|
||||
isScheduleHigh(false), isCloned(false),
|
||||
@@ -286,7 +288,8 @@ namespace llvm {
|
||||
SUnit(MachineInstr *instr, unsigned nodenum)
|
||||
: Node(0), Instr(instr), OrigNode(0), NodeNum(nodenum),
|
||||
NodeQueueId(0), Latency(0), NumPreds(0), NumSuccs(0), NumPredsLeft(0),
|
||||
NumSuccsLeft(0), isTwoAddress(false), isCommutable(false),
|
||||
NumSuccsLeft(0),
|
||||
isCall(false), isTwoAddress(false), isCommutable(false),
|
||||
hasPhysRegDefs(false), hasPhysRegClobbers(false),
|
||||
isPending(false), isAvailable(false), isScheduled(false),
|
||||
isScheduleHigh(false), isCloned(false),
|
||||
@@ -298,7 +301,8 @@ namespace llvm {
|
||||
SUnit()
|
||||
: Node(0), Instr(0), OrigNode(0), NodeNum(~0u),
|
||||
NodeQueueId(0), Latency(0), NumPreds(0), NumSuccs(0), NumPredsLeft(0),
|
||||
NumSuccsLeft(0), isTwoAddress(false), isCommutable(false),
|
||||
NumSuccsLeft(0),
|
||||
isCall(false), isTwoAddress(false), isCommutable(false),
|
||||
hasPhysRegDefs(false), hasPhysRegClobbers(false),
|
||||
isPending(false), isAvailable(false), isScheduled(false),
|
||||
isScheduleHigh(false), isCloned(false),
|
||||
|
Reference in New Issue
Block a user