Page MenuHomePhabricator

ebevhan (Bevin Hansson)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 16 2018, 6:47 AM (139 w, 2 d)

Recent Activity

Tue, Sep 15

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

Any more feedback on this?

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

Fixed typos.

Tue, Sep 15, 1:16 AM · Restricted Project

Mon, Sep 14

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

Fix clang-format warnings.

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

Fix clang-format warnings.

Mon, Sep 14, 7:35 AM · Restricted Project
ebevhan added inline comments to D86078: [AArch64] Improved lowering for saturating float to int..
Mon, Sep 14, 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.

Mon, Sep 14, 6:19 AM · Restricted Project

Fri, Sep 11

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

Fix typo.

Fri, Sep 11, 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..
Fri, Sep 11, 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.

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

Thu, Sep 10

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.

Thu, Sep 10, 6:13 AM · Restricted Project
ebevhan added inline comments to D86078: [AArch64] Improved lowering for saturating float to int..
Thu, Sep 10, 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.

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

Wed, Sep 9

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

Redid lowering.

Wed, Sep 9, 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.

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

Removed vector expansion.

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

Fixed failing test cases.

Wed, Sep 9, 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.

Wed, Sep 9, 1:21 AM · Restricted Project

Tue, Sep 8

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

Updated method name.

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

Addressed comments.

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

Mon, Sep 7

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

Removed superfluous NaN check and updated tests.

Mon, Sep 7, 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.

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

Rebased.

Mon, Sep 7, 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.

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

Rebased.

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

Rebased.

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

Rebased.

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

Rebased.

Mon, Sep 7, 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.

Mon, Sep 7, 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.

Mon, Sep 7, 4:45 AM · Restricted Project

Fri, Sep 4

ebevhan added inline comments to D86796: [Sema] Address-space sensitive index check for unbounded arrays.
Fri, Sep 4, 5:43 AM · Restricted Project
ebevhan added inline comments to D86796: [Sema] Address-space sensitive index check for unbounded arrays.
Fri, Sep 4, 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.

Fri, Sep 4, 2:28 AM · Restricted Project

Thu, Sep 3

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

Wed, Sep 2

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

Tue, Sep 1

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.

Tue, Sep 1, 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.

Tue, Sep 1, 8:01 AM · Restricted Project
ebevhan added inline comments to D86796: [Sema] Address-space sensitive index check for unbounded arrays.
Tue, Sep 1, 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.

Tue, Sep 1, 6:33 AM · Restricted Project

Mon, Aug 31

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

Addressed comments.

Mon, Aug 31, 9:08 AM · Restricted Project

Thu, Aug 27

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.

Thu, Aug 27, 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.

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

Fix comment mistake.

Thu, Aug 27, 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..
Thu, Aug 27, 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.

Thu, Aug 27, 1:02 AM

Wed, Aug 26

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

Rebased and did minor adjustments.

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

Missing globalisel support

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

Ping.

Wed, Aug 26, 3:39 AM · Restricted Project

Tue, Aug 25

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.

Tue, Aug 25, 1:29 AM · Restricted Project

Mon, Aug 24

ebevhan abandoned D82663: [CodeGen] Have CodeGen for fixed-point unsigned with padding emit signed operations..
Mon, Aug 24, 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.

Mon, Aug 24, 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.
Mon, Aug 24, 5:38 AM
ebevhan closed D83294: [Fixed Point] Add codegen for fixed-point shifts..
Mon, Aug 24, 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.
Mon, Aug 24, 5:38 AM
ebevhan closed D86282: [Fixed Point] Use FixedPointBuilder to codegen fixed-point IR..
Mon, Aug 24, 5:38 AM · Restricted Project
ebevhan requested review of D86447: [AST] Change return type of getTypeInfoInChars to a proper struct instead of std::pair..
Mon, Aug 24, 5:12 AM · Restricted Project
ebevhan added a reviewer for D86078: [AArch64] Improved lowering for saturating float to int.: paulwalker-arm.
Mon, Aug 24, 1:50 AM · Restricted Project

Fri, Aug 21

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

Added comments and more tests.

Fri, Aug 21, 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.

Fri, Aug 21, 1:29 AM · Restricted Project

Thu, Aug 20

