Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Phabricator shutdown timeline

nhaehnle (Nicolai Hähnle)
User

Projects

User does not belong to any projects.

User Details

User Since
Oct 9 2015, 4:06 AM (415 w, 4 d)

Recent Activity

Mon, Sep 4

nhaehnle committed rG62790a8d4a94: AMDGPU: Fix test from previous commit (authored by nhaehnle).
AMDGPU: Fix test from previous commit
Mon, Sep 4, 7:13 PM · Restricted Project, Restricted Project
nhaehnle committed rGf5fb6ad2e5a7: AMDGPU: Precommit a test file (authored by nhaehnle).
AMDGPU: Precommit a test file
Mon, Sep 4, 6:59 PM · Restricted Project, Restricted Project

Aug 14 2023

nhaehnle abandoned D86154: AMDGPU: Add llvm.amdgcn.{read,readfirst,write}lane2 intrinsics with type overloads.

Indeed.

Aug 14 2023, 11:15 AM · Restricted Project, Restricted Project, Restricted Project
nhaehnle abandoned D86317: IRBuilder: add CreateIntrinsicByType method.

Yes, it did: the overload which has the return type as first argument.

Aug 14 2023, 11:14 AM · Restricted Project, Restricted Project
nhaehnle added a comment to D157492: [TableGen] Add `!dump` and `dump`..

I think we're commingling two different things here.

  • representing a value as a string
  • printing something out for debugging purposes.

