[prev in list] [next in list] [prev in thread] [next in thread]
List: llvm-commits
Subject: [PATCH] D30444: Rename isKnownNotFullPoison to programUndefinedIfPoison; NFC
From: Sanjoy Das via Phabricator via llvm-commits <llvm-commits () lists ! llvm ! org>
Date: 2017-04-30 19:54:25
Message-ID: c24bb04530af21ded163ec6e12d19357 () localhost ! localdomain
[Download RAW message or body]
This revision was automatically updated to reflect the committed changes.
Closed by commit rL301776: Rename isKnownNotFullPoison to programUndefinedIfPoison; \
NFC (authored by sanjoy).
Changed prior to commit:
https://reviews.llvm.org/D30444?vs=89977&id=97240#toc
Repository:
rL LLVM
https://reviews.llvm.org/D30444
Files:
llvm/trunk/include/llvm/Analysis/ValueTracking.h
llvm/trunk/lib/Analysis/ScalarEvolution.cpp
llvm/trunk/lib/Analysis/ValueTracking.cpp
llvm/trunk/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
llvm/trunk/test/Analysis/ScalarEvolution/flags-from-poison.ll
Index: llvm/trunk/include/llvm/Analysis/ValueTracking.h
===================================================================
--- llvm/trunk/include/llvm/Analysis/ValueTracking.h
+++ llvm/trunk/include/llvm/Analysis/ValueTracking.h
@@ -417,7 +417,7 @@
///
/// Note that this currently only considers the basic block that is
/// the parent of I.
- bool isKnownNotFullPoison(const Instruction *PoisonI);
+ bool programUndefinedIfFullPoison(const Instruction *PoisonI);
/// \brief Specific patterns of select instructions we can match.
enum SelectPatternFlavor {
Index: llvm/trunk/test/Analysis/ScalarEvolution/flags-from-poison.ll
===================================================================
--- llvm/trunk/test/Analysis/ScalarEvolution/flags-from-poison.ll
+++ llvm/trunk/test/Analysis/ScalarEvolution/flags-from-poison.ll
@@ -205,7 +205,7 @@
ret void
}
-; Demonstrate why we need a Visited set in llvm::isKnownNotFullPoison.
+; Demonstrate why we need a Visited set in llvm::programUndefinedIfFullPoison.
define void @test-add-not-header5(float* %input, i32 %offset) {
; CHECK-LABEL: @test-add-not-header5
entry:
Index: llvm/trunk/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
+++ llvm/trunk/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
@@ -1138,7 +1138,7 @@
// Add I to DominatingExprs if it's an add/sub that can't sign overflow.
if (match(I, m_NSWAdd(m_Value(LHS), m_Value(RHS))) ||
match(I, m_NSWSub(m_Value(LHS), m_Value(RHS)))) {
- if (isKnownNotFullPoison(I)) {
+ if (programUndefinedIfFullPoison(I)) {
const SCEV *Key =
SE->getAddExpr(SE->getUnknown(LHS), SE->getUnknown(RHS));
DominatingExprs[Key].push_back(I);
Index: llvm/trunk/lib/Analysis/ValueTracking.cpp
===================================================================
--- llvm/trunk/lib/Analysis/ValueTracking.cpp
+++ llvm/trunk/lib/Analysis/ValueTracking.cpp
@@ -3841,7 +3841,7 @@
}
}
-bool llvm::isKnownNotFullPoison(const Instruction *PoisonI) {
+bool llvm::programUndefinedIfFullPoison(const Instruction *PoisonI) {
// We currently only look for uses of poison values within the same basic
// block, as that makes it easier to guarantee that the uses will be
// executed given that PoisonI is executed.
Index: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
===================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp
@@ -5029,7 +5029,8 @@
return false;
// Only proceed if we can prove that I does not yield poison.
- if (!isKnownNotFullPoison(I)) return false;
+ if (!programUndefinedIfFullPoison(I))
+ return false;
// At this point we know that if I is executed, then it does not wrap
// according to at least one of NSW or NUW. If I is not executed, then we do
["D30444.97240.patch" (text/x-patch)]
Index: llvm/trunk/include/llvm/Analysis/ValueTracking.h
===================================================================
--- llvm/trunk/include/llvm/Analysis/ValueTracking.h
+++ llvm/trunk/include/llvm/Analysis/ValueTracking.h
@@ -417,7 +417,7 @@
///
/// Note that this currently only considers the basic block that is
/// the parent of I.
- bool isKnownNotFullPoison(const Instruction *PoisonI);
+ bool programUndefinedIfFullPoison(const Instruction *PoisonI);
/// \brief Specific patterns of select instructions we can match.
enum SelectPatternFlavor {
Index: llvm/trunk/test/Analysis/ScalarEvolution/flags-from-poison.ll
===================================================================
--- llvm/trunk/test/Analysis/ScalarEvolution/flags-from-poison.ll
+++ llvm/trunk/test/Analysis/ScalarEvolution/flags-from-poison.ll
@@ -205,7 +205,7 @@
ret void
}
-; Demonstrate why we need a Visited set in llvm::isKnownNotFullPoison.
+; Demonstrate why we need a Visited set in llvm::programUndefinedIfFullPoison.
define void @test-add-not-header5(float* %input, i32 %offset) {
; CHECK-LABEL: @test-add-not-header5
entry:
Index: llvm/trunk/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
+++ llvm/trunk/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
@@ -1138,7 +1138,7 @@
// Add I to DominatingExprs if it's an add/sub that can't sign overflow.
if (match(I, m_NSWAdd(m_Value(LHS), m_Value(RHS))) ||
match(I, m_NSWSub(m_Value(LHS), m_Value(RHS)))) {
- if (isKnownNotFullPoison(I)) {
+ if (programUndefinedIfFullPoison(I)) {
const SCEV *Key =
SE->getAddExpr(SE->getUnknown(LHS), SE->getUnknown(RHS));
DominatingExprs[Key].push_back(I);
Index: llvm/trunk/lib/Analysis/ValueTracking.cpp
===================================================================
--- llvm/trunk/lib/Analysis/ValueTracking.cpp
+++ llvm/trunk/lib/Analysis/ValueTracking.cpp
@@ -3841,7 +3841,7 @@
}
}
-bool llvm::isKnownNotFullPoison(const Instruction *PoisonI) {
+bool llvm::programUndefinedIfFullPoison(const Instruction *PoisonI) {
// We currently only look for uses of poison values within the same basic
// block, as that makes it easier to guarantee that the uses will be
// executed given that PoisonI is executed.
Index: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
===================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp
@@ -5029,7 +5029,8 @@
return false;
// Only proceed if we can prove that I does not yield poison.
- if (!isKnownNotFullPoison(I)) return false;
+ if (!programUndefinedIfFullPoison(I))
+ return false;
// At this point we know that if I is executed, then it does not wrap
// according to at least one of NSW or NUW. If I is not executed, then we do
[Attachment #4 (text/plain)]
_______________________________________________
llvm-commits mailing list
llvm-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic