mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-15 00:38:42 +00:00
add some new instructions to the classifier. With this, we correctly insert
a nop into Freebench/neural, which speeds it up from 136->129s (~5.4%). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26590 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7ce64852e8
commit
2046371e70
@ -41,6 +41,7 @@ using namespace llvm;
|
|||||||
// conditions, we insert no-op instructions when appropriate.
|
// conditions, we insert no-op instructions when appropriate.
|
||||||
//
|
//
|
||||||
// FIXME: This is missing some significant cases:
|
// FIXME: This is missing some significant cases:
|
||||||
|
// -1. Handle all of the instruction types in GetInstrType.
|
||||||
// 0. Handling of instructions that must be the first/last in a group.
|
// 0. Handling of instructions that must be the first/last in a group.
|
||||||
// 1. Modeling of microcoded instructions.
|
// 1. Modeling of microcoded instructions.
|
||||||
// 2. Handling of cracked instructions.
|
// 2. Handling of cracked instructions.
|
||||||
@ -76,12 +77,18 @@ PPCHazardRecognizer970::GetInstrType(unsigned Opcode) {
|
|||||||
case PPC::BLA:
|
case PPC::BLA:
|
||||||
return BR;
|
return BR;
|
||||||
case PPC::LFS:
|
case PPC::LFS:
|
||||||
|
case PPC::LFD:
|
||||||
case PPC::LWZ:
|
case PPC::LWZ:
|
||||||
|
case PPC::LFSX:
|
||||||
|
case PPC::LWZX:
|
||||||
return LSU_LD;
|
return LSU_LD;
|
||||||
case PPC::STFD:
|
case PPC::STFD:
|
||||||
|
case PPC::STW:
|
||||||
return LSU_ST;
|
return LSU_ST;
|
||||||
case PPC::FADDS:
|
case PPC::FADDS:
|
||||||
case PPC::FCTIWZ:
|
case PPC::FCTIWZ:
|
||||||
|
case PPC::FRSP:
|
||||||
|
case PPC::FSUB:
|
||||||
return FPU;
|
return FPU;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,8 +166,11 @@ getHazardType(SDNode *Node) {
|
|||||||
unsigned LoadSize;
|
unsigned LoadSize;
|
||||||
switch (Opcode) {
|
switch (Opcode) {
|
||||||
default: assert(0 && "Unknown load!");
|
default: assert(0 && "Unknown load!");
|
||||||
|
case PPC::LFSX:
|
||||||
case PPC::LFS:
|
case PPC::LFS:
|
||||||
|
case PPC::LWZX:
|
||||||
case PPC::LWZ: LoadSize = 4; break;
|
case PPC::LWZ: LoadSize = 4; break;
|
||||||
|
case PPC::LFD: LoadSize = 8; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isLoadOfStoredAddress(LoadSize,
|
if (isLoadOfStoredAddress(LoadSize,
|
||||||
@ -186,6 +196,7 @@ void PPCHazardRecognizer970::EmitInstruction(SDNode *Node) {
|
|||||||
switch (Opcode) {
|
switch (Opcode) {
|
||||||
default: assert(0 && "Unknown store instruction!");
|
default: assert(0 && "Unknown store instruction!");
|
||||||
case PPC::STFD: StoreSize = 8; break;
|
case PPC::STFD: StoreSize = 8; break;
|
||||||
|
case PPC::STW: StoreSize = 4; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user