Page MenuHomePhabricator

ebevhan (Bevin Hansson)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 16 2018, 6:47 AM (115 w, 2 h)

Recent Activity

Thu, Mar 26

ebevhan added a comment to D76696: [AST] Build recovery expressions by default for C++..

We found an odd case in our downstream fork after this patch landed. We have a diagnostic in CheckVariableDeclarationType that checks for automatic variables that are too large for the stack address space, and it chokes on the testcase Parser/objcxx11-invalid-lambda.cpp:

Thu, Mar 26, 7:33 AM · Restricted Project

Feb 28 2020

ebevhan added a comment to D73186: [AST] Add fixed-point multiplication constant evaluation..

So, any more on this or are we in agreement?

Feb 28 2020, 12:32 AM · Restricted Project

Feb 24 2020

ebevhan committed rG6e561d1c94ed: [Intrinsic] Add fixed point saturating division intrinsics. (authored by ebevhan).
[Intrinsic] Add fixed point saturating division intrinsics.
Feb 24 2020, 1:56 AM
ebevhan closed D71550: [Intrinsic] Add fixed point saturating division intrinsics..
Feb 24 2020, 1:56 AM · Restricted Project
ebevhan committed rGc3f36acc9247: [MC] Widen the functional unit type from 32 to 64 bits. (authored by ebevhan).
[MC] Widen the functional unit type from 32 to 64 bits.
Feb 24 2020, 1:10 AM
ebevhan closed D71210: [MC] Widen the functional unit type from 32 to 64 bits..
Feb 24 2020, 1:09 AM · Restricted Project

Feb 21 2020

ebevhan added inline comments to D73186: [AST] Add fixed-point multiplication constant evaluation..
Feb 21 2020, 8:23 AM · Restricted Project
ebevhan added a comment to D71550: [Intrinsic] Add fixed point saturating division intrinsics..

Not being able to do s.63 saturating multiplication kind of leaves a bad taste in my mouth, but for the purposes of implementing the standard, *I don't think* there's an instance where division for the proposed types can result in this (at least on a typical desktop processor). The main issues I can see down the road are frontend related, like if we perhaps will want to add something like long long _Fract that has a signed 64 bit width, or other frontends want to have types of varying scale and width.

Feb 21 2020, 8:05 AM · Restricted Project

Feb 19 2020

ebevhan updated the diff for D71210: [MC] Widen the functional unit type from 32 to 64 bits..

Rebase and fix a few places where the FuncUnits type was missing.

Feb 19 2020, 6:21 AM · Restricted Project
ebevhan added inline comments to D73186: [AST] Add fixed-point multiplication constant evaluation..
Feb 19 2020, 12:40 AM · Restricted Project

Feb 18 2020

ebevhan added a comment to D71550: [Intrinsic] Add fixed point saturating division intrinsics..

Ah I see. Could you clarify though on how handling MIN / -EPS invokes undefined behavior?

Feb 18 2020, 7:39 AM · Restricted Project
ebevhan added inline comments to D73186: [AST] Add fixed-point multiplication constant evaluation..
Feb 18 2020, 7:12 AM · Restricted Project

Jan 23 2020

ebevhan added inline comments to D73186: [AST] Add fixed-point multiplication constant evaluation..
Jan 23 2020, 10:55 AM · Restricted Project
ebevhan added inline comments to D73186: [AST] Add fixed-point multiplication constant evaluation..
Jan 23 2020, 8:19 AM · Restricted Project
ebevhan added inline comments to D73186: [AST] Add fixed-point multiplication constant evaluation..
Jan 23 2020, 2:00 AM · Restricted Project
ebevhan added a comment to D71550: [Intrinsic] Add fixed point saturating division intrinsics..

It seems that I run into LLVM ERROR: Unsupported library call operation! if I call llvm.sdiv.fix.sat.i64 with a scale of 63:

define i64 @sdiv_sat_i64_s63(i64 %x, i64 %y) {
  %tmp = call i64 @llvm.sdiv.fix.sat.i64(i64 %x, i64 %y, i32 63)
  ret i64 %tmp;
}

This seems to be the only issue I could find from running the code.

Jan 23 2020, 1:17 AM · Restricted Project
ebevhan updated the diff for D73189: [AST] Fix certain consteval assignment and comma operator issues with fixed-point types..

Rebased.

Jan 23 2020, 12:48 AM · Restricted Project
ebevhan updated the diff for D73188: [AST] Improve overflow diagnostics for fixed-point constant evaluation..

Added tests for saturating types. Changed the warning group name for consistency.

