- Mar 01, 2017
-
-
Martell Malone authored
Differential Revision: https://reviews.llvm.org/D29445 llvm-svn: 296542
-
- Feb 14, 2017
-
-
Rui Ueyama authored
llvm-svn: 295031
-
- Feb 13, 2017
-
-
Davide Italiano authored
Differential Revision: https://reviews.llvm.org/D29878 llvm-svn: 294971
-
- Feb 03, 2017
-
-
Bob Haarman authored
Summary: llvm/CodeGen/CommandFlags.h a utility function InitTargetOptionsFromCodeGenFlags which is used to set target options from flags based on the command line. The command line flags are stored in globals defined in the same file, and including the file in multiple places causes the globals to be defined multiple times, leading to linker errors. This change adds a single place in lld where these globals are defined and exports only the utility function. This makes it possible to call InitTargetOptionsFromCodeGenFlags from multiple places in lld, which a follow-up change will do. Reviewers: davide, ruiu Reviewed By: davide, ruiu Subscribers: mgorny Differential Revision: https://reviews.llvm.org/D29058 llvm-svn: 293965
-
- Feb 01, 2017
-
-
Peter Smith authored
Thunks are now implemented by redirecting the relocation to the symbol S, to a symbol TS in a Thunk. The Thunk will transfer control to S. This has the following implications: - All the side-effects of Thunks happen within createThunks() - Thunks are no longer stored in InputSections and Symbols no longer need to hold a pointer to a Thunk - The synthetic Thunk sections need to be merged into OutputSections This implementation is almost a direct conversion of the existing Thunks with the following exceptions: - Mips LA25 Thunks are placed before the InputSection that defines the symbol that needs a Thunk. - All ARM Thunks are placed at the end of the OutputSection of the first caller to the Thunk. Range extension Thunks are not supported yet so it is optimistically assumed that all Thunks can be reused. This is a recommit of r293283 with a fixed comparison predicate as std::merge requires a strict weak ordering. Differential revision: https://reviews.llvm.org/D29327 llvm-svn: 293757
-
- Jan 28, 2017
-
-
Rui Ueyama authored
This reverts commit r293283 because it broke MSVC build. llvm-svn: 293352
-
- Jan 27, 2017
-
-
Peter Smith authored
Thunks are now implemented by redirecting the relocation to the symbol S, to a symbol TS in a Thunk. The Thunk will transfer control to S. This has the following implications: - All the side-effects of Thunks happen within createThunks() - Thunks are no longer stored in InputSections and Symbols no longer need to hold a pointer to a Thunk - The synthetic Thunk sections need to be merged into OutputSections This implementation is almost a direct conversion of the existing Thunks with the following exceptions: - Mips LA25 Thunks are placed before the InputSection that defines the symbol that needs a Thunk. - All ARM Thunks are placed at the end of the OutputSection of the first caller to the Thunk. Range extension Thunks are not supported yet so it is optimistically assumed that all Thunks can be reused. Differential Revision: https://reviews.llvm.org/D29129 llvm-svn: 293283
-
- Jan 26, 2017
-
-
Peter Collingbourne authored
Now we never append a number to the file name for task ID 0. This is similar to r293132 in the gold plugin. llvm-svn: 293138
-
- Jan 12, 2017
-
-
Rui Ueyama authored
Now we have the consistent interface for all log/warn/error/fatal functions. llvm-svn: 291847
-
- Jan 04, 2017
-
-
Peter Smith authored
In a shared library an undefined symbol is implicitly imported. If the symbol is called as a function a PLT entry is generated for it. When the caller is a Thumb b.w a thunk to the PLT entry is needed as all PLT entries are in ARM state. This change allows undefined symbols to have thunks in the same way that shared symbols may have thunks. llvm-svn: 290951
-
- Nov 29, 2016
-
-
Rui Ueyama authored
StringRefZ is a class to represent a null-terminated string. String length is computed lazily, so it's more efficient than StringRef to represent strings in string table. The motivation of defining this new class is to merge functions that only differ in string types; we have many constructors that takes `const char *` or `StringRef`. With StringRefZ, we can merge them. Differential Revision: https://reviews.llvm.org/D27037 llvm-svn: 288172
-
- Nov 26, 2016
-
-
Davide Italiano authored
llvm-svn: 287967
-
- Nov 22, 2016
-
-
Davide Italiano authored
Now that lld switched to lib/LTO, which always calls setDataLayout(), we don't need this check anymore. Thanks to Peter for pointing out! llvm-svn: 287699
-
- Nov 11, 2016
-
-
Mehdi Amini authored
This would trigger an assertion at runtime otherwise. Differential Revision: https://reviews.llvm.org/D26482 llvm-svn: 286562
-
- Nov 05, 2016
-
-
Rui Ueyama authored
Previously, we do this piece of code to iterate over all input sections. for (elf::ObjectFile<ELFT> *F : Symtab.getObjectFiles()) for (InputSectionBase<ELFT> *S : F->getSections()) It turned out that this mechanisms doesn't work well with synthetic input sections because synthetic input sections don't belong to any input file. This patch defines a vector that contains all input sections including synthetic ones. llvm-svn: 286051
-
Eugene Zelenko authored
Differential revision: https://reviews.llvm.org/D26320 llvm-svn: 286030
-
- Oct 28, 2016
-
-
Rui Ueyama authored
Previously, we have a lot of BumpPtrAllocators, but all these allocators virtually have the same lifetime because they are not freed until the linker finishes its job. This patch aggregates them into a single allocator. Differential revision: https://reviews.llvm.org/D26042 llvm-svn: 285452
-
- Oct 26, 2016
-
-
Rafael Espindola authored
We used to have one allocator per file, which reduces the advantage of using an allocator in the first place. This is a small speed up is most cases. The largest speedup was in 1.014X in chromium no-gc. The largest slowdown was scylla at 1.003X. llvm-svn: 285205
-
- Oct 20, 2016
-
-
George Rimar authored
llvm-svn: 284705
-
- Oct 11, 2016
-
-
Davide Italiano authored
Differential Revision: https://reviews.llvm.org/D25452 llvm-svn: 283817
-
- Oct 10, 2016
-
-
Davide Italiano authored
Before the default was whatever number hardware_concurrency() returned. Users can specify the number of threads via --lto-jobs=X option. llvm-svn: 283787
-
- Sep 30, 2016
-
-
Rui Ueyama authored
Because LTO::run doesn't change HasError, it doesn't make sense to check that value. llvm-svn: 282801
-
Rui Ueyama authored
llvm-svn: 282795
-
- Sep 29, 2016
-
-
Rui Ueyama authored
We have a few "check" functions in Error.h. All of them are to check for an error and strip an error object if there was no error, except "void check(Error E)", which doesn't return anything. This patch renames it and moves it to the .cpp file where it is used. llvm-svn: 282764
-
Rui Ueyama authored
It's better because it's a verb. llvm-svn: 282763
-
Rui Ueyama authored
llvm-svn: 282668
-
Davide Italiano authored
llvm-svn: 282662
-
Davide Italiano authored
Differential Revision: https://reviews.llvm.org/D24492 llvm-svn: 282656
-
- Sep 24, 2016
-
-
Davide Italiano authored
I found out this wasn't tested when looking at Vedant's coverage bot numbers, so, thanks to him. While I'm here, switch the error message to be lld-compliant (first letter lowercase). llvm-svn: 282335
-
- Sep 14, 2016
-
-
Rui Ueyama authored
Previously, all input files were owned by the symbol table. Files were created at various places, such as the Driver, the lazy symbols, or the bitcode compiler, and the ownership of new files was transferred to the symbol table using std::unique_ptr. All input files were then free'd when the symbol table is freed which is on program exit. I think we don't have to transfer ownership just to free all instance at once on exit. In this patch, all instances are automatically collected to a vector and freed on exit. In this way, we no longer have to use std::unique_ptr. Differential Revision: https://reviews.llvm.org/D24493 llvm-svn: 281425
-
- Aug 31, 2016
-
-
Rafael Espindola authored
Before this lld was always creating common symbols itself. It worked, but prevented them from being internalized when possible. Now it preserves common symbols is the bitcode and they are internalized. Fixes pr30184. llvm-svn: 280242
-
Rafael Espindola authored
Given that we almost always want to handle it as DefinedRegular, just use DefinedRegular. llvm-svn: 280226
-
Davide Italiano authored
llvm-svn: 280224
-
- Aug 30, 2016
-
-
Davide Italiano authored
Differential Revision: https://reviews.llvm.org/D24037 llvm-svn: 280144
-
- Jul 17, 2016
-
-
Rui Ueyama authored
Previously, each subclass of SymbolBody had a pointer to a source file from which it was created. So, there was no single way to get a source file for a symbol. We had getSourceFile<ELFT>(), but the function was a bit inconvenient as it's a template. This patch makes SymbolBody have a pointer to a source file. If a symbol is not created from a file, the pointer has a nullptr. llvm-svn: 275701
-
- Jul 16, 2016
-
-
Rui Ueyama authored
llvm-svn: 275694
-
- Jul 15, 2016
-
-
Rui Ueyama authored
Differential Revision: https://reviews.llvm.org/D22396 llvm-svn: 275526
-
Rui Ueyama authored
llvm-svn: 275524
-
Rui Ueyama authored
llvm-svn: 275523
-
Rui Ueyama authored
This patch corresponds to r275511 for COFF. llvm-svn: 275521
-