[llvm-branch-commits] Add deactivation symbol operand to ConstantPtrAuth. (PR #133537)

2025-05-27 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic commented: Missing verifier checks? https://github.com/llvm/llvm-project/pull/133537 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-co

[llvm-branch-commits] Add deactivation symbol operand to ConstantPtrAuth. (PR #133537)

2025-05-27 Thread Eli Friedman via llvm-branch-commits
@@ -1699,7 +1699,9 @@ LLVMValueRef LLVMConstantPtrAuth(LLVMValueRef Ptr, LLVMValueRef Key, LLVMValueRef Disc, LLVMValueRef AddrDisc) { return wrap(ConstantPtrAuth::get( unwrap(Ptr), unwrap(Key), - unwrap(Disc), unwrap(AddrDisc)));

[llvm-branch-commits] Add deactivation symbol operand to ConstantPtrAuth. (PR #133537)

2025-05-27 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/133537 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [llvm] Enable fexec-charset option (PR #138895)

2025-05-19 Thread Eli Friedman via llvm-branch-commits
@@ -249,6 +250,7 @@ static unsigned ProcessCharEscape(const char *ThisTokBegin, case '4': case '5': case '6': case '7': { // Octal escapes. --ThisTokBuf; +Translate = false; efriedma-quic wrote: Also handle `\o` escapes? https://github.com/llvm/

[llvm-branch-commits] [clang] [llvm] Enable fexec-charset option (PR #138895)

2025-05-19 Thread Eli Friedman via llvm-branch-commits
@@ -2191,6 +2243,16 @@ void StringLiteralParser::init(ArrayRef StringToks){ if (CopyStringFragment(StringToks[i], ThisTokBegin, BeforeCRLF)) hadError = true; +if (!hadError && Converter) { + assert(Kind != tok::wide_string_literal && +

[llvm-branch-commits] CodeGen: Fix implementation of __builtin_trivially_relocate. (PR #140312)

2025-05-16 Thread Eli Friedman via llvm-branch-commits
@@ -4425,6 +4425,14 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, Address Dest = EmitPointerWithAlignment(E->getArg(0)); Address Src = EmitPointerWithAlignment(E->getArg(1)); Value *SizeVal = EmitScalarExpr(E->getArg(2)); +

[llvm-branch-commits] [clang] release/20.x: [Clang][AST] Fix HandleLValueBase to deal with references (#140105) (PR #140246)

2025-05-16 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: How do we do release notes for things that are fixed on a release branch after the release? Do we put a release note for both 20 and 21? https://github.com/llvm/llvm-project/pull/140246 ___ llvm-branch-commits mailing list llvm-b

[llvm-branch-commits] [clang] release/20.x: [Clang][AST] Fix HandleLValueBase to deal with references (#140105) (PR #140246)

2025-05-16 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic approved this pull request. LGTM; seems like a conservative fix for the crash, should be safe for the branch. https://github.com/llvm/llvm-project/pull/140246 ___ llvm-branch-commits mailing list llvm-branch-commits@li

[llvm-branch-commits] [clang] clang: Fix broken implicit cast to generic address space (PR #138863)

2025-05-07 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic approved this pull request. https://github.com/llvm/llvm-project/pull/138863 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [KeyInstr][Clang] Add Clang option -g[no-]key-instructions (PR #134627)

2025-05-06 Thread Eli Friedman via llvm-branch-commits
@@ -4767,6 +4767,13 @@ renderDebugOptions(const ToolChain &TC, const Driver &D, const llvm::Triple &T, CmdArgs.push_back("-gembed-source"); } + if (Args.hasFlag(options::OPT_gkey_instructions, + options::OPT_gno_key_instructions, false)) { +CmdA

[llvm-branch-commits] [llvm] [llvm][IR] Treat memcmp and bcmp as libcalls (PR #135706)

2025-05-05 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: I can join libc monthly meeting, sure. https://github.com/llvm/llvm-project/pull/135706 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [llvm][IR] Treat memcmp and bcmp as libcalls (PR #135706)

2025-04-16 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: We need to enter the "-fno-builtins" world to make interprocedural optimizations with libc safe. Most optimizations you care about can be preserved in other ways. For example, if malloc called some intrinsic "llvm.allocate_memory"/"llvm.free_memory" to create/destroy pro

[llvm-branch-commits] [llvm] [llvm][IR] Treat memcmp and bcmp as libcalls (PR #135706)

2025-04-15 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: There are, currently, basically three different ways to supply libc which we support: - Dynamic linking: the libc isn't part of your program at all, it's part of the environment. You only have the abstract interface. - Static linking, no LTO of libc: the libc becomes part

[llvm-branch-commits] [llvm] [llvm][IR] Treat memcmp and bcmp as libcalls (PR #135706)

2025-04-15 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: I don't really want to start adding functions to RuntimeLibcalls.def piecemeal without documented criteria for what, exactly, should be added. Do we need to add every single function that any transformation can generate under any circumstances? Or is there some criteria

[llvm-branch-commits] [llvm] [SDAG] Introduce inbounds flag for pointer arithmetic (PR #131862)

2025-03-31 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: If we have PTRADD without a corresponding pointer type, the operand of the PTRADD is implicitly an inttoptr, which causes the problems we're discussing. Which... the IR layer doesn't really properly preserve inttoptr operations in all circumstances, but we're trying to fi

[llvm-branch-commits] [llvm] [SDAG] Introduce inbounds flag for pointer arithmetic (PR #131862)

2025-03-28 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: > That's for instance useful if your architecture has memory segments whose > borders allocated objects cannot cross and where you can only fold offsets > into memory access instructions if they don't leave the memory segment of the > base address. Hmm, I hadn't really th

[llvm-branch-commits] [llvm] [SDAG] Introduce inbounds flag for pointer arithmetic (PR #131862)

2025-03-21 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: If an pointer is constructed using inttoptr, it can be based on multiple objects. (In IR, we can see the inttoptr, but in SelectionDAG, it's treated as a noop and eliminated.) The "inbounds" rule should probably say something like this: "The base pointer must be based on

[llvm-branch-commits] [llvm] [SDAG] Introduce inbounds flag for pointer arithmetic (PR #131862)

2025-03-20 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: > with respect to whatever the address operand is pointing to Say you have two adjacent objects `a` and `b`. So `&a+1 == &b`. If you have an integer `x` such that `x == &a+1 == &b`, which object is `x` pointing to? In some cases, you might be able to disambiguate based o

[llvm-branch-commits] [llvm] [SDAG] Introduce inbounds flag for pointer arithmetic (PR #131862)

2025-03-19 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: Saying "one side is inbounds of the other side" is basically useless, as far as I can tell, for almost any transform. The other possibility you mentioned is that we say one side is a constant, the other is not, and the non-constant side must be a pointer? That seems fragi

[llvm-branch-commits] [clang] [Clang][CodeGen] Promote in complex compound divassign (PR #131453)

2025-03-18 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/131453 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [llvm] [SDAG] Introduce inbounds flag for pointer arithmetic (PR #131862)

2025-03-18 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: This seems semantically ambiguous. In GlobalISel, you have G_PTR_ADD, and inbounds on that has an obvious meaning; G_PTR_ADD has basically the same semantics as getelementptr. But in SelectionDAG, we don't have that; we just have a plain ISD::ADD. How do you tell which

[llvm-branch-commits] [clang] [Clang][CodeGen] Do not promote if complex divisor is real (PR #131451)

2025-03-17 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/131451 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [clang] [Clang][CodeGen] Do not promote if complex divisor is real (PR #131451)

2025-03-17 Thread Eli Friedman via llvm-branch-commits
@@ -314,7 +313,7 @@ class ComplexExprEmitter } QualType getPromotionType(FPOptionsOverride Features, QualType Ty, -bool IsDivOpCode = false) { +bool IsComplexDivisor = false) { efriedma-quic wrote: M

[llvm-branch-commits] [clang] [Clang][CodeGen] Do not promote if complex divisor is real (PR #131451)

2025-03-17 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/131451 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] release/20.x: [CUDA] Add support for sm101 and sm120 target architectures (#127187) (PR #127918)

2025-02-21 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: The process is that the patch is first reviewed by someone familiar with the code. They approve the patch, and describe how the fix meets the release branch patch requirements (https://llvm.org/docs/HowToReleaseLLVM.html#release-patch-rules). Once it's approved, the rele

[llvm-branch-commits] [llvm] [AMDGPU] Respect MBB alignment in the getFunctionCodeSize() (PR #127142)

2025-02-13 Thread Eli Friedman via llvm-branch-commits
@@ -212,6 +212,8 @@ uint64_t SIProgramInfo::getFunctionCodeSize(const MachineFunction &MF) { uint64_t CodeSize = 0; for (const MachineBasicBlock &MBB : MF) { +CodeSize = alignTo(CodeSize, MBB.getAlignment()); efriedma-quic wrote: Hmm, okay. Probably

[llvm-branch-commits] [llvm] [AMDGPU] Respect MBB alignment in the getFunctionCodeSize() (PR #127142)

2025-02-13 Thread Eli Friedman via llvm-branch-commits
@@ -212,6 +212,8 @@ uint64_t SIProgramInfo::getFunctionCodeSize(const MachineFunction &MF) { uint64_t CodeSize = 0; for (const MachineBasicBlock &MBB : MF) { +CodeSize = alignTo(CodeSize, MBB.getAlignment()); efriedma-quic wrote: This is not the righ

[llvm-branch-commits] [libclang] Replace createRef with createDup (PR #126683)

2025-02-11 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic approved this pull request. LGTM. Looking at the code, none of these codepaths should be hot, so I don't expect any significant performance difference. https://github.com/llvm/llvm-project/pull/126683 ___ llvm-branch-

[llvm-branch-commits] [clang] release/20.x: [clang] Support member function poiners in Decl::getFunctionType() (#125077) (PR #125956)

2025-02-05 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic approved this pull request. LGTM. This doesn't seem like a high priority to backport, but I guess it's safe enough for this point in the process. https://github.com/llvm/llvm-project/pull/125956 ___ llvm-branch-commit

[llvm-branch-commits] [clang] release/20.x: [clang][SME] Account for C++ lambdas in SME builtin diagnostics (#124750) (PR #125049)

2025-01-30 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic approved this pull request. LGTM. Safe bugfix. https://github.com/llvm/llvm-project/pull/125049 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/ll

[llvm-branch-commits] [clang] [llvm] [IR] Add FPOperation intrinsic property (PR #122313)

2025-01-10 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: Should this be part of the "memory" attribute, instead of an independent thing? In my head, the model I have is the following: the current fp state is a bit of thread-local state, and transforms that use generic reasoning about memory reads/writes should be able to conserv

[llvm-branch-commits] [llvm] release/19.x: [llvm][aarch64] Fix Arm64EC name mangling algorithm (#115567) (PR #116273)

2024-11-14 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic approved this pull request. LGTM I think this is safe for the branch: Functionally, this should only affect Arm64EC targets, and this is important for those targets. The header modifications only add functions; nothing is removed or modified, so there shouldn

[llvm-branch-commits] [llvm] AtomicExpand: Copy metadata from atomicrmw to cmpxchg (PR #109409)

2024-10-15 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/109409 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [clang] release/19.x: [Headers] [ARM64EC] Fix extra tokens inside intrin0.h preprocessor directive (#112066) (PR #112258)

2024-10-14 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic approved this pull request. LGTM. Obvious typo, obvious fix, very low chance of impacting non-arm64ec targets. https://github.com/llvm/llvm-project/pull/112258 ___ llvm-branch-commits mailing list llvm-branch-commits@

[llvm-branch-commits] [clang] release/19.x: [clang-repl] [codegen] Reduce the state in TBAA. NFC for static compilation. (#98138) (PR #111953)

2024-10-11 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic approved this pull request. LGTM I'm a little concerned about messing with datastructures in headers, but I think, since the headers in question aren't exposed in clang/include, this doesn't have any visible ABI effect. Otherwise this is a pretty safe refactor

[llvm-branch-commits] [llvm] AtomicExpand: Copy metadata from atomicrmw to cmpxchg (PR #109409)

2024-10-09 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: Did you address https://github.com/llvm/llvm-project/pull/109409#pullrequestreview-2332197449 ? https://github.com/llvm/llvm-project/pull/109409 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists

[llvm-branch-commits] [clang] [Clang] Fix 'counted_by' for nested struct pointers (#110497) (PR #111445)

2024-10-09 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic approved this pull request. LGTM This should be safe to merge: it only affects usage of the new counted_by attribute, and this fixes a significant bug blocking usage of that feature. https://github.com/llvm/llvm-project/pull/111445 _

[llvm-branch-commits] [llvm] [x86][Windows] Fix chromium build break (PR #111218)

2024-10-04 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic milestoned https://github.com/llvm/llvm-project/pull/111218 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [x86][Windows] Fix chromium build break (PR #111218)

2024-10-04 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/111218 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [x86][Windows] Fix chromium build break (PR #111218)

2024-10-04 Thread Eli Friedman via llvm-branch-commits
@@ -177,6 +177,107 @@ define float @tan(float %x) #0 { ret float %result } +define float @acos(float %x) #0 { efriedma-quic wrote: Okay that's fine. https://github.com/llvm/llvm-project/pull/111218 ___ llvm-branc

[llvm-branch-commits] [llvm] [x86][Windows] Fix chromium build break (PR #111218)

2024-10-04 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic approved this pull request. LGTM. Fixes a regression, and should be low-risk (the fix only affects the exact functions on the exact target with the issue). https://github.com/llvm/llvm-project/pull/111218 ___ llvm-bra

[llvm-branch-commits] [llvm] AtomicExpand: Copy metadata from atomicrmw to cmpxchg (PR #109409)

2024-09-26 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: > (which for some reason is not emitted as an atomic). In terms of the generated code, I think we're fine; we don't rely on the load producing a value that's consistent with atomic ordering, I think. That said, it probably should be atomic, because strictly speaking a race

[llvm-branch-commits] [llvm] AtomicExpand: Copy metadata from atomicrmw to cmpxchg (PR #109409)

2024-09-26 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic commented: I'm not sure we can assume all metadata which applies to an atomicrmw also makes sense on the generated cmpxchg. I mean, most metadata probably does, but say we start allowing `!align` metadata on atomicrmw... https://github.com/llvm/llvm-project/pu

[llvm-branch-commits] [llvm] AMDGPU: Custom expand flat cmpxchg which may access private (PR #109410)

2024-09-26 Thread Eli Friedman via llvm-branch-commits
@@ -25,20 +25,29 @@ bool llvm::lowerAtomicCmpXchgInst(AtomicCmpXchgInst *CXI) { Value *Cmp = CXI->getCompareOperand(); Value *Val = CXI->getNewValOperand(); - LoadInst *Orig = - Builder.CreateAlignedLoad(Val->getType(), Ptr, CXI->getAlign()); - Value *Equal = Builde

[llvm-branch-commits] [clang] release/19.x: [Clang][CodeGen] Don't emit assumptions if current block is unreachable. (#106936) (PR #107183)

2024-09-04 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic approved this pull request. LGTM. Fixes a crash on valid, and the fix is very unlikely to have unexpected effects. https://github.com/llvm/llvm-project/pull/107183 ___ llvm-branch-commits mailing list llvm-branch-comm

[llvm-branch-commits] [llvm] AArch64: Use consistent atomicrmw expansion for FP operations (PR #103702)

2024-08-28 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/103702 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [llvm] AArch64: Use consistent atomicrmw expansion for FP operations (PR #103702)

2024-08-22 Thread Eli Friedman via llvm-branch-commits
@@ -27056,21 +27056,35 @@ AArch64TargetLowering::shouldExpandAtomicLoadInIR(LoadInst *LI) const { : AtomicExpansionKind::LLSC; } +// Return true if the atomic operation expansion will lower to use a library +// call, and is thus ineligible to use

[llvm-branch-commits] [llvm] AArch64: Use consistent atomicrmw expansion for FP operations (PR #103702)

2024-08-22 Thread Eli Friedman via llvm-branch-commits
@@ -27056,21 +27056,35 @@ AArch64TargetLowering::shouldExpandAtomicLoadInIR(LoadInst *LI) const { : AtomicExpansionKind::LLSC; } +// Return true if the atomic operation expansion will lower to use a library +// call, and is thus ineligible to use

[llvm-branch-commits] [llvm] AArch64: Use consistent atomicrmw expansion for FP operations (PR #103702)

2024-08-22 Thread Eli Friedman via llvm-branch-commits
@@ -27056,21 +27056,35 @@ AArch64TargetLowering::shouldExpandAtomicLoadInIR(LoadInst *LI) const { : AtomicExpansionKind::LLSC; } +// Return true if the atomic operation expansion will lower to use a library +// call, and is thus ineligible to use

[llvm-branch-commits] [llvm] AArch64: Use consistent atomicrmw expansion for FP operations (PR #103702)

2024-08-15 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: Just thought of this, but... we can't do this in the case where we do a libcall. Any load or store between the load exclusive and the store exclusive could break the reservation. (It normally won't, but it can in weird cases where the atomic variable is on the stack.) S

[llvm-branch-commits] [llvm] AArch64: Use consistent atomicrmw expansion for FP operations (PR #103702)

2024-08-14 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: Please also fix the comment before AArch64TargetLowering::shouldExpandAtomicRMWInIR . (The comment is wrong; a floating-point "exception" isn't an exception in the sense that it would cancel an exclusive reservation.) https://github.com/llvm/llvm-project/pull/103702

[llvm-branch-commits] [llvm] release/19.x: [CodeGen][ARM64EC] Define hybrid_patchable EXP thunk symbol as a function. (#102898) (PR #103048)

2024-08-13 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/103048 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [llvm] release/19.x: [BinaryFormat] Disable MachOTest.UnalignedLC on SPARC (#100086) (PR #102103)

2024-08-08 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/102103 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [llvm] release/19.x: backport PR96483 (PR #102491)

2024-08-08 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/102491 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [llvm] [PowerPC][GlobalMerge] Reduce TOC usage by merging internal and private global data (PR #101224)

2024-07-30 Thread Eli Friedman via llvm-branch-commits
@@ -28,6 +28,10 @@ struct GlobalMergeOptions { bool MergeConst = false; /// Whether we should merge global variables that have external linkage. bool MergeExternal = true; + /// Whether we should merge global variables that have private linkage. + bool MergePrivateGloba

[llvm-branch-commits] [llvm] release/19.x: [CodeGen][ARM64EC] Use alias symbol for exporting hybrid_patchable functions. (#100872) (PR #101178)

2024-07-30 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: LGTM https://github.com/llvm/llvm-project/pull/101178 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] release/19.x: [clang][ARM64EC] Add support for hybrid_patchable attribute. (#99478) (PR #100873)

2024-07-29 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: LGTM https://github.com/llvm/llvm-project/pull/100873 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [Hashing] Use a non-deterministic seed if LLVM_ENABLE_ABI_BREAKING_CHECKS (PR #96282)

2024-06-27 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic commented: I think I'm happier restricting the non-determinism to +Asserts for now, at least as an incremental step. > Due to Avalanche effects, even a few ASLR bits are sufficient to cover many > different scenarios and expose latent bugs. On Windows specific

[llvm-branch-commits] [llvm] [Hashing] Use a non-deterministic seed if LLVM_ENABLE_ABI_BREAKING_CHECKS (PR #96282)

2024-06-27 Thread Eli Friedman via llvm-branch-commits
@@ -322,24 +306,20 @@ struct hash_state { } }; - -/// A global, fixed seed-override variable. -/// -/// This variable can be set using the \see llvm::set_fixed_execution_seed -/// function. See that function for details. Do not, under any circumstances, -/// set or read this

[llvm-branch-commits] [llvm] [Hashing] Use a non-deterministic seed if LLVM_ENABLE_ABI_BREAKING_CHECKS (PR #96282)

2024-06-27 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/96282 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [Hashing] Use a non-deterministic seed (PR #96282)

2024-06-21 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: We restricted reverse-iteration when we added it just to save time when we were enabling it: we wanted to prioritize issues that were actually likely to cause non-determinism (as opposed to relying on the hash algorithm, which is annoying but not actually non-deterministic

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Eli Friedman via llvm-branch-commits
@@ -354,6 +354,23 @@ Given that ``signedPointer`` matches the layout for signed pointers signed with the given key, extract the raw pointer from it. This operation does not trap and cannot fail, even if the pointer is not validly signed. +``ptrauth_sign_constant`` +^

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-05-30 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: Why do we want a separate builtin, as opposed to just constant-folding calls to __builtin_ptrauth_sign? https://github.com/llvm/llvm-project/pull/93904 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https:

[llvm-branch-commits] [llvm] [release/18.x] Backport fixes for ARM64EC thunk generation (PR #92580)

2024-05-17 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic approved this pull request. LGTM This only affects Arm64EC targets, the fixes are relatively small, and this affects correctness of generated thunks. https://github.com/llvm/llvm-project/pull/92580 ___ llvm-branch-com

[llvm-branch-commits] [llvm] release/18.x: [GlobalOpt] Don't replace aliasee with alias that has weak linkage (#91483) (PR #92468)

2024-05-16 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic approved this pull request. LGTM This only affects optimizations on weak aliases, and the logic is very simple: just don't optimize them. As noted on the original pull request, this also affects some cases which might be safe to optimize (a weak alias where th

[llvm-branch-commits] [clang] [llvm] Backport "riscv-isa" module metadata to 18.x (PR #91514)

2024-05-11 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: If LTO was completely broken, this seems worth taking. And the changes look safe. LGTM. https://github.com/llvm/llvm-project/pull/91514 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.or

[llvm-branch-commits] [clang] [llvm] Backport "riscv-isa" module metadata to 18.x (PR #91514)

2024-05-08 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: Can you briefly summarize why this is important to backport? At first glance, this is only relevant for LTO with mixed architecture specifications, which... I can see someone might want it, I guess, but it seems pretty easy to work around not having it. https://github.co

[llvm-branch-commits] [clang] release/18.x: [clang codegen] Fix MS ABI detection of user-provided constructors. (#90151) (PR #90639)

2024-04-30 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: Proposing for backport because this is high-impact for anyone using Qt on Arm64 Windows. https://github.com/llvm/llvm-project/pull/90639 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.or

[llvm-branch-commits] [clang] [clang][builtin] Implement __builtin_allow_runtime_check (PR #87568)

2024-04-29 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: I think it's worth re-posting the builtin as a separate RFC on Discourse, since the original RFC hadn't settled on the exact design for the clang builtin you're using here. Code changes look fine. https://github.com/llvm/llvm-project/pull/87568 ___

[llvm-branch-commits] [clang] [Clang] Handle structs with inner structs and no fields (#89126) (PR #90133)

2024-04-25 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: Looks fine. https://github.com/llvm/llvm-project/pull/90133 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [release/18.x][COFF][Aarch64] Add _InterlockedAdd64 intrinsic (#81849) (PR #89951)

2024-04-24 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: I think BuiltinsAArch64.def is part of clang's ABI, so changing it violates the backport rules. Otherwise, I'd be inclined to accept; it's kind of late to request, but it's low risk. https://github.com/llvm/llvm-project/pull/89951 _

[llvm-branch-commits] [clang] release/18.x: [Clang] Handle structs with inner structs and no fields (#89126) (PR #89456)

2024-04-19 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: LGTM This only impacts code using dynamic object sizes, which... I'm not sure how widely it's actually used outside the Linux kernel. Implementation-wise, should be pretty safe. There's some minor risk because the revised recursion visits RecordDecls it wouldn't look in

[llvm-branch-commits] [clang] release/18.x [X86_64] fix SSE type error in vaarg (PR #86698)

2024-04-16 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: Right, the policy doesn't say we can only take regression fixes. We just need to weight the impact vs. the risk. Looking at the latest conversation on the bug report this case is pretty clearly still broken. It's improved in the sense that after the va_arg of the struct

[llvm-branch-commits] [llvm] Backport: Prepend all library intrinsics with `#` when building for Arm64EC (PR #88016)

2024-04-08 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: LGTM. (This only affects Arm64EC, so it's very safe to backport.) https://github.com/llvm/llvm-project/pull/88016 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[llvm-branch-commits] [clang][CallGraphSection] Add type id metadata to indirect call and targets (PR #87573)

2024-04-05 Thread Eli Friedman via llvm-branch-commits
@@ -93,9 +93,17 @@ RValue CodeGenFunction::EmitCXXMemberOrOperatorCall( *this, MD, This, ImplicitParam, ImplicitParamTy, CE, Args, RtlArgs); auto &FnInfo = CGM.getTypes().arrangeCXXMethodCall( Args, FPT, CallInfo.ReqArgs, CallInfo.PrefixSize); - return EmitCall(F

[llvm-branch-commits] [clang] release/18.x [X86_64] fix SSE type error in vaarg (PR #86698)

2024-03-26 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: Is there some reason you think we should take this specific patch, out of all the x86 ABI fixes going in recently? It isn't a regression, as far as I know. https://github.com/llvm/llvm-project/pull/86698 ___ llvm-branch-commits m

[llvm-branch-commits] [lld] [llvm] Backport fixes for ARM64EC import libraries (PR #84590)

2024-03-11 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: So your use-case is basically equivalent to using llvm-dlltool, except not using the text parser? If this is actually enough to make Rust targets usable, then I guess we could consider it, but the fixes aren't structured in a way to make it obvious this won't impact non-A

[llvm-branch-commits] [lld] [llvm] Backport fixes for ARM64EC import libraries (PR #84590)

2024-03-11 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: This seems like a pretty big change to backport... how useful is it in practice? I was under the impression that arm64ec lld support is still immature... and if you're using the MSVC linker, you might as well use the MSVC lib/dlltool. https://github.com/llvm/llvm-project

[llvm-branch-commits] [llvm] Backport ARM64EC variadic args fixes to LLVM 18 (PR #81800)

2024-03-11 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/81800 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commit

[llvm-branch-commits] [clang] release/18.x: [ObjC] Check entire chain of superclasses to determine class layout (PR #84093)

2024-03-11 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic requested changes to this pull request. We usually only take bugfixes on release branches (miscompiles/crashes/etc.). https://github.com/llvm/llvm-project/pull/84093 ___ llvm-branch-commits mailing list llvm-branch-comm

[llvm-branch-commits] [llvm] release/18.x: [ARM] Switch to LiveRegUnits to fix r7 register allocation bug (PR #84475)

2024-03-11 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic requested changes to this pull request. This is, as far as I can tell, not a miscompile; probably not worth taking on the 18.x branch. (Also, it's usually not a good idea to open a PR for a cherry-pick before the original patch is merged.) https://github.com/l

[llvm-branch-commits] [llvm] Backport ARM64EC variadic args fixes to LLVM 18 (PR #81800)

2024-02-28 Thread Eli Friedman via llvm-branch-commits
https://github.com/efriedma-quic commented: Looks fine, but I think merging might need to wait for a point release? CC @tstellar . https://github.com/llvm/llvm-project/pull/81800 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org

[llvm-branch-commits] [llvm] Backport ARM64EC variadic args fixes to LLVM 18 (PR #81800)

2024-02-14 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: I was sort of waiting until the discussion on #80994 resolves... we might end up reverting parts of #80595 . I guess it won't do any harm to land as-is, though. https://github.com/llvm/llvm-project/pull/81800 ___ llvm-branch-comm

[llvm-branch-commits] [llvm] [LivePhysRegs] Add callee-saved regs from MFI in addLiveOutsNoPristines. (PR #73553)

2023-12-12 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: Just looked at https://gist.github.com/fhahn/67937125b64440a8a414909c4a1b7973 ; that seems roughly appropriate. It's a little ugly to set the bit to false, then set it back to true, though; I'd rather just explicitly check whether all return instructions are LDMIA_RET/t2L

[llvm-branch-commits] [llvm] [LivePhysRegs] Add callee-saved regs from MFI in addLiveOutsNoPristines. (PR #73553)

2023-12-12 Thread Eli Friedman via llvm-branch-commits
efriedma-quic wrote: > After PEI the liveness of LR needs to be accurately reflected and tail calls > could (should?) always "use" LR. That would either prevent outlining or cause > the outliner to preserve LR across introduced calls. I'll elaborate on this a bit. I think long-term, the way w

[llvm-branch-commits] [llvm] 4a51298 - [AArch64][SVE] Implement SPLAT_VECTOR for i1 vectors.

2019-12-09 Thread Eli Friedman via llvm-branch-commits
Author: Eli Friedman Date: 2019-12-09T15:04:40-08:00 New Revision: 4a51298c13005be05e100f0ef46dbac47623bcd6 URL: https://github.com/llvm/llvm-project/commit/4a51298c13005be05e100f0ef46dbac47623bcd6 DIFF: https://github.com/llvm/llvm-project/commit/4a51298c13005be05e100f0ef46dbac47623bcd6.diff