Page MenuHomePhabricator

ebevhan (Bevin Hansson)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 16 2018, 6:47 AM (104 w, 4 d)

Recent Activity

Thu, Jan 16

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

Wed, Jan 8

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

Rebased.

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

Rebased.

Wed, Jan 8, 5:57 AM · Restricted Project

Tue, Jan 7

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

Ping.

Tue, Jan 7, 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

Feb 20 2019

ebevhan added inline comments to D58346: [Sema] Change addr space diagnostics in casts to follow C++ style.
Feb 20 2019, 6:26 AM · Restricted Project
ebevhan added inline comments to D58346: [Sema] Change addr space diagnostics in casts to follow C++ style.
Feb 20 2019, 5:02 AM · Restricted Project
ebevhan added inline comments to D58236: Make address space conversions a bit stricter..
Feb 20 2019, 1:46 AM · Restricted Project, Restricted Project
ebevhan updated the diff for D58236: Make address space conversions a bit stricter..
Feb 20 2019, 1:33 AM · Restricted Project, Restricted Project

Feb 19 2019

ebevhan added inline comments to D58346: [Sema] Change addr space diagnostics in casts to follow C++ style.
Feb 19 2019, 12:48 AM · Restricted Project

Feb 18 2019

ebevhan added inline comments to D58236: Make address space conversions a bit stricter..
Feb 18 2019, 8:30 AM · Restricted Project, Restricted Project
ebevhan added inline comments to D58236: Make address space conversions a bit stricter..
Feb 18 2019, 8:27 AM · Restricted Project, Restricted Project
ebevhan added inline comments to D58346: [Sema] Change addr space diagnostics in casts to follow C++ style.
Feb 18 2019, 7:45 AM · Restricted Project
ebevhan added inline comments to D58236: Make address space conversions a bit stricter..
Feb 18 2019, 5:31 AM · Restricted Project, Restricted Project
ebevhan updated the diff for D58236: Make address space conversions a bit stricter..
Feb 18 2019, 5:25 AM · Restricted Project, Restricted Project

Feb 14 2019

ebevhan added inline comments to D58236: Make address space conversions a bit stricter..
Feb 14 2019, 11:10 AM · Restricted Project, Restricted Project
ebevhan created D58236: Make address space conversions a bit stricter..
Feb 14 2019, 7:42 AM · Restricted Project, Restricted Project

Feb 13 2019

ebevhan added a comment to D58060: Fix diagnostic for addr spaces in reference binding.

We had discussion related to this with John earlier. And I documented it in this bug: https://bugs.llvm.org/show_bug.cgi?id=39674

Feb 13 2019, 3:49 PM
ebevhan added a comment to D58060: Fix diagnostic for addr spaces in reference binding.

So static_cast permits conversions from AS1 to AS2 where that conversion is implicitly allowed, and the new addrspace_cast would permit conversions from AS1 to AS2 where it is explicitly allowed. That seems like it fits in rather well with the idea in D57464 regarding support for specifying permitted AS conversions in target.

Feb 13 2019, 8:45 AM

Feb 7 2019

ebevhan added inline comments to D57219: [Fixed Point Arithmetic] Fixed Point Comparisons.
Feb 7 2019, 4:18 AM · Restricted Project
ebevhan added inline comments to D57219: [Fixed Point Arithmetic] Fixed Point Comparisons.
Feb 7 2019, 2:21 AM · Restricted Project
ebevhan added inline comments to D56900: [Fixed Point Arithmetic] Fixed Point and Integer Conversions.
Feb 7 2019, 1:57 AM · Restricted Project
ebevhan added a comment to D57553: [Fixed Point Arithmetic] Avoid resizing for types with the same width.

In regards to solving the problem of resizing for int conversions, I'm starting to think that we will need that initial resize since if we want to retain the min-max pattern for all conversions, then it would be necessary to extend and shift when converting from an int to fixed point. Otherwise, I think we'd have the initial pattern I proposed where we check against the source value, but not have this pattern.

Feb 7 2019, 1:37 AM · Restricted Project
ebevhan added inline comments to D55720: [Intrinsic] Signed Fixed Point Saturation Multiplication Intrinsic.
Feb 7 2019, 12:34 AM · Restricted Project

Feb 6 2019

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

