Page MenuHomePhabricator

timshen (Tim Shen)
User

Projects

User does not belong to any projects.

User Details

User Since
Dec 1 2015, 6:12 PM (189 w, 20 h)

Recent Activity

Yesterday

timshen added a comment to D41412: [libcxx] implement <experimental/simd> concat() and split().

Hi @timshen,

I am very interested in these patches. Any chance you can take up the upstreaming process again?

Tue, Jul 16, 4:59 PM

Mon, Jul 15

timshen added a comment to D64702: [libcxx: experimental::simd] Support binary operations.

a) tim has already a similar patch in his pipeline

Mon, Jul 15, 12:13 PM · Restricted Project

Thu, Jul 11

timshen accepted D64588: Minor cleanup..
Thu, Jul 11, 2:22 PM · Restricted Project

Mon, Jun 24

timshen committed rGe75b1efa3967: Revert "[NVPTX][NFC] Fix documentation for shfl instructions." The original… (authored by timshen).
Revert "[NVPTX][NFC] Fix documentation for shfl instructions." The original…
Mon, Jun 24, 4:32 PM
timshen committed rL364250: Revert "[NVPTX][NFC] Fix documentation for shfl instructions." The.
Revert "[NVPTX][NFC] Fix documentation for shfl instructions." The
Mon, Jun 24, 4:31 PM
timshen committed rG41c7d530035a: [NVPTX][NFC] Fix documentation for shfl instructions. (authored by timshen).
[NVPTX][NFC] Fix documentation for shfl instructions.
Mon, Jun 24, 4:19 PM
timshen committed rL364248: [NVPTX][NFC] Fix documentation for shfl instructions..
[NVPTX][NFC] Fix documentation for shfl instructions.
Mon, Jun 24, 4:19 PM

Jun 13 2019

timshen committed rG4121bdc3d49a: [X86] Add target triple for live-debug-values-fragments.mir (authored by timshen).
[X86] Add target triple for live-debug-values-fragments.mir
Jun 13 2019, 6:39 PM
timshen committed rL363348: [X86] Add target triple for live-debug-values-fragments.mir.
[X86] Add target triple for live-debug-values-fragments.mir
Jun 13 2019, 6:38 PM

Jun 11 2019

timshen added a comment to D62164: [PowerPC] Enable MachinePipeliner for P9 with -ppc-enable-pipeliner.

This patch seems to fail under Asan at https://github.com/llvm-mirror/llvm/blob/28bea3dbfef348e53cf48f921e96a35b642b3950/lib/CodeGen/MachinePipeliner.cpp#L3736.

Jun 11 2019, 3:47 PM · Restricted Project

Jun 10 2019

timshen committed rG23ee97be05f4: [LLD] Change FileCheck output file pattern to a temporary file (authored by timshen).
[LLD] Change FileCheck output file pattern to a temporary file
Jun 10 2019, 2:37 PM
timshen committed rL362988: [LLD] Change FileCheck output file pattern to a temporary file.
[LLD] Change FileCheck output file pattern to a temporary file
Jun 10 2019, 2:36 PM

Apr 8 2019

timshen accepted D60279: [CUDA] Implemented _[bi]mma* builtins..
Apr 8 2019, 5:19 PM · Restricted Project, Restricted Project

Apr 5 2019

timshen added inline comments to D60279: [CUDA] Implemented _[bi]mma* builtins..
Apr 5 2019, 12:10 PM · Restricted Project, Restricted Project

Apr 1 2019

timshen accepted D60015: [NVPTX] Added intrinsics/instructions for MMA ops on (sub-)integers.

Discussed with Art offline. The tablegen code is still not readable, but it's considerably better than the past, and inventing new tools (e.g. Cartesian product) may be hard.

Apr 1 2019, 3:26 PM · Restricted Project

Mar 18 2019

timshen accepted D59393: [NVPTX] generate correct MMA instruction mnemonics with PTX63+..
Mar 18 2019, 5:45 PM · Restricted Project
timshen added inline comments to D59393: [NVPTX] generate correct MMA instruction mnemonics with PTX63+..
Mar 18 2019, 4:54 PM · Restricted Project
timshen added inline comments to D59393: [NVPTX] generate correct MMA instruction mnemonics with PTX63+..
Mar 18 2019, 4:51 PM · Restricted Project
timshen accepted D59389: [NVPTX] Refactor generation of MMA intrinsics and instructions. NFC..
Mar 18 2019, 4:20 PM · Restricted Project
timshen added inline comments to D59389: [NVPTX] Refactor generation of MMA intrinsics and instructions. NFC..
Mar 18 2019, 2:42 PM · Restricted Project

