commit | 47a73256ceeee64348ecba12ce0483a2c5831800 | [log] [tgz] |
---|---|---|
author | Yingwei Zheng <dtcxzyw2333@gmail.com> | Sun Dec 31 20:44:48 2023 +0800 |
committer | Copybara-Service <copybara-worker@google.com> | Sun Dec 31 04:45:29 2023 -0800 |
tree | f263a5994ba8d6b3428d8bed7aa8ad9ee804a6e5 | |
parent | ceefd2339402e0cb651596dd16f50c0c46c80c44 [diff] |
[FuncAttrs] Deduce `noundef` attributes for return values (#76553) This patch deduces `noundef` attributes for return values. IIUC, a function returns `noundef` values iff all of its return values are guaranteed not to be `undef` or `poison`. Definition of `noundef` from LangRef: ``` noundef This attribute applies to parameters and return values. If the value representation contains any undefined or poison bits, the behavior is undefined. Note that this does not refer to padding introduced by the type’s storage representation. ``` Alive2: https://alive2.llvm.org/ce/z/g8Eis6 Compile-time impact: http://llvm-compile-time-tracker.com/compare.php?from=30dcc33c4ea3ab50397a7adbe85fe977d4a400bd&to=c5e8738d4bfbf1e97e3f455fded90b791f223d74&stat=instructions:u |stage1-O3|stage1-ReleaseThinLTO|stage1-ReleaseLTO-g|stage1-O0-g|stage2-O3|stage2-O0-g|stage2-clang| |--|--|--|--|--|--|--| |+0.01%|+0.01%|-0.01%|+0.01%|+0.03%|-0.04%|+0.01%| The motivation of this patch is to reduce the number of `freeze` insts and enable more optimizations. GitOrigin-RevId: 1228becf7df28c68579f2b9b390b74aa41149a0a
This directory and its subdirectories contain source code for the LLVM Linker, a modular cross platform linker which is built as part of the LLVM compiler infrastructure project.
lld is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.
In order to make sure various developers can evaluate patches over the same tests, we create a collection of self contained programs.
It is hosted at https://s3-us-west-2.amazonaws.com/linker-tests/lld-speed-test.tar.xz
The current sha256 is 10eec685463d5a8bbf08d77f4ca96282161d396c65bd97dc99dbde644a31610f
.