While for debugging we may usually want to do both, it would be very useful to be able to use them independently. That would allow doing things like dump("got a pair of values [" # !repr(value_A) # " : " # !repr(value_B # "]")).

We could add some glue to dump/!dump() so that they wrap non-string arguments into !repr() automatically.

Aug 14 2023, 11:12 AM · Restricted Project, Restricted Project

Jul 11 2023

nhaehnle added inline comments to D153517: [AMDGPU] ISel for amdgpu_cs_chain[_preserve] functions.
Jul 11 2023, 8:50 PM · Restricted Project, Restricted Project
nhaehnle added a comment to D153761: [AMDGPU] ISel for @llvm.amdgcn.cs.chain intrinsic.

It would be nice to have a simple test case that shows the final assembly.

Jul 11 2023, 8:45 PM · Restricted Project, Restricted Project
nhaehnle added a comment to D153761: [AMDGPU] ISel for @llvm.amdgcn.cs.chain intrinsic.

It's a tail call, isn't it? Does it have the same restriction as an LLVM IR tail call, that allocas in the caller cannot be accessed by the callee?

Jul 11 2023, 8:38 PM · Restricted Project, Restricted Project
nhaehnle added inline comments to D147697: [IR] Add TargetExtTypeClass.
Jul 11 2023, 4:45 AM · Restricted Project, Restricted Project
nhaehnle added a comment to D147697: [IR] Add TargetExtTypeClass.

It seems this comes down to this question: Should the type properties be per type name or should they be per type?

Jul 11 2023, 4:33 AM · Restricted Project, Restricted Project

Jun 29 2023

nhaehnle added a comment to D152373: [TableGen] Support warnings on unused classes and multiclasses..

As shown by the many related revisions, this is clearly a good idea.

Jun 29 2023, 1:50 AM · Restricted Project, Restricted Project

Jun 27 2023

nhaehnle added inline comments to D153517: [AMDGPU] ISel for amdgpu_cs_chain[_preserve] functions.
Jun 27 2023, 4:21 AM · Restricted Project, Restricted Project
nhaehnle added inline comments to D153517: [AMDGPU] ISel for amdgpu_cs_chain[_preserve] functions.
Jun 27 2023, 1:28 AM · Restricted Project, Restricted Project

Jun 22 2023

nhaehnle added a comment to D150370: Introduce StructuredData.

Missing all the assembler tests (but I guess they come with the bitcode parts?)

Jun 22 2023, 1:24 PM · Restricted Project, Restricted Project
nhaehnle added a comment to D150370: Introduce StructuredData.

I think this larger context deserves a wider discussion

Jun 22 2023, 2:40 AM · Restricted Project, Restricted Project
nhaehnle requested review of D153509: [WIP][IR] Add RangeMetadata on top of ExtMetadata.
Jun 22 2023, 1:27 AM · Restricted Project, Restricted Project
nhaehnle requested review of D153508: [WIP][IR] Add exten{ded,sible} metadata.
Jun 22 2023, 1:26 AM · Restricted Project, Restricted Project
nhaehnle updated the diff for D150371: TargetExtType: Use a schema-based abbreviation in bitcode.

Rebase

Jun 22 2023, 1:26 AM · Restricted Project, Restricted Project
nhaehnle updated the diff for D147697: [IR] Add TargetExtTypeClass.

Rebase

Jun 22 2023, 1:26 AM · Restricted Project, Restricted Project
nhaehnle updated the diff for D150370: Introduce StructuredData.

Main change is removal of sdata::Symbol in favor of plain StringRef

Jun 22 2023, 1:25 AM · Restricted Project, Restricted Project

Jun 21 2023

nhaehnle accepted D151994: [AMDGPU] Add amdgpu_cs_chain[_preserve] CCs to IR & verifier.
Jun 21 2023, 2:46 AM · Restricted Project, Restricted Project
nhaehnle accepted D151995: [AMDGPU] Add llvm.amdgcn.cs.chain intrinsic to IR & verifier.
Jun 21 2023, 2:44 AM · Restricted Project, Restricted Project
nhaehnle added a comment to D151996: [AMDGPU] Start documenting calling conventions. NFC.

Semi-related, I think we should start interpreting i1 argument values as SGPR masks (i1 inreg would be extended to sreg32)

Jun 21 2023, 2:42 AM · Restricted Project, Restricted Project

Jun 20 2023

nhaehnle updated the diff for D150371: TargetExtType: Use a schema-based abbreviation in bitcode.

Move SchemaField into this patch

Jun 20 2023, 11:42 PM · Restricted Project, Restricted Project
nhaehnle updated the diff for D150370: Introduce StructuredData.

Move SchemaField out of this patch

Jun 20 2023, 11:42 PM · Restricted Project, Restricted Project
nhaehnle added a comment to D150370: Introduce StructuredData.

More generally, I'm not happy that this new concept is being introduced as part of the target type implementation. This doesn't really seem helpful for this specific use case (it makes the implementation substantially more complex rather than simpler). It may well make sense as part of some larger context, but I think this larger context deserves a wider discussion (probably on discourse) to clarify what the goals of this abstraction are and make sure we have a good design for it.

Sure. It's a bit of a chicken-and-egg thing. I do think this approach is better than the piecemeal addition of things to bitcode reader/writer, which is rather subtle code that I don't think too many people understand, but at the same time, working on big changes is frustrating unless you have clear line-of-sight to actually getting something useful upstream. So I started with this small thing quite consciously on purpose.

I have a WIP change locally that leverages the same infrastructure for "extended metadata", and at least an early minimal version that does something interesting is something that I think I can put up reasonably soon so that the discussion doesn't end up overly abstract. I would also like to do the same thing for "extended instructions", but that's still a bit further out.

FWIW, I do think this is pretty reasonable when seen as a pure IR/bitcode abstraction. I wouldn't have concerns if this were (initially at least) represented as std::pair<StringRef, sdata::Value> and only used as part of reading/writing. That use case doesn't really need any of the Symbol machinery -- we get these as strings in IR/bitcode anyway, and I don't think there is a substantial performance difference between interning the strings and then comparing IDs compared to directly comparing to a small handful of strings, during parsing only.

The design you have makes a lot more sense if the sdata is supposed to be used as part of the in-memory IR as well, in which case the Symbols are important for more efficient access -- but I'm not sure if they are ideal in that context either. That would still require that we have Symbols and Values (std::variant, ugh) in the representation. Ideally we'd just have a C++ struct with properly typed members, and sdata only being used for the purposes of serializing/deserializing those structs using a general mechanism, without requiring new asm/bitcode support each time.

Jun 20 2023, 11:29 PM · Restricted Project, Restricted Project
nhaehnle updated the diff for D150371: TargetExtType: Use a schema-based abbreviation in bitcode.

Drop symbols-as-values for now

Jun 20 2023, 11:13 PM · Restricted Project, Restricted Project
nhaehnle added inline comments to D147697: [IR] Add TargetExtTypeClass.
Jun 20 2023, 11:12 PM · Restricted Project, Restricted Project
nhaehnle updated the diff for D147697: [IR] Add TargetExtTypeClass.
  • Drop symbols-as-values for now
  • LangRef clarifications
Jun 20 2023, 11:12 PM · Restricted Project, Restricted Project
nhaehnle updated the diff for D150370: Introduce StructuredData.

Drop symbols-as-values for now

Jun 20 2023, 11:12 PM · Restricted Project, Restricted Project
nhaehnle added a comment to D150370: Introduce StructuredData.

I am very concerned about making this a global structure, rather than something bound to the context.

Jun 20 2023, 12:58 PM · Restricted Project, Restricted Project
nhaehnle added a comment to D150370: Introduce StructuredData.

More generally, I'm not happy that this new concept is being introduced as part of the target type implementation. This doesn't really seem helpful for this specific use case (it makes the implementation substantially more complex rather than simpler). It may well make sense as part of some larger context, but I think this larger context deserves a wider discussion (probably on discourse) to clarify what the goals of this abstraction are and make sure we have a good design for it.

Jun 20 2023, 12:54 PM · Restricted Project, Restricted Project
nhaehnle added inline comments to D147697: [IR] Add TargetExtTypeClass.
Jun 20 2023, 12:47 PM · Restricted Project, Restricted Project
nhaehnle updated the diff for D147697: [IR] Add TargetExtTypeClass.

Could you please add a test where a target type is first used and later type info for it is provided? I'd like to make sure this is an error.

Jun 20 2023, 12:46 PM · Restricted Project, Restricted Project
nhaehnle updated the diff for D147697: [IR] Add TargetExtTypeClass.

Missed a spot...

Jun 20 2023, 8:44 AM · Restricted Project, Restricted Project
nhaehnle added inline comments to D147697: [IR] Add TargetExtTypeClass.
Jun 20 2023, 8:43 AM · Restricted Project, Restricted Project
nhaehnle updated the diff for D150371: TargetExtType: Use a schema-based abbreviation in bitcode.

Rebase, mostly changes related to APInt bitwidth being preserved.

Jun 20 2023, 6:51 AM · Restricted Project, Restricted Project
nhaehnle updated the diff for D147697: [IR] Add TargetExtTypeClass.

Rebase, layout type defaults to void

Jun 20 2023, 6:51 AM · Restricted Project, Restricted Project
nhaehnle updated the diff for D150370: Introduce StructuredData.

Add iN prefix to integers (and bool) in structured data values

Jun 20 2023, 6:50 AM · Restricted Project, Restricted Project
nhaehnle added inline comments to D150370: Introduce StructuredData.
Jun 20 2023, 4:52 AM · Restricted Project, Restricted Project
nhaehnle added inline comments to D147697: [IR] Add TargetExtTypeClass.
Jun 20 2023, 4:51 AM · Restricted Project, Restricted Project
nhaehnle added inline comments to D150371: TargetExtType: Use a schema-based abbreviation in bitcode.
Jun 20 2023, 4:50 AM · Restricted Project, Restricted Project
nhaehnle added inline comments to D152794: [AMDGPU][GlobalISel] Shaders can only call amdgpu_gfx.
Jun 20 2023, 12:00 AM · Restricted Project, Restricted Project

Jun 19 2023

nhaehnle added a comment to D153280: [AMDGPU] Forbid dynamic alloca on PAL ABI.

I tend to agree with Matt here. *Current* graphics APIs don't allow users to write code that uses dynamic allocas, but since the stack size can be set externally there's no fundamental reason why supporting them should be impossible.

Jun 19 2023, 11:58 PM · Restricted Project, Restricted Project
nhaehnle added a comment to D152431: [Inliner] Handle convergence control when inlining a call.

Thanks, I like this much more :)