Feb 2 2019

timshen added a reverting change for D38481: Use sched_getaffinity instead of std::thread::hardware_concurrency when available: rG83fd6a1243d2: [FuzzerUtil] Partially revert D38481 on FuzzerUtil.
Feb 2 2019, 3:39 AM

Sep 4 2018

timshen committed rL341418: Revert r341373, since it fails on some targets..
Revert r341373, since it fails on some targets.
Sep 4 2018, 3:21 PM
timshen committed rC341418: Revert r341373, since it fails on some targets..
Revert r341373, since it fails on some targets.
Sep 4 2018, 3:21 PM
timshen added a comment to D51354: Fix the -print-multi-directory flag to print the selected multilib..

The test fails on my system like so:

Sep 4 2018, 3:11 PM

Aug 22 2018

timshen accepted D51067: Remove the use of pair inside the tuple in concat_iterator..
Aug 22 2018, 1:19 PM

Aug 20 2018

timshen added inline comments to D50710: [ADT] Fix Optional ABI mismatch between clang & gcc.
Aug 20 2018, 10:03 AM
timshen added inline comments to D50710: [ADT] Fix Optional ABI mismatch between clang & gcc.
Aug 20 2018, 10:01 AM

Aug 14 2018

timshen accepted D50687: [GraphDiff] Make InverseGraph a property of a GraphDiff..
Aug 14 2018, 10:41 AM

Aug 13 2018

timshen accepted D50479: Expose CFG Update struct. Define GraphTraits to get children given a snapshot CFG..
Aug 13 2018, 11:03 AM

Aug 10 2018

timshen requested changes to D50479: Expose CFG Update struct. Define GraphTraits to get children given a snapshot CFG..

Unintentional LGTM. But it's close. :)

Aug 10 2018, 3:41 PM
timshen accepted D50534: [libc++] Fix handling of negated character classes in regex.

That looks more correct to me, thanks! Although I'm still puzzled by the empty check at all, it's clearly an improvement.

Aug 10 2018, 2:28 PM
timshen accepted D50479: Expose CFG Update struct. Define GraphTraits to get children given a snapshot CFG..
Aug 10 2018, 1:37 PM

Aug 9 2018

timshen added inline comments to D50479: Expose CFG Update struct. Define GraphTraits to get children given a snapshot CFG..
Aug 9 2018, 5:08 PM
timshen added a comment to D50534: [libc++] Fix handling of negated character classes in regex.

I'm not fully equipped with the context right now, but something doesn't add up. if __neg_chars_.empty() check is removed, the (__neg_mask_ == 0) above should be removed too. They have to be consistent.

Aug 9 2018, 4:29 PM

Aug 1 2018

timshen committed rL338660: [ADT] Add some documentation for GraphTraits..
[ADT] Add some documentation for GraphTraits.
Aug 1 2018, 5:21 PM
timshen closed D50120: [ADT] Add some documentation for GraphTraits..
Aug 1 2018, 5:21 PM
timshen updated the diff for D50120: [ADT] Add some documentation for GraphTraits..

Update based on comments.

Aug 1 2018, 11:42 AM

Jul 31 2018

timshen created D50120: [ADT] Add some documentation for GraphTraits..
Jul 31 2018, 5:22 PM

Jul 30 2018

timshen added a comment to D50021: [Support] Add casting iterator adapters.

Is there a real life example that justifies the optimization?

Jul 30 2018, 6:17 PM
timshen committed rL338325: [libcxx] fix `>> 42` UB in <experimental/simd>.
[libcxx] fix `>> 42` UB in <experimental/simd>
Jul 30 2018, 4:06 PM
timshen committed rCXX338325: [libcxx] fix `>> 42` UB in <experimental/simd>.
[libcxx] fix `>> 42` UB in <experimental/simd>
Jul 30 2018, 4:06 PM
timshen committed rCXX338318: Re-apply "[libcxx] implement <simd> ABI for Clang/GCC vector extension….
Re-apply "[libcxx] implement <simd> ABI for Clang/GCC vector extension…
Jul 30 2018, 3:28 PM
timshen committed rL338318: Re-apply "[libcxx] implement <simd> ABI for Clang/GCC vector extension….
Re-apply "[libcxx] implement <simd> ABI for Clang/GCC vector extension…
Jul 30 2018, 3:28 PM
timshen committed rCXX338316: Revert "[libcxx] implement <simd> ABI for Clang/GCC vector extension….
Revert "[libcxx] implement <simd> ABI for Clang/GCC vector extension…
Jul 30 2018, 3:22 PM
timshen committed rL338316: Revert "[libcxx] implement <simd> ABI for Clang/GCC vector extension….
Revert "[libcxx] implement <simd> ABI for Clang/GCC vector extension…
Jul 30 2018, 3:22 PM
timshen added a comment to D41412: [libcxx] implement <experimental/simd> concat() and split().

