mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 16:17:17 +00:00
- Re-enable population count loop idiom recognization
- fix a bug which cause sigfault. - add two testing cases which was causing crash git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169687 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -26,7 +26,7 @@ class TargetLowering;
|
||||
/// ScalarTargetTransformInfo interface. Different targets can implement
|
||||
/// this interface differently.
|
||||
class ScalarTargetTransformImpl : public ScalarTargetTransformInfo {
|
||||
private:
|
||||
protected:
|
||||
const TargetLowering *TLI;
|
||||
|
||||
public:
|
||||
|
@@ -75,6 +75,18 @@ public:
|
||||
/// LSR, and LowerInvoke use this interface.
|
||||
class ScalarTargetTransformInfo {
|
||||
public:
|
||||
/// PopcntHwSupport - Hardware support for population count. Compared to the
|
||||
/// SW implementation, HW support is supposed to significantly boost the
|
||||
/// performance when the population is dense, and it may or not may degrade
|
||||
/// performance if the population is sparse. A HW support is considered as
|
||||
/// "Fast" if it can outperform, or is on a par with, SW implementaion when
|
||||
/// the population is sparse; otherwise, it is considered as "Slow".
|
||||
enum PopcntHwSupport {
|
||||
None,
|
||||
Fast,
|
||||
Slow
|
||||
};
|
||||
|
||||
virtual ~ScalarTargetTransformInfo() {}
|
||||
|
||||
/// isLegalAddImmediate - Return true if the specified immediate is legal
|
||||
@@ -122,6 +134,11 @@ public:
|
||||
virtual bool shouldBuildLookupTables() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
/// getPopcntHwSupport - Return hardware support for population count.
|
||||
virtual PopcntHwSupport getPopcntHwSupport(unsigned IntTyWidthInBit) const {
|
||||
return None;
|
||||
}
|
||||
};
|
||||
|
||||
/// VectorTargetTransformInfo - This interface is used by the vectorizers
|
||||
|
Reference in New Issue
Block a user