summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* COFF: Fix a bug that /delayload was case-sensitive.Rui Ueyama2015-07-034-4/+4
| | | | llvm-svn: 241316
* Make corrections to r241314.Akira Hatanaka2015-07-031-4/+4
| | | | | | The return type of a function follows the signext attribute. llvm-svn: 241315
* Fix test case to appease buildbot.Akira Hatanaka2015-07-031-4/+4
| | | | | | | | | Test case trap-fnattr.cpp was failng on clang-ppc64-elf-linux2 because ppc64 sign-extends the i32 return value. This is a follow-up to r241306. llvm-svn: 241314
* COFF: Fix /base option.Rui Ueyama2015-07-035-11/+60
| | | | | | | | | | | Previously, __ImageBase symbol got a different value than the one specified by /base:<number> because the symbol was created in the SymbolTable's constructor. When the constructor is called, no command line options are processed yet, so the symbol was created always with the initial value. This caused wrong relocations and thus caused mysterious crashes of some executables linked by LLD. llvm-svn: 241313
* Fix an overly aggressive assertion in getCopyFromPartsVector.Nadav Rotem2015-07-022-2/+21
| | | | | | | | | | | The assertion in getCopyFromPartsVector assumed that the vector 'part' must match the type of argument (arguments are potentially split into multiple parts). However, in some cases the targets return a 'part' of the right size but with a different type. We already handle this case correctly later on and generate a bitcast. This commit just makes sure that we are actually checking the property that we care about. llvm-svn: 241312
* COFF: Define SymbolTable::insert to simplify. NFC.Rui Ueyama2015-07-022-22/+21
| | | | llvm-svn: 241311
* Driver: Remove the Job class. NFCJustin Bogner2015-07-027-96/+34
| | | | | | | | | | | We had a strange relationship here where we made a list of Jobs inherit from a single Job, but there weren't actually any places where this arbitrary nesting was used or needed. Simplify all of this by removing Job entirely and updating all of the users to either work with a JobList or a single Command. llvm-svn: 241310
* Driver: Don't use reserved names. NFCJustin Bogner2015-07-022-9/+7
| | | | llvm-svn: 241309
* DIBuilder: Now that DICompileUnit is distinct, stop using temporary nodesAdrian Prantl2015-07-023-48/+45
| | | | | | for the arrays. llvm-svn: 241308
* Improve the packet dumper to be able to read the target.xml so it can dump ↵Greg Clayton2015-07-021-10/+62
| | | | | | register values when disassembling the packet log. llvm-svn: 241307
* Attach attribute "trap-func-name" to call sites of llvm.trap and llvm.debugtrap.Akira Hatanaka2015-07-027-13/+62
| | | | | | | | | | | This is needed to use clang's command line option "-ftrap-function" for LTO and enable changing the trap function name on a per-call-site basis. rdar://problem/21225723 Differential Revision: http://reviews.llvm.org/D10831 llvm-svn: 241306
* Use function attribute "trap-func-name" and remove TargetOptions::TrapFuncName.Akira Hatanaka2015-07-026-18/+58
| | | | | | | | | | | | | | | | | | This commit changes normal isel and fast isel to read the user-defined trap function name from function attribute "trap-func-name" attached to llvm.trap or llvm.debugtrap instead of from TargetOptions::TrapFuncName. This is needed to use clang's command line option "-ftrap-function" for LTO and enable changing the trap function name on a per-call-site basis. Out-of-tree projects currently using TargetOptions::TrapFuncName to specify the trap function name should attach attribute "trap-func-name" to the call sites of llvm.trap and llvm.debugtrap instead. rdar://problem/21225723 Differential Revision: http://reviews.llvm.org/D10832 llvm-svn: 241305
* Add functions for adding and testing string attributes to CallInst. NFC.Akira Hatanaka2015-07-022-9/+23
| | | | | | | This change is needed later when I make changes to attach string function attributes to llvm.trap and llvm.debugtrap. llvm-svn: 241304
* UBSan: Enable runtime library tests on Windows, and get most tests passing.Peter Collingbourne2015-07-0221-59/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | Specifically: - Disable int128 tests on Windows, as MSVC cl.exe does not support int128, so we might not have been able to build the runtime with int128 support. - XFAIL the vptr tests as we lack Microsoft ABI support. - XFAIL enum.cpp as UBSan fails to add the correct instrumentation code for some reason. - Modify certain tests that build executables multiple times to use unique names for each executable. This works around a race condition observed on Windows. - Implement IsAccessibleMemoryRange for Windows to fix the last misaligned.cpp test. - Introduce a substitution for testing crashes on Windows using KillTheDoctor. Differential Revision: http://reviews.llvm.org/D10864 llvm-svn: 241303
* [WebAssembly] Set the HasFloatingPointExceptions flag for WebAssembly.Dan Gohman2015-07-021-1/+5
| | | | llvm-svn: 241302
* Try to fix the build of IntelJITEventListener.Rafael Espindola2015-07-021-7/+6
| | | | llvm-svn: 241301
* Switch users of the 'for (StmtRange range = stmt->children(); range; ↵Benjamin Kramer2015-07-0229-148/+134
| | | | | | | | | ++range)‘ pattern to range for loops. The pattern was born out of the lack of range-based for loops in C++98 and is somewhat obscure. No functionality change intended. llvm-svn: 241300
* [CodeGen] Use llvm::join to simplify string joining.Benjamin Kramer2015-07-021-8/+2
| | | | | | | While there replace stable_sort of std::string with just sort, stability is not necessary for "simple" value types. No functional change intended. llvm-svn: 241299
* Update for llvm changes.Rafael Espindola2015-07-021-3/+3
| | | | llvm-svn: 241298
* Return ErrorOr from SymbolRef::getName.Rafael Espindola2015-07-0230-168/+244
| | | | | | | | | | | | This function can really fail since the string table offset can be out of bounds. Using ErrorOr makes sure the error is checked. Hopefully a lot of the boilerplate code in tools/* can go away once we have a diagnostic manager in Object. llvm-svn: 241297
* InstrProf: Add a comment to clarify an argumentJustin Bogner2015-07-021-1/+2
| | | | llvm-svn: 241296
* COFF: Fix locally-imported symbols.Rui Ueyama2015-07-023-6/+12
| | | | | | | | Previously, pointers pointed by locally-imported symbols were broken. It has only 4 bytes although the correct size is 8 byte. This patch fixes that bug. llvm-svn: 241295
* COFF: Make symbols satisfy weak ordering.Rui Ueyama2015-07-024-10/+39
| | | | | | | | | | | | | | | | | | Previously, SymbolBody::compare(A, B) didn't satisfy weak ordering. There was a case that A < B and B < A could have been true. This is because we just pick LHS if A and B are consisdered equivalent. This patch is to make symbols being weakly ordered. If A and B are not tie, one of A < B && B > A or A > B && B < A is true. This is not an improtant property for a single-threaded environment because everything is deterministic anyways. However, in a multi- threaded environment, this property becomes important. If a symbol is defined or lazy, ties are resolved by its file index. For simple types that we don't really care about their identities, symbols are compared by their addresses. llvm-svn: 241294
* This patch adds support for the vector merge even word and vector merge odd wordKit Barton2015-07-022-0/+78
| | | | | | | | | | | | instructions introduced in POWER8. These are the Clang-related changes for http://reviews.llvm.org/D10704 All builtins are added in altivec.h and guarded with the POWER8_VECTOR macro. Phabricator review: http://reviews.llvm.org/D10736 llvm-svn: 241293
* [Static Analyzer] No longer include the full path of the source file in the ↵Gabor Horvath2015-07-021-1/+1
| | | | | | single file tests' bug identifiers. llvm-svn: 241292
* [Sema] Range-loopify SemaTemplateInstantiateDecl.cpp. NFC.Davide Italiano2015-07-021-8/+6
| | | | llvm-svn: 241291
* [PPC64LE] Remove implicit-subreg restriction from VSX swap removalBill Schmidt2015-07-022-26/+33
| | | | | | | | | | | | | | | | | In r241285, I removed the SUBREG_TO_REG restriction from VSX swap removal, determining that this was overly conservative. We have another form of the same restriction in that we check for the presence of implicit subregs in vector operations. As with SUBREG_TO_REG for partial register conversions, an implicit subreg is safe in and of itself, provided no other operation makes a lane-sensitive assumption about the result. This patch removes that restriction, by removing the HasImplicitSubreg flag and all code that relies on it. I've added a test case that fails to optimize before this patch is applied, and optimizes properly with the patch. Test based on a report from Anton Blanchard. llvm-svn: 241290
* Fix typosBruce Mitchener2015-07-027-17/+17
| | | | | | | | | | | | Summary: Fixes more typos. Reviewers: clayborg Subscribers: lldb-commits-list Differential Revision: http://reviews.llvm.org/D10898 llvm-svn: 241289
* [Statepoints] Make operator bool() explicit.Sanjoy Das2015-07-021-1/+1
| | | | | | (Addressing post-commit review.) llvm-svn: 241288
* Move PlatformFreeBSD to its own namespaceEd Maste2015-07-023-158/+164
| | | | | | Based on r233679 llvm-svn: 241287
* Remove a report_fatal_error that should be unreachable.Rafael Espindola2015-07-021-4/+1
| | | | | | If we created a relocation iterator, we have a valid relocation section. llvm-svn: 241286
* [PPC64LE] Teach swap optimization about the doubleword splat idiomBill Schmidt2015-07-022-12/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With a previous patch, the VSX swap optimization is able to recognize the doubleword load-splat idiom that can be implemented using lxvdsx. However, that does not cover a doubleword splat where the source is a register. We can implement this using xxspltd (a special form of xxpermdi). This patch teaches the swap optimization pass about this idiom. As a prerequisite, it also permits swap optimization to succeed for all forms of SUBREG_TO_REG. Previously we were conservative and only allowed SUBREG_TO_REG when it copied a full register. However, on reflection any form of SUBREG_TO_REG is safe in and of itself, so long as an unsafe operation is not performed on its result. In particular, a widening SUBREG_TO_REG often occurs as an input to a doubleword splat idiom, particularly in auto-vectorized code. The doubleword splat idiom is an XXPERMDI operation where both source registers are identical, and the selection mask is either 0 (splat the first element) or 3 (splat the second element). To determine whether the registers are identical, we use the existing mechanism for looking through "copy-like" operations. That mechanism has a side effect of marking the XXPERMDI operation as using a physical register, which would invalidate its presence in a swap-optimized region. This is correct for the form of XXPERMDI that performs a swap and hence would be removed, but is not what we want for a doubleword-splat variety of XXPERMDI. Therefore we reset the physical-register flag on the XXPERMDI when it represents a splat. A simple test case is added to verify that we generate the splat and that we also remove the xxswapd instructions that would otherwise be associated with the load and store of another operand. llvm-svn: 241285
* Convert a member variable to a local one.Rafael Espindola2015-07-021-3/+3
| | | | llvm-svn: 241284
* Reworking the test part of r241149Gabor Ballabas2015-07-024-0/+33
| | | | | | | | | The test part of r241149 has been reverted in r241451, due to misplaced test cases. This patch splits those test cases among the appropriate targets. Differential Revision: http://reviews.llvm.org/D10897 llvm-svn: 241283
* Make sure we can lookup re-exported symbols after recent changes to ↵Greg Clayton2015-07-021-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lldb_private::Symbol. Recently lldb_private::Symbol was changed so the old code: Address &Symbol::GetAddress(); Is now: Address Symbol::GetAddress(); And the Address object that is returned will be invalid for non-address based symbols. When we have re-exported symbols this code would now fail: const Address sym_address = sym_ctx.symbol->GetAddress(); if (!sym_address.IsValid()) continue; symbol_load_addr = sym_ctx.symbol->ResolveCallableAddress(*target_sp); if (symbol_load_addr == LLDB_INVALID_ADDRESS) { symbol_load_addr = sym_address.GetLoadAddress(target_sp.get()); } It used to return an Address reference to the value of the re-exported symbol that contained no section and a zero value for Address.m_offset (since the original symbol in the symbol table had a value of zero). When a reference was returned, this meant the "sym_address.IsValid()" would return true because the Address.m_offset was not LLDB_INVALID_ADDRESS, it was zero. This was working by mistake. The Symbol::ResolveCallableAddress(...) actually checks for reexported symbols and whole bunch of other cases and resolves the address correctly, so we should let it do its thing and not cut it off before it can resolve the address with the "if (!sym_address.IsValid()) continue;". llvm-svn: 241282
* Fix for PR23310: llvm-dis crashes when trying to upgrade an intrinsic.Rafael Espindola2015-07-023-3/+4
| | | | | | | | | | | | When trying to upgrade @llvm.x86.sse2.psrl.dq while parsing a module, BitcodeReader adds the function to its worklist twice, resulting in a crash when accessing it the second time. This patch replaces the worklist vector by a map. Patch by Philip Pfaffe. llvm-svn: 241281
* Handle .dynsym a bit more like we handle .symtab.Rafael Espindola2015-07-021-25/+25
| | | | | | | They have the same format and we find them in the same way, no reason to handle them differently. llvm-svn: 241280
* Rangify some loops.Rafael Espindola2015-07-021-17/+13
| | | | | | Patch by Philip Pfaffe! llvm-svn: 241279
* Fix linking issue after r241271 (dbghelp.lib was removed from default ↵Leny Kholodov2015-07-021-0/+1
| | | | | | dependencies on Windows) llvm-svn: 241278
* Use default member initializes. NFC.Rafael Espindola2015-07-021-13/+10
| | | | llvm-svn: 241277
* Remove outdated comment.Chaoren Lin2015-07-021-1/+0
| | | | llvm-svn: 241276
* Revert "Refactored ARMTargetInfo in order to use the API of ↵Rafael Espindola2015-07-021-72/+117
| | | | | | | | llvm/lib/Support/TargetParser.cpp for extracting target specific information." This reverts commit r241267. Tests were failing on the bots. llvm-svn: 241275
* [ELF] Remove dead code. NFCSimon Atanasyan2015-07-022-20/+0
| | | | llvm-svn: 241274
* clang-format: [JS] Treat regex literals like string literals.Daniel Jasper2015-07-022-0/+6
| | | | | | | Using the token type "unknown" can interfere badly with WhitespaceManager's way of handling multiline comments. llvm-svn: 241273
* Remove whitespace from start of line, NFC.Yaron Keren2015-07-021-1/+1
| | | | llvm-svn: 241272
* [Support] Lazy load of dbghlp.dll on WindowsLeny Kholodov2015-07-028-50/+55
| | | | | | | | | | | | | This patch changes linkage with dbghlp.dll for clang from static (at load time) to on demand (at the first use of required functions). Clang uses dbghlp.dll only in minor use-cases. First of all in case of crash and in case of plugin load. The dbghlp.dll library can be absent on system. In this case clang will fail to load. With lazy load of dbghlp.dll clang can work even if dbghlp.dll is not available. Differential Revision: http://reviews.llvm.org/D10737 llvm-svn: 241271
* [X86] Convert an instruction relaxation test to use objdump instead of readobjMichael Kuperstein2015-07-021-58/+64
| | | | | | Patch by: david.l.kreitzer@intel.com llvm-svn: 241270
* Move error checking from once per relocation to once per relocation section.Rafael Espindola2015-07-021-25/+27
| | | | llvm-svn: 241269
* Remove whitespace from start of line, NFC.Yaron Keren2015-07-021-2/+2
| | | | llvm-svn: 241268
* Refactored ARMTargetInfo in order to use the API of ↵Alexandros Lamprineas2015-07-021-117/+72
| | | | | | | | | llvm/lib/Support/TargetParser.cpp for extracting target specific information. Change-Id: Ia0b83ecdb8d9223f9c4ef38dd9206969f78e53f3 llvm-svn: 241267
OpenPOWER on IntegriCloud