[llvm] 1347b9a - [Docs] Store to poison is the canonical form for non-terminator unreachable (#98910)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 15 15:07:33 PDT 2024


Author: DianQK
Date: 2024-07-16T06:07:30+08:00
New Revision: 1347b9a3aa671d610e812579ab5e5f05870586cf

URL: https://github.com/llvm/llvm-project/commit/1347b9a3aa671d610e812579ab5e5f05870586cf
DIFF: https://github.com/llvm/llvm-project/commit/1347b9a3aa671d610e812579ab5e5f05870586cf.diff

LOG: [Docs] Store to poison is the canonical form for non-terminator unreachable (#98910)

Add the content from
https://github.com/llvm/llvm-project/pull/96639#issuecomment-2189111902.

Added: 
    

Modified: 
    llvm/docs/Frontend/PerformanceTips.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/Frontend/PerformanceTips.rst b/llvm/docs/Frontend/PerformanceTips.rst
index 289106cd1e28e..4baf127bf050b 100644
--- a/llvm/docs/Frontend/PerformanceTips.rst
+++ b/llvm/docs/Frontend/PerformanceTips.rst
@@ -206,7 +206,9 @@ Other Things to Consider
    that fact is critical for optimization purposes.  Assumes are a great
    prototyping mechanism, but they can have negative effects on both compile
    time and optimization effectiveness.  The former is fixable with enough
-   effort, but the later is fairly fundamental to their designed purpose.
+   effort, but the later is fairly fundamental to their designed purpose.  If
+   you are creating a non-terminator unreachable instruction or passing a false
+   value, use the ``store i1 true, ptr poison, align 1`` canonical form.
 
 
 Describing Language Specific Properties


        


More information about the llvm-commits mailing list