Jun 19 2023, 11:55 PM · Restricted Project, Restricted Project
nhaehnle added a comment to D152431: [Inliner] Handle convergence control when inlining a call.

The proliferation of the ConvergenceControlUsage makes me a bit uncomfortable. It adds the overhead of an additional iteration over entire functions every time a function is inlined or perhaps the inlining is even attempted. And the only thing we get in exchange is a safety check against mixing controlled and uncontrolled convergent operations. Is it really worth it? I'd expect that in general, a compiler either always emits controlled or always emits uncontrolled operations, which means this isn't actually a scenario we need to worry about too much.

Jun 19 2023, 9:39 AM · Restricted Project, Restricted Project
nhaehnle accepted D147116: [RFC] Introduce convergence control intrinsics.

I think this is in pretty good shape. You may want to give it a bit more time in case more discussion shows up, but it's good for me.

Jun 19 2023, 9:29 AM · Restricted Project, Restricted Project
nhaehnle added a comment to D138278: TableGen: honor LLVM_LINK_LLVM_DYLIB by default.

I haven't looked at this in a while, sorry. I do plan to cycle back to it eventually, but right now my work scheduling is more stack-based than FIFO and this is fairly low down...

Jun 19 2023, 9:17 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
nhaehnle added inline comments to D152794: [AMDGPU][GlobalISel] Shaders can only call amdgpu_gfx.
Jun 19 2023, 9:16 AM · Restricted Project, Restricted Project
nhaehnle accepted D151997: [AMDGPU] Document amdgpu_cs_chain[_preserve] CCs. NFC.
Jun 19 2023, 9:13 AM · Restricted Project, Restricted Project
nhaehnle accepted D151996: [AMDGPU] Start documenting calling conventions. NFC.
Jun 19 2023, 9:11 AM · Restricted Project, Restricted Project
nhaehnle added inline comments to D153279: [AMDGPU] Reimplement the GFX11 early release VGPRs optimization.
Jun 19 2023, 8:57 AM · Restricted Project, Restricted Project
nhaehnle added a comment to D153151: [EarlyCSE] Do not CSE convergent calls with memory effects.

