Page MenuHomePhabricator

ebevhan (Bevin Hansson)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 16 2018, 6:47 AM (144 w, 23 h)

Recent Activity

Tue, Oct 13

ebevhan committed rG101309fe048e: [AST] Change return type of getTypeInfoInChars to a proper struct instead of… (authored by ebevhan).
[AST] Change return type of getTypeInfoInChars to a proper struct instead of…
Tue, Oct 13, 4:44 AM
ebevhan committed rG9fa7f4845976: [Fixed Point] Add fixed-point to floating point cast types and consteval. (authored by ebevhan).
[Fixed Point] Add fixed-point to floating point cast types and consteval.
Tue, Oct 13, 4:44 AM
ebevhan closed D86447: [AST] Change return type of getTypeInfoInChars to a proper struct instead of std::pair..
Tue, Oct 13, 4:44 AM · Restricted Project
ebevhan closed D86631: [Fixed Point] Add fixed-point to floating point cast types and consteval..
Tue, Oct 13, 4:44 AM · Restricted Project

Fri, Oct 9

ebevhan committed rGdd3014f3dc7c: [Fixed Point] Add floating point methods to APFixedPoint. (authored by ebevhan).
[Fixed Point] Add floating point methods to APFixedPoint.
Fri, Oct 9, 1:31 AM
ebevhan committed rG9c26eb8b915e: Refactor fixed point conversion test. (authored by ebevhan).
Refactor fixed point conversion test.
Fri, Oct 9, 1:31 AM
ebevhan committed rG14a217534b79: [IR] Add Type::getFloatingPointTy. (authored by ebevhan).
[IR] Add Type::getFloatingPointTy.
Fri, Oct 9, 1:31 AM
ebevhan closed D85961: [Fixed Point] Add floating point methods to APFixedPoint..
Fri, Oct 9, 1:31 AM · Restricted Project
ebevhan closed D88648: Refactor fixed point conversion test..
Fri, Oct 9, 1:31 AM · Restricted Project
ebevhan closed D87512: [IR] Add Type::getFloatingPointTy..
Fri, Oct 9, 1:31 AM · Restricted Project

Thu, Oct 1

ebevhan requested review of D88648: Refactor fixed point conversion test..
Thu, Oct 1, 4:40 AM · Restricted Project

Wed, Sep 30

ebevhan added a comment to D54749: Saturating float to int casts..

It doesn't seem like anyone has any more immediate feedback. @efriedma, have all of your review comments been adequately addressed?

Wed, Sep 30, 8:19 AM · Restricted Project

Tue, Sep 29

ebevhan accepted D88174: [Sema] Address-space sensitive check for unbounded arrays (v2).

LGTM, but @aaron.ballman should probably give his two cents as well for completion's sake.

Tue, Sep 29, 4:43 AM · Restricted Project
ebevhan updated the diff for D86078: [AArch64] Improved lowering for saturating float to int..

Rebased.

Tue, Sep 29, 2:43 AM · Restricted Project
ebevhan updated the diff for D54749: Saturating float to int casts..

Rebased.

Tue, Sep 29, 2:43 AM · Restricted Project

Fri, Sep 25

ebevhan added a comment to D86078: [AArch64] Improved lowering for saturating float to int..

Ping. The build failures don't seem related to the patch.

Fri, Sep 25, 8:06 AM · Restricted Project
ebevhan added a comment to D54749: Saturating float to int casts..

Another gentle ping.

Fri, Sep 25, 8:03 AM · Restricted Project

Thu, Sep 24

ebevhan added a comment to D85961: [Fixed Point] Add floating point methods to APFixedPoint..

So is this patch good to go then?

Thu, Sep 24, 8:23 AM · Restricted Project

Wed, Sep 23

ebevhan added inline comments to D85961: [Fixed Point] Add floating point methods to APFixedPoint..
Wed, Sep 23, 3:36 AM · Restricted Project

Tue, Sep 22

ebevhan added inline comments to D85961: [Fixed Point] Add floating point methods to APFixedPoint..
Tue, Sep 22, 6:16 AM · Restricted Project

Sep 21 2020

ebevhan added a comment to D85961: [Fixed Point] Add floating point methods to APFixedPoint..

Ping.

Sep 21 2020, 4:28 AM · Restricted Project
ebevhan added a comment to D86632: [Fixed Point] Add codegen for conversion between fixed-point and floating point..

