weimingz (Weiming Zhao)
User

Projects

User does not belong to any projects.
User Since
Nov 19 2012, 2:50 AM (230 w, 6 d)

Recent Activity

Thu, Apr 20

weimingz committed rL300870: [Thumb-1] Fix corner cases for compressed jump tables.
[Thumb-1] Fix corner cases for compressed jump tables
Thu, Apr 20, 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.
Thu, Apr 20, 11:50 AM
weimingz updated the summary of D32250: [Thumb-1] Fix corner cases for compressed jump tables.
Thu, Apr 20, 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.

Thu, Apr 20, 11:44 AM

Wed, Apr 19

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"

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

ping?

Wed, Apr 19, 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.

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

Mon, Apr 10

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?

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

Sat, Apr 8

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

Thanks for the info!

Sat, Apr 8, 10:52 PM

Thu, Apr 6

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.

Thu, Apr 6, 6:02 PM
weimingz added a reviewer for D31775: [ARM] Add Kryo to available targets: apazos.
Thu, Apr 6, 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.

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

Wed, Apr 5

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?

Wed, Apr 5, 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.
Wed, Apr 5, 11:31 PM
weimingz committed rL299628: [Builtins] Fix div0 error in udivsi3.
[Builtins] Fix div0 error in udivsi3
Wed, Apr 5, 11:26 PM
weimingz closed D31716: [Builtins] Fix div0 error in udivsi3 by committing rL299628: [Builtins] Fix div0 error in udivsi3.
Wed, Apr 5, 11:26 PM
weimingz accepted D31721: Add __ffssi2 implementation to compiler-rt builtins.

LGTM.

Wed, Apr 5, 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.

Wed, Apr 5, 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.

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

Mon, Apr 3

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

Mon, Apr 3, 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.

Mon, Apr 3, 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.

Mon, Apr 3, 3:49 PM
weimingz added inline comments to D31573: [Builtins] Fix test cases for xf/ti.
Mon, Apr 3, 3:14 PM
weimingz committed rL299392: Reland r298901 with modifications (reverted in r298932).
Reland r298901 with modifications (reverted in r298932)
Mon, Apr 3, 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).
Mon, Apr 3, 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.

Mon, Apr 3, 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 )

Mon, Apr 3, 1:39 PM
weimingz updated the diff for D31573: [Builtins] Fix test cases for xf/ti.
Mon, Apr 3, 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.

Mon, Apr 3, 12:28 PM

Sun, Apr 2

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

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

Sun, Apr 2, 2:26 AM

Sat, Apr 1

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

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

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

Wed, Mar 29

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

Wed, Mar 29, 10:11 AM
weimingz committed rL299005: [Builtins] Mark mulsc3_test as UNSUPPORTED for armhf; NFC.
[Builtins] Mark mulsc3_test as UNSUPPORTED for armhf; NFC
Wed, Mar 29, 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.

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

pushed r298997 that removes XFAIL

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

We can remove the XFAIL for now

Wed, Mar 29, 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.

Wed, Mar 29, 8:00 AM

Tue, Mar 28

weimingz committed rL298974: [Builtin] Unxfail tests for armhf.
[Builtin] Unxfail tests for armhf
Tue, Mar 28, 8:49 PM
weimingz closed D31448: [Builtin] Unxfail tests for armhf by committing rL298974: [Builtin] Unxfail tests for armhf.
Tue, Mar 28, 8:49 PM
weimingz created D31448: [Builtin] Unxfail tests for armhf.
Tue, Mar 28, 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."
Tue, Mar 28, 10:27 AM

Mon, Mar 27

weimingz committed rL298901: Dont emit Mapping symbols for sections that contain only data..
Dont emit Mapping symbols for sections that contain only data.
Mon, Mar 27, 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..
Mon, Mar 27, 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)"
Mon, Mar 27, 5:10 PM
weimingz added inline comments to rL298713: builtins: Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA..
Mon, Mar 27, 12:48 PM
weimingz added a reviewer for D31220: [builtins][ARM] Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA: dim.
Mon, Mar 27, 12:47 PM
weimingz added inline comments to rL298713: builtins: Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA..
Mon, Mar 27, 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.

