weimingz (Weiming Zhao)
User

Projects

User does not belong to any projects.

User Details

User Since
Nov 19 2012, 2:50 AM (244 w, 11 h)

Recent Activity

Tue, Jul 18

weimingz committed rL308404: Fix DebugLoc propagation for unreachable LoadInst.
Fix DebugLoc propagation for unreachable LoadInst
Tue, Jul 18, 6:27 PM
weimingz closed D34639: Fix DebugLoc propagation for unreachable LoadInst by committing rL308404: Fix DebugLoc propagation for unreachable LoadInst.
Tue, Jul 18, 6:27 PM

Mon, Jul 17

weimingz updated the diff for D35235: [libc++] Replace __sync_* functions with __libcpp_atomic_* functions.

rebased after reverting r307595 and moving __refstring header

Mon, Jul 17, 6:10 PM

Fri, Jul 14

weimingz updated the diff for D31220: [builtins][ARM] Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA.

address the review comments by @peter.smith and @jamesduley

Fri, Jul 14, 11:28 AM

Thu, Jul 13

weimingz updated the diff for D31220: [builtins][ARM] Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA.

rebased

Thu, Jul 13, 11:18 AM

Mon, Jul 10

weimingz created D35235: [libc++] Replace __sync_* functions with __libcpp_atomic_* functions.
Mon, Jul 10, 6:32 PM
weimingz added a comment to D34918: [libc++] Refactoring __sync_* builtins; NFC.

I should use existing include/atomic_support.h. Will upload the patch shortly.

Mon, Jul 10, 6:22 PM
weimingz updated the diff for D34639: Fix DebugLoc propagation for unreachable LoadInst.

simplify test case

Mon, Jul 10, 5:34 PM
weimingz committed rL307595: [libc++] Refactoring __sync_* builtins; NFC (Reland).
[libc++] Refactoring __sync_* builtins; NFC (Reland)
Mon, Jul 10, 2:38 PM
weimingz updated the diff for D34918: [libc++] Refactoring __sync_* builtins; NFC.

missed to upload the change to include __atomic_support header file

Mon, Jul 10, 2:31 PM
weimingz committed rL307593: Revert "[libc++] Refactoring __sync_* builtins; NFC".
Revert "[libc++] Refactoring __sync_* builtins; NFC"
Mon, Jul 10, 2:24 PM
weimingz committed rL307591: [libc++] Refactoring __sync_* builtins; NFC.
[libc++] Refactoring __sync_* builtins; NFC
Mon, Jul 10, 2:03 PM
weimingz closed D34918: [libc++] Refactoring __sync_* builtins; NFC by committing rL307591: [libc++] Refactoring __sync_* builtins; NFC.
Mon, Jul 10, 2:03 PM
weimingz retitled D34918: [libc++] Refactoring __sync_* builtins; NFC from [libc++] Avoid atomic built-ins for NO_THREADS build to [libc++] Refactoring __sync_* builtins; NFC.
Mon, Jul 10, 1:41 PM

Sun, Jul 9

weimingz added a comment to D34639: Fix DebugLoc propagation for unreachable LoadInst.

testcase?

Sun, Jul 9, 6:13 AM

Thu, Jul 6

weimingz updated the diff for D34918: [libc++] Refactoring __sync_* builtins; NFC.
Thu, Jul 6, 5:31 PM
weimingz updated the diff for D34918: [libc++] Refactoring __sync_* builtins; NFC.

@EricWF , do you mean factoring out the __sync_* functions like this?

Thu, Jul 6, 5:29 PM

Wed, Jul 5

weimingz added a comment to D34918: [libc++] Refactoring __sync_* builtins; NFC.

How about we use "#ifdef GCC_ATOMIC_POINTER_LOCK_FREE < 2 && LIBCPP_HAS_NO_THREAD" ?
This can minimize the impact.

Wed, Jul 5, 11:51 AM
weimingz added a comment to D34918: [libc++] Refactoring __sync_* builtins; NFC.

If the architecture doesn't support atomics (like cortex-m0), seems there is no software solution to make them signal-safe. Mutex/lock won't work.

Wed, Jul 5, 11:37 AM
weimingz added a comment to D34918: [libc++] Refactoring __sync_* builtins; NFC.

On architectures without atomic instructions, the atomic built-ins cannot be lowered. If _LIBCPP_HAS_NO_THREADS is enabled, we should just use regular code.

