mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
Add a target lowering hook to control whether it's worthwhile to compress fp constant.
For x86, if sse2 is available, it's not a good idea since cvtss2sd is slower than a movsd load and it prevents load folding. On x87, it's important to shrink fp constant since fldt is very expensive. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47931 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -467,6 +467,11 @@ public:
|
||||
assert(0 && "Unsupported extended type!");
|
||||
}
|
||||
|
||||
/// ShouldShrinkFPConstant - If true, then instruction selection should
|
||||
/// seek to shrink the FP constant of the specified type to a smaller type
|
||||
/// in order to save space and / or reduce runtime.
|
||||
virtual bool ShouldShrinkFPConstant(MVT::ValueType VT) const { return true; }
|
||||
|
||||
/// hasTargetDAGCombine - If true, the target has custom DAG combine
|
||||
/// transformations that it can perform for the specified node.
|
||||
bool hasTargetDAGCombine(ISD::NodeType NT) const {
|
||||
|
Reference in New Issue
Block a user