summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [libcxx] [test] Rename __x to x. NFCI.Stephan T. Lavavej2017-08-114-25/+26
| | | | | | | This improves readability and (theoretically) improves portability, as __ugly names are reserved. llvm-svn: 310760
* [libcxx] [test] Rename __c to ch. NFCI.Stephan T. Lavavej2017-08-1137-148/+148
| | | | | | | This improves readability and (theoretically) improves portability, as __ugly names are reserved. llvm-svn: 310759
* [libcxx] [test] Rename _Tp to T. NFCI.Stephan T. Lavavej2017-08-1124-80/+80
| | | | | | | This improves readability and (theoretically) improves portability, as _Ugly names are reserved. llvm-svn: 310758
* Add `-z muldefs` option.Rui Ueyama2017-08-112-1/+7
| | | | llvm-svn: 310757
* Fix access to undefined weak symbols in pic codeRafael Espindola2017-08-112-1/+75
| | | | | | | | | | When the access to a weak symbol is not a call, the access has to be able to produce the value 0 at runtime. We were sometimes producing code sequences where that was not possible if the code was leaded more than 4g away from 0. llvm-svn: 310756
* [pdb] Fix linker module symbols to work with dbgeng.Zachary Turner2017-08-111-12/+18
| | | | | | | | | | | | | | | | The linker module contains a symbol of type S_COMPILE3 which contains various information about the compiler and linker used to create the PDB, such as the name of the linker, the target machine, and the linker version. Interestingly, if we set the version string to 0.0.0.0, then when trying to view local variables WinDbg emits an error that private symbols are not present. By setting this to a valid MSVC linker version string, local variables can display. As such, even though it is not representative of LLVM's version information, we need this for compatibility. llvm-svn: 310755
* Output S_SECTION symbols to the Linker module.Zachary Turner2017-08-115-82/+140
| | | | | | | | | | | | | | PDBs need to contain 1 module for each object file/compiland, and a special one synthesized by the linker. This one contains a symbol record for each output section in the executable with its address information. This patch adds such symbols to the linker module. Note that we also are supposed to add an S_COFFGROUP symbol for what appears to be each input section that contributes to each output section, but it's not entirely clear how to generate these yet, so I'm leaving that for a separate patch. llvm-svn: 310754
* AMDGPU: Start adding tail call supportMatt Arsenault2017-08-1111-21/+562
| | | | | | Handle the sibling call cases. llvm-svn: 310753
* Remove unused lambda capture.Zachary Turner2017-08-111-1/+1
| | | | llvm-svn: 310752
* [libFuzzer] recommend Clang Coverage for coverage visualizationKostya Serebryany2017-08-111-24/+4
| | | | llvm-svn: 310751
* [libFuzzer] Re-enable coverage.test on Darwin.George Karpenkov2017-08-111-2/+0
| | | | llvm-svn: 310750
* Revert r310716 (and r310735): [globalisel][tablegen] Support ↵Daniel Sanders2017-08-114-135/+51
| | | | | | | | | | | zero-instruction emission. Two of the Windows bots are failing test\CodeGen\X86\GlobalISel\select-inc.mir which should not have been affected by the change. Reverting while I investigate. Also reverted r310735 because it builds on r310716. llvm-svn: 310745
* Add documentation for llvm-pdbutil.Zachary Turner2017-08-112-0/+586
| | | | llvm-svn: 310744
* [LLD/PDB] Write actual records to the globals stream.Zachary Turner2017-08-1119-78/+937
| | | | | | | | | | | | | | | | Previously we were writing an empty globals stream. Windows tools interpret this as "private symbols are not present in this PDB", even when they are, so we need to fix this. Regardless, without it we don't have information about global variables, so we need to fix it anyway. This patch does that. With this patch, the "lm" command in WinDbg correctly reports that we have private symbols available, but the "dv" command still refuses to display local variables. Differential Revision: https://reviews.llvm.org/D36535 llvm-svn: 310743
* [mips] clang-format MipsSubtarget.cpp.John Baldwin2017-08-111-3/+3
| | | | | | This only fixes a few things and serves as my initial test commit. llvm-svn: 310742
* [opt-viewer] Decode HTML bytes for Python 3Brian Gesiak2017-08-111-1/+4
| | | | | | | | | | | | | | | | | | | | | | | Summary: When using Python 3, `pygments.highlight()` returns a `bytes` object, not a `str`, causing the call to `str.replace` on the following line to fail with a runtime exception: `TypeError: 'str' does not support the buffer interface`. Decode the bytes into a string in order to fix the exception. Test Plan: Run `opt-viewer.py` with Python 3.4, and confirm no runtime error occurs when calling `str.replace`. Reviewers: anemet Reviewed By: anemet Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D36624 llvm-svn: 310741
* [opt-viewer] Use Python 3-compatible iteritemsBrian Gesiak2017-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | Summary: Replace a usage of a Python 2-specific `dict.iteritems()` with the Python 3-compatible definition provided at the top of the same file. Test Plan: Run `opt-viewer.py` using Python 3 and confirm it no longer encounters a runtime error when calling `dict.iteritems()`. Reviewers: anemet Reviewed By: anemet Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D36623 llvm-svn: 310740
* [opt-viewer] Use Python 3-compatible `intern()`Brian Gesiak2017-08-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | Summary: In Python 2, `intern()` is a builtin function available to all programs. In Python 3, it was moved into the `sys` module, available as `sys.intern`. Import it such that, within `optrecord.py`, `intern()` is available whether run using Python 2 or 3. Test Plan: Run `opt-viewer.py` using Python 3, confirm it no longer encounters a runtime error when `intern()` is called. Reviewers: anemet Reviewed By: anemet Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D36622 llvm-svn: 310739
* [AMDGPU] Fix santizer error after last commitStanislav Mekhanoshin2017-08-111-1/+0
| | | | | | Removed useless assert. llvm-svn: 310738
* Fix typo /NFCXinliang David Li2017-08-111-1/+1
| | | | llvm-svn: 310737
* Avoid crash with local abs symbol.Rafael Espindola2017-08-112-6/+14
| | | | llvm-svn: 310736
* [globalisel][tablegen] Generate TypeObject table. NFCDaniel Sanders2017-08-112-33/+36
| | | | | | | | | | | | | | | | | | Summary: Generate the type table from the types used by a target rather than hard-coding the union of types used by all targets. Depends on D36084 Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar Reviewed By: rovka Subscribers: kristof.beyls, igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D36085 llvm-svn: 310735
* Update libFuzzer documentation for -fsanitize=fuzzer-no-link flagGeorge Karpenkov2017-08-111-1/+13
| | | | | | Differential Revision: https://reviews.llvm.org/D36602 llvm-svn: 310734
* Add -fsanitize=fuzzer-no-link flag to the driver.George Karpenkov2017-08-115-2/+15
| | | | | | | | | | | The flag will perform instrumentation necessary to the fuzzing, but will NOT link libLLVMFuzzer.a library. Necessary when modifying CFLAGS for projects which may produce executables as well as a fuzzable target. Differential Revision: https://reviews.llvm.org/D36600 llvm-svn: 310733
* Enable exceptions for this test case to speculatively fix the build bots.Aaron Ballman2017-08-111-2/+2
| | | | | | Hopefully corrects: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/15666 llvm-svn: 310732
* [AMDGPU] Ported and adopted AMDLibCalls passStanislav Mekhanoshin2017-08-117-6/+3658
| | | | | | | | | | | | | | | | | | The pass does simplifications of well known AMD library calls. If given -amdgpu-prelink option it works in a pre-link mode which allows to reference new library functions which will be linked in later. In addition it also used to process traditional AMD option -fuse-native which allows to replace some of the functions with their fast native implementations from the library. The necessary glue to pass the prelink option and translate -fuse-native is to be added to the driver. Differential Revision: https://reviews.llvm.org/D36436 llvm-svn: 310731
* Orc: PR33769: Don't rely on comparisons with default constructed iteratorsDavid Blaikie2017-08-111-8/+8
| | | | llvm-svn: 310729
* Add hicpp-exception-baseclass to the HIC++ module.Aaron Ballman2017-08-118-0/+167
| | | | | | | | This enforces that throwing an exception in C++ requires that exception to inherit from std::exception. Patch by Jonas Toth. llvm-svn: 310727
* [AVX512] Remove and autoupgrade many of the broadcast intrinsicsCraig Topper2017-08-1112-533/+435
| | | | | | | | | | | | | | | | | Summary: This autoupgrades most of the broadcast intrinsics. They've been unused in clang for some time. This leaves the 32x2 intrinsics because they are still used in clang. Reviewers: RKSimon, zvi, igorb Reviewed By: RKSimon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D36606 llvm-svn: 310725
* [x86] Enable some support for lowerVectorShuffleWithUndefHalf with AVX-512Craig Topper2017-08-117-66/+52
| | | | | | | | | | | | | | | | | | | | | Summary: This teaches 512-bit shuffles to detect unused halfs in order to reduce shuffle size. We may need to refine the 512-bit exit point. I couldn't remember if we had good cross lane shuffles for 8/16 bit with AVX-512 or not. I believe this is step towards being able to handle D36454 without a special case. From here we need to improve our ability to combine extract_subvector with insert_subvector and other extract_subvectors. And we need to support narrowing binary operations where we don't demand all elements. This may be improvements to DAGCombiner::narrowExtractedVectorBinOp(by recognizing an insert_subvector in addition to concat) or we may need a target specific combiner. Reviewers: RKSimon, zvi, delena, jbhateja Reviewed By: RKSimon, jbhateja Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D36601 llvm-svn: 310724
* [OpenMP] Enable previously successful offloading tests.Gheorghe-Teodor Bercea2017-08-114-22/+109
| | | | | | | | | | | | Create a separate test file to contain all tests for OpenMP offloading to GPUs. Make libdevice checking more robust by accounting for the case in which no libdevice is found. This changes are in connrection with diff: D29660 llvm-svn: 310718
* [x86] use more shift or LEA for select-of-constants (2nd try)Sanjay Patel2017-08-1112-269/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous rev (r310208) failed to account for overflow when subtracting the constants to see if they're suitable for shift/lea. This version add a check for that and more test were added in r310490. We can convert any select-of-constants to math ops: http://rise4fun.com/Alive/d7d For this patch, I'm enhancing an existing x86 transform that uses fake multiplies (they always become shl/lea) to avoid cmov or branching. The current code misses cases where we have a negative constant and a positive constant, so this is just trying to plug that hole. The DAGCombiner diff prevents us from hitting a terrible inefficiency: we can start with a select in IR, create a select DAG node, convert it into a sext, convert it back into a select, and then lower it to sext machine code. Some notes about the test diffs: 1. 2010-08-04-MaskedSignedCompare.ll - We were creating control flow that didn't exist in the IR. 2. memcmp.ll - Choose -1 or 1 is the case that got me looking at this again. We could avoid the push/pop in some cases if we used 'movzbl %al' instead of an xor on a different reg? That's a post-DAG problem though. 3. mul-constant-result.ll - The trade-off between sbb+not vs. setne+neg could be addressed if that's a regression, but those would always be nearly equivalent. 4. pr22338.ll and sext-i1.ll - These tests have undef operands, so we don't actually care about these diffs. 5. sbb.ll - This shows a win for what is likely a common case: choose -1 or 0. 6. select.ll - There's another borderline case here: cmp+sbb+or vs. test+set+lea? Also, sbb+not vs. setae+neg shows up again. 7. select_const.ll - These are motivating cases for the enhancement; replace cmov with cheaper ops. Assembly differences between movzbl and xor to avoid a partial reg stall are caused later by the X86 Fixup SetCC pass. Differential Revision: https://reviews.llvm.org/D35340 llvm-svn: 310717
* [globalisel][tablegen] Support zero-instruction emission.Daniel Sanders2017-08-113-26/+107
| | | | | | | | | | | | | | | | | | | Summary: Support the case where an operand of a pattern is also the whole of the result pattern. In this case the original result and all its uses must be replaced by the operand. However, register class restrictions can require a COPY. This patch handles both cases by always emitting the copy and leaving it for the register allocator to optimize. Depends on D35833 Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar Subscribers: javed.absar, kristof.beyls, igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D36084 llvm-svn: 310716
* [mips] Add missing mips-registered-target to mips test.Simon Dardis2017-08-111-0/+2
| | | | llvm-svn: 310715
* [mips] Support implicit gpopt with N64 when using -fno-picSimon Dardis2017-08-112-0/+31
| | | | | | | | | | | As clang defaults to -mno-abicalls when using -fno-pic for N64, implicitly use -mgpopt in that case. Reviewers: atanasyan Differential Revision: https://reviews.llvm.org/D36315 llvm-svn: 310714
* [mips] Lift the assertion on the types that can be used with MipsGPRelSimon Dardis2017-08-115-14/+50
| | | | | | | | | | | | | | | | Post commit review of rL308619 highlighted the need for handling N64 with -fno-pic. Testing reveale a stale assert when generating a GP relative addressing mode. This patch removes that assert and adds the necessary patterns for MIPS64 to perform gp relative addressing with -fno-pic (and the implicit -mno-abicalls + -mgpopt). Reviewers: atanasyan, nitesh.jain Differential Revision: https://reviews.llvm.org/D36472 llvm-svn: 310713
* [cmake] Expose the dependencies of ExecutionEngine as PUBLICMichal Gorny2017-08-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expose the dependencies of LLVMExecutionEngine library as PUBLIC rather than PRIVATE when building a shared library. This is necessary because the library is not contained but exposes API of other LLVM libraries via its headers. This causes other libraries to fail to link if the linker verifies for correctness of -l flags (i.e. fails on indirect dependencies). This e.g. happens when building LLDB against shared LLVM: lib64/liblldbExpression.a(IRExecutionUnit.cpp.o):(.data.rel.ro._ZTIN4llvm18MCJITMemoryManagerE[_ZTIN4llvm18MCJITMemoryManagerE]+0x10): undefined reference to `typeinfo for llvm::RuntimeDyld::MemoryManager' lib64/liblldbExpression.a(IRExecutionUnit.cpp.o):(.data.rel.ro._ZTVN4llvm18MCJITMemoryManagerE[_ZTVN4llvm18MCJITMemoryManagerE]+0x60): undefined reference to `llvm::RuntimeDyld::MemoryManager::anchor()' lib64/liblldbExpression.a(IRExecutionUnit.cpp.o):(.data.rel.ro._ZTVN12lldb_private15IRExecutionUnit13MemoryManagerE[_ZTVN12lldb_private15IRExecutionUnit13MemoryManagerE]+0x48): undefined reference to `llvm::RTDyldMemoryManager::deregisterEHFrames()' lib64/liblldbExpression.a(IRExecutionUnit.cpp.o):(.data.rel.ro._ZTVN12lldb_private15IRExecutionUnit13MemoryManagerE[_ZTVN12lldb_private15IRExecutionUnit13MemoryManagerE]+0x60): undefined reference to `llvm::RuntimeDyld::MemoryManager::anchor()' lib64/liblldbExpression.a(IRExecutionUnit.cpp.o):(.data.rel.ro._ZTVN12lldb_private15IRExecutionUnit13MemoryManagerE[_ZTVN12lldb_private15IRExecutionUnit13MemoryManagerE]+0xd0): undefined reference to `llvm::JITSymbolResolver::anchor()' collect2: error: ld returned 1 exit status Declaring the dependencies as PUBLIC guarantees that any package using the ExecutionEngine library will also get explicit -l flags for the dependent libraries guaranteeing that the symbols exposed in headers could be resolved. Patch originally written by NAKAMURA Takumi. Differential Revision: https://reviews.llvm.org/D36211 llvm-svn: 310712
* Improve handling of insert_subvector of bitcast valuesNirav Dave2017-08-113-21/+44
| | | | | | | | | | | | Fix insert_subvector / extract_subvector merges of bitcast values. Reviewers: efriedma, craig.topper, RKSimon Subscribers: RKSimon, llvm-commits Differential Revision: https://reviews.llvm.org/D34571 llvm-svn: 310711
* [X86][DAG] Switch X86 Target to post-legalized store mergeNirav Dave2017-08-1116-235/+175
| | | | | | | | | | | | | | | | Move store merge to happen after intrinsic lowering to allow lowered stores to be merged. Some regressions due in MergeConsecutiveStores to missing insert_subvector that are addressed in follow up patch. Reviewers: craig.topper, efriedma, RKSimon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34559 llvm-svn: 310710
* [AArch64] Enable ARMv8.3-A pointer authenticationSam Parker2017-08-1111-7/+663
| | | | | | | | | Add assembler and disassembler support for the ARMv8.3-A pointer authentication instructions. Differential Revision: https://reviews.llvm.org/D36517 llvm-svn: 310709
* [AArch64] Remove dotprod from base extension listSjoerd Meijer2017-08-111-2/+1
| | | | | | | | | Dot product is an optional ARMv8.2a extension; remove it from the ARMv8.2a base extension list. This was introduced in commit r310480. Differential Revision: https://reviews.llvm.org/D36609 llvm-svn: 310708
* Implement hicpp-braces-around-statements as an alias to ↵Aaron Ballman2017-08-114-0/+17
| | | | | | | | readability-braces-around-statements. Patch by Jonas Toth. llvm-svn: 310707
* [modules] Set the lexical DC for dummy tag decls that refer to hiddenAlex Lorenz2017-08-114-0/+28
| | | | | | | | | | | | | | declarations that are made visible after the dummy is parsed and ODR verified Prior to this commit the "(getContainingDC(DC) == CurContext && "The next DeclContext should be lexically contained in the current one.")," assertion failure was triggered during semantic analysis of the dummy tag declaration that was declared in another tag declaration because its lexical context did not point to the outer tag decl. rdar://32292196 llvm-svn: 310706
* [ELF] - Fixing buildbot.George Rimar2017-08-111-1/+1
| | | | | | http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/11517/steps/build_Lld/logs/stdio llvm-svn: 310705
* Revert r302670 for the upcoming 5.0.0 releaseStefan Maksimovic2017-08-112-46/+0
| | | | | | | | | | This is causing failures when compiling clang with -O3 as one of the structures used by clang is passed by value and uses the fastcc calling convention. Faliures manifest for stage2 mips build. llvm-svn: 310704
* [ELF] - Do not omit common symbols when -Map is given.George Rimar2017-08-112-20/+30
| | | | | | | | | | | This is PR33886, previously we did not output common symbols to map, patch fixes that. Differential revision: https://reviews.llvm.org/D36466 llvm-svn: 310703
* Revert r310057Stefan Maksimovic2017-08-116-1/+110
| | | | | | | | Bring back changes which r304953 introduced since they were in fact not the cause of failures described in r310057 commit message. llvm-svn: 310702
* [ARM] Assembler support for the ARMv8.2a dot product instructionsSjoerd Meijer2017-08-1113-2/+236
| | | | | | | | | Commit r310480 added the AArch64 ARMv8.2a dot product instructions; this adds the AArch32 instructions. Differential Revision: https://reviews.llvm.org/D36575 llvm-svn: 310701
* [Bash-autocompletion] Add --autocomplete flag to 5.0 release notesYuka Takahashi2017-08-111-1/+1
| | | | | | | | | | | | | | Summary: I thought we should add this information to release notes, because we added a new flag to clang driver. Reviewers: v.g.vassilev, teemperor, ruiu Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D36567 llvm-svn: 310700
* [DAGCombiner] Remove shuffle support from simplifyShuffleMaskSimon Pilgrim2017-08-112-4/+2
| | | | | | | | rL310372 enabled simplifyShuffleMask to support undef shuffle mask inputs, but its causing hangs. Removing support until I can triage the problem llvm-svn: 310699
OpenPOWER on IntegriCloud