Page MenuHomePhabricator

lattner (Chris Lattner)
User

Projects

User does not belong to any projects.

User Details

User Since
Jun 28 2016, 7:50 PM (351 w, 2 d)

Recent Activity

Thu, Mar 16

lattner resigned from D146010: [sancov] fix coverage-report-server cannot display coverage detail.

this motivation makes sense to me, but I'm not a competent reviewer for this area

Thu, Mar 16, 8:50 AM · Restricted Project, Restricted Project

Mon, Mar 13

lattner accepted D145844: [Docs] Added llvm-mc documentation.

Super awesome, thank you again for driving this!

Mon, Mar 13, 9:20 AM · Restricted Project, Restricted Project

Sun, Mar 12

lattner accepted D145844: [Docs] Added llvm-mc documentation.

Amazing, thank you for tackling this!

Sun, Mar 12, 12:34 PM · Restricted Project, Restricted Project

Fri, Mar 3

lattner accepted D145182: [mlir][Parser] Make parse{Attribute,Type} null-terminate input.

Nice, thank you!

Fri, Mar 3, 1:39 PM · Restricted Project, Restricted Project

Thu, Mar 2

lattner added a comment to D145182: [mlir][Parser] Make parse{Attribute,Type} null-terminate input.

Cool. Suggestion: instead of duplicating the APIs, you could add a , bool isKnownNullTerminated = false flag. That keeps the API simpler and maintains a safe default while allowing clients to avoid the copy if they are sufficiently smart and already null terminated.

Thu, Mar 2, 9:17 PM · Restricted Project, Restricted Project

Mon, Feb 27

lattner accepted D144833: [mlir][core] Fix ValueRange printing in AsmPrinter.

Cool didn't know about enable_if = delete, TIL thank you for tackling this!

Mon, Feb 27, 2:01 PM · Restricted Project, Restricted Project

Feb 19 2023

lattner accepted D144348: [MLIR] Add replaceUsesWithIf on Operation.

Seems reasonable to me

Feb 19 2023, 7:03 AM · Restricted Project, Restricted Project

Feb 15 2023

lattner accepted D143976: [ADT] Add `at` method (assertive lookup) to DenseMap and StringMap.

Awesome, thank you for driving this!

Feb 15 2023, 9:27 PM · Restricted Project, Restricted Project

Feb 14 2023

lattner added a comment to D143976: [ADT] Add `at` method (assertive lookup) to DenseMap and StringMap.

We generally don't worry to much about compatibility issues. It is good to deprecate the old name for a few weeks before removing it, but we don't do long cycles here.

Feb 14 2023, 8:38 PM · Restricted Project, Restricted Project
lattner added a comment to D143976: [ADT] Add `at` method (assertive lookup) to DenseMap and StringMap.

Bikeshedding is good @foad, these are important core data structures :)

Feb 14 2023, 10:36 AM · Restricted Project, Restricted Project

Feb 13 2023

lattner added a comment to D143976: [ADT] Add `at` method (assertive lookup) to DenseMap and StringMap.

Very cool, I'm excited to get this. This will simplify a lot of code! Could you also add this to StringMap? It has a similar lookup method but it can't be used for non-default-constructible values, and has the same usage pattern as this container.

Feb 13 2023, 8:56 PM · Restricted Project, Restricted Project

Feb 10 2023

lattner added a comment to D142806: [libc++] Implement P0226R1 (Mathematical Special Functions).

I'm not familiar with the std::from_chars example, but GoogleBenchmarks is not part of the "shipped" libc++ product, it is an internal implementation detail.

Feb 10 2023, 3:57 PM · Restricted Project, Restricted Project
lattner accepted D143719: [mlir] Execute all requested translations in MlirTranslateMain.

This makes sense to me, thank you Fabian. That said, please also wait for another person to take a look at this. Some folks have opposed expanding the API of mlir-translate before and I'm not sure exactly what the boundaries we want are.

