[all-commits] [llvm/llvm-project] 485237: [llvm][opt][Transforms] Replacement `calloc` shoul...
Alex Voicu via All-commits
all-commits at lists.llvm.org
Mon Sep 30 18:05:49 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4852374135773b03c14ba2003be99ed1169dedf4
https://github.com/llvm/llvm-project/commit/4852374135773b03c14ba2003be99ed1169dedf4
Author: Alex Voicu <alexandru.voicu at amd.com>
Date: 2024-10-01 (Tue, 01 Oct 2024)
Changed paths:
M llvm/include/llvm/Transforms/Utils/BuildLibCalls.h
M llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
M llvm/lib/Transforms/Utils/BuildLibCalls.cpp
A llvm/test/Transforms/DeadStoreElimination/malloc-to-calloc-with-nonzero-default-as.ll
Log Message:
-----------
[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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list