Page MenuHomePhabricator

jcai19 (Jian Cai)
User

Projects

User does not belong to any projects.

User Details

User Since
May 15 2019, 3:25 PM (158 w, 2 d)

Recent Activity

Oct 4 2021

jcai19 added a comment to D110582: [mlir][doc] fix typos..

LG, thanks

Oct 4 2021, 1:17 PM · Restricted Project
jcai19 committed rGa4bccf7afdd0: [mlir][doc] fix typos. (authored by jcai19).
[mlir][doc] fix typos.
Oct 4 2021, 1:16 PM
jcai19 closed D110582: [mlir][doc] fix typos..
Oct 4 2021, 1:15 PM · Restricted Project

Sep 28 2021

jcai19 added a comment to D110582: [mlir][doc] fix typos..

Thanks - a couple of comments.

Sep 28 2021, 10:49 AM · Restricted Project
jcai19 updated the diff for D110582: [mlir][doc] fix typos..

Fix my typos.

Sep 28 2021, 10:49 AM · Restricted Project

Sep 27 2021

jcai19 added reviewers for D110582: [mlir][doc] fix typos.: ftynse, jpienaar, antiagainst, mehdi_amini.
Sep 27 2021, 1:35 PM · Restricted Project
jcai19 requested review of D110582: [mlir][doc] fix typos..
Sep 27 2021, 1:33 PM · Restricted Project

Sep 13 2021

jcai19 added a comment to D109723: [mlir][doc] fix typos..

Thanks!

Sep 13 2021, 2:51 PM · Restricted Project
jcai19 committed rGce6d51201573: [mlir][doc] fix typos. (authored by jcai19).
[mlir][doc] fix typos.
Sep 13 2021, 2:49 PM
jcai19 closed D109723: [mlir][doc] fix typos..
Sep 13 2021, 2:49 PM · Restricted Project
jcai19 abandoned D105720: [AsmParser] Add support to LOCAL directive..
Sep 13 2021, 2:16 PM · Restricted Project, Restricted Project
jcai19 added reviewers for D109723: [mlir][doc] fix typos.: jpienaar, antiagainst, ftynse, mehdi_amini.
Sep 13 2021, 2:14 PM · Restricted Project
jcai19 requested review of D109723: [mlir][doc] fix typos..
Sep 13 2021, 2:12 PM · Restricted Project

Aug 17 2021

jcai19 added a comment to D105720: [AsmParser] Add support to LOCAL directive..

I still don't see a sufficient justification for making the change.

Aug 17 2021, 4:19 PM · Restricted Project, Restricted Project
jcai19 added a comment to D105720: [AsmParser] Add support to LOCAL directive..

Friendly ping.

Aug 17 2021, 3:53 PM · Restricted Project, Restricted Project

Jul 16 2021

jcai19 updated the diff for D105720: [AsmParser] Add support to LOCAL directive..

On second thought, my earlier analysis regarding the time complexity was not correct. Integrating the implementation of LOCAL directive into the for loop that handles macro arguments does not make it more expensive. This implements LOCAL directive within the for loop and avoids copying the macro body, and hopefully is more consistent with the existing code. This also reduces the number of lines added.

Jul 16 2021, 4:02 PM · Restricted Project, Restricted Project

Jul 13 2021

jcai19 added a comment to D105720: [AsmParser] Add support to LOCAL directive..

Yes, the reported case should be fixed by the proposed workaround but sometimes it may be more difficult to find a workaround such as in the the test cases. While this might not be common, PR#45051 shows there still could be real-work use cases of this directive, and I think we should try to support it especially when it does not introduce significant change to the existing code.

The PR doesn't list a use case. This could be an obscure feature which probably no code uses.
(There are now ~80 lines so I am reluctant on accepting that this is insignificant amount of code.)

Jul 13 2021, 5:22 PM · Restricted Project, Restricted Project
jcai19 added a comment to D105720: [AsmParser] Add support to LOCAL directive..