Feb 10 2023, 6:08 AM · Restricted Project, Restricted Project

Feb 8 2023

lattner requested changes to D142806: [libc++] Implement P0226R1 (Mathematical Special Functions).

I'm sorry, but accepting this patch will be very difficult for the project. I have several technical concerns with this patch:

  1. This is a very large block of code which does not follow LLVM conventions and has a lot of boost support functionality that seems redundant with stuff elsewhere in LLVM.
  2. This seems to overlap a lot with the llvm libc work, particularly for the simple numeric operations.
  3. This appears to add code with new dependencies, e.g. gmpfrxx? and has internal abstractions that aren't necessary for libcxx
Feb 8 2023, 5:09 AM · Restricted Project, Restricted Project

Feb 6 2023

lattner added a comment to D143406: [MIPS] Asm: Improved diagnostics when a memory operand and unsupported CPU feature are involved.

I'm sorry but I'm too far out of this code to review it.

Feb 6 2023, 8:30 PM · Restricted Project, Restricted Project, Restricted Project

Feb 1 2023

lattner accepted D141863: [llvm][APFloat] Add NaN-in-negative-zero formats by AMD and GraphCore.

Looks fine with the requested changes.

Feb 1 2023, 5:54 PM · Restricted Project, Restricted Project
lattner added inline comments to D141863: [llvm][APFloat] Add NaN-in-negative-zero formats by AMD and GraphCore.
Feb 1 2023, 5:54 PM · Restricted Project, Restricted Project

Jan 27 2023

lattner accepted D142790: [mlir][NFC] Move the headers for lsp-server-support to include/.
Jan 27 2023, 5:21 PM · Restricted Project, Restricted Project

Jan 19 2023

lattner added a comment to D139705: [clang] fix zero-initialization fix-it for variable template.

Got it this time, sorry for the confusion!

Jan 19 2023, 10:31 PM · Restricted Project, Restricted Project
lattner added a comment to D139705: [clang] fix zero-initialization fix-it for variable template.

I'm pretty sure I'm on top of commit access requests now, plz let me know if I missed you or something! Could be spam filter or who knows what

Jan 19 2023, 4:37 PM · Restricted Project, Restricted Project

Jan 15 2023

lattner committed rG18b72494d345: [MLIR] Simplify predicate in Matchers.h, NFC (authored by lattner).
[MLIR] Simplify predicate in Matchers.h, NFC
Jan 15 2023, 9:32 AM · Restricted Project, Restricted Project
lattner added a comment to D141783: [MLIR] Simplify predicate in Matchers.h, NFC.

Thank you for the review!

Jan 15 2023, 9:32 AM · Restricted Project, Restricted Project
lattner closed D141783: [MLIR] Simplify predicate in Matchers.h, NFC.
Jan 15 2023, 9:32 AM · Restricted Project, Restricted Project

Jan 14 2023

lattner added a reviewer for D141783: [MLIR] Simplify predicate in Matchers.h, NFC: Mogball.
Jan 14 2023, 10:06 PM · Restricted Project, Restricted Project
lattner requested review of D141783: [MLIR] Simplify predicate in Matchers.h, NFC.
Jan 14 2023, 10:06 PM · Restricted Project, Restricted Project

Jan 12 2023

lattner accepted D141231: [mlir][ods] Generate inferReturnTypes for ops with TypesMatchWith.
Jan 12 2023, 11:52 AM · Restricted Project, Restricted Project

Jan 9 2023

lattner added a comment to D141201: [mlir] Print a newline when dumping Type.

Nice, thank you for doing this!

Jan 9 2023, 1:44 PM · Restricted Project, Restricted Project
lattner added a comment to D141220: [TableGen][SourceMgr] Correctly append filename to include directories.

Wow, great catch, thank you for fixing this! SourceMgr is used by more than just tblgen btw, so fixing this is great. 161 seconds to 6 seconds is quite the speedup too :-)

