summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-07 07:14:55 +0000
committerChris Lattner <sabre@nondot.org>2006-03-07 07:14:55 +0000
commit675567f77cfe1694258c8e4d271b6c07836a33b8 (patch)
tree4da9d624c3f15f20a527c9bbcb8e3d8dfd5f6f35
parent05ad128dca2b2a349b728c35f03674ff5ead3d74 (diff)
downloadbcm5719-llvm-675567f77cfe1694258c8e4d271b6c07836a33b8.tar.gz
bcm5719-llvm-675567f77cfe1694258c8e4d271b6c07836a33b8.zip
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%). llvm-svn: 26590
-rw-r--r--llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp b/llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp
index 1b1559546b2..4408e950355 100644
--- a/llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp
+++ b/llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp
@@ -41,6 +41,7 @@ using namespace llvm;
// conditions, we insert no-op instructions when appropriate.
//
// 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.
// 1. Modeling of microcoded instructions.
// 2. Handling of cracked instructions.
@@ -76,12 +77,18 @@ PPCHazardRecognizer970::GetInstrType(unsigned Opcode) {
case PPC::BLA:
return BR;
case PPC::LFS:
+ case PPC::LFD:
case PPC::LWZ:
+ case PPC::LFSX:
+ case PPC::LWZX:
return LSU_LD;
case PPC::STFD:
+ case PPC::STW:
return LSU_ST;
case PPC::FADDS:
case PPC::FCTIWZ:
+ case PPC::FRSP:
+ case PPC::FSUB:
return FPU;
}
@@ -159,8 +166,11 @@ getHazardType(SDNode *Node) {
unsigned LoadSize;
switch (Opcode) {
default: assert(0 && "Unknown load!");
+ case PPC::LFSX:
case PPC::LFS:
+ case PPC::LWZX:
case PPC::LWZ: LoadSize = 4; break;
+ case PPC::LFD: LoadSize = 8; break;
}
if (isLoadOfStoredAddress(LoadSize,
@@ -186,6 +196,7 @@ void PPCHazardRecognizer970::EmitInstruction(SDNode *Node) {
switch (Opcode) {
default: assert(0 && "Unknown store instruction!");
case PPC::STFD: StoreSize = 8; break;
+ case PPC::STW: StoreSize = 4; break;
}
}
OpenPOWER on IntegriCloud