On Jun 18, 2007, at 1:35 PM, Dan Gohman wrote:
>>> + // Now we know the first non-constant operand. Skip past any
>>> cast SCEVs.
>>> + while (Idx < Ops.size() && Ops[Idx]->getSCEVType() < scAddExpr)
>>> +++Idx;
>>
>> Can you please introduce a predicate for this? Comparing against
>> scA
> > + // Now we know the first non-constant operand. Skip past any
> > cast SCEVs.
> > + while (Idx < Ops.size() && Ops[Idx]->getSCEVType() < scAddExpr)
> > +++Idx;
>
> Can you please introduce a predicate for this? Comparing against
> scAddExpr is not obvious :)
I think if you read t
> In SCEVAddExpr::get, skip over any cast operands before looking for
> nested
> add operands after constant operands. The recent change to recognize
> sign-extend expressions caused this to be exposed more often.
Ok
> + // Now we know the first non-constant operand. Skip past any
> cast SC
> Nifty. Have you done any performance analysis of this? What cases
> is it beneficial for? If this helps LSR, for example, can you please
> add a testcase to verify this doesn't break in the future?
It doesn't actually help LSR much. At this point, a signextend isn't
much less opaque than an u
On Jun 15, 2007, at 7:38 AM, Dan Gohman wrote:
> +case Instruction::SExt:
> + return SCEVSignExtendExpr::get(getSCEV(I->getOperand(0)), I-
> >getType());
> +
Nifty. Have you done any performance analysis of this? What cases
is it beneficial for? If this helps LSR, for example, can
On Jun 6, 2007, at 5:19 AM, Nick Lewycky wrote:
> Chris Lattner wrote:
>> The only thing that can use Instructions are other intstructions. As
>> such, you can change the dyn_cast into cast
>> and there is no need to check for null in the next line.
>
> Fixed. Thanks Chris!
Even better fix, tha
Chris Lattner wrote:
> The only thing that can use Instructions are other intstructions. As
> such, you can change the dyn_cast into cast
> and there is no need to check for null in the next line.
Fixed. Thanks Chris!
Nick
___
llvm-commits mailing
> Fix PR1487: http://llvm.org/PR1487 and Transforms/IndVar/
> 2007-06-06-DeleteDanglesPtr.ll
Thanks Nicholas,
> /// client before it removes an instruction from the program, to
> make sure
> /// that no dangling references are left around.
> void ScalarEvolutionsImpl::deleteInstructionFrom
> ScalarEvolution.cpp updated: 1.110 -> 1.111
> ---
> Log message:
>
> For PR1336: http://llvm.org/PR1336 :
> Fix a div-by-zero bug noticed by APInt. This fixes:
> test/Transforms/IndVarsSimplify/exit_value_tests.llx
Please revert this immediately. The bug was already fixed and this
is not at a
> Index: llvm/lib/Analysis/ScalarEvolution.cpp
> diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.69 llvm/lib/
> Analysis/ScalarEvolution.cpp:1.70
> --- llvm/lib/Analysis/ScalarEvolution.cpp:1.69Mon Dec 11 20:26:09
> 2006
> +++ llvm/lib/Analysis/ScalarEvolution.cpp Mon Dec 11 23:04:59
nice, thanks Reid!
-Chris
On Dec 5, 2006, at 2:40 PM, Reid Spencer wrote:
>
>
> Changes in directory llvm/lib/Analysis:
>
> ScalarEvolution.cpp updated: 1.64 -> 1.65
> ---
> Log message:
>
> Finally get the casting right in this file. Also, remove some
> unnecessary
> casting because sdiv does
> Long and short of it, I put the checks for integer back in and changed
> the casts to use getTrunc or getZExt. Seems to work.
Ok
>> Fair enough, please make sure it happens at some point though.
>
> Okay, these are done now. Once stuff passes tests, I'll commit it.
Thanks Reid!
-Chris
On Tue, 2006-12-05 at 12:07 -0800, Chris Lattner wrote:
> On Dec 5, 2006, at 11:58 AM, Reid Spencer wrote:
> > On Tue, 2006-12-05 at 11:52 -0800, Chris Lattner wrote:
> >>> SCEVHandle SCEVTruncateExpr::get(const SCEVHandle &Op, const Type
> >>> *Ty) {
> >>>if (SCEVConstant *SC = dyn_cast(Op))
On Dec 5, 2006, at 11:58 AM, Reid Spencer wrote:
> On Tue, 2006-12-05 at 11:52 -0800, Chris Lattner wrote:
>>> SCEVHandle SCEVTruncateExpr::get(const SCEVHandle &Op, const Type
>>> *Ty) {
>>>if (SCEVConstant *SC = dyn_cast(Op))
>>> -return SCEVUnknown::get(ConstantExpr::getCast(SC->getValu
On Tue, 2006-12-05 at 11:52 -0800, Chris Lattner wrote:
> > SCEVHandle SCEVTruncateExpr::get(const SCEVHandle &Op, const Type
> > *Ty) {
> >if (SCEVConstant *SC = dyn_cast(Op))
> > -return SCEVUnknown::get(ConstantExpr::getCast(SC->getValue(),
> > Ty));
> > +return SCEVUnknown::get
> SCEVHandle SCEVTruncateExpr::get(const SCEVHandle &Op, const Type
> *Ty) {
>if (SCEVConstant *SC = dyn_cast(Op))
> -return SCEVUnknown::get(ConstantExpr::getCast(SC->getValue(),
> Ty));
> +return SCEVUnknown::get(
> +ConstantExpr::getTruncOrBitCast(SC->getValue(), Ty));
Reid, I don't like this series of patches. You're replacing one evil
with another. Please endeavor to figure out what type of cast is
actually needed and put it in, rather than changing one sort of
inferred cast into another.
> Index: llvm/lib/Analysis/ScalarEvolution.cpp
> diff -u llvm/l
17 matches
Mail list logo