[all-commits] [llvm/llvm-project] 90a6bb: [remangleIntrinsicFunction] Detect and resolve nam...
dobbelaj-snps via All-commits
all-commits at lists.llvm.org
Tue Jul 13 02:40:14 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 90a6bb30fafa4e68d4af1fef62987fe187fa70ab
https://github.com/llvm/llvm-project/commit/90a6bb30fafa4e68d4af1fef62987fe187fa70ab
Author: Jeroen Dobbelaere <jeroen.dobbelaere at synopsys.com>
Date: 2021-07-13 (Tue, 13 Jul 2021)
Changed paths:
M llvm/include/llvm/IR/Intrinsics.h
M llvm/lib/IR/Function.cpp
A llvm/test/Assembler/remangle.ll
A llvm/test/tools/llvm-link/Inputs/remangle1.ll
A llvm/test/tools/llvm-link/Inputs/remangle2.ll
A llvm/test/tools/llvm-link/remangle.ll
Log Message:
-----------
[remangleIntrinsicFunction] Detect and resolve name clash
It is possible that the remangled name for an intrinsic already exists with a different (and wrong) prototype within the module.
As the bitcode reader keeps both versions of all remangled intrinsics around for a longer time, this can result in a
crash, as can be seen in https://bugs.llvm.org/show_bug.cgi?id=50923
This patch makes 'remangleIntrinsicFunction' aware of this situation. When it is detected, it moves the version with the wrong prototype to a different name. That version will be removed anyway once the module is completely loaded.
With thanks to @asbirlea for reporting this issue when trying out an lto build with the full restrict patches, and @efriedma for suggesting a sane resolution mechanism.
Reviewed By: apilipenko
Differential Revision: https://reviews.llvm.org/D105118
More information about the All-commits
mailing list