Mon, Mar 27, 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
weimingz closed D30802: [Builtin] Implement lit-test support (part 1 of 2: test cases update) by committing rL298339: [Builtin] Implement lit-test support (part 1 of 2: test cases update).
Mar 20 2017, 10:45 PM
weimingz updated the summary of D30802: [Builtin] Implement lit-test support (part 1 of 2: test cases update).
Mar 20 2017, 10:35 PM
weimingz updated the diff for D30802: [Builtin] Implement lit-test support (part 1 of 2: test cases update).

I split the original patch into 2 parts: This one only contains the test case updates: adding "RUN" or "UNSUPPORT". A couple of test cases are XFAILed for armhf/aarch64 target (bugs were opened [1,2]). This part is also safe to commit; The second part will includes the CMake, lit.cfg files for easy reviewing.

Mar 20 2017, 10:22 PM
weimingz added inline comments to D30938: builtins: Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA..
Mar 20 2017, 3:53 PM

Mar 14 2017

weimingz added a comment to D30872: [Builtin][AArch64] Fix build errors of test cases.

(sorry, please ignore the update)

Mar 14 2017, 10:08 PM
weimingz reopened D30802: [Builtin] Implement lit-test support (part 1 of 2: test cases update).
Mar 14 2017, 10:07 PM
weimingz updated the diff for D30802: [Builtin] Implement lit-test support (part 1 of 2: test cases update).

XFAIL some of the tests for armhf and aarch64.
See https://bugs.llvm.org//show_bug.cgi?id=32260 and https://bugs.llvm.org//show_bug.cgi?id=32261

Mar 14 2017, 10:07 PM
weimingz updated the diff for D30872: [Builtin][AArch64] Fix build errors of test cases.
Mar 14 2017, 10:04 PM

Mar 13 2017

weimingz committed rL297697: [Builtin][AArch64] Fix build errors of test cases.
[Builtin][AArch64] Fix build errors of test cases
Mar 13 2017, 5:56 PM
weimingz closed D30872: [Builtin][AArch64] Fix build errors of test cases by committing rL297697: [Builtin][AArch64] Fix build errors of test cases.
Mar 13 2017, 5:56 PM
weimingz updated subscribers of D30872: [Builtin][AArch64] Fix build errors of test cases.
Mar 13 2017, 3:24 PM
weimingz added reviewers for D30872: [Builtin][AArch64] Fix build errors of test cases: compnerd, jroelofs.
Mar 13 2017, 3:23 PM

Mar 12 2017

weimingz abandoned D30867: [Builtin][ARM] Try to address error on FreeBSD with r288777.
Mar 12 2017, 12:23 AM
weimingz added a comment to D27309: builtins: Add ARM Thumb1 implementation for uidiv and uidivmod.

Most of the changes are guarded by __ARM_ARCH_ISA_THUMB == 1 and I reviewed again of the "else" part and they look OK except for one suspect:
https://reviews.llvm.org/D30867

No, unfortunately, _ _ARM_ARCH_ISA_THUMB == n can't be used as selector for Thumb1 (or Thumb2) code.
Value of _ _ARM_ARCH_ISA_THUMB isn't based on actual compilation mode (-mthumb, -marm), its based on given CPU (or arch) capabilities.
Thus, if we compile library with '-marm -march=armv6' then _ _ARM_ARCH_ISA_THUMB is set to '1'. So we ends with Thumb1 code compiled using ARM ISA. Not a nice result, right?
So D30867 cannot help us.