DenseSet<CachedHashStringRef> may be better than StringSet. The former doesn't need to duplicate the string.

Jul 13 2021, 4:12 PM · Restricted Project, Restricted Project

Jul 9 2021

jcai19 added inline comments to D105720: [AsmParser] Add support to LOCAL directive..
Jul 9 2021, 2:51 PM · Restricted Project, Restricted Project
jcai19 updated the diff for D105720: [AsmParser] Add support to LOCAL directive..

Use StringSet instead of std::unordered_set <std::string>.

Jul 9 2021, 2:51 PM · Restricted Project, Restricted Project
jcai19 added reviewers for D105720: [AsmParser] Add support to LOCAL directive.: MaskRay, rnk.
Jul 9 2021, 12:34 PM · Restricted Project, Restricted Project
jcai19 added a reviewer for D105720: [AsmParser] Add support to LOCAL directive.: nickdesaulniers.
Jul 9 2021, 12:29 PM · Restricted Project, Restricted Project
jcai19 requested review of D105720: [AsmParser] Add support to LOCAL directive..
Jul 9 2021, 12:13 PM · Restricted Project, Restricted Project

Jun 23 2021

jcai19 added a comment to D103184: Reland "[AArch64] handle -Wa,-march=".

Thanks for following up on a fix!

Jun 23 2021, 12:04 PM · Restricted Project
jcai19 committed rG0eac975b51cc: Reland "[AArch64] handle -Wa,-march=" (authored by jcai19).
Reland "[AArch64] handle -Wa,-march="
Jun 23 2021, 12:02 PM
jcai19 added a reverting change for rGfd11a26d368c: [AArch64] handle -Wa,-march=: rG0eac975b51cc: Reland "[AArch64] handle -Wa,-march=".
Jun 23 2021, 12:02 PM
jcai19 added a reverting change for D103184: Reland "[AArch64] handle -Wa,-march=": rG0eac975b51cc: Reland "[AArch64] handle -Wa,-march=".
Jun 23 2021, 12:02 PM · Restricted Project
jcai19 closed D103184: Reland "[AArch64] handle -Wa,-march=".
Jun 23 2021, 12:02 PM · Restricted Project

Jun 21 2021

jcai19 retitled D103184: Reland "[AArch64] handle -Wa,-march=" from Reland "[AArch64] handle -Wa,-march=" to Reland "[AArch64] handle -Wa,-march=".
Jun 21 2021, 11:41 AM · Restricted Project
jcai19 retitled D103184: Reland "[AArch64] handle -Wa,-march=" from [AArch64] handle -Wa,-march= to Reland "[AArch64] handle -Wa,-march=".
Jun 21 2021, 11:41 AM · Restricted Project
jcai19 updated the diff for D103184: Reland "[AArch64] handle -Wa,-march=".

After chatting with @nickdesaulniers offline, we have decided to abondoned D104656 in favor of keeping all the updates to this differential review for consistency. Appologies for any inconvenience caused.

Jun 21 2021, 11:40 AM · Restricted Project
jcai19 abandoned D104656: Reland "[AArch64] handle -Wa,-march=".
Jun 21 2021, 11:35 AM · Restricted Project
jcai19 reopened D103184: Reland "[AArch64] handle -Wa,-march=".
Jun 21 2021, 11:34 AM · Restricted Project
jcai19 added a comment to D104656: Reland "[AArch64] handle -Wa,-march=".

This reverts commit fd11a26d368c5a909fb88548fef2cee7a6c2c931

Shouldn't that be This relands commit fd11a26d368c5a909fb88548fef2cee7a6c2c931?

Jun 21 2021, 11:18 AM · Restricted Project
jcai19 updated the diff for D104656: Reland "[AArch64] handle -Wa,-march=".

Add comments explaning the difference with D103184. The implementation in D103184 unconditionally calls getAArch64ArchFeaturesFromMarch, which returns false when an irrelevant -Wa value is detected and parsed (e.g. -Wa,--version) and causes Clang to bail out.

