[PATCH] Fix PR22179
David Majnemer
david.majnemer at gmail.com
Sat Jan 10 14:42:46 PST 2015
LGTM with nits.
================
Comment at: lib/Analysis/ScalarEvolution.cpp:1758
@@ +1757,3 @@
+ auto IsKnownNonNegative =
+ std::bind1st(std::mem_fun(&ScalarEvolution::isKnownNonNegative), SE);
+
----------------
`std::bind1st` and `std::mem_fun` are deprecated in C++11, we should probably avoid new references to them.
How about:
auto IsKnownNonNegative =
std::bind(std::mem_fn(&ScalarEvolution::isKnownNonNegative), SE));
================
Comment at: lib/Analysis/ScalarEvolution.cpp:1761
@@ +1760,3 @@
+ if (SignOrUnsignWrap == SCEV::FlagNSW)
+ if (std::all_of(Ops.begin(), Ops.end(), IsKnownNonNegative))
+ return ScalarEvolution::setFlags(OldFlags,
----------------
This looks way nicer :)
http://reviews.llvm.org/D6914
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list