Jan 9 2023, 8:26 AM · Restricted Project, Restricted Project
lattner added a comment to D141231: [mlir][ods] Generate inferReturnTypes for ops with TypesMatchWith.

This is so great Jeff, thank you for driving this forward, I love the boilerplate destruction!

Jan 9 2023, 8:25 AM · Restricted Project, Restricted Project

Dec 6 2022

lattner accepted D139447: [mlir] FunctionOpInterface: make get/setFunctionType interface methods.

Nice!

Dec 6 2022, 1:15 PM · Restricted Project, Restricted Project

Dec 3 2022

lattner added a comment to D139245: [MLIR] Simplify key construction/hashing in StorageUniquer.

nice Joe!

Dec 3 2022, 3:58 PM · Restricted Project, Restricted Project

Dec 2 2022

lattner added a comment to D139175: [mlir][Index] Add pretty result names for ConstantOp and BoolConstantOp.

nice, thank you for this!

Dec 2 2022, 2:31 PM · Restricted Project, Restricted Project

Nov 25 2022

lattner accepted D138707: Remove support for 10.4 Tiger from AsmPrinter.

Nice, seems overdue. Tiger (10.4.10) was the first release to ship LLVM as part of the OS, so special memories there :-). Thanks for cleaning this up!

Nov 25 2022, 5:38 PM · Restricted Project, Restricted Project

Nov 14 2022

lattner accepted D137960: [Lexer] Speedup LexTokenInternal.

Nice! I'd love someone else's eyes on this, but that's a great speedup!

Nov 14 2022, 5:06 PM · Restricted Project, Restricted Project

Nov 11 2022

lattner accepted D137820: [MemoryBuffer] Allow optionally specifying desired buffer alignment.

This LGTM and makes sense. Nice use of the alignment apis.

Nov 11 2022, 5:06 PM · Restricted Project, Restricted Project

Nov 2 2022

lattner added a comment to D137187: [mlir] Add call_intrinsic op to LLVMIIR.

I do need the llvm:: namespace qualifiers unfortunately; a lot of other functions in this file use them too. :(

Nov 2 2022, 11:18 AM · Restricted Project, Restricted Project

Nov 1 2022

lattner accepted D137187: [mlir] Add call_intrinsic op to LLVMIIR.

Very exciting Lily, thank you for implementing this!

Nov 1 2022, 6:31 PM · Restricted Project, Restricted Project

Oct 28 2022

lattner added a comment to D136969: [utils] Remove ancient scripts using llvm-config --src-root.

I have no objection to removing these!

Oct 28 2022, 12:55 PM · Restricted Project, Restricted Project

Oct 25 2022

lattner added a comment to D136637: [llvm-c] add LLVMReplaceMDNodeOperandWith.

Seems fine to me, but I don't work on the C API so I can't advise on it.

Oct 25 2022, 6:39 PM · Restricted Project, Restricted Project

Oct 24 2022

lattner added a comment to D136543: [mlir:LLVM] Rewrite the LLVMIR export to use the debug info attributes.

This is super exciting River! Baby MLIR is growing up to be a real compiler! :)

Oct 24 2022, 1:16 PM · Restricted Project, Restricted Project, Restricted Project

Oct 20 2022

lattner added a comment to D136316: Add a document on side effects & speculation in MLIR.

+1 for revising the name "pure" :-)

Oct 20 2022, 6:26 PM · Restricted Project, Restricted Project

Oct 15 2022

lattner added a comment to D135505: Introduce a ConditionallySpeculatable op interface.

More information on the GCC/Clang attribute semantics:
https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html

Oct 15 2022, 10:28 PM · Restricted Project, Restricted Project
lattner added a comment to D135505: Introduce a ConditionallySpeculatable op interface.

I just noticed this patch when it got merged into our tree.

Oct 15 2022, 10:26 PM · Restricted Project, Restricted Project

Oct 14 2022

lattner accepted D135838: [mlir:ODS] Generate unwrapped operation attribute setters.