Ping. Any further comments?

Sep 21 2020, 4:28 AM · Restricted Project, Restricted Project

Sep 15 2020

ebevhan added a comment to D54749: Saturating float to int casts..

Any more feedback on this?

Sep 15 2020, 6:59 AM · Restricted Project
ebevhan updated the diff for D86078: [AArch64] Improved lowering for saturating float to int..

Fixed typos.

Sep 15 2020, 1:16 AM · Restricted Project

Sep 14 2020

ebevhan updated the diff for D86078: [AArch64] Improved lowering for saturating float to int..

Fix clang-format warnings.

Sep 14 2020, 7:45 AM · Restricted Project
ebevhan updated the diff for D54749: Saturating float to int casts..

Fix clang-format warnings.

Sep 14 2020, 7:35 AM · Restricted Project
ebevhan added inline comments to D86078: [AArch64] Improved lowering for saturating float to int..
Sep 14 2020, 6:24 AM · Restricted Project
ebevhan updated the diff for D86078: [AArch64] Improved lowering for saturating float to int..

Now only uses FP_TO_INT_SAT nodes for lowering. The nodes are selected in isel.

Sep 14 2020, 6:19 AM · Restricted Project

Sep 11 2020

ebevhan updated the diff for D86632: [Fixed Point] Add codegen for conversion between fixed-point and floating point..

Fix typo.

Sep 11 2020, 7:28 AM · Restricted Project, Restricted Project
ebevhan added inline comments to D86632: [Fixed Point] Add codegen for conversion between fixed-point and floating point..
Sep 11 2020, 6:55 AM · Restricted Project, Restricted Project
ebevhan updated the diff for D86632: [Fixed Point] Add codegen for conversion between fixed-point and floating point..

Using Type::getFloatingPointTy now.

Sep 11 2020, 6:53 AM · Restricted Project, Restricted Project
ebevhan requested review of D87512: [IR] Add Type::getFloatingPointTy..
Sep 11 2020, 6:52 AM · Restricted Project
ebevhan added inline comments to D86078: [AArch64] Improved lowering for saturating float to int..
Sep 11 2020, 2:19 AM · Restricted Project

Sep 10 2020

ebevhan updated the diff for D86078: [AArch64] Improved lowering for saturating float to int..

Use default expansion for f128 conversions; they aren't native so we can't be sure that they saturate.

Sep 10 2020, 6:13 AM · Restricted Project
ebevhan added inline comments to D86078: [AArch64] Improved lowering for saturating float to int..
Sep 10 2020, 5:54 AM · Restricted Project
ebevhan updated the diff for D86078: [AArch64] Improved lowering for saturating float to int..

Removed NativeSaturation parameter and made all lowering happen in Lower.

Sep 10 2020, 5:51 AM · Restricted Project
ebevhan added inline comments to D86078: [AArch64] Improved lowering for saturating float to int..
Sep 10 2020, 5:36 AM · Restricted Project
ebevhan added inline comments to D86078: [AArch64] Improved lowering for saturating float to int..
Sep 10 2020, 3:03 AM · Restricted Project

Sep 9 2020

ebevhan updated the diff for D86078: [AArch64] Improved lowering for saturating float to int..

Redid lowering.

Sep 9 2020, 9:01 AM · Restricted Project
ebevhan updated the diff for D86078: [AArch64] Improved lowering for saturating float to int..

Followup to removing vector expansion in the parent patch.

Sep 9 2020, 4:55 AM · Restricted Project
ebevhan updated the diff for D54749: Saturating float to int casts..

Removed vector expansion.

Sep 9 2020, 4:54 AM · Restricted Project
ebevhan updated the diff for D54749: Saturating float to int casts..

Fixed failing test cases.

Sep 9 2020, 2:19 AM · Restricted Project
ebevhan added a comment to D86078: [AArch64] Improved lowering for saturating float to int..

I would have experimented a little to understand better how things work, but I'm guessing the patch is based on other work because I couldn't some of the affected functions/nodes.

Sep 9 2020, 1:21 AM · Restricted Project

Sep 8 2020

ebevhan updated the diff for D86632: [Fixed Point] Add codegen for conversion between fixed-point and floating point..

Updated method name.

