The getConstant function and related functions have their return type changed from SCEV to SCEVConstant. Within the semantics of the getConstant function, it is correct to return the SCEVConstant type. The same applies to the getZero, getOne, getMinusOne and getPowerOfTwo functions. For some files, I had to connect a ScalarEvolutionExpressions file. This is necessary for implicit casting from SCEVConstant to SCEV.
Details
Details
Diff Detail
Diff Detail
Unit Tests
Unit Tests
Event Timeline
llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp | ||
---|---|---|
63 | Do I understand correctly that it's because auto resolve fails here? |
llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp | ||
---|---|---|
63 | Yes, you are right. I included this file so that automatic casting occurs. |
Comment Actions
Let's not do it. Making everyone include this header just because of this reason is an overkill.
Comment Actions
Why is this overkill? The ScalarEvolutionExpression class contains a SCEVConstant class definition that defines the SCEVConstant class as inherit of the SCEV class. This information allows us to cast. Without connecting a class, it is impossible to make a cast.
cast