|
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6 |
|
| #
10f315dc |
| 09-Dec-2024 |
Nikita Popov <npopov@redhat.com> |
[ConstantFolding] Infer getelementptr nuw flag (#119214)
Infer nuw from nusw and nneg. This is the constant expression variant of
https://github.com/llvm/llvm-project/pull/111144.
Proof: https:/
[ConstantFolding] Infer getelementptr nuw flag (#119214)
Infer nuw from nusw and nneg. This is the constant expression variant of
https://github.com/llvm/llvm-project/pull/111144.
Proof: https://alive2.llvm.org/ce/z/ihztLy
show more ...
|
|
Revision tags: llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7 |
|
| #
8e8d2595 |
| 20-May-2024 |
Nikita Popov <npopov@redhat.com> |
[ConstantFolding] Canonicalize constexpr GEPs to i8 (#89872)
This patch canonicalizes constant expression GEPs to use i8 source
element type, aka ptradd. This is the ConstantFolding equivalent of t
[ConstantFolding] Canonicalize constexpr GEPs to i8 (#89872)
This patch canonicalizes constant expression GEPs to use i8 source
element type, aka ptradd. This is the ConstantFolding equivalent of the
InstCombine canonicalization introduced in #68882.
I believe all our optimizations working on constant expression GEPs
(like GlobalOpt etc) have already been switched to work on offsets, so I
don't expect any significant fallout from this change.
This is part of:
https://discourse.llvm.org/t/rfc-replacing-getelementptr-with-ptradd/68699
show more ...
|
|
Revision tags: llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4 |
|
| #
fcfc31ff |
| 28-Oct-2022 |
Nikita Popov <npopov@redhat.com> |
[InstCombine] Convert some tests to opaque pointers (NFC)
Conversion was performed (without manual fixup) using: https://gist.github.com/nikic/98357b71fd67756b0f064c9517b62a34
|
|
Revision tags: llvmorg-15.0.3, working, llvmorg-15.0.2 |
|
| #
6e504d63 |
| 04-Oct-2022 |
Nikita Popov <npopov@redhat.com> |
[ValueTracking] Handle constant exprs in isKnownNonZero()
Handle constant expressions by falling through to the general operator-based code. In particular, this adds support for bitcast and GEP expr
[ValueTracking] Handle constant exprs in isKnownNonZero()
Handle constant expressions by falling through to the general operator-based code. In particular, this adds support for bitcast and GEP expressions.
show more ...
|
|
Revision tags: llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1 |
|
| #
12c0bf8b |
| 18-Mar-2022 |
Augie Fackler <augie@google.com> |
tests: add attributes that would normally come from inferattrs
As my goal is to remove at least _some_ functions from the static list in MemoryBuiltins.cpp, these tests either need to run inferattrs
tests: add attributes that would normally come from inferattrs
As my goal is to remove at least _some_ functions from the static list in MemoryBuiltins.cpp, these tests either need to run inferattrs or statically declare these attributes to keep passing. A couple of tests had alternate cases which are no longer meaningful, e.g. `malloc-load-removal.ll`.
Differential Revision: https://reviews.llvm.org/D123087
show more ...
|
| #
9df0b254 |
| 23-Jul-2022 |
Nuno Lopes <nuno.lopes@tecnico.ulisboa.pt> |
[NFC] Switch a few uses of undef to poison as placeholders for unreachable code
|
| #
952e0693 |
| 10-Jun-2022 |
Nuno Lopes <nuno.lopes@tecnico.ulisboa.pt> |
[NFC] remove 'br undef' from InstCombine test cases This is UB and allows the compiler to give any result, so these tests weren't meaningful InstCombine tests are now clean of 'br undef'
|
|
Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1 |
|
| #
acdc419c |
| 04-Feb-2022 |
Bjorn Pettersson <bjorn.a.pettersson@ericsson.com> |
[test] Use -passes=instcombine instead of -instcombine in lots of tests. NFC
Another step moving away from the deprecated syntax of specifying pass pipeline in opt.
Differential Revision: https://r
[test] Use -passes=instcombine instead of -instcombine in lots of tests. NFC
Another step moving away from the deprecated syntax of specifying pass pipeline in opt.
Differential Revision: https://reviews.llvm.org/D119081
show more ...
|
|
Revision tags: llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2 |
|
| #
95ba0e45 |
| 13-Dec-2021 |
Nick Desaulniers <ndesaulniers@google.com> |
[SimplifyLibCalls] propagate tail flags on CallInsts
I noticed we weren't propagating tail flags on calls when FortifiedLibCallSimplifier.optimizeCall() was replacing calls to runtime checked calls
[SimplifyLibCalls] propagate tail flags on CallInsts
I noticed we weren't propagating tail flags on calls when FortifiedLibCallSimplifier.optimizeCall() was replacing calls to runtime checked calls to the non-checked routines (when safe to do so). Make sure to check this before replacing the original calls!
Also, avoid any libcall transforms when notail/musttail is present.
PR46734 Fixes: https://github.com/llvm/llvm-project/issues/46079
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D107872
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3 |
|
| #
1aa02b37 |
| 25-Jun-2021 |
Arthur Eubanks <aeubanks@google.com> |
Revert "[BuildLibCalls/SimplifyLibCalls] Fix attributes on created CallInst instructions."
This reverts commit 1eda5453f2dcc9a9a4b4578fe74163c529974503.
Causes https://crbug.com/1223647: Incompati
Revert "[BuildLibCalls/SimplifyLibCalls] Fix attributes on created CallInst instructions."
This reverts commit 1eda5453f2dcc9a9a4b4578fe74163c529974503.
Causes https://crbug.com/1223647: Incompatible argument and return types for 'returned' attribute tail call void @llvm.memset.p0i8.i64(i8* noalias noundef returned writeonly align 1 dereferenceable(255) %arraydecay, i8 0, i64 255, i1 false), !dbg !985
show more ...
|
|
Revision tags: llvmorg-12.0.1-rc2 |
|
| #
1eda5453 |
| 09-Jun-2021 |
Jonas Paulsson <paulsson@linux.vnet.ibm.com> |
[BuildLibCalls/SimplifyLibCalls] Fix attributes on created CallInst instructions.
- When emitting libcalls, do not only pass the calling convention from the function prototype but also the attrib
[BuildLibCalls/SimplifyLibCalls] Fix attributes on created CallInst instructions.
- When emitting libcalls, do not only pass the calling convention from the function prototype but also the attributes.
- Do not pass attributes from e.g. libc memcpy to llvm.memcpy.
Review: Reid Kleckner, Eli Friedman, Arthur Eubanks
Differential Revision: https://reviews.llvm.org/D103992
show more ...
|
|
Revision tags: llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2 |
|
| #
cd54c579 |
| 20-Feb-2021 |
Dávid Bolvanský <david.bolvansky@gmail.com> |
Reland "[Libcalls, Attrs] Annotate libcalls with noundef"
Fixed Clang tests.
|
| #
94d034fb |
| 20-Feb-2021 |
Dávid Bolvanský <david.bolvansky@gmail.com> |
Revert "[Libcalls, Attrs] Annotate libcalls with noundef"
This reverts commit 33b0c63775ce58014c55e285671e3315104a6076. Bots are failing. Some Clang tests need to be updated too.
|
| #
33b0c637 |
| 20-Feb-2021 |
Dávid Bolvanský <david.bolvansky@gmail.com> |
[Libcalls, Attrs] Annotate libcalls with noundef
I think we can use here same logic as for nonnull.
strlen(X) - X must be noundef => valid pointer.
for libcalls with size arg, we add noundef only
[Libcalls, Attrs] Annotate libcalls with noundef
I think we can use here same logic as for nonnull.
strlen(X) - X must be noundef => valid pointer.
for libcalls with size arg, we add noundef only if size is known and greater than 0 - so pointers must be noundef (valid ones)
Reviewed By: jdoerfert, aqjune
Differential Revision: https://reviews.llvm.org/D95122
show more ...
|
|
Revision tags: llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1 |
|
| #
2f66bfac |
| 12-Oct-2020 |
Dávid Bolvanský <david.bolvansky@gmail.com> |
[Tests] Regenerate test checks; NFC
|
|
Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1 |
|
| #
48db0272 |
| 23-Sep-2019 |
David Bolvansky <david.bolvansky@gmail.com> |
[InstCombine] Annotate strndup calls with dereferenceable_or_null
"Implementations are free to malloc() a buffer containing either (size + 1) bytes or (strnlen(s, size) + 1) bytes. Applications shou
[InstCombine] Annotate strndup calls with dereferenceable_or_null
"Implementations are free to malloc() a buffer containing either (size + 1) bytes or (strnlen(s, size) + 1) bytes. Applications should not assume that strndup() will allocate (size + 1) bytes when strlen(s) is smaller than size."
llvm-svn: 372647
show more ...
|
| #
8d520161 |
| 23-Sep-2019 |
David Bolvansky <david.bolvansky@gmail.com> |
[SLC] Convert some strndup calls to strdup calls
Summary: Motivation: - If we can fold it to strdup, we should (strndup does more things than strdup). - Annotation mechanism. (Works for strdup well)
[SLC] Convert some strndup calls to strdup calls
Summary: Motivation: - If we can fold it to strdup, we should (strndup does more things than strdup). - Annotation mechanism. (Works for strdup well).
strdup and strndup are part of C 20 (currently posix fns), so we should optimize them.
Reviewers: efriedma, jdoerfert
Reviewed By: jdoerfert
Subscribers: lebedev.ri, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67679
llvm-svn: 372636
show more ...
|
|
Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6 |
|
| #
be2487a2 |
| 17-Sep-2019 |
David Bolvansky <david.bolvansky@gmail.com> |
[InstCombine] Annotate strdup with deref_or_null
llvm-svn: 372098
|
| #
e80fcf03 |
| 17-Sep-2019 |
David Bolvansky <david.bolvansky@gmail.com> |
[SimplifyLibCalls] Mark known arguments with nonnull
Reviewers: efriedma, jdoerfert
Reviewed By: jdoerfert
Subscribers: ychen, rsmith, joerg, aaron.ballman, lebedev.ri, uenoku, jdoerfert, hfinkel,
[SimplifyLibCalls] Mark known arguments with nonnull
Reviewers: efriedma, jdoerfert
Reviewed By: jdoerfert
Subscribers: ychen, rsmith, joerg, aaron.ballman, lebedev.ri, uenoku, jdoerfert, hfinkel, javed.absar, spatel, dmgreen, llvm-commits
Differential Revision: https://reviews.llvm.org/D53342
llvm-svn: 372091
show more ...
|
|
Revision tags: llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3 |
|
| #
05bda8b4 |
| 28-Aug-2019 |
David Bolvansky <david.bolvansky@gmail.com> |
Annotate return values of allocation functions with dereferenceable_or_null
Summary: Example define dso_local noalias i8* @_Z6maixxnv() local_unnamed_addr #0 { entry: %call = tail call noalias der
Annotate return values of allocation functions with dereferenceable_or_null
Summary: Example define dso_local noalias i8* @_Z6maixxnv() local_unnamed_addr #0 { entry: %call = tail call noalias dereferenceable_or_null(64) i8* @malloc(i64 64) #6 ret i8* %call }
Reviewers: jdoerfert
Reviewed By: jdoerfert
Subscribers: aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66651
llvm-svn: 370168
show more ...
|
| #
0e0fbae1 |
| 14-Aug-2019 |
David Bolvansky <david.bolvansky@gmail.com> |
[BuildLibCalls] Noalias annotation
Summary: I think this is better solution than annotating callsites in IC/SLC.
Reviewers: jdoerfert
Reviewed By: jdoerfert
Subscribers: MaskRay, llvm-commits
Ta
[BuildLibCalls] Noalias annotation
Summary: I think this is better solution than annotating callsites in IC/SLC.
Reviewers: jdoerfert
Reviewed By: jdoerfert
Subscribers: MaskRay, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66217
llvm-svn: 368875
show more ...
|
| #
038d604f |
| 13-Aug-2019 |
David Bolvansky <david.bolvansky@gmail.com> |
[SimplifyLibCalls] Add noalias from known callsites
Summary: Should be fine for memcpy, strcpy, strncpy.
Reviewers: jdoerfert, efriedma
Reviewed By: jdoerfert
Subscribers: uenoku, llvm-commits
[SimplifyLibCalls] Add noalias from known callsites
Summary: Should be fine for memcpy, strcpy, strncpy.
Reviewers: jdoerfert, efriedma
Reviewed By: jdoerfert
Subscribers: uenoku, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66135
llvm-svn: 368724
show more ...
|
|
Revision tags: llvmorg-9.0.0-rc2 |
|
| #
39130314 |
| 13-Aug-2019 |
David Bolvansky <david.bolvansky@gmail.com> |
[SimplifyLibCalls] Add dereferenceable bytes from known callsites
Summary: int mm(char *a, char *b) { return memcmp(a,b,16); }
Currently: define dso_local i32 @mm(i8* nocapture readonly %a, i8*
[SimplifyLibCalls] Add dereferenceable bytes from known callsites
Summary: int mm(char *a, char *b) { return memcmp(a,b,16); }
Currently: define dso_local i32 @mm(i8* nocapture readonly %a, i8* nocapture readonly %b) local_unnamed_addr #1 { entry: %call = tail call i32 @memcmp(i8* %a, i8* %b, i64 16) ret i32 %call }
After patch: define dso_local i32 @mm(i8* nocapture readonly %a, i8* nocapture readonly %b) local_unnamed_addr #1 { entry: %call = tail call i32 @memcmp(i8* dereferenceable(16) %a, i8* dereferenceable(16) %b, i64 16) ret i32 %call }
Reviewers: jdoerfert, efriedma
Reviewed By: jdoerfert
Subscribers: javed.absar, spatel, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66079
llvm-svn: 368657
show more ...
|
|
Revision tags: llvmorg-9.0.0-rc1, llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1 |
|
| #
cee313d2 |
| 17-Apr-2019 |
Eric Christopher <echristo@gmail.com> |
Revert "Temporarily Revert "Add basic loop fusion pass.""
The reversion apparently deleted the test/Transforms directory.
Will be re-reverting again.
llvm-svn: 358552
|
|
Revision tags: llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3, llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2 |
|
| #
600e9dea |
| 30-Jan-2019 |
Erik Pilkington <erik.pilkington@gmail.com> |
Add a 'dynamic' parameter to the objectsize intrinsic
This is meant to be used with clang's __builtin_dynamic_object_size. When 'true' is passed to this parameter, the intrinsic has the potential to
Add a 'dynamic' parameter to the objectsize intrinsic
This is meant to be used with clang's __builtin_dynamic_object_size. When 'true' is passed to this parameter, the intrinsic has the potential to be folded into instructions that will be evaluated at run time. When 'false', the objectsize intrinsic behaviour is unchanged.
rdar://32212419
Differential revision: https://reviews.llvm.org/D56761
llvm-svn: 352664
show more ...
|