[all-commits] [llvm/llvm-project] cb22ab: Add nomerge function attribute to supress tail mer...
ZequanWu via All-commits
all-commits at lists.llvm.org
Tue May 12 16:49:39 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: cb22ab7403557941fd672a8fc3a16b1ef75a7842
https://github.com/llvm/llvm-project/commit/cb22ab7403557941fd672a8fc3a16b1ef75a7842
Author: Zequan Wu <zequanwu at google.com>
Date: 2020-05-12 (Tue, 12 May 2020)
Changed paths:
M llvm/docs/LangRef.rst
M llvm/include/llvm/Bitcode/LLVMBitCodes.h
M llvm/include/llvm/IR/Attributes.td
M llvm/include/llvm/IR/InstrTypes.h
M llvm/lib/AsmParser/LLLexer.cpp
M llvm/lib/AsmParser/LLParser.cpp
M llvm/lib/AsmParser/LLToken.h
M llvm/lib/Bitcode/Reader/BitcodeReader.cpp
M llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
M llvm/lib/IR/Attributes.cpp
M llvm/lib/IR/Verifier.cpp
M llvm/lib/Transforms/Utils/CodeExtractor.cpp
M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
A llvm/test/Transforms/SimplifyCFG/nomerge.ll
Log Message:
-----------
Add nomerge function attribute to supress tail merge optimization in simplifyCFG
We want to add a way to avoid merging identical calls so as to keep the
separate debug-information for those calls. There is also an asan
usecase where having this attribute would be beneficial to avoid
alternative work-arounds.
Here is the link to the feature request:
https://bugs.llvm.org/show_bug.cgi?id=42783.
`nomerge` is different from `noline`. `noinline` prevents function from
inlining at callsites, but `nomerge` prevents multiple identical calls
from being merged into one.
This patch adds `nomerge` to disable the optimization in IR level. A
followup patch will be needed to let backend understands `nomerge` and
avoid tail merge at backend.
Reviewed By: asbirlea, rnk
Differential Revision: https://reviews.llvm.org/D78659
More information about the All-commits
mailing list