Moving parsed attributes between lists isn't unreasonable if that's what you have to do; we already do that when processing the ObjC ARC qualifiers. The ambiguity with function attributes is pretty much inherent.

Feb 6 2019, 2:31 AM

Feb 5 2019

ebevhan added inline comments to D57464: Generalize method overloading on addr spaces to C++.
Feb 5 2019, 5:37 AM
ebevhan added inline comments to D57464: Generalize method overloading on addr spaces to C++.
Feb 5 2019, 1:59 AM

Feb 1 2019

ebevhan added inline comments to D57464: Generalize method overloading on addr spaces to C++.
Feb 1 2019, 2:14 PM
ebevhan added inline comments to D57464: Generalize method overloading on addr spaces to C++.
Feb 1 2019, 8:09 AM
ebevhan added a comment to D57553: [Fixed Point Arithmetic] Avoid resizing for types with the same width.

This doesn't seem to address the particular case in the integer conversion patch. In fact, I don't see those conversions at all.

Feb 1 2019, 12:50 AM · Restricted Project

Jan 31 2019

ebevhan added inline comments to D57464: Generalize method overloading on addr spaces to C++.
Jan 31 2019, 5:50 AM

Jan 30 2019

ebevhan added inline comments to D57464: Generalize method overloading on addr spaces to C++.
Jan 30 2019, 3:21 PM

Jan 28 2019

ebevhan added inline comments to D57219: [Fixed Point Arithmetic] Fixed Point Comparisons.
Jan 28 2019, 12:14 AM · Restricted Project

Jan 25 2019

ebevhan created D57226: [Fixed Point] [AST] Add an AST serialization code for fixed-point literals..
Jan 25 2019, 3:41 AM · Restricted Project
ebevhan added inline comments to D57226: [Fixed Point] [AST] Add an AST serialization code for fixed-point literals..
Jan 25 2019, 3:41 AM · Restricted Project
ebevhan added inline comments to D57219: [Fixed Point Arithmetic] Fixed Point Comparisons.
Jan 25 2019, 1:51 AM · Restricted Project
ebevhan added inline comments to D56900: [Fixed Point Arithmetic] Fixed Point and Integer Conversions.
Jan 25 2019, 12:44 AM · Restricted Project

Jan 24 2019

ebevhan added inline comments to D55850: [OpenCL] Allow address spaces as method qualifiers.
Jan 24 2019, 6:07 AM
ebevhan added a comment to D55850: [OpenCL] Allow address spaces as method qualifiers.

I think the code that comes to mind is mostly like in GetTypeSourceInfoForDeclarator:

LangAS AS =
    (ASIdx == LangAS::Default ? LangAS::opencl_generic : ASIdx);

It's behind an OpenCLCPlusPlus guard so it won't add generic on anything if it's not OpenCL++, but there shouldn't be a reason why the rest of the code in that block won't work for regular C++.

Jan 24 2019, 12:30 AM

Jan 22 2019

ebevhan added a comment to D55850: [OpenCL] Allow address spaces as method qualifiers.

Okay, sounds good! I'm not a C++ expert, but I'd be happy to look at the patches when they're up. Haven't done much serious testing on my end so far, but from what I've seen the patches so far look good!

Jan 22 2019, 3:45 AM

Jan 21 2019

ebevhan added a comment to D55850: [OpenCL] Allow address spaces as method qualifiers.

I'm a bit late to the party here, it was an older patch so I wasn't watching this one.

Jan 21 2019, 8:25 AM
ebevhan added inline comments to D56900: [Fixed Point Arithmetic] Fixed Point and Integer Conversions.
Jan 21 2019, 7:26 AM · Restricted Project

Jan 18 2019

ebevhan added inline comments to D56900: [Fixed Point Arithmetic] Fixed Point and Integer Conversions.
Jan 18 2019, 1:31 AM · Restricted Project

Jan 15 2019

ebevhan added inline comments to D55868: [Fixed Point Arithmetic] Fixed Point Addition Constant Expression Evaluation.
Jan 15 2019, 8:07 AM · Restricted Project

Jan 7 2019

ebevhan added inline comments to D56066: [OpenCL] Address space for default class members.
Jan 7 2019, 1:41 AM

Dec 20 2018

ebevhan added inline comments to D55868: [Fixed Point Arithmetic] Fixed Point Addition Constant Expression Evaluation.
Dec 20 2018, 8:21 AM · Restricted Project