[PATCH] D129911: [IR] Allow absence for Min module flags and make AArch64 BTI/PAC-RET flags backward compatible
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 15 16:55:20 PDT 2022
MaskRay created this revision.
MaskRay added reviewers: danielkiss, pcc, chill, stuij, tejohnson.
Herald added subscribers: StephenFan, hiraditya, kristof.beyls.
Herald added a project: All.
MaskRay requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
D123493 <https://reviews.llvm.org/D123493> introduced llvm::Module::Min to encode module flag metadata for AArch64
BTI/PAC-RET. llvm::Module::Min does not take effect when the flag does not 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 result is 1 instead of 0).
Require Min flags to be non-negative and treat absence as a zero. For an old
bitcode without "branch-target-enforcement"/"sign-return-address", the value is
as if 0.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D129911
Files:
llvm/lib/IR/Verifier.cpp
llvm/lib/Linker/IRMover.cpp
llvm/test/Linker/module-flags-min.ll
llvm/test/Verifier/module-flags-1.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129911.445161.patch
Type: text/x-patch
Size: 5031 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220715/d45e5235/attachment.bin>
More information about the llvm-commits
mailing list