andrewng (Andrew Ng)
User

Projects

User does not belong to any projects.

User Details

User Since
Mar 2 2017, 6:37 AM (32 w, 5 d)

Recent Activity

Mon, Oct 16

andrewng abandoned D38964: [TableGen] Workaround for VS 2015 Update 3 RelWithDebInfo build.

Workaround no longer required. This issue is also fixed by commit r315932.

Mon, Oct 16, 1:55 PM
andrewng created D38964: [TableGen] Workaround for VS 2015 Update 3 RelWithDebInfo build.
Mon, Oct 16, 10:47 AM

Tue, Oct 10

andrewng closed D38690: [LLD] Fix findOrphanPos to consistently ignore "dead" OutputSection's.

Committed in rL315292: [LLD] Fix findOrphanPos to consistently ignore "dead" OutputSection's.

Tue, Oct 10, 3:16 AM

Mon, Oct 9

andrewng created D38690: [LLD] Fix findOrphanPos to consistently ignore "dead" OutputSection's.
Mon, Oct 9, 8:44 AM

Fri, Oct 6

andrewng abandoned D38539: [LLD] Do not unlink OutputFile prematurely.

Abandoned in favour of change https://reviews.llvm.org/D38571.

Fri, Oct 6, 1:46 AM

Thu, Oct 5

andrewng added a comment to D38539: [LLD] Do not unlink OutputFile prematurely.
In D38539#889005, @ruiu wrote:

Can you try https://reviews.llvm.org/D38571 to see if it will fix your problem? Thanks.

Thu, Oct 5, 5:09 AM

Wed, Oct 4

andrewng added a comment to D38539: [LLD] Do not unlink OutputFile prematurely.

What is the problem? std::thread::detach is a part of C++11, and it is hard to believe that we shouldn't use it at all.

Wed, Oct 4, 10:25 AM
andrewng added a comment to D38539: [LLD] Do not unlink OutputFile prematurely.
In D38539#888333, @ruiu wrote:

From my understanding of FileOutputBuffer::commit in its current form, it does a call to sys::fs::rename for a regular file. So there is no direct association to the "unlink" performance issue described in the comment to unlinkAsync. Although, it could be that the implementation of rename on Linux could suffer from similar performance problems (i.e. it effectively still performs an unlink). Previously, FileOutputBuffer::create did remove (unlink) the target file. I believe that you recently removed this behaviour and it was this unlink that the unlinkAsync was trying to improve.

If you try it yourself, you'd realize that rename(2)'ing onto an existing file is as slow as calling unlink(2) on that file. My previous change to FileOutputBuffer doesn't fix the correctness issue in the usual use case, but it also improved the speed of lld, because lld no longer tries to unlink a file in the main thread. Before making that change, it tried to do that in the Driver by tryCreateFile.

Wed, Oct 4, 9:53 AM
andrewng added a comment to D38539: [LLD] Do not unlink OutputFile prematurely.

Hi Rui,

Wed, Oct 4, 9:31 AM
andrewng created D38539: [LLD] Do not unlink OutputFile prematurely.
Wed, Oct 4, 6:44 AM

Sep 6 2017

andrewng updated the diff for D37462: [LLD] Fix padding of .eh_frame when in executable segment.

Updated based on suggestion. I still think that keeping the common "AlignSize" is better and safer.

Sep 6 2017, 3:08 AM

Sep 5 2017

andrewng added a comment to D37462: [LLD] Fix padding of .eh_frame when in executable segment.

A similar fix was required for the string table, see https://reviews.llvm.org/D36267.

Sep 5 2017, 3:38 AM
andrewng created D37462: [LLD] Fix padding of .eh_frame when in executable segment.
Sep 5 2017, 3:33 AM

Jul 5 2017

andrewng added a comment to D34976: [lit] Fix unit test discovery for Visual Studio builds..

Is this patch good to land?

Jul 5 2017, 10:45 AM

Jul 4 2017

andrewng added a comment to D34976: [lit] Fix unit test discovery for Visual Studio builds..

This patch fixes a Windows Visual Studio build lit issue introduced by rL306895 (D34855).

Jul 4 2017, 1:49 AM
andrewng updated subscribers of D34976: [lit] Fix unit test discovery for Visual Studio builds..
Jul 4 2017, 1:44 AM
andrewng created D34976: [lit] Fix unit test discovery for Visual Studio builds..
Jul 4 2017, 1:43 AM
andrewng added a comment to D34855: [lit] Factor out listdir logic shared by different test formats..

Ah, I just noticed the D34853, it fixes the issue I am observing.

Jul 4 2017, 12:53 AM
andrewng added a comment to D34853: Fix (benignly) incorrect GoogleTest specs in various lit configs..

