Page MenuHomePhabricator

hans (Hans Wennborg)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 18 2013, 6:48 AM (528 w, 3 h)

Recent Activity

Thu, May 25

hans added a comment to D151344: Reland "[CMake] Bumps minimum version to 3.20.0..

This looks right to me. (I'm out of office at the moment, but this looks like what I tested in https://github.com/llvm/llvm-project/issues/62719 so it should work.)

Thu, May 25, 2:28 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project

Wed, May 24

hans added a comment to D151188: [LLD][COFF] Add LLVM toolchain library paths by default..

I think I asked this at the meeting, but I forgot the answer already: is there a reason the compiler can't pass in the (relative) library paths as linker directives along with the library names in the .obj files?

I am not sure, I thought we only talked about not being possible to pass absolute paths because of reproducibility.

Wed, May 24, 7:14 AM · Restricted Project, Restricted Project
hans added a comment to D151188: [LLD][COFF] Add LLVM toolchain library paths by default..

Regarding the target handling, what's your opinion on introducing a new option (for example /target:) with the default value being the host target (that is the same behavior that's used by Clang)?

Not a bad idea!

Wed, May 24, 6:53 AM · Restricted Project, Restricted Project
hans added a comment to D151188: [LLD][COFF] Add LLVM toolchain library paths by default..

The target handling, which seems to be the tricky part, is only needed for LLVM_ENABLE_PER_TARGET_RUNTIME_DIR builds, right? And as far as I know that's not used on Windows, so maybe it's not needed?

Wed, May 24, 2:29 AM · Restricted Project, Restricted Project

Tue, May 23

hans added a comment to D148785: -fsanitize=function: use type hashes instead of RTTI objects.

This broke the tests on Mac, see e.g. https://green.lab.llvm.org/green/job/clang-stage1-RA/34396/consoleFull (or http://crbug.com/1447928)

Tue, May 23, 6:57 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
hans added a comment to D151188: [LLD][COFF] Add LLVM toolchain library paths by default..

I also only looked briefly, but it seems like this assumes LLVM_ENABLE_PER_TARGET_RUNTIME_DIR builds? I think that's still off by default on Windows, so maybe it would be enough to start with supporting the non-per-target-runtime-dir case, or we should aim to support both cases.

Tue, May 23, 6:20 AM · Restricted Project, Restricted Project
hans added inline comments to D151170: [StandardInstrumentations] Add option to dump IR to a file on crash.
Tue, May 23, 4:21 AM · Restricted Project, Restricted Project

Mon, May 22

hans accepted D150981: [lld][COFF] Retry failed paths to take advantage of winsysroot search paths.

lgtm

Mon, May 22, 5:43 AM · Restricted Project, Restricted Project
hans added a comment to D144509: [CMake] Bumps minimum version to 3.20.0..

Do you have a suggestion how we can move this patch forward?

IIRC, D150688 + the diff in https://github.com/llvm/llvm-project/issues/62719#issuecomment-1552903385 + upgrading the pre-merge linux bot should take care of all known issues.

Would it make sense to put all these patches in one new review and then test that on Chromium and ask @glandium to test that too. Then we know whether it solves the issues. Do you want me to make a patch or do you want to do it?

Mon, May 22, 4:33 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project

Fri, May 19

hans added a comment to D150107: [X86] Remove patterns for shift/rotate with immediate 1 and optimize during MC lowering.

skan mentioned this in rG2ef8ae134828: [X86] Remove patterns for ADC/SBB with immediate 8 and optimize during MC…

That caused assert in Chromium builds. See https://bugs.chromium.org/p/chromium/issues/detail?id=1446973#c2 for a reproducer.

I'll revert while that's investigated.

@hans Thanks for the report! If you retested the reproducer before the revert, you would find it already passed after 5586bc539acb26cb94e461438de01a5080513401. So I reapplied the patch.

It failed before b/c the last operand of MCInst ADC/SBBri could be an expression instead of an immediate.

