https://github.com/nikic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/115414
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -577,6 +577,21 @@ bool llvm::inferNonMandatoryLibFuncAttrs(Function &F,
Changed |= setDoesNotCapture(F, 0);
Changed |= setArgNoUndef(F, 1);
break;
+ case LibFunc_reallocarray:
+Changed |= setAllocFamily(F, "malloc");
+Changed |= setAllocKind(F, AllocFnKi
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/116331
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -53,3 +53,6 @@ LLVM_FIXED_MD_KIND(MD_DIAssignID, "DIAssignID", 38)
LLVM_FIXED_MD_KIND(MD_coro_outside_frame, "coro.outside.frame", 39)
LLVM_FIXED_MD_KIND(MD_mmra, "mmra", 40)
LLVM_FIXED_MD_KIND(MD_noalias_addrspace, "noalias.addrspace", 41)
+// TODO: this will likelly be pla
nikic wrote:
@sbc100 That wasm is not necessarily a miscompile, it may be UB in the source
program, if it uses a negative number in an *unsigned* variable to index an
array. Is the affected code clean under ubsan? (See
https://github.com/llvm/llvm-project/issues/108770 for a similar report tha
https://github.com/nikic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/116856
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/116460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/116316
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/116549
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
nikic wrote:
There's an existing PR for this here:
https://github.com/llvm/llvm-project/pull/110758
https://github.com/llvm/llvm-project/pull/116556
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinf
nikic wrote:
Closing this in favor of the merged
https://github.com/llvm/llvm-project/pull/116556.
https://github.com/llvm/llvm-project/pull/110758
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/110758
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/117469
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
nikic wrote:
Hm, I would have expected the removal in opt to break polly tests using
`%loadPolly` (which still use the legacy PM).
https://github.com/llvm/llvm-project/pull/117644
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.l
nikic wrote:
> Is there a branch up for this on https://llvm-compile-time-tracker.com/ so
> that we've verified that this actually improves performance?
Compile-time:
https://llvm-compile-time-tracker.com/compare.php?from=105b7803ea22823a2fca2a82ee843d0884e9cbf3&to=dcb3e2b6b4333556fbfa3d7a5a45
nikic wrote:
FYI this seems to have significant cost for some types of C++ code, in
particular clang build time regresses by 0.35%
(https://llvm-compile-time-tracker.com/compare.php?from=4a7b56e6e7dd0f83c379ad06b6e81450bc691ba6&to=486644723038555a224fd09d462bb5099e64809e&stat=instructions:u).
@@ -1875,13 +1873,17 @@ Instruction *InstCombinerImpl::visitFPTrunc(FPTruncInst
&FPT) {
// fptrunc (select Cond, (fpext X), Y --> select Cond, X, (fptrunc Y)
Value *NarrowY = Builder.CreateFPTrunc(Y, Ty);
Value *Sel = Builder.CreateSelect(Cond, X, NarrowY, "n
https://github.com/nikic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/117498
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -18197,7 +18197,7 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned
BuiltinID,
CallOps.push_back(Ops[i]);
llvm::Function *F = CGM.getIntrinsic(ID);
Value *Call = Builder.CreateCall(F, CallOps);
-return Builder.CreateAlignedStore(Call, Ops[0], MaybeAli
https://github.com/nikic approved this pull request.
LGTM, thanks!
https://github.com/llvm/llvm-project/pull/116888
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1898,6 +1882,60 @@ static Instruction *foldSelectICmpEq(SelectInst &SI,
ICmpInst *ICI,
return nullptr;
}
+/// Fold `X Pred C1 ? X BOp C2 : C1 BOp C2` to `min/max(X, C1) BOp C2`.
+/// This allows for better canonicalization.
+static Value *foldSelectWithConstOpToBinOp(IC
@@ -1898,6 +1882,60 @@ static Instruction *foldSelectICmpEq(SelectInst &SI,
ICmpInst *ICI,
return nullptr;
}
+/// Fold `X Pred C1 ? X BOp C2 : C1 BOp C2` to `min/max(X, C1) BOp C2`.
+/// This allows for better canonicalization.
+static Value *foldSelectWithConstOpToBinOp(IC
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/116888
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
nikic wrote:
> @nikic By the way, are there plans to support allocation functions other than
> alloca in this check? I don't see currently any llvm passes assigning
> dereferenceable(_or_null) attribute to something like `malloc(42)` , but I
> don't see why not and in that case this should als
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/118309
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic commented:
Looks reasonable to me.
We might want to use this chance to also get the information up to date...
I think for polly this should probably be @tobiasgrosser -> @Meinersbur.
For libclc maybe @tstellar -> @frasercrmck (or maybe both).
https://github.com/llvm/l
nikic wrote:
You'll have to create an RFC on discourse if you want to add a new
target-independent memory intrinsic.
Though if changing the name is the extent of the "special handling" you need,
we probably shouldn't be adding an intrinsic for that.
https://github.com/llvm/llvm-project/pull/1
@@ -434,29 +433,17 @@ Others only have a lead maintainer listed here.
[Flang
maintainers](https://github.com/llvm/llvm-project/blob/main/flang/Maintainers.txt)
-[LLD
maintainers](https://github.com/llvm/llvm-project/blob/main/lld/CODE_OWNERS.TXT)
-
-[LLDB
maintainers](http
nikic wrote:
For openmp I'm not really sure, maybe @jdoerfert or @jpeyton52 can advise.
https://github.com/llvm/llvm-project/pull/118309
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/116168
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Nikita Popov
Date: 2024-11-15T16:54:33+01:00
New Revision: bc3b0fadd5120bd88ed6635583941f7763523c0a
URL:
https://github.com/llvm/llvm-project/commit/bc3b0fadd5120bd88ed6635583941f7763523c0a
DIFF:
https://github.com/llvm/llvm-project/commit/bc3b0fadd5120bd88ed6635583941f7763523c0a.diff
@@ -31,6 +31,7 @@
#include "clang/Basic/PointerAuthOptions.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/Specifiers.h"
+#include "clang/Basic/TargetInfo.h"
nikic wrote:
I dropped this include again in
https://github.com/llvm/llvm-project/co
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/116459
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -14,14 +14,10 @@
#include "clang/Basic/CharInfo.h"
#include "clang/Basic/FileManager.h"
#include "clang/Lex/HeaderMapTypes.h"
-#include "llvm/ADT/SmallString.h"
#include "llvm/Support/Compiler.h"
-#include "llvm/Support/DataTypes.h"
#include "llvm/Support/Debug.h"
#includ
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/116461
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
nikic wrote:
Please also rebase, I expect https://github.com/llvm/llvm-project/pull/118195
will results in some test changes.
https://github.com/llvm/llvm-project/pull/116888
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.o
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/116888
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic updated
https://github.com/llvm/llvm-project/pull/118819
>From 1dadf4d77f1cec342179b923d3ab37ea3b983a25 Mon Sep 17 00:00:00 2001
From: Nikita Popov
Date: Thu, 5 Dec 2024 12:10:59 +0100
Subject: [PATCH] [SCCP] Infer nuw for gep nusw with non-negative offsets
If the GEP
Timm =?utf-8?q?Bäder?= ,
Timm =?utf-8?q?Bäder?=
Message-ID:
In-Reply-To:
nikic wrote:
It looks like this still fails on i386 after the reapply:
```
RUN: at line 1:
/builddir/build/BUILD/llvm-20.0.0_pre20241205.gb86a5993bc7be5-build/llvm-project-b86a5993bc7be59b49879a0e768f53b7330f71b2/llvm/r
nikic wrote:
Reverted this because it breaks a the build. I initially assumed this is due to
disabled docs per the previous comment, but I think in my case the problem is
actually that this seems to be trying to write to the source directory, which
is forbidden. If you need to write out files,
nikic wrote:
Reading back here, the general thing you are trying to do here is not allowed.
At best you can add this as a manually invoked target that is not implicitly
called by anything else. Though the actually correct way to handle this is what
was proposed in https://github.com/llvm/llvm-
@@ -37,8 +37,8 @@ void ConstantInitFuture::abandon() {
void ConstantInitFuture::installInGlobal(llvm::GlobalVariable *GV) {
assert(Data && "installing null future");
- if (Data.is()) {
-GV->setInitializer(Data.get());
+ if (auto *C = dyn_cast(Data)) {
+GV->setIniti
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/118734
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic approved this pull request.
Confirmed that this works on GCC now. I'd suggest to replace the use of
StringLiteral::size with plain sizeof(). The build time overhead of going
through StringLiteral here is substantial.
https://github.com/llvm/llvm-project/pull/118734
___
@@ -68,23 +69,156 @@ enum ID {
FirstTSBuiltin
};
+// The info used to represent each builtin.
struct Info {
- llvm::StringLiteral Name;
- const char *Type, *Attributes;
- const char *Features;
+ // Rather than store pointers to the string literals describing these four
@@ -68,23 +69,156 @@ enum ID {
FirstTSBuiltin
};
+// The info used to represent each builtin.
struct Info {
- llvm::StringLiteral Name;
- const char *Type, *Attributes;
- const char *Features;
+ // Rather than store pointers to the string literals describing these four
https://github.com/nikic requested changes to this pull request.
Fails to build with GCC:
```
FAILED: tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Builtins.cpp.o
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/c++ -DCLANG_EXPORTS
-DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CON
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/118819
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/118600
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
nikic wrote:
It looks like this causes a significant compile-time regression:
https://llvm-compile-time-tracker.com/compare.php?from=2b855dd97092e2178ac5c470a804a17ec440d7e5&to=9ccde12f5eeb91152900082a2ae839e2a9702b31&stat=instructions:u
(Maybe most clearly seen during clang bootstrap, where th
https://github.com/nikic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/119178
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID:
In-Reply-To:
nikic wrote:
@erichkeane I'm not seeing any significant compile-time impact:
https://llvm-compile-time-tracker.com/compare.php?from=e0ea9fd6dc36f585e364d4e569095ebe063e2573&to=7fb8c423fddd1a81287b54f48da4de1c81566fc1&stat=instructions
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/119214
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic created
https://github.com/llvm/llvm-project/pull/119225
When we have a gep inbounds from the base of an object (e.g. alloca or global),
we know that the index cannot be negative, as this would go out of bounds. As
such, we can infer nuw as well.
The implementation is
https://github.com/nikic updated
https://github.com/llvm/llvm-project/pull/120719
>From cf1a8ee68d10668c1031a21daa251108c4fca98c Mon Sep 17 00:00:00 2001
From: Nikita Popov
Date: Fri, 20 Dec 2024 12:41:01 +0100
Subject: [PATCH 1/4] [Clang] Adjust pointer-overflow sanitizer for N3322
N3322 make
https://github.com/nikic commented:
As you still support the legacy format, could you please restrict this PR to
only the parser changes, and leave the printer changes (and the mass test
update they require) to a followup?
https://github.com/llvm/llvm-project/pull/121838
__
@@ -2761,6 +2761,41 @@ etc.).
Query for this feature with
``__has_builtin(__builtin_assume_separate_storage)``.
+``__builtin_assume_dereferenceable``
+-
+
+``__builtin_assume_derefernceable`` is used to provide the optimizer with the
+know
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/125158
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/125631
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/125630
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -358,49 +360,64 @@ UseCaptureKind llvm::DetermineUseCaptureKind(
// Volatile stores make the address observable.
auto *ACXI = cast(I);
if (U.getOperandNo() == 1 || U.getOperandNo() == 2 || ACXI->isVolatile())
- return UseCaptureKind::MAY_CAPTURE;
-return
@@ -358,49 +360,59 @@ UseCaptureKind llvm::DetermineUseCaptureKind(
// Volatile stores make the address observable.
auto *ACXI = cast(I);
if (U.getOperandNo() == 1 || U.getOperandNo() == 2 || ACXI->isVolatile())
- return UseCaptureKind::MAY_CAPTURE;
-return
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/126280
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/126279
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1097,31 +1097,10 @@ llvm::Type *CodeGenModule::getBlockDescriptorType() {
if (BlockDescriptorType)
return BlockDescriptorType;
- llvm::Type *UnsignedLongTy =
-getTypes().ConvertType(getContext().UnsignedLongTy);
-
- // struct __block_descriptor {
- // unsign
@@ -347,7 +347,7 @@ void
CodeGenFunction::registerGlobalDtorWithAtExit(llvm::Constant *dtorStub) {
// extern "C" int atexit(void (*f)(void));
assert(dtorStub->getType() ==
llvm::PointerType::get(
- llvm::FunctionType::get(CGM.VoidTy, false),
+
@@ -197,10 +198,9 @@ class Address {
/// Return the type of the pointer value.
llvm::PointerType *getType() const {
-return llvm::PointerType::get(
-ElementType,
-llvm::cast(Pointer.getPointer()->getType())
-->getAddressSpace());
+auto A
@@ -388,22 +385,16 @@ Address
HexagonABIInfo::EmitVAArgForHexagonLinux(CodeGenFunction &CGF,
CGF.Builder.CreateStore(__new_overflow_area_pointer,
__current_saved_reg_area_pointer_p);
- // Bitcast the overflow area pointer to the type of argument.
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/126278
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic updated
https://github.com/llvm/llvm-project/pull/125880
>From 2f698e27ae61b91019544cc707c134e0aec9ecd3 Mon Sep 17 00:00:00 2001
From: Nikita Popov
Date: Thu, 30 Jan 2025 12:08:01 +0100
Subject: [PATCH 1/7] [CaptureTracking][FunctionAttrs] Add support for
CaptureInfo
@@ -358,49 +363,54 @@ UseCaptureKind llvm::DetermineUseCaptureKind(
// Volatile stores make the address observable.
auto *ACXI = cast(I);
if (U.getOperandNo() == 1 || U.getOperandNo() == 2 || ACXI->isVolatile())
- return UseCaptureKind::MAY_CAPTURE;
-return
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/126464
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/126461
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/126462
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/125880
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/126429
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/126428
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -358,49 +360,64 @@ UseCaptureKind llvm::DetermineUseCaptureKind(
// Volatile stores make the address observable.
auto *ACXI = cast(I);
if (U.getOperandNo() == 1 || U.getOperandNo() == 2 || ACXI->isVolatile())
- return UseCaptureKind::MAY_CAPTURE;
-return
@@ -774,7 +774,7 @@ define i1 @captureICmpRev(ptr %x) {
define i1 @nocaptureInboundsGEPICmp(ptr %x) {
; FNATTRS: Function Attrs: mustprogress nofree norecurse nosync nounwind
willreturn memory(none)
; FNATTRS-LABEL: define i1 @nocaptureInboundsGEPICmp
-; FNATTRS-SAME: (ptr rea
@@ -358,49 +360,64 @@ UseCaptureKind llvm::DetermineUseCaptureKind(
// Volatile stores make the address observable.
auto *ACXI = cast(I);
if (U.getOperandNo() == 1 || U.getOperandNo() == 2 || ACXI->isVolatile())
- return UseCaptureKind::MAY_CAPTURE;
-return
@@ -358,49 +360,59 @@ UseCaptureKind llvm::DetermineUseCaptureKind(
// Volatile stores make the address observable.
auto *ACXI = cast(I);
if (U.getOperandNo() == 1 || U.getOperandNo() == 2 || ACXI->isVolatile())
- return UseCaptureKind::MAY_CAPTURE;
-return
@@ -774,7 +774,7 @@ define i1 @captureICmpRev(ptr %x) {
define i1 @nocaptureInboundsGEPICmp(ptr %x) {
; FNATTRS: Function Attrs: mustprogress nofree norecurse nosync nounwind
willreturn memory(none)
; FNATTRS-LABEL: define i1 @nocaptureInboundsGEPICmp
-; FNATTRS-SAME: (ptr rea
@@ -0,0 +1,156 @@
+//===- FatLtoCleanup.cpp - clean up IR for the FatLTO pipeline --*- 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: Ap
https://github.com/nikic commented:
Looks reasonable to me.
https://github.com/llvm/llvm-project/pull/125911
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,156 @@
+//===- FatLtoCleanup.cpp - clean up IR for the FatLTO pipeline --*- 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: Ap
@@ -0,0 +1,46 @@
+
+; RUN: opt -passes="fatlto-cleanup" -mtriple=x86_64-unknown-fuchsia < %s -S |
FileCheck %s
nikic wrote:
Use UTC please. Also, is the triple here really needed?
https://github.com/llvm/llvm-project/pull/125911
@@ -0,0 +1,35 @@
+//===- FatLtoCleanup.h - clean up IR for the FatLTO pipeline *- 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
@@ -1,21 +1,24 @@
// REQUIRES: x86-registered-target
+// RUN: rm -rf %t && split-file %s %t
// RUN: %clang_cc1 -triple x86_64-unknown-fuchsia -O2 -flto -ffat-lto-objects \
-// RUN: -fsanitize=cfi-icall -fsanitize-trap=cfi-icall
-fvisibility=hidden -emit-llvm -o - %s
@@ -0,0 +1,35 @@
+//===- FatLtoCleanup.h - clean up IR for the FatLTO pipeline *- 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,156 @@
+//===- FatLtoCleanup.cpp - clean up IR for the FatLTO pipeline --*- 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: Ap
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/125911
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,156 @@
+//===- FatLtoCleanup.cpp - clean up IR for the FatLTO pipeline --*- 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: Ap
@@ -0,0 +1,156 @@
+//===- FatLtoCleanup.cpp - clean up IR for the FatLTO pipeline --*- 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: Ap
https://github.com/nikic approved this pull request.
LGTM, thanks!
https://github.com/llvm/llvm-project/pull/126524
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -358,49 +363,54 @@ UseCaptureKind llvm::DetermineUseCaptureKind(
// Volatile stores make the address observable.
auto *ACXI = cast(I);
if (U.getOperandNo() == 1 || U.getOperandNo() == 2 || ACXI->isVolatile())
- return UseCaptureKind::MAY_CAPTURE;
-return
@@ -94,31 +96,53 @@ namespace llvm {
/// U->getUser() is always an Instruction.
virtual bool shouldExplore(const Use *U);
-/// captured - Information about the pointer was captured by the user of
-/// use U. Return true to stop the traversal or false to continu
@@ -358,49 +363,54 @@ UseCaptureKind llvm::DetermineUseCaptureKind(
// Volatile stores make the address observable.
auto *ACXI = cast(I);
if (U.getOperandNo() == 1 || U.getOperandNo() == 2 || ACXI->isVolatile())
- return UseCaptureKind::MAY_CAPTURE;
-return
@@ -1303,27 +1341,42 @@ static void addArgumentAttrs(const SCCNodeSet &SCCNodes,
ArgumentSCCNodes.insert(I->Definition);
}
-bool SCCCaptured = false;
+// At the SCC level, only track merged CaptureComponents. We're not
+// currently prepared to handle pro
https://github.com/nikic created
https://github.com/llvm/llvm-project/pull/126071
This is an external tool, so I don't think there is an expectation that it has
to be in the LLVM tools bindir. It may also be in the default system bindir
(which is not necessarily the same).
>From 2badb97494720
@@ -438,18 +448,21 @@ void llvm::PointerMayBeCaptured(const Value *V,
CaptureTracker *Tracker,
};
while (!Worklist.empty()) {
const Use *U = Worklist.pop_back_val();
-switch (DetermineUseCaptureKind(*U, IsDereferenceableOrNull)) {
-case UseCaptureKind::NO_CAPTU
1001 - 1100 of 1626 matches
Mail list logo