Page MenuHomePhabricator
Feed Advanced Search

Mon, Jun 27

dexonsmith accepted D127729: [Bitcode] Support expanding constant expressions into instructions.

BitcodeReader LGTM.

Mon, Jun 27, 6:02 AM · Restricted Project, Restricted Project

Mon, Jun 20

dexonsmith added a comment to D128207: [clang-doc][NFC] Fix reference invalidation assertion failure..

Is there a test that can be added so this doesn’t regress?

Mon, Jun 20, 1:19 PM · Restricted Project, Restricted Project
dexonsmith added a comment to D127729: [Bitcode] Support expanding constant expressions into instructions.

I’ll leave the main review to @aeubanks (SGTM but I don’t have time right now to think through in detail), but I looked at the metadata and use-list order changes and they LGTM. Thanks for working through the issues!

Mon, Jun 20, 1:09 PM · Restricted Project, Restricted Project
dexonsmith added a comment to D127729: [Bitcode] Support expanding constant expressions into instructions.

Nice; glad this was a simplification in the end. I had a quick look and the new logic looks right to me.

Mon, Jun 20, 6:51 AM · Restricted Project, Restricted Project

Fri, Jun 17

dexonsmith added a comment to D127729: [Bitcode] Support expanding constant expressions into instructions.

This seems challenging indeed. (To clarify, there’s never a need to worry about use-list-order when an upgrade is happening, since use-lists can be dropped when there’s a mismatch, but since all constants have changed materialization order that affects the non-upgrade case too.)

Fri, Jun 17, 6:55 AM · Restricted Project, Restricted Project

Thu, Jun 16

dexonsmith resigned from D127923: [Diagnostics] Accept newline and format diag opts on first line.
Thu, Jun 16, 8:50 AM · Restricted Project, Restricted Project

Fri, Jun 10

dexonsmith accepted D127408: [clang][driver] Introduce new -fdriver-only flag.

LGTM with a minor comment on the test.

Fri, Jun 10, 11:35 AM · Restricted Project, Restricted Project

May 26 2022

dexonsmith accepted D125998: [Metadata] Add a resize capability to MDNodes and add a push_back interface to MDNodes..

LGTM, thanks! I left a couple of nits inline for you to consider.

May 26 2022, 7:47 AM · Restricted Project, Restricted Project

May 24 2022

dexonsmith resigned from D125814: Improve the strict prototype diagnostic behavior.

(I’ll be happy with whatever you two sort out here!)

May 24 2022, 2:15 PM · Restricted Project, Restricted Project
dexonsmith accepted D125999: [Metadata] Use push_back() to append operands of MDTuples to other MDTuples.

LGTM once the prep commits land!

May 24 2022, 2:06 PM · Restricted Project, Restricted Project
dexonsmith added inline comments to D125998: [Metadata] Add a resize capability to MDNodes and add a push_back interface to MDNodes..
May 24 2022, 12:33 PM · Restricted Project, Restricted Project

May 23 2022

dexonsmith accepted D125994: [NFC] Define move and copy constructors and copy assignment operators for MDOperand..

LGTM.

May 23 2022, 4:39 PM · Restricted Project, Restricted Project

May 21 2022

dexonsmith added a comment to D125994: [NFC] Define move and copy constructors and copy assignment operators for MDOperand..

Can you add a unit test for this? Ideally something that could expose errors if the tracking logic isn’t right, so probably a TempMDTuple or something assigned/moved between operands.

May 21 2022, 2:05 PM · Restricted Project, Restricted Project
dexonsmith added inline comments to D125487: [Tooling/DependencyScanning] Refactor dependency scanning to produce pre-lexed preprocessor directive tokens, instead of minimized sources.
May 21 2022, 12:13 PM · Restricted Project, Restricted Project
dexonsmith added inline comments to D125487: [Tooling/DependencyScanning] Refactor dependency scanning to produce pre-lexed preprocessor directive tokens, instead of minimized sources.
May 21 2022, 11:07 AM · Restricted Project, Restricted Project

May 19 2022

