diff options
author | Chris Lattner <sabre@nondot.org> | 2010-08-25 23:00:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-08-25 23:00:45 +0000 |
commit | 6bf2478e21ef37dd8e11229ca8605998927e699f (patch) | |
tree | dae7cdcfc6e656584c51ad82ca5a39b56975eb2a /include | |
parent | 2491aa0b844f5271cd5076d543890a38bc69e1f1 (diff) | |
download | external_llvm-6bf2478e21ef37dd8e11229ca8605998927e699f.zip external_llvm-6bf2478e21ef37dd8e11229ca8605998927e699f.tar.gz external_llvm-6bf2478e21ef37dd8e11229ca8605998927e699f.tar.bz2 |
remove some llvmcontext arguments that are now dead post-refactoring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112104 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Target/TargetLowering.h | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index 0dc9d4e..5e95e13 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -251,11 +251,6 @@ public: std::fill(ValueTypeActions, array_endof(ValueTypeActions), 0); } - /// FIXME: This Context argument is now dead, zap it. - LegalizeAction getTypeAction(LLVMContext &Context, EVT VT) const { - return getTypeAction(VT); - } - LegalizeAction getTypeAction(EVT VT) const { if (!VT.isExtended()) return getTypeAction(VT.getSimpleVT()); @@ -281,8 +276,8 @@ public: /// it is already legal (return 'Legal') or we need to promote it to a larger /// type (return 'Promote'), or we need to expand it into multiple registers /// of smaller integer type (return 'Expand'). 'Custom' is not an option. - LegalizeAction getTypeAction(LLVMContext &Context, EVT VT) const { - return ValueTypeActions.getTypeAction(Context, VT); + LegalizeAction getTypeAction(EVT VT) const { + return ValueTypeActions.getTypeAction(VT); } /// getTypeToTransformTo - For types supported by the target, this is an @@ -296,7 +291,7 @@ public: assert((unsigned)VT.getSimpleVT().SimpleTy < array_lengthof(TransformToType)); EVT NVT = TransformToType[VT.getSimpleVT().SimpleTy]; - assert(getTypeAction(Context, NVT) != Promote && + assert(getTypeAction(NVT) != Promote && "Promote may not follow Expand or Promote"); return NVT; } @@ -311,17 +306,16 @@ public: EltVT : EVT::getVectorVT(Context, EltVT, NumElts / 2); } // Promote to a power of two size, avoiding multi-step promotion. - return getTypeAction(Context, NVT) == Promote ? + return getTypeAction(NVT) == Promote ? getTypeToTransformTo(Context, NVT) : NVT; } else if (VT.isInteger()) { EVT NVT = VT.getRoundIntegerType(Context); - if (NVT == VT) - // Size is a power of two - expand to half the size. + if (NVT == VT) // Size is a power of two - expand to half the size. return EVT::getIntegerVT(Context, VT.getSizeInBits() / 2); - else - // Promote to a power of two size, avoiding multi-step promotion. - return getTypeAction(Context, NVT) == Promote ? - getTypeToTransformTo(Context, NVT) : NVT; + + // Promote to a power of two size, avoiding multi-step promotion. + return getTypeAction(NVT) == Promote ? + getTypeToTransformTo(Context, NVT) : NVT; } assert(0 && "Unsupported extended type!"); return MVT(MVT::Other); // Not reached @@ -334,7 +328,7 @@ public: EVT getTypeToExpandTo(LLVMContext &Context, EVT VT) const { assert(!VT.isVector()); while (true) { - switch (getTypeAction(Context, VT)) { + switch (getTypeAction(VT)) { case Legal: return VT; case Expand: |