ebevhan committed rG2bac004c905d: Add triples to fixed-point tests which lacked them. (authored by ebevhan).
Add triples to fixed-point tests which lacked them.
Thu, Aug 20, 6:36 AM
ebevhan requested review of D86282: [Fixed Point] Use FixedPointBuilder to codegen fixed-point IR..
Thu, Aug 20, 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.
Thu, Aug 20, 1:31 AM
ebevhan committed rGf03b10f57ebb: [IR] Add FixedPointBuilder. (authored by ebevhan).
[IR] Add FixedPointBuilder.
Thu, Aug 20, 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.
Thu, Aug 20, 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.
Thu, Aug 20, 1:31 AM
ebevhan closed D85314: [IR] Add FixedPointBuilder..
Thu, Aug 20, 1:31 AM · Restricted Project
ebevhan closed D85312: [ADT] Move FixedPoint.h from Clang to LLVM..
Thu, Aug 20, 1:31 AM · Restricted Project, Restricted Project
ebevhan closed D85191: [AST] Get field size in chars rather than bits in RecordLayoutBuilder..
Thu, Aug 20, 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
ebevhan updated the diff for D54749: Saturating float to int casts..

Addressed comment.

Aug 19 2020, 1:47 AM · Restricted Project

Aug 18 2020

ebevhan added reviewers for D54749: Saturating float to int casts.: bogner, craig.topper.

Adding some more reviewers to get some more eyes on this.

Aug 18 2020, 8:29 AM · Restricted Project
ebevhan updated the diff for D54749: Saturating float to int casts..

Fixed minor formatting nits.

Aug 18 2020, 8:23 AM · Restricted Project
ebevhan updated the diff for D54749: Saturating float to int casts..

Updated summary on the second operand of the node.

Aug 18 2020, 7:17 AM · Restricted Project
ebevhan added reviewers for D85314: [IR] Add FixedPointBuilder.: fhahn, efriedma, leonardchan, rjmccall.
Aug 18 2020, 6:19 AM · Restricted Project
ebevhan added a comment to D85191: [AST] Get field size in chars rather than bits in RecordLayoutBuilder..

It doesn't feel like this patch got a very positive reception, but I'd still like to try a bit more to get it in.

Aug 18 2020, 5:51 AM · Restricted Project
ebevhan updated the diff for D54749: Saturating float to int casts..

Added IntrWillReturn.

Aug 18 2020, 5:05 AM · Restricted Project
ebevhan added inline comments to D86079: [X86] Improved lowering for saturating float to int..
Aug 18 2020, 4:41 AM · Restricted Project
ebevhan updated the diff for D86079: [X86] Improved lowering for saturating float to int..

Addressed comments.

Aug 18 2020, 4:39 AM · Restricted Project
ebevhan added inline comments to D86079: [X86] Improved lowering for saturating float to int..
Aug 18 2020, 1:35 AM · Restricted Project
ebevhan updated the diff for D86079: [X86] Improved lowering for saturating float to int..

Addressed comments.

Aug 18 2020, 1:33 AM · Restricted Project

Aug 17 2020

ebevhan requested review of D86079: [X86] Improved lowering for saturating float to int..
Aug 17 2020, 8:00 AM · Restricted Project
ebevhan requested review of D86078: [AArch64] Improved lowering for saturating float to int..
Aug 17 2020, 7:26 AM · Restricted Project
ebevhan updated the diff for D54749: Saturating float to int casts..

Removed stray merge mistake.

Aug 17 2020, 5:59 AM · Restricted Project
ebevhan added inline comments to D54749: Saturating float to int casts..
Aug 17 2020, 5:39 AM · Restricted Project
ebevhan updated the diff for D54749: Saturating float to int casts..

Rebased and addressed comments.

Aug 17 2020, 5:13 AM · Restricted Project
ebevhan reclaimed D54749: Saturating float to int casts..

Thank you for picking this up. Some pointers from my side:

  • I would recommend against including GlobalISel support in the initial implementation. Unless trivial, SDAG and GlobalISel changes should never be made in the same patch, as the reviewers for these parts of the codebase are essentially disjoint.

All right.

Aug 17 2020, 1:00 AM · Restricted Project

Aug 14 2020

ebevhan commandeered D54749: Saturating float to int casts..
Aug 14 2020, 8:50 AM · Restricted Project
ebevhan requested review of D85961: [Fixed Point] Add floating point methods to APFixedPoint..
Aug 14 2020, 2:50 AM · Restricted Project

Aug 13 2020

ebevhan added a comment to D85312: [ADT] Move FixedPoint.h from Clang to LLVM..

Thanks for reviewing! I'm not really sure who to add as reviewers for D85314, though, and no one has replied to the RFC on the mailing list yet.

Aug 13 2020, 8:03 AM · Restricted Project, Restricted Project

Aug 11 2020

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

I think this works now. It should probably be given a few more reviewers to have a look. Do you have some suggestions, @Anastasia ?

Aug 11 2020, 9:16 AM · Restricted Project
ebevhan updated the diff for D62574: Add support for target-configurable address spaces..

Rebased and updated summary.

Aug 11 2020, 8:51 AM · Restricted Project