search for: getsmallconstanttripmultipl

Displaying 4 results from an estimated 4 matches for "getsmallconstanttripmultipl".

2008 May 09
0
[LLVMdev] [PATCH] Split LoopUnroll pass into mechanism and policy
...9;ve also moved the RemapInstruction and FoldBlockIntoPredecessor support functions there. Additionally, I've also moved the loop unrolling statistics into the Utils file. Is that a good idea? I've added two new methods to Loop (or LoopBase<> really): getSmallConstantTripCount() and getSmallConstantTripMultiple(), which return the trip count and multiple as a normal unsigned value. There are a number of remaining issues, though. Firstly, I observe some code duplication. Every pass that performs loop unrolling, should depend on the LoopSimplify, LCSSA and LoopInfo passes. Also, the UnrollLoop code always...
2008 May 09
3
[LLVMdev] [PATCH] Split LoopUnroll pass into mechanism and policy
...> FoldBlockIntoPredecessor support functions there. > > Additionally, I've also moved the loop unrolling statistics into the > Utils file. Is > that a good idea? > > I've added two new methods to Loop (or LoopBase<> really): > getSmallConstantTripCount() and getSmallConstantTripMultiple(), > which return > the trip count and multiple as a normal unsigned value. > > There are a number of remaining issues, though. Firstly, I observe > some code > duplication. Every pass that performs loop unrolling, should depend > on the > LoopSimplify, LCSSA and Loop...
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
2008 May 09
0
[LLVMdev] [PATCH] Split LoopUnroll pass into mechanism and policy
...h is also the case if the trip > count is simply > + /// constant, use getSmallConstantTripCount for that case), Will > also return 1 > + /// if the trip count is very large (> 2^32). > > I know you're just refactoring existing code, but as a standalone utility > getSmallConstantTripMultiple should really handle the case where the trip > count is constant. Handle it how? By returning that constant? I had thought about this and decided for returning 0 instead, but now it seems returning the trip count instead of 1 is a better idea (since that's the largest constant that the tri...