I'm not familiar with the code but the thrust of it makes sense. We should probably still try to CSE calls that are in the same basic block, though. Is that easy to do?

Jun 19 2023, 3:48 AM · Restricted Project, Restricted Project

Jun 13 2023

nhaehnle committed rG2cb5c6d124d6: Scalarizer: limit scalarization for small element types (authored by nhaehnle).
Scalarizer: limit scalarization for small element types
Jun 13 2023, 12:15 PM · Restricted Project, Restricted Project
nhaehnle closed D149842: Scalarizer: limit scalarization for small element types.
Jun 13 2023, 12:14 PM · Restricted Project, Restricted Project
nhaehnle added a comment to D149842: Scalarizer: limit scalarization for small element types.

Thank you all for the reviews. I've addressed the remaining small comments as part of the commit.

Jun 13 2023, 12:14 PM · Restricted Project, Restricted Project
nhaehnle accepted D152797: [AMDGPU][ValueTracking] Precommit tests for amdgcn intrinsics that cannot create poison.
Jun 13 2023, 8:00 AM · Restricted Project, Restricted Project
nhaehnle added a comment to D152798: [AMDGPU][ValueTracking] Handle amdgcn intrinsics that cannot create poison.

My 2 cents:

Jun 13 2023, 7:55 AM · Restricted Project, Restricted Project

Jun 12 2023

nhaehnle added inline comments to D151997: [AMDGPU] Document amdgpu_cs_chain[_preserve] CCs. NFC.
Jun 12 2023, 1:26 AM · Restricted Project, Restricted Project
nhaehnle added inline comments to D151997: [AMDGPU] Document amdgpu_cs_chain[_preserve] CCs. NFC.
Jun 12 2023, 1:24 AM · Restricted Project, Restricted Project

Jun 6 2023

nhaehnle added inline comments to D151997: [AMDGPU] Document amdgpu_cs_chain[_preserve] CCs. NFC.
Jun 6 2023, 11:28 AM · Restricted Project, Restricted Project
nhaehnle added inline comments to D151994: [AMDGPU] Add amdgpu_cs_chain[_preserve] CCs to IR & verifier.
Jun 6 2023, 11:26 AM · Restricted Project, Restricted Project
nhaehnle added a reviewer for D151997: [AMDGPU] Document amdgpu_cs_chain[_preserve] CCs. NFC: t-tye.
Jun 6 2023, 4:47 AM · Restricted Project, Restricted Project