Jan 23 2020, 12:48 AM · Restricted Project
ebevhan updated the diff for D73187: [AST] Add fixed-point division constant evaluation..

Rebased.

Jan 23 2020, 12:39 AM · Restricted Project
ebevhan updated the diff for D73186: [AST] Add fixed-point multiplication constant evaluation..

Rebased.

Jan 23 2020, 12:39 AM · Restricted Project
ebevhan updated the diff for D73257: [AST] Compress the FixedPointSemantics type better..

Rebased.

Jan 23 2020, 12:39 AM · Restricted Project
ebevhan updated the diff for D73184: [CodeGen] Emit IR for compound assignment with fixed-point operands..

Rebased.

Jan 23 2020, 12:39 AM · Restricted Project
ebevhan updated the diff for D73183: [CodeGen] Emit IR for fixed-point unary operators..

Rebased.

Jan 23 2020, 12:39 AM · Restricted Project
ebevhan updated the diff for D73182: [CodeGen] Emit IR for fixed-point multiplication and division..

Rebased.

Jan 23 2020, 12:39 AM · Restricted Project
ebevhan updated the diff for D71550: [Intrinsic] Add fixed point saturating division intrinsics..

Rebased.

Jan 23 2020, 12:39 AM · Restricted Project
ebevhan updated the diff for D73185: [AST] Add fixed-point subtraction constant evaluation..

Move packing of FixedPointSemantics to a separate patch.

Jan 23 2020, 12:30 AM · Restricted Project
ebevhan created D73257: [AST] Compress the FixedPointSemantics type better..
Jan 23 2020, 12:30 AM · Restricted Project
ebevhan added inline comments to D73185: [AST] Add fixed-point subtraction constant evaluation..
Jan 23 2020, 12:13 AM · Restricted Project

Jan 22 2020

ebevhan added a reviewer for D73183: [CodeGen] Emit IR for fixed-point unary operators.: bjope.
Jan 22 2020, 6:33 AM · Restricted Project
ebevhan added a reviewer for D73182: [CodeGen] Emit IR for fixed-point multiplication and division.: bjope.
Jan 22 2020, 6:33 AM · Restricted Project
ebevhan added a reviewer for D73184: [CodeGen] Emit IR for compound assignment with fixed-point operands.: bjope.
Jan 22 2020, 6:33 AM · Restricted Project
ebevhan added a reviewer for D73185: [AST] Add fixed-point subtraction constant evaluation.: bjope.
Jan 22 2020, 6:33 AM · Restricted Project
ebevhan created D73189: [AST] Fix certain consteval assignment and comma operator issues with fixed-point types..
Jan 22 2020, 6:33 AM · Restricted Project
ebevhan created D73188: [AST] Improve overflow diagnostics for fixed-point constant evaluation..
Jan 22 2020, 6:33 AM · Restricted Project
ebevhan created D73187: [AST] Add fixed-point division constant evaluation..
Jan 22 2020, 6:24 AM · Restricted Project
ebevhan created D73186: [AST] Add fixed-point multiplication constant evaluation..
Jan 22 2020, 6:24 AM · Restricted Project
ebevhan created D73185: [AST] Add fixed-point subtraction constant evaluation..
Jan 22 2020, 6:24 AM · Restricted Project
ebevhan created D73183: [CodeGen] Emit IR for fixed-point unary operators..
Jan 22 2020, 6:24 AM · Restricted Project
ebevhan created D73184: [CodeGen] Emit IR for compound assignment with fixed-point operands..
Jan 22 2020, 6:24 AM · Restricted Project
ebevhan created D73182: [CodeGen] Emit IR for fixed-point multiplication and division..
Jan 22 2020, 6:24 AM · Restricted Project
ebevhan updated the diff for D71550: [Intrinsic] Add fixed point saturating division intrinsics..

Fixed typo.

Jan 22 2020, 6:05 AM · Restricted Project

Jan 16 2020

ebevhan added inline comments to D71714: [Sema] Fix -Warray-bounds false negative when casting an out-of-bounds array item.
Jan 16 2020, 7:21 AM · Restricted Project

Jan 8 2020

ebevhan updated the diff for D71550: [Intrinsic] Add fixed point saturating division intrinsics..

Rebased.

Jan 8 2020, 5:57 AM · Restricted Project
ebevhan updated the diff for D70007: [Intrinsic] Add fixed point division intrinsics..

Rebased.

Jan 8 2020, 5:57 AM · Restricted Project

Jan 7 2020