Does "cannot be lowered" mean using them causes a compile error? If so I'm curious as to why you're the first one to run into this issue. If no compile error is caused then could you re-explain the rational for this change.

Lock-free atomic operations are also signal safe. Your code is not. While I don't know whether all this functions are not required to be signal safe, the general assertion is certainly questionable.

No, they are no signal safe. Per [1], "call to any library function, except the following signal-safe functions (note, in particular, dynamic allocation is not signal-safe):".

Locale.cpp should be fine with the change.
{set,get}_new_handler, {set,get}_unexpected_handler are not in the list.
I'm not very sure about "__libcpp_refstring". Seems it is only used by stdexcept. Although throw expression is explicitly stated as not signal safe, the ref counting of stdexcept might be. We can leave it unchanged.

It would be really nice if we didn't cause the user unnecessary pain. Just because these functions aren't *required* to be signal safe doesn't necessarily mean they shouldn't be.

If this patch is indeed needed I would like to see it done similar to how __libcpp_refcount_foo or the src/include/atomic_support.h logic is implemented, where instead of having #ifdef branches at each call site the logic has been abstracted away into a function.

That being said I would like to better understand the rational for this patch before proceeding.

Wed, Jul 5, 11:34 AM

Mon, Jul 3

weimingz added a comment to D34918: [libc++] Refactoring __sync_* builtins; NFC.

Lock-free atomic operations are also signal safe. Your code is not. While I don't know whether all this functions are not required to be signal safe, the general assertion is certainly questionable.

Mon, Jul 3, 10:17 AM

Fri, Jun 30

weimingz added a reviewer for D34918: [libc++] Refactoring __sync_* builtins; NFC: jroelofs.
Fri, Jun 30, 4:40 PM
weimingz created D34918: [libc++] Refactoring __sync_* builtins; NFC.
Fri, Jun 30, 4:36 PM

Mon, Jun 26

weimingz updated the diff for D34639: Fix DebugLoc propagation for unreachable LoadInst.
Mon, Jun 26, 11:45 PM
weimingz removed a reviewer for D34639: Fix DebugLoc propagation for unreachable LoadInst: llvm-commits.
Mon, Jun 26, 12:42 PM
weimingz created D34639: Fix DebugLoc propagation for unreachable LoadInst.
Mon, Jun 26, 12:41 PM

May 11 2017

weimingz added a comment to D30324: [ARM] Thumb2: favor R4-R7 over R12/LR in allocation order when opt for minsize.

ping?

May 11 2017, 11:11 AM

May 5 2017

weimingz committed rL302274: [ARM] Limit the diagnose when an ISR calls a regular function.
[ARM] Limit the diagnose when an ISR calls a regular function
May 5 2017, 12:38 PM
weimingz closed D32918: [ARM] Limit the diagnose when an ISR calls a regular function by committing rL302274: [ARM] Limit the diagnose when an ISR calls a regular function.
May 5 2017, 12:38 PM
weimingz created D32918: [ARM] Limit the diagnose when an ISR calls a regular function.
May 5 2017, 12:17 PM

Apr 20 2017

weimingz committed rL300870: [Thumb-1] Fix corner cases for compressed jump tables.
[Thumb-1] Fix corner cases for compressed jump tables
Apr 20 2017, 11:50 AM
weimingz closed D32250: [Thumb-1] Fix corner cases for compressed jump tables by committing rL300870: [Thumb-1] Fix corner cases for compressed jump tables.
Apr 20 2017, 11:50 AM
weimingz updated the summary of D32250: [Thumb-1] Fix corner cases for compressed jump tables.
Apr 20 2017, 11:45 AM
weimingz updated the diff for D32250: [Thumb-1] Fix corner cases for compressed jump tables.

Just find that one case was fixed by r297871 ARM: avoid clobbering register in v6 jump-table expansion.

Apr 20 2017, 11:44 AM

Apr 19 2017

weimingz updated the diff for D30324: [ARM] Thumb2: favor R4-R7 over R12/LR in allocation order when opt for minsize.

Below are the measurements of text size of benchmarks.
Build flag: "-Oz -mthumb -mcpu=cortex-m3 -fomit-frame-pointer"
Baseline has extra flag: " -mllvm -arm-favor-r4-r7=false"

Apr 19 2017, 11:03 PM
weimingz added a comment to D31573: [Builtins] Fix test cases for xf/ti.