Jun 5 2023

nhaehnle added a comment to D151995: [AMDGPU] Add llvm.amdgcn.cs.chain intrinsic to IR & verifier.

Looks good to me apart from the comments.

Jun 5 2023, 12:08 PM · Restricted Project, Restricted Project
nhaehnle added a comment to D151997: [AMDGPU] Document amdgpu_cs_chain[_preserve] CCs. NFC.

Thanks, this looks pretty reasonable to me.

Jun 5 2023, 12:05 PM · Restricted Project, Restricted Project
nhaehnle added a comment to D151996: [AMDGPU] Start documenting calling conventions. NFC.

There could probably be a general section here to state that in the graphics calling conventions, inreg is used to denote arguments mapped to SGPRs, while other arguments are mapped to VGPRs.

Jun 5 2023, 12:02 PM · Restricted Project, Restricted Project

Jun 1 2023

nhaehnle updated the diff for D149842: Scalarizer: limit scalarization for small element types.

Address some review comments

Jun 1 2023, 2:41 AM · Restricted Project, Restricted Project
nhaehnle added a comment to D149842: Scalarizer: limit scalarization for small element types.

Thank you for taking a look. I'm going to address the low-level issues you pointed out immediately.

Jun 1 2023, 2:41 AM · Restricted Project, Restricted Project

May 31 2023

nhaehnle updated subscribers of D149842: Scalarizer: limit scalarization for small element types.

ping again after two weeks

May 31 2023, 11:55 AM · Restricted Project, Restricted Project

May 30 2023

nhaehnle accepted D150976: [LangRef] Document the de facto meaning of convergent.

I think this is a reasonable compromise until we can land D147116, but maybe give a few more days for others to chime in.

May 30 2023, 7:17 AM · Restricted Project, Restricted Project
nhaehnle added a comment to D151341: AMDGPU: Special case uniformity info for single lane workgroups.

We should be able to remove every convergent attribute under this special case, right.

May 30 2023, 6:48 AM · Restricted Project, Restricted Project
nhaehnle added a comment to D151341: AMDGPU: Special case uniformity info for single lane workgroups.

This could be a top-level check in isSourceOfDivergence: if a source of divergence executes with a single lane, it de facto stops being a source of divergence.

May 30 2023, 6:43 AM · Restricted Project, Restricted Project

May 23 2023

nhaehnle added inline comments to D151187: [doc] Add casting style preference to coding standards.
May 23 2023, 4:56 AM · Restricted Project, Restricted Project

May 19 2023

nhaehnle added inline comments to D150369: TypeFinder: collect target types.
May 19 2023, 5:27 AM · Restricted Project, Restricted Project
nhaehnle updated the diff for D150369: TypeFinder: collect target types.

Remove getStructType

May 19 2023, 5:27 AM · Restricted Project, Restricted Project
nhaehnle added a comment to D150370: Introduce StructuredData.

Thanks for taking a look!

May 19 2023, 4:57 AM · Restricted Project, Restricted Project

May 16 2023

nhaehnle abandoned D150368: TargetExtType: guard against the case that there is no layout type.

Ah, my bad. I was working with local changes for so long that I hadn't noticed this got lost somehow. Sorry about that. I will follow-up with an adjustment to my later typeinfo diff.

May 16 2023, 8:44 AM · Restricted Project, Restricted Project
nhaehnle added a comment to D150368: TargetExtType: guard against the case that there is no layout type.

There's nothing right now that would prevent this. Though we could default the layout type to something other than nullptr, if that is preferred. Maybe void?

May 16 2023, 8:07 AM · Restricted Project, Restricted Project

May 15 2023

nhaehnle accepted D14327: IR: Add llvm.ldexp and llvm.experimental.constrained.ldexp intrinsics.

Okay, makes sense.

May 15 2023, 5:59 AM · Restricted Project, Restricted Project
nhaehnle added a comment to D149842: Scalarizer: limit scalarization for small element types.

ping

