Add new function attribute - noimplicitfloat

Update code generator to use this attribute and remove NoImplicitFloat target option.
Update llc to set this attribute when -no-implicit-float command line option is used.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72959 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel
2009-06-05 21:57:13 +00:00
parent abc0199680
commit 578efa920a
13 changed files with 54 additions and 38 deletions

View File

@@ -55,6 +55,8 @@ const Attributes Alignment = 31<<16; ///< Alignment of parameter (5 bits)
// 0 means unaligned different from align 1
const Attributes NoCapture = 1<<21; ///< Function creates no aliases of pointer
const Attributes NoRedZone = 1<<22; /// disable redzone
const Attributes NoImplicitFloat = 1<<23; /// disable implicit floating point
/// instructions.
/// @brief Attributes that only apply to function parameters.
const Attributes ParameterOnly = ByVal | Nest | StructRet | NoCapture;
@@ -62,7 +64,7 @@ const Attributes ParameterOnly = ByVal | Nest | StructRet | NoCapture;
/// @brief Attributes that only apply to function.
const Attributes FunctionOnly = NoReturn | NoUnwind | ReadNone | ReadOnly |
NoInline | AlwaysInline | OptimizeForSize | StackProtect | StackProtectReq |
NoRedZone;
NoRedZone | NoImplicitFloat;
/// @brief Parameter attributes that do not apply to vararg call arguments.
const Attributes VarArgsIncompatible = StructRet;

View File

@@ -632,7 +632,8 @@ public:
/// It returns MVT::iAny if SelectionDAG should be responsible for
/// determining it.
virtual MVT getOptimalMemOpType(uint64_t Size, unsigned Align,
bool isSrcConst, bool isSrcStr) const {
bool isSrcConst, bool isSrcStr,
SelectionDAG &DAG) const {
return MVT::iAny;
}

View File

@@ -73,12 +73,6 @@ namespace llvm {
/// target FP instructions.
extern bool UseSoftFloat;
/// NoImplicitFloat - This flag is enabled when the -no-implicit-float flag is
/// specified on the command line. When this flag is on, the code generator
/// won't generate any implicit floating point instructions. I.e., no XMM or
/// x87 or vectorized memcpy/memmove instructions. This is for X86 only.
extern bool NoImplicitFloat;
/// NoZerosInBSS - By default some codegens place zero-initialized data to
/// .bss section. This flag disables such behaviour (necessary, e.g. for
/// crt*.o compiling).