Sep 8 2020, 9:11 AM · Restricted Project, Restricted Project
ebevhan updated the diff for D85961: [Fixed Point] Add floating point methods to APFixedPoint..

Addressed comments.

Sep 8 2020, 9:10 AM · Restricted Project
ebevhan added inline comments to D85961: [Fixed Point] Add floating point methods to APFixedPoint..
Sep 8 2020, 9:10 AM · Restricted Project

Sep 7 2020

ebevhan updated the diff for D86078: [AArch64] Improved lowering for saturating float to int..

Removed superfluous NaN check and updated tests.

Sep 7 2020, 8:49 AM · Restricted Project
ebevhan added a comment to D54749: Saturating float to int casts..

I don't know why the premerge tests are failing. I don't see those failures locally, so it's rather hard to debug it, especially since the premerge build lacks proper debug info.

Sep 7 2020, 8:01 AM · Restricted Project
ebevhan updated the diff for D86632: [Fixed Point] Add codegen for conversion between fixed-point and floating point..

Rebased.

Sep 7 2020, 5:46 AM · Restricted Project, Restricted Project
ebevhan updated the diff for D86631: [Fixed Point] Add fixed-point to floating point cast types and consteval..

Rebased.

Sep 7 2020, 5:46 AM · Restricted Project
ebevhan updated the diff for D85961: [Fixed Point] Add floating point methods to APFixedPoint..

Rebased.

Sep 7 2020, 5:46 AM · Restricted Project
ebevhan updated the diff for D86079: [X86] Improved lowering for saturating float to int..

Rebased.

Sep 7 2020, 5:45 AM · Restricted Project
ebevhan updated the diff for D86078: [AArch64] Improved lowering for saturating float to int..

Rebased.

Sep 7 2020, 5:42 AM · Restricted Project
ebevhan updated the diff for D54749: Saturating float to int casts..

Rebased.

Sep 7 2020, 5:42 AM · Restricted Project
ebevhan updated the diff for D86632: [Fixed Point] Add codegen for conversion between fixed-point and floating point..

Added promotion mechanism.

Sep 7 2020, 4:46 AM · Restricted Project, Restricted Project
ebevhan updated the diff for D85961: [Fixed Point] Add floating point methods to APFixedPoint..

Added a promotion mechanism to handle cases where the floating point type cannot be used to rescale the value.

Sep 7 2020, 4:45 AM · Restricted Project

Sep 4 2020

ebevhan added inline comments to D86796: [Sema] Address-space sensitive index check for unbounded arrays.
Sep 4 2020, 5:43 AM · Restricted Project
ebevhan added inline comments to D86796: [Sema] Address-space sensitive index check for unbounded arrays.
Sep 4 2020, 4:28 AM · Restricted Project
ebevhan added a comment to D85961: [Fixed Point] Add floating point methods to APFixedPoint..

Would it be completely unthinkable to "promote" calculations to a larger FP type (both here and in codegen) if the exponent bits are insufficient to hold the necessary scaling?

You could have the same problem with float/bfloat and a 128-bit fixed-point type, right? 128-bit integer types aren't at all ridiculous. I think this is something you should accommodate properly in your design; I don't think it's that problematic.

Sep 4 2020, 2:28 AM · Restricted Project

Sep 3 2020

ebevhan added inline comments to D86796: [Sema] Address-space sensitive index check for unbounded arrays.
Sep 3 2020, 5:39 AM · Restricted Project

Sep 2 2020

ebevhan added inline comments to D62574: Add support for target-configurable address spaces..
Sep 2 2020, 5:18 AM · Restricted Project

Sep 1 2020

ebevhan added a comment to D62574: Add support for target-configurable address spaces..

The only thing is that it would be good to test the new target setting logic somehow... do you have any ideas in mind? We could think of creating a dummy target for that or adding a dummy setting in existing targets - maybe SPIR could be a candidate. We have done something similar in the past if you look at FakeAddrSpaceMap in LangOpts.

Sep 1 2020, 9:25 AM · Restricted Project
ebevhan updated the diff for D86078: [AArch64] Improved lowering for saturating float to int..

Made natively saturating expansions use integer comparisons instead.

Sep 1 2020, 8:01 AM · Restricted Project
ebevhan added inline comments to D86796: [Sema] Address-space sensitive index check for unbounded arrays.
Sep 1 2020, 7:13 AM · Restricted Project
ebevhan added a comment to D54749: Saturating float to int casts..

