Page MenuHomePhabricator

steven_wu (Steven Wu)
User

Projects

User does not belong to any projects.

User Details

User Since
Nov 4 2014, 3:46 PM (311 w, 2 d)

Recent Activity

Fri, Oct 16

steven_wu accepted D89472: [LTO][Legacy] Eliminate an unused member of llvm::LTOModule. NFC..
Fri, Oct 16, 8:58 AM · Restricted Project

Fri, Oct 9

steven_wu committed rG360f275cb789: [IRMover] Add missing open quote in the warning message (authored by steven_wu).
[IRMover] Add missing open quote in the warning message
Fri, Oct 9, 3:20 PM

Fri, Sep 25

steven_wu added a comment to D88309: [LTO][Legacy] Add API to set result type to assembly.

@steven_wu what about the alternative solution where we make libLTO query the --filetype command line option. This will not require adding a new function to the API, but it does change the behavior of existing functions (lto_codegen_write_merged_modules, lto_codegen_compile, lto_codegen_optimize, lto_codegen_compile_optimized, lto_codegen_compile_to_file)

diff --git a/llvm/tools/lto/lto.cpp b/llvm/tools/lto/lto.cpp
index b680714..8251f7b 100644
--- a/llvm/tools/lto/lto.cpp
+++ b/llvm/tools/lto/lto.cpp
@@ -157,20 +157,23 @@
 
 // Convert the subtarget features into a string to pass to LTOCodeGenerator.
 static void lto_add_attrs(lto_code_gen_t cg) {
   LTOCodeGenerator *CG = unwrap(cg);
   auto MAttrs = codegen::getMAttrs();
   if (!MAttrs.empty()) {
     std::string attrs = join(MAttrs, ",");
     CG->setAttr(attrs);
   }
 
+  if (auto FT = codegen::getExplicitFileType())
+    CG->setFileType(FT.getValue());
+
   if (OptLevel < '0' || OptLevel > '3')
     report_fatal_error("Optimization level must be between 0 and 3");
   CG->setOptLevel(OptLevel - '0');
   CG->setFreestanding(EnableFreestanding);
 }
Fri, Sep 25, 4:52 PM · Restricted Project
steven_wu added a comment to D88309: [LTO][Legacy] Add API to set result type to assembly.

In that case, please increment LTO_API_VERSION. If you think the API needs more documentation, please add to docs/LinkTimeOptimization.rst

Fri, Sep 25, 10:21 AM · Restricted Project
steven_wu added a comment to D88309: [LTO][Legacy] Add API to set result type to assembly.
  • If this is just a temporary workaround, I would resist make this change to bake in this API that will not be used in the future.

This seems to be conflating the immediate reason with the more general value of having such an interface. The interface that @tejohnson's earlier comment mentions presumably exists because there is value in having such an interface.

Fri, Sep 25, 9:47 AM · Restricted Project
steven_wu added a comment to D88309: [LTO][Legacy] Add API to set result type to assembly.

Note libLTO API needs to be stable so:

  • If you need to add API, you need to bump API version, etc. Please refer to other commits that add APIs to see what needs to be done.
  • If this is just a temporary workaround, I would resist make this change to bake in this API that will not be used in the future.
Fri, Sep 25, 8:55 AM · Restricted Project
steven_wu added a comment to D88309: [LTO][Legacy] Add API to set result type to assembly.

Can you clarify your motivation for this? libLTO is used as an interface for linker and linkers, in general, do not understand assembly files.

Fri, Sep 25, 8:26 AM · Restricted Project

Wed, Sep 23

steven_wu accepted D88114: [clang]Test ensuring -fembed-bitcode passed to cc1 captures pre-opt bitcode..

LGTM

Wed, Sep 23, 9:22 AM · Restricted Project

Sep 22 2020

steven_wu added a comment to D88114: [clang]Test ensuring -fembed-bitcode passed to cc1 captures pre-opt bitcode..

Ok, I guess we are on the same page. The idea sounds fine to me.

Sep 22 2020, 3:42 PM · Restricted Project
steven_wu added a comment to D88114: [clang]Test ensuring -fembed-bitcode passed to cc1 captures pre-opt bitcode..