This will remove so much boilerplate, thank you!

Oct 14 2022, 11:42 AM · Restricted Project, Restricted Project
lattner committed rG1dee803afab1: [SaveAndRestore] Upgrade this to support non-copyable types. (authored by lattner).
[SaveAndRestore] Upgrade this to support non-copyable types.
Oct 14 2022, 8:14 AM · Restricted Project, Restricted Project
lattner closed D135940: [SaveAndRestore] Upgrade this to support non-copyable types..
Oct 14 2022, 8:14 AM · Restricted Project, Restricted Project
lattner added a comment to D135940: [SaveAndRestore] Upgrade this to support non-copyable types..

agreed, I'm not in love with the existing API, but I don't want to break everyone for no reason. Thanks for the review!

Oct 14 2022, 8:13 AM · Restricted Project, Restricted Project

Oct 13 2022

lattner added reviewers for D135940: [SaveAndRestore] Upgrade this to support non-copyable types.: rriddle, bzcheeseman, nkreeger, MaskRay.

This is an obvious patch and tested with out of tree clients. There isn't an obvious owner for this file at this time besides me :-/, anyone object to landing this?

Oct 13 2022, 10:04 PM · Restricted Project, Restricted Project
lattner requested review of D135940: [SaveAndRestore] Upgrade this to support non-copyable types..
Oct 13 2022, 10:01 PM · Restricted Project, Restricted Project
lattner accepted D135870: [mlir] Update Values to use new casting infra.

awesome, thank you!

Oct 13 2022, 9:10 PM · Restricted Project, Restricted Project
lattner accepted D135870: [mlir] Update Values to use new casting infra.

Awesome!! Please adopt this in a few places just to exercise the new logic. a wholesale swapover can be done in a separate patch, but it is good to show that the new syntax works.

Oct 13 2022, 8:17 AM · Restricted Project, Restricted Project

Oct 12 2022

lattner accepted D135823: [mlir] Update CallInterfaceCallable to use the new casting infra.

Nice Nick, +1 for updating in tree uses if there are any

Oct 12 2022, 4:02 PM · Restricted Project, Restricted Project

Oct 1 2022

lattner accepted D135007: [mlir] Rename FunctionOpInterface::getBody to getFunctionBody.

Thank you, this is very helpful!

Oct 1 2022, 9:38 AM · Restricted Project, Restricted Project

Sep 28 2022

lattner accepted D134847: [mlir] Making verification after parsing optional.

Nice, thank you for the test

Sep 28 2022, 7:22 PM · Restricted Project, Restricted Project

Sep 27 2022

lattner added a comment to D134762: [mlir][arith] Change dialect name from Arithmetic to Arith.

Is there a reason to have two names for the same thing? Why shouldn't the omp dialect be moved into a directory "omp"?

Sep 27 2022, 5:39 PM · Restricted Project, Restricted Project
lattner accepted D134762: [mlir][arith] Change dialect name from Arithmetic to Arith.

+1 this makes sense to me, but I'd love for someone else's eyes to be on the details. Thank you!

Sep 27 2022, 2:52 PM · Restricted Project, Restricted Project
lattner accepted D134740: Document use of Co-author-by git tag..

Thank you for clarifying this!

Sep 27 2022, 9:22 AM · Restricted Project, Restricted Project

Sep 20 2022

lattner added a comment to D134087: [TableGen] Track reference locations of Records/RecordVals.

The problem that I ran into was that a lot of stuff kind of requires that the Inits get folded and are uniqued, which would no longer be the case if we put locations on them. From there this patch arose, because I didn't want to broach the "rewrite the world" just to get better locations.

Sep 20 2022, 5:39 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Sep 17 2022

lattner added a comment to D134087: [TableGen] Track reference locations of Records/RecordVals.

Very cool, it'd be great to improve this in tblgen!

Sep 17 2022, 1:21 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Sep 14 2022

lattner added a comment to D123394: [CodeGen] Late cleanup of redundant address/immediate definitions..

