- User Since
- Nov 4 2014, 3:46 PM (206 w, 2 d)
Thu, Oct 11
You need to do a release build without assertion. Local names like parameters are dropped from IR to save space/memory.
I think you just need to check the parameter name or the implementation in your test case.
Tue, Oct 9
Thanks for posting this. I will start with some high level comments.
Wed, Sep 26
Mon, Sep 24
Thanks for doing this!
Sep 14 2018
Sep 13 2018
Also a bit clarification why ModuleToDefinedGVSummaries can have missing entries, because there can be an empty module, or a module has no GV in it. And this happens during thinLTO WebKit.
For example, in WebCore MacOS build, UnifiedSource26-mm.o has empty text and data section. Its object file only has debug info.
Fix up my previous patch.
I can't find a super clean solution for this. Here is one possible solution, which is to iterate and insert the entry before entering thread pool
Sep 7 2018
Sep 5 2018
I do prefer the current approach especially on Darwin. Some concerns of switching to use "-L + -l" are:
- clang and compiler-rt are rev-locked. Inferring the compiler-rt from resource-dir and passing to linker with the full path can prevent mistakes of mixing them up.
- This change does change linker semantics on Darwin. ld64 treats the inputs from command line with highest priority. Currently ld64 will use compiler-rt symbols before any other libraries passed in with -l flag. If clang decide to pass compiler-rt with -l flag, any other libraries (static or dynamic) that passed with -l flag will takes the priority over compiler-rt. This can lead to unexpected behavior.
Sep 4 2018
Remove the declaration in ThinLTOCodeGenerator.h?
I dont mind removing codege(). This interface exists since the first prototype and no longer exposed through C API. It seems to have the same model of optimize(), which is also not thread safe. optimize() is still used by llvm-lto but not in thread context.
I don't think we need another instance of TMBuilder. Can we just call codegenModule directly from run()? TMBuilder should be initialized already from addModule.
Aug 23 2018
I feel like this is a much tricky situation than just new and init. Following example is the same situation.
__attribute__((objc_root_class)) @interface NSObject - (void) foo; - (void) bar; @end
Jul 31 2018
Can you add a bit more explanation other than just saying fixing PR38372?
Jul 20 2018
For the old API, I don't think it is reasonable to expect user or linker to pass in the correct preserve list. There is likely no knowledge outside the LTO modules that these lib funcs are needed.
Jul 18 2018
Jul 16 2018
When importing a variable definition when the ref has this bit set, it can be imported as a local copy, without promoting the name/linkage type. That will avoid the need to do any modification to the optimization passes. On the exporting side, we could do prevent the promotion if we knew that all modules importing a reference also imported the referenced variable definition. It does however look like we should be importing all non-interposable linkage constant variables that are referenced, which should be all we care about for this anyway.
Jul 10 2018
Jul 9 2018
Jul 6 2018
Add testcase using 6.0 bitcode.
Address review feedback
oops, accidentally opened a new review. closing.
In that case, we can enable verification on checked-in bitcode files as a follow-up. How about testing this by round-tripping textual IR through llvm-as and llvm-dis? You just need a function, alias, and global var with local linkage and without dso_local set, right?
Jul 2 2018
It is easier and cleaner if I just fold everything into getOSVersion.
handle *-apple-macosx target option
Rebase the commit correctly
Update patch. Use a better API.
Unfortunately, I wasn't able to write a test for this because the host triple in the configuration can either be x86_64-apple-darwin* or x86_64-apple-macosx*, but the one used passed by driver is always macosx one. I can't reliably compare those two.
Jun 29 2018
Does the iteration order of those map matters other than changing the hash? Will it change symbol resolution or importing different function?
Jun 22 2018
Jun 13 2018
Jun 11 2018
I am not working on lld but this looks good for me. I like this solution better than the alternative you mentioned.
May 23 2018
May 14 2018
I think it is easier to unregister all the signal handlers in the beginning of the llvm_shutdown() since you should be done with all the work when you call llvm_shutdown(). This can also allow safe access ManagedStatics in signal handler, which I don't know if we have more of those other than the lock you are trying to fix. The only difference might be that if an interrupt is triggered when freeing ManagedStatics, llvm signal handler will not be used.
May 10 2018
Are you planning to upstream the module pass to justify this to be part of Support library?
Apr 23 2018
Thanks for working on this Jonas. Duncan and Adrian has already covered pretty much all I want to say. A small additional comments.
Apr 19 2018
Apr 18 2018
Address review feedback
Apr 16 2018
Address review feedback
Address review feedback. Fix typos and comments.
Thanks for reviewing Erik!
Apr 10 2018
Apr 9 2018
Mar 30 2018
LGTM with some feedback inline.
Mar 21 2018
I am not trying to discuss which english word is best here. My point is simply:
- macros are evaluated during compile time
- "host"means either the platform you compiled on during compile time or the platform you run on during the runtime
- __is_host_* is not a good name, because it is misleading as it either implies "runtime" as a compile-time constant, or indicates the wrong platform.
It is not about matching command line name to builtin marco name. "target" is the platform we are compiling for, whether it is host or device or something else. It is a different concept when you talking about cross-compiling, which "target" is strictly not host and "build" or "host" doesn't matter to compiler at all.
I disagree. I think "target" is the correct name, even for cross compiling. For something compiled with -target foo, we are consistent calling it "target" during compile time. It only becomes appropriate to call it "host" during the runtime of the executable. There is no such concept as "host" when you are doing cross compiling.
Mar 19 2018
Mar 15 2018
If we all agree that dropping local_unnamed_addr is invalid, I can abandon this. Thanks for the feedback!
I might have missed something. Can you be more specific about how it is going to work?
The solution is to use canBeOmittedFromSymbolTable from include/llvm/Object/IRSymtab.h.
The symbol table is computed earlier and so the above predicate still returns 1. Your examples work with lld and ThinLTO if you want to check the implementation details.
So the original of this patch is thinLTO is promoting linkonce_odr to weak_odr. Think the following two situations:
Mar 13 2018
Additional comment, I didn't realize llvm-nm now prioritize to print bitcode symbol table, rather than the symbol table from the object file. There should be an option to choose which one to see and maybe also an option to see both.
Thanks for fixing this. LGTM.
Mar 1 2018
The idea is to prevent LTO (ConstMerge pass) from merging global constants that has the same value, which has the same side-effect as linker merging two weak symbols that has ODR violation.
Feb 28 2018
LGTM. And yes, order doesn't matter.