I am not sure what exactly is expected here. What is your definition for pre-optimized bitcode and how your test case ensures that? Can you explain a bit more for context?

Pre-optimized meaning before the llvm optimization pipeline is called. That's the current implementation, and the test explicitly checks that the inlining of bar into foo doesn't happen.

I could add an "alwaysinline" to bar, to further stress that.

Sep 22 2020, 2:15 PM · Restricted Project
steven_wu added a comment to D88114: [clang]Test ensuring -fembed-bitcode passed to cc1 captures pre-opt bitcode..

I am not sure what exactly is expected here. What is your definition for pre-optimized bitcode and how your test case ensures that? Can you explain a bit more for context?

Sep 22 2020, 1:59 PM · Restricted Project

Sep 16 2020

steven_wu added a comment to D85005: [libunwind] Support DW_CFA_remember/restore_state without heap allocation..

LGTM. Thanks.

Sep 16 2020, 9:45 AM

Sep 11 2020

steven_wu accepted D87477: [ThinLTO] Make -lto-embed-bitcode an enum.

SGTM.

Sep 11 2020, 11:03 AM · Restricted Project
steven_wu added a comment to D85005: [libunwind] Support DW_CFA_remember/restore_state without heap allocation..

seems fine. The only worry is that if you have a stack that is close to the stack limit and the unwinder might just blow the stack away so it might have bincompat concerns.

Sep 11 2020, 10:55 AM

Sep 4 2020