dexonsmith added inline comments to D125994: [NFC] Define move and copy constructors and copy assignment operators for MDOperand..
May 19 2022, 6:52 PM · Restricted Project, Restricted Project
dexonsmith added inline comments to D125994: [NFC] Define move and copy constructors and copy assignment operators for MDOperand..
May 19 2022, 4:04 PM · Restricted Project, Restricted Project
dexonsmith added inline comments to D125994: [NFC] Define move and copy constructors and copy assignment operators for MDOperand..
May 19 2022, 12:54 PM · Restricted Project, Restricted Project
dexonsmith added a comment to D125994: [NFC] Define move and copy constructors and copy assignment operators for MDOperand..

Can you add a unit test for this? Ideally something that could expose errors if the tracking logic isn’t right, so probably a TempMDTuple or something assigned/moved between operands.

May 19 2022, 12:52 PM · Restricted Project, Restricted Project

May 17 2022

dexonsmith added a comment to D122895: [C89/C2x] Improve diagnostics around strict prototypes in C.

(It also seems unfortunate to regress the false positive rate of this diagnostic before -fstrict-prototypes is available.)

-fno-knr-functions is available already today in trunk, so I'm not certain I understand your concern there (or were you unaware we changed the flag name perhaps?).

May 17 2022, 3:29 PM · Restricted Project, Restricted Project

May 13 2022

dexonsmith accepted D124974: [clang] Include clang config.h in LangStandards.cpp.

LGTM, thanks! One comment online below.

May 13 2022, 11:21 PM · Restricted Project, Restricted Project
dexonsmith added a comment to D122895: [C89/C2x] Improve diagnostics around strict prototypes in C.

Sure, I'm all for adding a new warning for users that want a pedantic warning. Can it be put behind a separate flag, such as -Wstrict-prototypes-pedantic, which isn't triggered by -Wstrict-prototypes?

Previously, -Wstrict-prototypes was useful for preventing actual bugs in code.

Doing that would then make -Wstrict-prototypes effectively a no-op (it would still control -Wdeprecated-non-prototype I suppose?),

May 13 2022, 7:44 AM · Restricted Project, Restricted Project
dexonsmith added a comment to D122895: [C89/C2x] Improve diagnostics around strict prototypes in C.

Previously, -Wstrict-prototypes was useful for preventing actual bugs in code.

May 13 2022, 7:35 AM · Restricted Project, Restricted Project
dexonsmith updated subscribers of D122895: [C89/C2x] Improve diagnostics around strict prototypes in C.

However, I think the blocks behavior is a bug based on this: https://github.com/llvm/llvm-project/blob/main/clang/lib/Sema/SemaType.cpp#L728 and I'd be more than happy to fix that, as I'm not checking that condition here: https://github.com/llvm/llvm-project/blob/main/clang/lib/Sema/SemaType.cpp#L5579 which seems like a pretty obvious thing to be checking for before warning about not having a strict prototype.

I fixed this false positive bug in 4be105c98a9c7e083cd878ee1751e11160b97b4a, so blocks (and OpenCL) behavior should now be improved.

May 13 2022, 7:22 AM · Restricted Project, Restricted Project

May 12 2022

dexonsmith added a comment to D125488: [Preprocessor] Make the special lexing for dependency scanning a first-class feature of the `Preprocessor` and `Lexer`.

