[llvm-commits] [llvm] r70553 - /llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp
Chris Lattner
clattner at apple.com
Fri May 1 15:04:10 PDT 2009
On May 1, 2009, at 12:15 PM, Dan Gohman wrote:
>>> 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.
I think SCEVExpander should definitely have TD info, is there a
logistical problem with adding it? I'm not implying that it needs to
happen *now*, I'm just saying this seems like a good eventual direction.
-Chris
More information about the llvm-commits
mailing list