Jun 21 2021, 11:17 AM · Restricted Project
jcai19 closed D103184: Reland "[AArch64] handle -Wa,-march=".
Jun 21 2021, 11:05 AM · Restricted Project
jcai19 updated the diff for D103184: Reland "[AArch64] handle -Wa,-march=".

Use the original flawed code for future reference.

Jun 21 2021, 11:05 AM · Restricted Project
jcai19 reopened D103184: Reland "[AArch64] handle -Wa,-march=".
Jun 21 2021, 11:04 AM · Restricted Project
jcai19 updated the summary of D104656: Reland "[AArch64] handle -Wa,-march=".
Jun 21 2021, 10:49 AM · Restricted Project
jcai19 added reviewers for D104656: Reland "[AArch64] handle -Wa,-march=": DavidSpickett, nickdesaulniers.
Jun 21 2021, 10:21 AM · Restricted Project
jcai19 closed D103184: Reland "[AArch64] handle -Wa,-march=".

It's probably clearer to use a new differential review for relanding. I've created https://reviews.llvm.org/D104656. Sorry for the noises.

Jun 21 2021, 10:20 AM · Restricted Project
jcai19 retitled D103184: Reland "[AArch64] handle -Wa,-march=" from Reland "[AArch64] handle -Wa,-march=" to [AArch64] handle -Wa,-march=.
Jun 21 2021, 10:17 AM · Restricted Project
jcai19 added a reverting change for D103184: Reland "[AArch64] handle -Wa,-march=": D104656: Reland "[AArch64] handle -Wa,-march=".
Jun 21 2021, 10:15 AM · Restricted Project
jcai19 added a reverting change for rGfd11a26d368c: [AArch64] handle -Wa,-march=: D104656: Reland "[AArch64] handle -Wa,-march=".
Jun 21 2021, 10:15 AM
jcai19 requested review of D104656: Reland "[AArch64] handle -Wa,-march=".
Jun 21 2021, 10:15 AM · Restricted Project
jcai19 added a reverting change for rGfd11a26d368c: [AArch64] handle -Wa,-march=: D103184: Reland "[AArch64] handle -Wa,-march=".
Jun 21 2021, 10:11 AM
jcai19 retitled D103184: Reland "[AArch64] handle -Wa,-march=" from [AArch64] handle -Wa,-march= to Reland "[AArch64] handle -Wa,-march=".
Jun 21 2021, 10:11 AM · Restricted Project
jcai19 updated the diff for D103184: Reland "[AArch64] handle -Wa,-march=".

The original implementation was indeed flawed. The failed test does not specify target triple so on X86 machines the issue won't happen unless I explicitly specify "-target aarch64".
This fixes the problem.

Jun 21 2021, 10:09 AM · Restricted Project
jcai19 reopened D103184: Reland "[AArch64] handle -Wa,-march=".
Jun 21 2021, 10:09 AM · Restricted Project

Jun 7 2021

jcai19 added a comment to D103184: Reland "[AArch64] handle -Wa,-march=".

FWIW the failure goes away locally if I revert this change here, so it's definitely due to this change here.

Things have been red for a while, probably good to revert while you investigate by this point.

Jun 7 2021, 4:59 PM · Restricted Project
jcai19 added a reverting change for rGfd11a26d368c: [AArch64] handle -Wa,-march=: rG9145a3d4ab7e: Revert "[AArch64] handle -Wa,-march=".
Jun 7 2021, 2:31 PM
jcai19 added a reverting change for D103184: Reland "[AArch64] handle -Wa,-march=": rG9145a3d4ab7e: Revert "[AArch64] handle -Wa,-march=".
Jun 7 2021, 2:31 PM · Restricted Project
jcai19 committed rG9145a3d4ab7e: Revert "[AArch64] handle -Wa,-march=" (authored by jcai19).
Revert "[AArch64] handle -Wa,-march="
Jun 7 2021, 2:31 PM
jcai19 added a comment to D103184: Reland "[AArch64] handle -Wa,-march=".

