[PATCH] D82305: [Attr] Introduce the `nopoison` attribute
Luofan Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 22 08:35:18 PDT 2020
bbn created this revision.
bbn added a reviewer: jdoerfert.
Herald added subscribers: llvm-commits, dexonsmith, steven_wu, hiraditya.
Herald added a project: LLVM.
The `nopoison` IR attribute indicates that the value it associated with cannot be poison, so it will be safe for us to perform more optimizations to it.
For example, consider the following code[1]:
t = x + 1;
if (t == y) {
w = x + 1;
foo(w);
}
if we determine that y cannot be poison, then we can apply the GVN optimization to the code above.
[1] 2016 LLVM Developers’ Meeting: N. Lopes “Undefined Behavior: Long Live Poison!"
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D82305
Files:
llvm/docs/LangRef.rst
llvm/include/llvm/Bitcode/LLVMBitCodes.h
llvm/include/llvm/IR/Argument.h
llvm/include/llvm/IR/Attributes.td
llvm/lib/AsmParser/LLLexer.cpp
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/AsmParser/LLToken.h
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/lib/IR/Attributes.cpp
llvm/lib/IR/Function.cpp
llvm/test/Bitcode/attributes.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82305.272438.patch
Type: text/x-patch
Size: 6397 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200622/15332361/attachment-0001.bin>
More information about the llvm-commits
mailing list