May 15 2023, 3:07 AM · Restricted Project, Restricted Project
nhaehnle added a comment to D14327: IR: Add llvm.ldexp and llvm.experimental.constrained.ldexp intrinsics.

This mostly LGTM, but it looks like some GlobalISel legalization is missing relative to SelectionDAG?

May 15 2023, 3:06 AM · Restricted Project, Restricted Project
nhaehnle updated the diff for D147697: [IR] Add TargetExtTypeClass.
  • explicitly list properties in LangRef
  • add negative parser/assembler tests
  • use tuple binding syntax
May 15 2023, 1:14 AM · Restricted Project, Restricted Project
nhaehnle added inline comments to D147697: [IR] Add TargetExtTypeClass.
May 15 2023, 1:13 AM · Restricted Project, Restricted Project

May 11 2023

nhaehnle updated the diff for D147697: [IR] Add TargetExtTypeClass.

Remove two TODOs that have been done.

May 11 2023, 7:51 AM · Restricted Project, Restricted Project
nhaehnle requested review of D150371: TargetExtType: Use a schema-based abbreviation in bitcode.
May 11 2023, 7:38 AM · Restricted Project, Restricted Project
nhaehnle updated the diff for D147697: [IR] Add TargetExtTypeClass.

Major update, adding IR printing, parsing and bitcode writing/reading of the type info.

May 11 2023, 7:37 AM · Restricted Project, Restricted Project
nhaehnle requested review of D150370: Introduce StructuredData.
May 11 2023, 7:36 AM · Restricted Project, Restricted Project
nhaehnle requested review of D150369: TypeFinder: collect target types.
May 11 2023, 7:36 AM · Restricted Project, Restricted Project
nhaehnle requested review of D150368: TargetExtType: guard against the case that there is no layout type.
May 11 2023, 7:34 AM · Restricted Project, Restricted Project

May 8 2023

nhaehnle added a comment to D149775: [AMDGPU] Reserve SGPR pair when long branches are present.

Absolutely do not globally reserve s[6:7] for such things. Low SGPRs are very often given special meaning in function signatures.

May 8 2023, 1:03 PM · Restricted Project, Restricted Project, Restricted Project

May 5 2023

nhaehnle committed rG2e07adcd3a2a: Scalarizer: precommit some tests (authored by nhaehnle).
Scalarizer: precommit some tests
May 5 2023, 4:06 AM · Restricted Project, Restricted Project
nhaehnle committed rGd0a125a1e686: Scalarizer: use the canonical form of {extract,insert}element (authored by nhaehnle).
Scalarizer: use the canonical form of {extract,insert}element
May 5 2023, 4:06 AM · Restricted Project, Restricted Project
nhaehnle closed D149945: Scalarizer: precommit some tests.
May 5 2023, 4:06 AM · Restricted Project, Restricted Project
nhaehnle closed D149944: Scalarizer: use the canonical form of {extract,insert}element.
May 5 2023, 4:06 AM · Restricted Project, Restricted Project
nhaehnle added inline comments to D149842: Scalarizer: limit scalarization for small element types.
May 5 2023, 2:52 AM · Restricted Project, Restricted Project
nhaehnle updated the diff for D149842: Scalarizer: limit scalarization for small element types.
  • rebase on top of preparatory commits
  • remove else after return
  • add an explicit test for binary ops
May 5 2023, 2:50 AM · Restricted Project, Restricted Project
nhaehnle requested review of D149945: Scalarizer: precommit some tests.
May 5 2023, 2:50 AM · Restricted Project, Restricted Project
nhaehnle requested review of D149944: Scalarizer: use the canonical form of {extract,insert}element.
May 5 2023, 2:49 AM · Restricted Project, Restricted Project
nhaehnle accepted D149853: [AMDGPU] Remove extract_subvector patterns.
May 5 2023, 1:56 AM · Restricted Project, Restricted Project
nhaehnle committed rGef13308b2666: AMDGPU/SDAG: Improve {extract,insert}_subvector lowering for 16-bit vectors (authored by nhaehnle).
AMDGPU/SDAG: Improve {extract,insert}_subvector lowering for 16-bit vectors
May 5 2023, 1:55 AM · Restricted Project, Restricted Project