I found these problems:

  • Thumb[1][2] code selection is broken, "(_ _ARM_ARCH_ISA_THUMB == n && (defined(_ _THUMBEL_ _) || defined(_ _THUMBEB_ _))" is right condition. See: https://github.com/strejda/tegra/commit/91057bb46e54e350da87e354aed3189d469da458#diff-a8e5a4d82eadfcc89b4f54d6755a46b4L97

    This one is fatal for FreeBSD.
  • all Thumb1 and some Thumb2 functions are not properly decorated by DEFINE_COMPILERRT_THUMB_FUNCTION() This breaks debugging.
  • usage of '.thumb' directive is inconsistent across files
  • Thumb 1 version of __udivsi3 is broken and doesn't not work at all. See: ` cmp r0, r1, lsl IMM shift addhs r3, r3, IMM (1 << shift) subhs r0, r0, r1, lsl IMM shift ` and

    ` lsls r2, r1, IMM shift cmp r0, r2 blo 1f subs r0, r0, r2 1: adcs r3, r3 `
  • There is no Thumb1 variant of __udivmodsi4
Mar 12 2017, 12:22 AM

Mar 11 2017

weimingz created D30872: [Builtin][AArch64] Fix build errors of test cases.
Mar 11 2017, 11:57 PM
weimingz updated the diff for D30867: [Builtin][ARM] Try to address error on FreeBSD with r288777.
Mar 11 2017, 1:20 PM
weimingz committed rL297569: Revert "[Builtin] Implement lit-test support".
Revert "[Builtin] Implement lit-test support"
Mar 11 2017, 1:05 PM
weimingz added a comment to D27309: builtins: Add ARM Thumb1 implementation for uidiv and uidivmod.

Most of the changes are guarded by __ARM_ARCH_ISA_THUMB == 1 and I reviewed again of the "else" part and they look OK except for one suspect:
https://reviews.llvm.org/D30867

Mar 11 2017, 12:24 PM
weimingz created D30867: [Builtin][ARM] Try to address error on FreeBSD with r288777.
Mar 11 2017, 12:21 PM
weimingz committed rL297566: [Builtin] Implement lit-test support.
[Builtin] Implement lit-test support
Mar 11 2017, 11:53 AM
weimingz closed D30802: [Builtin] Implement lit-test support (part 1 of 2: test cases update) by committing rL297566: [Builtin] Implement lit-test support.
Mar 11 2017, 11:53 AM

Mar 10 2017

weimingz updated the diff for D30802: [Builtin] Implement lit-test support (part 1 of 2: test cases update).

Thanks for trying it on x86, Michal.
I XFAILed cpu_model_test.c and gcc_personality_test.c for now and I leave "FIXME" around the %RUN line. We can fix them later on.

Mar 10 2017, 2:50 PM
weimingz committed rL297487: [Builtin][ARM] Fix test case for uldivmod.
[Builtin][ARM] Fix test case for uldivmod
Mar 10 2017, 10:33 AM
weimingz closed D30811: [Builtin][ARM] Fix test case for uldivmod by committing rL297487: [Builtin][ARM] Fix test case for uldivmod.
Mar 10 2017, 10:33 AM
weimingz updated the diff for D30802: [Builtin] Implement lit-test support (part 1 of 2: test cases update).

Address Jonathan's comments.
Just rebased and find that https://reviews.llvm.org/D30136 is adding TestCase support.
I'm not sure what's the TestCase is used for. Looks only for Darwin and the directory is empty.

Mar 10 2017, 1:50 AM
weimingz added inline comments to D30802: [Builtin] Implement lit-test support (part 1 of 2: test cases update).
Mar 10 2017, 1:43 AM
weimingz created D30811: [Builtin][ARM] Fix test case for uldivmod.
Mar 10 2017, 12:15 AM

Mar 9 2017

weimingz added a comment to D30802: [Builtin] Implement lit-test support (part 1 of 2: test cases update).

Unit/arm/call_apsr.S is updated to support thumb1.
It also fixes a bug in arm/aeabi_uldivmod_test.c

Mind fixing these in separate patches?

Mar 9 2017, 11:45 PM
weimingz added a comment to D30802: [Builtin] Implement lit-test support (part 1 of 2: test cases update).

I tested it on ARM via QEMU with the CMAKE parames below:

Mar 9 2017, 6:27 PM
weimingz created D30802: [Builtin] Implement lit-test support (part 1 of 2: test cases update).
Mar 9 2017, 6:16 PM