[all-commits] [llvm/llvm-project] 451799: [IRMover] Remove UB implying parameter attributes ...
Tim Neumann via All-commits
all-commits at lists.llvm.org
Tue Feb 21 09:43:44 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 451799bb8261bde52bbfef226d019caf1d82aa42
https://github.com/llvm/llvm-project/commit/451799bb8261bde52bbfef226d019caf1d82aa42
Author: Tim Neumann <timnn at google.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
M llvm/include/llvm/IR/Attributes.h
M llvm/lib/Linker/IRMover.cpp
A llvm/test/Transforms/FunctionImport/Inputs/attr_fixup_dae_noundef.ll
A llvm/test/Transforms/FunctionImport/attr_fixup_dae_noundef.ll
Log Message:
-----------
[IRMover] Remove UB implying parameter attributes when necessary
When importing functions from some module X into some module Y, they may reference other functions already present in Y. The signature (especially attributes) of those other functions may have diverged between X and Y (e.g. due to the Dead Argument Elimination optimization). If necessary, modify the attributes to avoid UB.
See the added test and implementation comments for more details.
This was exposed by https://reviews.llvm.org/D133036 before it was reverted. Fixes https://github.com/llvm/llvm-project/issues/58976.
Reviewed By: tejohnson
Differential Revision: https://reviews.llvm.org/D139209
More information about the All-commits
mailing list