search for: exactlogbase2

Displaying 5 results from an estimated 5 matches for "exactlogbase2".

2011 Mar 06
0
[LLVMdev] First Patch
...idth, 0), zeroes(width, 0), ones(width, 0); > + mask.setAllBits(); An easier way to get an all-one mask would be to construct it as 'APInt mask(width, -1, true)'. > + ComputeMaskedBits(LHS, mask, zeroes, ones); > + zeroes.flipAllBits(); > + > + if ((power = ones.exactLogBase2()) != -1 && zeroes == ones) { It would probably be cleaner to assign 'power' outside the condition. I don't think you're handling the case where the only set bit is the sign bit correctly; in that case the value is the most negative number possible, so you only need to che...
2011 Mar 08
0
[LLVMdev] First Patch
...ippleBucketExists(APInt &thisKnownZero, APInt &thisKnownOne, > + APInt &otherKnownZero, unsigned width) { > + APInt mask; > + // First try to to take care of the case > + // (X & ~4) + (Y & 1) > + int32_t power = (~thisKnownZero).exactLogBase2(); > + if (power == -1) { > + if (~thisKnownZero == thisKnownOne) > + power = thisKnownOne.exactLogBase2(); Why did you introduce the extra log here? This assignment is a no-op when ~thisKnownZero == thisKnownOne... > + if (power == -1) ... which means this check is redun...
2011 Mar 08
2
[LLVMdev] First Patch
Hi! I've attached a patch which takes care of the issues mentioned (and adds two tests). -- Sanjoy Das http://playingwithpointers.com -------------- next part -------------- A non-text attachment was scrubbed... Name: ripple-bucket.diff Type: text/x-diff Size: 3318 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110308/0814e3e8/attachment.diff>
2011 Mar 06
1
[LLVMdev] First Patch
Hi all! I've been tinkering with LLVM's code-base for a few days, hoping to start on one of the ideas mentioned in the "Open Projects" page (I was told 'Improving the current system'/'Miscellaneous Improvements'/5 would be a good start). While I was at it, I also took a stab at finishing up one of the TODOs. I've attached the patch for review. --
2011 Mar 02
3
[LLVMdev] live variable analysis
Hi As I understand live variable analysis will set the def/kill properties of operands. In that case, is it still needed to set the kill flags when possible during lowering? thanks dz