summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [NFC] Fix typo in `ImportJScop` declaration.Siddharth Bhat2017-06-121-1/+1
| | | | | | | | Contributed by: Singapuram Sanjay Differential Revision: https://reviews.llvm.org/D34079 llvm-svn: 305183
* Revert r305164/5/7.Daniel Jasper2017-06-129-174/+33
| | | | | | | | | | | | | | cc1as does not currently access the "--" version of this flag. At the very least this needs to be fixed and proper test cases need to be added. Simple reproducer: clang -Wa,--compress-debug-sections /tmp/test.cc Result: error: unknown argument: '--compress-debug-sections' llvm-svn: 305182
* Export the required symbol from DynamicLibraryTestsRoger Ferrer Ibanez2017-06-125-4/+23
| | | | | | | | | | | | | | | | | Running unittests/Support/DynamicLibrary/DynamicLibraryTests fails when LLVM is configured with -DLLVM_EXPORT_SYMBOLS_FOR_PLUGINS=ON, because the test's version script only contains symbols extracted from the static libraries, that the test links with, but not those from the main object/executable itself. The patch moves the one symbol, needed by the test, to a static library. Fixes https://bugs.llvm.org/show_bug.cgi?id=32893 Patch by Momchil Velikov. Differential Revision: https://reviews.llvm.org/D33789 llvm-svn: 305181
* [AVX-512] Add VPCONFLICT and VPLZCNT to load folding tables.Craig Topper2017-06-123-2/+146
| | | | llvm-svn: 305180
* Address http://bugs.llvm.org/pr32207 by making BannerPrinted local to ↵Yaron Keren2017-06-121-4/+4
| | | | | | | | | | runOnSCC and skipping banner for function declarations. Reviewed By: Mehdi AMINI Differential Revision: https://reviews.llvm.org/D34086 llvm-svn: 305179
* Initialize SubArch in class TripleKamil Rytarowski2017-06-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: LLDB built with asan on NetBSD detected issues in the following code: ``` void ArchSpec::Clear() { m_triple = llvm::Triple(); m_core = kCore_invalid; m_byte_order = eByteOrderInvalid; m_distribution_id.Clear(); m_flags = 0; } ``` --- lldb/source/Core/ArchSpec.cpp Runtime error messages: /public/pkgsrc-tmp/wip/lldb-netbsd/work/.buildlink/include/llvm/ADT/Triple.h:44:7: runtime error: load of value 32639, which is not a valid value for type 'SubArchType' /public/pkgsrc-tmp/wip/lldb-netbsd/work/.buildlink/include/llvm/ADT/Triple.h:44:7: runtime error: load of value 3200171710, which is not a valid value for type 'SubArchType' /public/pkgsrc-tmp/wip/lldb-netbsd/work/.buildlink/include/llvm/ADT/Triple.h:44:7: runtime error: load of value 3200171710, which is not a valid value for type 'SubArchType' Correct this issue with initialization of SubArch() in the class Triple constructor. Sponsored by <The NetBSD Foundation> Reviewers: chandlerc, zturner Reviewed By: zturner Subscribers: llvm-commits, zturner Differential Revision: https://reviews.llvm.org/D33845 llvm-svn: 305178
* ELF: Teach ICF about relocations referring to merge input sections.Peter Collingbourne2017-06-127-22/+146
| | | | | | | | | Relocations referring to merge sections are considered equal if they resolve to the same offset in the same output section. Differential Revision: https://reviews.llvm.org/D34094 llvm-svn: 305177
* ELF: Move section merging before ICF. NFCI.Peter Collingbourne2017-06-124-65/+68
| | | | | | Differential Revision: https://reviews.llvm.org/D34093 llvm-svn: 305176
* build: use cmake to pass -std=c++11Saleem Abdulrasool2017-06-112-5/+18
| | | | | | | | | | Rather than manually checking for support for the spelling of the C++ standard, indicate to CMake that we require that the compiler support C++11 and that we compile without the GNU extensions. This simplifies the flags handling in libc++abi itself by relying on CMake to translate the flag and add it as appropriate. llvm-svn: 305175
* build: use POSITION_INDEPENDENT_CODE CMake propertySaleem Abdulrasool2017-06-112-16/+23
| | | | | | | | | | | | Use the POSITION_INDEPENDENT_CODE target property to indicate that we should be building with -fPIC or the equivalent flag based on the toolchain that we are using. This makes the check more portable and simplifies the flags management. Because we don't want this setting to propagate in the case of an in-tree build, set the property on the targets we construct explicitly rather than setting CMAKE_POSITION_INDEPENDENT_CODE to ON globally. llvm-svn: 305174
* cxa_demangle: fix -Wimplicit-fallthrough for GCC:7Saleem Abdulrasool2017-06-111-1/+1
| | | | | | | Use the C++11 (formalised in C++17) tag to indicate a fallthrough in the switch case. Silences a -Wimplicit-fallthrough warning with gcc:7 llvm-svn: 305173
* private_typeinfo: add missing field initializersSaleem Abdulrasool2017-06-111-3/+3
| | | | | | | Cleanup the -Wmissing-field-initializers warnings from gcc:7 builds. NFC. llvm-svn: 305172
* [x86] use vperm2f128 rather than vinsertf128 when there's a chance to fold a ↵Sanjay Patel2017-06-113-50/+36
| | | | | | | | | | | | | | | | | | | | | 32-byte load I was looking closer at the x86 test diffs in D33866, and the first change seems like it shouldn't happen in the first place. So this patch will resolve that. Using Agner's tables and AMD docs, vperm2f128 and vinsertf128 have identical timing for any given CPU model, so we should be able to interchange those without affecting perf. But as we can see in some of the diffs here, using vperm2f128 allows load folding, so we should take that opportunity to reduce code size and register pressure. A secondary advantage is making AVX1 and AVX2 codegen more similar. Given that vperm2f128 was introduced with AVX1, we should be selecting it in all of the same situations that we would with AVX2. If there's some reason that an AVX1 CPU would not want to use this instruction, that should be fixed up in a later pass. Differential Revision: https://reviews.llvm.org/D33938 llvm-svn: 305171
* [PartialInlining] Support shrinkwrap life_range markersXinliang David Li2017-06-117-18/+581
| | | | | | Differential Revision: http://reviews.llvm.org/D33847 llvm-svn: 305170
* Don't crash when forming a destructor name on an incomplete type.John McCall2017-06-112-3/+13
| | | | | | | | Fixes PR25156. Patch by Don Hinton! llvm-svn: 305169
* [ADT] Use LLVM_ATTRIBUTE_USED instead of __attribute__ for unit testFrancis Ricci2017-06-111-5/+5
| | | | llvm-svn: 305168
* test: attempt to repair build botsSaleem Abdulrasool2017-06-114-22/+49
| | | | | | | Split the no-ias tests and give them a target to ensure that they go down the GNU toolchain path. Adjust the no compression support tests. llvm-svn: 305167
* [ADT] Suppress unused attribute warning in unit testFrancis Ricci2017-06-111-5/+5
| | | | llvm-svn: 305166
* Driver: add support for `-gz` and `-gz=`Saleem Abdulrasool2017-06-117-9/+122
| | | | | | | | | | | | | | | | | These options control the behaviour of the compression of debug info sections on ELF targets. Our behaviour slightly diverges from the behaviour of GCC. `-gz` maps to the `-compress-debug-sections` rather than `-compress-debug-sections=zlib` or `-compress-debug-sections=zlib-gnu`. This small divergence allows us to be compatible across versions of binutils (=zlib support was introduced in 2.26, while earlier versions only support =zlib-gnu). This also allows users to not have to worry about the version of the assembler they may be using if they are not using the IAS. Previously, users would have had to go through the internal option `-compress-debug-sectionss` and pass that through to the assembler, which is no longer needed. llvm-svn: 305165
* Driver: pass along [-]-[no]compress-debug-sections unfilteredSaleem Abdulrasool2017-06-112-20/+21
| | | | | | | | | | | | Rather than validating the flags, pass them through without any validation. Arguments passed via -Wa or -Xassembler are passed directly to the assembler without validation. The validation was previously required since we did not provide proper driver level support for controlling the debug compression on ELF targets. A subsequent change will add support for the `-gz` and `-gz=` flags which provide proper driver level control of the ELF compressed debug sections. llvm-svn: 305164
* Fix unused variable warning on non-debug EXPENSIVE_CHECKS buildsSimon Pilgrim2017-06-111-1/+2
| | | | llvm-svn: 305163
* [DAGCombine] Make sure we check the ResNo from UADDO before combiningAmaury Sechet2017-06-112-1/+26
| | | | | | | | | | | | Summary: UADDO has 2 result, and one must check the result no before doing any kind of combine. Without it, the transform is invalid. Reviewers: joerg Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34088 llvm-svn: 305162
* [isl-cpp] Remove isl/mat.h and add insert_partial_scheduleTobias Grosser2017-06-111-40/+22
| | | | | | | | | | The isl/mat.h functionality was incomplete (we returned 'void *' instead of 'isl::mat') and is likely not needed. *.insert_partial_schedule was until know not exported in the bindings, but will be needed in the next step. llvm-svn: 305161
* [MemorySSA] preservesAll() implies preserves<MemorySSA>(). NFCI.Davide Italiano2017-06-111-1/+0
| | | | llvm-svn: 305160
* TableGen.cmake: Try to fix build breakage introduce in r305142.NAKAMURA Takumi2017-06-111-1/+1
| | | | | | | | | | | | LLVM_TABLEGEN_TARGET is undefined in clang standalone build. STREQUAL cannot omit LHS. Then I saw an error; CMake Error at /path/to/install/llvm/lib/cmake/llvm/TableGen.cmake:40 (if): if given arguments: "STREQUAL" "/path/to/install/llvm/bin/llvm-tblgen.exe" Unknown arguments specified llvm-svn: 305159
* [SmallVector] Reinstate the typedefs.Davide Italiano2017-06-101-0/+3
| | | | | | | | | They're unused with recent versions of libstdc++ but older ones (e.g. libstdc++ 4.9 still requires them). Maybe we should bump the requirements on the minimum version to make GCC 7 happy, but in the meanwhile we need to live with the warning. llvm-svn: 305158
* [SmallVector] Remove unused typedefs, spotted by GCC 7. NFCI.Davide Italiano2017-06-101-3/+0
| | | | llvm-svn: 305157
* Move clearOutputSections before createPhdrs. NFC.Rafael Espindola2017-06-103-17/+29
| | | | llvm-svn: 305156
* [opt-viewer] Include default values in help outputBrian Gesiak2017-06-103-3/+3
| | | | | | | | | | | | | | | | | Summary: Python's argparse module includes a `%(default)s` format specifier that can be used to print the default value of an option in its help text. Use this for opt-viewer utilities' `--jobs` arguments. Reviewers: anemet Reviewed By: anemet Subscribers: llvm-commits, fhahn Differential Revision: https://reviews.llvm.org/D34081 llvm-svn: 305155
* [X86][SSE] Extended PR32368 to SSE/AVX1/AVX2Simon Pilgrim2017-06-101-8/+142
| | | | llvm-svn: 305154
* [X86][AVX512] Added test case for PR32368Simon Pilgrim2017-06-101-0/+19
| | | | llvm-svn: 305153
* dwarfdump: Handle relocs to zlib (.zdebug*) compressed sectionsDavid Blaikie2017-06-104-2/+8
| | | | llvm-svn: 305152
* [X86][SLM] Add SLM arithmetic vectorization testsSimon Pilgrim2017-06-104-37/+333
| | | | | | As discussed on D33983, as SLM has so many custom costs its worth testing as well. llvm-svn: 305151
* Break seems serve better here.Galina Kistanova2017-06-101-1/+1
| | | | llvm-svn: 305150
* Fix a ubsan failure introduced by r305092Vedant Kumar2017-06-101-2/+2
| | | | | | | | | | | | lib/Object/WindowsResource.cpp:578:3: runtime error: store to misaligned address 0x7fa09aedebbe for type 'unsigned int', which requires 4 byte alignment 0x7fa09aedebbe: note: pointer points here 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ llvm-svn: 305149
* Revert "[clang] Implement -Wcast-qual for C++"Roman Lebedev2017-06-104-244/+24
| | | | | | Breaks -Werror builders. llvm-svn: 305148
* [clang] Implement -Wcast-qual for C++Roman Lebedev2017-06-104-24/+244
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This way, the behavior of that warning flag more closely resembles that of GCC. Do note that there is at least one false-negative (see FIXME in tests). Fixes PR4802. Testing: ``` ninja check-clang-sema check-clang-semacxx ``` Reviewers: dblaikie, majnemer, rnk Reviewed By: dblaikie, rnk Subscribers: cfe-commits, alexfh, rnk Differential Revision: https://reviews.llvm.org/D33102 llvm-svn: 305147
* [EarlyCSE] Add option to use MemorySSA for function simplification run of ↵Geoff Berry2017-06-102-2/+10
| | | | | | | | | | | | | | | | EarlyCSE (off by default). Summary: Use MemorySSA for memory dependency checking in the EarlyCSE pass at the start of the function simplification portion of the pipeline. We rely on the fact that GVNHoist runs just after this pass of EarlyCSE to amortize the MemorySSA construction cost since GVNHoist uses MemorySSA and EarlyCSE preserves it. This is turned off by default. A follow-up change will turn it on to allow for easier reversion in case it breaks something. llvm-svn: 305146
* Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.Galina Kistanova2017-06-101-0/+1
| | | | llvm-svn: 305145
* Added llvm_unreachable to address warning: this statement may fall through. NFC.Galina Kistanova2017-06-101-0/+3
| | | | llvm-svn: 305144
* Added llvm_unreachable as ReportError cannot be specified as noreturn.Galina Kistanova2017-06-101-0/+1
| | | | llvm-svn: 305143
* Added dependency on the TableGen executable file.Galina Kistanova2017-06-101-13/+37
| | | | | | | | | | | | For the case when LLVM_OPTIMIZED_TABLEGEN is ON (enables LLVM_USE_HOST_TOOLS), we need both _TABLEGEN_TARGET and _TABLEGEN_EXE in the DEPENDS list to have .inc files rebuilt on a tablegen change, as cmake does not propagate file-level dependencies of custom targets. We could always have just one dependency on both the target and the file, but the 2 cases would produce cleaner cmake files. llvm-svn: 305142
* [IR] Remove stale comment from HungoffOperandTraits. NFCCraig Topper2017-06-101-3/+0
| | | | llvm-svn: 305141
* [IR] Delete operator new(size_t, unsigned) for ShuffleVector making it ↵Craig Topper2017-06-101-0/+2
| | | | | | consistent with other instructions that declare another operator new with a different signature. NFC llvm-svn: 305140
* [IR] Put a comment back on a function it belongs to. NFCCraig Topper2017-06-101-1/+1
| | | | | | Looks like the function was moved to a different part of the class in December, but the comment didn't move with it. llvm-svn: 305139
* [IR] Remove unnecessary override of operator new in ExtractValueInst. It's ↵Craig Topper2017-06-101-3/+0
| | | | | | already inherited from UnaryInstruction. NFC llvm-svn: 305138
* AMDGPU : Fix ISA Version Definitions.Wei Ding2017-06-106-29/+114
| | | | | | Differential Revision: http://reviews.llvm.org/D28531 llvm-svn: 305137
* Implement the non-parallel versions of exclusive_scan and ↵Marshall Clow2017-06-104-0/+409
| | | | | | transform_exclusive_scan. Reviewed as https://reviews.llvm.org/D34038. llvm-svn: 305136
* Relax the overflow checking of R_386_PC16.Rafael Espindola2017-06-103-5/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the freebsd early boot code fails to link. The issue reduces to 16 bit code at position 0x7000 wanting to jump to position 0x9000. That is represented in the .o file as a relocation with no symbol and an addend of 0x9000 - 2 (The -2 is because i386 uses the ip after the current instruction for jumps). If the addend is interpreted as signed (it should), it is -28674. In a 32 bit architecture, that is the address 0xffff8ffe. To get there from 0x7000 we have to add 4294909950 (too big) or subtract 57346 (too small). We then produce an error. What lld is missing is the fact that at runtime this will actually be a 16 bit architecture and adding 0x1ffe produces 0x8ffe which is the correct result in 16 bits (-28674). Since we have a 16 bit addend and a 16 bit PC, the relocation can move the PC to any 16 bit address and that is the only thing we really need to check: if the address we are pointing to fits in 16 bits. This is unfortunately hard to do since we have to delay subtracting the PC and if we want to do that outside of Target.cpp, we have to move the overflow check out too. An incomplete patch that tries to do that is at https://reviews.llvm.org/D34070 This patch instead just relaxes the check. Since the value we have is the destination minus the PC and the PC is 16 bits, it should fit in 17 bits if the destination fits in 16 too. bfd had a similar issue for some time and got a similar fix: https://sourceware.org/ml/binutils/2005-08/msg00001.html llvm-svn: 305135
* [ICF] Ignore SHF_GROUP flag when comparing two sections.Rui Ueyama2017-06-104-8/+39
| | | | | | | | | | | | | | | | | | | | SHF_GROUP bit doesn't make sense in executables or DSOs, so linkers are expected to remove that bit from section flags. We did that when we create output sections. This patch is to do that earlier than before. Now the flag is dropped when we instantiate input section objects. This change improves ICF. Previously, two sections that differ only in SHF_GROUP flag were not merged, because when the control reached ICF, the flag was still there. Now the flag is dropped before reaching to ICF, so the difference is ignored naturally. This issue was found by pcc. Differential Revision: https://reviews.llvm.org/D34074 llvm-svn: 305134
OpenPOWER on IntegriCloud