ping?

Apr 19 2017, 3:30 PM
weimingz added a comment to D32250: [Thumb-1] Fix corner cases for compressed jump tables.

This fixes some SPEC2000 fails when build for Thumb1 with -Os.
I do not upload the lit test because it's not easy to reduce to a simple/clean one as it needs specific reg alloc to show the problem.

Apr 19 2017, 3:21 PM
weimingz updated the summary of D32250: [Thumb-1] Fix corner cases for compressed jump tables.
Apr 19 2017, 3:17 PM
weimingz created D32250: [Thumb-1] Fix corner cases for compressed jump tables.
Apr 19 2017, 3:08 PM

Apr 10 2017

weimingz added a comment to D31742: [Builtins] Fix lit test setup for Windows.

btw, should we use "--rtlib=compiler-rt" rather than passing the libname explicitly?

Apr 10 2017, 11:01 AM
weimingz added inline comments to rL299780: [builtins] Get the builtins tests passing on Windows.
Apr 10 2017, 5:35 AM

Apr 8 2017

weimingz updated the diff for D31742: [Builtins] Fix lit test setup for Windows.

Thanks for the info!

Apr 8 2017, 10:52 PM

Apr 6 2017

weimingz updated the diff for D31742: [Builtins] Fix lit test setup for Windows.

I tried to use the lib name from cmake/Module/AddCompilerRT.cmake : add_compiler_rt_runtime but no luck.
And I can't find where the suffix is set in compiler-rt project.

Apr 6 2017, 6:02 PM
weimingz added a reviewer for D31775: [ARM] Add Kryo to available targets: apazos.
Apr 6 2017, 2:15 PM
weimingz added a comment to D31742: [Builtins] Fix lit test setup for Windows.

Not sure if it is the portable way to do.
I see cmake/base-config-ix.cmake has set(CMAKE_STATIC_LIBRARY_SUFFIX_C ".lib"), but I can't find where the variable is used and not sure if we can use it in test/CMakefile.

Apr 6 2017, 12:08 AM
weimingz created D31742: [Builtins] Fix lit test setup for Windows.
Apr 6 2017, 12:04 AM

Apr 5 2017

weimingz added a comment to D31573: [Builtins] Fix test cases for xf/ti.

Thanks for the explanation. The current patch should address the problem, right?

Apr 5 2017, 11:38 PM
weimingz retitled D31573: [Builtins] Fix test cases for xf/ti from [Builtins] Add IEEE 754 support for __fixunsxfti to [Builtins] Fix test cases for xf/ti.
Apr 5 2017, 11:31 PM
weimingz committed rL299628: [Builtins] Fix div0 error in udivsi3.
[Builtins] Fix div0 error in udivsi3
Apr 5 2017, 11:26 PM
weimingz closed D31716: [Builtins] Fix div0 error in udivsi3 by committing rL299628: [Builtins] Fix div0 error in udivsi3.
Apr 5 2017, 11:26 PM
weimingz accepted D31721: Add __ffssi2 implementation to compiler-rt builtins.

LGTM.

Apr 5 2017, 1:47 PM
weimingz updated the diff for D31716: [Builtins] Fix div0 error in udivsi3.

move up the "divby0" block for the case with HW div to make the code easier to read.

Apr 5 2017, 12:29 PM
weimingz updated the diff for D31716: [Builtins] Fix div0 error in udivsi3.

I think the r7 (fp) was not set to initial SP, so it won't matter for stack-based unwinding. Anyway, use r7 now.

Apr 5 2017, 11:23 AM
weimingz added reviewers for D31716: [Builtins] Fix div0 error in udivsi3: rengolin, compnerd.
Apr 5 2017, 10:16 AM
weimingz created D31716: [Builtins] Fix div0 error in udivsi3.
Apr 5 2017, 10:11 AM

Apr 3 2017

weimingz updated the diff for D31573: [Builtins] Fix test cases for xf/ti.

these tests are the only 4 tests that use 128 bit long long.
Other tests that uses HAS_80_BIT_LONG_DOUBLE should be replaced with __LDBL_MANT_DIG__ == 64

Apr 3 2017, 4:21 PM
weimingz added a comment to D31573: [Builtins] Fix test cases for xf/ti.

In my view, LDBL_MANT_DIG == 64 implies HAS_80_BIT_LONG_DOUBLE, but need t to exclude MIPS as it clang BE doesn't support it.

