Page MenuHomePhabricator

tentzen (Ten Tzen)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 10 2020, 4:29 PM (7 w, 6 d)

Recent Activity

Today

tentzen updated the diff for D80344: [Windows SEH]: HARDWARE EXCEPTION HANDLING (MSVC -EHa) - Part 1.

update a couple of changes per David Majnemer's suggestion.

Thu, Jun 4, 1:02 AM · Restricted Project, Restricted Project

Yesterday

tentzen added a comment to D80344: [Windows SEH]: HARDWARE EXCEPTION HANDLING (MSVC -EHa) - Part 1.

thank you David. will update and submit a new patch shortly.

Wed, Jun 3, 11:57 PM · Restricted Project, Restricted Project

Tue, Jun 2

tentzen added a comment to D80344: [Windows SEH]: HARDWARE EXCEPTION HANDLING (MSVC -EHa) - Part 1.

Is there any feedback? thanks,

Tue, Jun 2, 3:56 PM · Restricted Project, Restricted Project
tentzen added a comment to D77982: [Windows SEH] Fix the frame-ptr of a nested-filter within a _finally.

Hi, does this look good? or is there any other concern?
thanks,

Tue, Jun 2, 3:25 PM · Restricted Project

Tue, May 26

tentzen updated the diff for D80344: [Windows SEH]: HARDWARE EXCEPTION HANDLING (MSVC -EHa) - Part 1.

update LangRef.rst for new intrinsics

Tue, May 26, 4:55 PM · Restricted Project, Restricted Project

Fri, May 22

tentzen updated the diff for D80344: [Windows SEH]: HARDWARE EXCEPTION HANDLING (MSVC -EHa) - Part 1.

fixed tidy warnings

Fri, May 22, 5:10 PM · Restricted Project, Restricted Project
tentzen added a comment to D80344: [Windows SEH]: HARDWARE EXCEPTION HANDLING (MSVC -EHa) - Part 1.

It may be helpful (even for the reviewers) to first specify their behavior,
instead of writing that after-the-fact "backwardly" based on the implementation.

Fri, May 22, 5:10 PM · Restricted Project, Restricted Project
tentzen updated the diff for D80344: [Windows SEH]: HARDWARE EXCEPTION HANDLING (MSVC -EHa) - Part 1.

Per Roman Lebedev's feedback, divide the patch into Clang and LLVM.

Fri, May 22, 4:06 PM · Restricted Project, Restricted Project
tentzen added a comment to D80344: [Windows SEH]: HARDWARE EXCEPTION HANDLING (MSVC -EHa) - Part 1.

This should likely be at least 3 patches: llvm middle-end, llvm codegen, clang.
Langref changes missing for new intrinsics.
Please post all patches with full context (-U99999)

Fri, May 22, 3:34 PM · Restricted Project, Restricted Project
tentzen updated the diff for D80344: [Windows SEH]: HARDWARE EXCEPTION HANDLING (MSVC -EHa) - Part 1.

avoid lint warnings and lint hang on Windows

Fri, May 22, 12:01 AM · Restricted Project, Restricted Project

Thu, May 21

tentzen updated the diff for D80344: [Windows SEH]: HARDWARE EXCEPTION HANDLING (MSVC -EHa) - Part 1.

fixed formats

Thu, May 21, 1:03 AM · Restricted Project, Restricted Project

Wed, May 20

tentzen created D80344: [Windows SEH]: HARDWARE EXCEPTION HANDLING (MSVC -EHa) - Part 1.
Wed, May 20, 5:07 PM · Restricted Project, Restricted Project

Fri, May 15

tentzen committed rGe32f8e5d4ae8: [Windows EH] Fix the order of Nested try-catches in $tryMap$ table (authored by tentzen).
[Windows EH] Fix the order of Nested try-catches in $tryMap$ table
Fri, May 15, 10:37 PM
tentzen closed D79474: [Windows EH] Fix the order of Nested try-catches in $tryMap$ table.
Fri, May 15, 10:37 PM · Restricted Project
tentzen added reviewers for D77982: [Windows SEH] Fix the frame-ptr of a nested-filter within a _finally: andrew.w.kaylor, pengfei.
Fri, May 15, 10:36 PM · Restricted Project

Wed, May 13

tentzen added a comment to D77982: [Windows SEH] Fix the frame-ptr of a nested-filter within a _finally.

Hi, Is there more concern?
To re-iterate the implementation strategy of this change:

Wed, May 13, 11:57 PM · Restricted Project
tentzen added a comment to D79760: [WinEH64] Fix a crush issue when c++ exception nested in a particular form..

right, I noticed that too and looked into it further..

Wed, May 13, 11:23 PM · Restricted Project
tentzen updated the diff for D79474: [Windows EH] Fix the order of Nested try-catches in $tryMap$ table.

Per discussion in https://reviews.llvm.org/D79760 , x86 test case there failed.

Wed, May 13, 11:23 PM · Restricted Project
tentzen added a comment to D79760: [WinEH64] Fix a crush issue when c++ exception nested in a particular form..

I meant did you debug into the crash of your test case in https://bugs.llvm.org/show_bug.cgi?id=42266 ?

Wed, May 13, 1:02 AM · Restricted Project

Tue, May 12

tentzen added a comment to D79760: [WinEH64] Fix a crush issue when c++ exception nested in a particular form..

Hi, Pengfei,
Did you get to the root of the bug and check the correctness of ctor&dtor ordering on your test cases?
Or you just tried to copy MSVC?

Tue, May 12, 11:09 PM · Restricted Project
tentzen added a comment to D79760: [WinEH64] Fix a crush issue when c++ exception nested in a particular form..

Hi, Pengfei,
Is this the same bug as this patch, https://reviews.llvm.org/D79474/new/ , right?

Tue, May 12, 7:56 PM · Restricted Project

Wed, May 6

tentzen added a comment to D79474: [Windows EH] Fix the order of Nested try-catches in $tryMap$ table.

thank you David, good eyes!
Is there any more concern?

Wed, May 6, 2:44 PM · Restricted Project
tentzen updated the diff for D79474: [Windows EH] Fix the order of Nested try-catches in $tryMap$ table.

fixed a comment.

Wed, May 6, 2:44 PM · Restricted Project
tentzen added a comment to D79474: [Windows EH] Fix the order of Nested try-catches in $tryMap$ table.

Hi, Reid,
the existing test case is fixed. I think there is no need to add one more unit test for this patch.
thanks,

Wed, May 6, 1:34 AM · Restricted Project
tentzen updated the diff for D79474: [Windows EH] Fix the order of Nested try-catches in $tryMap$ table.

fix a typo in test case

Wed, May 6, 1:34 AM · Restricted Project
tentzen created D79474: [Windows EH] Fix the order of Nested try-catches in $tryMap$ table.
Wed, May 6, 1:02 AM · Restricted Project

May 3 2020

tentzen committed rG21c1a0c7309a: Test Commit: add two head comments in WinEHPrepare.cpp (authored by tentzen).
Test Commit: add two head comments in WinEHPrepare.cpp
May 3 2020, 1:32 AM

May 1 2020

tentzen added a reviewer for D77982: [Windows SEH] Fix the frame-ptr of a nested-filter within a _finally: asl.

Hi, Anton,
I found you are the Code Owner of "Exception handling, Windows CodeGen, ARM EABI".
could you please provide a quick review here? thanks,

May 1 2020, 6:25 PM · Restricted Project

Apr 28 2020

tentzen added a comment to D77982: [Windows SEH] Fix the frame-ptr of a nested-filter within a _finally.

any more concern or comment?
thanks,

Apr 28 2020, 4:45 PM · Restricted Project

Apr 16 2020

tentzen added a comment to D77920: [Windows EH] Fix the order of Nested try-catches in $tryMap$ table.

right, thank you Reid. I see it now :

Apr 16 2020, 3:37 PM · Restricted Project
tentzen updated the diff for D77936: [Windows SEH] Fix abnormal-exits in _try.

remade a patch after re-sync

Apr 16 2020, 12:47 AM · Restricted Project

Apr 15 2020

tentzen added a comment to D77982: [Windows SEH] Fix the frame-ptr of a nested-filter within a _finally.

It can be greater than 2 because this Map includes Decls of User locals from parent.
see CodeGenFunction::EmitCapturedLocals() (the same place of this fix).

..
auto I = ParentCGF.LocalDeclMap.find(VD);
if (I == ParentCGF.LocalDeclMap.end())
  continue;
Apr 15 2020, 11:25 PM · Restricted Project
tentzen added a comment to D77920: [Windows EH] Fix the order of Nested try-catches in $tryMap$ table.
In D77920#1984956, @rnk wrote:

Sounds good, and the fix looks simple, but please add a test.

I'm surprised this change doesn't break an existing test, I'd expect us to have a test for the LSDA of a try-in-catch:

try { }
catch () {
  try { }
  catch () { }
}