ebevhan added a comment to D71550: [Intrinsic] Add fixed point saturating division intrinsics..

Ping.

Jan 7 2020, 1:59 AM · Restricted Project

Dec 18 2019

ebevhan updated the diff for D71550: [Intrinsic] Add fixed point saturating division intrinsics..

When promoting to a legal type, we must shift up the value for saturating divisions.

Dec 18 2019, 3:26 AM · Restricted Project

Dec 16 2019

ebevhan updated the diff for D71550: [Intrinsic] Add fixed point saturating division intrinsics..

No need to do the promotion in DAGBuilder for unsigned saturating 0-scale operations, they cannot experience overflow.

Dec 16 2019, 8:06 AM · Restricted Project
ebevhan added a parent revision for D71550: [Intrinsic] Add fixed point saturating division intrinsics.: D70007: [Intrinsic] Add fixed point division intrinsics..
Dec 16 2019, 7:38 AM · Restricted Project
ebevhan added a child revision for D70007: [Intrinsic] Add fixed point division intrinsics.: D71550: [Intrinsic] Add fixed point saturating division intrinsics..
Dec 16 2019, 7:38 AM · Restricted Project
ebevhan created D71550: [Intrinsic] Add fixed point saturating division intrinsics..
Dec 16 2019, 7:38 AM · Restricted Project

Dec 13 2019

ebevhan added a comment to D70007: [Intrinsic] Add fixed point division intrinsics..

I've been holding off on this for a while because the design made implementing saturated division a lot more complicated than it ought to be.

Dec 13 2019, 4:04 PM · Restricted Project

Dec 10 2019

ebevhan updated the diff for D71210: [MC] Widen the functional unit type from 32 to 64 bits..

Add a typedef to InstrStage, FuncUnits, and use it as the bitmask type for functional units.

Dec 10 2019, 8:01 AM · Restricted Project
ebevhan added a comment to D70007: [Intrinsic] Add fixed point division intrinsics..

Maybe @craig.topper has some input on this design.

Dec 10 2019, 7:51 AM · Restricted Project
ebevhan added a comment to D71210: [MC] Widen the functional unit type from 32 to 64 bits..

In fact, one concrete improvement we could do with this CL (which clearly found everything we needed to patch) is introduce a typedef for "A bitmask of functional units". This would allow us to find all the instances again in future, and highlight the point of the bitwidth to users.

Dec 10 2019, 7:19 AM · Restricted Project
ebevhan added a reviewer for D71210: [MC] Widen the functional unit type from 32 to 64 bits.: jmolloy.
Dec 10 2019, 2:59 AM · Restricted Project

Dec 9 2019

ebevhan created D71210: [MC] Widen the functional unit type from 32 to 64 bits..
Dec 9 2019, 7:28 AM · Restricted Project
ebevhan added a comment to D70007: [Intrinsic] Add fixed point division intrinsics..

I think I'd like someone who has more specialized SelectionDAG knowledge to come with some input as well, but it doesn't seem like anyone else is looking at the patch.

Dec 9 2019, 3:34 AM · Restricted Project
ebevhan updated the diff for D70007: [Intrinsic] Add fixed point division intrinsics..

Fix review comments.

Dec 9 2019, 3:34 AM · Restricted Project

Dec 6 2019

ebevhan added inline comments to D58634: [PR40778] Generate address space conversion when binding reference to a temporary value in different address space.
Dec 6 2019, 6:20 AM · Restricted Project
ebevhan added inline comments to D70007: [Intrinsic] Add fixed point division intrinsics..
Dec 6 2019, 1:13 AM · Restricted Project
ebevhan added inline comments to D70007: [Intrinsic] Add fixed point division intrinsics..
Dec 6 2019, 12:54 AM · Restricted Project

Nov 22 2019

ebevhan added a comment to D62574: Initial draft of target-configurable address spaces..

Sorry for the very late response on this. Hope it's not completely off your radar.

Nov 22 2019, 7:53 AM · Restricted Project

Nov 19 2019

ebevhan added a comment to D70007: [Intrinsic] Add fixed point division intrinsics..

Ping.

Nov 19 2019, 3:06 AM · Restricted Project

Nov 13 2019

ebevhan added reviewers for D70007: [Intrinsic] Add fixed point division intrinsics.: efriedma, craig.topper.
Nov 13 2019, 7:59 AM · Restricted Project
ebevhan updated the diff for D70007: [Intrinsic] Add fixed point division intrinsics..

Updated langref.

Nov 13 2019, 7:51 AM · Restricted Project

Nov 12 2019