I believe that this "build mode" is intended for the Visual Studio MSVC build. This build is special in that it can produce builds for multiple configurations, e.g. Debug, Release & RelWithDebInfo, within the same top level build output directory. It is this configuration type that defines the "build mode". This means that the unit tests will only pick up the configuration that matches that of the lit that was run. Without the "build mode" I believe lit might end up running all configurations of unit tests that have been built, which is probably not the intended behaviour.

Jul 4 2017, 12:35 AM · Restricted Project, lld

Jun 29 2017

andrewng added a comment to D34204: [LLD][LinkerScript] Allow non-alloc sections to be assigned to segments..

Hi Rafael,

Is this patch now good to land?

Cheers,
Andrew

Jun 29 2017, 6:30 AM

Jun 26 2017

andrewng added a comment to D34204: [LLD][LinkerScript] Allow non-alloc sections to be assigned to segments..

Hi Rafael,

Jun 26 2017, 10:02 AM
andrewng updated the diff for D34204: [LLD][LinkerScript] Allow non-alloc sections to be assigned to segments..

Updated for review comments.

Jun 26 2017, 2:22 AM
andrewng updated the summary of D34204: [LLD][LinkerScript] Allow non-alloc sections to be assigned to segments..
Jun 26 2017, 2:19 AM

Jun 23 2017

andrewng added a comment to D34204: [LLD][LinkerScript] Allow non-alloc sections to be assigned to segments..

Is there any more feedback on this patch or is it good to land?

Jun 23 2017, 9:36 AM

Jun 21 2017

andrewng added a comment to D34204: [LLD][LinkerScript] Allow non-alloc sections to be assigned to segments..
In D34204#786240, @ruiu wrote:

Can you change your program?

Jun 21 2017, 11:06 AM

Jun 20 2017

andrewng added a comment to D34204: [LLD][LinkerScript] Allow non-alloc sections to be assigned to segments..
In D34204#784448, @ruiu wrote:

Hi Andrew,

What are you actually trying to address with this patch? I'd like to know more about the background as to why you want this. Is there any reason you can't fix your program rather than the linker?

Jun 20 2017, 3:12 AM

Jun 19 2017

andrewng added a comment to D34203: [LLD][LinkerScript] Add support for segment NONE..

Is this patch good to land?

Jun 19 2017, 3:04 AM

Jun 16 2017

andrewng removed reviewers for D34204: [LLD][LinkerScript] Allow non-alloc sections to be assigned to segments.: jhenderson, bd1976bris, edd, gbreynoo.
Jun 16 2017, 1:51 AM
andrewng removed reviewers for D34203: [LLD][LinkerScript] Add support for segment NONE.: jhenderson, bd1976bris, edd, gbreynoo.
Jun 16 2017, 1:49 AM

Jun 14 2017

andrewng created D34204: [LLD][LinkerScript] Allow non-alloc sections to be assigned to segments..
Jun 14 2017, 6:41 AM
andrewng created D34203: [LLD][LinkerScript] Add support for segment NONE..
Jun 14 2017, 6:29 AM

May 18 2017

andrewng added inline comments to D33112: Optimize orphan plament in a general way.
May 18 2017, 4:52 AM

May 5 2017

andrewng added a comment to D32910: [Lit] Fix to prevent creation of "%SystemDrive%" directory on Windows..

I don't disbelieve you, but do you have any thoughts about why I've never seen this when running tests locally?

May 5 2017, 8:39 AM
andrewng created D32910: [Lit] Fix to prevent creation of "%SystemDrive%" directory on Windows..
May 5 2017, 8:20 AM

Apr 27 2017

andrewng updated the diff for D31604: [DebugInfo][X86] Improve X86 Optimize LEAs handling of debug values..

As suggested by Adrian, I have made prependDIExpr a static member function of DIExpression (and also appendOffset used by prependDIExpr). This is then used to apply the LEA address shift to the replacement debug value.

Apr 27 2017, 8:03 AM

Apr 26 2017

andrewng added inline comments to D31604: [DebugInfo][X86] Improve X86 Optimize LEAs handling of debug values..
Apr 26 2017, 1:08 PM

Apr 25 2017

andrewng added inline comments to D31604: [DebugInfo][X86] Improve X86 Optimize LEAs handling of debug values..
Apr 25 2017, 10:03 AM
andrewng added a comment to D31604: [DebugInfo][X86] Improve X86 Optimize LEAs handling of debug values..

Sorry for the slight delay but only just got back from holiday.

Apr 25 2017, 6:22 AM

Apr 21 2017

andrewng added inline comments to D31604: [DebugInfo][X86] Improve X86 Optimize LEAs handling of debug values..
Apr 21 2017, 3:02 AM
andrewng added a comment to D31755: [DebugInfo][X86] Fix handling of DBG_VALUE's in post-RA scheduler..

Rather than scanning forward for DBG_VALUEs, is there a more systematic way to find them? E.g., by iterating over USEs? If not, doing it this way is probably fine.

