summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorJohannes Doerfert <jdoerfert@anl.gov>2019-08-14 21:35:20 +0000
committerJohannes Doerfert <jdoerfert@anl.gov>2019-08-14 21:35:20 +0000
commite1e844d6b0997b58625a59ab79d2f9aaf9c71bfd (patch)
treea3c091d8eb056fe9daf650fd0875a2f5859de213 /llvm/lib/Transforms
parent6a1274a52e500537f498d7cd3fb3fae06e5087c0 (diff)
downloadbcm5719-llvm-e1e844d6b0997b58625a59ab79d2f9aaf9c71bfd.tar.gz
bcm5719-llvm-e1e844d6b0997b58625a59ab79d2f9aaf9c71bfd.zip
[Attributor][NFC] Add merge/join/clamp operators to the IntegerState
Differential Revision: https://reviews.llvm.org/D66146 llvm-svn: 368925
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/Attributor.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp
index b5d80dc99b2..4a1b3521711 100644
--- a/llvm/lib/Transforms/IPO/Attributor.cpp
+++ b/llvm/lib/Transforms/IPO/Attributor.cpp
@@ -1650,6 +1650,30 @@ struct DerefState : AbstractState {
return this->DerefBytesState == R.DerefBytesState &&
this->GlobalState == R.GlobalState;
}
+
+ /// Inequality for IntegerState.
+ bool operator!=(const DerefState &R) { return !(*this == R); }
+
+ /// See IntegerState::operator^=
+ DerefState operator^=(const DerefState &R) {
+ DerefBytesState ^= R.DerefBytesState;
+ GlobalState ^= R.GlobalState;
+ return *this;
+ }
+
+ /// See IntegerState::operator&=
+ DerefState operator&=(const DerefState &R) {
+ DerefBytesState &= R.DerefBytesState;
+ GlobalState &= R.GlobalState;
+ return *this;
+ }
+
+ /// See IntegerState::operator|=
+ DerefState operator|=(const DerefState &R) {
+ DerefBytesState |= R.DerefBytesState;
+ GlobalState |= R.GlobalState;
+ return *this;
+ }
};
struct AADereferenceableImpl : AADereferenceable, DerefState {
OpenPOWER on IntegriCloud