A note on test cases: I only used simds ints to test split() and concat(), as both functions don't specialize on the element type, unlike the constructors.

Jul 30 2018, 3:00 PM
timshen updated the diff for D41412: [libcxx] implement <experimental/simd> concat() and split().

Update based on comments.

Jul 30 2018, 2:58 PM
timshen committed rCXX338309: [libcxx] implement <simd> ABI for Clang/GCC vector extension, constructors….
[libcxx] implement <simd> ABI for Clang/GCC vector extension, constructors…
Jul 30 2018, 2:35 PM
timshen committed rL338309: [libcxx] implement <simd> ABI for Clang/GCC vector extension, constructors….
[libcxx] implement <simd> ABI for Clang/GCC vector extension, constructors…
Jul 30 2018, 2:23 PM
timshen closed D41376: [libcxx] Implement <simd> ABI for Clang/GCC vector extension, constructors, copy_from and copy_to..
Jul 30 2018, 2:23 PM
timshen added inline comments to D41376: [libcxx] Implement <simd> ABI for Clang/GCC vector extension, constructors, copy_from and copy_to..
Jul 30 2018, 12:09 PM
timshen updated the diff for D41376: [libcxx] Implement <simd> ABI for Clang/GCC vector extension, constructors, copy_from and copy_to..

Update based on comments.

Jul 30 2018, 12:08 PM

Jul 27 2018

timshen added inline comments to D41376: [libcxx] Implement <simd> ABI for Clang/GCC vector extension, constructors, copy_from and copy_to..
Jul 27 2018, 1:23 PM
timshen added a comment to D41376: [libcxx] Implement <simd> ABI for Clang/GCC vector extension, constructors, copy_from and copy_to..

I'm not going to rebase all the succeeding patches immediately onto this one, as it is painful and spamming emails. Rather, I'll only rebase the next patch in the line. So if you review more than one patch ahead (as you already did), you may see some stale patch context.

Jul 27 2018, 1:21 PM
timshen added inline comments to D41376: [libcxx] Implement <simd> ABI for Clang/GCC vector extension, constructors, copy_from and copy_to..
Jul 27 2018, 1:19 PM
timshen updated the diff for D41376: [libcxx] Implement <simd> ABI for Clang/GCC vector extension, constructors, copy_from and copy_to..

Update based on the comments.

Jul 27 2018, 1:19 PM

Jul 13 2018

timshen committed rL337075: Re-apply "[SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428).".
Re-apply "[SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428)."
Jul 13 2018, 5:04 PM
timshen committed rL337074: Add a CHECK line for r337072..
Add a CHECK line for r337072.
Jul 13 2018, 4:54 PM
timshen committed rL337072: [LSR] If no Use is interesting, early return..
[LSR] If no Use is interesting, early return.
Jul 13 2018, 4:45 PM
timshen closed D49049: [LSR] If no Use is interesting, early return..
Jul 13 2018, 4:45 PM
timshen added inline comments to D49049: [LSR] If no Use is interesting, early return..
Jul 13 2018, 4:41 PM
timshen added inline comments to D49049: [LSR] If no Use is interesting, early return..
Jul 13 2018, 3:50 PM
timshen updated the diff for D49049: [LSR] If no Use is interesting, early return..

TIL -metarenamer.

Jul 13 2018, 3:50 PM

Jul 9 2018

timshen added a comment to D49049: [LSR] If no Use is interesting, early return..

Do you have a test case for this?

Jul 9 2018, 3:08 PM
timshen updated the diff for D49049: [LSR] If no Use is interesting, early return..

Added test case.

Jul 9 2018, 3:06 PM

Jul 6 2018

timshen created D49049: [LSR] If no Use is interesting, early return..
Jul 6 2018, 5:46 PM
timshen committed rL336473: Revert "[SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428).".
Revert "[SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428)."
Jul 6 2018, 4:25 PM