Do you have a sense of what (in practice) is causing the dead operations to get emitted? Can they practically be handled upstream? Such a thing would be a win for all the upstream cost models and would reduce compile time.

Sep 14 2022, 12:53 PM · Restricted Project, Restricted Project
lattner accepted D133822: [mlir] Allow `Attribute::print` to elide the type.

nice, thank you Jeff!

Sep 14 2022, 12:47 PM · Restricted Project, Restricted Project
lattner accepted D133153: [support] Prepare TimeProfiler for cross-thread support.
Sep 14 2022, 8:14 AM · Restricted Project, Restricted Project, Restricted Project

Sep 9 2022

lattner added a comment to D133502: [ADT] Mark `llvm::array_lengthof` as deprecated.

nice, thanks Joe!

Sep 9 2022, 3:41 PM · Restricted Project, Restricted Project
lattner accepted D133564: [mlir:SymbolTable] Add "remove" method that drops a symbol without erasing it.

Makes sense!

Sep 9 2022, 9:39 AM · Restricted Project, Restricted Project

Sep 7 2022

lattner accepted D132645: Improve diagnostic when emitting operations with regions.
Sep 7 2022, 10:42 PM · Restricted Project, Restricted Project
lattner added a comment to D132645: Improve diagnostic when emitting operations with regions.

Thank you for improving this Uday! (and also tolerating the long and winding side discussion) :-) :-)

Sep 7 2022, 10:42 PM · Restricted Project, Restricted Project
lattner added a comment to D132645: Improve diagnostic when emitting operations with regions.

Yes, that's a fair point, I didn't think about StringAttr. This discussion is pretty far afield from the title on this PR - can we move it to its own issue?

Sep 7 2022, 5:57 PM · Restricted Project, Restricted Project
lattner added a comment to D132645: Improve diagnostic when emitting operations with regions.

I agree that it would be useful to have a "get as string" convenience next to these things generally. Please name it "getAsString()" though to follow the general naming conventions which prefer "get". LLVM is wildly inconsistent across subprojects, but MLIR is relatively good about following this convention.

Sep 7 2022, 9:19 AM · Restricted Project, Restricted Project
lattner added a comment to D132645: Improve diagnostic when emitting operations with regions.

fwiw, the reason that LLVM conventionally has the ->dump() methods is for use in debuggers. Modern debuggers still aren't able to resolve call thing->print(llvm::errs()) super reliably.

Sep 7 2022, 9:18 AM · Restricted Project, Restricted Project

Aug 31 2022

lattner added reviewers for D133083: [support] Allow TimeProfiler tracing across threads: modocache, amonshiz, russell.gallop, aras-p.

Adding a few reviewers who have worked on this, Russell Gallop has worked on something directly related.

Aug 31 2022, 9:03 PM · Restricted Project, Restricted Project

Aug 30 2022

lattner added a comment to D132963: [mlir] Print a comment when printing an op that failed to verify.

Awesome, thank you for improving this!

Aug 30 2022, 1:32 PM · Restricted Project, Restricted Project

Aug 26 2022

lattner accepted D132758: [mlir] Make DenseArrayAttr generic.

This is really great Jeff! Thank you for cleaning this up!

Aug 26 2022, 3:45 PM · Restricted Project, Restricted Project
lattner added a comment to D132645: Improve diagnostic when emitting operations with regions.

All that code already exists in Diagnostic::appendOp, we need incremental ~+2 more lines on what is in main.

Aug 26 2022, 10:22 AM · Restricted Project, Restricted Project
lattner added a comment to D132645: Improve diagnostic when emitting operations with regions.

As mentioned above, this isn't enough and is just wrong. Some ops may print empty regions as {} on different lines.

Aug 26 2022, 8:47 AM · Restricted Project, Restricted Project

Aug 25 2022

lattner added a comment to D132645: Improve diagnostic when emitting operations with regions.

