History log of /llvm-project/llvm/lib/Transforms/Utils/BuildLibCalls.cpp (Results 1 – 25 of 220)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 29441e4f 29-Jan-2025 Nikita Popov <npopov@redhat.com>

[IR] Convert from nocapture to captures(none) (#123181)

This PR removes the old `nocapture` attribute, replacing it with the new
`captures` attribute introduced in #116990. This change is
intended

[IR] Convert from nocapture to captures(none) (#123181)

This PR removes the old `nocapture` attribute, replacing it with the new
`captures` attribute introduced in #116990. This change is
intended to be essentially NFC, replacing existing uses of `nocapture`
with `captures(none)` without adding any new analysis capabilities.
Making use of non-`none` values is left for a followup.

Some notes:
* `nocapture` will be upgraded to `captures(none)` by the bitcode
reader.
* `nocapture` will also be upgraded by the textual IR reader. This is to
make it easier to use old IR files and somewhat reduce the test churn in
this PR.
* Helper APIs like `doesNotCapture()` will check for `captures(none)`.
* MLIR import will convert `captures(none)` into an `llvm.nocapture`
attribute. The representation in the LLVM IR dialect should be updated
separately.

show more ...


Revision tags: llvmorg-21-init, llvmorg-19.1.7
# bc8fa9c4 20-Dec-2024 Owen Anderson <resistor@mac.com>

Revert "SimplifyLibCalls: Use default globals address space when building new global strings. (#118729)" (#119616)

This reverts commit cfa582e8aaa791b52110791f5e6504121aaf62bf.


Revision tags: llvmorg-19.1.6
# cfa582e8 05-Dec-2024 Owen Anderson <resistor@mac.com>

SimplifyLibCalls: Use default globals address space when building new global strings. (#118729)

Writing a test for this transitively exposed a number of places in
BuildLibCalls where
we were faili

SimplifyLibCalls: Use default globals address space when building new global strings. (#118729)

Writing a test for this transitively exposed a number of places in
BuildLibCalls where
we were failing to propagate address spaces properly, which are
additionally fixed.

show more ...


Revision tags: llvmorg-19.1.5, llvmorg-19.1.4
# dc4185fe 13-Nov-2024 serge-sans-paille <sguelton@mozilla.com>

[TLI] Add support for reallocarray (#114818)

reallocarray is available in glibc since 2.29 under _DEFAULT_SOURCE and
under _GNU_SOURCE before, let's model it appropriately.


# 7e877fc0 31-Oct-2024 Kenji Mouri / 毛利 研二 <Kenji.Mouri@outlook.com>

[Reland][TLI] Add support for hypot libcall. (#114343)

This patch adds basic support for `hypot`. Constant folding support will
be submitted in a subsequent patch.

Related issue: https://github.

[Reland][TLI] Add support for hypot libcall. (#114343)

This patch adds basic support for `hypot`. Constant folding support will
be submitted in a subsequent patch.

Related issue: https://github.com/llvm/llvm-project/issues/113711

Note: It's my first time contributing to the LLVM with encouragement
from one of my friends, @fawdlstty. I learned a lot from
https://github.com/llvm/llvm-project/pull/99611, and thanks for that.

Note: I had created the same PR and merged
(https://github.com/llvm/llvm-project/pull/113724), but reverted caused
by the merging issue. (The CI issue happened in 3 A.M. at my timezone.
So, I need to fall asleep again after I replied about why issue
happened.) So, I rebased to the latest main branch and recreate the PR
and hope I won't have the third time to create the same PR.

I hope @arsenm can help me review the code again. I’m sorry for that.

Kenji Mouri

show more ...


# 36d56925 30-Oct-2024 gulfemsavrun <gulfem@google.com>

Revert "[TLI] Add support for hypot libcall." (#114312)

Reverts llvm/llvm-project#113724


# feb2d867 30-Oct-2024 Kenji Mouri / 毛利 研二 <Mouri_Naruto@Outlook.com>

[TLI] Add support for hypot libcall. (#113724)

This patch adds basic support for `hypot`. Constant folding support will
be submitted in a subsequent patch.

Related issue: https://github.com/llvm

[TLI] Add support for hypot libcall. (#113724)

This patch adds basic support for `hypot`. Constant folding support will
be submitted in a subsequent patch.

Related issue: https://github.com/llvm/llvm-project/issues/113711

Note: It's my first time contributing to the LLVM with encouragement
from one of my friends, @fawdlstty. I learned a lot from
https://github.com/llvm/llvm-project/pull/99611, and thanks for that.

Kenji Mouri

show more ...


Revision tags: llvmorg-19.1.3
# 0c1c37bf 29-Oct-2024 c8ef <c8ef@outlook.com>

[TLI] Add support for the `tgamma` libcall. (#113791)

This patch adds the `tgamma` libcall.


# 20bda93e 20-Oct-2024 Fawdlstty <fawdlstty@users.noreply.github.com>

[TLI] Add basic support for scalbnxx (#112936)

This patch adds basic support for `scalbln, scalblnf, scalblnl, scalbn,
scalbnf, scalbnl`. Constant folding support will be submitted in a
subsequent

[TLI] Add basic support for scalbnxx (#112936)

This patch adds basic support for `scalbln, scalblnf, scalblnl, scalbn,
scalbnf, scalbnl`. Constant folding support will be submitted in a
subsequent patch.

Related issue: <#112631>

show more ...


# 761fa584 18-Oct-2024 c8ef <c8ef@outlook.com>

[TLI] Add support for the `ilogb` libcall. (#112725)

This patch adds the `ilogb` libcall. Constant folding will be handled in
subsequent patches.


Revision tags: llvmorg-19.1.2, llvmorg-19.1.1
# 48523741 01-Oct-2024 Alex Voicu <alexandru.voicu@amd.com>

[llvm][opt][Transforms] Replacement `calloc` should match replaced `malloc` (#110524)

Currently DSE unconditionally emits `calloc` as returning a pointer to
AS0. However, this is incorrect for targ

[llvm][opt][Transforms] Replacement `calloc` should match replaced `malloc` (#110524)

Currently DSE unconditionally emits `calloc` as returning a pointer to
AS0. However, this is incorrect for targets that have a non-zero default
AS, as it'd not match the `malloc` signature. This patch addresses that
by piping through the AS for the pointer returned by `malloc` into the
`calloc` insertion call.

show more ...


# 173841cc 20-Sep-2024 braw-lee <93831198+braw-lee@users.noreply.github.com>

[TLI] Add basic support for fdim libcall (#108702)

first PR to fix #108695

Signed-off-by: Kushal Pal <kushalpal109@gmail.com>


# 43c9203d 18-Sep-2024 Benjamin Maxwell <benjamin.maxwell@arm.com>

[TLI] Support inferring function attributes for sincos[f|l] (#108554)


Revision tags: llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2
# c6e16a49 01-Aug-2024 Noah Goldstein <goldstein.w.n@gmail.com>

[TLI] Add support for inferring attr `cold`/`noreturn` on `std::terminate` and `__cxa_throw`

These functions are both inherently on the error path so `cold` seems
appropriate. `noreturn` is definiti

[TLI] Add support for inferring attr `cold`/`noreturn` on `std::terminate` and `__cxa_throw`

These functions are both inherently on the error path so `cold` seems
appropriate. `noreturn` is definitional.

Closes #101622

show more ...


# 95daf1ae 15-Aug-2024 Snehasish Kumar <snehasishk@google.com>

Allow optimization of __size_returning_new variants. (#102258)

https://github.com/llvm/llvm-project/pull/101564 added support to TLI to
detect variants of operator new which provide feedback on the

Allow optimization of __size_returning_new variants. (#102258)

https://github.com/llvm/llvm-project/pull/101564 added support to TLI to
detect variants of operator new which provide feedback on the actual
size of memory allocated (http://wg21.link/P0901R5). This patch extends
SimplifyLibCalls to handle hot cold hinting of these variants.

show more ...


# 6aa723da 31-Jul-2024 Yingwei Zheng <dtcxzyw2333@gmail.com>

[TLI] Add support for nan libfunc (#101356)

Reference: https://en.cppreference.com/w/cpp/numeric/math/nan


# 67fb7c34 29-Jul-2024 Noah Goldstein <goldstein.w.n@gmail.com>

[TLI] Add support for inferring attr `cold` on `exit`/`abort`

`abort` can be assumed always cold and assume non-zero `exit` status
as a `cold` path as well.

Closes #101003


Revision tags: llvmorg-19.1.0-rc1, llvmorg-20-init
# e8fbefe1 19-Jul-2024 Yingwei Zheng <dtcxzyw2333@gmail.com>

[TLI] Add basic support for remquo libcall (#99611)

This patch adds basic support for `remquo`. Constant folding support
will be submitted in a subsequent patch.

Related issue: https://github.co

[TLI] Add basic support for remquo libcall (#99611)

This patch adds basic support for `remquo`. Constant folding support
will be submitted in a subsequent patch.

Related issue: https://github.com/llvm/llvm-project/issues/99497

show more ...


# 13a8f8d5 18-Jul-2024 Yingwei Zheng <dtcxzyw2333@gmail.com>

[InferAttrs] Set attributes for `remainder` (#99521)

Fixes one of the issues in
https://github.com/llvm/llvm-project/issues/99497.


Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5
# 869ffcf3 29-Apr-2024 Kees Cook <keescook@chromium.org>

[CodeGen][i386] Move -mregparm storage earlier and fix Runtime calls (#89707)

When building the Linux kernel for i386, the -mregparm=3 option is
enabled. Crashes were observed in the sanitizer hand

[CodeGen][i386] Move -mregparm storage earlier and fix Runtime calls (#89707)

When building the Linux kernel for i386, the -mregparm=3 option is
enabled. Crashes were observed in the sanitizer handler functions, and
the problem was found to be mismatched calling convention.

As was fixed in commit c167c0a4dcdb ("[BuildLibCalls] infer inreg param
attrs from NumRegisterParameters"), call arguments need to be marked as
"in register" when -mregparm is set. Use the same helper developed there
to update the function arguments.

Since CreateRuntimeFunction() is actually part of CodeGenModule, storage
of the -mregparm value is also moved to the constructor, as doing this
in Release() is too late.

Fixes: https://github.com/llvm/llvm-project/issues/89670

show more ...


Revision tags: 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
# 1901f442 24-Feb-2024 Artem Tyurin <artem.tyurin@gmail.com>

[InstCombine] Handle more even/odd math functions (#81324)

At the moment this PR adds support only for `erf` function.

Fixes #77220.


Revision tags: llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6
# f205950e 15-Nov-2023 Bjorn Pettersson <bjorn.a.pettersson@ericsson.com>

[BuildLibCalls] Use getPtrTy instead of getInt8PtrTy

Stop using getInt8PtrTy() when referring to char* types when
building libcalls. As in many other files we can simply use
getPtrTy() instead, as p

[BuildLibCalls] Use getPtrTy instead of getInt8PtrTy

Stop using getInt8PtrTy() when referring to char* types when
building libcalls. As in many other files we can simply use
getPtrTy() instead, as part of transition into opaque pointers.

This patch is using thing like
Type *CharPtrTy = B.getPtrTy();
Type *VoidPtrTy = B.getPtrTy();
in several places, to give the pointer type a name.
The idea is to make the mapping to the libc function prototypes clear.

show more ...


Revision tags: 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
# 4ce7c4a9 01-Aug-2023 Bjorn Pettersson <bjorn.a.pettersson@ericsson.com>

[llvm] Drop some typed pointer handling/bitcasts

Differential Revision: https://reviews.llvm.org/D157016


Revision tags: llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3
# a35206d7 19-Apr-2023 Teresa Johnson <tejohnson@google.com>

[MemProf] Optionally pass hot/cold hints to operator new

Optionally (off by default) replace operator new() calls marked with a
hot or cold memprof attribute with an operator new() call that takes a

[MemProf] Optionally pass hot/cold hints to operator new

Optionally (off by default) replace operator new() calls marked with a
hot or cold memprof attribute with an operator new() call that takes a
hot_cold_t parameter.

Currently this is supported by the open source version of tcmalloc, see:
https://github.com/google/tcmalloc/blob/master/tcmalloc/new_extension.h

Differential Revision: https://reviews.llvm.org/D148718

show more ...


# 750e20e1 19-Apr-2023 Daniel Woodworth <daniel.woodworth@intel.com>

[InferAttrs] Mark frexp and modf as memory(argmem: write)

These two math library functions can't write to errno, but they do
produce two results and store the second result to a pointer passed as
th

[InferAttrs] Mark frexp and modf as memory(argmem: write)

These two math library functions can't write to errno, but they do
produce two results and store the second result to a pointer passed as
their second argument. Appropriately marking them as
memory(argmem: write) enables more optimizations on calls to them.

Reviewed By: xbolva00

Differential Revision: https://reviews.llvm.org/D148043

show more ...


123456789