ebevhan added a comment to D69393: [RFC][DebugInfo] emit user specified address_space in dwarf.

For what it's worth, in our downstream fork of Clang we have added the ability for function types to possess an address space.

Nov 12 2019, 8:09 AM · Restricted Project, debug-info

Nov 8 2019

ebevhan added a comment to D70007: [Intrinsic] Add fixed point division intrinsics..

I will preface this by saying that I'm not terribly pleased with this solution. There is no (easy) way to construct a wide division during operation legalization if the wider type is not legal, so we have to do a whole bunch of work upfront to avoid having to expand. It feels really hacky, but I'm not sure there's any other way of doing it given ISelDAG's design.

Nov 8 2019, 7:12 AM · Restricted Project
ebevhan created D70007: [Intrinsic] Add fixed point division intrinsics..
Nov 8 2019, 6:53 AM · Restricted Project

Aug 26 2019

ebevhan added a comment to D66334: [LoopUnroll] Handle certain PHIs in full unrolling properly..

@fhahn I don't have commit access so if someone could land it for me, that would be great!

Aug 26 2019, 1:55 AM · Restricted Project

Aug 20 2019

ebevhan updated the diff for D66334: [LoopUnroll] Handle certain PHIs in full unrolling properly..
Aug 20 2019, 2:18 AM · Restricted Project

Aug 19 2019

ebevhan added inline comments to D66334: [LoopUnroll] Handle certain PHIs in full unrolling properly..
Aug 19 2019, 2:06 AM · Restricted Project
ebevhan added a comment to D66206: [CodeGen] Don't keep stale pointers to LoopInfos.

I don't have commit access, so it would be great if you could commit this for me.

Aug 19 2019, 1:08 AM · Restricted Project

Aug 16 2019

ebevhan created D66341: [AsmPrinter] Remove const qualifier from EmitBasicBlockStart..
Aug 16 2019, 5:13 AM · Restricted Project
ebevhan updated the summary of D66341: [AsmPrinter] Remove const qualifier from EmitBasicBlockStart..
Aug 16 2019, 5:13 AM · Restricted Project
ebevhan updated the diff for D66334: [LoopUnroll] Handle certain PHIs in full unrolling properly..
Aug 16 2019, 4:20 AM · Restricted Project
ebevhan added inline comments to D66334: [LoopUnroll] Handle certain PHIs in full unrolling properly..
Aug 16 2019, 4:14 AM · Restricted Project
ebevhan created D66334: [LoopUnroll] Handle certain PHIs in full unrolling properly..
Aug 16 2019, 1:50 AM · Restricted Project

Aug 14 2019

ebevhan created D66206: [CodeGen] Don't keep stale pointers to LoopInfos.
Aug 14 2019, 2:33 AM · Restricted Project

Jul 29 2019

ebevhan added a comment to D62574: Initial draft of target-configurable address spaces..

Sorry for the very late response to this!

Jul 29 2019, 7:36 AM · Restricted Project

Jun 26 2019

ebevhan updated the diff for D62574: Initial draft of target-configurable address spaces..

Rebased and addressed some comments.

Jun 26 2019, 8:47 AM · Restricted Project
ebevhan added a comment to D62574: Initial draft of target-configurable address spaces..

Ok, I think at some point you might want to test extra functionality that doesn't fit into OpenCL model, for example explicit conversion over non-overlapping address spaces? I think for this you might find useful to add the extra flag that switches on extra testing with "fake" setup of address spaces.

Jun 26 2019, 7:15 AM · Restricted Project

Jun 7 2019

ebevhan updated the diff for D62574: Initial draft of target-configurable address spaces..

Replaced compatiblyIncludes and its dependents with ASTContext accessors instead.

Jun 7 2019, 8:15 AM · Restricted Project
ebevhan added a comment to D62574: Initial draft of target-configurable address spaces..

I'll have to see if that's possible without breaking a few more interfaces, since you can throw around Qualifiers and check for compatibility without an ASTContext today.