steven_wu added a comment to D84803: [ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab.

Our builds are back to green with that change. I agree that the root cause is likely elsewhere, but getting to the bottom of it would unfortunately take more time than I am able to commit.

Sep 4 2020, 12:32 PM · Restricted Project
steven_wu committed rG97866b8de81c: [ThinLTO][Legacy] Fix StringRef assertion from ThinLTO bots (authored by steven_wu).
[ThinLTO][Legacy] Fix StringRef assertion from ThinLTO bots
Sep 4 2020, 12:31 PM
steven_wu added a comment to D86767: [libunwind] Minor SJLJ config cleanup. NFCI..

Sorry for the inconvenience that libunwind is not really buildable for armv7 from iOS SDK. You can build a single threaded version without referring to those interfaces. If this is really troublesome for you, feel free to file a bug report and we can see what can be done here.

Thanks. I think I'm OK as-is.

This patch is technically not correct from a bigger context. I think, for example, watch armv7k doesn't default to sjlj exception model but it needs to build sjlj model to support some clients.

That makes sense. It looks like passing -arch armv7k to clang is enough to switch it to using DWARF and compact unwinding rather than sjlj. I also see a comment in ToolChains/Darwin.cpp:
// Only watchOS uses the new DWARF/Compact unwinding method.

It seems that Darwin/armv7k libunwind doesn't build because config.h enables _LIBUNWIND_SUPPORT_COMPACT_UNWIND, but there is no 32-bit ARM compact unwinder. It looks like setting the flag is the right thing to do, though -- maybe the rest of the code is internal to Apple.

I'll revise or abandon this patch. My main goal was to ensure that if _LIBUNWIND_USE_DL_ITERATE_PHDR was defined, then either of _LIBUNWIND_ARM_EHABI or _LIBUNWIND_SUPPORT_DWARF_UNWIND would also be defined.

Sep 4 2020, 12:22 PM · Restricted Project, Restricted Project

Sep 1 2020

steven_wu added inline comments to D84999: dynamic_cast optimization in LTO.
Sep 1 2020, 10:34 AM · Restricted Project
steven_wu added a comment to D86847: [Bitcode] Add BITCODE_SIZE_BLOCK_ID to encode the size of the bitcode.

I am a bit worry that linker might concatenate bitcode file with padding to achieve alignment requirement, etc. I guess you can create a termination block to mark the end but it is hard to seek the next start.

We can set the section alignment to 1 to avoid padding: (I rushed a bit, sorry: 6ae7b403c3e1aebcb825d3dd4777d3c1149d6d67)

Sep 1 2020, 10:18 AM · Restricted Project

Aug 31 2020

steven_wu added a comment to D86847: [Bitcode] Add BITCODE_SIZE_BLOCK_ID to encode the size of the bitcode.

I am a bit worry that linker might concatenate bitcode file with padding to achieve alignment requirement, etc. I guess you can create a termination block to mark the end but it is hard to seek the next start.

Aug 31 2020, 4:18 PM · Restricted Project
steven_wu accepted D86767: [libunwind] Minor SJLJ config cleanup. NFCI..

Thanks. LGTM.

Aug 31 2020, 9:33 AM · Restricted Project, Restricted Project

Aug 28 2020

steven_wu added a comment to D84803: [ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab.

Yeah, I wish I could give a nice test case, but it's a huge build and the affected configuration needs a lot of setup so I can't even replicate it locally at the moment.

If you have proposed patches I could send them off for a dry run relatively easily though.

Aug 28 2020, 2:33 PM · Restricted Project
steven_wu added a comment to D84803: [ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab.

Hi, we're seeing an assertion failure in one of the Firefox LTO bots:

char llvm::StringRef::operator[](size_t) const: Assertion `Index < Length && "Invalid index!"' failed.

I'm still working on finishing the bisection but I have a hunch that it may be this change. Unfortunately I can't seem to get a backtrace out of this particular bot.

As a guess, could it be the operator[] in getGlobalIdentifier at https://github.com/llvm/llvm-project/blob/4cb016cd2d8467c572b2e5c5d34f376ee79e4ac1/llvm/lib/IR/Globals.cpp#L140 ? It looks like there was previously a check for Name.size() > 0 that isn't checked anymore.

Aug 28 2020, 12:24 PM · Restricted Project
steven_wu added a comment to D86767: [libunwind] Minor SJLJ config cleanup. NFCI..

Sorry for the inconvenience that libunwind is not really buildable for armv7 from iOS SDK. You can build a single threaded version without referring to those interfaces. If this is really troublesome for you, feel free to file a bug report and we can see what can be done here.

Aug 28 2020, 9:49 AM · Restricted Project, Restricted Project

Aug 26 2020

steven_wu committed rG476ca330894b: [LTO] Don't apply LTOPostLink module flag during writeMergedModule (authored by steven_wu).
[LTO] Don't apply LTOPostLink module flag during writeMergedModule
Aug 26 2020, 11:18 AM
steven_wu closed D84789: [LTO] Don't apply LTOPostLink module flag during writeMergedModule.
Aug 26 2020, 11:18 AM · Restricted Project
steven_wu committed rG34b289b6dbcf: [ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab (authored by steven_wu).
[ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab
Aug 26 2020, 10:15 AM
steven_wu closed D84803: [ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab.
Aug 26 2020, 10:15 AM · Restricted Project
steven_wu added a comment to D84803: [ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab.

ping

Aug 26 2020, 9:26 AM · Restricted Project
steven_wu added a comment to D84789: [LTO] Don't apply LTOPostLink module flag during writeMergedModule.

ping

Aug 26 2020, 9:26 AM · Restricted Project

Aug 17 2020

steven_wu committed rG4cd09374cdb1: [libunwind] Remove compatibility support for macOS 10.6 (authored by steven_wu).
[libunwind] Remove compatibility support for macOS 10.6
Aug 17 2020, 2:10 PM
steven_wu closed D86104: [libunwind] Remove compatibility support for macOS 10.6.
Aug 17 2020, 2:10 PM · Restricted Project, Restricted Project
steven_wu requested review of D86104: [libunwind] Remove compatibility support for macOS 10.6.
Aug 17 2020, 1:20 PM · Restricted Project, Restricted Project

Aug 12 2020

steven_wu accepted D84908: [darwin][compiler-rt] build libclang_rt.<os>sim.a Apple Silicon slice, if SDK supports it.

LGTM

Aug 12 2020, 9:10 AM

Aug 7 2020

steven_wu added a comment to D84803: [ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab.

Also added a followup that can potentially deal with the conflict between "_$NAME" and "\01_$NAME". Not sure if that is going to affect some other platforms or not so I put them in a separate review: https://reviews.llvm.org/D85564

Aug 7 2020, 3:57 PM · Restricted Project
steven_wu requested review of D85564: [IR] Add an option to preserve llvm prefix for global identifier.
Aug 7 2020, 3:54 PM · Restricted Project
steven_wu added a reviewer for D84803: [ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab: evgeny777.
Aug 7 2020, 3:54 PM · Restricted Project
steven_wu retitled D84803: [ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab from [ThinLTO][MachO] Preserve both possible GUIDs from exported list to [ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab.
Aug 7 2020, 1:29 PM · Restricted Project
steven_wu updated the diff for D84803: [ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab.

Address review feedback.

Aug 7 2020, 1:26 PM · Restricted Project

Aug 6 2020

steven_wu accepted D85367: [clang, test, Darwin] Fix tests expecting Darwin target.

LGTM

Aug 6 2020, 1:19 PM · Restricted Project

Aug 5 2020

steven_wu updated the diff for D84803: [ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab.

Change how the GUID is computed in ThinLTOCodeGenerator.

Aug 5 2020, 4:47 PM · Restricted Project

Jul 30 2020

steven_wu added a comment to D84803: [ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab.

So getGlobalIdentifier removes the leading \01 because it only indicates that the symbol is already mangled, but on the other hand does not apply the platform mangling when there isn't a \01? It seems inconsistent isn't it? Could getGlobalIdentifier mangle the symbol when there isn't the leading \01?

Jul 30 2020, 1:30 PM · Restricted Project
steven_wu added a comment to D84803: [ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab.

Not very familiar with MachO. Can you clarify the issue - is it the case that some modules will use the mangled names and some won't? Otherwise it seems like it could use either all mangled or all unmangled.

The issue is that for macho, for a symbol in the object file (symbol table seen by the linker), let's say "_symbol". It can be either. "symbol" or "\01_symbol" in the bitcode file. When user/linker says it want to preserve "_symbol", you don't know what the GUID for that symbol is because it can be both.

I see - so this is an issue with the way the user has specified the name through some kind of option to say it needs to be preserved.

Jul 30 2020, 10:06 AM · Restricted Project
steven_wu added a comment to D84803: [ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab.

Not very familiar with MachO. Can you clarify the issue - is it the case that some modules will use the mangled names and some won't? Otherwise it seems like it could use either all mangled or all unmangled.

Jul 30 2020, 8:49 AM · Restricted Project

Jul 28 2020

steven_wu added a comment to D84803: [ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab.

This is basically a fundamental issues in GUID for machO format, which I am not sure if we can fix the underlying issue. That requires computing GUID based on mangled name, which can be more expensive and I am not sure if it will break the module summary for compatibility if we switch algorithm. So I fixed the export/preserve list only because that is the only thing I can think of that will surface as a bug. Otherwise, the mismatch GUID will just be a missed optimization opportunity.

Jul 28 2020, 2:42 PM · Restricted Project
steven_wu requested review of D84803: [ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab.
Jul 28 2020, 2:37 PM · Restricted Project
steven_wu requested review of D84789: [LTO] Don't apply LTOPostLink module flag during writeMergedModule.
Jul 28 2020, 12:35 PM · Restricted Project

Jul 27 2020

steven_wu accepted D84700: [ThinLTO] [test] cache.ll: Prevent Spotlight indexing of the output dir.

I have seen that and was wondering why. Thanks for figuring that out!

Jul 27 2020, 1:56 PM · Restricted Project
steven_wu accepted D84564: [darwin] build and link with a separate compiler-rt builtins library for device simulators.

LGTM

Jul 27 2020, 9:11 AM · Restricted Project, Restricted Project

Jul 23 2020

steven_wu committed rGac375c2fe316: [Bitcode] Avoid duplicating linker option when upgrading (authored by steven_wu).
[Bitcode] Avoid duplicating linker option when upgrading
Jul 23 2020, 1:08 PM
steven_wu closed D83688: [Bitcode] Avoid duplicating linker option when upgrading.
Jul 23 2020, 1:08 PM · Restricted Project
steven_wu updated the diff for D83688: [Bitcode] Avoid duplicating linker option when upgrading.

rebase the patch and ping.

Jul 23 2020, 9:09 AM · Restricted Project
steven_wu committed rG78709345fb34: [Bitcode] Drop invalid branch_weight in BitcodeReader (authored by steven_wu).
[Bitcode] Drop invalid branch_weight in BitcodeReader
Jul 23 2020, 9:07 AM
steven_wu closed D83699: [Bitcode] Drop invalid branch_weight in BitcodeReader.
Jul 23 2020, 9:07 AM · Restricted Project

Jul 22 2020

steven_wu updated the diff for D83699: [Bitcode] Drop invalid branch_weight in BitcodeReader.

Address review feedback

Jul 22 2020, 3:38 PM · Restricted Project

Jul 20 2020

steven_wu added a reviewer for D83699: [Bitcode] Drop invalid branch_weight in BitcodeReader: aprantl.
Jul 20 2020, 9:16 PM · Restricted Project
steven_wu updated the diff for D83699: [Bitcode] Drop invalid branch_weight in BitcodeReader.

Address review feedback and also add a testcase to make sure good branch
weights are not stripped.

Jul 20 2020, 9:16 PM · Restricted Project
steven_wu added a comment to D83688: [Bitcode] Avoid duplicating linker option when upgrading.

Ping

Jul 20 2020, 9:16 PM · Restricted Project

Jul 14 2020

steven_wu committed rG7de78fc93054: [compiler-rt] Add support for arm64 macOS (authored by steven_wu).
[compiler-rt] Add support for arm64 macOS
Jul 14 2020, 4:55 PM
steven_wu committed rGadb5cb915df2: [compiler-rt] Build all alias in builtin as private external on Darwin (authored by steven_wu).
[compiler-rt] Build all alias in builtin as private external on Darwin
Jul 14 2020, 4:29 PM
steven_wu committed rG2b42080b51c9: [clang] Teach -fembed-bitcode option not to embed W_value Group (authored by steven_wu).
[clang] Teach -fembed-bitcode option not to embed W_value Group
Jul 14 2020, 2:41 PM
steven_wu closed D83813: [clang] Teach -fembed-bitcode option not to embed W_value Group.
Jul 14 2020, 2:41 PM · Restricted Project
steven_wu updated the diff for D83813: [clang] Teach -fembed-bitcode option not to embed W_value Group.

Use Option::matches instead.

Jul 14 2020, 2:20 PM · Restricted Project
steven_wu added a reviewer for D83688: [Bitcode] Avoid duplicating linker option when upgrading: arphaman.
Jul 14 2020, 2:04 PM · Restricted Project
steven_wu added a reviewer for D83699: [Bitcode] Drop invalid branch_weight in BitcodeReader: arphaman.
Jul 14 2020, 2:04 PM · Restricted Project
Herald added a project to D83813: [clang] Teach -fembed-bitcode option not to embed W_value Group: Restricted Project.
Jul 14 2020, 2:04 PM · Restricted Project

Jul 13 2020

Herald added a project to D83699: [Bitcode] Drop invalid branch_weight in BitcodeReader: Restricted Project.
Jul 13 2020, 10:50 AM · Restricted Project
steven_wu updated the diff for D83688: [Bitcode] Avoid duplicating linker option when upgrading.

Add comments in the tests.

Jul 13 2020, 10:05 AM · Restricted Project
Herald added a project to D83688: [Bitcode] Avoid duplicating linker option when upgrading: Restricted Project.
Jul 13 2020, 9:58 AM · Restricted Project

Jun 30 2020

steven_wu accepted D82836: [macho] emit LC_BUILD_VERSION load command for supported OSes and platforms.

LGTM

Jun 30 2020, 10:18 AM · Restricted Project

Jun 29 2020

steven_wu accepted D82782: Clang Driver: refactor support for writing response files to be specified at Command creation, rather than as part of the Tool..

LGTM.

Jun 29 2020, 10:48 AM · Restricted Project
steven_wu accepted D82777: Clang Driver: Use Apple ld64's new @response-file support..

Agree this is ugly but the clean up looks fine. Not sure how to write a test as well but I can see the @ file path is triggered correctly.

Jun 29 2020, 10:48 AM · Restricted Project
steven_wu accepted D82696: [darwin][driver] isMacosxVersionLT should check against the minimum supported OS version.

LGTM

Jun 29 2020, 9:10 AM · Restricted Project, Restricted Project

Jun 26 2020

steven_wu committed rG898b01602ba5: [compiler-rt] Fix mismatched #if/#endif comments (authored by steven_wu).
[compiler-rt] Fix mismatched #if/#endif comments
Jun 26 2020, 3:11 PM

Jun 25 2020

steven_wu committed rGb2303debfa63: [compiler-rt] Add support for arm64 macOS (authored by steven_wu).
[compiler-rt] Add support for arm64 macOS
Jun 25 2020, 4:57 PM
steven_wu closed D82610: [compiler-rt] Add support for arm64 macOS.
Jun 25 2020, 4:57 PM · Restricted Project
steven_wu created D82610: [compiler-rt] Add support for arm64 macOS.
Jun 25 2020, 4:56 PM · Restricted Project

Jun 23 2020

steven_wu accepted D82428: [clang][driver] allow `-arch arm64` to be used to build for mac when on Apple Silicon Mac without explicit `-target`.

Not sure if it makes more sense to break the patch into two commits:

  • config.guess change is for building the correct host triple on apple silicon machine without explicitly specify it.
  • the driver change is for better default on Apple silicon Mac.
Jun 23 2020, 7:26 PM · Restricted Project

Jun 22 2020

steven_wu accepted D82337: [Triple] support macOS 11 os version number.
Jun 22 2020, 5:45 PM · Restricted Project

Jun 19 2020

steven_wu accepted D82138: Diagnostic message (error) related to ThinLTO caching needs to be downgraded to a remark.

LGTM

Jun 19 2020, 3:14 PM · Restricted Project

Jun 2 2020

steven_wu added inline comments to D79511: [ObjC] Add compatibility mode for type checking of qualified id block parameters..
Jun 2 2020, 10:25 AM · Restricted Project

Apr 30 2020

steven_wu accepted D79166: [docs][llvm-cxxfilt] Document the --no-strip-underscore option.

LGTM

Apr 30 2020, 11:47 AM · Restricted Project

Mar 10 2020

steven_wu accepted D71219: Fix conflict value for metadata "Objective-C Garbage Collection" in the mix of swift and Objective-C bitcode.
Mar 10 2020, 10:21 AM · Restricted Project, Restricted Project

Mar 9 2020

steven_wu added a comment to D71219: Fix conflict value for metadata "Objective-C Garbage Collection" in the mix of swift and Objective-C bitcode.

It looks good in general. I would prefer to have two separate tests, one for upgrade, one for ir-linking.

Mar 9 2020, 4:45 PM · Restricted Project, Restricted Project

Mar 5 2020

steven_wu added a comment to D75617: [WPD] Provide a way to prevent function(s) from being devirtualized.

What is the goal for this option? Do you expect any users of this or this is for debugging WPD?

It is for debugging. Not WPD itself but rather a devirtualized binary. See comment above

Mar 5 2020, 12:39 PM · Restricted Project
steven_wu added a comment to D75617: [WPD] Provide a way to prevent function(s) from being devirtualized.

What is the goal for this option? Do you expect any users of this or this is for debugging WPD?

Mar 5 2020, 11:31 AM · Restricted Project

Feb 28 2020

steven_wu accepted D75067: [LTO][Legacy] Add new API to query Mach-O CPU (sub)type.
Feb 28 2020, 11:30 AM · Restricted Project

Feb 26 2020

steven_wu added a comment to D74784: [driver][darwin] Don't use -platform_version flag by default.

Thanks. LGTM. I will let @arphaman to approve this.

Feb 26 2020, 10:13 AM · Restricted Project, Restricted Project
steven_wu committed rG387c3f74fd8e: [compiler-rt] Build all alias in builtin as private external on Darwin (authored by steven_wu).
[compiler-rt] Build all alias in builtin as private external on Darwin
Feb 26 2020, 9:30 AM
steven_wu closed D73577: [compiler-rt] Build all alias in builtin as private external on Darwin.
Feb 26 2020, 9:30 AM · Restricted Project, Restricted Project
steven_wu added a comment to D71219: Fix conflict value for metadata "Objective-C Garbage Collection" in the mix of swift and Objective-C bitcode.

The 0x40 bit is actually OBJC_IMAGE_HAS_CATEGORY_CLASS_PROPERTIES, which probably can differ from translation unit to translation unit even within ObjC. Some of the other bits should not be different. That is why I say you can break the bits down even more if needed.

Clang seems to set it unconditionally. Presumably it just controls whether category descriptors have a class-properties field; offhand, I don't know why that would need to be set globally.

Feb 26 2020, 9:03 AM · Restricted Project, Restricted Project

Feb 25 2020

steven_wu added a comment to D71219: Fix conflict value for metadata "Objective-C Garbage Collection" in the mix of swift and Objective-C bitcode.

I agree with all of this except that I'm not sure there's any situation where ObjC and Swift translation units should be disagreeing about the ObjC-specific parts of the OBJC_IMAGE_INFO.

Feb 25 2020, 3:59 PM · Restricted Project, Restricted Project
steven_wu added a comment to D71219: Fix conflict value for metadata "Objective-C Garbage Collection" in the mix of swift and Objective-C bitcode.

We should add a new module flag (with type Error) that contains Major and Minor and make sure "Garbage Collection" value is the same for Swift as for ObjC.

In the backend, we will reconstruct IMAGE_INFO from the new module flags and make sure the value stays the same with and without this patch.

IMAGE_INFO will be different for Swift vs ObjC.

Should be question mark! Meant for clarification from @steven_wu and @rjmccall. Should IMAGE_INFO include the value from the new module flag?

Feb 25 2020, 3:14 PM · Restricted Project, Restricted Project
steven_wu added a comment to D74784: [driver][darwin] Don't use -platform_version flag by default.

@steven_wu, ping, could you clarify about the tests please?

Feb 25 2020, 2:17 PM · Restricted Project, Restricted Project
steven_wu added a comment to D71219: Fix conflict value for metadata "Objective-C Garbage Collection" in the mix of swift and Objective-C bitcode.
  1. I will add a llvm-link tests for combining objc and swift bitcode.
  2. What do you mean by "codegen tests for correct value in the object file"? There is no "object file" in the picture. Are you asking for a test that checks the value in the output of llvm-link?

I think the decision was to break apart the current "Objective-C Garbage Collection" metadata. You need codegen test to test that OBJC_IMAGE_INFO is generated correctly after breaking apart the value.

I have question regarding this. Let's assume we have one assembly file from Objective-C and another one from Swift.

Objective-C assembly:
L_OBJC_IMAGE_INFO:
.long 0
.long 64

Swift assembly:

L_OBJC_IMAGE_INFO:
.long 0
.long 83953472

Let's assume that the llvm-link can link Swift bitcode and Objective-C bit successfully and the llc can generate the assembly for the merged output bitcode.

In the final assembly file, what value do you expect for L_OBJC_IMAGE_INFO?

Feb 25 2020, 11:05 AM · Restricted Project, Restricted Project

Feb 24 2020

steven_wu added a comment to D74994: [LTO] Rename legacy LTO files. NFC..

I don't feel like this is necessary and creating a subdirectory without creating a new library feels weird. I agree the layout is a bit weird for new comer to LTO library but it is a relatively small hurdle. I don't exactly feel like I want to pay the cost of making git blame a bit harder.

Any other reason for changing the layout?

Just what I said in the comment. I'm not wedded to this change. Will drop it if others don't think it makes sense.

Out of interest do you know if there are plans to remove the legacy code one day?

Feb 24 2020, 3:24 PM · Restricted Project
steven_wu added a reviewer for D74994: [LTO] Rename legacy LTO files. NFC.: steven_wu.

I don't feel like this is necessary and creating a subdirectory without creating a new library feels weird. I agree the layout is a bit weird for new comer to LTO library but it is a relatively small hurdle. I don't exactly feel like I want to pay the cost of making git blame a bit harder.

Feb 24 2020, 12:39 PM · Restricted Project

Feb 20 2020

steven_wu added a comment to D73577: [compiler-rt] Build all alias in builtin as private external on Darwin.

ping

Feb 20 2020, 2:39 PM · Restricted Project, Restricted Project

Feb 19 2020

steven_wu accepted D74808: [MachO][NFC] Extract all CPU_(SUB_)TYPE logic to libObject.
Feb 19 2020, 9:40 AM · Restricted Project
steven_wu added a comment to D74784: [driver][darwin] Don't use -platform_version flag by default.

I forgot if there is reason to use the option by default at all time (I did ask that in the previous review but Alex might have given more context offline).

Feb 19 2020, 9:40 AM · Restricted Project, Restricted Project