The goal of this makes sense to me. That said, would it be possible to key this off of "whether the printed form of an op has \n's in it"?

Aug 25 2022, 9:12 AM · Restricted Project, Restricted Project
lattner added a comment to D132542: [InstCombine] Use dyn_cast instead of cast in visitPHINode.

It has been a very long time since I've worked in this code, but I think the bug is up-stream, whatever is causing the phi nodes to not be adjacent

Aug 25 2022, 9:08 AM · Restricted Project, Restricted Project

Aug 23 2022

lattner accepted D132018: [docs] Add LICENSE.txt to the root of the mono-repo.

This LGTM, thank you for the ping!

Aug 23 2022, 11:34 AM · Restricted Project, Restricted Project

Aug 22 2022

lattner added a comment to rGcda093681bad: Update coding standards for constexpr if statements; NFC.

+1, thanks for clarifying this. I recently hit this as well.

Aug 22 2022, 9:43 PM · Restricted Project, Restricted Project

Aug 18 2022

lattner accepted D132134: Add guidance for what to put in community calendar invites.

LGTM with tanya's suggestions!

Aug 18 2022, 8:40 AM · Restricted Project, Restricted Project

Aug 17 2022

lattner added a comment to D131839: [MLIR] Split autogenerated pass declarations & C++ controllable pass options.

Nice, I'm excited to see a less monolithic approach to GEN_PASS_CLASSES, this will help for passes.td files with multiple passes that have differing dialect requirements etc. Right now you have to forward declare a lot just because they are used by other passes. very cool!

Aug 17 2022, 12:13 PM · Restricted Project, Restricted Project
lattner added a comment to D132018: [docs] Add LICENSE.txt to the root of the mono-repo.

This is a great idea, thank you for doing this. I think we should also point out the sublicenses that are not llvm licensed, e.g. we have a copy of PCRE, googletest etc, and should notify people about these things.

Aug 17 2022, 12:07 PM · Restricted Project, Restricted Project

Aug 15 2022

lattner added a comment to D130958: [mlir] Add support for some unsigned integers to DenseArrayAttr.

Ok, I'm happy to see what Jeff has in mind.

Aug 15 2022, 1:49 PM · Restricted Project, Restricted Project
lattner accepted D131919: Move googletest to the third-party directory.

I didn't review the patch in detail, but +1 this is a great step forward to reorganize the repo!

Aug 15 2022, 1:42 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project
lattner added a comment to D131823: [mlir] Remove colon from empty dense array syntax.

nice, thanks!

Aug 15 2022, 1:06 PM · Restricted Project, Restricted Project

Aug 11 2022

lattner added a comment to D131738: [mlir] Change the syntax of dense arrays.

Awesome, thank you for pushing this forward. What do y'all think about changing the empty syntax to just array<i8>? It looks weird to have the colon there in the empty case.

Aug 11 2022, 6:23 PM · Restricted Project, Restricted Project
lattner added a comment to D131603: [mlir][ods] Support string literals in `custom` directives.

These seems helpful to cut down on the number of "near variants" of the same custom format. Jeff, it might help to adopt this in tree. One random example I noticed are the ones in ViewLikeInterface:

Aug 11 2022, 8:43 AM · Restricted Project, Restricted Project

Aug 10 2022

lattner added a comment to D130958: [mlir] Add support for some unsigned integers to DenseArrayAttr.

awesome! thanks :)

Aug 10 2022, 11:16 PM · Restricted Project, Restricted Project
lattner added a comment to D130958: [mlir] Add support for some unsigned integers to DenseArrayAttr.

Ok - are you planning to go with something like the current patch where you just add unsigend integers (I8 and UI8), or are you also adding explicitly signed things as well (I8, UI8 and SI8)?

Aug 10 2022, 11:13 PM · Restricted Project, Restricted Project
lattner added a comment to D130958: [mlir] Add support for some unsigned integers to DenseArrayAttr.

