search for: thinltocodegenerator

Displaying 20 results from an estimated 25 matches for "thinltocodegenerator".

2017 Sep 07
2
[ThinLTO] static library failure with object files with the same name
Hi Johan, ld64 only calls functions from llvm/include/llvm-c/lto.h (defined in llvm/tools/lto/lto.cpp) For instance ThinLTOCodeGenerator::addModule is called through thinlto_codegen_add_module(). Apple hasn't released the code for ld64 in Xcode 9 yet, did you check if it is fixed in Xcode 9? (I think I remember fixing it in ld64 but I'm not totally sure...). >From what I can see with Xcode 8.2, the linker just passes th...
2017 Sep 11
2
[ThinLTO] static library failure with object files with the same name
...ngelen at gmail.com> wrote: > > On Thu, Sep 7, 2017 at 5:44 PM, Mehdi AMINI <joker.eph at gmail.com> wrote: > >> Hi Johan, >> >> ld64 only calls functions from llvm/include/llvm-c/lto.h (defined >> in llvm/tools/lto/lto.cpp) >> >> For instance ThinLTOCodeGenerator::addModule is called >> through thinlto_codegen_add_module(). >> >> Apple hasn't released the code for ld64 in Xcode 9 yet, did you check if >> it is fixed in Xcode 9? >> (I think I remember fixing it in ld64 but I'm not totally sure...). >> > > I h...
2017 Sep 06
3
[ThinLTO] static library failure with object files with the same name
...;> > Right, per the bug this is fixed in lld (and was already handled in >> > gold-plugin), but I guess not in ld64. Note that lld and gold-plugin use the >> > new LTO API, while ld64 (and probably other linkers) are still using the >> > legacy libLTO (which is what ThinLTOCodeGenerator.cpp is part of). Fixing it >> > in the location you propose could work for all legacy libLTO users. But I >> > don't think that adding just the size will (always) be enough to >> > disambiguate (couldn't the 2 same named members have the same size?) - >> &gt...
2017 Sep 05
2
[ThinLTO] static library failure with object files with the same name
...ed with LDC, not clang, but that shouldn't matter). When linking to that static library, I get the error: Assertion failed: (ModuleMap.find(ModuleBuffer.getBufferIdentifier()) == ModuleMap.end() && "Expect unique Buffer Identifier"), function generateModuleMap, file ../lib/LTO/ThinLTOCodeGenerator.cpp, line 138. The error occurs because the buffer identifier uses the filename of the objects inside the archive, and those are identical for the two files with different source path. This problem appears to be fixed for LLD here: https://reviews.llvm.org/D25495 https://bugs.llvm.org/show_bug.cg...
2017 Sep 17
2
[ThinLTO] static library failure with object files with the same name
...2017 at 5:44 PM, Mehdi AMINI <joker.eph at gmail.com> wrote: >>> >>>> Hi Johan, >>>> >>>> ld64 only calls functions from llvm/include/llvm-c/lto.h (defined >>>> in llvm/tools/lto/lto.cpp) >>>> >>>> For instance ThinLTOCodeGenerator::addModule is called >>>> through thinlto_codegen_add_module(). >>>> >>>> Apple hasn't released the code for ld64 in Xcode 9 yet, did you check >>>> if it is fixed in Xcode 9? >>>> (I think I remember fixing it in ld64 but I'm not...
2017 Sep 18
2
[ThinLTO] static library failure with object files with the same name
...> wrote: >>>>> >>>>>> Hi Johan, >>>>>> >>>>>> ld64 only calls functions from llvm/include/llvm-c/lto.h (defined >>>>>> in llvm/tools/lto/lto.cpp) >>>>>> >>>>>> For instance ThinLTOCodeGenerator::addModule is called >>>>>> through thinlto_codegen_add_module(). >>>>>> >>>>>> Apple hasn't released the code for ld64 in Xcode 9 yet, did you check >>>>>> if it is fixed in Xcode 9? >>>>>> (I think I rem...
2017 Sep 18
0
[ThinLTO] static library failure with object files with the same name
...t gmail.com> >>>> wrote: >>>> >>>>> Hi Johan, >>>>> >>>>> ld64 only calls functions from llvm/include/llvm-c/lto.h (defined >>>>> in llvm/tools/lto/lto.cpp) >>>>> >>>>> For instance ThinLTOCodeGenerator::addModule is called >>>>> through thinlto_codegen_add_module(). >>>>> >>>>> Apple hasn't released the code for ld64 in Xcode 9 yet, did you check >>>>> if it is fixed in Xcode 9? >>>>> (I think I remember fixing it in l...
2017 Sep 05
2
[ThinLTO] static library failure with object files with the same name
...google.com> wrote: > > Hi Johan, > > Right, per the bug this is fixed in lld (and was already handled in gold-plugin), but I guess not in ld64. Note that lld and gold-plugin use the new LTO API, while ld64 (and probably other linkers) are still using the legacy libLTO (which is what ThinLTOCodeGenerator.cpp is part of). Fixing it in the location you propose could work for all legacy libLTO users. But I don't think that adding just the size will (always) be enough to disambiguate (couldn't the 2 same named members have the same size?) - although lld is doing the same thing so this may be as...
2017 May 03
2
[LTO] -time-passes and libLTO
...re > of to clean up this state. > > In the short term, adding a way to print and reset the counters and call it at the end of the LTO process seems like a good immediate tradeoff to me. We're kind of doing it with statistics already: https://llvm.org/svn/llvm-project/llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp (look at the very end of the file) > Perhaps this timing stuff should live in the LLVMContext instead? And > then you get timing-per-LLVMContext? > This last suggestion is my favorite answer by far! I've been talking with Matthias about doing this for statistic as well: having...
2018 Mar 22
4
[pre-RFC] Data races in concurrent ThinLTO processes
...t processes. I wanted to point out these problems and start the discussion about potential solutions. I would like to get your feedback. Problem #1: In certain common situations, 'rename' can fail, causing a data race later on. Look at the following code in the function 'write' in ThinLTOCodeGenerator.cpp std::error_code EC = sys::fs::createTemporaryFile("Thin", "tmp.o", TempFD, TempFilename); if (EC) { errs() << "Error: " << EC.message() << "\n"; report_fatal_error("ThinLTO: Can't get a temporary file"); } { raw_fd...
2018 Mar 27
2
[pre-RFC] Data races in concurrent ThinLTO processes
...ed to point out these problems and start the discussion > about potential solutions. I would like to get your feedback. > > > *Problem #1: In certain common situations, ‘rename’ can fail, causing a > data race later on.* > Look at the following code in the function ‘write’ in > ThinLTOCodeGenerator.cpp > > *std::error_code EC =* > * sys::fs::createTemporaryFile("Thin", "tmp.o", TempFD, TempFilename);* > *if (EC) {* > * errs() << "Error: " << EC.message() << "\n";* > * report_fatal_error("ThinLTO: Can't get...
2018 Mar 22
0
[pre-RFC] Data races in concurrent ThinLTO processes
...esses. I wanted to point out these problems and start the discussion about potential solutions. I would like to get your feedback. > > > Problem #1: In certain common situations, ‘rename’ can fail, causing a data race later on. > Look at the following code in the function ‘write’ in ThinLTOCodeGenerator.cpp > > std::error_code EC = > sys::fs::createTemporaryFile("Thin", "tmp.o", TempFD, TempFilename); > if (EC) { > errs() << "Error: " << EC.message() << "\n"; > report_fatal_error("ThinLTO: Can't get a temp...
2018 Mar 27
0
[pre-RFC] Data races in concurrent ThinLTO processes
...to point out these problems and start the discussion about potential solutions. I would like to get your feedback. >> >> >> Problem #1: In certain common situations, ‘rename’ can fail, causing a data race later on. >> Look at the following code in the function ‘write’ in ThinLTOCodeGenerator.cpp >> >> std::error_code EC = >> sys::fs::createTemporaryFile("Thin", "tmp.o", TempFD, TempFilename); >> if (EC) { >> errs() << "Error: " << EC.message() << "\n"; >> report_fatal_error("ThinL...
2017 Jun 20
2
JIT, LTO and @llvm.global_ctors: Looking for advise
...if the destination module already contained a definition for that variable and wouldn't be imported otherwiseŠ My local fix ensures that it correctly gets imported in both cases. You are right; ThinLTO no longer uses the Linker class. I was able to remove the useless include of Linker.h from ThinLTOCodeGenerator.cpp. That being said, Linker.h and LinkModules.cpp still have a few comments about ThinLTO, namely: /// \brief Link \p Src into the composite. /// /// Passing OverrideSymbols as true will have symbols from Src /// shadow those in the Dest. /// For ThinLTO function importing/exporting t...
2018 Mar 27
1
[pre-RFC] Data races in concurrent ThinLTO processes
...between different processes. I wanted to point out these problems and start the discussion about potential solutions. I would like to get your feedback. Problem #1: In certain common situations, ‘rename’ can fail, causing a data race later on. Look at the following code in the function ‘write’ in ThinLTOCodeGenerator.cpp std::error_code EC = sys::fs::createTemporaryFile("Thin", "tmp.o", TempFD, TempFilename); if (EC) { errs() << "Error: " << EC.message() << "\n"; report_fatal_error("ThinLTO: Can't get a temporary file"); } { raw_fd...
2018 Mar 27
4
[pre-RFC] Data races in concurrent ThinLTO processes
...between different processes. I wanted to point out these problems and start the discussion about potential solutions. I would like to get your feedback. Problem #1: In certain common situations, ‘rename’ can fail, causing a data race later on. Look at the following code in the function ‘write’ in ThinLTOCodeGenerator.cpp std::error_code EC = sys::fs::createTemporaryFile("Thin", "tmp.o", TempFD, TempFilename); if (EC) { errs() << "Error: " << EC.message() << "\n"; report_fatal_error("ThinLTO: Can't get a temporary file"); } { raw_fd...
2016 Oct 03
2
ThinLTO: module-scope inline assembly blocks
Hi all, I am trying to add ThinLTO to the LDC compiler. It seems to work well on Mac (XCode 8) and Ubuntu (ld.gold + LLVMgold plugin). However, I am running into trouble with module-scope inline assembly blocks. I have a module ASM with a function `foo` defined in an inline assembly block (and an LLVM IR `declare @foo()` for it). There is also a "normal" function `void
2018 Mar 27
0
[pre-RFC] Data races in concurrent ThinLTO processes
...e problems and start the discussion > about potential solutions. I would like to get your feedback. > > > > > > *Problem #1: In certain common situations, ‘rename’ can fail, causing a > data race later on.* > > Look at the following code in the function ‘write’ in > ThinLTOCodeGenerator.cpp > > > > *std::error_code EC =* > > * sys::fs::createTemporaryFile("Thin", "tmp.o", TempFD, TempFilename);* > > *if (EC) {* > > * errs() << "Error: " << EC.message() << "\n";* > > * report_fatal_erro...
2018 Mar 27
2
[pre-RFC] Data races in concurrent ThinLTO processes
...between different processes. I wanted to point out these problems and start the discussion about potential solutions. I would like to get your feedback. Problem #1: In certain common situations, ‘rename’ can fail, causing a data race later on. Look at the following code in the function ‘write’ in ThinLTOCodeGenerator.cpp std::error_code EC = sys::fs::createTemporaryFile("Thin", "tmp.o", TempFD, TempFilename); if (EC) { errs() << "Error: " << EC.message() << "\n"; report_fatal_error("ThinLTO: Can't get a temporary file"); } { raw_fd...
2018 Mar 27
0
[pre-RFC] Data races in concurrent ThinLTO processes
...esses. I wanted to point out these problems and start the discussion about potential solutions. I would like to get your feedback. > > > Problem #1: In certain common situations, ‘rename’ can fail, causing a data race later on. > Look at the following code in the function ‘write’ in ThinLTOCodeGenerator.cpp > > std::error_code EC = > sys::fs::createTemporaryFile("Thin", "tmp.o", TempFD, TempFilename); > if (EC) { > errs() << "Error: " << EC.message() << "\n"; > report_fatal_error("ThinLTO: Can't get a temp...