Jul 3 2018

timshen added a comment to D48807: Add llvm::Any.

Also, one more area where Any makes code cleaner with my planned design is that there isn't really a 1-to-1 mapping between platform events and library events, because platforms have such different semantics.

For example, in Windows a single platform events corresponds to what on Linux is covered by the union of SIGTRAP, SIGBUS, SIGFPE, SIGILL, SIGSEGV, SIGUSR, and other various signals. And those signals themselves are Linux specific, and may be different from how the same types of events are communicated on Mac, BSD, or some other platform.

To abstract all these platform differences away, it's nice for the library's view of events to be independent of any particular platform. You might have a BreakpointEvent, an ArithmeticErrorEvent, an IllegalInstructionEvent, an InvalidMemoryReferenceEvent, and so on and so forth. On Windows, however, the PlatformPiece would be of the exact same concrete type for all of these (and others). So if you had some Windows specific code, you'd end up doing something like:

unique_ptr<EventBase> E = waitForEvent();
EXCEPTION_RECORD *E;
switch (E->Type) {
case EventBase::Breakpoint:
  E = &(dyn_cast<BreakpointEvent>(E.get())->PlatformPiece);
  break;
case EventBase::ArithmeticError:
  E = &(dyn_cast<ArithmeticErrorEvent>(E.get())->PlatformPiece);
  break;
case EventBase::IllegalInstruction:
  E = &(dyn_cast<IllegalInstructionEvent>(E.get())->PlatformPiece);
  break;
case EventBase::InvalidMemoryReference:
  E = &(dyn_cast<InvalidMemoryReferenceEvent>(E.get())->PlatformPiece);
  break;
}

On the other hand, with Any you can store the PlatformPiece directly in EventBase, and this code becomes:

unique_ptr<EventBase> E = waitForEvent();
const EXCEPTION_RECORD *E;
switch (E->Type) {
case EventBase::Breakpoint:
case EventBase::ArithmeticError:
case EventBase::IllegalInstruction:
case EventBase::InvalidMemoryReference:
  E = llvm::any_cast<const EXCEPTION_RECORD*>(&E->PlatformPiece);
  break;
}
Jul 3 2018, 10:37 AM

Jul 2 2018

timshen accepted D48349: [ADT] Add llvm::unique_function which is like std::function but supporting move-only closures..
Jul 2 2018, 4:28 PM
timshen added inline comments to D48349: [ADT] Add llvm::unique_function which is like std::function but supporting move-only closures..
Jul 2 2018, 1:48 PM
timshen committed rL336140: [SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428)..
[SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428).
Jul 2 2018, 1:07 PM
timshen closed D48409: [SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428)..
Jul 2 2018, 1:06 PM

Jun 26 2018

timshen committed rL335646: [ConstantRange] Add support of mul in makeGuaranteedNoWrapRegion..
[ConstantRange] Add support of mul in makeGuaranteedNoWrapRegion.
Jun 26 2018, 11:59 AM
timshen closed D48399: [ConstantRange] Add support of mul in makeGuaranteedNoWrapRegion..
Jun 26 2018, 11:58 AM
timshen updated the diff for D48399: [ConstantRange] Add support of mul in makeGuaranteedNoWrapRegion..

Add missing typedef.

Jun 26 2018, 11:45 AM
timshen added inline comments to D48399: [ConstantRange] Add support of mul in makeGuaranteedNoWrapRegion..
Jun 26 2018, 11:41 AM
timshen updated the diff for D48399: [ConstantRange] Add support of mul in makeGuaranteedNoWrapRegion..

Updated comments and style.

Jun 26 2018, 11:41 AM

Jun 25 2018

timshen committed rL335557: [APInt] Add helpers for rounding u/sdivs..
[APInt] Add helpers for rounding u/sdivs.
Jun 25 2018, 4:54 PM
timshen closed D48498: [APInt] Add helpers for rounding u/sdivs..
Jun 25 2018, 4:54 PM
timshen added inline comments to D48498: [APInt] Add helpers for rounding u/sdivs..
Jun 25 2018, 4:52 PM
timshen updated the diff for D48498: [APInt] Add helpers for rounding u/sdivs..

Updated comments.

Jun 25 2018, 4:52 PM
timshen added inline comments to D48498: [APInt] Add helpers for rounding u/sdivs..
Jun 25 2018, 1:29 PM
timshen updated the diff for D48498: [APInt] Add helpers for rounding u/sdivs..