I'm opposed to it, because it is unclear why it is valuable.
That is: it adds design complexity where someone in ODS now has to choose between multiple options without obvious discriminator. That leads to fragmentation and inconsistencies (the kind of complexity that contributed to plague DenseElementsAttr users).
I see the case of a "gep" operation or the slice @Mogball mentioned above as intrinsically different than a constant op. The constant op is just materializing an SSA value for the attribute, which justifies supporting MLIR type associated with the attribute somehow, but for the others it does not. It isn't clear to me why it is a good thing to unify the attribute for both cases, even they both store "an array" ultimately.

Aug 10 2022, 11:07 PM · Restricted Project, Restricted Project
lattner added a comment to D131448: Introduce iterator sentinel to make graph traversal implementation more efficient and cleaner.

I haven't reviewed this in detail, but oh my I love LOVE LOVE this! llvm::scc_traversal(x) is so nice, great work!

Aug 10 2022, 9:47 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
lattner added a comment to D131537: [mlir][LLVMIR] "Modernize" Insert/ExtractValueOp.

nice Jeff!

Aug 10 2022, 9:45 PM · Restricted Project, Restricted Project, Restricted Project
lattner accepted D131549: [ADT] Make SmallSet::insert(const T &) return const_iterator.

nice, thank you for improving this!

Aug 10 2022, 1:09 PM · Restricted Project, Restricted Project

Aug 9 2022

lattner added a comment to D130958: [mlir] Add support for some unsigned integers to DenseArrayAttr.

Right, I think that use case can work without this, with less safety/checking that having this checked and enforced in ODS. Looking beyond the LLVM dialect, are you arguing that properly typed accessors aren't useful for any client?

Aug 9 2022, 5:02 PM · Restricted Project, Restricted Project

Aug 8 2022

lattner added a comment to D130921: [mlir] Change DenseArrayAttr to TensorType.

It's required by ElementsAttr interface. Whether DenseArrayAttr needs to conform to that interface is up for discussion, but it does provide a lot of the machinery for querying the underlying values.

Aug 8 2022, 4:14 PM · Restricted Project, Restricted Project
lattner accepted D131450: [mlir] Cleanup DenseArrayAttrBase definition and expose raw API.

Nice, I love all the minuses!

Aug 8 2022, 4:13 PM · Restricted Project, Restricted Project
lattner added a comment to D130958: [mlir] Add support for some unsigned integers to DenseArrayAttr.

Responding to a couple of questions, paraphrasing:

Aug 8 2022, 4:11 PM · Restricted Project, Restricted Project

Aug 7 2022

lattner added a comment to D130921: [mlir] Change DenseArrayAttr to TensorType.

Out of curiosity, why does DenseArrayAttr conform to ShapedType? That seems really specific to multidimensional things, why not just have an array-like getSize() interface like ArrayAttr?

Aug 7 2022, 6:21 PM · Restricted Project, Restricted Project

Aug 6 2022

lattner added a comment to D130957: [mlir] Add I1 support to DenseArrayAttr.

+1, thank you for not doing bit compression!

Aug 6 2022, 9:16 AM · Restricted Project, Restricted Project
lattner added a comment to D130958: [mlir] Add support for some unsigned integers to DenseArrayAttr.

You're right that signedness doesn't affect the semantics of the bits in memory, but some clients care about signed semantics in their type system. I think both approaches are principled, but we should look to make MLIR consistent across the builtin storage attributes. For example, if IntegerAttr supports/maintains the i32/si32/ui32 distinction then it would make sense for DenseArrayAttr to support them as well. Alternatively, it would also be principled for nothing to support signs in the storage types: both designs work but we shouldn't do half and half :-)

Aug 6 2022, 9:13 AM · Restricted Project, Restricted Project

Aug 5 2022

lattner resigned from D131287: Fix branch weight in FoldCondBranchOnValueKnownInPredecessor pass in SimplifyCFG.
Aug 5 2022, 3:56 PM · Restricted Project, Restricted Project