summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "[WebAssembly] Emit type signatures for declared functions"Derek Schuff2016-06-024-120/+10
| | | | | | | | This reverts r271599, it broke the integration tests. More places than I expected had nontrival return types in imports, or else the check was wrong. llvm-svn: 271606
* [LTO] Add --lto-aa-pipeline.Davide Italiano2016-06-025-1/+13
| | | | | | Differential Revision: http://reviews.llvm.org/D20888 llvm-svn: 271605
* [obj2yaml] [yaml2obj] Support for MachO nlist and string tableChris Bieneman2016-06-025-7/+610
| | | | | | This commit adds round tripping for MachO symbol data. Symbols are entries in the name list, that contain offsets into the string table which is at the end of the __LINKEDIT segment. llvm-svn: 271604
* [InstCombine] change tests to show a more obvious transform possibilitySanjay Patel2016-06-021-63/+62
| | | | | | | | | | | | The original tests were intended to show a missing transform that would be solved by D20774: http://reviews.llvm.org/D20774 But it's not clear that the transform for the simpler tests is a win for all targets. Make the tests show a larger pattern that should be a win regardless of the cost of bitcast instructions. llvm-svn: 271603
* [PM] Schedule InstSimplify after late LICM run, to clean up LCSSA nodes.Manuel Jacob2016-06-022-0/+21
| | | | | | | | | | | | | | | Summary: The module pass pipeline includes a late LICM run after loop unrolling. LCSSA is implicitly run as a pass dependency of LICM. However no cleanup pass was run after this, so the LCSSA nodes ended in the optimized output. Reviewers: hfinkel, mehdi_amini Subscribers: majnemer, bruno, mzolotukhin, mehdi_amini, llvm-commits Differential Revision: http://reviews.llvm.org/D20606 llvm-svn: 271602
* [PM] LoadCombine preserves GlobalsAA, doesn't depend on it.Davide Italiano2016-06-021-1/+0
| | | | llvm-svn: 271601
* [PM/LoadCombine] Inline getAnalysisUsage(). NFCI.Davide Italiano2016-06-021-8/+5
| | | | llvm-svn: 271600
* [WebAssembly] Emit type signatures for declared functionsDerek Schuff2016-06-024-10/+120
| | | | | | | | | | | | | | | | | Under emscripten, C code can take the address of a function implemented in Javascript (which is exposed via an import in wasm). Because imports do not have linear memory address in wasm, we need to generate a thunk to be the target of the indirect call; it call the import directly. To make this possible, LLVM needs to emit the type signatures for these functions, because they may not be called directly or referred to other than where the address is taken. This uses s new .s directive (.functype) which specifies the signature. Differential Revision: http://reviews.llvm.org/D20891 llvm-svn: 271599
* 80-column fixup after last formatting change.Eric Christopher2016-06-021-4/+8
| | | | llvm-svn: 271598
* Add comments.Rui Ueyama2016-06-021-0/+2
| | | | llvm-svn: 271597
* Fix a couple of misformatted comments spotted in post-commit review.Eric Christopher2016-06-021-8/+7
| | | | llvm-svn: 271596
* This patch is in preparation for a substantial refactoring of theEric Christopher2016-06-021-294/+304
| | | | | | | | | | | | code. To make the diffs easier to read, clang-format everything first. No functionality changed. Patch by Alina Sbirlea! http://reviews.llvm.org/D20926 llvm-svn: 271595
* [esan] Add support for log_exe_nameDerek Bruening2016-06-022-2/+3
| | | | | | | | | | | | | | | Summary: Adds the call needed to cache the binary name to support the sanitizer option log_exe_name for usable log file results when running multiple applications. Adds a test. Reviewers: aizatsky Subscribers: vitalybuka, zhaoqin, kcc, eugenis, llvm-commits, kubabrecka Differential Revision: http://reviews.llvm.org/D20747 llvm-svn: 271586
* Fixup r271533, or check-clang didn't find llvm-lto as the target.NAKAMURA Takumi2016-06-021-0/+1
| | | | llvm-svn: 271585
* fix documentation comments; NFCSanjay Patel2016-06-022-114/+68
| | | | llvm-svn: 271584
* Fix build failure with cmake version bumpXinliang David Li2016-06-021-0/+10
| | | | llvm-svn: 271582
* clangFrontend: Make intrinsics_gen optional for standalone build.NAKAMURA Takumi2016-06-021-1/+6
| | | | | FIXME: intrinsics_gen may be exported from llvm. llvm-svn: 271579
* [profile] enable a subtest for vcall inline virtual funcXinliang David Li2016-06-021-1/+1
| | | | llvm-svn: 271577
* [llvm-pdbdump] Dump CodeView line information.Zachary Turner2016-06-0214-22/+246
| | | | | | | | | This first pass only splits apart the records and dumps the line info kinds and binary data. Subsequent patches will parse out the binary data into more useful information and dump it in detail. llvm-svn: 271576
* AMDGPU: Handle flat in getMemOpBaseRegImmOfsMatt Arsenault2016-06-021-0/+7
| | | | | | | It can still report the base register, and the uses give up when it fails. llvm-svn: 271575
* [ASMParser] Parse FP constants in non-C localesMeador Inge2016-06-021-2/+4
| | | | | | | | | | | This patch fixes PR25788, which allows for the parsing of floating-point constants in non-C locales. Patch by Antoine Pitrou! Differential Revision: http://reviews.llvm.org/D15375 llvm-svn: 271574
* transform obscured FP sign bit ops into a fabs/fneg using TLI hookSanjay Patel2016-06-028-101/+64
| | | | | | | | | | | | | | | | | | | This is effectively a revert of: http://reviews.llvm.org/rL249702 - [InstCombine] transform masking off of an FP sign bit into a fabs() intrinsic call (PR24886) and: http://reviews.llvm.org/rL249701 - [ValueTracking] teach computeKnownBits that a fabs() clears sign bits and a reimplementation as a DAG combine for targets that have IEEE754-compliant fabs/fneg instructions. This is intended to resolve the objections raised on the dev list: http://lists.llvm.org/pipermail/llvm-dev/2016-April/098154.html and: https://llvm.org/bugs/show_bug.cgi?id=24886#c4 In the interest of patch minimalism, I've only partly enabled AArch64. PowerPC, MIPS, x86 and others can enable later. Differential Revision: http://reviews.llvm.org/D19391 llvm-svn: 271573
* clang-rename: fix renaming heap allocationsMiklos Vajna2016-06-022-0/+25
| | | | | | | | | | The check failed, 'Cla *C = new Cla();' was renamed to 'D *C = new Cla();'. Reviewers: klimek Differential Revision: http://reviews.llvm.org/D20635 llvm-svn: 271572
* AMDGPU: Cleanup load testsMatt Arsenault2016-06-0234-2441/+7440
| | | | | | | | | There are a lot of different kinds of loads to test for, and these were scattered around inconsistently with some redundancy. Try to comprehensively test all loads in a consistent way. llvm-svn: 271571
* [codeview] Fix a nasty use after free.Zachary Turner2016-06-026-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | StreamRef was designed to be a thin wrapper over an abstract stream interface that could itself be treated the same as any other stream interface. For this reason, it inherited publicly from StreamInterface, and stored a StreamInterface* internally. But StreamRef was also designed to be lightweight and easily copyable, similar to ArrayRef. This led to two misuses of the classes. 1) When creating a StreamRef A from another StreamRef B, it was possible to end up with A storing a pointer to B, even when B was a temporary object, leading to use after free. 2) The above situation could be repeated ad nauseum, so that A stores a pointer to B, which itself stores a pointer to another StreamRef C, and so on and so on, creating an unnecessarily level of nesting depth. This patch removes the public inheritance relationship between StreamRef and StreamInterface, making it so that we can never accidentally convert a StreamRef to a StreamInterface. llvm-svn: 271570
* Start adding tlsdesc support for aarch64.Rafael Espindola2016-06-026-16/+70
| | | | | | | | | | | | | | | | | This is mostly extracted from http://reviews.llvm.org/D18960. The general idea for tlsdesc is that the two GD got entries are used for a function pointer and its argument. The dynamic linker sets both. In the non-dlopen case the dynamic linker sets the function to the identity and the argument to the offset in the tls block. All that the static linker has to do in the non-dlopen case is relocate the code to point to the got entries and create a dynamic relocation. The dlopen case is more complicated, but can be implemented in another patch. llvm-svn: 271569
* tsan: clean up dynamic TLS memory between reuseDmitry Vyukov2016-06-023-12/+86
| | | | | | | | | | | | | Currently the added test produces false race reports with glibc 2.19, because DLTS memory is reused by pthread under the hood. Use the DTLS machinery to intercept new DTLS ranges. __tls_get_addr known to cause issues for tsan in the past, so write the interceptor more carefully. Reviewed in http://reviews.llvm.org/D20927 llvm-svn: 271568
* AMDGPU: Temporary fix for broken store combineMatt Arsenault2016-06-022-0/+15
| | | | llvm-svn: 271567
* [CodeView] Use None instead of Void if there is no subprogramDavid Majnemer2016-06-023-25/+27
| | | | llvm-svn: 271566
* [cmake] Fix-up r271533Pavel Labath2016-06-021-2/+2
| | | | | | I was appending to the wrong variable (over-zealous copy-paste from llvm on my part). llvm-svn: 271565
* [esan|cfrag] Add struct info registrationQin Zhao2016-06-022-16/+194
| | | | | | | | | | | | | | | | | | | | | Summary: Adds StructInfo to CacheFragInfo to match the LLVM's EfficiencySanitizer structs. Uses StructHashMap to keep track of the struct info used by the app. Adds registerStructInfo/unregisterStructInfo to add/remove struct infos to/from StructHashMap. updates test struct-simple.cpp with more C structs. Reviewers: aizatsky, filcab Subscribers: filcab, zhaoqin, llvm-commits, eugenis, vitalybuka, kcc, bruening, kubabrecka Differential Revision: http://reviews.llvm.org/D20590 llvm-svn: 271564
* Fix the use of sys::MemoryFence after including WindowsSupport.h thatChandler Carruth2016-06-021-0/+5
| | | | | | r271558 introduced. llvm-svn: 271563
* Use false for bool instead of 0Matt Arsenault2016-06-021-1/+1
| | | | llvm-svn: 271562
* AMDGPU: Fix crashes on unknown processor nameMatt Arsenault2016-06-025-7/+29
| | | | | | | | | | | | | | If the processor name failed to parse for amdgcn, the resulting output would have R600 ISA in it. If the processor name was missing or invalid for R600, the wavefront size would not be set and there would be crashes from missing itinerary data. Fixes crashes in future commit caused by dividing by the unset/0 wavefront size. llvm-svn: 271561
* UBSan: crash less often on corrupted Vtables.Ivan Krasin2016-06-024-5/+62
| | | | | | | | | | | | | | | | | Summary: This CL adds a weak check for a Vtable prefix: for a well-formed Vtable, we require the prefix to be within [-1<<20; 1<<20]. Practically, this solves most of the known cases when UBSan segfaults without providing any useful diagnostics. Reviewers: pcc Subscribers: kubabrecka Differential Revision: http://reviews.llvm.org/D19750 llvm-svn: 271560
* [X86] Define segment MI operands as regs instead of i8imm.Ahmed Bougacha2016-06-022-11/+12
| | | | | | | | | | | | | | | | | | | We've been pretending that segments are i8imm since the initial support (r68645), predating the addition of the SEGMENT_REG class (r81895). That happens to works, but is wrong, and inconsistent with how we print (e.g., X86ATTInstPrinter::printMemReference) and parse them (e.g., X86Operand::addMemOperands). This change shouldn't affect any tool users, but is visible to library users or out-of-tree tablegen backends: this causes MCOperandInfo for the segment op to have an RC instead of "unknown", and TII::getRegClass to actually return something. As the registers are reserved and no vregs of the class ever created, that shouldn't change anything. No test change; no suspicious getRegClass() in X86 and CodeGen. llvm-svn: 271559
* This is yet another attempt to re-instate r220932 as discussed inChandler Carruth2016-06-023-4/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | D19271. Previous attempt was broken by NetBSD, so in this version I've made the fallback path generic rather than Windows specific and sent both Windows and NetBSD to it. I've also re-formatted the code some, and used an exact clone of the code in PassSupport.h for doing manual call-once using our atomics rather than rolling a new one. If this sticks, we can replace the fallback path for Windows with a Windows-specific implementation that is more reliable. Original commit message: This patch adds an llvm_call_once which is a wrapper around std::call_once on platforms where it is available and devoid of bugs. The patch also migrates the ManagedStatic mutex to be allocated using llvm_call_once. These changes are philosophically equivalent to the changes added in r219638, which were reverted due to a hang on Win32 which was the result of a bug in the Windows implementation of std::call_once. Differential Revision: http://reviews.llvm.org/D5922 llvm-svn: 271558
* pdbdump: print out COFF section headers.Rui Ueyama2016-06-024-3/+178
| | | | | | | | | | | | Unlike other sections that can grow to any size, the COFF section header stream has maximum length because each record is fixed size and the COFF file format limits the maximum number of sections. So I decided to not create a specific stream class for it. Instead, I added a member function to DbiStream class which returns a vector of COFF headers. Differential Revision: http://reviews.llvm.org/D20717 llvm-svn: 271557
* Make APInt negate just do a 2's complement negate instead of subtract. NFC.Pete Cooper2016-06-021-1/+6
| | | | | | | | | | This is part of an effort to shave allocations from APInt heavy paths. I'll be moving many of the other operators to r-value references soon and this is a step towards doing that without too much duplication. Saves 15k allocations when doing 'opt -O2 verify-uselistorder.bc'. llvm-svn: 271556
* AArch64: Do not test for CPUs, use SubtargetFeaturesMatthias Braun2016-06-0210-115/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | Testing for specific CPUs has a number of problems, better use subtarget features: - When some tweak is added for a specific CPU it is often desirable for the next version of that CPU as well, yet we often forget to add it. - It is hard to keep track of checks scattered around the target code; Declaring all target specifics together with the CPU in the tablegen file is a clear representation. - Subtarget features can be tweaked from the command line. To discourage people from using CPU checks in the future I removed the isCortexXX(), isCyclone(), ... functions. I added an getProcFamily() function for exceptional circumstances but made it clear in the comment that usage is discouraged. Reformat feature list in AArch64.td to have 1 feature per line in alphabetical order to simplify merging and sorting for out of tree tweaks. No functional change intended. Differential Revision: http://reviews.llvm.org/D20762 llvm-svn: 271555
* [InstCombine] remove guard for generating a vector selectSanjay Patel2016-06-021-15/+11
| | | | | | | | | | | | | | | | | This is effectively NFC because we already do this transform after r175380: http://reviews.llvm.org/rL175380 and also via foldBoolSextMaskToSelect(). This change should just make it a bit more efficient to match the pattern. The original guard was added in r95058: http://reviews.llvm.org/rL95058 A sampling of codegen for current in-tree targets shows no problems. This makes sense given that we're already producing the vector selects via the other transforms. llvm-svn: 271554
* [PowerPC] Run reg2mem on tests to simplify them.Geoff Berry2016-06-022-181/+73
| | | | | | | | | | | | | | | | | Summary: Also convert test/CodeGen/PowerPC/vsx-ldst-builtin-le.ll to use FileCheck instead of two grep and count runs. This change is needed to avoid spurious diffs in these tests when EarlyCSE is improved to use MemorySSA and can do more load elimination. Reviewers: hfinkel Subscribers: mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D20238 llvm-svn: 271553
* [X86][SSE] Added SSE41/AVX2 non-temporal testsSimon Pilgrim2016-06-021-1/+13
| | | | | | Useful for when we add MOVNTDQA support llvm-svn: 271552
* Fixed a problem where we couldn't call extern "C" functions.Sean Callanan2016-06-025-1/+79
| | | | | | | | | | | | | Some compilers do not mark up C++ functions as extern "C" in the DWARF, so LLDB has to fall back (if it is about to give up finding a symbol) to using the base name of the function. This fix also ensures that we search by full name rather than "auto," which could cause unrelated C++ names to be found. Finally, it adds a test case. <rdar://problem/25094302> llvm-svn: 271551
* [codeview] Fix crash when handling qualified void typesReid Kleckner2016-06-022-56/+87
| | | | | | | | | | The DIType* for void is the null pointer. A null DIType can never be a qualified type, so we can just exit the loop at this point and go to getTypeIndex(BaseTy). Fixes PR27984 llvm-svn: 271550
* Rename IMAGE_DEBUG_TYPE_NO_TIMESTAMP to IMAGE_DEBUG_TYPE_REPRODavid Majnemer2016-06-022-2/+4
| | | | | | This matches the COFF spec llvm-svn: 271549
* Only attempt to detect AVG if SSE2 is availableDimitry Andric2016-06-022-0/+34
| | | | | | | | | | | | | | | | | | | | Summary: In PR29973 Sanjay Patel reported an assertion failure when a certain loop was optimized, for a target without SSE2 support. It turned out this was because of the AVG pattern detection introduced in rL253952. Prevent the assertion failure by bailing out early in `detectAVGPattern()`, if the target does not support SSE2. Also add a minimized test case. Reviewers: congh, eli.friedman, spatel Subscribers: emaste, llvm-commits Differential Revision: http://reviews.llvm.org/D20905 llvm-svn: 271548
* [esan|cfrag] Create the cfrag struct array for the runtimeQin Zhao2016-06-021-5/+115
| | | | | | | | | | | | | | Summary: Fills the cfrag struct variable with an array of struct information variables. Reviewers: aizatsky, bruening Subscribers: bruening, kcc, vitalybuka, eugenis, llvm-commits, zhaoqin Differential Revision: http://reviews.llvm.org/D20661 llvm-svn: 271547
* [ADT] Pass ArrayRef::slice size_t instead of unsigned.Ahmed Bougacha2016-06-022-8/+23
| | | | | | | | | | Also fix slice wrappers drop_front and drop_back. The unittests are pretty awkward, but do the job; alternatives welcome! ..and yes, I do have ArrayRefs with more than 4 billion elements. llvm-svn: 271546
* LLDB needs to be able to handle DW_AT_GNU_dwo_name that are relative to the ↵Greg Clayton2016-06-021-0/+16
| | | | | | | | DW_AT_comp_dir when using -gmodules with DWARF in .o files on darwin. <rdar://problem/26590227> llvm-svn: 271545
OpenPOWER on IntegriCloud