Fri, May 19, 7:56 AM · Restricted Project, Restricted Project
hans added a comment to D144509: [CMake] Bumps minimum version to 3.20.0..

Reverted this and follow-ups in d763c6e5e2d0a6b34097aa7dabca31e9aff9b0b6 for now.

Sorry this is such a pain to land :(

(See also discussion over in D150688)

I'm not happy that the patch needs to be reverted again.

It has taken me a lot of time to contact all buildbots maintainers to get all buildbots updated to the minimal CMake requirement.

Fri, May 19, 6:06 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project
hans added a reverting change for rG2ef8ae134828: [X86] Remove patterns for ADC/SBB with immediate 8 and optimize during MC…: rGcb16b33a03af: Revert "[X86] Remove patterns for ADC/SBB with immediate 8 and optimize during….
Fri, May 19, 5:44 AM · Restricted Project, Restricted Project
hans added a reverting change for rG5586bc539acb: [X86] Remove patterns for ADD/AND/OR/SUB/XOR/CMP with immediate 8 and optimize…: rGcb16b33a03af: Revert "[X86] Remove patterns for ADC/SBB with immediate 8 and optimize during….
Fri, May 19, 5:44 AM · Restricted Project, Restricted Project
hans committed rGcb16b33a03af: Revert "[X86] Remove patterns for ADC/SBB with immediate 8 and optimize during… (authored by hans).
Revert "[X86] Remove patterns for ADC/SBB with immediate 8 and optimize during…
Fri, May 19, 5:44 AM · Restricted Project, Restricted Project
hans added a reverting change for D150949: [X86] Remove patterns for ADD/AND/OR/SUB/XOR/CMP with immediate 8 and optimize during MC lowering, NFCI: rGcb16b33a03af: Revert "[X86] Remove patterns for ADC/SBB with immediate 8 and optimize during….
Fri, May 19, 5:44 AM · Restricted Project, Restricted Project
hans added a comment to D150107: [X86] Remove patterns for shift/rotate with immediate 1 and optimize during MC lowering.

skan mentioned this in rG2ef8ae134828: [X86] Remove patterns for ADC/SBB with immediate 8 and optimize during MC…

That caused assert in Chromium builds. See https://bugs.chromium.org/p/chromium/issues/detail?id=1446973#c2 for a reproducer.

Fri, May 19, 5:43 AM · Restricted Project, Restricted Project
hans added a comment to D150107: [X86] Remove patterns for shift/rotate with immediate 1 and optimize during MC lowering.

skan mentioned this in rG2ef8ae134828: [X86] Remove patterns for ADC/SBB with immediate 8 and optimize during MC…

Fri, May 19, 5:24 AM · Restricted Project, Restricted Project
hans accepted D150817: Use windows baskslash on anonymous tag locations if using MSVCFormatting and it's not absolute path..

Nice! lgtm

Fri, May 19, 4:04 AM · Restricted Project, Restricted Project

Wed, May 17

hans added a comment to D144509: [CMake] Bumps minimum version to 3.20.0..

FYI, 65429b9af6a2c99d340ab2dcddd41dab201f399c is causing problems on Windows compiler-rt for some reason I haven't identified yet (with cmake 3.25.1). Which suggests for a same version of cmake, this is actually altering its behavior, which I wouldn't have expected...

It is indeed unfortunate that this seems to come with such a fundamental behavior change. (we already have https://github.com/llvm/llvm-project/issues/62719) Do you have a repro for the issue you're seeing?

Since the breakages are piling up, perhaps it's time to revert this.

Unfortunately, much of this is hard to sort out without actually trying to patch forward on main, since many of these issues don't show up easily in e.g. premerge testing or similar (the patch has been tried many times for months before in that form), so I'd appreciate if we'd give it a little more time to actually try to sort out the issues...

Wed, May 17, 7:40 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project
hans added a comment to D150688: [cmake] Set CMP0091 to fix Windows builds after the cmake_minimum_required bump.

Oh, I see. This seems to look for the literal form /MD, but after the CMake update, CMake seems to set the option in the form -MD, so if this pattern is updated to check for both / and -, this might start working as expected.

Although, the new policy does place the flag in a different separate cmake variable, so it’s quite possible that it isn’t enough. In any case, with the new policy, the right thing to do is to set the variable (or target property) for deciding what CRT to use, not to manually exchange flags in the variables.

Wed, May 17, 7:24 AM · Restricted Project, Restricted Project
hans added a comment to D144509: [CMake] Bumps minimum version to 3.20.0..

FYI, 65429b9af6a2c99d340ab2dcddd41dab201f399c is causing problems on Windows compiler-rt for some reason I haven't identified yet (with cmake 3.25.1). Which suggests for a same version of cmake, this is actually altering its behavior, which I wouldn't have expected...

Wed, May 17, 1:54 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project
hans added a comment to D150688: [cmake] Set CMP0091 to fix Windows builds after the cmake_minimum_required bump.

Out of curiosity - what are the symptoms that this change fixes, and which build configurations does it affect? (I would expect that regular builds with just llvm+clang would pass at least?) But I do agree that the new behaviour of CMP0091 probably does conflict with ChooseMSVCCRT.cmake.

Wed, May 17, 1:47 AM · Restricted Project, Restricted Project

Tue, May 16

hans committed rG7d47dac5f828: [cmake] Set CMP0091 to fix Windows builds after the cmake_minimum_required bump (authored by hans).
[cmake] Set CMP0091 to fix Windows builds after the cmake_minimum_required bump
Tue, May 16, 11:22 AM · Restricted Project
hans closed D150688: [cmake] Set CMP0091 to fix Windows builds after the cmake_minimum_required bump.
Tue, May 16, 11:22 AM · Restricted Project, Restricted Project
hans added a comment to D150688: [cmake] Set CMP0091 to fix Windows builds after the cmake_minimum_required bump.

I expect with CMake 3.15 the selection could be done cleaner, but that can be done in a separate patch by the compiler-rt maintainers.

Tue, May 16, 11:22 AM · Restricted Project, Restricted Project
hans added a comment to D150106: [ASAN] Use ThreadArgRetval in ASAN.

This broke some asan tests on mac, see https://bugs.chromium.org/p/chromium/issues/detail?id=1445676

Tue, May 16, 9:25 AM · Restricted Project, Restricted Project
hans requested review of D150688: [cmake] Set CMP0091 to fix Windows builds after the cmake_minimum_required bump.
Tue, May 16, 9:22 AM · Restricted Project, Restricted Project

Tue, May 9

hans committed rG9d7eb6008716: Undo include order work-around in Regex.cpp (authored by hans).
Undo include order work-around in Regex.cpp
Tue, May 9, 12:20 AM · Restricted Project, Restricted Project
hans closed D150127: Undo include order work-around in Regex.cpp.
Tue, May 9, 12:20 AM · Restricted Project, Restricted Project
hans added a reverting change for rG2ba4cfd56769: [ValutTracking] Use isGuaranteedNotToBePoison in impliesPoison: rG706e8110573c: Revert "[ValutTracking] Use isGuaranteedNotToBePoison in impliesPoison".
Tue, May 9, 12:18 AM · Restricted Project, Restricted Project
hans committed rG706e8110573c: Revert "[ValutTracking] Use isGuaranteedNotToBePoison in impliesPoison" (authored by hans).
Revert "[ValutTracking] Use isGuaranteedNotToBePoison in impliesPoison"
Tue, May 9, 12:18 AM · Restricted Project, Restricted Project
hans added a reverting change for D149934: [ValutTracking] Use isGuaranteedNotToBePoison in impliesPoison: rG706e8110573c: Revert "[ValutTracking] Use isGuaranteedNotToBePoison in impliesPoison".
Tue, May 9, 12:18 AM · Restricted Project, Restricted Project

Mon, May 8

hans added a comment to D150117: Use LLVM-style include guard in regex_impl.h.

JDevlieghere, do you remember why you went with that other approach?

Mon, May 8, 10:21 AM · Restricted Project, Restricted Project
hans requested review of D150127: Undo include order work-around in Regex.cpp.
Mon, May 8, 10:20 AM · Restricted Project, Restricted Project
hans committed rGb86c249691a7: Use LLVM-style include guard in regex_impl.h (authored by hans).
Use LLVM-style include guard in regex_impl.h
Mon, May 8, 9:56 AM · Restricted Project, Restricted Project
hans closed D150117: Use LLVM-style include guard in regex_impl.h.
Mon, May 8, 9:56 AM · Restricted Project, Restricted Project
hans added inline comments to D150117: Use LLVM-style include guard in regex_impl.h.
Mon, May 8, 9:55 AM · Restricted Project, Restricted Project
hans accepted D149999: [clang-tidy] [test] Narrow down a special case to MSVC mode.

lgtm

Mon, May 8, 7:39 AM · Restricted Project, Restricted Project
hans accepted D149997: [clang] [test] Narrow down MSVC specific behaviours from "any windows" to only MSVC/clang-cl.

lgtm

Mon, May 8, 7:38 AM · Restricted Project, Restricted Project
hans requested review of D150117: Use LLVM-style include guard in regex_impl.h.
Mon, May 8, 6:59 AM · Restricted Project, Restricted Project
hans added a comment to D150001: [clang] Fix initializer_list matching failures with modules.

Nice!

Mon, May 8, 12:54 AM · Restricted Project, Restricted Project

Thu, May 4

hans accepted D149695: MS inline asm: remove obsolete code adding AOK_SizeDirective (e.g. dword ptr).

lgtm

Thu, May 4, 5:40 AM · Restricted Project, Restricted Project, Restricted Project
hans accepted D149721: EntryExitInstrumenter: skip naked functions.

lgtm

Thu, May 4, 2:20 AM · Restricted Project, Restricted Project

Wed, May 3

hans added a comment to D149695: MS inline asm: remove obsolete code adding AOK_SizeDirective (e.g. dword ptr).

The AOK_SizeDirective part from 5b37c181291210bedfbb7a6af5d51229f3652ef0
(2014-08) seems unneeded nowadays (the root cause has likely been fixed
elsewhere).

Wed, May 3, 5:40 AM · Restricted Project, Restricted Project, Restricted Project
hans accepted D149726: [OpenMP] Use CMAKE_CXX_STANDARD for setting the C++ version.

I don't know anything about openmp's build, but I'm very happy if this fixes it, so +1 from me :)

Wed, May 3, 5:26 AM · Restricted Project, Restricted Project
hans added a comment to D149721: EntryExitInstrumenter: skip naked functions.

Seems reasonable to me.

Wed, May 3, 2:16 AM · Restricted Project, Restricted Project
hans added a comment to D149610: [llvm-objdump][COFF] Skip empty entries when dumping the export table.

@hans @alvinhochun The rationale is to simply remove noise from the output when there are sparse ordinals in the table.

Wed, May 3, 2:02 AM · Restricted Project, Restricted Project

May 2 2023

hans added a comment to D149610: [llvm-objdump][COFF] Skip empty entries when dumping the export table.

Can you share what future change this will simplify? The current output seems natural in a way.

May 2 2023, 1:54 AM · Restricted Project, Restricted Project
hans committed rG55224bc55cb4: Typo fix (authored by hans).
Typo fix
May 2 2023, 1:32 AM · Restricted Project, Restricted Project

Apr 28 2023

hans added a reverting change for rGea7d6e658e37: Reland D147337 "[tsan] Add debugging interfaces into interface header.": rG667b8396ef0c: Revert "Reland D147337 "[tsan] Add debugging interfaces into interface header."".
Apr 28 2023, 10:09 PM · Restricted Project, Restricted Project
hans committed rG667b8396ef0c: Revert "Reland D147337 "[tsan] Add debugging interfaces into interface header."" (authored by hans).
Revert "Reland D147337 "[tsan] Add debugging interfaces into interface header.""
Apr 28 2023, 10:09 PM · Restricted Project, Restricted Project
hans added a reverting change for D148214: Reland D147337 "[tsan] Add debugging interfaces into interface header.": rG667b8396ef0c: Revert "Reland D147337 "[tsan] Add debugging interfaces into interface header."".
Apr 28 2023, 10:09 PM · Restricted Project, Restricted Project
hans added a comment to D148214: Reland D147337 "[tsan] Add debugging interfaces into interface header.".

This broke the mac tests again, see e.g. the end of https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8782525813244192609/+/u/package_clang/stdout

Apr 28 2023, 10:08 PM · Restricted Project, Restricted Project

Apr 27 2023

hans accepted D149206: [clang][driver] Enable MisExpect diagnostics flag outside of CC1.

lgtm

Apr 27 2023, 5:51 AM · Restricted Project, Restricted Project

Apr 26 2023

hans added inline comments to D149206: [clang][driver] Enable MisExpect diagnostics flag outside of CC1.
Apr 26 2023, 9:59 AM · Restricted Project, Restricted Project
hans added inline comments to D149206: [clang][driver] Enable MisExpect diagnostics flag outside of CC1.
Apr 26 2023, 6:37 AM · Restricted Project, Restricted Project
hans accepted D149187: [clang] Canonicalize system headers in dependency file when -canonical-prefixes.

Thanks! I like it.

Apr 26 2023, 6:18 AM · Restricted Project, Restricted Project
hans added a comment to D145589: [libc++] Make std::allocator_arg and friends conforming in C++17.

We're seeing build failures in Chromium: https://crbug.com/1440126
It's not clear why it's only in some builds, but the linker complains about duplicate definitions of placeholders::__ph<1>: both from libc++'s bind.cpp and from some Chromium file which presumably includes __functional/bind.h.

Apr 26 2023, 5:19 AM · Restricted Project, Restricted Project

Apr 25 2023

hans added a comment to D115907: [misexpect] Re-implement MisExpect Diagnostics.
  1. Due to inlining etc., it often gets the source locations wrong, which means it points at code where again there were no expectations -- but perhaps that code got inlined into an expectations somewhere else. (e.g. https://crbug.com/1434989#c9)

The checking depends somewhat on the instrumentation type (frontend vs. backend instrumentation) In the case of frontend instrumentation, when the expect intrinsic is lowered (very early in the pipeline) we can report the diagnostic right away, since branch weights from profiling have already been attached. The should mean that you should get fairly accurate source information, since this happens before any optimizations run.

Apr 25 2023, 11:02 AM · Restricted Project, Restricted Project, Restricted Project
hans added a comment to D115907: [misexpect] Re-implement MisExpect Diagnostics.

We gave this a try in Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=1434989

Apr 25 2023, 5:05 AM · Restricted Project, Restricted Project, Restricted Project

Apr 24 2023

hans added a comment to D145208: [COFF] Add MC support for emitting IMAGE_WEAK_EXTERN_ANTI_DEPENDENCY symbols.

Heads up that this broke linking of Chromium: http://crbug.com/1435480 We don't have any analysis of what's happening yet, though.

Apr 24 2023, 5:13 AM · Restricted Project, Restricted Project
hans accepted D149023: [LLD][COFF] Add /inferasanlibs to lld-link as ignored flag.

+aeubanks fyi

Apr 24 2023, 4:08 AM · Restricted Project, Restricted Project
hans accepted D149022: [LLD][COFF] Print object file name for unsupported directives.
Apr 24 2023, 4:00 AM · Restricted Project, Restricted Project

Apr 17 2023

hans accepted D147256: [DebugInfo] Fix file path separator when targeting windows..

lgtm

Apr 17 2023, 9:52 AM · Restricted Project, Restricted Project, Restricted Project
hans added inline comments to D147256: [DebugInfo] Fix file path separator when targeting windows..
Apr 17 2023, 4:28 AM · Restricted Project, Restricted Project, Restricted Project

Apr 14 2023

hans added inline comments to D147256: [DebugInfo] Fix file path separator when targeting windows..
Apr 14 2023, 5:42 AM · Restricted Project, Restricted Project, Restricted Project

Apr 13 2023

hans committed rG39938f2d096c: Fix warn-unsafe-buffer-usage-fixits-pre-increment.cpp for Windows (authored by hans).
Fix warn-unsafe-buffer-usage-fixits-pre-increment.cpp for Windows
Apr 13 2023, 1:26 AM · Restricted Project, Restricted Project
hans added a reverting change for rG6f42b97a29a5: ASan: move allocator base to avoid conflict with high-entropy ASLR for x86-64…: rG4a2da7e8a91b: Revert "ASan: move allocator base to avoid conflict with high-entropy ASLR for….
Apr 13 2023, 12:55 AM · Restricted Project, Restricted Project
hans committed rG4a2da7e8a91b: Revert "ASan: move allocator base to avoid conflict with high-entropy ASLR for… (authored by hans).
Revert "ASan: move allocator base to avoid conflict with high-entropy ASLR for…
Apr 13 2023, 12:55 AM · Restricted Project, Restricted Project
hans added a reverting change for D147984: ASan: move allocator base to avoid conflict with high-entropy ASLR for x86-64 Linux: rG4a2da7e8a91b: Revert "ASan: move allocator base to avoid conflict with high-entropy ASLR for….
Apr 13 2023, 12:54 AM · Restricted Project, Restricted Project
hans updated subscribers of D147984: ASan: move allocator base to avoid conflict with high-entropy ASLR for x86-64 Linux.

This broke the lit tests on Mac: LeakSanitizer-AddressSanitizer-x86_64 :: TestCases/Darwin/trampoline.mm
@lgrey who added that in D129385 maybe has some idea of what's going on?

Apr 13 2023, 12:54 AM · Restricted Project, Restricted Project
hans added a reverting change for rGebb0f1d0639e: [tsan] Add debugging interfaces into interface header.: rGe3230295faad: Revert "[tsan] Add debugging interfaces into interface header.".
Apr 13 2023, 12:08 AM · Restricted Project, Restricted Project
hans committed rGe3230295faad: Revert "[tsan] Add debugging interfaces into interface header." (authored by hans).
Revert "[tsan] Add debugging interfaces into interface header."
Apr 13 2023, 12:07 AM · Restricted Project, Restricted Project
hans added a reverting change for D147337: [tsan] Add debugging interfaces into interface header.: rGe3230295faad: Revert "[tsan] Add debugging interfaces into interface header.".
Apr 13 2023, 12:07 AM · Restricted Project, Restricted Project
hans added a comment to D147337: [tsan] Add debugging interfaces into interface header..

It's still broken after the follow-up, e.g. https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8783975392120859201/+/u/package_clang/stdout

Apr 13 2023, 12:06 AM · Restricted Project, Restricted Project

Apr 12 2023

hans added a comment to D147256: [DebugInfo] Fix file path separator when targeting windows..

Well, MSVC cl removes redundant dots so we shouldn't remove llvm::sys::path::remove_dots.

Could we do the remove_dots on the Clang side, where we can decide based on the LangOpts?

Yes, we can do that. Is there a reason to favor there over here? At here, the object path in llc output can also benefits from remove_dots, not just clang.

Apr 12 2023, 11:45 AM · Restricted Project, Restricted Project, Restricted Project
hans added a comment to D147337: [tsan] Add debugging interfaces into interface header..

This broke the tsan tests on Darwin, see e.g. the end of https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8784015461553130001/+/u/package_clang/stdout

Apr 12 2023, 11:31 AM · Restricted Project, Restricted Project
hans added a comment to D147256: [DebugInfo] Fix file path separator when targeting windows..

Well, MSVC cl removes redundant dots so we shouldn't remove llvm::sys::path::remove_dots.

Apr 12 2023, 9:07 AM · Restricted Project, Restricted Project, Restricted Project
hans committed rGc91ff4f4a3d5: [profile] Make __llvm_profile_global_timestamp static to unbreak Darwin (authored by hans).
[profile] Make __llvm_profile_global_timestamp static to unbreak Darwin
Apr 12 2023, 6:32 AM · Restricted Project, Restricted Project
hans added a comment to D147287: [InstrProf] Temporal Profiling.

This broke the profile tests on Darwin, see e.g. the end of https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8784035713603613281/+/u/package_clang/stdout

Apr 12 2023, 6:32 AM · Restricted Project, Restricted Project, Restricted Project
hans added a reverting change for D137707: Move "auto-init" instructions to the dominator of their users: rGa6d9730f403a: Revert "Move "auto-init" instructions to the dominator of their users".
Apr 12 2023, 4:38 AM · Restricted Project, Restricted Project
hans added a reverting change for rG50b2a113db19: Move "auto-init" instructions to the dominator of their users: rGa6d9730f403a: Revert "Move "auto-init" instructions to the dominator of their users".
Apr 12 2023, 4:38 AM · Restricted Project, Restricted Project
hans committed rGa6d9730f403a: Revert "Move "auto-init" instructions to the dominator of their users" (authored by hans).
Revert "Move "auto-init" instructions to the dominator of their users"
Apr 12 2023, 4:38 AM · Restricted Project, Restricted Project
hans added a comment to D137707: Move "auto-init" instructions to the dominator of their users.

It's actually worse than my repro above showed. Since "real" initialization of the sret arg can get folded in with the "auto" initialization, this patch can also cause an actually initialized return value to become uninitialized: https://bugs.chromium.org/p/chromium/issues/detail?id=1431366#c8

Apr 12 2023, 4:37 AM · Restricted Project, Restricted Project
hans added a comment to D137707: Move "auto-init" instructions to the dominator of their users.

I now have a reproducible (but non-reduced) testcase: https://crbug.com/1431366#c5

This looks like a miscompile; the return parameter is not being initialized if we don't take the branch.

Apr 12 2023, 3:56 AM · Restricted Project, Restricted Project

Apr 11 2023

hans accepted D147073: [Coverage] Handle invalid end location of an expression/statement..

Again not an expert here, but lgtm.

Apr 11 2023, 9:01 AM · Restricted Project, Restricted Project
hans added a comment to D147256: [DebugInfo] Fix file path separator when targeting windows..
  • Add a -use-target-path-separator flag for llc.
  • Add test for llc with that flag.
Apr 11 2023, 5:21 AM · Restricted Project, Restricted Project, Restricted Project

Apr 4 2023

hans added a reverting change for rG2d690684f66f: Recommit DwarfEHPrepare: insert extra unwind paths for stack protector to…: rG91beab69cdac: Revert "Recommit DwarfEHPrepare: insert extra unwind paths for stack protector….
Apr 4 2023, 9:10 AM · Restricted Project, Restricted Project
hans committed rG91beab69cdac: Revert "Recommit DwarfEHPrepare: insert extra unwind paths for stack protector… (authored by hans).
Revert "Recommit DwarfEHPrepare: insert extra unwind paths for stack protector…
Apr 4 2023, 9:10 AM · Restricted Project, Restricted Project
hans added a comment to D143637: StackProtector: add unwind cleanup paths for instrumentation..

Finally, here's a stand-alone reproducer for desktop: https://bugs.chromium.org/p/chromium/issues/detail?id=1428624#c11

Apr 4 2023, 5:42 AM · Restricted Project, Restricted Project
hans added a comment to D143637: StackProtector: add unwind cleanup paths for instrumentation..

Heads up that we bisected test failures in Chromium (targeting iOS/x86_64 simulator) to this revision: https://bugs.chromium.org/p/chromium/issues/detail?id=1428624 Hopefully we'll be able to figure out what's going on next week, but if anyone else has seen problems too it would be interesting to know.

Apr 4 2023, 5:15 AM · Restricted Project, Restricted Project
hans added a comment to D147073: [Coverage] Handle invalid end location of an expression/statement..

I'm not familiar with this code. I suppose the question is whether it's reasonable for this code to expect that the source locations are always valid or not?

Yes.

For 0 ? T<C>{} : T<C>{};, the both branches have valid start location but invalid end location. See comments at https://github.com/llvm/llvm-project/issues/45481#issuecomment-1487267814.

For the std::strong_ordering, I found that DeclRefExpr in the ConditionalOperator's true branch has invalid start and end locations. It might because it's inside a PseudoObjectExpr. Maybe we should simply just skip visiting PseudoObjectExpr, I see that its begin and end location are the same. I'm not familiar with that expression, so, I just handled it by adding checks for validating begin and end locations.

Apr 4 2023, 1:00 AM · Restricted Project, Restricted Project

Apr 3 2023

hans added a comment to D147073: [Coverage] Handle invalid end location of an expression/statement..

I'm not familiar with this code. I suppose the question is whether it's reasonable for this code to expect that the source locations are always valid or not?

Apr 3 2023, 1:41 AM · Restricted Project, Restricted Project
hans accepted D145628: [ASan][libcxx] A way to turn off annotations for containers with a specific allocator.

This update:

  • adds _LIBCPP_HAS_ASAN_CONTAINER_ANNOTATIONS_FOR_ALL_ALLOCATORS FTM,
  • updates the description,
  • updates the example.

As discussed on Discord, #libcxx.

@hans I hope this also answers your concerns.

Apr 3 2023, 1:30 AM · Restricted Project, Restricted Project, Restricted Project

Mar 31 2023

hans requested changes to D145628: [ASan][libcxx] A way to turn off annotations for containers with a specific allocator.

I still think we need to address how code which builds against different c++ standard libraries are going to realistically use this. As written, the instructions only work with libc++ versions containing this patch -- how is a developer going to detect that?

Mar 31 2023, 12:25 PM · Restricted Project, Restricted Project, Restricted Project
hans added a comment to D141882: [libc++] Remove #pragma GCC system_header.

I'll take this for a spin internally to see how much breakage this causes. Can you do the same with Chromium to try and quantify how much pain this causes?

Mar 31 2023, 12:19 PM · Restricted Project, Restricted Project
hans added a comment to D147256: [DebugInfo] Fix file path separator when targeting windows..

I think we cannot be 100% sure about source paths in a cross-compile situation. Cross-compiling on platform A targeting platform B does not mean your sources and debugger UI are on platform B. My users keep source and debugger UI on platform A, debugging target B remotely. We need to preserve the host pathnames. It is not clear to me that this patch does so.

Mar 31 2023, 10:43 AM · Restricted Project, Restricted Project, Restricted Project
hans added a comment to D143637: StackProtector: add unwind cleanup paths for instrumentation..

Heads up that we bisected test failures in Chromium (targeting iOS/x86_64 simulator) to this revision: https://bugs.chromium.org/p/chromium/issues/detail?id=1428624 Hopefully we'll be able to figure out what's going on next week, but if anyone else has seen problems too it would be interesting to know.

Mar 31 2023, 10:25 AM · Restricted Project, Restricted Project
hans added a comment to D147256: [DebugInfo] Fix file path separator when targeting windows..

Thanks for working on this!

Mar 31 2023, 6:07 AM · Restricted Project, Restricted Project, Restricted Project

Mar 28 2023

hans accepted D146338: [MSVC compatibility][dllimport/dllexport][PS] Allow dllexport/dllimport for classes with UniqueExternalLinkage.

lgtm

Mar 28 2023, 5:50 AM · Restricted Project, Restricted Project