instruction
string
input
string
output
string
file_paths
list
commit_hash
string
author
string
author_date
timestamp[s]
task_type
string
Refactor the following code in files: lldb/source/Plugins/SymbolFile/NativePDB/PdbSymUid.h, lldb/source/Plugins/SymbolFile/NativePDB/PdbSymUid.cpp: Remove uses of cantFail in AST builder. Refactoring description: As a continuation of #187158, this removes uses of `llvm::cantFail` and replaces them with logs and early ...
PdbFieldListMemberId PdbSymUid::asFieldListMember() const { assert(kind() == PdbSymUidKind::FieldListMember); auto repr = repr_cast<FieldListMemberIdRepr>(m_repr); PdbFieldListMemberId result; result.index.setIndex(repr.index); result.offset = repr.offset; return result; } /* --- separate code section --- ...
PdbFieldListMemberId PdbSymUid::asFieldListMember() const { assert(kind() == PdbSymUidKind::FieldListMember); auto repr = repr_cast<FieldListMemberIdRepr>(m_repr); PdbFieldListMemberId result; result.index.setIndex(repr.index); result.offset = repr.offset; return result; } /* --- separate code section --- ...
[ "lldb/source/Plugins/SymbolFile/NativePDB/PdbSymUid.h", "lldb/source/Plugins/SymbolFile/NativePDB/PdbSymUid.cpp" ]
1d84916abda575472652611ae4cedafc50433b3c
Nerixyz
2026-06-08T00:00:00
code_modification
Refactor the following code in lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilderClang.cpp: Remove uses of cantFail in AST builder. Refactoring description: As a continuation of #187158, this removes uses of `llvm::cantFail` and replaces them with logs and early returns. The motivation for this is the PDB of the ...
llvm::Error visitKnownMember(CVMemberRecord &cvr, OverloadedMethodRecord &overloaded) override { TypeIndex method_list_idx = overloaded.MethodList; CVType method_list_type = m_index.tpi().getType(method_list_idx); assert(method_list_type.kind() == LF_METHODLIST); Metho...
llvm::Error visitKnownMember(CVMemberRecord &cvr, OverloadedMethodRecord &overloaded) override { TypeIndex method_list_idx = overloaded.MethodList; CVType method_list_type = m_index.tpi().getType(method_list_idx); assert(method_list_type.kind() == LF_METHODLIST); Metho...
[ "lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilderClang.cpp" ]
1d84916abda575472652611ae4cedafc50433b3c
Nerixyz
2026-06-08T00:00:00
code_modification
Refactor the following code in llvm/lib/Transforms/Vectorize/VPlan.h: Rename VPIRFlags::getFastMathFlags (NFC). Refactoring description: Rename it to getFastMathFlagsOrNone, in line with the recently-landed IR change 02997d759 ([IR] Introduce Instruction::getFastMathFlagsOrNone, #200457). Output the complete correcte...
VPReductionRecipe *clone() override { return new VPReductionRecipe(RdxKind, getFastMathFlags(), getUnderlyingInstr(), getChainOp(), getVecOp(), getCondOp(), Style, getDebugLoc()); }
VPReductionRecipe *clone() override { return new VPReductionRecipe(RdxKind, getFastMathFlagsOrNone(), getUnderlyingInstr(), getChainOp(), getVecOp(), getCondOp(), Style, getDebugLoc()); }
[ "llvm/lib/Transforms/Vectorize/VPlan.h" ]
f5fed78bbe847f7c02fd69c6f33a0f916c8fdadb
Ramkumar Ramachandra
2026-06-08T00:00:00
code_modification
Refactor the following code in llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp: Rename VPIRFlags::getFastMathFlags (NFC). Refactoring description: Rename it to getFastMathFlagsOrNone, in line with the recently-landed IR change 02997d759 ([IR] Introduce Instruction::getFastMathFlagsOrNone, #200457). Output the complete...
void VPIRFlags::intersectFlags(const VPIRFlags &Other) { assert(OpType == Other.OpType && "OpType must match"); switch (OpType) { case OperationType::OverflowingBinOp: WrapFlags.HasNUW &= Other.WrapFlags.HasNUW; WrapFlags.HasNSW &= Other.WrapFlags.HasNSW; break; case OperationType::Trunc: TruncF...
void VPIRFlags::intersectFlags(const VPIRFlags &Other) { assert(OpType == Other.OpType && "OpType must match"); switch (OpType) { case OperationType::OverflowingBinOp: WrapFlags.HasNUW &= Other.WrapFlags.HasNUW; WrapFlags.HasNSW &= Other.WrapFlags.HasNSW; break; case OperationType::Trunc: TruncF...
[ "llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp" ]
f5fed78bbe847f7c02fd69c6f33a0f916c8fdadb
Ramkumar Ramachandra
2026-06-08T00:00:00
code_modification
Refactor the following code in llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp: Rename VPIRFlags::getFastMathFlags (NFC). Refactoring description: Rename it to getFastMathFlagsOrNone, in line with the recently-landed IR change 02997d759 ([IR] Introduce Instruction::getFastMathFlagsOrNone, #200457). Output the compl...
/* --- 107 lines before modification point omitted --- */ // Lower MaskedCond with block mask to LogicalAnd. if (match(&R, m_VPInstruction<VPInstruction::MaskedCond>())) { auto *VPI = cast<VPInstruction>(&R); assert(VPI->isMasked() && "Unmasked MaskedCond should be simplified ...
/* --- 107 lines before modification point omitted --- */ // Lower MaskedCond with block mask to LogicalAnd. if (match(&R, m_VPInstruction<VPInstruction::MaskedCond>())) { auto *VPI = cast<VPInstruction>(&R); assert(VPI->isMasked() && "Unmasked MaskedCond should be simplified ...
[ "llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp" ]
f5fed78bbe847f7c02fd69c6f33a0f916c8fdadb
Ramkumar Ramachandra
2026-06-08T00:00:00
code_modification
Fix the following bug in llvm/lib/BinaryFormat/DXContainer.cpp: Write DXIL with debug info to ILDB part. Problem description: This patch writes bitcode with debug info to ILDB part, then strips that bitcode from all debug info and writes it to DXIL part. Note: as of now, `StripDebugInfo` doesn't remove all the debug ...
bool ShaderHash::isPopulated() { static uint8_t Zeros[16] = {0}; return Flags > 0 || 0 != memcmp(&Digest, &Zeros, 16); }
bool dxbc::isProgramPart(StringRef PartName) { return PartName == "DXIL" || PartName == "ILDB"; }
[ "llvm/lib/BinaryFormat/DXContainer.cpp" ]
76699bcfc8af5ef44d7e725de68f6c2339230f9f
Ilia Kuklin
2026-06-08T00:00:00
code_modification
Implement the following feature in llvm/lib/Target/X86/X86InstCombineIntrinsic.cpp: Fold add(vpmadd52(0, a, b), x) -> vpmadd52(x, a, b). Feature description: vpmadd52 computes acc + P(a, b) mod 2^64 where P is independent of acc so add(vpmadd52(0, a, b), x) = vpmadd52(x, a, b). Applies to all six vpmadd52{h,l}.uq.{12...
/* --- 247 lines before modification point omitted --- */ case Intrinsic::x86_avx2_pmulh_w: case Intrinsic::x86_avx512_pmulh_w_512: if (Value *V = simplifyX86pmulh(II, IC.Builder, true, false)) { return IC.replaceInstUsesWith(II, V); } break; case Intrinsic::x86_sse2_pmulhu_w: case Intrinsic::x86_avx2_pmulhu...
/* --- 247 lines before modification point omitted --- */ case Intrinsic::x86_ssse3_pmul_hr_sw_128: case Intrinsic::x86_avx2_pmul_hr_sw: case Intrinsic::x86_avx512_pmul_hr_sw_512: if (Value *V = simplifyX86pmulh(II, IC.Builder, true, true)) { return IC.replaceInstUsesWith(II, V); } break; case Intrinsic::x86...
[ "llvm/lib/Target/X86/X86InstCombineIntrinsic.cpp" ]
8c1a55cb738580858b0870e04884b2e323f38484
Adam Scott
2026-06-08T00:00:00
code_modification
Fix the following bug in files: clang/include/clang/Sema/DeclSpec.h, clang/lib/Sema/DeclSpec.cpp: fix crash of invalid friend declaration with storage-class specifier. Fix strategy: add assertion Problem description: Fix an assertion failure in Sema::ActOnFriendTypeDecl when parsing an invalid friend type declaration...
/* --- 669 lines before modification point omitted --- */ void takeAttributesAppendingingFrom(ParsedAttributes &attrs) { Attrs.takeAllAppendingFrom(attrs); } /// Finish - This does final analysis of the declspec, issuing diagnostics for /// things like "_Complex" (lacking an FP type). After calling this ...
/* --- 669 lines before modification point omitted --- */ const ParsedAttributes &getAttributes() const { return Attrs; } void takeAttributesAppendingingFrom(ParsedAttributes &attrs) { Attrs.takeAllAppendingFrom(attrs); } /// Finish - This does final analysis of the declspec, issuing diagnostics for ///...
[ "clang/include/clang/Sema/DeclSpec.h", "clang/lib/Sema/DeclSpec.cpp" ]
55611deca57a0843cbfceca50ccbdfa9e1a3bf84
firstmoonlight
2026-06-08T00:00:00
code_modification
Refactor the following code in lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp: Use batched string reading in ClassDescriptorV2::ivar_t::Read. Output the complete corrected function(s).
llvm::Expected<ClassDescriptorV2::ivar_t> ClassDescriptorV2::ivar_t::Read(Process *process, lldb::addr_t addr) { size_t size = GetSize(process); DataBufferHeap buffer(size, '\0'); Status error; process->ReadMemory(addr, buffer.GetBytes(), size, error); if (error.Fail()) return error.takeError(); DataExtractor extr...
llvm::Expected<ClassDescriptorV2::ivar_t> ClassDescriptorV2::ivar_t::Read(Process *process, lldb::addr_t addr) { size_t size = GetSize(process); DataBufferHeap buffer(size, '\0'); Status error; process->ReadMemory(addr, buffer.GetBytes(), size, error); if (error.Fail()) return error.takeError(); DataExtractor extr...
[ "lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp" ]
87c5364aeffd3dca0e9231ff9904c799ea003626
Felipe de Azevedo Piovezan
2026-06-08T00:00:00
code_modification
Implement the following feature in llvm/lib/Transforms/IPO/ArgumentPromotion.cpp: Pass context instruction to dereferenceability check. Feature description: This is necessary for argument promotion to work under deref-at-point semantics. For the primary case, specify the context instruction as the first instruction in...
static bool allCallersPassValidPointerForArgument( Argument *Arg, SmallPtrSetImpl<CallBase *> &RecursiveCalls, Align NeededAlign, uint64_t NeededDerefBytes) { Function *Callee = Arg->getParent(); const DataLayout &DL = Callee->getDataLayout(); APInt Bytes(64, NeededDerefBytes); // Check if the argument itself is m...
static bool allCallersPassValidPointerForArgument( Argument *Arg, SmallPtrSetImpl<CallBase *> &RecursiveCalls, Align NeededAlign, uint64_t NeededDerefBytes) { Function *Callee = Arg->getParent(); const DataLayout &DL = Callee->getDataLayout(); APInt Bytes(64, NeededDerefBytes); // Check if the argument itself is m...
[ "llvm/lib/Transforms/IPO/ArgumentPromotion.cpp" ]
91797152d96713a46f4ca604d191f144cbb48659
Nikita Popov
2026-06-08T00:00:00
code_modification
Implement the following feature in files: llvm/include/llvm/Analysis/Loads.h, llvm/lib/Analysis/Loads.cpp: Always pass down context in isSafeToLoadUnconditionally(). Feature description: There is context-sensitive reasoning we can perform without a dominator tree -- it doesn't make sense to drop the context instructio...
bool llvm::mustSuppressSpeculation(const LoadInst &LI) { return !LI.isUnordered() || suppressSpeculativeLoadForSanitizers(LI); } /* --- separate code section --- */ bool llvm::isSafeToLoadUnconditionally(Value *V, Align Alignment, const APInt &Size, const DataLayout &DL, ...
bool llvm::mustSuppressSpeculation(const LoadInst &LI) { return !LI.isUnordered() || suppressSpeculativeLoadForSanitizers(LI); } /* --- separate code section --- */ bool llvm::isSafeToLoadUnconditionally(Value *V, Align Alignment, const APInt &Size, const DataLayout &DL, ...
[ "llvm/include/llvm/Analysis/Loads.h", "llvm/lib/Analysis/Loads.cpp" ]
7893defd8b56e70ebad4eaf79a1f14caf4a9d1d1
Nikita Popov
2026-06-08T00:00:00
code_modification
Implement the following feature in llvm/lib/Analysis/ValueTracking.cpp: Always pass down context in isSafeToLoadUnconditionally(). Feature description: There is context-sensitive reasoning we can perform without a dominator tree -- it doesn't make sense to drop the context instruction just because there is no DT. Als...
bool llvm::willNotFreeBetween(const Instruction *Assume, const Instruction *CtxI) { // Helper to check if there are any calls in the range that may free memory. auto hasNoFreeInRange = [](auto Range) { for (const auto &[Idx, I] : enumerate(Range)) { if (Idx > MaxInstrsToCheck...
bool llvm::willNotFreeBetween(const Instruction *Assume, const Instruction *CtxI) { // Helper to check if there are any calls in the range that may free memory. auto hasNoFreeInRange = [](auto Range) { for (const auto &[Idx, I] : enumerate(Range)) { if (Idx > MaxInstrsToCheck...
[ "llvm/lib/Analysis/ValueTracking.cpp" ]
7893defd8b56e70ebad4eaf79a1f14caf4a9d1d1
Nikita Popov
2026-06-08T00:00:00
code_modification
Implement the following feature in llvm/lib/Target/AMDGPU/SIInstrInfo.cpp: AMDGPU/UniformityAnalysis: MIR Uniformity analysis for INLINEASM. Feature description: If any of the defs are divergent, need to report instruction as NeverUniform so that isUniformReg can calculate uniformity for each def. Output the complete...
ValueUniformity SIInstrInfo::getValueUniformity(const MachineInstr &MI) const { if (isNeverUniform(MI)) return ValueUniformity::NeverUniform; unsigned opcode = MI.getOpcode(); if (opcode == AMDGPU::V_READLANE_B32 || opcode == AMDGPU::V_READFIRSTLANE_B32 || opcode == AMDGPU::SI_RESTORE_S32_FROM_V...
ValueUniformity SIInstrInfo::getValueUniformity(const MachineInstr &MI) const { if (isNeverUniform(MI)) return ValueUniformity::NeverUniform; unsigned opcode = MI.getOpcode(); if (opcode == AMDGPU::V_READLANE_B32 || opcode == AMDGPU::V_READFIRSTLANE_B32 || opcode == AMDGPU::SI_RESTORE_S32_FROM_V...
[ "llvm/lib/Target/AMDGPU/SIInstrInfo.cpp" ]
aeb1a462a02c48b61faa3d0af5f505dec00b0b4e
Petar Avramovic
2026-06-08T00:00:00
code_modification
Implement the following feature in llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp: AMDGPU/GlobalISel: RegBankLegalize rules for v_pk_add/mul_f32. Output the complete corrected code snippet(s).
/* --- 1 lines before modification point omitted --- */ .Uni(B32, {{UniInVgprB32}, {SgprV4S32_WF, Vgpr32, Vgpr32, Sgpr32_WF}}) .Div(B64, {{VgprB64}, {SgprV4S32_WF, Vgpr32, Vgpr32, Sgpr32_WF}}) .Uni(B64, {{UniInVgprB64}, {SgprV4S32_WF, Vgpr32, Vgpr32, Sgpr32_WF}}) .Div(B128, {{VgprB128}, {SgprV4S32_WF, V...
/* --- 1 lines before modification point omitted --- */ .Div(B64, {{VgprB64}, {SgprV4S32_WF, Vgpr32, Vgpr32, Sgpr32_WF}}) .Uni(B64, {{UniInVgprB64}, {SgprV4S32_WF, Vgpr32, Vgpr32, Sgpr32_WF}}) .Div(B128, {{VgprB128}, {SgprV4S32_WF, Vgpr32, Vgpr32, Sgpr32_WF}}) .Uni(B128, {{UniInVgprB128}, {SgprV4S32_WF,...
[ "llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp" ]
c61fd0cf42352468b5e433e91a6b9a40530f9e94
Petar Avramovic
2026-06-08T00:00:00
code_modification
Refactor the following code in llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeHelper.cpp: AMDGPU/GlobalISel: RegBankLegalize rules for cvt_scale intrinsics. Output the complete corrected function(s).
LLT RegBankLegalizeHelper::getTyFromID(RegBankLLTMappingApplyID ID) { switch (ID) { case Vcc: case UniInVcc: return LLT::scalar(1); case Sgpr16: case Vgpr16: case UniInVgprS16: return LLT::scalar(16); case Sgpr32: case Sgpr32_WF: case Sgpr32Trunc: case Sgpr32AExt: case Sgpr32AExtBoolInReg:...
LLT RegBankLegalizeHelper::getTyFromID(RegBankLLTMappingApplyID ID) { switch (ID) { case Vcc: case UniInVcc: return LLT::scalar(1); case Sgpr16: case Vgpr16: case UniInVgprS16: return LLT::scalar(16); case Sgpr32: case Sgpr32_WF: case Sgpr32Trunc: case Sgpr32AExt: case Sgpr32AExtBoolInReg:...
[ "llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeHelper.cpp" ]
3c49429089efff48e3e1fce53682e6a954ee4cbd
Petar Avramovic
2026-06-08T00:00:00
code_modification
Refactor the following code in llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeHelper.cpp: AMDGPU/GlobalISel: RegBankLegalize rules for cvt_scale intrinsics. Output the complete corrected function(s).
const RegisterBank * RegBankLegalizeHelper::getRegBankFromID(RegBankLLTMappingApplyID ID) { switch (ID) { case Vcc: return VccRB; case Sgpr16: case Sgpr32: case Sgpr32_WF: case Sgpr64: case Sgpr128: case SgprP0: case SgprP0Call_WF: case SgprP1: case SgprP2: case SgprP3: case SgprP4: case...
const RegisterBank * RegBankLegalizeHelper::getRegBankFromID(RegBankLLTMappingApplyID ID) { switch (ID) { case Vcc: return VccRB; case Sgpr16: case Sgpr32: case Sgpr32_WF: case Sgpr64: case Sgpr128: case SgprP0: case SgprP0Call_WF: case SgprP1: case SgprP2: case SgprP3: case SgprP4: case...
[ "llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeHelper.cpp" ]
3c49429089efff48e3e1fce53682e6a954ee4cbd
Petar Avramovic
2026-06-08T00:00:00
code_modification
Implement the following feature in llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp: AMDGPU/GlobalISel: RegBankLegalize rules for 64 bit s_min/max and u_min/max. Output the complete corrected code snippet(s).
/* --- 71 lines before modification point omitted --- */ addRulesForGOpcs({G_XOR, G_OR, G_AND}, StandardB) .Any({{UniS1}, {{Sgpr32Trunc}, {Sgpr32AExt, Sgpr32AExt}}}) .Any({{DivS1}, {{Vcc}, {Vcc, Vcc}}}) .Any({{UniS16}, {{Sgpr16}, {Sgpr16, Sgpr16}}}) .Any({{DivS16}, {{Vgpr16}, {Vgpr16, Vgpr16}...
/* --- 71 lines before modification point omitted --- */ .Uni(S16, {{Sgpr32Trunc}, {Sgpr32SExt, Sgpr32ZExt}}) .Div(S16, {{Vgpr16}, {Vgpr16, Vgpr16}}) .Uni(V2S16, {{SgprV2S16}, {SgprV2S16, SgprV2S16}, UnpackBitShift}) .Div(V2S16, {{VgprV2S16}, {VgprV2S16, VgprV2S16}}) .Uni(S32, {{Sgpr32}, {Sgpr32, Sg...
[ "llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp" ]
eae020b0e8f29071fd1eb192aac6d658d90874fe
Petar Avramovic
2026-06-08T00:00:00
code_modification
Implement the following feature in llvm/lib/Target/AMDGPU/GCNVOPDUtils.cpp: Cache results in a bitvector for VOPDPairingMutation. Feature description: With this change the code no longer checks `(I, J)` pair when it is known that `(_, J)` is not a valid VOPD instruction. The saving is achieved by precomputing `(_, Y)`...
void apply(ScheduleDAGInstrs *DAG) override { const TargetInstrInfo &TII = *DAG->TII; const GCNSubtarget &ST = DAG->MF.getSubtarget<GCNSubtarget>(); if (!AMDGPU::hasVOPD(ST) || !ST.isWave32()) { LLVM_DEBUG(dbgs() << "Target does not support VOPDPairingMutation\n"); return; } std::vector<SUnit>::itera...
void apply(ScheduleDAGInstrs *DAG) override { const TargetInstrInfo &TII = *DAG->TII; const GCNSubtarget &ST = DAG->MF.getSubtarget<GCNSubtarget>(); if (!AMDGPU::hasVOPD(ST) || !ST.isWave32()) { LLVM_DEBUG(dbgs() << "Target does not support VOPDPairingMutation\n"); return; } BitVector VOPDCapable(DAG...
[ "llvm/lib/Target/AMDGPU/GCNVOPDUtils.cpp" ]
d9012b6f605589ceb81b75298cda0bd38d309d81
Igor Wodiany
2026-06-08T00:00:00
code_modification
Implement the following feature in files: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h, lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp: Plumb interrupt_timeout through SendStdinNotification. Output the complete corrected function(s).
/* --- 263 lines before modification point omitted --- */ bool GetQXferLibrariesSVR4ReadSupported(); uint64_t GetRemoteMaxPacketSize(); bool GetEchoSupported(); bool GetQPassSignalsSupported(); bool GetAugmentedLibrariesSVR4ReadSupported(); bool GetQXferFeaturesReadSupported(); bool GetQXferMemoryMa...
/* --- 263 lines before modification point omitted --- */ bool GetQXferAuxvReadSupported(); void EnableErrorStringInPacket(); bool GetQXferLibrariesReadSupported(); bool GetQXferLibrariesSVR4ReadSupported(); uint64_t GetRemoteMaxPacketSize(); bool GetEchoSupported(); bool GetQPassSignalsSupported()...
[ "lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h", "lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp" ]
ff30f94035b465503b94dd807ca41a4adb8c85ec
Charles Zablit
2026-06-08T00:00:00
code_modification
Implement the following feature in lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp: Plumb interrupt_timeout through SendStdinNotification. Output the complete corrected function(s).
size_t ProcessGDBRemote::PutSTDIN(const char *src, size_t src_len, Status &error) { if (m_stdio_communication.IsConnected()) { ConnectionStatus status; m_stdio_communication.WriteAll(src, src_len, status, nullptr); } else if (m_stdin_forward) { m_gdb_comm.SendStdinNotif...
size_t ProcessGDBRemote::PutSTDIN(const char *src, size_t src_len, Status &error) { if (m_stdio_communication.IsConnected()) { ConnectionStatus status; m_stdio_communication.WriteAll(src, src_len, status, nullptr); } else if (m_stdin_forward) { m_gdb_comm.SendStdinNotif...
[ "lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp" ]
ff30f94035b465503b94dd807ca41a4adb8c85ec
Charles Zablit
2026-06-08T00:00:00
code_modification
Implement the following feature in lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp: Mark thread as stopped in RefreshStateAfterStop. Output the complete corrected function(s).
void TargetThreadWindows::RefreshStateAfterStop() { ::SuspendThread(m_host_thread.GetNativeThread().GetSystemHandle()); SetState(eStateStopped); GetRegisterContext()->InvalidateIfNeeded(false); } /* --- separate code section --- */ void TargetThreadWindows::WillResume(lldb::StateType resume_state) {}
void TargetThreadWindows::RefreshStateAfterStop() { ::SuspendThread(m_host_thread.GetNativeThread().GetSystemHandle()); GetRegisterContext()->InvalidateIfNeeded(false); } /* --- separate code section --- */ void TargetThreadWindows::WillResume(lldb::StateType resume_state) {}
[ "lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp" ]
300b2a53feb97fb0d52e8ff91d20347d195aea73
Charles Zablit
2026-06-08T00:00:00
code_modification
Implement the following feature in lldb/source/Target/ThreadList.cpp: Mark thread as stopped in RefreshStateAfterStop. Output the complete corrected function(s).
void ThreadList::RefreshStateAfterStop() { std::lock_guard<std::recursive_mutex> guard(GetMutex()); m_process.UpdateThreadListIfNeeded(); LLDB_LOGF_VERBOSE( GetLog(LLDBLog::Step), "Turning off notification of new threads while single stepping " "a thread."); collection::iterator pos, end = m_threads.end(...
void ThreadList::RefreshStateAfterStop() { std::lock_guard<std::recursive_mutex> guard(GetMutex()); m_process.UpdateThreadListIfNeeded(); LLDB_LOGF_VERBOSE( GetLog(LLDBLog::Step), "Turning off notification of new threads while single stepping " "a thread."); collection::iterator pos, end = m_threads.end(...
[ "lldb/source/Target/ThreadList.cpp" ]
300b2a53feb97fb0d52e8ff91d20347d195aea73
Charles Zablit
2026-06-08T00:00:00
code_modification
Refactor the following code in files: lldb/source/Plugins/Process/Linux/NativeThreadLinux.h, lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp: move m_stop_info and m_stop_description up a class. Refactoring description: Now that Windows also clears stale thread info on resume (https://github.com/llvm/llvm-proje...
class NativeThreadLinux : public NativeThreadProtocol { friend class NativeProcessLinux; public: NativeThreadLinux(NativeProcessLinux &process, lldb::tid_t tid); // NativeThreadProtocol Interface std::string GetName() override; lldb::StateType GetState() override; bool GetStopReason(ThreadStopInfo &stop...
class NativeThreadLinux : public NativeThreadProtocol { friend class NativeProcessLinux; public: NativeThreadLinux(NativeProcessLinux &process, lldb::tid_t tid); // NativeThreadProtocol Interface std::string GetName() override; lldb::StateType GetState() override; bool GetStopReason(ThreadStopInfo &stop...
[ "lldb/source/Plugins/Process/Linux/NativeThreadLinux.h", "lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp" ]
83be200f418f8581f30415b0315d105965a63727
Charles Zablit
2026-06-08T00:00:00
code_modification
Refactor the following code in files: lldb/source/Plugins/Process/Windows/Common/NativeThreadWindows.h, lldb/source/Plugins/Process/Windows/Common/NativeThreadWindows.cpp: move m_stop_info and m_stop_description up a class. Refactoring description: Now that Windows also clears stale thread info on resume (https://gith...
class NativeThreadWindows : public NativeThreadProtocol { public: NativeThreadWindows(NativeProcessWindows &process, const HostThread &thread); ~NativeThreadWindows() override = default; Status DoStop(); Status DoResume(lldb::StateType resume_state); std::string GetName() override; lldb::StateType GetSt...
class NativeThreadWindows : public NativeThreadProtocol { public: NativeThreadWindows(NativeProcessWindows &process, const HostThread &thread); ~NativeThreadWindows() override = default; Status DoStop(); Status DoResume(lldb::StateType resume_state); std::string GetName() override; lldb::StateType GetSt...
[ "lldb/source/Plugins/Process/Windows/Common/NativeThreadWindows.h", "lldb/source/Plugins/Process/Windows/Common/NativeThreadWindows.cpp" ]
83be200f418f8581f30415b0315d105965a63727
Charles Zablit
2026-06-08T00:00:00
code_modification
Refactor the following code in files: lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.h, lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp: move m_stop_info and m_stop_description up a class. Refactoring description: Now that Windows also clears stale thread info on resume (https://github.com/llvm/llvm-p...
class NativeThreadNetBSD : public NativeThreadProtocol { friend class NativeProcessNetBSD; public: NativeThreadNetBSD(NativeProcessNetBSD &process, lldb::tid_t tid); // NativeThreadProtocol Interface std::string GetName() override; lldb::StateType GetState() override; bool GetStopReason(ThreadStopInfo &...
class NativeThreadNetBSD : public NativeThreadProtocol { friend class NativeProcessNetBSD; public: NativeThreadNetBSD(NativeProcessNetBSD &process, lldb::tid_t tid); // NativeThreadProtocol Interface std::string GetName() override; lldb::StateType GetState() override; bool GetStopReason(ThreadStopInfo &...
[ "lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.h", "lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp" ]
83be200f418f8581f30415b0315d105965a63727
Charles Zablit
2026-06-08T00:00:00
code_modification
Fix the following bug in llvm/lib/Object/ELFObjectFile.cpp: Fix arch attribute mapping in ELFObjectFile. Problem description: hexagonAttrToFeatureString in ELFObjectFile.cpp used a hardcoded switch listing each supported Hexagon arch version. The switch was not kept in sync, so .hexagon.attributes entries for newer ve...
SubtargetFeatures ELFObjectFileBase::getARMFeatures() const { SubtargetFeatures Features; ARMAttributeParser Attributes; if (Error E = getBuildAttributes(Attributes)) { consumeError(std::move(E)); return SubtargetFeatures(); } // both ARMv7-M and R have to support thumb hardware div bool isV7 = fal...
SubtargetFeatures ELFObjectFileBase::getARMFeatures() const { SubtargetFeatures Features; ARMAttributeParser Attributes; if (Error E = getBuildAttributes(Attributes)) { consumeError(std::move(E)); return SubtargetFeatures(); } // both ARMv7-M and R have to support thumb hardware div bool isV7 = fal...
[ "llvm/lib/Object/ELFObjectFile.cpp" ]
3b15d851b9f15b088b5a903aa8672f65c9ec06f8
Rishabh
2026-06-08T00:00:00
code_modification
Refactor the following code in files: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h, lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp: Handle accelerator plugin breakpoint actions on the client. Refactoring description: Wire up the client (ProcessGDBRemote) side of the accelerator plugin breakpo...
/* --- 388 lines before modification point omitted --- */ bool value_is_offset); Status UpdateAutomaticSignalFiltering() override; Status FlashErase(lldb::addr_t addr, size_t size); Status FlashDone(); bool HasErased(FlashRange range); llvm::Expected<std::vector<uint8...
/* --- 388 lines before modification point omitted --- */ bool value_is_offset); Status UpdateAutomaticSignalFiltering() override; Status FlashErase(lldb::addr_t addr, size_t size); Status FlashDone(); bool HasErased(FlashRange range); llvm::Expected<std::vector<uint8...
[ "lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h", "lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp" ]
82333f7cfa553133999f4678e79215210d4b19fc
satyanarayana reddy janga
2026-06-08T00:00:00
code_modification
Implement the following feature in clang/lib/AST/ByteCode/Interp.h: Reject GetField{,Pop} ops on non-records. Feature description: Similar to what we do in GetPtrField{,Pop}. Output the complete corrected function(s).
template <PrimType Name, class T = typename PrimConv<Name>::T> bool GetField(InterpState &S, CodePtr OpPC, uint32_t I) { const Pointer &Obj = S.Stk.peek<Pointer>(); if (!CheckNull(S, OpPC, Obj, CSK_Field)) return false; if (!CheckRange(S, OpPC, Obj, CSK_Field)) return false; const Pointer &Field = Obj.a...
template <PrimType Name, class T = typename PrimConv<Name>::T> bool GetField(InterpState &S, CodePtr OpPC, uint32_t I) { const Pointer &Obj = S.Stk.peek<Pointer>(); if (!CheckNull(S, OpPC, Obj, CSK_Field)) return false; if (!CheckRange(S, OpPC, Obj, CSK_Field)) return false; // FIXME(postswitch): The i...
[ "clang/lib/AST/ByteCode/Interp.h" ]
0c57db633d6ae411e42b8aa53f328a785e258653
Timm Baeder
2026-06-08T00:00:00
code_modification
Implement the following feature in clang/lib/AST/ByteCode/Interp.cpp: Only count taken jumps as steps. Feature description: There are several large array declarations in llvm-libc. They usually look similar to this: ```c++ alignas(16) inline constexpr LogRR LOG_TABLE = { { {Sign::POS, 0, 0_u128}, {...
static bool Jt(InterpState &S, CodePtr &PC, int32_t Offset) { if (S.Stk.pop<bool>()) { PC += Offset; } return S.noteStep(PC); } /* --- separate code section --- */ static bool Jf(InterpState &S, CodePtr &PC, int32_t Offset) { if (!S.Stk.pop<bool>()) { PC += Offset; } return S.noteStep(PC); } /* --- separate code...
static bool Jt(InterpState &S, CodePtr &PC, int32_t Offset) { if (S.Stk.pop<bool>()) { PC += Offset; return S.noteStep(PC); } return true; } /* --- separate code section --- */ static bool Jf(InterpState &S, CodePtr &PC, int32_t Offset) { if (!S.Stk.pop<bool>()) { PC += Offset; return S.noteStep(PC); } return...
[ "clang/lib/AST/ByteCode/Interp.cpp" ]
2e34b799749fd8c8446a3d27eee4317e78441d3c
Timm Baeder
2026-06-08T00:00:00
code_modification
Implement the following feature in clang/lib/AST/ByteCode/Interp.h: Diagnose negative AllocCN element counts. Feature description: Just like we do in AllocN. Output the complete corrected function(s).
template <PrimType Name, class SizeT = typename PrimConv<Name>::T> inline bool AllocCN(InterpState &S, CodePtr OpPC, const Descriptor *ElementDesc, bool IsNoThrow) { if (!CheckDynamicMemoryAllocation(S, OpPC)) return false; if (!ElementDesc) return false; SizeT NumElements = S.Stk.pop<SizeT>(); ...
template <PrimType Name, class SizeT = typename PrimConv<Name>::T> inline bool AllocCN(InterpState &S, CodePtr OpPC, const Descriptor *ElementDesc, bool IsNoThrow) { if (!CheckDynamicMemoryAllocation(S, OpPC)) return false; if (!ElementDesc) return false; SizeT NumElements = S.Stk.pop<SizeT>(); ...
[ "clang/lib/AST/ByteCode/Interp.h" ]
2b40c303e79f64c5c7642032554eda026594d604
Timm Baeder
2026-06-08T00:00:00
code_modification
Fix the following bug in bolt/include/bolt/Core/MCPlusBuilder.h: Revert "[BOLT][AArch64] Transform cmpbr ~> cmp + br when inversion not possible (#185731)". Problem description: This reverts commit 6b13656fd8386f979e061cc97e32b607ee3fcdf4. We have identified various bugs hence reverting: * relaxLocalBranches() shoul...
virtual bool isReversibleBranch(const MCInst &Inst, DataflowInfoManager *DIM = nullptr) const { assert(!isUnsupportedInstruction(Inst) && isConditionalBranch(Inst) && "Instruction is not known conditional branch"); if (isDynamicBranch(Inst)) return false; ...
virtual bool isReversibleBranch(const MCInst &Inst) const { assert(!isUnsupportedInstruction(Inst) && isConditionalBranch(Inst) && "Instruction is not known conditional branch"); if (isDynamicBranch(Inst)) return false; return true; }
[ "bolt/include/bolt/Core/MCPlusBuilder.h" ]
c1c0fb32ddbe4a4aa596e16e27f36c879a643af9
Alexandros Lamprineas
2026-06-08T00:00:00
code_modification
Implement the following feature in clang/include/clang/Analysis/CFG.h: Trigger checkLifetimeEnd callback from CFGLifetimeEnds element. Feature description: This patch adds handling of the `CFGLifetimeEnd` element to the CSA, and produces a newly created callback `checkLifetimeEnd` for each occurrence of it. It is use...
class CFGElement { public: enum Kind { // main kind Initializer, ScopeBegin, ScopeEnd, NewAllocator, LifetimeEnds, LoopExit, FullExprCleanup, // stmt kind Statement, Constructor, CXXRecordTypedCall, STMT_BEGIN = Statement, STMT_END = CXXRecordTypedCall, // d...
class CFGElement { public: enum Kind { // main kind Initializer, NewAllocator, LoopExit, FullExprCleanup, // scope marker kind ScopeBegin, ScopeEnd, LifetimeEnds, SCOPE_BEGIN = ScopeBegin, SCOPE_END = LifetimeEnds, // stmt kind Statement, Constructor, CXXRec...
[ "clang/include/clang/Analysis/CFG.h" ]
2bd098b819c19ccca082ebdc7042211bd68cb3b1
Arseniy Zaostrovnykh
2026-06-08T00:00:00
code_modification
Implement the following feature in clang/include/clang/Analysis/CFG.h: Trigger checkLifetimeEnd callback from CFGLifetimeEnds element. Feature description: This patch adds handling of the `CFGLifetimeEnd` element to the CSA, and produces a newly created callback `checkLifetimeEnd` for each occurrence of it. It is use...
explicit CFGLifetimeEnds(const VarDecl *var, const Stmt *stmt) : CFGElement(LifetimeEnds, var, stmt) {}
explicit CFGLifetimeEnds(const VarDecl *Var, const Stmt *Stmt) : CFGScopeMarker(LifetimeEnds, Stmt, Var) {}
[ "clang/include/clang/Analysis/CFG.h" ]
2bd098b819c19ccca082ebdc7042211bd68cb3b1
Arseniy Zaostrovnykh
2026-06-08T00:00:00
code_modification
Implement the following feature in flang/lib/Evaluate/type.cpp: Treat REAL(2)/COMPLEX(2) as C-interoperable types. Feature description: IEEE-754 binary16 ("half") maps cleanly to the C `_Float16` type (ISO/IEC TS 18661-3), but flang previously rejected `REAL(KIND=2)` and `COMPLEX(KIND=2)` in C-interoperable contexts. ...
std::optional<bool> IsInteroperableIntrinsicType(const DynamicType &type, const common::LanguageFeatureControl *features, bool checkCharLength) { switch (type.category()) { case TypeCategory::Integer: case TypeCategory::Unsigned: return true; case TypeCategory::Real: case TypeCategory::Complex: return type.kind()...
std::optional<bool> IsInteroperableIntrinsicType(const DynamicType &type, const common::LanguageFeatureControl *features, bool checkCharLength) { switch (type.category()) { case TypeCategory::Integer: case TypeCategory::Unsigned: return true; case TypeCategory::Real: case TypeCategory::Complex: // KIND=2 is IEEE-...
[ "flang/lib/Evaluate/type.cpp" ]
cf4f3340ba062cdb3ce95c4a600c61bec2862c5c
Eugene Epshteyn
2026-06-08T00:00:00
code_modification
Implement the following feature in llvm/include/llvm/ExecutionEngine/Orc/SymbolStringPool.h: Add remove_if and use it for erase-while-iterating. Feature description: Add a `remove_if` member to StringMap (and to HashKeyMap, the base of SampleProfileMap) as a replacement for the erase-while-iterating idiom, and convert...
inline void SymbolStringPool::clearDeadEntries() { std::lock_guard<std::mutex> Lock(PoolMutex); for (auto I = Pool.begin(), E = Pool.end(); I != E;) { auto Tmp = I++; if (Tmp->second == 0) Pool.erase(Tmp); } } /* --- separate code section --- */ inline bool SymbolStringPool::empty() const { std::lock_guard<st...
inline void SymbolStringPool::clearDeadEntries() { std::lock_guard<std::mutex> Lock(PoolMutex); Pool.remove_if([](PoolMapEntry &E) { return E.getValue() == 0; }); } /* --- separate code section --- */ inline bool SymbolStringPool::empty() const { std::lock_guard<std::mutex> Lock(PoolMutex); return Pool.empty(); }
[ "llvm/include/llvm/ExecutionEngine/Orc/SymbolStringPool.h" ]
c2df14973f7f51abfe284641125abe02b3bd374c
Fangrui Song
2026-06-08T00:00:00
code_modification
Implement the following feature in llvm/include/llvm/ProfileData/HashKeyMap.h: Add remove_if and use it for erase-while-iterating. Feature description: Add a `remove_if` member to StringMap (and to HashKeyMap, the base of SampleProfileMap) as a replacement for the erase-while-iterating idiom, and convert the two in-tr...
iterator erase(const_iterator It) { return base_type::erase(It); } /* --- separate code section --- */ #ifndef LLVM_PROFILEDATA_HASHKEYMAP_H #define LLVM_PROFILEDATA_HASHKEYMAP_H #include "llvm/ADT/Hashing.h" #include <utility> namespace llvm { namespace sampleprof { template <template <typename, typename, ...
iterator erase(const_iterator It) { return base_type::erase(It); } /* --- separate code section --- */ template <typename Predicate> bool remove_if(Predicate Pred) { bool Removed = false; for (auto It = base_type::begin(), E = base_type::end(); It != E;) { if (Pred(*It)) { It = base_type::erase(It); ...
[ "llvm/include/llvm/ProfileData/HashKeyMap.h" ]
c2df14973f7f51abfe284641125abe02b3bd374c
Fangrui Song
2026-06-08T00:00:00
code_modification
Implement the following feature in llvm/tools/llvm-profdata/llvm-profdata.cpp: Add remove_if and use it for erase-while-iterating. Feature description: Add a `remove_if` member to StringMap (and to HashKeyMap, the base of SampleProfileMap) as a replacement for the erase-while-iterating idiom, and convert the two in-tr...
template <typename T> static void filterFunctions(T &ProfileMap) { bool hasFilter = !FuncNameFilter.empty(); bool hasNegativeFilter = !FuncNameNegativeFilter.empty(); if (!hasFilter && !hasNegativeFilter) return; // If filter starts with '?' it is MSVC mangled name, not a regex. llvm::Regex ProbablyMSVCMangledName("...
template <typename T> static void filterFunctions(T &ProfileMap) { bool hasFilter = !FuncNameFilter.empty(); bool hasNegativeFilter = !FuncNameNegativeFilter.empty(); if (!hasFilter && !hasNegativeFilter) return; // If filter starts with '?' it is MSVC mangled name, not a regex. llvm::Regex ProbablyMSVCMangledName("...
[ "llvm/tools/llvm-profdata/llvm-profdata.cpp" ]
c2df14973f7f51abfe284641125abe02b3bd374c
Fangrui Song
2026-06-08T00:00:00
code_modification
Implement the following feature in files: llvm/lib/Target/AArch64/AArch64Subtarget.h, llvm/lib/Target/AArch64/AArch64Subtarget.cpp: Set the default cache line size to 64 bytes.. Feature description: This should be set to enable more precise interchange in the future, for instance. Output the complete corrected functi...
class AArch64Subtarget final : public AArch64GenSubtargetInfo { public: enum ARMProcFamilyEnum : uint8_t { Generic, #define ARM_PROCESSOR_FAMILY(ENUM) ENUM, #include "llvm/TargetParser/AArch64TargetParserDef.inc" #undef ARM_PROCESSOR_FAMILY }; protected: /// ARMProcFamily - ARM processor family: Cortex-A53, ...
class AArch64Subtarget final : public AArch64GenSubtargetInfo { public: enum ARMProcFamilyEnum : uint8_t { Generic, #define ARM_PROCESSOR_FAMILY(ENUM) ENUM, #include "llvm/TargetParser/AArch64TargetParserDef.inc" #undef ARM_PROCESSOR_FAMILY }; protected: /// ARMProcFamily - ARM processor family: Cortex-A53, ...
[ "llvm/lib/Target/AArch64/AArch64Subtarget.h", "llvm/lib/Target/AArch64/AArch64Subtarget.cpp" ]
a08dce6881f64158a9ccb91216ec57ac6570bc8c
Ricardo Jesus
2026-06-08T00:00:00
code_modification
Implement the following feature in llvm/lib/Target/SPIRV/SPIRVCombinerHelper.cpp: Lower 1xN/Nx1 matrix transpose to a copy. Feature description: Remove extra `OpVectorShuffle` while lowering trivial matrix transpose that is in fact basically a reshape Output the complete corrected function(s).
void SPIRVCombinerHelper::applyMatrixTranspose(MachineInstr &MI) const { Register ResReg = MI.getOperand(0).getReg(); Register InReg = MI.getOperand(2).getReg(); uint32_t Rows = MI.getOperand(3).getImm(); uint32_t Cols = MI.getOperand(4).getImm(); Builder.setInstrAndDebugLoc(MI); if (Rows == 1 && Cols == 1) { Build...
void SPIRVCombinerHelper::applyMatrixTranspose(MachineInstr &MI) const { Register ResReg = MI.getOperand(0).getReg(); Register InReg = MI.getOperand(2).getReg(); uint32_t Rows = MI.getOperand(3).getImm(); uint32_t Cols = MI.getOperand(4).getImm(); Builder.setInstrAndDebugLoc(MI); // A 1xN or Nx1 transpose is a pure r...
[ "llvm/lib/Target/SPIRV/SPIRVCombinerHelper.cpp" ]
c9e84a7284b601df7fc3c5b90e5b02007c491b00
Arseniy Obolenskiy
2026-06-08T00:00:00
code_modification
Refactor the following code in mlir/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp: Convert math.erfc to OpenCL erfc. Output the complete corrected function(s).
void populateMathToSPIRVPatterns(const SPIRVTypeConverter &typeConverter, RewritePatternSet &patterns) { // Core patterns patterns .add<CopySignPattern, CheckedElementwiseOpPattern<math::CtPopOp, spirv::BitCountOp>, CheckedElementwiseOpPattern<math::IsInfOp, spirv::I...
void populateMathToSPIRVPatterns(const SPIRVTypeConverter &typeConverter, RewritePatternSet &patterns) { // Core patterns patterns .add<CopySignPattern, CheckedElementwiseOpPattern<math::CtPopOp, spirv::BitCountOp>, CheckedElementwiseOpPattern<math::IsInfOp, spirv::I...
[ "mlir/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp" ]
6818ad463b5af19ecfb878a71d829c2f0e4f7f19
Arseniy Obolenskiy
2026-06-08T00:00:00
code_modification
Implement the following feature in llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp: Add vector type support for non-standard integers in G_TRUNC op. Output the complete corrected code snippet(s).
/* --- 33 lines before modification point omitted --- */ // If src and dst widen to the same size, G_TRUNC is replaced entirely: // %mask:s64 = G_CONSTANT 0xFFFFFFFFFF ; 40-bit mask // %dst:s64 = G_AND %src:s64, %mask SmallVector<MachineInstr *, 8> TruncToRemove; for (MachineBasicBlock &MBB : M...
/* --- 33 lines before modification point omitted --- */ // If src and dst widen to the same size, G_TRUNC is replaced entirely: // %mask:s64 = G_CONSTANT 0xFFFFFFFFFF ; 40-bit mask // %dst:s64 = G_AND %src:s64, %mask SmallVector<MachineInstr *, 8> TruncToRemove; for (MachineBasicBlock &MBB : M...
[ "llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp" ]
917117ceeebf004dff4b0b430de133c354f236ba
Arseniy Obolenskiy
2026-06-08T00:00:00
code_modification
Fix the following bug in llvm/tools/llvm-ar/llvm-ar.cpp: fix inconsistent case sensitivity for path matching on Windows. Fix strategy: add cleanup/delete Problem description: When deleting or extracting with -N, member counting uses case sensitive member arguments while path matching uses normalized paths. This caus...
static void performReadOperation(ArchiveOperation Operation, object::Archive *OldArchive) { if (Operation == Extract && OldArchive->isThin()) fail("extracting from a thin archive is not supported"); bool Filter = !Members.empty(); StringMap<int> MemberCount; { Error Err = Error::succ...
static void performReadOperation(ArchiveOperation Operation, object::Archive *OldArchive) { if (Operation == Extract && OldArchive->isThin()) fail("extracting from a thin archive is not supported"); bool Filter = !Members.empty(); StringMap<int> MemberCount; { Error Err = Error::succ...
[ "llvm/tools/llvm-ar/llvm-ar.cpp" ]
45d5d5669e1f9bd4bd1a2032e64a001500096e3f
Meow
2026-06-08T00:00:00
code_modification
Refactor the following code in compiler-rt/lib/sanitizer_common/sanitizer_lzw.h: DenseMap: replace tombstone deletion with TAOCP 6.4 Algorithm R. Refactoring description: sanitizer_dense_map.h is a fork of llvm/ADT/DenseMap.h, which uses quadratic probing with lazy deletion: an erased entry becomes a tombstone, a thir...
template <class T, class ItIn, class ItOut> ItOut LzwEncode(ItIn begin, ItIn end, ItOut out) { using Substring = detail::DenseMapPair<LzwCodeType /* Prefix */, T /* Next input */>; // Sentinel value for substrings of len 1. static constexpr LzwCodeType kNoPrefix = Min(DenseMapInfo<Substring>::getEmpt...
template <class T, class ItIn, class ItOut> ItOut LzwEncode(ItIn begin, ItIn end, ItOut out) { using Substring = detail::DenseMapPair<LzwCodeType /* Prefix */, T /* Next input */>; // Sentinel value for substrings of len 1. static constexpr LzwCodeType kNoPrefix = DenseMapInfo<Substring>::getEmptyKey...
[ "compiler-rt/lib/sanitizer_common/sanitizer_lzw.h" ]
d1cbede06860efefdef36de926004edb13fa3228
Fangrui Song
2026-06-07T00:00:00
code_modification
Refactor the following code in compiler-rt/lib/sanitizer_common/tests/sanitizer_dense_map_test.cpp: DenseMap: replace tombstone deletion with TAOCP 6.4 Algorithm R. Refactoring description: sanitizer_dense_map.h is a fork of llvm/ADT/DenseMap.h, which uses quadratic probing with lazy deletion: an erased entry becomes ...
static inline CtorTester getEmptyKey() { return CtorTester(-1); } /* --- separate code section --- */ static unsigned getHashValue(const CtorTester &Val) { return Val.getValue() * 37u; } /* --- separate code section --- */ static bool isEqual(const CtorTester &LHS, const CtorTester &RHS) { return LHS == RHS; } ...
static inline unsigned getEmptyKey() { return ~0U; } /* --- separate code section --- */ static unsigned getHashValue(const unsigned&) { return 0; } /* --- separate code section --- */ static bool isEqual(const unsigned& LHS, const unsigned& RHS) { return LHS == RHS; } /* --- separate code section --- */ static...
[ "compiler-rt/lib/sanitizer_common/tests/sanitizer_dense_map_test.cpp" ]
d1cbede06860efefdef36de926004edb13fa3228
Fangrui Song
2026-06-07T00:00:00
code_modification
Implement the following feature in llvm/lib/Target/M68k/M68kInstrInfo.cpp: Fix -Wunused-variable. Output the complete corrected function(s).
bool M68kInstrInfo::ExpandMOVX_RR(MachineInstrBuilder &MIB, MVT MVTDst, MVT MVTSrc) const { unsigned Move = MVTDst == MVT::i16 ? M68k::MOV16rr : M68k::MOV32rr; Register Dst = MIB->getOperand(0).getReg(); Register Src = MIB->getOperand(1).getReg(); assert(Dst != Src && "You can...
bool M68kInstrInfo::ExpandMOVX_RR(MachineInstrBuilder &MIB, MVT MVTDst, MVT MVTSrc) const { unsigned Move = MVTDst == MVT::i16 ? M68k::MOV16rr : M68k::MOV32rr; Register Dst = MIB->getOperand(0).getReg(); Register Src = MIB->getOperand(1).getReg(); assert(Dst != Src && "You can...
[ "llvm/lib/Target/M68k/M68kInstrInfo.cpp" ]
4931c71ceb313b6f817562f6345bc5d5399f015c
Fangrui Song
2026-06-07T00:00:00
code_modification
Refactor the following code in llvm/include/llvm/ADT/ImmutableList.h: Canonicalize pointer hashes. NFC. Refactoring description: `(p>>4)^(p>>9)` does not mix the high bits of the address. Pointers from one allocator grown across multiple slabs whose low-bit windows overlap map to the same narrow bucket range, an issue...
static unsigned getHashValue(ImmutableList<T> X) { uintptr_t PtrVal = reinterpret_cast<uintptr_t>(X.getInternalPointer()); return (unsigned((uintptr_t)PtrVal) >> 4) ^ (unsigned((uintptr_t)PtrVal) >> 9); } /* --- separate code section --- */ static bool isEqual(ImmutableList<T> X1, ImmutableList<T> X2) { ...
static unsigned getHashValue(ImmutableList<T> X) { return DenseMapInfo<const void *>::getHashValue(X.getInternalPointer()); } /* --- separate code section --- */ static bool isEqual(ImmutableList<T> X1, ImmutableList<T> X2) { return X1 == X2; }
[ "llvm/include/llvm/ADT/ImmutableList.h" ]
833d2418ffe9647b8a88f774208ec20c68805f73
Fangrui Song
2026-06-07T00:00:00
code_modification
Refactor the following code in llvm/include/llvm/CodeGen/SelectionDAGNodes.h: Canonicalize pointer hashes. NFC. Refactoring description: `(p>>4)^(p>>9)` does not mix the high bits of the address. Pointers from one allocator grown across multiple slabs whose low-bit windows overlap map to the same narrow bucket range, ...
static unsigned getHashValue(const SDValue &Val) { return ((unsigned)((uintptr_t)Val.getNode() >> 4) ^ (unsigned)((uintptr_t)Val.getNode() >> 9)) + Val.getResNo(); } /* --- separate code section --- */ static bool isEqual(const SDValue &LHS, const SDValue &RHS) { return LHS == RHS; }
static unsigned getHashValue(const SDValue &Val) { return DenseMapInfo<const void *>::getHashValue(Val.getNode()) + Val.getResNo(); } /* --- separate code section --- */ static bool isEqual(const SDValue &LHS, const SDValue &RHS) { return LHS == RHS; }
[ "llvm/include/llvm/CodeGen/SelectionDAGNodes.h" ]
833d2418ffe9647b8a88f774208ec20c68805f73
Fangrui Song
2026-06-07T00:00:00
code_modification
Refactor the following code in llvm/include/llvm/IR/Attributes.h: Canonicalize pointer hashes. NFC. Refactoring description: `(p>>4)^(p>>9)` does not mix the high bits of the address. Pointers from one allocator grown across multiple slabs whose low-bit windows overlap map to the same narrow bucket range, an issue fix...
static unsigned getHashValue(AttributeSet AS) { return (unsigned((uintptr_t)AS.SetNode) >> 4) ^ (unsigned((uintptr_t)AS.SetNode) >> 9); } /* --- separate code section --- */ static bool isEqual(AttributeSet LHS, AttributeSet RHS) { return LHS == RHS; } /* --- separate code section --- */ static unsigned ...
static unsigned getHashValue(AttributeList AS) { return DenseMapInfo<const void *>::getHashValue(AS.pImpl); } /* --- separate code section --- */ static bool isEqual(AttributeList LHS, AttributeList RHS) { return LHS == RHS; } /* --- separate code section --- */ static unsigned getHashValue(AttributeList AS) { ...
[ "llvm/include/llvm/IR/Attributes.h" ]
833d2418ffe9647b8a88f774208ec20c68805f73
Fangrui Song
2026-06-07T00:00:00
code_modification
Refactor the following code in lld/MachO/ExportTrie.cpp: Replace unordered_{map,set} with Dense{Map,Set}. Refactoring description: DenseMap no longer uses in-band sentinel keys (#201281) and is superior to unordered_map in these scenarios. Output the complete corrected function(s).
void parse() { std::unordered_set<size_t> visited; parse(start, "", visited); } /* --- separate code section --- */ void TrieParser::parse(const uint8_t *buf, const Twine &cumulativeString, std::unordered_set<size_t> &visited) { if (buf >= end) fatal(fileName + ": export trie node offset po...
void parse() { DenseSet<size_t> visited; parse(start, "", visited); } /* --- separate code section --- */ void TrieParser::parse(const uint8_t *buf, const Twine &cumulativeString, DenseSet<size_t> &visited) { if (buf >= end) fatal(fileName + ": export trie node offset points outside export ...
[ "lld/MachO/ExportTrie.cpp" ]
1c688221e0f0a737f34960babfef9d63f8709181
Fangrui Song
2026-06-07T00:00:00
code_modification
Fix the following bug in clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp: Revert "[clang-tidy] Preserve line endings in macro-to-enum fixes". Problem description: This commit encountered PCH related errors on buildbot, so revert it for now. Output the complete corrected function(s).
void MacroToEnumCallbacks::fixEnumMacro(const MacroList &MacroList) const { SourceLocation Begin = MacroList.front().Directive->getMacroInfo()->getDefinitionLoc(); const StringRef LineEnding = SM.getBufferData(SM.getFileID(Begin)).detectEOL(); Begin = SM.translateLineCol(SM.getFileID(Begin), ...
void MacroToEnumCallbacks::fixEnumMacro(const MacroList &MacroList) const { SourceLocation Begin = MacroList.front().Directive->getMacroInfo()->getDefinitionLoc(); Begin = SM.translateLineCol(SM.getFileID(Begin), SM.getSpellingLineNumber(Begin), 1); const DiagnosticBuilder Diagnostic = ...
[ "clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp" ]
cc52760a990f45f24def4e8b10bb031e06b5127c
Zeyi Xu
2026-06-08T00:00:00
code_modification
Fix the following bug in files: clang-tools-extra/clang-tidy/altera/IdDependentBackwardBranchCheck.h, clang-tools-extra/clang-tidy/altera/IdDependentBackwardBranchCheck.cpp: Fix inferred field note location. Problem description: Fixed the misleading note location for inferred ID-dependent fields. Now the note points t...
class IdDependentBackwardBranchCheck : public ClangTidyCheck { private: enum LoopType { UnknownLoop = -1, DoLoop = 0, WhileLoop = 1, ForLoop = 2 }; // Stores information necessary for printing out source of error. struct IdDependencyRecord { IdDependencyRecord(const VarDecl *Declaration, SourceLocation Locati...
class IdDependentBackwardBranchCheck : public ClangTidyCheck { private: enum LoopType { UnknownLoop = -1, DoLoop = 0, WhileLoop = 1, ForLoop = 2 }; // Stores information necessary for printing out source of error. struct IdDependencyRecord { IdDependencyRecord(const VarDecl *Declaration, SourceLocation Locati...
[ "clang-tools-extra/clang-tidy/altera/IdDependentBackwardBranchCheck.h", "clang-tools-extra/clang-tidy/altera/IdDependentBackwardBranchCheck.cpp" ]
6a77c4f36b6c7b05ea33bf886af5829ce234765e
mygitljf
2026-06-08T00:00:00
code_modification
Refactor the following code in llvm/include/llvm/CodeGen/MachineRegisterInfo.h: Avoid walking past all defs in hasOneUse(). Refactoring description: The use-def list is circular in the Prev direction (Head->Prev == Tail) and defs always precede uses, see MachineRegisterInfo::addRegOperandToUseList(). We can implement...
bool hasOneUse(Register RegNo) const { return hasSingleElement(use_operands(RegNo)); }
bool hasOneUse(Register RegNo) const { MachineOperand *Head = getRegUseDefListHead(RegNo); if (!Head) return false; // Prev links are circular, and defs always precede uses. MachineOperand *Tail = Head->Contents.Reg.Prev; if (!Tail->isUse()) return false; if (Tail == Head) return true; return ...
[ "llvm/include/llvm/CodeGen/MachineRegisterInfo.h" ]
9b4b9de0319b63ff56dd157b1d12465f206681f6
Mingjie Xu
2026-06-08T00:00:00
code_modification
Refactor the following code in clang/lib/Format/TokenAnnotator.cpp: Followup cleanup after #199459. Output the complete corrected code snippet(s).
/* --- 62 lines before modification point omitted --- */ } if ((PreviousNotConst->is(tok::r_paren) && PreviousNotConst->is(TT_TypeDeclarationParen)) || PreviousNotConst->is(TT_AttributeRParen)) { return true; } // If is a preprocess keyword like #define. if (IsPPKeyword) ...
/* --- 62 lines before modification point omitted --- */ } if ((PreviousNotConst->is(tok::r_paren) && PreviousNotConst->is(TT_TypeDeclarationParen)) || PreviousNotConst->is(TT_AttributeRParen)) { return true; } // If is a preprocess keyword like #define. if (IsPPKeyword) ...
[ "clang/lib/Format/TokenAnnotator.cpp" ]
3a522ff09cba85bb20275123b598d06408f9e21f
owenca
2026-06-07T00:00:00
code_modification
Implement the following feature in llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp: pass variadics frame as local pointer. Feature description: Pass the pointer for variadics as a local (addrspace(5)) pointer. This enables InferAddressSpace to convert loads of vaargs to local loads (pipeline reordered to accomadate) and ...
void NVPTXPassConfig::addIRPasses() { // The following passes are known to not play well with virtual regs hanging // around after register allocation (which in our case, is *all* registers). // We explicitly disable them here. We do, however, need some functionality // of the PrologEpilogCodeInserter pass, so we emul...
void NVPTXPassConfig::addIRPasses() { // The following passes are known to not play well with virtual regs hanging // around after register allocation (which in our case, is *all* registers). // We explicitly disable them here. We do, however, need some functionality // of the PrologEpilogCodeInserter pass, so we emul...
[ "llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp" ]
ec68f81078e155292349ee32d8cf926bd6d71eb3
Alex MacLean
2026-06-07T00:00:00
code_modification
Implement the following feature in llvm/lib/Transforms/IPO/ExpandVariadics.cpp: pass variadics frame as local pointer. Feature description: Pass the pointer for variadics as a local (addrspace(5)) pointer. This enables InferAddressSpace to convert loads of vaargs to local loads (pipeline reordered to accomadate) and w...
Function * ExpandVariadics::defineVariadicWrapper(Module &M, IRBuilder<> &Builder, Function *VariadicWrapper, Function *FixedArityReplacement) { auto &Ctx = Builder.getContext(); const DataLayout &DL = M.getDataLayout(); assert(Variadic...
Function * ExpandVariadics::defineVariadicWrapper(Module &M, IRBuilder<> &Builder, Function *VariadicWrapper, Function *FixedArityReplacement) { auto &Ctx = Builder.getContext(); const DataLayout &DL = M.getDataLayout(); assert(Variadic...
[ "llvm/lib/Transforms/IPO/ExpandVariadics.cpp" ]
ec68f81078e155292349ee32d8cf926bd6d71eb3
Alex MacLean
2026-06-07T00:00:00
code_modification
Refactor the following code in llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp: Rewrite extractvalue over aggregate spv_extractv result. Refactoring description: Chained extractvalue from an aggregate-returning call left raw IR over a multi-register spv_extractv, crashing later in foldImm. Mutate the producer to i32 and...
Instruction *SPIRVEmitIntrinsics::visitExtractValueInst(ExtractValueInst &I) { if (I.getAggregateOperand()->getType()->isAggregateType()) return &I; IRBuilder<> B(I.getParent()); B.SetInsertPoint(&I); SmallVector<Value *> Args(I.operands()); for (auto &Op : I.indices()) Args.push_back(B.getInt32(Op));...
Instruction *SPIRVEmitIntrinsics::visitExtractValueInst(ExtractValueInst &I) { IRBuilder<> B(I.getParent()); B.SetInsertPoint(&I); if (I.getAggregateOperand()->getType()->isAggregateType()) { // Mutate an aggregate-returning spv_extractv producer to i32 so // IRTranslator does not see a multi-register val...
[ "llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp" ]
fd1f9225458aa5add79b1cc3039b98fd223d5dff
Arseniy Obolenskiy
2026-06-07T00:00:00
code_modification
Implement the following feature in llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp: Lower vector-typed GEPs with more than 1 element in SPIRVEmitIntrinsics. Feature description: Fix spirv-val concern in the IR from #186764 with vector-typed GEPs (`<N x ptr>`) that were lowered to a single spv_gep intrinsic with a vector r...
static SPIRVTypeInst getArgSPIRVType(const Function &F, unsigned ArgIdx, SPIRVGlobalRegistry *GR, MachineIRBuilder &MIRBuilder, const SPIRVSubtarget &ST) { // Read argument's access qualifier from metadata or defaul...
static SPIRVTypeInst getArgSPIRVType(const Function &F, unsigned ArgIdx, SPIRVGlobalRegistry *GR, MachineIRBuilder &MIRBuilder, const SPIRVSubtarget &ST) { // Read argument's access qualifier from metadata or defaul...
[ "llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp" ]
a8b57112df677b51bb66218972bed8b3703986e5
Arseniy Obolenskiy
2026-06-07T00:00:00
code_modification
Implement the following feature in llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp: Lower vector-typed GEPs with more than 1 element in SPIRVEmitIntrinsics. Feature description: Fix spirv-val concern in the IR from #186764 with vector-typed GEPs (`<N x ptr>`) that were lowered to a single spv_gep intrinsic with a vector...
Instruction *SPIRVEmitIntrinsics::visitGetElementPtrInst(GetElementPtrInst &I) { IRBuilder<> B(I.getParent()); B.SetInsertPoint(&I); if (TM.getSubtargetImpl()->isLogicalSPIRV() && !isFirstIndexZero(&I)) { // Logical SPIR-V cannot use the OpPtrAccessChain instruction. If the first // index of the GEP is n...
Instruction *SPIRVEmitIntrinsics::visitGetElementPtrInst(GetElementPtrInst &I) { IRBuilder<> B(I.getParent()); B.SetInsertPoint(&I); // OpPtrAccessChain requires a scalar pointer result; scalarize per-lane // GEPs that return <N x ptr> and rebuild the vector via insertelement. if (auto *RetVTy = dyn_cast<Fix...
[ "llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp" ]
a8b57112df677b51bb66218972bed8b3703986e5
Arseniy Obolenskiy
2026-06-07T00:00:00
code_modification
Refactor the following code in llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h: Use VPInstructionWithType for uniform casts.. Refactoring description: Use VPInstructionWithType instead of VPReplicate recipe for uniform casts. This is a first step towards breaking up VPReplicateRecipe. Using the general VPInst...
VPScalarIVStepsRecipe * createScalarIVSteps(Instruction::BinaryOps InductionOpcode, FPMathOperator *FPBinOp, VPValue *IV, VPValue *Step, VPValue *VF, DebugLoc DL) { return tryInsertInstruction(new VPScalarIVStepsRecipe( IV, Step, VF, InductionOpcode, F...
static VPSingleDefRecipe *createSingleScalarOp(unsigned Opcode, ArrayRef<VPValue *> Operands, VPValue *Mask, const VPIRFlags &Flags, ...
[ "llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h" ]
0672a177f71eb7e556c6c434425916e9b430fdac
Florian Hahn
2026-06-07T00:00:00
code_modification
Refactor the following code in llvm/lib/Transforms/Vectorize/LoopVectorize.cpp: Use VPInstructionWithType for uniform casts.. Refactoring description: Use VPInstructionWithType instead of VPReplicate recipe for uniform casts. This is a first step towards breaking up VPReplicateRecipe. Using the general VPInstructionWi...
VPReplicateRecipe *VPRecipeBuilder::handleReplication(VPInstruction *VPI, VFRange &Range) { auto *I = VPI->getUnderlyingInstr(); bool IsUniform = LoopVectorizationPlanner::getDecisionAndClampRange( [&](ElementCount VF) { return CM.isUniformAfterVectorizati...
VPSingleDefRecipe *VPRecipeBuilder::handleReplication(VPInstruction *VPI, VFRange &Range) { auto *I = VPI->getUnderlyingInstr(); bool IsUniform = LoopVectorizationPlanner::getDecisionAndClampRange( [&](ElementCount VF) { return CM.isUniformAfterVectorizati...
[ "llvm/lib/Transforms/Vectorize/LoopVectorize.cpp" ]
0672a177f71eb7e556c6c434425916e9b430fdac
Florian Hahn
2026-06-07T00:00:00
code_modification
Refactor the following code in llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp: Add VPReplicateRecipe::operandsWithoutMask() (NFC).. Refactoring description: Add a helper to access a VPReplicateRecipe's operands while excluding the mask of a predicated recipe, and use it in createReplicateRegion. Split off from htt...
static VPRegionBlock *createReplicateRegion(VPReplicateRecipe *PredRecipe, VPRegionBlock *ParentRegion, VPlan &Plan) { Instruction *Instr = PredRecipe->getUnderlyingInstr(); // Build the triangular if-then region. std::string RegionName...
static VPRegionBlock *createReplicateRegion(VPReplicateRecipe *PredRecipe, VPRegionBlock *ParentRegion, VPlan &Plan) { Instruction *Instr = PredRecipe->getUnderlyingInstr(); // Build the triangular if-then region. std::string RegionName...
[ "llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp" ]
7df3d9277973096d3b4231b6819b2fcc5603c67e
Florian Hahn
2026-06-07T00:00:00
code_modification
Refactor the following code in llvm/lib/Transforms/Scalar/LoopInterchange.cpp: Reject interchange when AnyOf reduction exists. Refactoring description: This patch removes `AnyOf` reductions from the legal candidates for interchange. In some cases, especially when the result value of `AnyOf` is loop-invariant with resp...
static bool checkReductionKind(Loop *L, PHINode *PHI, SmallVectorImpl<Instruction *> &HasNoWrapInsts, SmallVectorImpl<Instruction *> &HasNoInfInsts) { RecurrenceDescriptor RD; if (RecurrenceDescriptor::isReductionPHI(PHI, L, RD)) { // Detect floating point red...
static bool checkReductionKind(Loop *L, PHINode *PHI, SmallVectorImpl<Instruction *> &HasNoWrapInsts, SmallVectorImpl<Instruction *> &HasNoInfInsts) { RecurrenceDescriptor RD; if (RecurrenceDescriptor::isReductionPHI(PHI, L, RD)) { // Detect floating point red...
[ "llvm/lib/Transforms/Scalar/LoopInterchange.cpp" ]
67ebc46da88ba78037f8f7a7e65f303f4ba28932
Ryotaro Kasuga
2026-06-08T00:00:00
code_modification
Implement the following feature in llvm/lib/TableGen/TGParser.cpp: Fix crash of !switch parse in defvar context. Feature description: `ListInit::convertInitializerTo()` and similar variants do not perform a nullptr check. Adding a check to the caller parse method and a test case for defvar. Output the complete correc...
const Init *TGParser::ParseOperationSwitch(Record *CurRec, const RecTy *ItemType) { Lex.Lex(); // eat the operation 'switch' if (!consume(tgtok::l_paren)) { TokError("expected '(' after !switch operator"); return nullptr; } SmallVector<const Init *, 4> KeyAndCases; const I...
const Init *TGParser::ParseOperationSwitch(Record *CurRec, const RecTy *ItemType) { Lex.Lex(); // eat the operation 'switch' if (!consume(tgtok::l_paren)) { TokError("expected '(' after !switch operator"); return nullptr; } SmallVector<const Init *, 4> KeyAndCases; const I...
[ "llvm/lib/TableGen/TGParser.cpp" ]
4b0da1a1d71040c67858a739e29ef062f63d9efd
Tomer Shafir
2026-06-07T00:00:00
code_modification
Implement the following feature in llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp: Do not insert after callbr. Feature description: findInsertPointAfter handle invoke and otherwise use the instruction after def instruction as the insertion point. This is not valid for callbr which is a terminator. Advancing th...
BasicBlock::iterator SCEVExpander::findInsertPointAfter(Instruction *I, Instruction *MustDominate) const { BasicBlock::iterator IP = ++I->getIterator(); if (auto *II = dyn_cast<InvokeInst>(I)) IP = II->getNormalDest()->begin(); while (isa<PHINode>(IP)) ++IP; if (isa<FuncletPadInst...
BasicBlock::iterator SCEVExpander::findInsertPointAfter(Instruction *I, Instruction *MustDominate) const { BasicBlock::iterator IP; if (auto MaybeIP = I->getInsertionPointAfterDef()) { IP = *MaybeIP; } else { assert(SE.DT.dominates(I, MustDominate) && "instruction must domi...
[ "llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp" ]
b46f0f8eeac89d8432583a9a0720903e6ed597ff
Le Gia Bao
2026-06-07T00:00:00
code_modification
Implement the following feature in llvm/lib/Transforms/Utils/LoopUtils.cpp: foldShuffleChainsToReduce - add FADD/FMUL handling. Feature description: Extend `foldShuffleChainsToReduce` to fold shuffle-reduction chains of fadd/fmul into the corresponding vector reduction intrinsics (llvm.vector.reduce.fadd / llvm.vector...
Intrinsic::ID llvm::getReductionForBinop(Instruction::BinaryOps Opc) { switch (Opc) { default: break; case Instruction::Add: return Intrinsic::vector_reduce_add; case Instruction::Mul: return Intrinsic::vector_reduce_mul; case Instruction::And: return Intrinsic::vector_reduce_and; case Instruction::Or: return...
Intrinsic::ID llvm::getReductionForBinop(Instruction::BinaryOps Opc) { switch (Opc) { default: break; case Instruction::Add: return Intrinsic::vector_reduce_add; case Instruction::Mul: return Intrinsic::vector_reduce_mul; case Instruction::And: return Intrinsic::vector_reduce_and; case Instruction::Or: return...
[ "llvm/lib/Transforms/Utils/LoopUtils.cpp" ]
86940d72a1eba54d0a6a01bc5d418e6864344d64
陈子昂
2026-06-07T00:00:00
code_modification
Implement the following feature in llvm/lib/Transforms/Vectorize/VectorCombine.cpp: foldShuffleChainsToReduce - add FADD/FMUL handling. Feature description: Extend `foldShuffleChainsToReduce` to fold shuffle-reduction chains of fadd/fmul into the corresponding vector reduction intrinsics (llvm.vector.reduce.fadd / llv...
{ /* --- 12 lines before modification point omitted --- */ return nullptr; if (II->getIntrinsicID() == IID && II->hasOneUse()) return II->getArgOperand(0); return nullptr; }; Value *V0 = checkIntrinsicAndGetItsArgument(I.getOperand(0), ReductionIID); if (!V0) return false; Value *V1 = c...
/* --- 12 lines before modification point omitted --- */ auto checkIntrinsicAndGetItsArgument = [](Value *V, Intrinsic::ID IID) -> Value * { auto *II = dyn_cast<IntrinsicInst>(V); if (!II) return nullptr; if (II->getIntrinsicID() == IID && II->hasOneUse())...
[ "llvm/lib/Transforms/Vectorize/VectorCombine.cpp" ]
86940d72a1eba54d0a6a01bc5d418e6864344d64
陈子昂
2026-06-07T00:00:00
code_modification
Implement the following feature in llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp: Narrow vselect mask to vXi1 in foldToMaskedStore. Feature description: foldToMaskedStore (added in https://github.com/llvm/llvm-project/commit/1c0ac80d4a9ef6c21914f2317003979952c2a2c3) rewrites store(vselect(cond, x, load(ptr)), ptr) -...
static SDValue foldToMaskedStore(StoreSDNode *Store, SelectionDAG &DAG, const SDLoc &Dl) { if (!Store->isSimple() || !ISD::isNormalStore(Store)) return SDValue(); SDValue StoredVal = Store->getValue(); SDValue StorePtr = Store->getBasePtr(); SDValue StoreOffset = Store->getOffset(); EV...
static SDValue foldToMaskedStore(StoreSDNode *Store, SelectionDAG &DAG, const SDLoc &Dl) { if (!Store->isSimple() || !ISD::isNormalStore(Store)) return SDValue(); SDValue StoredVal = Store->getValue(); SDValue StorePtr = Store->getBasePtr(); SDValue StoreOffset = Store->getOffset(); EV...
[ "llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp" ]
e6bd7887070e92bba3615de04d3fdefde4beb2de
Feng Zou
2026-06-07T00:00:00
code_modification
Implement the following feature in clang/lib/AST/ByteCode/InterpBuiltin.cpp: Register global constexpr-unknown variables with their pointee type. Output the complete corrected function(s).
static bool interp__builtin_strlen(InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned ID) { const Pointer &StrPtr = S.Stk.pop<Pointer>().expand(); if (ID == Builtin::BIstrlen || ID == Builtin::BIwcslen) diagnoseNonC...
static bool interp__builtin_strlen(InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned ID) { const Pointer &StrPtr = S.Stk.pop<Pointer>().expand(); if (ID == Builtin::BIstrlen || ID == Builtin::BIwcslen) diagnoseNonC...
[ "clang/lib/AST/ByteCode/InterpBuiltin.cpp" ]
18ad6a5e073f312d3369803cf607fe9bb66a587d
Timm Baeder
2026-06-07T00:00:00
code_modification
Implement the following feature in clang/lib/AST/ByteCode/Program.cpp: Register global constexpr-unknown variables with their pointee type. Output the complete corrected function(s).
UnsignedOrNone Program::createGlobal(const DeclTy &D, QualType Ty, bool IsStatic, bool IsExtern, bool IsWeak, bool IsConstexprUnknown, const Expr *Init) { // Create a descriptor for the global. Descriptor ...
UnsignedOrNone Program::createGlobal(const DeclTy &D, QualType Ty, bool IsStatic, bool IsExtern, bool IsWeak, bool IsConstexprUnknown, const Expr *Init) { // Since this global variable is constexpr-unknown a...
[ "clang/lib/AST/ByteCode/Program.cpp" ]
18ad6a5e073f312d3369803cf607fe9bb66a587d
Timm Baeder
2026-06-07T00:00:00
code_modification
Refactor the following code in llvm/lib/Transforms/Utils/SimplifyCFG.cpp: Shrink integer lookup tables. Refactoring description: After #200664, we generate lookup tables in more cases, leading to higher memory use and larger binaries. Partially alleviate this by shrinking the lookup tables if all elements are small in...
Value *SwitchReplacement::replaceSwitch(Value *Index, IRBuilder<> &Builder, const DataLayout &DL, Function *Func) { switch (Kind) { case SingleValueKind: return SingleValue; case LinearMapKind: { ++NumLinearMaps; // Derive the result value from the input value. ...
Value *SwitchReplacement::replaceSwitch(Value *Index, IRBuilder<> &Builder, const DataLayout &DL, Function *Func) { switch (Kind) { case SingleValueKind: return SingleValue; case LinearMapKind: { ++NumLinearMaps; // Derive the result value from the input value. ...
[ "llvm/lib/Transforms/Utils/SimplifyCFG.cpp" ]
efaed4201b8e6d5026b53e6bdce939befdcba48b
Alexis Engelke
2026-06-07T00:00:00
code_modification
Refactor the following code in clang-tools-extra/clang-doc/HTMLGenerator.cpp: Move Generator classes into the anonymous namespace. Refactoring description: Clang-Tidy suggest moving these classes into the anonymous namespace, to enforce internal linkage. Output the complete corrected function(s).
Error HTMLGenerator::setupTemplateFiles(const ClangDocContext &CDCtx) { // Template files need to use the native path when they're opened, // but have to be used in POSIX style when used in HTML. auto ConvertToNative = [](std::string &&Path) -> std::string { SmallString<128> PathBuf(Path); llvm::sys::path...
Error HTMLGenerator::setupTemplateFiles(const ClangDocContext &CDCtx) { // Template files need to use the native path when they're opened, // but have to be used in POSIX style when used in HTML. auto ConvertToNative = [](std::string &&Path) -> std::string { SmallString<128> PathBuf(Path); llvm::sys::path...
[ "clang-tools-extra/clang-doc/HTMLGenerator.cpp" ]
a0344e9f990d503274662b9cbf7f15b7ad92a3e9
Paul Kirth
2026-06-06T00:00:00
code_modification
Refactor the following code in clang-tools-extra/clang-doc/MDGenerator.cpp: Move Generator classes into the anonymous namespace. Refactoring description: Clang-Tidy suggest moving these classes into the anonymous namespace, to enforce internal linkage. Output the complete corrected function(s).
static std::string genItalic(const Twine &Text) { return "*" + Text.str() + "*"; } /* --- separate code section --- */ static llvm::Error genIndex(ClangDocContext &CDCtx) { std::error_code FileErr; llvm::SmallString<128> FilePath; llvm::sys::path::native(CDCtx.OutDirectory, FilePath); llvm::sys::path::append(FilePath...
static std::string genItalic(const Twine &Text) { return "*" + Text.str() + "*"; } /* --- separate code section --- */ static llvm::Error genIndex(ClangDocContext &CDCtx) { std::error_code FileErr; llvm::SmallString<128> FilePath; llvm::sys::path::native(CDCtx.OutDirectory, FilePath); llvm::sys::path::append(FilePath...
[ "clang-tools-extra/clang-doc/MDGenerator.cpp" ]
a0344e9f990d503274662b9cbf7f15b7ad92a3e9
Paul Kirth
2026-06-06T00:00:00
code_modification
Refactor the following code in clang-tools-extra/clang-doc/MDMustacheGenerator.cpp: Move Generator classes into the anonymous namespace. Refactoring description: Clang-Tidy suggest moving these classes into the anonymous namespace, to enforce internal linkage. Output the complete corrected function(s).
Error MDMustacheGenerator::setupTemplateFiles(const ClangDocContext &CDCtx) { std::string ClassFilePath = CDCtx.MustacheTemplates.lookup("class-template"); std::string NamespaceFilePath = CDCtx.MustacheTemplates.lookup("namespace-template"); std::string AllFilesPath = CDCtx.MustacheTemplates.lookup("all-fil...
Error MDMustacheGenerator::setupTemplateFiles(const ClangDocContext &CDCtx) { std::string ClassFilePath = CDCtx.MustacheTemplates.lookup("class-template"); std::string NamespaceFilePath = CDCtx.MustacheTemplates.lookup("namespace-template"); std::string AllFilesPath = CDCtx.MustacheTemplates.lookup("all-fil...
[ "clang-tools-extra/clang-doc/MDMustacheGenerator.cpp" ]
a0344e9f990d503274662b9cbf7f15b7ad92a3e9
Paul Kirth
2026-06-06T00:00:00
code_modification
Refactor the following code in clang-tools-extra/clang-doc/BitcodeWriter.cpp: Use llvm RTTI over handrolled casting. Refactoring description: Clang-Doc has a limited amount of polymorphism over Info types. Historically, these have just been cast directly in a few places, but we can use the existing llvm RTTI implement...
bool ClangDocBitcodeWriter::dispatchInfoForWrite(Info *I) { switch (I->IT) { case InfoType::IT_namespace: emitBlock(*static_cast<NamespaceInfo *>(I)); break; case InfoType::IT_record: emitBlock(*static_cast<RecordInfo *>(I)); break; case InfoType::IT_enum: emitBlock(*static_cast<EnumInfo *>(...
bool ClangDocBitcodeWriter::dispatchInfoForWrite(Info *I) { switch (I->IT) { case InfoType::IT_namespace: emitBlock(*cast<NamespaceInfo>(I)); break; case InfoType::IT_record: emitBlock(*cast<RecordInfo>(I)); break; case InfoType::IT_enum: emitBlock(*cast<EnumInfo>(I)); break; case Info...
[ "clang-tools-extra/clang-doc/BitcodeWriter.cpp" ]
35823d13a8460f57be6b73f3dc4f3b93acbcf79d
Paul Kirth
2026-06-06T00:00:00
code_modification
Refactor the following code in clang-tools-extra/clang-doc/JSONGenerator.cpp: Use llvm RTTI over handrolled casting. Refactoring description: Clang-Doc has a limited amount of polymorphism over Info types. Historically, these have just been cast directly in a few places, but we can use the existing llvm RTTI implement...
void JSONGenerator::serializeCommonAttributes(const Info &I, json::Object &Obj) { insertNonEmpty("Name", I.Name, Obj); if (!(I.USR == GlobalNamespaceID)) Obj["USR"] = toHex(toStringRef(I.USR)); Obj["InfoType"] = infoTypeToString(I.IT); // Conditionally insert fi...
void JSONGenerator::serializeCommonAttributes(const Info &I, json::Object &Obj) { insertNonEmpty("Name", I.Name, Obj); if (!(I.USR == GlobalNamespaceID)) Obj["USR"] = toHex(toStringRef(I.USR)); Obj["InfoType"] = infoTypeToString(I.IT); // Conditionally insert fi...
[ "clang-tools-extra/clang-doc/JSONGenerator.cpp" ]
35823d13a8460f57be6b73f3dc4f3b93acbcf79d
Paul Kirth
2026-06-06T00:00:00
code_modification
Refactor the following code in clang-tools-extra/clang-doc/MDGenerator.cpp: Use llvm RTTI over handrolled casting. Refactoring description: Clang-Doc has a limited amount of polymorphism over Info types. Historically, these have just been cast directly in a few places, but we can use the existing llvm RTTI implementat...
llvm::Error MDGenerator::generateDocForInfo(Info *I, llvm::raw_ostream &OS, const ClangDocContext &CDCtx) { switch (I->IT) { case InfoType::IT_namespace: genMarkdown(CDCtx, *static_cast<clang::doc::NamespaceInfo *>(I), OS); break; case InfoType::IT_record: genMarkdown(CDC...
llvm::Error MDGenerator::generateDocForInfo(Info *I, llvm::raw_ostream &OS, const ClangDocContext &CDCtx) { switch (I->IT) { case InfoType::IT_namespace: genMarkdown(CDCtx, *cast<NamespaceInfo>(I), OS); break; case InfoType::IT_record: genMarkdown(CDCtx, *cast<RecordInfo>...
[ "clang-tools-extra/clang-doc/MDGenerator.cpp" ]
35823d13a8460f57be6b73f3dc4f3b93acbcf79d
Paul Kirth
2026-06-06T00:00:00
code_modification
Implement the following feature in flang/lib/Optimizer/CodeGen/CodeGen.cpp: Allocate converted kernel descriptors in device-accessible storage. Feature description: Fix CUDA descriptor lowering when an `fir.embox` result reaches a `gpu.launch_func` through an intermediate `fir.convert`. CodeGen previously failed to r...
static mlir::Value genCUFAllocDescriptor(mlir::Location loc, mlir::ConversionPatternRewriter &rewriter, mlir::ModuleOp mod, fir::BaseBoxType boxTy, const fir::LLVMTypeConverter &typeConverter) { std::optional<mlir::DataLayout> dl = fir::support::...
static mlir::Value genCUFAllocDescriptor(mlir::Location loc, mlir::ConversionPatternRewriter &rewriter, mlir::ModuleOp mod, fir::BaseBoxType boxTy, const fir::LLVMTypeConverter &typeConverter) { std::optional<mlir::DataLayout> dl = fir::support::...
[ "flang/lib/Optimizer/CodeGen/CodeGen.cpp" ]
b542c92494b6bd156bacedca2d24fea2215f3792
Zhen Wang
2026-06-06T00:00:00
code_modification
Fix the following bug in clang/lib/Sema/SemaTemplateInstantiateDecl.cpp: Reland: fix getTemplateInstantiationArgs. Problem description: Relands https://github.com/llvm/llvm-project/pull/199528 Previous: #201373 This implements a new strategy for collecting the template arguments, by relying on the qualifiers and temp...
template<typename DeclT> static bool SubstQualifier(Sema &SemaRef, const DeclT *OldDecl, DeclT *NewDecl, const MultiLevelTemplateArgumentList &TemplateArgs) { if (!OldDecl->getQualifierLoc()) return false; assert((NewDecl->getFriendObjectKind() || !OldDecl->getLexicalDeclCo...
template <typename DeclT> static bool SubstQualifier(Sema &SemaRef, const DeclT *OldDecl, DeclT *NewDecl, const MultiLevelTemplateArgumentList &TemplateArgs, DeclContext *Owner) { if (auto TPLs = OldDecl->getTemplateParameterLists(); !TPLs.empty()) { SmallVect...
[ "clang/lib/Sema/SemaTemplateInstantiateDecl.cpp" ]
aca0ce5a7339a892e6405f23f19cb7a9931e18e7
Matheus Izvekov
2026-06-07T00:00:00
code_modification
Refactor the following code in lld/MachO/ConcatOutputSection.h: Remove unused DenseMapInfo::getEmptyKey. Refactoring description: After #201281 DenseMapInfo<T>::getEmptyKey() is no longer used by DenseMap. Remove the unused getEmptyKey definitions and dead sentinel uses. Output the complete corrected function(s).
ThunkKey(Relocation &r) : ThunkKey(cast<Symbol *>(r.referent), r.addend) {} /* --- separate code section --- */ bool operator==(const ThunkKey &other) const { if (addend != other.addend) return false; if (sym == other.sym) return true; if (isSentinel() || other.isSentinel()) return false; const au...
ThunkKey(Relocation &r) : ThunkKey(cast<Symbol *>(r.referent), r.addend) {} /* --- separate code section --- */ bool operator==(const ThunkKey &other) const { if (addend != other.addend) return false; if (sym == other.sym) return true; const auto *dl = dyn_cast<Defined>(sym); const auto *dr = dyn_cast...
[ "lld/MachO/ConcatOutputSection.h" ]
eafc7b672217288c873bea6d2489e93e2e683246
Fangrui Song
2026-06-06T00:00:00
code_modification
Refactor the following code in llvm/lib/Transforms/Scalar/EarlyCSE.cpp: Remove unused DenseMapInfo::getEmptyKey. Refactoring description: After #201281 DenseMapInfo<T>::getEmptyKey() is no longer used by DenseMap. Remove the unused getEmptyKey definitions and dead sentinel uses. Output the complete corrected function...
SimpleValue(Instruction *I) : Inst(I) { assert((isSentinel() || canHandle(I)) && "Inst can't be handled!"); }
SimpleValue(Instruction *I) : Inst(I) { assert(canHandle(I) && "Inst can't be handled!"); }
[ "llvm/lib/Transforms/Scalar/EarlyCSE.cpp" ]
e076ae4d0f45921966cca0cc3cd002ab87af4868
Fangrui Song
2026-06-06T00:00:00
code_modification
Refactor the following code in llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp: Remove unused DenseMapInfo::getEmptyKey. Refactoring description: After #201281 DenseMapInfo<T>::getEmptyKey() is no longer used by DenseMap. Remove the unused getEmptyKey definitions and dead sentinel uses. Output the complete corrected f...
template <typename StateT> static bool hasHazard(StateT InitialState, function_ref<HazardFnResult(StateT &, const MachineInstr &)> IsHazard, function_ref<void(StateT &, const MachineInstr &)> UpdateState, const MachineBasicBlock *InitialMBB, MachineBasicBlock::const_reverse_instr...
template <typename StateT> static bool hasHazard(StateT InitialState, function_ref<HazardFnResult(StateT &, const MachineInstr &)> IsHazard, function_ref<void(StateT &, const MachineInstr &)> UpdateState, const MachineBasicBlock *InitialMBB, MachineBasicBlock::const_reverse_instr...
[ "llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp" ]
d5a05ac792829360348f57166c0ae2f707d3ba3f
Fangrui Song
2026-06-06T00:00:00
code_modification
Refactor the following code in lld/wasm/SyntheticSections.h: Remove vestigial ImportKey::State after DenseMapInfo cleanup. Refactoring description: Unused after #201989 removed getEmptyKey() Output the complete corrected function(s).
uint32_t lookupType(const WasmSignature &sig); protected: std::vector<const WasmSignature *> types; llvm::DenseMap<WasmSignature, int32_t> typeIndices; }; /** * A key for some kind of imported entity of type `T`. * * Used when de-duplicating imports. */ template <typename T> struct ImportKey { public: enu...
ImportKey(T type, std::optional<StringRef> importModule, std::optional<StringRef> importName) : type(type), importModule(importModule), importName(importName) {} /* --- separate code section --- */ ImportKey(T type, std::optional<StringRef> importModule, std::optional<StringRef> importName) ...
[ "lld/wasm/SyntheticSections.h" ]
825d760892c77c00da0eb4a01c5f2397c49c9585
Fangrui Song
2026-06-06T00:00:00
code_modification
Refactor the following code in llvm/include/llvm/ADT/DenseMapInfo.h: Don't use getEmptyKey() when hashing std::optional. Refactoring description: DenseMapInfo<std::optional<T>>::getHashValue() calls T's getEmptyKey() for the nullopt case. This blocks removing the now-unused getEmptyKey() from DenseMapInfo specializati...
static unsigned getHashValue(const Optional &OptionalVal) { return detail::combineHashValue( OptionalVal.has_value(), Info::getHashValue(OptionalVal.value_or(Info::getEmptyKey()))); } /* --- separate code section --- */ static bool isEqual(const Optional &LHS, const Optional &RHS) { if (LHS && RHS) { ...
static unsigned getHashValue(const Optional &OptionalVal) { if (OptionalVal) return detail::combineHashValue(1, Info::getHashValue(*OptionalVal)); return 0; } /* --- separate code section --- */ static bool isEqual(const Optional &LHS, const Optional &RHS) { if (LHS && RHS) { return Info::isEqual(LHS.va...
[ "llvm/include/llvm/ADT/DenseMapInfo.h" ]
4bdd4eb56704cdbd5d74c6576c06219628cf2255
Fangrui Song
2026-06-06T00:00:00
code_modification
Fix the following bug in libc/src/__support/FPUtil/arm/sqrt.h: Fix arm-linux-gnueabihf target when building with gcc/g++.. Problem description: - `arm-linux-gnueabihf-gcc` defines fixed point macros (like `__FRACT_FBIT__`) but does not support `_Fract` and `_Accum` types by default. We just limit the fixed point suppo...
namespace LIBC_NAMESPACE_DECL { namespace fputil { #ifdef LIBC_TARGET_CPU_HAS_FPU_FLOAT template <> LIBC_INLINE float sqrt<float>(float x) { float y; asm("vsqrt %0, %1\n\t" : "=w"(y) : "w"(x)); return y; } #endif // LIBC_TARGET_CPU_HAS_FPU_FLOAT #ifdef LIBC_TARGET_CPU_HAS_FPU_DOUBLE template <> LIBC_INLINE doub...
namespace LIBC_NAMESPACE_DECL { namespace fputil { #ifdef LIBC_TARGET_CPU_HAS_FPU_FLOAT template <> LIBC_INLINE float sqrt<float>(float x) { float y; asm("vsqrt.f32 %0, %1\n\t" : "=w"(y) : "w"(x)); return y; } #endif // LIBC_TARGET_CPU_HAS_FPU_FLOAT #ifdef LIBC_TARGET_CPU_HAS_FPU_DOUBLE template <> LIBC_INLINE ...
[ "libc/src/__support/FPUtil/arm/sqrt.h" ]
c44a8ff850558e6b5f91c04f88c35283ecd9717f
lntue
2026-06-06T00:00:00
code_modification
Implement the following feature in llvm/lib/Transforms/Scalar/LoopInterchange.cpp: Remove unnecessary type check (NFC). Feature description: As mentioned in #200913, there is an unnecessay type check. Let's remove it. Output the complete corrected function(s).
static bool populateDependencyMatrix(CharMatrix &DepMatrix, unsigned Level, Loop *L, DependenceInfo *DI, ScalarEvolution *SE, OptimizationRemarkEmitter *ORE) { using ValueVector = SmallVector<Value *, 16>; ValueVec...
static bool populateDependencyMatrix(CharMatrix &DepMatrix, unsigned Level, Loop *L, DependenceInfo *DI, ScalarEvolution *SE, OptimizationRemarkEmitter *ORE) { using ValueVector = SmallVector<Value *, 16>; ValueVec...
[ "llvm/lib/Transforms/Scalar/LoopInterchange.cpp" ]
02b26ec29b0a9d823dbfd7a7aa15570043013b57
Ryotaro Kasuga
2026-06-07T00:00:00
code_modification
Implement the following feature in llvm/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.cpp: Disassemble index suppress in the full extension word correctly. Feature description: When the IS (Index Suppress) bit in the full extension word is set, we need to use NoReg for the index register in the decoded MCInst. This w...
void M68kMCCodeEmitter::encodeIndexSuppress(const MCInst &MI, unsigned OpIdx, unsigned InsertPos, APInt &Value, SmallVectorImpl<MCFixup> &Fixups, const MCSubtargetInfo &STI) const { // We suppre...
void M68kMCCodeEmitter::encodeIndexSuppress(const MCInst &MI, unsigned OpIdx, unsigned InsertPos, APInt &Value, SmallVectorImpl<MCFixup> &Fixups, const MCSubtargetInfo &STI) const { // We suppre...
[ "llvm/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.cpp" ]
e910a52b6a8c00c3b48efd8c38632695b3033536
Min-Yih Hsu
2026-06-06T00:00:00
code_modification
Fix the following bug in llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp: Fix incorrect insert point when folding zext of deinterleave. Problem description: Fix invalid module crash in https://github.com/llvm/llvm-project/pull/195330#issuecomment-4635245035 The problem was caused by incorrect IRBuilder inser...
Instruction * InstCombinerImpl::foldExtractionOfVectorDeinterleave(ZExtInst &RootZExt) { // This pattern involves bitcast that is not compatible with big endian. if (DL.isBigEndian()) return nullptr; // The actual value that got de-interleaved. Value *DIV; using namespace PatternMatch; Value *SVI = nu...
Instruction * InstCombinerImpl::foldExtractionOfVectorDeinterleave(ZExtInst &RootZExt) { // This pattern involves bitcast that is not compatible with big endian. if (DL.isBigEndian()) return nullptr; // The actual value that got de-interleaved. Value *DIV; using namespace PatternMatch; Instruction *SV...
[ "llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp" ]
8d5b7f729e07d5394746ae868adabc8b327d94cf
Min-Yih Hsu
2026-06-06T00:00:00
code_modification
Implement the following feature in llvm/lib/Object/DXContainer.cpp: Fix SRCI Names parsing on Big Endian. Feature description: ``` Names.Parameters = HeaderOnDisk; ``` converts SRCI Names section header from little endian to platform native byte order (in converting constructor). Therefore, extra ``` if (sys::IsBigE...
static Expected<size_t> parseNames(StringRef Section, mcdxbc::SourceInfo::SourceNames &Names) { const char *Current = Section.begin(); dxbc::SourceInfo::Names::HeaderOnDisk HeaderOnDisk; if (Error Err = readStruct<decltype(HeaderOnDisk), false>(Section, Current, ...
static Expected<size_t> parseNames(StringRef Section, mcdxbc::SourceInfo::SourceNames &Names) { const char *Current = Section.begin(); dxbc::SourceInfo::Names::HeaderOnDisk HeaderOnDisk; if (Error Err = readStruct<decltype(HeaderOnDisk), false>(Section, Current, ...
[ "llvm/lib/Object/DXContainer.cpp" ]
19f96a9c433bf268b1ca8aee3eca976591d8a9b8
Vladislav Dzhidzhoev
2026-06-06T00:00:00
code_modification
Fix the following bug in llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp: Prevent dangling references to trip count after expansion.. Problem description: Set trip count to Poison after expanding SCEVs to VPInstructions. getTripCount should not be used after that other than printing; setting to poison avoids accessi...
void VPlanTransforms::expandSCEVsToVPInstructions(VPlan &Plan, ScalarEvolution &SE) { auto *Entry = Plan.getEntry(); VPBuilder Builder(Entry, Entry->begin()); VPSCEVExpander Expander(Builder, SE); // Expand VPExpandSCEVRecipes to VPInstructions using VPSCEVExpander. Duri...
void VPlanTransforms::expandSCEVsToVPInstructions(VPlan &Plan, ScalarEvolution &SE) { auto *Entry = Plan.getEntry(); VPBuilder Builder(Entry, Entry->begin()); VPSCEVExpander Expander(Builder, SE); // Expand VPExpandSCEVRecipes to VPInstructions using VPSCEVExpander. Duri...
[ "llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp" ]
c384de1c688bab5d5d1fbf1bb3d31895c98e34cd
Florian Hahn
2026-06-06T00:00:00
code_modification
Implement the following feature in llvm/lib/Transforms/Vectorize/VPlan.cpp: Only print original trip count if it is used.. Feature description: Similarly to other VPlan-scope values, only print trip count when it has users for consistency. Output the complete corrected function(s).
void VPlan::printLiveIns(raw_ostream &O) const { VPSlotTracker SlotTracker(this); if (VF.getNumUsers() > 0) { O << "\nLive-in "; VF.printAsOperand(O, SlotTracker); O << " = VF"; } if (UF.getNumUsers() > 0) { O << "\nLive-in "; UF.printAsOperand(O, SlotTracker); O << " = UF"; } if ...
void VPlan::printLiveIns(raw_ostream &O) const { VPSlotTracker SlotTracker(this); if (VF.getNumUsers() > 0) { O << "\nLive-in "; VF.printAsOperand(O, SlotTracker); O << " = VF"; } if (UF.getNumUsers() > 0) { O << "\nLive-in "; UF.printAsOperand(O, SlotTracker); O << " = UF"; } if ...
[ "llvm/lib/Transforms/Vectorize/VPlan.cpp" ]
2e0fd9033183952d49ce759328764c3b0c75b94f
Florian Hahn
2026-06-06T00:00:00
code_modification
Fix the following bug in files: clang-tools-extra/clang-tidy/altera/IdDependentBackwardBranchCheck.h, clang-tools-extra/clang-tidy/altera/IdDependentBackwardBranchCheck.cpp: Fix `altera-id-dependent-backward-branch` false positives. Problem description: The check unconditionally marked the LHS of any assignment from a...
class IdDependentBackwardBranchCheck : public ClangTidyCheck { private: enum LoopType { UnknownLoop = -1, DoLoop = 0, WhileLoop = 1, ForLoop = 2 }; // Stores information necessary for printing out source of error. struct IdDependencyRecord { IdDependencyRecord(const VarDecl *Declaration, SourceLocation Locati...
class IdDependentBackwardBranchCheck : public ClangTidyCheck { private: enum LoopType { UnknownLoop = -1, DoLoop = 0, WhileLoop = 1, ForLoop = 2 }; // Stores information necessary for printing out source of error. struct IdDependencyRecord { IdDependencyRecord(const VarDecl *Declaration, SourceLocation Locati...
[ "clang-tools-extra/clang-tidy/altera/IdDependentBackwardBranchCheck.h", "clang-tools-extra/clang-tidy/altera/IdDependentBackwardBranchCheck.cpp" ]
4f265ce6730f6b109783a56f4c9251ed537c08c4
Daniil Dudkin
2026-06-06T00:00:00
code_modification
Implement the following feature in lldb/source/API/SBDebugger.cpp: Add nullptr check in GetBroadcaster. Feature description: I recently noticed LLDB crash during execution of `script print(lldb.SBDebugger().GetBroadcaster().GetName())` command: ``` PLEASE submit a bug report to https://github.com/llvm/llvm-project/iss...
SBBroadcaster SBDebugger::GetBroadcaster() { LLDB_INSTRUMENT_VA(this); SBBroadcaster broadcaster(&m_opaque_sp->GetBroadcaster(), false); return broadcaster; } /* --- separate code section --- */ void SBDebugger::Initialize() { LLDB_INSTRUMENT(); SBError ignored = SBDebugger::InitializeWithErrorHandling(); }
SBBroadcaster SBDebugger::GetBroadcaster() { LLDB_INSTRUMENT_VA(this); if (m_opaque_sp) return SBBroadcaster(&m_opaque_sp->GetBroadcaster(), false); return SBBroadcaster(); } /* --- separate code section --- */ void SBDebugger::Initialize() { LLDB_INSTRUMENT(); SBError ignored = SBDebugger::Initialize...
[ "lldb/source/API/SBDebugger.cpp" ]
731dd05c34d9bb8d42741b67afc658d228b30e85
Sergei Druzhkov
2026-06-06T00:00:00
code_modification
Refactor the following code in compiler-rt/lib/asan/asan_shadow_setup.cpp: Skip high-shadow and gap setup when HighMem region is empty. Refactoring description: On targets where the shadow offset sits above all addressable user memory (e.g. Alpha with ASAN_SHADOW_OFFSET=0x70000000000 and a 42-bit user VAS), kHighMemBe...
void InitializeShadowMemory() { // Set the shadow memory address to uninitialized. __asan_shadow_memory_dynamic_address = kDefaultShadowSentinel; uptr shadow_start = kLowShadowBeg; // Detect if a dynamic shadow address must used and find a available location // when necessary. When dynamic address is used, the macro |...
void InitializeShadowMemory() { // Set the shadow memory address to uninitialized. __asan_shadow_memory_dynamic_address = kDefaultShadowSentinel; uptr shadow_start = kLowShadowBeg; // Detect if a dynamic shadow address must used and find a available location // when necessary. When dynamic address is used, the macro |...
[ "compiler-rt/lib/asan/asan_shadow_setup.cpp" ]
8e1afdada5d09cccb18b3ff17dac04e30645b93e
Matt Turner
2026-06-06T00:00:00
code_modification
Refactor the following code in llvm/lib/Target/AMDGPU/AMDGPURegBankCombiner.cpp: Fold 'min(min(x,y),z)' and 'max(max(x,y),z)' into min3 and max3. Refactoring description: Original PR: https://github.com/llvm/llvm-project/pull/124263 Output the complete corrected code snippet(s).
class AMDGPURegBankCombinerImpl : public Combiner { protected: const AMDGPURegBankCombinerImplRuleConfig &RuleConfig; const GCNSubtarget &STI; const RegisterBankInfo &RBI; const TargetRegisterInfo &TRI; const SIInstrInfo &TII; const CombinerHelper Helper; public: AMDGPURegBankCombinerImpl( MachineF...
class AMDGPURegBankCombinerImpl : public Combiner { protected: const AMDGPURegBankCombinerImplRuleConfig &RuleConfig; const GCNSubtarget &STI; const RegisterBankInfo &RBI; const TargetRegisterInfo &TRI; const SIInstrInfo &TII; const CombinerHelper Helper; public: AMDGPURegBankCombinerImpl( MachineF...
[ "llvm/lib/Target/AMDGPU/AMDGPURegBankCombiner.cpp" ]
7ef1b22c75da98b58e5a91cacabeac8e1356ad8f
Elio
2026-06-07T00:00:00
code_modification
Implement the following feature in lldb/tools/driver/Driver.cpp: Add SBDebugger::SetTerminalDimensions to set width and height atomically. Feature description: Terminal width and height were communicated to the debugger separately, via SetTerminalWidth() and SetTerminalHeight(). Each notified the IOHandler and the sta...
void Driver::UpdateWindowSize() { struct winsize window_size; if ((isatty(STDIN_FILENO) != 0) && ::ioctl(STDIN_FILENO, TIOCGWINSZ, &window_size) == 0) { if (window_size.ws_col > 0) m_debugger.SetTerminalWidth(window_size.ws_col); #ifndef _WIN32 if (window_size.ws_row > 0) m_debugger.SetTerminalHeight(wi...
void Driver::UpdateWindowSize() { struct winsize window_size; if ((isatty(STDIN_FILENO) != 0) && ::ioctl(STDIN_FILENO, TIOCGWINSZ, &window_size) == 0) { if (window_size.ws_col > 0) { // Set both dimensions together to avoid recomputing from a stale value. #ifndef _WIN32 m_debugger.SetTerminalDimensions(wi...
[ "lldb/tools/driver/Driver.cpp" ]
9aef31502094e2b5c997683a6d624aaf39f5bd50
Jonas Devlieghere
2026-06-06T00:00:00
code_modification
Fix the following bug in llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp: Revert "[SLP]Keep reuse mask in sync when reordering split node operand". Problem description: This reverts commit dee1687bdba79e729b4ddf3e2c37ff9b5766dc75 to pacify buildbots after failures in https://lab.llvm.org/buildbot/#/builders/25/builds/...
/* --- 138 lines before modification point omitted --- */ MapVector<OrdersType, unsigned, DenseMap<OrdersType, unsigned, OrdersTypeDenseMapInfo>> OrdersUses; // Do the analysis for each tree entry only once, otherwise the order of // the same node my be considered several times, though...
{ /* --- 138 lines before modification point omitted --- */ if (!OpTE->ReuseShuffleIndices.empty() && !GathersToOrders.count(OpTE)) continue; const auto Order = [&]() -> const OrdersType { if (OpTE->isGather() || !OpTE->ReuseShuffleIndices.empty()) return getReorderingData(*OpTE, /...
[ "llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp" ]
c1ee07b95724d80634a399ff84e0e398021862d4
Alexey Bataev
2026-06-06T00:00:00
code_modification
Fix the following bug in llvm/lib/Target/AArch64/AArch64ISelLowering.cpp: Fix and vs or in tryCombineExtendRShTrunc. Problem description: This condition should be checking that both are true. Output the complete corrected function(s).
static SDValue tryCombineExtendRShTrunc(SDNode *N, SelectionDAG &DAG) { assert(N->getOpcode() == AArch64ISD::UZP1 && "Only UZP1 expected."); SDValue Op0 = N->getOperand(0); SDValue Op1 = N->getOperand(1); EVT ResVT = N->getValueType(0); unsigned RshOpc = Op0.getOpcode(); if (RshOpc != AArch64ISD::RSHRNB_I) return SD...
static SDValue tryCombineExtendRShTrunc(SDNode *N, SelectionDAG &DAG) { assert(N->getOpcode() == AArch64ISD::UZP1 && "Only UZP1 expected."); SDValue Op0 = N->getOperand(0); SDValue Op1 = N->getOperand(1); EVT ResVT = N->getValueType(0); unsigned RshOpc = Op0.getOpcode(); if (RshOpc != AArch64ISD::RSHRNB_I) return SD...
[ "llvm/lib/Target/AArch64/AArch64ISelLowering.cpp" ]
5458641e2e81dd77b7145a78b0aac7ba3f0c1bdd
David Green
2026-06-06T00:00:00
code_modification
Fix the following bug in llvm/lib/Target/AArch64/AArch64ISelLowering.cpp: Protect against v3i64->v3i8 truncates in combineI8TruncStore. Problem description: We were previously creating invalid bitcasts, protect against that by making sure that the type is legal. Output the complete corrected function(s).
static SDValue combineI8TruncStore(StoreSDNode *ST, SelectionDAG &DAG, const AArch64Subtarget *Subtarget) { SDValue Value = ST->getValue(); EVT ValueVT = Value.getValueType(); if (ST->isVolatile() || !Subtarget->isLittleEndian() || Value.getOpcode() != ISD::TRUNCATE || ValueVT ...
static SDValue combineI8TruncStore(StoreSDNode *ST, SelectionDAG &DAG, const AArch64Subtarget *Subtarget) { SDValue Value = ST->getValue(); EVT ValueVT = Value.getValueType(); if (ST->isVolatile() || !Subtarget->isLittleEndian() || Value.getOpcode() != ISD::TRUNCATE || ValueVT ...
[ "llvm/lib/Target/AArch64/AArch64ISelLowering.cpp" ]
1f44aeb56183e87547c752b27c879fd1c0299593
David Green
2026-06-06T00:00:00
code_modification
Refactor the following code in llvm/lib/Target/AArch64/AArch64ISelLowering.cpp: Use 64bit mask size for detecting extending Ands.. Output the complete corrected function(s).
static EVT calculatePreExtendType(SDValue Extend) { switch (Extend.getOpcode()) { case ISD::SIGN_EXTEND: case ISD::ZERO_EXTEND: case ISD::ANY_EXTEND: return Extend.getOperand(0).getValueType(); case ISD::AssertSext: case ISD::AssertZext: case ISD::SIGN_EXTEND_INREG: { VTSDNode *TypeNode = dyn_cast<VTSDNode>(Extend....
static EVT calculatePreExtendType(SDValue Extend) { switch (Extend.getOpcode()) { case ISD::SIGN_EXTEND: case ISD::ZERO_EXTEND: case ISD::ANY_EXTEND: return Extend.getOperand(0).getValueType(); case ISD::AssertSext: case ISD::AssertZext: case ISD::SIGN_EXTEND_INREG: { VTSDNode *TypeNode = dyn_cast<VTSDNode>(Extend....
[ "llvm/lib/Target/AArch64/AArch64ISelLowering.cpp" ]
6729f3b5a2d8650432e8415a5289fff42c660527
David Green
2026-06-06T00:00:00
code_modification
Refactor the following code in llvm/lib/Target/X86/GISel/X86LegalizerInfo.cpp: Remove dependency on legal ruleset. Refactoring description: This fills in always legal rules, to remove the dependency on the legacy ruleset. I'm not sure about the truncate rule but all tests pass. This is not guaranteed to be all the rul...
{ /* --- 164 lines before modification point omitted --- */ if (HasSSE1) Action.legalForTypesWithMemDesc({{v4s32, p0, v4s32, 1}}); if (HasSSE2) Action.legalForTypesWithMemDesc({{v16s8, p0, v16s8, 1}, {v8s16, p0, v8s16, 1}, {v2s64, p0,...
/* --- 164 lines before modification point omitted --- */ {s1, s8, s16, s32, s64}, {s8, s16, s32, s64, s128}); getActionDefinitionsBuilder(G_TRUNC).legalForCartesianProduct( {s1, s8, s16, s32, s64}, {s8, s16, s32, s64, s128}); getActionDefinitionsBuilder(G_SEXT_INREG).lower(); // fp constants getActionDefini...
[ "llvm/lib/Target/X86/GISel/X86LegalizerInfo.cpp" ]
f8ee61b393dc5701d1556f22f28849ddfdae1495
David Green
2026-06-06T00:00:00
code_modification