As I understand it, the outer TBME must appear before the inner one, and the current behavior puts them in the other way around, innermost first.

Apr 15 2020, 4:34 PM · Restricted Project
tentzen updated the diff for D77936: [Windows SEH] Fix abnormal-exits in _try.

Replace F_HasSehAbnormalExits with F_HasExitSwitch

Apr 15 2020, 2:55 PM · Restricted Project
tentzen added a comment to D77982: [Windows SEH] Fix the frame-ptr of a nested-filter within a _finally.

The fix there deals with SEH filter with SEH _finally parent where its prototype is FIXED (2 implicit parameters). It will never change.

Apr 15 2020, 1:46 PM · Restricted Project

Apr 14 2020

tentzen added a comment to D77982: [Windows SEH] Fix the frame-ptr of a nested-filter within a _finally.

Searching LocalDeclMap is less problematic, I guess... but still, it should be possible to something more straightforward. Maybe make startOutlinedSEHHelper store the actual ImplicitParamDecl, or something like that.

Apr 14 2020, 4:20 PM · Restricted Project
tentzen added a comment to D77982: [Windows SEH] Fix the frame-ptr of a nested-filter within a _finally.

Again, using the name isn't reliable. Among other things, in release builds, IR values don't have names at all.

Apr 14 2020, 1:33 AM · Restricted Project
tentzen updated the diff for D77982: [Windows SEH] Fix the frame-ptr of a nested-filter within a _finally.

Do not use name comparison to locate parent's alloca of frame-pointer-addr.
search parent's LocalDeclMap instead.

Apr 14 2020, 1:33 AM · Restricted Project

Apr 13 2020

tentzen added inline comments to D77936: [Windows SEH] Fix abnormal-exits in _try.
Apr 13 2020, 4:20 PM · Restricted Project
tentzen updated the diff for D77982: [Windows SEH] Fix the frame-ptr of a nested-filter within a _finally.

Remove hard-code name "frame-pointer".
get the name from 2nd Arg of the _finally().

Apr 13 2020, 2:07 AM · Restricted Project
tentzen added inline comments to D77982: [Windows SEH] Fix the frame-ptr of a nested-filter within a _finally.
Apr 13 2020, 1:35 AM · Restricted Project

Apr 12 2020

tentzen updated the diff for D77936: [Windows SEH] Fix abnormal-exits in _try.

Per Eli's suggestion,
Use icmp (and zext) to check the JumpDest index, instead of directly passing the Index to _finally().

Apr 12 2020, 6:42 PM · Restricted Project
tentzen added a comment to D77936: [Windows SEH] Fix abnormal-exits in _try.

I'm not concerned about the performance implications of whatever approach we take here. In the worst case, an "icmp+zext" corresponds to two extra arithmetic instructions; that's not enough to matter. And I expect usually it'll get optimized away.

I'd prefer to avoid exposing our cleanup numbering to user code, if possible. The Microsoft documentation says it returns 0 or 1.

Apr 12 2020, 6:42 PM · Restricted Project
tentzen updated the diff for D77982: [Windows SEH] Fix the frame-ptr of a nested-filter within a _finally.

Fixed the format at comment lines

Apr 12 2020, 5:38 PM · Restricted Project
tentzen created D77982: [Windows SEH] Fix the frame-ptr of a nested-filter within a _finally.
Apr 12 2020, 4:01 PM · Restricted Project
tentzen added a comment to D77936: [Windows SEH] Fix abnormal-exits in _try.

Instead of asserting there are less than 256 cleanup destinations, can you emit an icmp against zero, or something like that?

Apr 12 2020, 2:25 PM · Restricted Project
tentzen updated the diff for D77936: [Windows SEH] Fix abnormal-exits in _try.

Add option -fms-extensions in test case

Apr 12 2020, 1:02 AM · Restricted Project

Apr 11 2020

tentzen updated the diff for D77936: [Windows SEH] Fix abnormal-exits in _try.

Per Eli's feedbacks:
(1) a test case (windows-seh-abnormal-exit.c) is added under clang\test\CodeGen directory.
(2) an assert is added to catch the extremely rare case that the number of JumpDests in a function is greater than 255. The max. number of JumpDests is 1 (return) + 2*M + N, where M is the number of for/while-loops and N is the number of Goto targets.

Apr 11 2020, 11:57 PM · Restricted Project
tentzen created D77936: [Windows SEH] Fix abnormal-exits in _try.
Apr 11 2020, 1:34 AM · Restricted Project