I was just thinking about testing the new logic. Should we add something like -ffake-address-space-map (https://clang.llvm.org/docs/UsersManual.html#opencl-specific-options) that will force targets to use some implementation of fake address space conversions? It was quite useful in OpenCL before we added concrete targets with address spaces. Alternatively, we can try to use SPIR that is a generic Clang-only target that has address spaces.

Well, there are a couple targets which have target address spaces even today, I think. AMDGPU should be one, right?

Yes, however I am not sure we will be able to test more than what we test with OpenCL. Also I am not sure AMD maintainer would be ok. Do you have any concrete idea of what to test?

Jun 7 2019, 8:00 AM · Restricted Project

Jun 3 2019

ebevhan added a comment to D62574: Initial draft of target-configurable address spaces..

This patch does not address the issue with the accessors
on Qualifiers (isAddressSpaceSupersetOf, compatiblyIncludes),
because I don't know how to solve it without breaking a ton of
rather nice encapsulation. Either, every mention of compatiblyIncludes
must be replaced with a call to a corresponding ASTContext method,
Qualifiers must have a handle to ASTContext, or ASTContext must be
passed to every such call. This revision mentions the issue in a comment:
https://reviews.llvm.org/D49294

I think using ASTContext helper is ok then.

Jun 3 2019, 2:21 AM · Restricted Project

May 29 2019

ebevhan created D62574: Initial draft of target-configurable address spaces..
May 29 2019, 2:12 AM · Restricted Project

May 8 2019

ebevhan added a comment to D58236: Make address space conversions a bit stricter..

This was accepted a while ago, but never landed. I don't have commit access; could someone commit it?

May 8 2019, 3:20 AM · Restricted Project, Restricted Project

Apr 17 2019

ebevhan updated the diff for D58236: Make address space conversions a bit stricter..
Apr 17 2019, 1:40 AM · Restricted Project, Restricted Project

Apr 16 2019

ebevhan added a comment to D58236: Make address space conversions a bit stricter..

Well, it doesn't seem to me like there is consensus on prohibiting nested address space conversion like this.

I can simply redo the patch to only include the bugfix on implicit conversions and drop the nesting level checks.

I thought the conclusion is:

  • Explicit conversions allowed for nested pointers with a warning.
  • Implicit conversions are disallowed for nested pointers with an error.

    Do you not see it this way?
Apr 16 2019, 4:10 AM · Restricted Project, Restricted Project

Apr 15 2019

ebevhan added a comment to D58236: Make address space conversions a bit stricter..

Well, it doesn't seem to me like there is consensus on prohibiting nested address space conversion like this.

Apr 15 2019, 3:45 AM · Restricted Project, Restricted Project

Apr 11 2019

ebevhan added a comment to D57464: Generalize method overloading on addr spaces to C++.

I think I would lean towards the latter since it means less fudging around with a whole bunch of unrelated methods. Do @rjmccall or @rsmith have any further opinions on this?

Ok, I can change the patch to prototype this approach. I might need some example test cases though.

Apr 11 2019, 1:44 AM

Mar 26 2019

ebevhan added a comment to D58236: Make address space conversions a bit stricter..

I think C probably requires us to allow this under an explicit cast, but we can at least warn about it. It does not require us to allow this as an implicit conversion, and that should be an error.

Mar 26 2019, 1:28 PM · Restricted Project, Restricted Project

Mar 21 2019

ebevhan added a comment to D58236: Make address space conversions a bit stricter..

Any more input on this?

Mar 21 2019, 4:43 AM · Restricted Project, Restricted Project

Mar 14 2019

ebevhan added a comment to D57464: Generalize method overloading on addr spaces to C++.

I think not. :( But I am wondering if we could proceed for now in some general direction and then make any improvements later. Probably the biggest part of this patch is not going to change. Would this make sense?

Mar 14 2019, 5:48 AM

Mar 11 2019

ebevhan added inline comments to D59105: [RFC] Create an Arbitrary Precision Integer Type..
Mar 11 2019, 7:47 AM

Mar 7 2019

ebevhan added a comment to D57464: Generalize method overloading on addr spaces to C++.

Any more input on this?

Mar 7 2019, 6:11 AM

Mar 5 2019

ebevhan added inline comments to D58060: Fix diagnostic for addr spaces in reference binding.
Mar 5 2019, 6:31 AM

Feb 28 2019

ebevhan added inline comments to D58346: [Sema] Change addr space diagnostics in casts to follow C++ style.
Feb 28 2019, 1:09 AM · Restricted Project
ebevhan added a comment to D58236: Make address space conversions a bit stricter..

LGTM! Thanks a lot for fixing this old bug! Btw, do you plan to look at generalizing this to C++ as well?

Feb 28 2019, 12:46 AM · Restricted Project, Restricted Project

Feb 27 2019

ebevhan added inline comments to D58236: Make address space conversions a bit stricter..
Feb 27 2019, 2:19 AM · Restricted Project, Restricted Project
ebevhan updated the diff for D58236: Make address space conversions a bit stricter..
Feb 27 2019, 2:18 AM · Restricted Project, Restricted Project