diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -3101,7 +3101,6 @@ CommandObject *cmd_obj = nullptr; StreamString revised_command_line; bool wants_raw_input = false; - size_t actual_cmd_name_len = 0; std::string next_word; StringList matches; bool done = false; @@ -3123,12 +3122,10 @@ revised_command_line.Printf("%s", alias_result.c_str()); if (cmd_obj) { wants_raw_input = cmd_obj->WantsRawCommandString(); - actual_cmd_name_len = cmd_obj->GetCommandName().size(); } } else { if (cmd_obj) { llvm::StringRef cmd_name = cmd_obj->GetCommandName(); - actual_cmd_name_len += cmd_name.size(); revised_command_line.Printf("%s", cmd_name.str().c_str()); wants_raw_input = cmd_obj->WantsRawCommandString(); } else { @@ -3143,7 +3140,6 @@ // The subcommand's name includes the parent command's name, so // restart rather than append to the revised_command_line. llvm::StringRef sub_cmd_name = sub_cmd_obj->GetCommandName(); - actual_cmd_name_len = sub_cmd_name.size() + 1; revised_command_line.Clear(); revised_command_line.Printf("%s", sub_cmd_name.str().c_str()); cmd_obj = sub_cmd_obj; diff --git a/lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc.cpp b/lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc.cpp --- a/lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc.cpp +++ b/lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc.cpp @@ -683,8 +683,6 @@ r3_value.GetData(r3_data); rdx_value.GetData(rdx_data); - uint32_t fp_bytes = - 0; // Tracks how much of the xmm registers we've consumed so far uint32_t integer_bytes = 0; // Tracks how much of the r3/rds registers we've consumed so far @@ -751,7 +749,6 @@ break; } else if (*field_bit_width == 64) { copy_from_offset = 0; - fp_bytes += field_byte_width; } else if (*field_bit_width == 32) { // This one is kind of complicated. If we are in an "eightbyte" // with another float, we'll be stuffed into an xmm register with @@ -815,8 +812,6 @@ copy_from_offset = integer_bytes - 8; integer_bytes += field_byte_width; } - } else { - fp_bytes += field_byte_width; } } } diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp @@ -339,8 +339,6 @@ if (!objc_module_sp) return; - uint32_t isa_count = 0; - lldb::addr_t hash_table_ptr = GetISAHashTablePointer(); if (hash_table_ptr != LLDB_INVALID_ADDRESS) { // Read the NXHashTable struct: @@ -383,8 +381,6 @@ if (bucket_isa_count == 0) continue; - isa_count += bucket_isa_count; - ObjCISA isa; if (bucket_isa_count == 1) { // When we only have one entry in the bucket, the bucket data diff --git a/llvm/lib/Target/AArch64/GISel/AArch64PostSelectOptimize.cpp b/llvm/lib/Target/AArch64/GISel/AArch64PostSelectOptimize.cpp --- a/llvm/lib/Target/AArch64/GISel/AArch64PostSelectOptimize.cpp +++ b/llvm/lib/Target/AArch64/GISel/AArch64PostSelectOptimize.cpp @@ -180,7 +180,7 @@ bool Changed = false; for (auto &BB : MF) Changed |= optimizeNZCVDefs(BB); - return true; + return Changed; } char AArch64PostSelectOptimize::ID = 0; diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp --- a/llvm/lib/Target/ARM/ARMISelLowering.cpp +++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp @@ -6861,12 +6861,10 @@ return SDValue(); // NEON has a 64-bit VMOV splat where each byte is either 0 or 0xff. uint64_t BitMask = 0xff; - uint64_t Val = 0; unsigned ImmMask = 1; Imm = 0; for (int ByteNum = 0; ByteNum < 8; ++ByteNum) { if (((SplatBits | SplatUndef) & BitMask) == BitMask) { - Val |= BitMask; Imm |= ImmMask; } else if ((SplatBits & BitMask) != 0) { return SDValue(); diff --git a/llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp b/llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp --- a/llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp +++ b/llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp @@ -1227,7 +1227,7 @@ if (LoLoop.Preheader) LoLoop.Start = SearchForStart(LoLoop.Preheader); else - return false; + return Changed; // Find the low-overhead loop components and decide whether or not to fall // back to a normal loop. Also look for a vctp instructions and decide @@ -1261,7 +1261,7 @@ LLVM_DEBUG(LoLoop.dump()); if (!LoLoop.FoundAllComponents()) { LLVM_DEBUG(dbgs() << "ARM Loops: Didn't find loop start, update, end\n"); - return false; + return Changed; } assert(LoLoop.Start->getOpcode() != ARM::t2WhileLoopStart && diff --git a/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp b/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp --- a/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp +++ b/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp @@ -415,5 +415,5 @@ } BlockSizes.clear(); - return true; + return EverMadeChange; } diff --git a/llvm/lib/Target/X86/X86FloatingPoint.cpp b/llvm/lib/Target/X86/X86FloatingPoint.cpp --- a/llvm/lib/Target/X86/X86FloatingPoint.cpp +++ b/llvm/lib/Target/X86/X86FloatingPoint.cpp @@ -1526,7 +1526,7 @@ // Scan the assembly for ST registers used, defined and clobbered. We can // only tell clobbers from defs by looking at the asm descriptor. - unsigned STUses = 0, STDefs = 0, STClobbers = 0, STDeadDefs = 0; + unsigned STUses = 0, STDefs = 0, STClobbers = 0; unsigned NumOps = 0; SmallSet FRegIdx; unsigned RCID; @@ -1559,8 +1559,6 @@ case InlineAsm::Kind_RegDef: case InlineAsm::Kind_RegDefEarlyClobber: STDefs |= (1u << STReg); - if (MO.isDead()) - STDeadDefs |= (1u << STReg); break; case InlineAsm::Kind_Clobber: STClobbers |= (1u << STReg); diff --git a/llvm/utils/benchmark/src/complexity.cc b/llvm/utils/benchmark/src/complexity.cc --- a/llvm/utils/benchmark/src/complexity.cc +++ b/llvm/utils/benchmark/src/complexity.cc @@ -76,7 +76,6 @@ LeastSq MinimalLeastSq(const std::vector& n, const std::vector& time, BigOFunc* fitting_curve) { - double sigma_gn = 0.0; double sigma_gn_squared = 0.0; double sigma_time = 0.0; double sigma_time_gn = 0.0; @@ -84,7 +83,6 @@ // Calculate least square fitting parameter for (size_t i = 0; i < n.size(); ++i) { double gn_i = fitting_curve(n[i]); - sigma_gn += gn_i; sigma_gn_squared += gn_i * gn_i; sigma_time += time[i]; sigma_time_gn += time[i] * gn_i;