This breaks tests on arm macs: http://45.33.8.238/macm1/10931/step_7.txt

Please take a look and revert for now if it takes a while to fix.

Jun 7 2021, 12:54 PM · Restricted Project
jcai19 committed rGfd11a26d368c: [AArch64] handle -Wa,-march= (authored by jcai19).
[AArch64] handle -Wa,-march=
Jun 7 2021, 10:16 AM
jcai19 closed D103184: Reland "[AArch64] handle -Wa,-march=".
Jun 7 2021, 10:16 AM · Restricted Project

Jun 4 2021

jcai19 added a comment to D103184: Reland "[AArch64] handle -Wa,-march=".

That looks better, thanks @jcai19 . Based on @DavidSpickett 's LGTM I think this is now ready to land.

@DavidSpickett did ask:

Also please include in the commit message the "rules" that we're using here for parsing. Like I did for the arm change.

So you may want to edit the commit description manually in phab if you plan to arc patch this in before merging, otherwise please do so locally before merging to main then pushing.

Jun 4 2021, 1:08 PM · Restricted Project
jcai19 updated the summary of D103184: Reland "[AArch64] handle -Wa,-march=".
Jun 4 2021, 1:05 PM · Restricted Project
jcai19 updated the diff for D103184: Reland "[AArch64] handle -Wa,-march=".

Update test cases based on comments.

Jun 4 2021, 12:18 PM · Restricted Project
jcai19 added a comment to D103184: Reland "[AArch64] handle -Wa,-march=".

LGTM; any additional thoughts @DavidSpickett ?

A couple of additional tests just to be safe but otherwise LGTM.

Also please include in the commit message the "rules" that we're using here for parsing. Like I did for the arm change.

Jun 4 2021, 10:25 AM · Restricted Project
jcai19 updated the diff for D103184: Reland "[AArch64] handle -Wa,-march=".

Address the comments and add more tests.

Jun 4 2021, 10:22 AM · Restricted Project

Jun 2 2021

jcai19 updated the diff for D103184: Reland "[AArch64] handle -Wa,-march=".

Add a test case.