Apr 3 2017, 3:55 PM
weimingz updated the diff for D31573: [Builtins] Fix test cases for xf/ti.

seems no way to detect if 80-bit ldbl is supported or not. Leave it to the build time flags.

Apr 3 2017, 3:49 PM
weimingz added inline comments to D31573: [Builtins] Fix test cases for xf/ti.
Apr 3 2017, 3:14 PM
weimingz committed rL299392: Reland r298901 with modifications (reverted in r298932).
Reland r298901 with modifications (reverted in r298932)
Apr 3 2017, 3:02 PM
weimingz closed D30724: Dont emit Mapping symbols for sections that contain only data. by committing rL299392: Reland r298901 with modifications (reverted in r298932).
Apr 3 2017, 3:02 PM
weimingz updated the diff for D31573: [Builtins] Fix test cases for xf/ti.

Change to HAS_80_BIT_LONG_DOUBLE just like other tests.
Also, if HAS_80_BIT_LONG_DOUBLE is not defined, we can set it if CRT_HAS_128BIT && LDBL_MANT_DIG == 64. So even if the build doesn't specify it, the test won't be skipped by mistake.

Apr 3 2017, 2:36 PM
weimingz added a comment to D31573: [Builtins] Fix test cases for xf/ti.

If the platform doesn't support it, the LDBL_MANT_DIG will be 53 (refer to clang/test/Preprocessor/init.c )

Apr 3 2017, 1:39 PM
weimingz updated the diff for D31573: [Builtins] Fix test cases for xf/ti.
Apr 3 2017, 12:32 PM
weimingz updated the diff for D31573: [Builtins] Fix test cases for xf/ti.

I guess HAS_80_BIT_LONG_DOUBLE is passed as some build-time flags. I can't find it anywhere in the compiler-rt source tree that defines it.

Apr 3 2017, 12:28 PM

Apr 2 2017

weimingz added a comment to D31573: [Builtins] Fix test cases for xf/ti.

I see. Should we mark the test as "Unsupported" for aarch64?

Apr 2 2017, 2:26 AM

Apr 1 2017

weimingz added a comment to D31573: [Builtins] Fix test cases for xf/ti.

After we agree on the patch, __fixxfti() will be fixed similarly.

Apr 1 2017, 4:36 PM
weimingz created D31573: [Builtins] Fix test cases for xf/ti.
Apr 1 2017, 4:33 PM

Mar 29 2017

weimingz added a comment to D31448: [Builtin] Unxfail tests for armhf.

The same test passed on
http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-a15-full-sh/builds/1202/
But failed on
http://lab.llvm.org:8011/builders/clang-cmake-armv7-a15-full/builds/5411

Mar 29 2017, 10:11 AM
weimingz committed rL299005: [Builtins] Mark mulsc3_test as UNSUPPORTED for armhf; NFC.
[Builtins] Mark mulsc3_test as UNSUPPORTED for armhf; NFC
Mar 29 2017, 10:11 AM
weimingz added a comment to D25157: [compiler-rt] [cmake] Respect COMPILER_RT_BUILD_* for libs, headers and tests.

Looks good to me but I'm not very familiar with the build of sanitizer and xray.

Mar 29 2017, 9:58 AM
weimingz added a comment to D31448: [Builtin] Unxfail tests for armhf.

pushed r298997 that removes XFAIL

Mar 29 2017, 8:08 AM
weimingz committed rL298997: [Compiler-RT][Builtins] Remove XFAIL for mulsc3; NFC.
[Compiler-RT][Builtins] Remove XFAIL for mulsc3; NFC
Mar 29 2017, 8:08 AM
weimingz added a comment to D31448: [Builtin] Unxfail tests for armhf.

We can remove the XFAIL for now

Mar 29 2017, 8:00 AM
weimingz added a comment to D31448: [Builtin] Unxfail tests for armhf.

Interestingly, mulsc3_test.c XPASSed. Looks like the compiltion line has no hardfp flag, so the problem was not exposed. In my local build.

Mar 29 2017, 8:00 AM

Mar 28 2017

