diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-10-27 19:56:55 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-10-27 19:56:55 +0000 |
commit | eb2f969a4ddfb0bc8fdcb5bce3b52e53abff321d (patch) | |
tree | ad532e623f4f409af02ef9eef7d576ad8184978b /lib/Target/X86/X86ISelLowering.h | |
parent | f3b0d1a555eaa46931e4ec1b11e434e8cba2b5d7 (diff) | |
download | external_llvm-eb2f969a4ddfb0bc8fdcb5bce3b52e53abff321d.zip external_llvm-eb2f969a4ddfb0bc8fdcb5bce3b52e53abff321d.tar.gz external_llvm-eb2f969a4ddfb0bc8fdcb5bce3b52e53abff321d.tar.bz2 |
Do away with addLegalFPImmediate. Add a target hook isFPImmLegal which returns true if the fp immediate can be natively codegened by target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85281 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86ISelLowering.h')
-rw-r--r-- | lib/Target/X86/X86ISelLowering.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Target/X86/X86ISelLowering.h b/lib/Target/X86/X86ISelLowering.h index 66a9107..3d334a0 100644 --- a/lib/Target/X86/X86ISelLowering.h +++ b/lib/Target/X86/X86ISelLowering.h @@ -499,6 +499,11 @@ namespace llvm { /// from i32 to i8 but not from i32 to i16. virtual bool isNarrowingProfitable(EVT VT1, EVT VT2) const; + /// isFPImmLegal - Returns true if the target can instruction select the + /// specified FP immediate natively. If false, the legalizer will + /// materialize the FP immediate as a load from a constant pool. + virtual bool isFPImmLegal(const APFloat &Imm) const; + /// isShuffleMaskLegal - Targets can use this to indicate that they only /// support *some* VECTOR_SHUFFLE operations, those with specific masks. /// By default, if a target supports the VECTOR_SHUFFLE node, all mask @@ -584,6 +589,15 @@ namespace llvm { bool X86ScalarSSEf32; bool X86ScalarSSEf64; + /// LegalFPImmediates - A list of legal fp immediates. + std::vector<APFloat> LegalFPImmediates; + + /// addLegalFPImmediate - Indicate that this x86 target can instruction + /// select the specified FP immediate natively. + void addLegalFPImmediate(const APFloat& Imm) { + LegalFPImmediates.push_back(Imm); + } + SDValue LowerCallResult(SDValue Chain, SDValue InFlag, CallingConv::ID CallConv, bool isVarArg, const SmallVectorImpl<ISD::InputArg> &Ins, |