[llvm] r302193 - [Float2Int] Remove return of ConstantRange from seen method. Nothing uses it so it just creates and discards a ConstantRange object for no reason.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu May 4 14:29:46 PDT 2017
Author: ctopper
Date: Thu May 4 16:29:45 2017
New Revision: 302193
URL: http://llvm.org/viewvc/llvm-project?rev=302193&view=rev
Log:
[Float2Int] Remove return of ConstantRange from seen method. Nothing uses it so it just creates and discards a ConstantRange object for no reason.
Modified:
llvm/trunk/include/llvm/Transforms/Scalar/Float2Int.h
llvm/trunk/lib/Transforms/Scalar/Float2Int.cpp
Modified: llvm/trunk/include/llvm/Transforms/Scalar/Float2Int.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Scalar/Float2Int.h?rev=302193&r1=302192&r2=302193&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Scalar/Float2Int.h (original)
+++ llvm/trunk/include/llvm/Transforms/Scalar/Float2Int.h Thu May 4 16:29:45 2017
@@ -31,7 +31,7 @@ public:
private:
void findRoots(Function &F, SmallPtrSet<Instruction *, 8> &Roots);
- ConstantRange seen(Instruction *I, ConstantRange R);
+ void seen(Instruction *I, ConstantRange R);
ConstantRange badRange();
ConstantRange unknownRange();
ConstantRange validateRange(ConstantRange R);
Modified: llvm/trunk/lib/Transforms/Scalar/Float2Int.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/Float2Int.cpp?rev=302193&r1=302192&r2=302193&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/Float2Int.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/Float2Int.cpp Thu May 4 16:29:45 2017
@@ -137,13 +137,12 @@ void Float2IntPass::findRoots(Function &
}
// Helper - mark I as having been traversed, having range R.
-ConstantRange Float2IntPass::seen(Instruction *I, ConstantRange R) {
+void Float2IntPass::seen(Instruction *I, ConstantRange R) {
DEBUG(dbgs() << "F2I: " << *I << ":" << R << "\n");
if (SeenInsts.find(I) != SeenInsts.end())
SeenInsts.find(I)->second = R;
else
SeenInsts.insert(std::make_pair(I, R));
- return R;
}
// Helper - get a range representing a poison value.
More information about the llvm-commits
mailing list