summaryrefslogtreecommitdiff
path: root/lld/test/COFF/thinlto.ll
AgeCommit message (Collapse)Author
2025-02-10[lld] Remove usage of `%T` in `lld/test` (#126133)Peter Rong
`%T` is not unique and deprecated [[1](https://llvm.org/docs/CommandGuide/lit.html#substitutions)]. This patch replaces all `%T` in `lld/test` with `%t.dir` (`mkdir` if necessary) --------- Signed-off-by: Peter Rong <PeterRong@meta.com>
2022-11-22Reland "[LTO][COFF] Use bitcode file names in lto native object file names."Zequan Wu
This reverts commit 34108082947c964ae9bbfcd9808f2fd31c0d672f with fixes.
2022-11-23Revert "Reland "[LTO][COFF] Use bitcode file names in lto native object file ↵Roman Lebedev
names."" Breaks build of LLVMgold here: ``` /repositories/llvm-project/llvm/tools/gold/gold-plugin.cpp:1108:19: error: no matching function for call to 'localCache' Cache = check(localCache("ThinLTO", "Thin", options::cache_dir, AddBuffer)); ^~~~~~~~~~ /repositories/llvm-project/llvm/include/llvm/Support/Caching.h:72:21: note: candidate function not viable: no known conversion from '(lambda at /repositories/llvm-project/llvm/tools/gold/gold-plugin.cpp:1102:20)' to 'llvm::AddBufferFn' (aka 'function<void (unsigned int, const llvm::Twine &, std::unique_ptr<MemoryBuffer>)>') for 4th argument Expected<FileCache> localCache( ^ /repositories/llvm-project/llvm/tools/gold/gold-plugin.cpp:1110:18: error: no viable conversion from '(lambda at /repositories/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20)' to 'llvm::AddStreamFn' (aka 'function<Expected<std::unique_ptr<CachedFileStream>> (unsigned int, const llvm::Twine &)>') check(Lto->run(AddStream, Cache)); ^~~~~~~~~ /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_function.h:375:7: note: candidate constructor not viable: no known conversion from '(lambda at /repositories/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20)' to 'std::nullptr_t' for 1st argument function(nullptr_t) noexcept ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_function.h:386:7: note: candidate constructor not viable: no known conversion from '(lambda at /repositories/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20)' to 'const std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream>> (unsigned int, const llvm::Twine &)> &' for 1st argument function(const function& __x) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_function.h:404:7: note: candidate constructor not viable: no known conversion from '(lambda at /repositories/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20)' to 'std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream>> (unsigned int, const llvm::Twine &)> &&' for 1st argument function(function&& __x) noexcept ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_function.h:435:2: note: candidate template ignored: requirement '_Callable<(lambda at /repositories/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20) &, (lambda at /repositories/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20), std::__invoke_result<(lambda at /repositories/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20) &, unsigned int, const llvm::Twine &>>::value' was not satisfied [with _Functor = (lambda at /repositories/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20) &] function(_Functor&& __f) ^ /repositories/llvm-project/llvm/include/llvm/LTO/LTO.h:278:25: note: passing argument to parameter 'AddStream' here Error run(AddStreamFn AddStream, FileCache Cache = nullptr); ^ ``` This reverts commit 387620aa8cea33174b6c1fb80c1af713fee732ac.
2022-11-22Reland "[LTO][COFF] Use bitcode file names in lto native object file names."Zequan Wu
This reverts commit eef5405f74ae208e3e2eb7daacecac923d7338f2.
2022-11-22Revert "[LTO][COFF] Use bitcode file names in lto native object file names."Zequan Wu
This reverts commit 531ed6d5aa65f41c6dfe2e74905d5c6c88fc95a7.
2022-11-22[LTO][COFF] Use bitcode file names in lto native object file names.Zequan Wu
Currently the lto native object files have names like main.exe.lto.1.obj. In PDB, those names are used as names for each compiland. Microsoft’s tool SizeBench uses those names to present to users the size of each object files. So, names like main.exe.lto.1.obj is not user friendly. This patch makes the lto native object file names more readable by using the bitcode file names as part of the file names. For example, if the input bitcode file has path like "path/to/foo.obj", its corresponding lto native object file path would be "path/to/main.exe.lto.foo.obj". Since the lto native object file name only bothers PDB, this patch only changes the lld-linker's behavior. Reviewed By: tejohnson, MaskRay, #lld-macho Differential Revision: https://reviews.llvm.org/D137217
2020-04-17[COFF] Assign unique identifiers to ObjFiles from LTOReid Kleckner
Use the unique filenames that are used when /lldsavetemps is passed. After this change, module names for LTO blobs in PDBs will be unique. Visual Studio and probably other debuggers expect module names to be unique. Revert some changes from 1e0b158db (2017) that are no longer necessary after removing MSVC LTO support. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D78221
2020-04-07Drop the number of thinlto jobs in some tests to avoid crashing on 32-bit ↵Hans Wennborg
windows
2020-03-27[ThinLTO] Allow usage of all hardware threads in the systemAlexandre Ganea
Before this patch, it wasn't possible to extend the ThinLTO threads to all SMT/CMT threads in the system. Only one thread per core was allowed, instructed by usage of llvm::heavyweight_hardware_concurrency() in the ThinLTO code. Any number passed to the LLD flag /opt:lldltojobs=..., or any other ThinLTO-specific flag, was previously interpreted in the context of llvm::heavyweight_hardware_concurrency(), which means SMT disabled. One can now say in LLD: /opt:lldltojobs=0 -- Use one std::thread / hardware core in the system (no SMT). Default value if flag not specified. /opt:lldltojobs=N -- Limit usage to N threads, regardless of usage of heavyweight_hardware_concurrency(). /opt:lldltojobs=all -- Use all hardware threads in the system. Equivalent to /opt:lldltojobs=$(nproc) on Linux and /opt:lldltojobs=%NUMBER_OF_PROCESSORS% on Windows. When an affinity mask is set for the process, threads will be created only for the cores selected by the mask. When N > number-of-hardware-threads-in-the-system, the threads in the thread pool will be dispatched equally on all CPU sockets (tested only on Windows). When N <= number-of-hardware-threads-on-a-CPU-socket, the threads will remain on the CPU socket where the process started (only on Windows). Differential Revision: https://reviews.llvm.org/D75153
2020-03-04Attempt to fix buildbot after 497c110eevgeny
2020-03-04[lld][ELF][COFF] Fix archived bitcode files namingevgeny
Differential revision: https://reviews.llvm.org/D75422
2019-09-10Reland "Change the X86 datalayout to add three address spacesAmy Huang
for 32 bit signed, 32 bit unsigned, and 64 bit pointers." This reverts 57076d3199fc2b0af4a3736b7749dd5462cacda5. Original review at https://reviews.llvm.org/D64931. Review for added fix at https://reviews.llvm.org/D66843. llvm-svn: 371568
2019-08-28Revert "Change the X86 datalayout to add three address spaces for 32 bit ↵Vlad Tsyrklevich
signed," This reverts commit r370083 because it caused check-lld failures on sanitizer-x86_64-linux-fast. llvm-svn: 370142
2019-08-27Change the X86 datalayout to add three address spaces for 32 bit signed,Amy Huang
32 bit unsigned, and 64 bit pointers. llvm-svn: 370083
2017-12-16[LTO] Make processing of combined module more consistentVitaly Buka
Summary: 1. Use stream 0 only for combined module. Previously if combined module was not processes ThinLTO used the stream for own output. However small changes in input, could trigger combined module and shuffle outputs making life of llvm::LTO harder. 2. Always process combined module and write output to stream 0. Processing empty combined module is cheap and allows llvm::LTO users to avoid implementing processing which is already done in llvm::LTO. Subscribers: mehdi_amini, inglorion, eraman, hiraditya Differential Revision: https://reviews.llvm.org/D41267 llvm-svn: 320905
2017-07-18[LLD] Mark a number of x86 only tests to require x86Jon Chesterfield
Noticed while testing for an out of tree target. There are probably more tests that should be so marked. I'm not sure who owns these tests so I've added a few names I recognise from the recent history. With advice from probinson, ruiu, rafael and dramatically improved by davidb. Thank you all! Differential Revision: https://reviews.llvm.org/D34685 llvm-svn: 308335
2017-02-23[COFF] added test for thinltoBob Haarman
Summary: Creates bitcode files suitable for use with ThinLTO, then checks that the linker can build an executable from them. Reviewers: ruiu, pcc Reviewed By: pcc Subscribers: mehdi_amini, Prazek, llvm-commits Differential Revision: https://reviews.llvm.org/D30277 llvm-svn: 296042