At least for the IEEE formats, you should be able to just destructure the bit-pattern of the float, right? Normalize and do some extends and shifts.

If we're going down that path, maybe simpler to just mess with the float scaling factor. If a float is close to the largest finite float, in IEEE formats, the fractional part must be zero. So we can do the float-to-int conversion on the unscaled float, and scale the resulting integer. Probably faster than trying to explicitly destructure a float.

Sep 1 2020, 6:33 AM · Restricted Project

Aug 31 2020

ebevhan updated the diff for D54749: Saturating float to int casts..

Addressed comments.

Aug 31 2020, 9:08 AM · Restricted Project

Aug 27 2020

ebevhan added a comment to D85961: [Fixed Point] Add floating point methods to APFixedPoint..

I hadn't considered half precision as that's sort of off my radar. That does make both these conversion methods and the corresponding codegen implementation rather problematic.

Aug 27 2020, 6:51 AM · Restricted Project
ebevhan added a comment to D54749: Saturating float to int casts..

I can't competently review LLVM code-gen patches, but I can review intrinsic design. If the intended use case here is fixed point, should there be a scale parameter rather than expecting the caller to scale the input? Or is scaling the input basically the expected implementation on all hardware? Scaling the input can be lossy if we overflow to infinity, so that would be making a tacit assumption here that if that happens, the original value must've been outside the representation range of the integer. For float (and bfloat), the exponent goes up to 127, so you would need to be converting to a pretty large fixed-point format to have problems with lossy overflow. For half, the exponent only goes up to 16, so converting to a 32-bit fixed-point format with a scale could overflow, and you probably won't be able to use these intrinsics.

Aug 27 2020, 2:32 AM · Restricted Project
ebevhan added inline comments to D86632: [Fixed Point] Add codegen for conversion between fixed-point and floating point..
Aug 27 2020, 1:28 AM · Restricted Project, Restricted Project
ebevhan updated the diff for D85961: [Fixed Point] Add floating point methods to APFixedPoint..

Fix comment mistake.

Aug 27 2020, 1:06 AM · Restricted Project
ebevhan retitled D85961: [Fixed Point] Add floating point methods to APFixedPoint. from Add floating point methods to APFixedPoint. to [Fixed Point] Add floating point methods to APFixedPoint..
Aug 27 2020, 1:03 AM · Restricted Project
ebevhan added a comment to D86677: [clang] Display error if _Fract fixed point literals overflow.

This needs a few tests.

Aug 27 2020, 1:02 AM

Aug 26 2020

ebevhan requested review of D86632: [Fixed Point] Add codegen for conversion between fixed-point and floating point..
Aug 26 2020, 8:37 AM · Restricted Project, Restricted Project
ebevhan requested review of D86631: [Fixed Point] Add fixed-point to floating point cast types and consteval..
Aug 26 2020, 8:36 AM · Restricted Project
ebevhan updated the diff for D85961: [Fixed Point] Add floating point methods to APFixedPoint..

Rebased and did minor adjustments.

Aug 26 2020, 8:31 AM · Restricted Project
ebevhan added a comment to D54749: Saturating float to int casts..

Missing globalisel support

Aug 26 2020, 7:16 AM · Restricted Project
ebevhan added a comment to D54749: Saturating float to int casts..

Ping.

Aug 26 2020, 3:39 AM · Restricted Project

Aug 25 2020

ebevhan added a reviewer for D86078: [AArch64] Improved lowering for saturating float to int.: nikic.

Given you are making use of the fact that AArch64 fp_to_int already does the saturation part, I'm wondering if the different-width saturation can be moved from the input to the output? Specially I'm thinking this will result in nicer code as the min/max immediate values will be easier to produce in integer form.

Aug 25 2020, 1:29 AM · Restricted Project

Aug 24 2020

ebevhan abandoned D82663: [CodeGen] Have CodeGen for fixed-point unsigned with padding emit signed operations..
Aug 24 2020, 8:36 AM · Restricted Project
ebevhan added a comment to D85961: [Fixed Point] Add floating point methods to APFixedPoint..

@gousemoodhin I just want to check; are you working on or planning to work on float-fixed support in the near future? Floating point conversions are the next step for the fixed-point support, so if you aren't immediately looking at it, I would like to take a shot at it.

