pcc wrote:
Sorry, I was having a problem with spr with this change so I pushed the
updated change directly to the branch.
I think there are some merge conflicts by now in the include list but they
should be easy to resolve.
--
Peter
On Sat, Jun 14, 2025, 17:58 Fangrui Song ***@***.***> wrote:
pcc wrote:
> At least a comment in the code would be good. A variety of people end up
> using these tools for tests, and I could see someone getting confused as to
> why the guid doesn't match what's e.g. in the ThinLTO index. For that
> understanding you'd have to read more than just what thi
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/143992
>From f11d7d544cc61dce582de538608bfd512147f90a Mon Sep 17 00:00:00 2001
From: Peter Collingbourne
Date: Thu, 12 Jun 2025 16:06:14 -0700
Subject: [PATCH 1/2] Upload correct patch
Created using spr 1.3.6-beta.1
---
l
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/143992
>From f11d7d544cc61dce582de538608bfd512147f90a Mon Sep 17 00:00:00 2001
From: Peter Collingbourne
Date: Thu, 12 Jun 2025 16:06:14 -0700
Subject: [PATCH] Upload correct patch
Created using spr 1.3.6-beta.1
---
llvm/
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/143992
>From f11d7d544cc61dce582de538608bfd512147f90a Mon Sep 17 00:00:00 2001
From: Peter Collingbourne
Date: Thu, 12 Jun 2025 16:06:14 -0700
Subject: [PATCH] Upload correct patch
Created using spr 1.3.6-beta.1
---
llvm/
pcc wrote:
> This needs a caveat somewhere (either in printed usage message or in a
> comment) that this won't work for local linkage symbols (I suppose the user
> could give the "file:" prefix but that won't work if
> -funique-internal-linkage-names was specified etc).
I'm not sure that is w
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/143992
>From f11d7d544cc61dce582de538608bfd512147f90a Mon Sep 17 00:00:00 2001
From: Peter Collingbourne
Date: Thu, 12 Jun 2025 16:06:14 -0700
Subject: [PATCH] Upload correct patch
Created using spr 1.3.6-beta.1
---
llvm/
https://github.com/pcc created https://github.com/llvm/llvm-project/pull/143992
This is useful for debugging ThinLTO issues.
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-
pcc wrote:
@MaskRay ping.
https://github.com/llvm/llvm-project/pull/138366
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/142887
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/142887
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
pcc wrote:
> Could we have a test that demonstrates the new better instruction sequence
> (by precommiting to show the diff here)?
Done, see #143189
https://github.com/llvm/llvm-project/pull/142887
___
llvm-branch-commits mailing list
llvm-branch-com
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/142887
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/142887
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/142886
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/142886
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/141327
>From b36c74c344ed47b99e9bfdc28f9081c3c704d8c7 Mon Sep 17 00:00:00 2001
From: Peter Collingbourne
Date: Tue, 27 May 2025 23:08:59 -0700
Subject: [PATCH] Format
Created using spr 1.3.6-beta.1
---
llvm/lib/Transforms
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/141327
>From b36c74c344ed47b99e9bfdc28f9081c3c704d8c7 Mon Sep 17 00:00:00 2001
From: Peter Collingbourne
Date: Tue, 27 May 2025 23:08:59 -0700
Subject: [PATCH] Format
Created using spr 1.3.6-beta.1
---
llvm/lib/Transforms
@@ -2478,3 +2479,76 @@ PreservedAnalyses LowerTypeTestsPass::run(Module &M,
return PreservedAnalyses::all();
return PreservedAnalyses::none();
}
+
+PreservedAnalyses SimplifyTypeTestsPass::run(Module &M,
+ ModuleAnalysisManager
@@ -2478,3 +2479,76 @@ PreservedAnalyses LowerTypeTestsPass::run(Module &M,
return PreservedAnalyses::all();
return PreservedAnalyses::none();
}
+
+PreservedAnalyses SimplifyTypeTestsPass::run(Module &M,
+ ModuleAnalysisManager
@@ -2478,3 +2479,76 @@ PreservedAnalyses LowerTypeTestsPass::run(Module &M,
return PreservedAnalyses::all();
return PreservedAnalyses::none();
}
+
+PreservedAnalyses SimplifyTypeTestsPass::run(Module &M,
+ ModuleAnalysisManager
@@ -2478,3 +2479,76 @@ PreservedAnalyses LowerTypeTestsPass::run(Module &M,
return PreservedAnalyses::all();
return PreservedAnalyses::none();
}
+
+PreservedAnalyses SimplifyTypeTestsPass::run(Module &M,
+ ModuleAnalysisManager
@@ -0,0 +1,40 @@
+; RUN: opt -S %s -passes=simplify-type-tests | FileCheck %s
pcc wrote:
Done
https://github.com/llvm/llvm-project/pull/141327
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
htt
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/141327
>From b36c74c344ed47b99e9bfdc28f9081c3c704d8c7 Mon Sep 17 00:00:00 2001
From: Peter Collingbourne
Date: Tue, 27 May 2025 23:08:59 -0700
Subject: [PATCH] Format
Created using spr 1.3.6-beta.1
---
llvm/lib/Transforms
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/141327
>From b36c74c344ed47b99e9bfdc28f9081c3c704d8c7 Mon Sep 17 00:00:00 2001
From: Peter Collingbourne
Date: Tue, 27 May 2025 23:08:59 -0700
Subject: [PATCH] Format
Created using spr 1.3.6-beta.1
---
llvm/lib/Transforms
@@ -7170,16 +7165,31 @@ bool X86TTIImpl::isProfitableToSinkOperands(Instruction
*I,
II->getIntrinsicID() == Intrinsic::fshr)
ShiftAmountOpNum = 2;
}
-
if (ShiftAmountOpNum == -1)
return false;
+ auto *ShiftAmount = &I->getOperandUse(ShiftAmountOpNum);
pcc wrote:
> Missing verifier checks?
Right, I guess the new operand can either be null (no deactivation symbol) or a
globalvariable.
https://github.com/llvm/llvm-project/pull/133537
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm
@@ -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)));
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/141327
>From b36c74c344ed47b99e9bfdc28f9081c3c704d8c7 Mon Sep 17 00:00:00 2001
From: Peter Collingbourne
Date: Tue, 27 May 2025 23:08:59 -0700
Subject: [PATCH] Format
Created using spr 1.3.6-beta.1
---
llvm/lib/Transforms
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/141327
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/141327
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc edited https://github.com/llvm/llvm-project/pull/141327
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
pcc wrote:
> This PR doesn't entirely fix the problem. Another case that I'm seeing (and
> which is more effectively prevented by the previous approach) is where GVN
> PRE moves the zext behind a phi, and after subsequent optimization passes it
> turns into a phi pointing to other phis which u
pcc wrote:
Depends on #141326
https://github.com/llvm/llvm-project/pull/141716
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc created https://github.com/llvm/llvm-project/pull/141716
isProfitableToSinkOperands() may now return a phi node. If it does,
check that all incoming values are identical and if so, replace the phi
use with a clone of the incoming value. Use this mechanism to sink phi
node o
pcc wrote:
I'm fixing the code generation for the test cases that I'm adding
(inhibit-zext-constant-hoist.ll) which were all extracted from a build of a
large internal program built with CFI. Previously f1 looked like this where
align was hoisted:
```
f1: #
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/141324
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -1019,8 +1019,14 @@ LowerTypeTestsModule::importTypeId(StringRef TypeId) {
return C;
};
- if (TIL.TheKind != TypeTestResolution::Unsat)
-TIL.OffsetedGlobal = ImportGlobal("global_addr");
+ if (TIL.TheKind != TypeTestResolution::Unsat) {
+auto *GV = ImportGlo
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/141324
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc approved this pull request.
Cloning makes sense to me at least to begin with. Since fat LTO is a seldomly
used feature, it may be better overall to be a bit less efficient in order to
reduce the overall maintenance burden.
https://github.com/llvm/llvm-project/pull/13
@@ -1951,9 +1952,23 @@ let Predicates = [HasPAuth] in {
let Uses = [X16];
}
+ def AUTxMxN : Pseudo<(outs GPR64:$AuthVal, GPR64common:$Scratch),
+ (ins GPR64:$Val, i32imm:$Key,
+i64imm:$Disc, GPR64:$AddrDisc),
+
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/133538
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/133538
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc updated 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
https://github.com/pcc updated 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
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/133536
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/133536
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/133535
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/133535
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/133534
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/133534
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/133533
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/133533
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/133531
>From 96e7da9a083888683c2ba00d97f886fd748ea10b Mon Sep 17 00:00:00 2001
From: Peter Collingbourne
Date: Wed, 9 Apr 2025 20:30:57 -0700
Subject: [PATCH] Undo unnecessary change
Created using spr 1.3.6-beta.1
---
lld
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/133531
>From 96e7da9a083888683c2ba00d97f886fd748ea10b Mon Sep 17 00:00:00 2001
From: Peter Collingbourne
Date: Wed, 9 Apr 2025 20:30:57 -0700
Subject: [PATCH] Undo unnecessary change
Created using spr 1.3.6-beta.1
---
lld
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/133530
>From b37a44fff650b06eda249060277d0c007226cad2 Mon Sep 17 00:00:00 2001
From: Peter Collingbourne
Date: Thu, 3 Apr 2025 21:51:44 -0700
Subject: [PATCH] Fix CMake build
Created using spr 1.3.6-beta.1
---
compiler-rt
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/133530
>From b37a44fff650b06eda249060277d0c007226cad2 Mon Sep 17 00:00:00 2001
From: Peter Collingbourne
Date: Thu, 3 Apr 2025 21:51:44 -0700
Subject: [PATCH] Fix CMake build
Created using spr 1.3.6-beta.1
---
compiler-rt
pcc wrote:
I thought about it some more and decided to go with your suggested approach
anyway. Among other things, #133536 will mean that deactivation symbol support
will be needed for the pseudo instruction in order to avoid deactivation symbol
relocations being silently dropped, so it's best
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/134197
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/134197
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc edited https://github.com/llvm/llvm-project/pull/132857
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/132857
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/132857
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc created https://github.com/llvm/llvm-project/pull/141327
This pass figures out whether inlining has exposed a constant address to
a lowered type test, and remove the test if so and the address is known
to pass the test. Unfortunately this pass ends up needing to reverse
eng
https://github.com/pcc created https://github.com/llvm/llvm-project/pull/141325
LICM hoists instructions into the preheader, and CSE and GVN
can effectively perform a hoist by replacing an instruction with
one from another basic block, all of which can lead to the same
kinds of pessimizations tha
https://github.com/pcc created https://github.com/llvm/llvm-project/pull/141326
Casts taking a constant expression (generally derived from a global
variable address) as an operand are not profitable to CSE because they
appear as subexpressions in the instruction sequence generated by the
LowerTyp
https://github.com/pcc created https://github.com/llvm/llvm-project/pull/141324
This is either a vtable (in .data.rel.ro) or a jump table (in .text).
Either way it's expected to be in the low 2 GiB, so set the small
code model.
___
llvm-branch-commit
@@ -7538,6 +7538,14 @@ static bool IsEligibleForTrivialRelocation(Sema &SemaRef,
if (!SemaRef.IsCXXTriviallyRelocatableType(Field->getType()))
return false;
}
+
+ // FIXME: PFP should not affect trivial relocatability, instead it should
+ // affect the implementat
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/140312
>From 1399ec4fdf8fe08000b590844f4e24c31a310a01 Mon Sep 17 00:00:00 2001
From: Peter Collingbourne
Date: Wed, 21 May 2025 16:20:57 -0700
Subject: [PATCH] Add test with variable count
Created using spr 1.3.6-beta.1
--
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/138366
>From d67e152baaf8487e5cb049166ce61e905011171e Mon Sep 17 00:00:00 2001
From: Peter Collingbourne
Date: Wed, 30 Apr 2025 18:25:54 -0700
Subject: [PATCH] ELF: Add branch-to-branch optimization.
MIME-Version: 1.0
Conte
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/140312
>From 1399ec4fdf8fe08000b590844f4e24c31a310a01 Mon Sep 17 00:00:00 2001
From: Peter Collingbourne
Date: Wed, 21 May 2025 16:20:57 -0700
Subject: [PATCH] Add test with variable count
Created using spr 1.3.6-beta.1
--
pcc wrote:
Right, this feature doesn't change section sizes, so there shouldn't be an
interaction with SHT_LLVM_BB_ADDR_MAP. AFAICT LLD doesn't contain code that
parses SHT_LLVM_BB_ADDR_MAP so I don't see value in adding a test for it.
https://github.com/llvm/llvm-project/pull/138366
_
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/138366
>From 03060849dc81f83ec48f05995ac8fd6df846c25b Mon Sep 17 00:00:00 2001
From: Peter Collingbourne
Date: Fri, 2 May 2025 16:57:28 -0700
Subject: [PATCH 1/5] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=
=?U
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/138366
>From e0581c892d07d8bb5518fa412b75b8830f5fb14a Mon Sep 17 00:00:00 2001
From: Peter Collingbourne
Date: Wed, 30 Apr 2025 18:25:54 -0700
Subject: [PATCH] ELF: Add branch-to-branch optimization.
MIME-Version: 1.0
Conte
@@ -0,0 +1,92 @@
+//===- TargetImpl.h -*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -0,0 +1,92 @@
+//===- TargetImpl.h -*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -975,6 +977,62 @@ void AArch64::relocateAlloc(InputSectionBase &sec, uint8_t
*buf) const {
}
}
+static std::optional getControlTransferAddend(InputSection &is,
+Relocation &r) {
+ // Identify a control transfer rel
@@ -0,0 +1,92 @@
+//===- TargetImpl.h -*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
https://github.com/pcc edited https://github.com/llvm/llvm-project/pull/138366
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/pcc edited https://github.com/llvm/llvm-project/pull/138366
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -8,7 +8,7 @@ struct S trivially_relocatable_if_eligible {
};
// CHECK: @_Z4testP1SS0_
-// CHECK: call void @llvm.memmove.p0.p0.i64
+// CHECK: call void @llvm.memmove.p0.p0.i64({{.*}}, i64 8
pcc wrote:
Done
https://github.com/llvm/llvm-project/pull/140312
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/140312
>From 1399ec4fdf8fe08000b590844f4e24c31a310a01 Mon Sep 17 00:00:00 2001
From: Peter Collingbourne
Date: Wed, 21 May 2025 16:20:57 -0700
Subject: [PATCH] Add test with variable count
Created using spr 1.3.6-beta.1
--
@@ -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));
+
https://github.com/pcc created https://github.com/llvm/llvm-project/pull/140312
The builtin is documented to copy `count` elements, but the implementation
copies `count` bytes. Fix that.
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.
@@ -362,6 +362,17 @@ class LangOptionsBase {
BKey
};
+ enum class PointerFieldProtectionKind {
pcc wrote:
I think that allowing this level of customization should be implemented as part
of the separate opt-in solution (e.g. it may be a property of the
https://github.com/pcc commented:
Hi Oliver, thanks for your comments! I'll address them below.
> Thoughts:
>
> This should be opt-in on a field or struct granularity, not just a global
> behavior.
This would certainly be easier if it were an opt-in behavior, as it would allow
avoiding a sub
@@ -2201,6 +2215,22 @@ void CodeGenFunction::EmitCXXConstructorCall(
EmitTypeCheck(CodeGenFunction::TCK_ConstructorCall, Loc, This,
getContext().getRecordType(ClassDecl), CharUnits::Zero());
+ // When initializing an object that has pointer field protect
@@ -928,6 +936,11 @@ namespace {
if (PointerAuthQualifier Q = F->getType().getPointerAuth();
Q && Q.isAddressDiscriminated())
return false;
+ // Non-trivially-copyable fields with pointer field protection need to be
pcc wrote:
We c
https://github.com/pcc edited https://github.com/llvm/llvm-project/pull/133538
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -2268,13 +2293,22 @@ CodeGenFunction::EmitNullInitialization(Address
DestPtr, QualType Ty) {
// Get and call the appropriate llvm.memcpy overload.
Builder.CreateMemCpy(DestPtr, SrcPtr, SizeVal, false);
-return;
+ } else {
+// Otherwise, just memset the who
@@ -2976,7 +3006,15 @@ void CodeGenFunction::EmitForwardingCallToLambda(
QualType resultType = FPT->getReturnType();
ReturnValueSlot returnSlot;
if (!resultType->isVoidType() &&
- calleeFnInfo->getReturnInfo().getKind() == ABIArgInfo::Indirect &&
+ (calleeFnInfo
@@ -544,6 +544,7 @@ TYPE_TRAIT_2(__is_pointer_interconvertible_base_of,
IsPointerInterconvertibleBas
#include "clang/Basic/TransformTypeTraits.def"
// Clang-only C++ Type Traits
+TYPE_TRAIT_1(__has_non_relocatable_fields, HasNonRelocatableFields, KEYCXX)
pcc
@@ -7756,6 +7756,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction
&JA,
Args.addOptInFlag(CmdArgs, options::OPT_funique_source_file_names,
options::OPT_fno_unique_source_file_names);
+ if (!IsCudaDevice)
pcc wrote:
With CU
@@ -7538,6 +7538,14 @@ static bool IsEligibleForTrivialRelocation(Sema &SemaRef,
if (!SemaRef.IsCXXTriviallyRelocatableType(Field->getType()))
return false;
}
+
+ // FIXME: PFP should not affect trivial relocatability, instead it should
+ // affect the implementat
@@ -2513,6 +2513,12 @@ def CountedByOrNull : DeclOrTypeAttr {
let LangOpts = [COnly];
}
+def NoPointerFieldProtection : DeclOrTypeAttr {
pcc wrote:
There are numerous circumstances where the C++ ABI is distinct from the
platform ABI and is allowed to chang
@@ -441,6 +445,254 @@ bool
PreISelIntrinsicLowering::expandMemIntrinsicUses(Function &F) const {
return Changed;
}
+namespace {
+
+enum class PointerEncoding {
+ Rotate,
+ PACCopyable,
+ PACNonCopyable,
+};
+
+bool expandProtectedFieldPtr(Function &Intr) {
+ Module &M =
@@ -1415,6 +1469,52 @@ void CodeGenFunction::CreateCoercedStore(llvm::Value
*Src, Address Dst,
}
}
+ // Coercion directly through memory does not work if the structure has
pointer
+ // field protection because the struct passed by value has a different bit
+ // patt
@@ -3011,6 +3011,12 @@ defm experimental_omit_vtable_rtti :
BoolFOption<"experimental-omit-vtable-rtti"
NegFlag,
BothFlags<[], [CC1Option], " the RTTI component from virtual tables">>;
+def experimental_pointer_field_protection_EQ : Joined<["-"],
"fexperimental-pointer-f
pcc wrote:
Thanks for your suggestion, I tried it. This is the patch:
https://github.com/pcc/llvm-project/tree/pfp-autxmxn
I found that it was more code (it adds 102 insertions(+), 66 deletions(-) on
top of this patch). And I only implemented the SDAG side so far, not GISel. So
I'm inclined n
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/133535
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
1 - 100 of 240 matches
Mail list logo