Apr 21 2017, 2:56 AM

Apr 18 2017

andrewng updated the diff for D31806: [SimplifyLibCalls] Fix infinite loop with fast-math optimization..

Updated test to focus only on the instcombine pass.

Apr 18 2017, 11:06 PM

Apr 15 2017

andrewng updated the diff for D31806: [SimplifyLibCalls] Fix infinite loop with fast-math optimization..

I've updated the comments to explicitly mention the MinGW-w64 case that encounters this issue and removed the unnecessary FunctionType related checks.

Apr 15 2017, 10:05 PM

Apr 12 2017

andrewng added inline comments to D31806: [SimplifyLibCalls] Fix infinite loop with fast-math optimization..
Apr 12 2017, 6:53 PM

Apr 11 2017

andrewng added a comment to D31806: [SimplifyLibCalls] Fix infinite loop with fast-math optimization..

gcc transforms the given C code to a call to expf(), just like LLVM, but then it looks like their inliner works a bit differently so the generated code ends up with a call to expf() rather than an infinite loop. With your patch, LLVM also generates a call to expf(). This seems weird... does MinGW's C library actually have an expf() function?

Apr 11 2017, 10:42 PM

Apr 9 2017

andrewng added a comment to D31806: [SimplifyLibCalls] Fix infinite loop with fast-math optimization..

Can you explain a little more how exactly we end up in this situation? Your example has undefined behavior according to the C standard.

Apr 9 2017, 3:21 AM

Apr 7 2017

andrewng created D31806: [SimplifyLibCalls] Fix infinite loop with fast-math optimization..
Apr 7 2017, 5:03 AM

Apr 6 2017

andrewng created D31755: [DebugInfo][X86] Fix handling of DBG_VALUE's in post-RA scheduler..
Apr 6 2017, 5:27 AM

Apr 4 2017

andrewng updated the diff for D31604: [DebugInfo][X86] Improve X86 Optimize LEAs handling of debug values..

Removed DWARF version checks as suggested by Adrian (thanks) and updated comments.

Apr 4 2017, 5:38 AM

Apr 3 2017

andrewng added inline comments to D31604: [DebugInfo][X86] Improve X86 Optimize LEAs handling of debug values..
Apr 3 2017, 10:57 AM
andrewng created D31604: [DebugInfo][X86] Improve X86 Optimize LEAs handling of debug values..
Apr 3 2017, 8:35 AM

Mar 17 2017

andrewng added a comment to D30835: [DebugInfo][X86] Teach Optimize LEAs pass to handle debug values.

Thanks for the review.

Mar 17 2017, 9:57 AM
andrewng added a comment to D30835: [DebugInfo][X86] Teach Optimize LEAs pass to handle debug values.

I have now split this patch and updated this review to contain the first part which fixes the codegen issue but doesn't preserve the debug values. I will work on a separate patch which will attempt to preserve the debug values.

Mar 17 2017, 7:35 AM
andrewng updated the diff for D30835: [DebugInfo][X86] Teach Optimize LEAs pass to handle debug values.
Mar 17 2017, 7:31 AM

Mar 16 2017

andrewng added a comment to D30835: [DebugInfo][X86] Teach Optimize LEAs pass to handle debug values.

Looks like this change does two things - fixes the "debug info affects optimization" and also does some work to improve optimized debug info quality? Might be worth separating this into two changes to make sure there's good test coverage/easier to review/etc?

I'm about to leave work now but I will look on Monday into whether separating this into two makes sense.

On further consideration, I think it makes sense to keep the patch as is because otherwise the first patch would be "lossy", i.e. the output would lose debug information. So in fixing the optimisation, ideally the debug information should be correct and preserved. However, if there are concerns with the "patching" of the debug information, then it might make sense to split the patch. What are your thoughts?

Mar 16 2017, 9:22 AM

Mar 13 2017

andrewng added a comment to D30835: [DebugInfo][X86] Teach Optimize LEAs pass to handle debug values.

Looks like this change does two things - fixes the "debug info affects optimization" and also does some work to improve optimized debug info quality? Might be worth separating this into two changes to make sure there's good test coverage/easier to review/etc?

I'm about to leave work now but I will look on Monday into whether separating this into two makes sense.

Mar 13 2017, 6:06 AM

Mar 10 2017

andrewng added a comment to D30835: [DebugInfo][X86] Teach Optimize LEAs pass to handle debug values.

Looks like this change does two things - fixes the "debug info affects optimization" and also does some work to improve optimized debug info quality? Might be worth separating this into two changes to make sure there's good test coverage/easier to review/etc?

Mar 10 2017, 11:10 AM
andrewng created D30835: [DebugInfo][X86] Teach Optimize LEAs pass to handle debug values.
Mar 10 2017, 10:01 AM