https://reviews.llvm.org/D71126 Page MenuHomePhabricator * [ ]SearchConfigure Global Search Log In Differential D71126 Adding PoisonValue for representing poison value explicitly in IR ClosedPublic Actions Authored by liuz on Dec 6 2019, 8:57 AM. * Edit Revision * Update Diff * Download Raw Diff * Edit Related Revisions... * Edit Parent Revisions * Edit Child Revisions * Edit Related Objects... * Edit Commits * Subscribe * Mute Notifications * Award Token * Flag For Later Tags * Restricted Project Subscribers cuviper dexonsmith hiraditya llvm-commits mehdi_amini nikic pengfei View All 9 Subscribers Details Reviewers nlopes aqjune regehr hfinkel reames lebedev.ri craig.topper deadalnix nikic RKSimon whitequark Commits rG345fcccb3379: Fix use-of-uninitialized-value in rG75f50e15bf8f rG75f50e15bf8f: Adding PoisonValue for representing poison value explicitly in IR Summary Define ConstantData::PoisonValue. Add support for poison value to LLLexer/LLParser/BitcodeReader/ BitcodeWriter. Add support for poison value to llvm-c interface. Add support for poison value to OCaml binding. Add m_Poison in PatternMatch. Diff Detail Repository rG LLVM Github Monorepo Event Timeline liuz created this revision.Dec 6 2019, 8:57 AM Herald added a reviewer: whitequark. * View Herald TranscriptDec 6 2019, 8:57 AM Herald added a reviewer: deadalnix. * View Herald Transcript Herald added a project: Restricted Project. * View Herald Transcript Herald added subscribers: llvm-commits, dexonsmith, steven_wu and 2 others. * View Herald Transcript liuz edited the summary of this revision. (Show Details)Dec 6 2019, 9:18 AM whitequark resigned from this revision.Mar 10 2020, 2:43 PM RKSimon resigned from this revision.Aug 2 2020, 3:03 AM liuz updated this revision to Diff 296566.Oct 6 2020, 5:21 PM Herald added a subscriber: pengfei. * View Herald TranscriptOct 6 2020, 5:21 PM liuz retitled this revision from Add Poison Value to Adding PoisonValue for representing poison value explicitly in IR.Oct 6 2020, 5:32 PM Harbormaster completed remote builds in B74201: Diff 296566.Oct 6 2020, 5:46 PM nikic added a reviewer: nikic.Oct 7 2020, 12:52 AM nikic added a subscriber: nikic. Comment Actions I would recommend making PoisonValue a subclass of UndefValue. Poison can always be relaxed to undef, and this will prevents lots of regressions when replacing undef with poison values. aqjune added a comment.Oct 7 2020, 3:32 AM Comment Actions In D71126#2316089, @nikic wrote: I would recommend making PoisonValue a subclass of UndefValue. Poison can always be relaxed to undef, and this will prevents lots of regressions when replacing undef with poison values. +1 for this. You'll need to update UndefValue::classof. liuz updated this revision to Diff 297125.Oct 8 2020, 10:59 PM Comment Actions PoisonValue is now a subclass of UndefValue liuz edited the summary of this revision. (Show Details)Oct 8 2020, 11:00 PM Harbormaster completed remote builds in B74530: Diff 297125.Oct 8 2020, 11:25 PM liuz updated this revision to Diff 307448.Nov 24 2020, 2:00 PM Comment Actions rebased to upstream Harbormaster completed remote builds in B80013: Diff 307448.Nov 24 2020, 2:43 PM reames accepted this revision.Nov 24 2020, 3:46 PM Comment Actions LGTM. p.s. I'm very unsure about the merits of having poison being a sub-class of undef, but I'm also completely fine landing this as is and adjusting later. Being able to spell poison directly in tests is a huge win, and I'm more than comfortable evolving in tree as warranted. This revision is now accepted and ready to land.Nov 24 2020, 3:46 PM This revision was landed with ongoing or failed builds.Nov 25 2020, 4:44 PM Closed by commit rG75f50e15bf8f: Adding PoisonValue for representing poison value explicitly in IR (authored by liuz). * Explain Why This revision was automatically updated to reflect the committed changes. liuz added a commit: rG75f50e15bf8f: Adding PoisonValue for representing poison value explicitly in IR. vitalybuka added a subscriber: vitalybuka.Nov 26 2020, 12:04 AM Comment Actions http://lab.llvm.org:8011/#/builders/5/builds/1690/steps/9/logs/stdio * 74536==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x7c7b3ed in llvm::Value::setValueName(llvm::StringMapEntry*) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/Value.cpp:281:3 #1 0x7c78ec6 in destroyValueName /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/Value.cpp:143:3 #2 0x7c78ec6 in llvm::Value::~Value() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/Value.cpp:104:3 #3 0x7b389e6 in operator() /b/sanitizer-x86_64-linux-fast/build/libcxx_build_msan/include/c++/v1/memory:2122:5 #4 0x7b389e6 in reset /b/sanitizer-x86_64-linux-fast/build/libcxx_build_msan/include/c++/v1/memory:2383:7 #5 0x7b389e6 in ~unique_ptr /b/sanitizer-x86_64-linux-fast/build/libcxx_build_msan/include/c++/v1/memory:2337:19 #6 0x7b389e6 in destroyAll /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/DenseMap.h:368:25 #7 0x7b389e6 in llvm::DenseMap >, llvm::DenseMapInfo, llvm::detail::DenseMapPair > > >::~DenseMap() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/DenseMap.h:754:11 #8 0x7b2f91d in llvm::LLVMContextImpl::~LLVMContextImpl() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LLVMContextImpl.cpp:125:1 #9 0x7b19cff in llvm::LLVMContext::~LLVMContext() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LLVMContext.cpp:94:31 #10 0x2561bb6 in main /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:366:1 #11 0x7f93b5e3309a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a) #12 0x24e0df9 in _start (/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/llc+0x24e0df9) liuz added a commit: rG345fcccb3379: Fix use-of-uninitialized-value in rG75f50e15bf8f.Nov 26 2020, 12:39 AM spatel mentioned this in D90479: [ValueTracking] ComputeKnownBits - minimum leading/trailing zero bits in LSHR/SHL (PR44526).Nov 30 2020, 4:58 AM cuviper added a subscriber: cuviper.Jan 27 2021, 1:21 PM cuviper added inline comments. llvm/include/llvm-c/Core.h This is a breaking change to the C ABI -- can we move it to the 272 end of the enum? https://bugs.llvm.org/show_bug.cgi?id=48905 Revision Contents Changeset List * Files * History * Commits * Similar Path Size llvm/ bindings/ ocaml/ llvm/ llvm.ml 3 lines llvm.mli 9 lines llvm_ocaml.c 7 lines include/ llvm-c/ Core.h 14 lines llvm/ Bitcode/ LLVMBitCodes.h 1 line IR/ Constants.h 49 lines PatternMatch.h 3 lines Value.def 1 line lib/ AsmParser/ LLLexer.cpp 1 line LLParser.h 2 lines Paths LLParser.cpp 8 lines * Table of Contentst LLToken.h 1 line * Hide Panelf Bitcode/ * Keyboard Reference? Reader/ BitcodeReader.cpp 3 lines Writer/ BitcodeWriter.cpp 2 lines IR/ AsmWriter.cpp 5 lines Constants.cpp 40 lines Core.cpp 8 lines LLVMContextImpl.h 2 lines test/ Bindings/ OCaml/ core.ml 8 lines Bitcode/ compatibility.ll 16 lines CodeGen/ X86/ poison-ops.ll 458 lines tools/ llvm-c-test/ echo.cpp 6 lines Diff ID Base Description Created Lint Unit Base Base (*) Diff Dec 6 1 232582 2019, ( ) ( ) 8:50 AM Diff Oct 6 2 296566 2020, ( ) ( ) 5:19 PM Oct 8 Diff 297125 2020, ( ) ( ) 3 10:55 PM Diff Nov 24 4 307448 2020, ( ) ( ) 1:58 PM Diff Nov 25 5 307729 3fb0879 rG75f50e15bf8fff6fba1d4678adedd33ef6a945e5 2020, (*) 4:33 PM Show Diff * D119816 [SanitizerBounds] Add support for NoSanitizeBounds function + + *Reviewers: hiraditya, steven_wu, jdoerfert, dexonsmith, ormris, melver, nlopes + Fri, Feb 25, 3:58 PM Author: ztong0001 * D117921 Attributes: add a new allocalign attribute + + *Reviewers: reames, jyknight, nikic + Wed, Feb 23, 12:31 PM Author: durin42 * D119482 [OpaquePtr][LLParser] Automatically detect opaque pointers in .ll files + + *Reviewers: Restricted Project + Tue, Feb 22, 12:44 PM Author: aeubanks * D82745 [ThinLto] Fix Ifunc symbol usage + + *Reviewers: tejohnson, mehdi_amini, pcc, guy-david + Sat, Feb 19, 7:47 AM Author: yota9 * D114533 LLVM IR should allow bitcast between address spaces with the same size. + + *Reviewers: sameerds, arsenm, nhaehnle, jrtc27, mehdi_amini, nlopes, efriedma + Thu, Feb 10, 7:57 AM Author: skc7 * D118355 Add -mmanual-endbr switch to allow manual selection of control-flow protection + + *Reviewers: xiangzhangllvm, pengfei, erichkeane, joaomoreira, aaron.ballman + Wed, Feb 9, 9:15 AM Author: gftg * D78491 Avoid relying on address space zero default parameter in llvm/IR + + *Reviewers: aykevl, dylanmckay, arsenm, bjope, theraven, jrtc27, ctetreau + Thu, Feb 3, 6:02 AM Author: arichardson * D61652 [Attr] Introduce dereferenceable_globally + + *Reviewers: efriedma, hfinkel, chandlerc, rsmith, dberris, nlopes, a.elovikov, ... + Sat, Jan 29, 5:41 PM Author: jdoerfert * D86351 WIP: llvm-buildozer + + *Reviewers: bollu, jdoerfert, sstefan1, MaskRay, baziotis + Fri, Jan 28, 1:44 PM Author: aganea Diff 307729 View Options llvm/bindings/ocaml/llvm/llvm.ml Loading... View Options llvm/bindings/ocaml/llvm/llvm.mli Loading... View Options llvm/bindings/ocaml/llvm/llvm_ocaml.c Loading... View Options llvm/include/llvm-c/Core.h Loading... View Options llvm/include/llvm/Bitcode/LLVMBitCodes.h Loading... View Options llvm/include/llvm/IR/Constants.h Loading... View Options llvm/include/llvm/IR/PatternMatch.h Loading... View Options llvm/include/llvm/IR/Value.def Loading... View Options llvm/lib/AsmParser/LLLexer.cpp Loading... View Options llvm/lib/AsmParser/LLParser.h Loading... View Options llvm/lib/AsmParser/LLParser.cpp Loading... View Options llvm/lib/AsmParser/LLToken.h Loading... View Options llvm/lib/Bitcode/Reader/BitcodeReader.cpp Loading... View Options llvm/lib/Bitcode/Writer/BitcodeWriter.cpp Loading... View Options llvm/lib/IR/AsmWriter.cpp Loading... View Options llvm/lib/IR/Constants.cpp Loading... View Options llvm/lib/IR/Core.cpp Loading... View Options llvm/lib/IR/LLVMContextImpl.h Loading... View Options llvm/test/Bindings/OCaml/core.ml Loading... View Options llvm/test/Bitcode/compatibility.ll Loading... View Options llvm/test/CodeGen/X86/poison-ops.ll Loading... View Options llvm/tools/llvm-c-test/echo.cpp Loading... Log In to Comment