[all-commits] [llvm/llvm-project] b3fd3a: [IR] Allow absence for Min module flags and make A...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Mon Jul 18 09:35:25 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b3fd3a9ac3eb31bc478abeefe64c05bfbecd3233
https://github.com/llvm/llvm-project/commit/b3fd3a9ac3eb31bc478abeefe64c05bfbecd3233
Author: Fangrui Song <i at maskray.me>
Date: 2022-07-18 (Mon, 18 Jul 2022)
Changed paths:
M llvm/docs/LangRef.rst
M llvm/lib/IR/Verifier.cpp
M llvm/lib/Linker/IRMover.cpp
A llvm/test/Linker/module-flags-min.ll
M llvm/test/Verifier/module-flags-1.ll
Log Message:
-----------
[IR] Allow absence for Min module flags and make AArch64 BTI/PAC-RET flags backward compatible
D123493 introduced llvm::Module::Min to encode module flags metadata for AArch64
BTI/PAC-RET. llvm::Module::Min does not take effect when the flag is absent in
one module. This behavior is misleading and does not address backward
compatibility problems (when a bitcode with "branch-target-enforcement"==1 and
another without the flag are merged, the merge result is 1 instead of 0).
To address the problems, require Min flags to be non-negative and treat absence
as having a value of zero. For an old bitcode without
"branch-target-enforcement"/"sign-return-address", its value is as if 0.
Differential Revision: https://reviews.llvm.org/D129911
More information about the All-commits
mailing list