diff options
author | Hal Finkel <hfinkel@anl.gov> | 2016-03-28 17:52:08 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2016-03-28 17:52:08 +0000 |
commit | 7059d416228846346bdf2027be1fb0459f3f0ece (patch) | |
tree | 9c9583359cbc6ef128738966b7aa30b375e4244e /llvm/lib/Target/PowerPC/PPCSubtarget.h | |
parent | b805f73ad1d75521f86cf2280837a0717f01b76b (diff) | |
download | bcm5719-llvm-7059d416228846346bdf2027be1fb0459f3f0ece.tar.gz bcm5719-llvm-7059d416228846346bdf2027be1fb0459f3f0ece.zip |
[PowerPC] On the A2, popcnt[dw] are very slow
The A2 cores support the popcntw/popcntd instructions, but they're microcoded,
and slower than our default software emulation. Specifically, popcnt[dw] take
approximately 74 cycles, whereas our software emulation takes only 24-28
cycles.
I've added a new target feature to indicate a slow popcnt[dw], instead of just
removing the existing target feature from the a2/a2q processor models, because:
1. This allows us to return more accurate information via the TTI interface
(I recognize that this currently makes no practical difference)
2. Is hopefully easier to understand (it allows the core's features to match
its manual while still having the desired effect).
llvm-svn: 264600
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCSubtarget.h')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCSubtarget.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCSubtarget.h b/llvm/lib/Target/PowerPC/PPCSubtarget.h index 7ff77ce2522..fc4ba3f7cc3 100644 --- a/llvm/lib/Target/PowerPC/PPCSubtarget.h +++ b/llvm/lib/Target/PowerPC/PPCSubtarget.h @@ -124,6 +124,7 @@ protected: bool HasHTM; bool HasFusion; bool HasFloat128; + bool SlowPOPCNTD; /// When targeting QPX running a stock PPC64 Linux kernel where the stack /// alignment has not been changed, we need to keep the 16-byte alignment @@ -248,6 +249,7 @@ public: bool isE500() const { return IsE500; } bool isFeatureMFTB() const { return FeatureMFTB; } bool isDeprecatedDST() const { return DeprecatedDST; } + bool isPOPCNTDSlow() const { return SlowPOPCNTD; } bool hasICBT() const { return HasICBT; } bool hasInvariantFunctionDescriptors() const { return HasInvariantFunctionDescriptors; |