Displaying 3 results from an estimated 3 matches for "gettripcountconst".
2008 May 07
1
[LLVMdev] [PATCH] Split LoopUnroll pass into mechanism and policy
...ptions for that:
> 1. Put two methods in the utility class, each of which return one of
> those
> values.
> 2. Add two methods to the Loop class. Currently, there is a
> getTripCount()
> method that returns the trip count as a Value*. Perhaps we could
> add a
> getTripCountConst() (or getTripCountInt() ?) and
> getTripCountMultiple() to
> Loop?
>
>
> It seems to me the second option is nicer, though it shouldn't make
> too much
> of a difference.
The second option sounds nicer to me too. Is the name
getSmallConstantTripCount too paranoid?...
2008 May 07
0
[LLVMdev] [PATCH] Split LoopUnroll pass into mechanism and policy
...ust be shared somehow as well. I see two options for that:
1. Put two methods in the utility class, each of which return one of those
values.
2. Add two methods to the Loop class. Currently, there is a getTripCount()
method that returns the trip count as a Value*. Perhaps we could add a
getTripCountConst() (or getTripCountInt() ?) and getTripCountMultiple() to
Loop?
It seems to me the second option is nicer, though it shouldn't make too much
of a difference.
Furthermore, where to put this utility class? lib/Transforms/UnrollLoop.cpp
seems reasonable?
Gr.
Matthijs
-------------- next part...
2008 May 07
8
[LLVMdev] [PATCH] Split LoopUnroll pass into mechanism and policy
Hello Matthijs,
Separating mechanism from policy is a good thing for the LoopUnroll
pass. Instead of moving the policy to a subclass though, I think it'd
be better to move the mechanism, the unrollLoop function, out to be a
standalone utility function, with the LoopInfo object passed in
explicitly. FoldBlockIntoPredecessor would also be good to make into
a standalone utility function, since