Jun 2 2021, 9:26 PM · Restricted Project
jcai19 added a comment to D103184: Reland "[AArch64] handle -Wa,-march=".
$ cat /tmp/test.s
irg x0, x0
$ aarch64-unknown-linux-gnu-as -march=armv8.5-a+memtag -march=armv8.1-a /tmp/test.s -o /dev/null
/tmp/test.s: Assembler messages:
/tmp/test.s:1: Error: selected processor does not support `irg x0,x0'

GAS is also taking the last value of march. So if we were to follow clang Arm's behaviour, the result would be the same.

Except we don't have to rely on the llvm backend picking the last of "target-feature". Which probably works for architecture versions but for individual extensions I don't think so.

If we make it additive this could happen:

-march=armv8.5-a+memtag -march=armv8.2-a

Becomes: (mte is the backend name for memtag for silly reasons)

-target-feature +v8.5-a -target-feature mte -target-feature +v8.2-a

So now instead of getting v8.2 only, the user now has v8.2+memtag. Only if they do armv8.2-a+nomemtag will they get what they expect (well, what I'd expect). Which means they'd need to know every previous march value.

Jun 2 2021, 2:42 PM · Restricted Project

Jun 1 2021

jcai19 added inline comments to D103184: Reland "[AArch64] handle -Wa,-march=".
Jun 1 2021, 6:20 PM · Restricted Project
jcai19 updated the diff for D103184: Reland "[AArch64] handle -Wa,-march=".

Limit the change to assembler files, and add more tests.

Jun 1 2021, 6:17 PM · Restricted Project
jcai19 added a comment to D103184: Reland "[AArch64] handle -Wa,-march=".

Thanks for the comments. Please see my replies inlined.

Jun 1 2021, 2:11 PM · Restricted Project

May 27 2021

jcai19 added inline comments to D103184: Reland "[AArch64] handle -Wa,-march=".
May 27 2021, 9:28 PM · Restricted Project

May 26 2021

jcai19 added reviewers for D103184: Reland "[AArch64] handle -Wa,-march=": ostannard, DavidSpickett, nickdesaulniers.
May 26 2021, 9:57 AM · Restricted Project
jcai19 requested review of D103184: Reland "[AArch64] handle -Wa,-march=".
May 26 2021, 9:56 AM · Restricted Project

Apr 12 2021

jcai19 committed rGed1734931aa9: Fix up build failures after cfce5b26a888cb979d65252275df1f977dc1e6c8 (authored by jcai19).
Fix up build failures after cfce5b26a888cb979d65252275df1f977dc1e6c8
Apr 12 2021, 2:09 PM
jcai19 added a comment to D98916: [ARM] support symbolic expression as immediate in memory instructions.

This broke the ppc64le-sanitizer builderr: https://lab.llvm.org/buildbot/#/builders/19/builds/3565. Will fix it.

Apr 12 2021, 1:49 PM · Restricted Project
jcai19 committed rGcfce5b26a888: [ARM] support symbolic expression as immediate in memory instructions (authored by jcai19).
[ARM] support symbolic expression as immediate in memory instructions
Apr 12 2021, 12:14 PM
jcai19 closed D98916: [ARM] support symbolic expression as immediate in memory instructions.
Apr 12 2021, 12:14 PM · Restricted Project

Apr 9 2021

jcai19 added a comment to D98916: [ARM] support symbolic expression as immediate in memory instructions.

Thanks for the update LGTM. It sounds like you have all the cases covered. Apologies for the noise.

Apr 9 2021, 11:10 AM · Restricted Project

Apr 8 2021

jcai19 added inline comments to D98916: [ARM] support symbolic expression as immediate in memory instructions.
Apr 8 2021, 11:56 AM · Restricted Project
jcai19 updated the diff for D98916: [ARM] support symbolic expression as immediate in memory instructions.

Fix a typo.

Apr 8 2021, 11:52 AM · Restricted Project
jcai19 added a comment to D98916: [ARM] support symbolic expression as immediate in memory instructions.

I have a one major concern, and a number of minor nits that could easily be addressed prior to commit if necessary.

The major concern is that if the intent is to just permit expressions for Arm state LDR instructions (addition of one fixup) then a lot of code in the AsmParser looks like it is permitting expressions for Thumb and Thumb2 LDR instructions that wouldn't use the one new fixup. Can you double check the predicates to make sure that they apply to the instructions you want to permit expressions on? It is possible I've got something wrong though. If I'm right then where we would have had errors had someone use an expression then we may get an internal error or crash as the backend won't be able to handle the expression. My suggestion would be to take out from ARMAsmParser all the code permitting exceptions except for the ARM instructions that support the fixup. Adding support for expressions to all the ARM and Thumb instructions is possible but that would probably be better done over several patches. If I'm wrong please ignore me and sorry for the noise.

Apr 8 2021, 11:49 AM · Restricted Project
jcai19 updated the diff for D98916: [ARM] support symbolic expression as immediate in memory instructions.

Address comments.

Apr 8 2021, 11:48 AM · Restricted Project

Apr 6 2021

jcai19 added a comment to D98916: [ARM] support symbolic expression as immediate in memory instructions.

I'm ok with this, and thanks for taking the time to work on it. It would be good to collect another LGTM from another reviewer before submitting.

Apr 6 2021, 12:06 PM · Restricted Project

Apr 5 2021

jcai19 added inline comments to D98916: [ARM] support symbolic expression as immediate in memory instructions.
Apr 5 2021, 5:17 PM · Restricted Project
jcai19 updated the diff for D98916: [ARM] support symbolic expression as immediate in memory instructions.

Only accept MCExpr in the affected instructions.

Apr 5 2021, 5:11 PM · Restricted Project

Apr 1 2021

jcai19 added a comment to D99556: Add support to -Wa,--version in clang.

Relanded without -fno-initegrated-as case at https://reviews.llvm.org/rG76d9bc72784d88f4dd57b9939e52c73739438af5.

Apr 1 2021, 1:49 PM · Restricted Project
jcai19 committed rG76d9bc72784d: Reland "Add support to -Wa,--version in clang"" (authored by jcai19).
Reland "Add support to -Wa,--version in clang""
Apr 1 2021, 1:48 PM

Mar 31 2021

jcai19 added a comment to D99556: Add support to -Wa,--version in clang.

We can probably remove the -fno-integraetd-as case.

Mar 31 2021, 10:12 PM · Restricted Project
jcai19 committed rG3cc3c0f8352e: Add support to -Wa,--version in clang (authored by jcai19).
Add support to -Wa,--version in clang
Mar 31 2021, 4:30 PM
jcai19 closed D99556: Add support to -Wa,--version in clang.
Mar 31 2021, 4:30 PM · Restricted Project

Mar 30 2021

jcai19 added inline comments to D99556: Add support to -Wa,--version in clang.
Mar 30 2021, 6:03 PM · Restricted Project
jcai19 updated the diff for D99556: Add support to -Wa,--version in clang.

Update tests.

Mar 30 2021, 6:02 PM · Restricted Project
jcai19 updated the diff for D99556: Add support to -Wa,--version in clang.

Update tests to address comments.

Mar 30 2021, 3:00 PM · Restricted Project

Mar 29 2021

jcai19 updated subscribers of D99556: Add support to -Wa,--version in clang.
Mar 29 2021, 7:02 PM · Restricted Project
jcai19 added a reviewer for D99556: Add support to -Wa,--version in clang: nickdesaulniers.
Mar 29 2021, 6:10 PM · Restricted Project
jcai19 requested review of D99556: Add support to -Wa,--version in clang.
Mar 29 2021, 6:05 PM · Restricted Project

Mar 25 2021

jcai19 added inline comments to D98916: [ARM] support symbolic expression as immediate in memory instructions.
Mar 25 2021, 12:04 PM · Restricted Project

Mar 22 2021

jcai19 added inline comments to D98916: [ARM] support symbolic expression as immediate in memory instructions.
Mar 22 2021, 5:52 PM · Restricted Project
jcai19 added inline comments to D98916: [ARM] support symbolic expression as immediate in memory instructions.
Mar 22 2021, 12:09 PM · Restricted Project
jcai19 updated the diff for D98916: [ARM] support symbolic expression as immediate in memory instructions.

Address comments.

Mar 22 2021, 12:08 PM · Restricted Project

Mar 19 2021

jcai19 updated the summary of D98916: [ARM] support symbolic expression as immediate in memory instructions.
Mar 19 2021, 3:11 PM · Restricted Project
jcai19 added a comment to D98916: [ARM] support symbolic expression as immediate in memory instructions.

The fixup code looks reasonable to me as it is mostly reusing the same logic as the pc-relative fixup. The names are internal to LLVM so there isn't any particular standard. I think this fixup would correspond to the relocation R_ARM_ABS12 https://github.com/ARM-software/abi-aa/blob/master/aaelf32/aaelf32.rst#relocation-codes so it may be worth using fixup_arm_ldst_abs_12 but that is only a suggestion. I wouldn't expect the assembler to use the relocation as the range is so short that any attempt to use it would likely result in an out of range error.

Mar 19 2021, 3:10 PM · Restricted Project
jcai19 updated the diff for D98916: [ARM] support symbolic expression as immediate in memory instructions.

Address comments so far.

Mar 19 2021, 3:09 PM · Restricted Project

Mar 18 2021

jcai19 edited reviewers for D98916: [ARM] support symbolic expression as immediate in memory instructions, added: nickdesaulniers; removed: nickdepinet.
Mar 18 2021, 8:29 PM · Restricted Project