diff options
Diffstat (limited to 'include/llvm/Target/TargetLowering.h')
-rw-r--r-- | include/llvm/Target/TargetLowering.h | 57 |
1 files changed, 29 insertions, 28 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index 1786bd2..d5c9ebe 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -135,6 +135,11 @@ public: const TargetLoweringObjectFile *TLOF); virtual ~TargetLoweringBase(); +protected: + /// \brief Initialize all of the actions to default values. + void initActions(); + +public: const TargetMachine &getTargetMachine() const { return TM; } const DataLayout *getDataLayout() const { return TD; } const TargetLoweringObjectFile &getObjFileLowering() const { return TLOF; } @@ -805,13 +810,6 @@ public: return PrefLoopAlignment; } - /// getShouldFoldAtomicFences - return whether the combiner should fold - /// fence MEMBARRIER instructions into the atomic intrinsic instructions. - /// - bool getShouldFoldAtomicFences() const { - return ShouldFoldAtomicFences; - } - /// getInsertFencesFor - return whether the DAG builder should automatically /// insert fences and reduce ordering for atomics. /// @@ -851,6 +849,9 @@ public: // the derived class constructor to configure this object for the target. // + /// \brief Reset the operation actions based on target options. + virtual void resetOperationActions() {} + protected: /// setBooleanContents - Specify how the target extends the result of a /// boolean value from i1 to a wider type. See getBooleanContents. @@ -951,13 +952,17 @@ protected: RegClassForVT[VT.SimpleTy] = RC; } - /// clearRegisterClasses - remove all register classes + /// clearRegisterClasses - Remove all register classes. void clearRegisterClasses() { - for (unsigned i = 0 ; i<array_lengthof(RegClassForVT); i++) - RegClassForVT[i] = 0; + memset(RegClassForVT, 0,MVT::LAST_VALUETYPE * sizeof(TargetRegisterClass*)); + AvailableRegClasses.clear(); } + /// \brief Remove all operation actions. + void clearOperationActions() { + } + /// findRepresentativeClass - Return the largest legal super-reg register class /// of the register class for the specified type and its associated "cost". virtual std::pair<const TargetRegisterClass*, uint8_t> @@ -1089,12 +1094,6 @@ protected: MinStackArgumentAlignment = Align; } - /// setShouldFoldAtomicFences - Set if the target's implementation of the - /// atomic operation intrinsics includes locking. Default is false. - void setShouldFoldAtomicFences(bool fold) { - ShouldFoldAtomicFences = fold; - } - /// setInsertFencesForAtomic - Set if the DAG builder should /// automatically insert fences and reduce the order of atomic memory /// operations to Monotonic. @@ -1352,11 +1351,6 @@ private: /// unsigned PrefLoopAlignment; - /// ShouldFoldAtomicFences - Whether fencing MEMBARRIER instructions should - /// be folded into the enclosed atomic intrinsic instruction by the - /// combiner. - bool ShouldFoldAtomicFences; - /// InsertFencesForAtomic - Whether the DAG builder should automatically /// insert fences and reduce ordering for atomics. (This will be set for /// for most architectures with weak memory ordering.) @@ -1511,6 +1505,7 @@ public: // or until the element integer type is too big. If a legal type was not // found, fallback to the usual mechanism of widening/splitting the // vector. + EVT OldEltVT = EltVT; while (1) { // Increase the bitwidth of the element to the next pow-of-two // (which is greater than 8 bits). @@ -1529,6 +1524,10 @@ public: return LegalizeKind(TypePromoteInteger, EVT::getVectorVT(Context, EltVT, NumElts)); } + + // Reset the type to the unexpanded type if we did not find a legal vector + // type with a promoted vector element type. + EltVT = OldEltVT; } // Try to widen the vector until a legal type is found. @@ -1893,16 +1892,18 @@ public: struct ArgListEntry { SDValue Node; Type* Ty; - bool isSExt : 1; - bool isZExt : 1; - bool isInReg : 1; - bool isSRet : 1; - bool isNest : 1; - bool isByVal : 1; + bool isSExt : 1; + bool isZExt : 1; + bool isInReg : 1; + bool isSRet : 1; + bool isNest : 1; + bool isByVal : 1; + bool isReturned : 1; uint16_t Alignment; ArgListEntry() : isSExt(false), isZExt(false), isInReg(false), - isSRet(false), isNest(false), isByVal(false), Alignment(0) { } + isSRet(false), isNest(false), isByVal(false), isReturned(false), + Alignment(0) { } }; typedef std::vector<ArgListEntry> ArgListTy; |