[llvm-commits] [llvm] r70553 - /llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp
Dan Gohman
gohman at apple.com
Fri May 1 12:15:19 PDT 2009
On May 1, 2009, at 10:04 AM, Chris Lattner wrote:
>
> On May 1, 2009, at 10:00 AM, Dan Gohman wrote:
>
>> Author: djg
>> Date: Fri May 1 12:00:00 2009
>> New Revision: 70553
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=70553&view=rev
>> Log:
>> Short-circuit inttoptr-ptrtoint constant expressions; these aren't
>> always folded by the regular constant folder because it doesn't have
>> TargetData information.
>
> If you use llvm/Analysis/ConstantFolding.h, they should be!
SCEVExpander doesn't have a TargetData either. An alternative
to this approach would be to have ScalarEvolution export its
TargetData for general-purpose use, but the simple fix I
picked fits the present need in a simple way.
Dan
More information about the llvm-commits
mailing list