Updated comments.

Jun 25 2018, 1:29 PM

Jun 22 2018

timshen updated the diff for D48399: [ConstantRange] Add support of mul in makeGuaranteedNoWrapRegion..

Factored out APInt code, and simplified unsigned code.

Jun 22 2018, 11:02 AM
timshen created D48498: [APInt] Add helpers for rounding u/sdivs..
Jun 22 2018, 10:59 AM

Jun 21 2018

timshen updated the diff for D48409: [SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428)..

Update more tests.

Jun 21 2018, 4:27 PM
timshen closed D48453: [SCEV] Re-apply r335197 (with Polly fixes)..
Jun 21 2018, 2:34 PM
timshen created D48453: [SCEV] Re-apply r335197 (with Polly fixes)..
Jun 21 2018, 1:49 PM
timshen added inline comments to D48349: [ADT] Add llvm::unique_function which is like std::function but supporting move-only closures..
Jun 21 2018, 10:20 AM

Jun 20 2018

timshen added a comment to D48338: [SCEV] Improve zext(A /u B) and zext(A % B).

Though I can't easily reduce to a test case, the code I'm specifically looking at looks like the following:

%11 = udiv i32 %10, 112
%12 = mul i32 %11, 112
%13 = sub i32 %10, %12
%14 = urem i32 %11, 112
%15 = udiv i32 %10, 12544
%16 = zext i32 %15 to i64
%17 = zext i32 %14 to i64
%18 = zext i32 %13 to i64
%19 = getelementptr inbounds [128 x [112 x [112 x [64 x float]]]], [128 x [112 x [112 x [64 x float]]]] addrspace(1)* %ptr, i64 0, i64 %16, i64 %17, i64 %18, i64 %3

The idea is that %10 is a flat index of %ptr, and the whole GEP should be equivalent to (in C) &%ptr[%10]. This already works for a case where there is no zexts and everything is i32. This patch makes it work with zexts.

I see. Does it work with 128 instead of 112? urem with powers of two generate trunc and zext.

My issue is that this patch goes:

  • in the reverse direction of what I need to simplify trunc/zext in general (but maybe that means my approach is not the right approach)
  • increase the computational complexity of expressions (I suspect that will make us generate worse code but probably negligible on CPU unless we do vectorization)

    But, some of our reduction rules were already going in the reverse direction (I had to change some of those to have smaller expressions in the end), so I guess my objective is not aligned with our SCEV reduction rule (which I am not sure have been "designed").
Jun 20 2018, 7:21 PM
timshen committed rL335198: Revert "[SCEV] Improve zext(A /u B) and zext(A % B)".
Revert "[SCEV] Improve zext(A /u B) and zext(A % B)"
Jun 20 2018, 7:20 PM
timshen updated the diff for D48399: [ConstantRange] Add support of mul in makeGuaranteedNoWrapRegion..

Formatting.

Jun 20 2018, 7:03 PM
timshen committed rL335197: [SCEV] Improve zext(A /u B) and zext(A % B).
[SCEV] Improve zext(A /u B) and zext(A % B)
Jun 20 2018, 6:53 PM
timshen closed D48338: [SCEV] Improve zext(A /u B) and zext(A % B).
Jun 20 2018, 6:53 PM
timshen added inline comments to D48338: [SCEV] Improve zext(A /u B) and zext(A % B).
Jun 20 2018, 6:52 PM
timshen updated the diff for D48338: [SCEV] Improve zext(A /u B) and zext(A % B).

Formatting.

Jun 20 2018, 6:50 PM
timshen added a comment to D48338: [SCEV] Improve zext(A /u B) and zext(A % B).

That might be related, for instance, such expressions:

((zext i3 {0,+,1}<%bb> to i64) + (8 * ({0,+,1}<nuw><nsw><%bb> /u 8)) + %a)

get simplified into:

{%a,+,1}<nw><%bb>
Jun 20 2018, 6:44 PM
timshen added a child revision for D48399: [ConstantRange] Add support of mul in makeGuaranteedNoWrapRegion.: D48409: [SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428)..
Jun 20 2018, 6:22 PM
timshen added a parent revision for D48409: [SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428).: D48399: [ConstantRange] Add support of mul in makeGuaranteedNoWrapRegion..
Jun 20 2018, 6:22 PM
timshen created D48409: [SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428)..
Jun 20 2018, 6:22 PM