diff options
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/CodeGen/LiveDebugVariables.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/CodeGen/SafeStack.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/CodeGen/TargetPassConfig.cpp | 6 |
4 files changed, 3 insertions, 15 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp index d5a4e891ce6..d13b1a53f61 100644 --- a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp +++ b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp @@ -1855,12 +1855,10 @@ LegalizerHelper::fewerElementsVectorMultiEltType( LLT DstTy = MRI.getType(DstReg); LLT LeftoverTy0; - int NumParts, NumLeftover; // All of the operands need to have the same number of elements, so if we can // determine a type breakdown for the result type, we can for all of the // source types. - std::tie(NumParts, NumLeftover) - = getNarrowTypeBreakDown(DstTy, NarrowTy0, LeftoverTy0); + int NumParts = getNarrowTypeBreakDown(DstTy, NarrowTy0, LeftoverTy0).first; if (NumParts < 0) return UnableToLegalize; diff --git a/llvm/lib/CodeGen/LiveDebugVariables.cpp b/llvm/lib/CodeGen/LiveDebugVariables.cpp index 4256edeedd3..656ec7d4bdf 100644 --- a/llvm/lib/CodeGen/LiveDebugVariables.cpp +++ b/llvm/lib/CodeGen/LiveDebugVariables.cpp @@ -740,10 +740,8 @@ void UserValue::extendDef(SlotIndex Idx, DbgValueLocation Loc, LiveRange *LR, } // Limited by the next def. - if (I.valid() && I.start() < Stop) { + if (I.valid() && I.start() < Stop) Stop = I.start(); - ToEnd = false; - } // Limited by VNI's live range. else if (!ToEnd && Kills) Kills->push_back(Stop); diff --git a/llvm/lib/CodeGen/SafeStack.cpp b/llvm/lib/CodeGen/SafeStack.cpp index 6ee5df42407..a6bc7330e2c 100644 --- a/llvm/lib/CodeGen/SafeStack.cpp +++ b/llvm/lib/CodeGen/SafeStack.cpp @@ -587,10 +587,6 @@ Value *SafeStack::moveStaticAllocasToUnsafeStack( IRB.SetInsertPoint(AI); unsigned Offset = SSL.getObjectOffset(AI); - uint64_t Size = getStaticAllocaAllocationSize(AI); - if (Size == 0) - Size = 1; // Don't create zero-sized stack objects. - replaceDbgDeclareForAlloca(AI, BasePointer, DIB, DIExpression::ApplyOffset, -Offset); replaceDbgValueForAlloca(AI, BasePointer, DIB, -Offset); diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp index 98b4742be1c..36df02692f8 100644 --- a/llvm/lib/CodeGen/TargetPassConfig.cpp +++ b/llvm/lib/CodeGen/TargetPassConfig.cpp @@ -1046,12 +1046,8 @@ defaultRegAlloc("default", useDefaultRegisterAllocator); static void initializeDefaultRegisterAllocatorOnce() { - RegisterRegAlloc::FunctionPassCtor Ctor = RegisterRegAlloc::getDefault(); - - if (!Ctor) { - Ctor = RegAlloc; + if (!RegisterRegAlloc::getDefault()) RegisterRegAlloc::setDefault(RegAlloc); - } } /// Instantiate the default register allocator pass for this target for either |