Aug 24 2020, 6:29 AM · Restricted Project
ebevhan committed rG577f8b157a03: [Fixed Point] Add codegen for fixed-point shifts. (authored by ebevhan).
[Fixed Point] Add codegen for fixed-point shifts.
Aug 24 2020, 5:38 AM
ebevhan closed D83294: [Fixed Point] Add codegen for fixed-point shifts..
Aug 24 2020, 5:38 AM · Restricted Project
ebevhan committed rG808ac5464521: [Fixed Point] Use FixedPointBuilder to codegen fixed-point IR. (authored by ebevhan).
[Fixed Point] Use FixedPointBuilder to codegen fixed-point IR.
Aug 24 2020, 5:38 AM
ebevhan closed D86282: [Fixed Point] Use FixedPointBuilder to codegen fixed-point IR..
Aug 24 2020, 5:38 AM · Restricted Project
ebevhan requested review of D86447: [AST] Change return type of getTypeInfoInChars to a proper struct instead of std::pair..
Aug 24 2020, 5:12 AM · Restricted Project
ebevhan added a reviewer for D86078: [AArch64] Improved lowering for saturating float to int.: paulwalker-arm.
Aug 24 2020, 1:50 AM · Restricted Project

Aug 21 2020

ebevhan updated the diff for D85961: [Fixed Point] Add floating point methods to APFixedPoint..

Added comments and more tests.

Aug 21 2020, 7:49 AM · Restricted Project
ebevhan updated the diff for D83294: [Fixed Point] Add codegen for fixed-point shifts..

Revamped patch. It's now based on the FixedPointBuilder.

Aug 21 2020, 1:29 AM · Restricted Project

Aug 20 2020

ebevhan committed rG2bac004c905d: Add triples to fixed-point tests which lacked them. (authored by ebevhan).
Add triples to fixed-point tests which lacked them.
Aug 20 2020, 6:36 AM
ebevhan requested review of D86282: [Fixed Point] Use FixedPointBuilder to codegen fixed-point IR..
Aug 20 2020, 5:39 AM · Restricted Project
ebevhan committed rG44ebc2c8ebc8: Refactor most of the fixed-point tests. (authored by ebevhan).
Refactor most of the fixed-point tests.
Aug 20 2020, 1:31 AM
ebevhan committed rGf03b10f57ebb: [IR] Add FixedPointBuilder. (authored by ebevhan).
[IR] Add FixedPointBuilder.
Aug 20 2020, 1:31 AM
ebevhan committed rG1a995a0af3c4: [ADT] Move FixedPoint.h from Clang to LLVM. (authored by ebevhan).
[ADT] Move FixedPoint.h from Clang to LLVM.
Aug 20 2020, 1:31 AM
ebevhan committed rG1e7ec4842c1a: [AST] Get field size in chars rather than bits in RecordLayoutBuilder. (authored by ebevhan).
[AST] Get field size in chars rather than bits in RecordLayoutBuilder.
Aug 20 2020, 1:31 AM
ebevhan closed D85314: [IR] Add FixedPointBuilder..
Aug 20 2020, 1:31 AM · Restricted Project
ebevhan closed D85312: [ADT] Move FixedPoint.h from Clang to LLVM..
Aug 20 2020, 1:31 AM · Restricted Project, Restricted Project
ebevhan closed D85191: [AST] Get field size in chars rather than bits in RecordLayoutBuilder..
Aug 20 2020, 1:31 AM · Restricted Project

Aug 19 2020

ebevhan added inline comments to D85191: [AST] Get field size in chars rather than bits in RecordLayoutBuilder..
Aug 19 2020, 3:49 AM · Restricted Project
ebevhan added a comment to D85314: [IR] Add FixedPointBuilder..

I'm assuming that you've extracted this code out of the corresponded Clang code and that there's nothing functionally wrong with it. The interface looks fine. Can we add LLVM tests for this, or that too difficult to fit into the existing test infrastructure, and we should just wait to test it by moving Clang to use it?

Aug 19 2020, 1:53 AM · Restricted Project
ebevhan updated the diff for D86078: [AArch64] Improved lowering for saturating float to int..

Amended comment.

Aug 19 2020, 1:48 AM · Restricted Project