weimingz committed rL298974: [Builtin] Unxfail tests for armhf.
[Builtin] Unxfail tests for armhf
Mar 28 2017, 8:49 PM
weimingz closed D31448: [Builtin] Unxfail tests for armhf by committing rL298974: [Builtin] Unxfail tests for armhf.
Mar 28 2017, 8:49 PM
weimingz created D31448: [Builtin] Unxfail tests for armhf.
Mar 28 2017, 6:01 PM
weimingz committed rL298932: Revert "Dont emit Mapping symbols for sections that contain only data.".
Revert "Dont emit Mapping symbols for sections that contain only data."
Mar 28 2017, 10:27 AM

Mar 27 2017

weimingz committed rL298901: Dont emit Mapping symbols for sections that contain only data..
Dont emit Mapping symbols for sections that contain only data.
Mar 27 2017, 10:53 PM
weimingz closed D30724: Dont emit Mapping symbols for sections that contain only data. by committing rL298901: Dont emit Mapping symbols for sections that contain only data..
Mar 27 2017, 10:53 PM
weimingz committed rL298892: Reland "[Compiler-rt][Builtins] Implement lit-test support (part 2 of 2)".
Reland "[Compiler-rt][Builtins] Implement lit-test support (part 2 of 2)"
Mar 27 2017, 5:10 PM
weimingz added inline comments to rL298713: builtins: Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA..
Mar 27 2017, 12:48 PM
weimingz added a reviewer for D31220: [builtins][ARM] Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA: dim.
Mar 27 2017, 12:47 PM
weimingz added inline comments to rL298713: builtins: Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA..
Mar 27 2017, 12:42 PM
weimingz reopened D30938: builtins: Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA..

it was commited by mistake and was reverted immediately.

Mar 27 2017, 12:37 PM

Mar 24 2017

weimingz added inline comments to D31220: [builtins][ARM] Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA.
Mar 24 2017, 10:27 AM
weimingz committed rL298715: Revert "builtins: Select correct code fragments when compiling for….
Revert "builtins: Select correct code fragments when compiling for…
Mar 24 2017, 10:20 AM
weimingz committed rL298714: [Compiler-rt][Builtins] Implement lit-test support (part 2 of 2).
[Compiler-rt][Builtins] Implement lit-test support (part 2 of 2)
Mar 24 2017, 10:18 AM
weimingz committed rL298713: builtins: Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA..
builtins: Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA.
Mar 24 2017, 10:18 AM
weimingz closed D31259: [Compiler-rt][Builtins] Implement lit-test support (part 2 of 2) by committing rL298714: [Compiler-rt][Builtins] Implement lit-test support (part 2 of 2).
Mar 24 2017, 10:18 AM
weimingz closed D30938: builtins: Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA. by committing rL298713: builtins: Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA..
Mar 24 2017, 10:18 AM

Mar 23 2017

weimingz added a comment to D31259: [Compiler-rt][Builtins] Implement lit-test support (part 2 of 2).

It's part of already-accepted patch ((https://reviews.llvm.org/D30802)
Will re-land it.

Mar 23 2017, 11:05 PM

Mar 22 2017

weimingz updated the diff for D31259: [Compiler-rt][Builtins] Implement lit-test support (part 2 of 2).

need to include builtin-config-ix to get the right ARM32 variable.

Mar 22 2017, 3:24 PM
weimingz added a comment to D31259: [Compiler-rt][Builtins] Implement lit-test support (part 2 of 2).

This patch *should* address the issue of buildbot of powerpc (http://lab.llvm.org:8011/builders/sanitizer-ppc64le-linux/builds/1703).
I was using

set(BUILTINS_TEST_ARCH ${COMPILER_RT_SUPPORTED_ARCH})

It should be

set(BUILTINS_TEST_ARCH ${BUILTIN_SUPPORTED_ARCH})
Mar 22 2017, 1:58 PM
weimingz created D31259: [Compiler-rt][Builtins] Implement lit-test support (part 2 of 2).
Mar 22 2017, 1:56 PM
weimingz added inline comments to D31220: [builtins][ARM] Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA.
Mar 22 2017, 12:37 PM

Mar 21 2017

weimingz added a comment to D30938: builtins: Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA..

Hi Michal,

Mar 21 2017, 4:13 PM
weimingz created D31220: [builtins][ARM] Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA.
Mar 21 2017, 4:10 PM

Mar 20 2017

weimingz committed rL298339: [Builtin] Implement lit-test support (part 1 of 2: test cases update).
[Builtin] Implement lit-test support (part 1 of 2: test cases update)
Mar 20 2017, 10:46 PM