summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Change ModuleLinker to take a set of GlobalValues to import instead of a ↵Mehdi Amini2015-12-024-8/+15
| | | | | | | | | | | | single one For efficiency reason, when importing multiple functions for the same Module, we can avoid reparsing it every time. Differential Revision: http://reviews.llvm.org/D15102 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 254486
* clang/test/Driver/crash-report-modules.m: Avoid using /tmp/.NAKAMURA Takumi2015-12-021-5/+5
| | | | | | Temporary directories should be controlled with $LIT_PRESERVES_TMP. llvm-svn: 254485
* [libFuzzer] add a test that is built with -fsanitize-coverage=trace-bbKostya Serebryany2015-12-022-0/+22
| | | | llvm-svn: 254484
* [sanitizer coverage] when adding a bb trace instrumentation, do it instead, ↵Kostya Serebryany2015-12-021-5/+7
| | | | | | not in addition to, regular coverage. Do the regular coverage in the run-time instead llvm-svn: 254483
* [sanitizer coverage] when adding a bb trace instrumentation, do it instead, ↵Kostya Serebryany2015-12-021-15/+10
| | | | | | not in addition to, regular coverage. Do the regular coverage in the run-time instead llvm-svn: 254482
* [sanitizer coverage] document -fsanitize-coverage=trace-bbKostya Serebryany2015-12-021-0/+7
| | | | llvm-svn: 254481
* [X86] Fix a think-o when checking if the eflags needs to be preserved.Quentin Colombet2015-12-021-1/+7
| | | | llvm-svn: 254480
* Modify FunctionImport to take a callback to load modulesMehdi Amini2015-12-022-13/+29
| | | | | | | | | | | | When linking static archive, there is no individual module files to load. Instead they can be mmap'ed and could be initialized from a buffer directly. The callback provide flexibility to override the scheme for loading module from the summary. Differential Revision: http://reviews.llvm.org/D15101 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 254479
* [X86] Make sure the prologue does not clobber EFLAGS when it lives accross it.Quentin Colombet2015-12-022-43/+139
| | | | | | | | This is a superset of the fix done in r254448. This fixes PR25607. llvm-svn: 254478
* Force test to a target that supports thread_localMatthias Braun2015-12-021-1/+1
| | | | | | This should fix darwin bots. llvm-svn: 254477
* Added support for -gmodule debugging when debug info is left in the .o files ↵Greg Clayton2015-12-0222-178/+1140
| | | | | | | | | | | | | | | | | | | | on Darwin. This is done by finding the types that are forward declarations that come from a module, and loading that module's debug info in a separate lldb_private::Module, and copying the type over into the current module using a ClangASTImporter object. ClangASTImporter objects are already used to copy types from on clang::ASTContext to another for expressions so the type copying code has been around for a while. A new FindTypes variant was added to SymbolVendor and SymbolFile: size_t SymbolVendor::FindTypes (const std::vector<CompilerContext> &context, bool append, TypeMap& types); size_t SymbolVendor::FindTypes (const std::vector<CompilerContext> &context, bool append, TypeMap& types); The CompilerContext is a way to represent the exact context of a type and pass it through an agnostic API boundary so that we can find that exact context elsewhere in another file. This was required here because we can have a module that has submodules, both of which have a "foo" type. I am not able to add tests for this yet as we currently don't build our C/C++/ObjC binaries with the clang binary that we build. There are some driver issues where it can't find the header files for the C and C++ standard library which makes compiling these tests hard. We can't also guarantee that if we are building with clang that it supporst the exact format of -gmodule debugging that we are trying to test. We have had other versions of clang that had a different implementation of -gmodule debugging that we are no longer supporting, so we can't enable tests if we are building with clang without compiling something and looking at the structure of the DWARF that was generated to ensure that it is the format we can actually use. llvm-svn: 254476
* AArch64: fix 128-bit shiftsTim Northover2015-12-022-70/+97
| | | | | | | | | | | | | | We mustn't introduce a shift of exactly 64-bits for any inputs, since that's an UNDEF value (and worse, it's not what you want with the natural Arch64 implementation). The generated code is pretty horrific, but I couldn't come up with an obviously better alternative (if the amount is constant EXTR could help). Turns out 128-bit shifts are just nasty. rdar://22491037 llvm-svn: 254475
* Use default member initializers.Rafael Espindola2015-12-011-4/+3
| | | | llvm-svn: 254473
* builtins: Fix the sysroot's reference to si_int in int_types.hSumanth Gundapaneni2015-12-011-0/+4
| | | | | | | | | | | | si_int is already defined in sysroot's siginfo.h emutls.c includes pthread.h which includes asm/siginfo.h which in turn includes asm-generic/siginfo.h and that defines si_int. si_int is also defined in builtin's int_types.h and this leads to errors. This patch fixes the issue by undefining the si_int in int_types.h Differential Revision: http://reviews.llvm.org/D15086 llvm-svn: 254472
* Define member operator deleteXinliang David Li2015-12-011-0/+1
| | | | | | | | | | For the struct with trailing objects, define a member operator delete. Without this, the program will fail when -fsized-deallocation option is used where the wrong size will be passed to the global delete operator. llvm-svn: 254471
* builtins: Build emutls.c on MINGW buildsSumanth Gundapaneni2015-12-011-1/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D15083 llvm-svn: 254470
* AMDGPU: Error on addrspacecasts that aren't actually implementedMatt Arsenault2015-12-013-56/+73
| | | | llvm-svn: 254469
* AMDGPU: Implement isNoopAddrSpaceCastMatt Arsenault2015-12-013-0/+79
| | | | llvm-svn: 254468
* Fix the RUN on UBSAN unit testsSumanth Gundapaneni2015-12-012-2/+2
| | | | | | | | | For the build set up which runs the unit tests using an emulator like QEMU, the unit tests must be run using %run. Differential Revision: http://reviews.llvm.org/D15081 llvm-svn: 254467
* Remove unnecessary getter.Rafael Espindola2015-12-011-4/+1
| | | | llvm-svn: 254466
* Pass down the dst GV to linkGlobalValueBody. NFC.Rafael Espindola2015-12-011-9/+7
| | | | llvm-svn: 254465
* docs: Add design documentation for forward-edge CFI for indirect calls.Peter Collingbourne2015-12-011-3/+88
| | | | llvm-svn: 254464
* Fix a bug in IfConversion.cpp.Cong Hou2015-12-011-3/+2
| | | | | | | | The bug is introduced in r254377 which failed some tests on ARM, where a new probability is assigned to a successor but the provided BB may not be a successor. llvm-svn: 254463
* ARM: Change ArchCheck field to uint64_tMatthias Braun2015-12-011-1/+1
| | | | | | | | The values in this field are compared against getAvailableFeatures() which returns an uint64_t. This was causing problems in an internal branch. llvm-svn: 254462
* [ELF] MIPS paired R_MIPS_HI16/LO16 relocations supportSimon Atanasyan2015-12-016-21/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some MIPS relocations including `R_MIPS_HI16/R_MIPS_LO16` use combined addends. Such addend is calculated using addends of both paired relocations. Each `R_MIPS_HI16` relocation is paired with the next `R_MIPS_LO16` relocation. ABI requires to compute such combined addend in case of REL relocation record format only. For details see p. 4-17 at ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf This patch implements lookup of the next paired relocation suing new `InputSectionBase::findPairedRelocLocation` method. The primary disadvantage of this approach is that we put MIPS specific logic into the common code. The next disadvantage is that we lookup `R_MIPS_LO16` for each `R_MIPS_HI16` relocation, while in fact multiple `R_MIPS_HI16` might be paired with the single `R_MIPS_LO16`. From the other side this way allows us to keep `MipsTargetInfo` class stateless and implement later relocation handling in parallel. This patch does not support `R_MIPS_HI16/R_MIPS_LO16` relocations against `_gp_disp` symbol. In that case the relocations use a special formula for the calculation. That will be implemented later. Differential Revision: http://reviews.llvm.org/D15112 llvm-svn: 254461
* [Sanitizer] Increase kPcThreshold in slow unwinder after r254395.Alexey Samsonov2015-12-011-1/+1
| | | | llvm-svn: 254460
* AMDGPU: Disallow flat_scr in SI assemblerMatt Arsenault2015-12-012-3/+52
| | | | llvm-svn: 254459
* [PGO] Add support for reading multiple versions of indexed profile format ↵Xinliang David Li2015-12-013-50/+70
| | | | | | | | | | | profile data Profile readers using incompatible on-disk hash table format can now share the same implementation and interfaces. Differential Revision: http://reviews.llvm.org/D15100 llvm-svn: 254458
* Delete unused includes.Rafael Espindola2015-12-011-9/+0
| | | | llvm-svn: 254457
* IR: Clean up some duplicated code in ConstantDataSequential creation. NFCJustin Bogner2015-12-011-136/+57
| | | | | | | | ConstantDataArray::getImpl and ConstantDataVector::getImpl had a lot of copy pasta in how they handled sequences of constants. Break that out into a couple of simple functions. llvm-svn: 254456
* Clang-format an 80-column violation.Adrian Prantl2015-12-011-2/+6
| | | | llvm-svn: 254455
* clang-format LinkModules.cpp.Rafael Espindola2015-12-011-19/+19
| | | | | | | Most of the file has been changed recently and was already clang-format clean. llvm-svn: 254454
* use range-based for loops; NFCISanjay Patel2015-12-011-12/+6
| | | | llvm-svn: 254453
* AMDGPU: Optimize VOP2 operand legalizationMatt Arsenault2015-12-013-45/+149
| | | | | | | | | | | | | | | | | | Don't use commuteInstruction, and don't commute if doing so will not improve legality. Skip the more complex checks for literal operands and constant bus restrictions, which are not a concern for VOP2 instructions because src1 does not accept SGPRs or constants and few implicitly read vcc. This gets called quite a few times and the attempts at commuting are a significant fraction of the time spent in SIFixSGPRCopies, so it's somewhat worthwhile to optimize. With this patch and others leading up to it, this reduces the compile time of SIFixSGPRCopies on some of the LuxMark 2 kernels from ~8ms to ~5ms on my system. llvm-svn: 254452
* Add an accessor to Decl::LoadedFieldsFromExternalStorage for LLDB.Adrian Prantl2015-12-011-1/+4
| | | | | | | Patch by Greg Clayton Reviewed by Doug Gregor llvm-svn: 254451
* Update for llvm api change.Rafael Espindola2015-12-011-1/+1
| | | | llvm-svn: 254450
* Use references now that it is natural to do so.Rafael Espindola2015-12-019-107/+101
| | | | | | | The linker never takes ownership of a module or changes which module it is refering to, making it natural to use references. llvm-svn: 254449
* [X86] Make sure the prologue does not clobber EFLAGS when it lives accross it.Quentin Colombet2015-12-012-1/+123
| | | | | | This fixes PR25629. llvm-svn: 254448
* Use nullptr (NFC)Xinliang David Li2015-12-012-2/+2
| | | | llvm-svn: 254447
* Avoid picking up system headers in unittest by providing a fake libstdc++ ↵Benjamin Kramer2015-12-011-2/+4
| | | | | | | | | with a ridiculously high version number. The host libstdc++ may be horribly broken and we want the fake one to be picked up. This workaround is lame but I don't see a better way. llvm-svn: 254446
* don't repeat function/variable names in comments; NFCSanjay Patel2015-12-011-64/+57
| | | | llvm-svn: 254445
* Fix Thumb1 epilogue generationArtyom Skrobov2015-12-012-12/+115
| | | | | | | | | | | | | | Summary: This had been broken for a very long time, but nobody noticed until D14357 enabled shrink-wrapping by default. Reviewers: jroelofs, qcolombet Subscribers: tyomitch, llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D14986 llvm-svn: 254444
* [ELF] - Fixed bug leading to miss of tls relocation when @tlsgd and ↵George Rimar2015-12-016-13/+31
| | | | | | | | | | | | | | | | | @gottpoff relocations were used at the same time. Combination of @tlsgd and @gottpoff at the same time leads to miss of R_X86_64_TPOFF64 dynamic relocation. Patch fixes that. @tlsgd(%rip) - Allocate two contiguous entries in the GOT to hold a tls index structure (for passing to tls get addr). @gottpoff(%rip) - Allocate one GOT entry to hold a variable offset in initial TLS block (relative to TLS block end, %fs:0). The same situation can be observed for x86 (probably others too, not sure) with corresponding for that target relocations: @tlsgd, @gotntpoff. Differential revision: http://reviews.llvm.org/D15105 llvm-svn: 254443
* fix typo; NFCSanjay Patel2015-12-011-1/+1
| | | | llvm-svn: 254442
* [llvm-dwp] Deduplicate strings in the debug_str.dwo sectionDavid Blaikie2015-12-012-18/+22
| | | | | | | Also, ensure that references to those strings in debug_str_offsets.dwo correctly refer to the deduplicated strings. llvm-svn: 254441
* [AArch64] Fix a corner case in BitFeild selectWeiming Zhao2015-12-012-5/+33
| | | | | | | | | | | | | | | | | Summary: When not useful bits, BitWidth becomes 0 and APInt will not be happy. See https://llvm.org/bugs/show_bug.cgi?id=25571 We can just mark the operand as IMPLICIT_DEF is none bits of it is used. Reviewers: t.p.northover, jmolloy Subscribers: gberry, jmolloy, mgrang, aemerson, llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D14803 llvm-svn: 254440
* [MS ABI] Correctly mangle nullptr member pointers for variable templatesDavid Majnemer2015-12-012-11/+18
| | | | | | | Variable templates behave the same as class templates with regard to nullptr memeber pointers. llvm-svn: 254439
* AMDGPU: Report extractelement as free in cost modelMatt Arsenault2015-12-014-0/+125
| | | | | | | | | | | | The cost for scalarized operations is computed as N * (scalar operation cost + 1 extractelement + 1 insertelement). This partially fixes inflating the cost of scalarized operations since every operation is scalarized and free. I don't think we want any cost asociated with scalarization, but for now insertelement is still counted. I'm not sure if we should pretend that insertelement is also free, or add a way to compute a custom scalarization cost. llvm-svn: 254438
* [Verifier] Improve error for cross-module refsKeno Fischer2015-12-012-3/+57
| | | | | | | | | | | | | | By including the module name in the error message. This makes the error message much more useful and saves a trip to the debugger. Reviewers: dexonsmith Subscribers: dexonsmith, llvm-commits Differential Revision: http://reviews.llvm.org/D14473 llvm-svn: 254437
* Delete dead code.Rafael Espindola2015-12-012-6/+0
| | | | llvm-svn: 254436
OpenPOWER on IntegriCloud