[To be clear, my question was because I don't see this patch deleting the code path that minimizes / saves-minimized sources. Can/should we delete the "minimize sources" code path?]

Oh, this is removed in the prior patch in the review stack (https://reviews.llvm.org/D125487)

May 12 2022, 4:34 PM · Restricted Project, Restricted Project
dexonsmith added a comment to D125488: [Preprocessor] Make the special lexing for dependency scanning a first-class feature of the `Preprocessor` and `Lexer`.

Is there code in DepFS that can/should be deleted as part of this patch, or in a follow-up, or is it still around as an option?

May 12 2022, 4:19 PM · Restricted Project, Restricted Project
dexonsmith added inline comments to D122895: [C89/C2x] Improve diagnostics around strict prototypes in C.
May 12 2022, 4:07 PM · Restricted Project, Restricted Project
dexonsmith added a comment to D125488: [Preprocessor] Make the special lexing for dependency scanning a first-class feature of the `Preprocessor` and `Lexer`.

Awesome to see this! Looking forward to the next step (using this in normal preprocessing!).

May 12 2022, 3:33 PM · Restricted Project, Restricted Project
dexonsmith accepted D125489: [Metadata][NFC] Refactor allocation, initialization, and deletion of MDNodes.

LGTM! Thanks for splitting this out (and fixing the MSan problem properly!).

May 12 2022, 3:22 PM · Restricted Project, Restricted Project
dexonsmith added a comment to D124974: [clang] Include clang config.h in LangStandards.cpp.

Ah, so it'd be a test that passes pretty trivially on any bot that doesn't have a custom version of CLANG_DEFAULT_STD_C and CLANG_DEFAULT_STD_CXX like the default config, but could get caught by any other bots that do set it?

What's the best way to get the compiler to report the standard it's using for this test?

For C++ I can do:

clang++ -xc++ -dM -E - < /dev/null | grep cplusplus

And it will print e.g.

#define __cplusplus 199711L

But that requires quite some decoding to compare against CLANG_DEFAULT_STD_CXX which would look like LangStandard::lang_gnucxx98.

May 12 2022, 3:07 PM · Restricted Project, Restricted Project
dexonsmith added a comment to D122895: [C89/C2x] Improve diagnostics around strict prototypes in C.

For additional context to my questions above, even though open source clang hasn't been using -Wstrict-prototypes, Xcode has had it on-by-default in new projects since sometime in 2017, with project modernizations to turn it on for old projects.

May 12 2022, 2:47 PM · Restricted Project, Restricted Project
dexonsmith added inline comments to D122895: [C89/C2x] Improve diagnostics around strict prototypes in C.
May 12 2022, 2:31 PM · Restricted Project, Restricted Project
dexonsmith updated subscribers of D122895: [C89/C2x] Improve diagnostics around strict prototypes in C.
May 12 2022, 2:27 PM · Restricted Project, Restricted Project

May 10 2022

dexonsmith added a comment to D124974: [clang] Include clang config.h in LangStandards.cpp.

Can we add a test for this?

I think the problem with testing it is that this variable comes from the CMake config, and in the default configuration (as used by all the bots) it's not set.

May 10 2022, 11:23 AM · Restricted Project, Restricted Project
dexonsmith added a comment to D124816: [LibTooling] use ToolFileManager to store file managers for each CWD.

This looks mostly correct to me, but perhaps pessimistic enough it'll regress performance unnecessarily. A few comments inline.

May 10 2022, 11:18 AM · Restricted Project, Restricted Project, Restricted Project
dexonsmith added a comment to D124878: [Bitcode] Include indirect users of BlockAddresses in bitcode.

At a high-level, the design for writing bitcode is a two-pass traversal algorithm:

  • First pass in ValueEnumerator indexes everything
  • Second pass in BitcodeWriter writes things

It feels like this new logic could be put into the first pass in ValueEnumerator. (Probably the previous patch, which this builds on, should have done that as well, to avoid iterating over users() in BitcodeWriter, but I guess I didn't notice!)

I just tried your advice to update this patch (not uploaded yet) but found the existing logic is

for each function
    incorporateFunction, which enumerates function-local constants, including BlockAddresses, and we can maintain the users of referred foreign functions here
    writeFunction, which emits BLOCKADDR_USERS records and the function-local constants

However, for every function, before emitting BLOCKADDR_USERS records, we should expect that we have visited all the constants, including function-local ones, and thus we have collected all the users of the blockaddresses in the function.

Can we enumerate (and thus emit) all the constants at the beginning, or add a traversing loop dedicated to collecting the users of blockaddresses?
The latter will touch all the constants one more time.

May 10 2022, 9:55 AM · Restricted Project, Restricted Project

May 5 2022

dexonsmith added a comment to D124974: [clang] Include clang config.h in LangStandards.cpp.

Can we add a test for this?

May 5 2022, 9:37 AM · Restricted Project, Restricted Project
dexonsmith added a comment to D124816: [LibTooling] use ToolFileManager to store file managers for each CWD.
  • AFAICT, every call to FileManager::setVirtualFileSystem() is fundamentally unsound unless the new FS is equivalent to the old one or the filemanager hasn't been used yet.
May 5 2022, 9:31 AM · Restricted Project, Restricted Project, Restricted Project
dexonsmith added reviewers for D124816: [LibTooling] use ToolFileManager to store file managers for each CWD: benlangmuir, bnbarham, jansvoboda11.

Two high-level comments:

May 5 2022, 9:28 AM · Restricted Project, Restricted Project, Restricted Project

May 4 2022

dexonsmith updated subscribers of D124571: Avoid strict aliasing violation on type punning inside llvm::PointerIntPair.
May 4 2022, 6:33 PM · Restricted Project, Restricted Project
dexonsmith added a comment to D112175: [NFC] Add llvm::StaticVector ADT.

Thanks for running that. I just pushed https://github.com/dexonsmith/llvm-project/tree/perf/small-vector-specialize-reserveForParamAndGetAddressImpl, which should cause compile-time results to show up at http://llvm-compile-time-tracker.com/index.php?config=NewPM-O3&stat=instructions&remote=dexonsmith eventually, and we can see if there's a meaningful impact outside of the benchmark. Not sure whether it's worth changing push_back() since even on the toy benchmark it's not a big difference.

May 4 2022, 6:27 PM · Restricted Project, Restricted Project
dexonsmith added a comment to D124878: [Bitcode] Include indirect users of BlockAddresses in bitcode.

At a high-level, the design for writing bitcode is a two-pass traversal algorithm:

  • First pass in ValueEnumerator indexes everything
  • Second pass in BitcodeWriter writes things
May 4 2022, 3:27 PM · Restricted Project, Restricted Project

May 3 2022

dexonsmith added a comment to D112175: [NFC] Add llvm::StaticVector ADT.

Thanks for running that. I just pushed https://github.com/dexonsmith/llvm-project/tree/perf/small-vector-specialize-reserveForParamAndGetAddressImpl, which should cause compile-time results to show up at http://llvm-compile-time-tracker.com/index.php?config=NewPM-O3&stat=instructions&remote=dexonsmith eventually, and we can see if there's a meaningful impact outside of the benchmark. Not sure whether it's worth changing push_back() since even on the toy benchmark it's not a big difference.

May 3 2022, 12:47 PM · Restricted Project, Restricted Project
dexonsmith added a comment to D112175: [NFC] Add llvm::StaticVector ADT.

Thanks for running that. I just pushed https://github.com/dexonsmith/llvm-project/tree/perf/small-vector-specialize-reserveForParamAndGetAddressImpl, which should cause compile-time results to show up at http://llvm-compile-time-tracker.com/index.php?config=NewPM-O3&stat=instructions&remote=dexonsmith eventually, and we can see if there's a meaningful impact outside of the benchmark. Not sure whether it's worth changing push_back() since even on the toy benchmark it's not a big difference.

May 3 2022, 12:45 PM · Restricted Project, Restricted Project
dexonsmith committed rGc1e17c7dfedd: ExtractAPI: Use %clang_cc1 and -verify in enum.c (authored by dexonsmith).
ExtractAPI: Use %clang_cc1 and -verify in enum.c
May 3 2022, 12:21 PM · Restricted Project, Restricted Project
dexonsmith closed D124634: ExtractAPI: Use %clang_cc1 and -verify in enum.c.
May 3 2022, 12:20 PM · Restricted Project, Restricted Project
dexonsmith resigned from D124751: [HLSL] Support -E option for HLSL..
May 3 2022, 12:18 PM · Restricted Project, Restricted Project
dexonsmith resigned from D124753: [HLSL] Set main as default entry..
May 3 2022, 12:17 PM · Restricted Project, Restricted Project
dexonsmith added reviewers for D92160: [clang] Fix wrong FDs are used for files with same name in Tooling: benlangmuir, bnbarham, jansvoboda11.

Adding @bnbarham, @jansvoboda11, and @benlangmuir, who have been looking at various FileManager issues recently. If you post a follow up I suggest keeping them in the loop!

May 3 2022, 12:16 PM · Restricted Project, Restricted Project
dexonsmith added inline comments to D124548: [Metadata] Add a resize/reserve capability for MDNodes.
May 3 2022, 11:51 AM · Restricted Project, Restricted Project

Apr 29 2022

dexonsmith added a comment to D112175: [NFC] Add llvm::StaticVector ADT.

If your host toolchain has C++17, I'd be curious if the regression goes away when you switch to that mode and use if constexpr.

Apr 29 2022, 2:08 AM · Restricted Project, Restricted Project
dexonsmith added a comment to D112175: [NFC] Add llvm::StaticVector ADT.
[ RUN      ] StaticVsSmall/0.TimedStaticVector
[       OK ] StaticVsSmall/0.TimedStaticVector (371 ms)
[ RUN      ] StaticVsSmall/0.TimedSmallVector
[       OK ] StaticVsSmall/0.TimedSmallVector (596 ms)

Which demonstrates that simple insertions are significantly faster (almost 38%) with the StaticVector compared to a SmallVector which stays within its small buffer limit.

Let me amend this a bit... it looks like the reason SmallVector::push_back is slower in this case is because of insufficient specialization. Here's the trivially copyable version:

void push_back(ValueParamT Elt) {
  const T *EltPtr = reserveForParamAndGetAddress(Elt);
  memcpy(reinterpret_cast<void *>(this->end()), EltPtr, sizeof(T));
  this->set_size(this->size() + 1);
}

When Elt is passed by value, reserveForParamAndGetAddress() is unnecessary since the parameter will not alias with the SmallVector's buffer. This inhibits host compiler optimization. If we were to SFINAE split this function, we can match my StaticVector::push_back perf. The following SmallVector change works for me locally:

  template <typename RetT = std::enable_if_t<TakesParamByValue>>
  RetT push_back_impl(value_type Elt) {
    if (LLVM_UNLIKELY(this->size() >= this->capacity()))
      this->grow();
    memcpy(reinterpret_cast<void *>(this->end()), std::addressof(Elt),
           sizeof(T));
    this->set_size(this->size() + 1);
  }

  template <typename RetT = std::enable_if_t<!TakesParamByValue>>
  RetT push_back_impl(const_reference Elt) {
    const T *EltPtr = reserveForParamAndGetAddress(Elt);
    memcpy(reinterpret_cast<void *>(this->end()), EltPtr, sizeof(T));
    this->set_size(this->size() + 1);
  }

public:
  void push_back(ValueParamT Elt) { push_back_impl(Elt); }
Apr 29 2022, 1:30 AM · Restricted Project, Restricted Project
dexonsmith added a comment to D124548: [Metadata] Add a resize/reserve capability for MDNodes.

Thanks for working on this! I think this will be a big improvement.

Apr 29 2022, 12:01 AM · Restricted Project, Restricted Project

Apr 28 2022

dexonsmith committed rG2d133867833f: Frontend: Delete output streams before closing CompilerInstance outputs (authored by dexonsmith).
Frontend: Delete output streams before closing CompilerInstance outputs
Apr 28 2022, 7:11 PM · Restricted Project, Restricted Project
dexonsmith closed D124635: Frontend: Delete output streams before closing CompilerInstance outputs.
Apr 28 2022, 7:11 PM · Restricted Project, Restricted Project
dexonsmith added a comment to D124635: Frontend: Delete output streams before closing CompilerInstance outputs.

LGTM, although I made a suggestion about the spelling.

Apr 28 2022, 6:19 PM · Restricted Project, Restricted Project
dexonsmith requested review of D124635: Frontend: Delete output streams before closing CompilerInstance outputs.
Apr 28 2022, 1:16 PM · Restricted Project, Restricted Project
dexonsmith added inline comments to D121873: [clang][extract-api] Add enum support.
Apr 28 2022, 12:58 PM · Restricted Project, Restricted Project
dexonsmith requested review of D124634: ExtractAPI: Use %clang_cc1 and -verify in enum.c.
Apr 28 2022, 12:47 PM · Restricted Project, Restricted Project
dexonsmith added inline comments to D121873: [clang][extract-api] Add enum support.
Apr 28 2022, 12:32 PM · Restricted Project, Restricted Project

Apr 22 2022

dexonsmith added a comment to D123576: Support constructing empty function_ref from other callables that can be "empty".

I worry this is overly general (it's not obvious that any functor with boolean conversion has the semantics this patch relies on) & inconsistent with the standard library (std::function for instance doesn't provide this (or a narrower version of it) functionality - so we'll still have the bugs for any API that takes a function_ref and passes it to std::function)

Apr 22 2022, 4:57 PM · Restricted Project, Restricted Project

Apr 13 2022

dexonsmith added a comment to D122766: [clang] Add the flag -ffile-reproducible.
  • Only canonicalize __FILE__ for the target platform when there's a command-line flag that suggests it's okay. I suggest adding -ffile-reproducible, which could be implied by -ffile-prefix-map but also specified separately when -ffile-prefix-map isn't being used.
Apr 13 2022, 4:33 PM · Restricted Project, Restricted Project, Restricted Project
dexonsmith added a comment to D122766: [clang] Add the flag -ffile-reproducible.

So, the general consensus seems to be that we should use backslashes when targeting Windows.

I implemented using only backslashes for Windows; however, clang/test/SemaCXX/destructor.cpp fails when running on Linux with the following error (among other errors, but the one below is the most important).

...
error: 'error' diagnostics seen but not expected:
  Line 32: '<REDACTED_PATH_TO_LLVM_CHECKOUT_WITH_BACKSLASHES>\\clang\\test\\SemaCXX\\destructor.cpp' file not found
...

The reason for this is that the test has Clang target windows and the test also has the statement #include __FILE__.

One way to fix this would be to have every macro that accepts a path internally convert the path to the build environment's path format, but TBH I'm not sure. What do you all think?

Apr 13 2022, 4:31 PM · Restricted Project, Restricted Project, Restricted Project
dexonsmith added a comment to D67678: PR17164: Change clang's default behavior from -flax-vector-conversions=all to -flax-vector-conversions=integer..

@dexonsmith @arphaman What do we need to do to get this re-landed?

Apr 13 2022, 1:13 PM · Restricted Project, Restricted Project

Apr 12 2022

dexonsmith accepted D123574: [clang][lex] NFCI: Use FileEntryRef in PPCallbacks::InclusionDirective().

LGTM, with a couple of nitpicks. If you'd rather not improve the tests that's probably fine, since the patch doesn't make them any worse.

Apr 12 2022, 11:51 AM · Restricted Project, Restricted Project, Restricted Project

Apr 11 2022

dexonsmith updated subscribers of D123104: [Modules] Use looked-up filename when looking for module maps.

I wonder if https://github.com/apple/llvm-project/commit/67c70038bcc0d771e2e39c875ad7d69e329c7fc4 could be related. A long shot (I can't see how that could be it!), but the other not-upstreamed patches look even less relevant.

Apr 11 2022, 11:47 AM · Restricted Project, Restricted Project
dexonsmith added a comment to D123104: [Modules] Use looked-up filename when looking for module maps.

Looks like there's more changes required for modulemap-collision.m to actually pass. I'll try figure those out when I have the time.

Apr 11 2022, 11:39 AM · Restricted Project, Restricted Project
dexonsmith accepted D120781: [Bitcode] materialize Functions early when BlockAddress taken.

LGTM, with one nitpick inline!

Apr 11 2022, 10:50 AM · Restricted Project, Restricted Project
dexonsmith resigned from D121560: [clang][Opt] Add NoArgUnusedWith to not warn for unused redundant options.
Apr 11 2022, 10:43 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
dexonsmith accepted D123398: [VFS] RedirectingFileSystem only replace path if not already mapped.

LGTM!

Apr 11 2022, 10:42 AM · Restricted Project, Restricted Project, Restricted Project
dexonsmith added a comment to D123398: [VFS] RedirectingFileSystem only replace path if not already mapped.

Does clang/test/VFS/external-names-multi-overlay.c need to be formatted or is it fine? It uses split-file so I'd really like to avoid the format here (makes it pretty silly).

Apr 11 2022, 10:40 AM · Restricted Project, Restricted Project, Restricted Project
dexonsmith accepted D123468: [Driver] Simplify hasFlag pattern with addOptInFlag/addOptOutFlag helpers.

Nice! LGTM.

Apr 11 2022, 10:33 AM · Restricted Project, Restricted Project, Restricted Project
dexonsmith accepted D121375: [clang] NFC, move the utility function CompilerInvocation::setLangDefaults to LangOptions.h.

LGTM once @sammccall 's new comments are addressed!

Apr 11 2022, 10:23 AM · Restricted Project, Restricted Project

Apr 7 2022

dexonsmith updated subscribers of D123300: [Clang] Enable opaque pointers by default.

$ bin/clang -fsanitize=memory -m64 -gline-tables-only ../../compiler-rt/test/msan/use-after-dtor.cpp -fno-sanitize-memory-use-after-dtor -o - -S -emit-llvm -Xclang -disable-llvm-passes
the debug location for main's return instruction is line 39 with typed pointers and line 50 with opaque pointers.

Apr 7 2022, 10:38 PM · Restricted Project, Restricted Project, Restricted Project
dexonsmith added a comment to D120781: [Bitcode] materialize Functions early when BlockAddress taken.

there's some tests failing where the "use list" (???) seems to be incorrect

Apr 7 2022, 4:28 PM · Restricted Project, Restricted Project

Apr 6 2022

dexonsmith accepted D123197: Remove a few effectively-unused FileEntry APIs. NFC.

LGTM; thanks for iterating on it.

Apr 6 2022, 3:15 PM · Restricted Project, Restricted Project
dexonsmith added inline comments to D121375: [clang] NFC, move the utility function CompilerInvocation::setLangDefaults to LangOptions.h.
Apr 6 2022, 12:13 PM · Restricted Project, Restricted Project
dexonsmith added a comment to D123197: Remove a few effectively-unused FileEntry APIs. NFC.

(Seeing the other replies now!)

Apr 6 2022, 11:53 AM · Restricted Project, Restricted Project
dexonsmith added inline comments to D123197: Remove a few effectively-unused FileEntry APIs. NFC.
Apr 6 2022, 11:49 AM · Restricted Project, Restricted Project
dexonsmith added inline comments to D123197: Remove a few effectively-unused FileEntry APIs. NFC.
Apr 6 2022, 11:27 AM · Restricted Project, Restricted Project
dexonsmith added inline comments to D123197: Remove a few effectively-unused FileEntry APIs. NFC.
Apr 6 2022, 11:22 AM · Restricted Project, Restricted Project
dexonsmith added reviewers for D123197: Remove a few effectively-unused FileEntry APIs. NFC: benlangmuir, bnbarham.

Adding a couple of reviewers that have been looking at FileManager issues with me recently; maybe they have a different perspective.

Apr 6 2022, 11:14 AM · Restricted Project, Restricted Project
dexonsmith added a comment to D123197: Remove a few effectively-unused FileEntry APIs. NFC.

The ugly part here:

  • FileEntryTest was constructing dummy FileEntrys to wrap in FileEntryRef
  • I changed this to use a FileManager as a factory
Apr 6 2022, 11:09 AM · Restricted Project, Restricted Project
dexonsmith added inline comments to D123144: FileManager: std::map => BumpPtrAllocator + DenseMap of pointers.
Apr 6 2022, 10:53 AM · Restricted Project, Restricted Project
dexonsmith accepted D123229: [clang][deps] Ensure deterministic filename case.

Once we've removed the last use of DirectoryEntry::getName(), we should drop DirectoryEntry::getName() to avoid picking up other users. Perhaps DirectoryEntry itself could be made private to the FileManager.

Apr 6 2022, 10:53 AM · Restricted Project, Restricted Project

Apr 5 2022

dexonsmith accepted D123100: [Support/Hash functions] Change the `final()` and `result()` of the hashing functions to return an array of bytes.

LGTM!

Apr 5 2022, 8:13 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project
dexonsmith accepted D120714: [CodeGen] Place SDNode debug ID declaration under appropriate #if.

@dexonsmith Please let me know if you see some issues in the patch. Thanks!

Apr 5 2022, 8:10 PM · Restricted Project, Restricted Project
dexonsmith added a comment to D122766: [clang] Add the flag -ffile-reproducible.

My feeling is that the default behavior on Windows needs to be to use backslashes and not forward slashes.

Okay, how would folks feel about always canonicalizing __FILE__ etc. to use backslashes when targeting Windows?

Apr 5 2022, 8:08 PM · Restricted Project, Restricted Project, Restricted Project
dexonsmith added a comment to D121375: [clang] NFC, move the utility function CompilerInvocation::setLangDefaults to LangOptions.h.

I only see one usage in-tree (and one more in clspv). And migration is very easy. I think you should do it all in this commit.

Apr 5 2022, 7:50 PM · Restricted Project, Restricted Project
dexonsmith added inline comments to D123144: FileManager: std::map => BumpPtrAllocator + DenseMap of pointers.
Apr 5 2022, 6:37 PM · Restricted Project, Restricted Project
dexonsmith added a comment to D123144: FileManager: std::map => BumpPtrAllocator + DenseMap of pointers.

Nice!

Apr 5 2022, 6:32 PM · Restricted Project, Restricted Project
dexonsmith added inline comments to D123104: [Modules] Use looked-up filename when looking for module maps.
Apr 5 2022, 5:07 PM · Restricted Project, Restricted Project

Apr 4 2022

dexonsmith added inline comments to D123100: [Support/Hash functions] Change the `final()` and `result()` of the hashing functions to return an array of bytes.
Apr 4 2022, 7:23 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project
dexonsmith accepted D123104: [Modules] Use looked-up filename when looking for module maps.

(Forgot to click "accept".)

Apr 4 2022, 7:19 PM · Restricted Project, Restricted Project
dexonsmith added reviewers for D123104: [Modules] Use looked-up filename when looking for module maps: benlangmuir, bruno.

This LGTM, with a couple of comments (on the comments!) inline.

Apr 4 2022, 7:18 PM · Restricted Project, Restricted Project
dexonsmith accepted D123103: Revert "[VFS] RedirectingFileSystem only replace path if not already mapped".

This broke crash reproducers in very specific circumstances, see https://reviews.llvm.org/D123104. I'll re-commit with adding ExposesExternalVFSPath instead of replacing IsVFSMapped.

Apr 4 2022, 6:34 PM · Restricted Project, Restricted Project, Restricted Project
dexonsmith added inline comments to D121510: [Support] Introduce the BLAKE3 hashing function implementation.
Apr 4 2022, 5:55 PM · Restricted Project, Restricted Project
dexonsmith requested changes to D121375: [clang] NFC, move the utility function CompilerInvocation::setLangDefaults to LangOptions.h.

This makes sense to me! A few comments inline.

Apr 4 2022, 4:31 PM · Restricted Project, Restricted Project

Mar 30 2022

dexonsmith added inline comments to D121510: [Support] Introduce the BLAKE3 hashing function implementation.
Mar 30 2022, 6:42 PM · Restricted Project, Restricted Project
dexonsmith added a comment to D120714: [CodeGen] Place SDNode debug ID declaration under appropriate #if.

@dexonsmith

Thanks for the pings! I'd missed your updates.

@dexonsmith Thanks for your comments! Decided to choose the last approach that you mentioned - keep and use PersistentId regardless build type or any macro. The problem with #if LLVM_ENABLE_ABI_BREAKING_CHECKS is testing with LLVM_ABI_BREAKING_CHECKS set to FORCE_OFF during initial CMake configuration - some tests rely on PersistentId. I suppose that having PersistentId present in all builds is definitely worth small CPU overhead compared to the current state.

Which tests are you talking about? Can those tests be marked as UNSUPPORTED when ABI-breaking checks are off?

If not, why not?

It would be good to add a comment to the sources explaining why LLVM_ENABLE_ABI_BREAKING_CHECKS can't/shouldn't be used for PersistentId, and potentially a FIXME with how to fix the blockers such as they are. Probably next to the declaration of the field.

Currently there is no check for ABI-breaking changes (see llvm/test/lit.site.cfg.py.in). Of course, that could be easily added, but I decided to update the tests themselves to make them work with SDNode debug IDs both in t<number> and 0x<hex address> formats. Also changes update_llc_test_checks.py, and it looks like that we can support more test scenarios for isel in it (not only resulting selection DAG, but also initial and intermediate ones, instcombine phase, etc.)

Mar 30 2022, 11:42 AM · Restricted Project, Restricted Project