summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [docs] Use dbgs() instead of errs() for DEBUG()Jonas Devlieghere2017-12-251-5/+5
| | | | | | | | | | | | The examples in llvm/Support/Debug.h use `DEBUG(dbgs() << ...)` instead of `errs()`, so the examples in the Programmer's Manual should match that. Patch by: Moritz Sichert <moritz.sichert@googlemail.com> Differential revision: https://reviews.llvm.org/D41170 llvm-svn: 321444
* [ThinLTO] Don't import functions with noinline attributeEugene Leviant2017-12-253-1/+37
| | | | | | Differential revision: https://reviews.llvm.org/D41489 llvm-svn: 321443
* [libunwind] fix a typo in r321441.whitequark2017-12-251-1/+1
| | | | llvm-svn: 321442
* [libunwind] convert error logs to _LIBUNWIND_LOG/_LIBUNWIND_LOG0.whitequark2017-12-252-35/+35
| | | | | | | | | | | | | Use the `_LIBUNWIND_LOG` and `_LIBUNWIND_LOG0` macros instead of the explicit `fprintf` call. This was previously done in r292721 as a cleanup and then reverted in r293257 because the implementation in r292721 relied on a GNU extension. This implementation avoids the use of an extension by using a second macro instead, and allows to avoid the dependency on fprintf if _LIBUNWIND_BARE_METAL is defined. llvm-svn: 321441
* [libunwind] Avoid using C++ headers.whitequark2017-12-251-1/+1
| | | | | | This is useful for building libunwind on libcxx-free systems. llvm-svn: 321440
* [MC] - Disallow invalid section groups declarations.George Rimar2017-12-252-2/+16
| | | | | | | | | | | | This fixes parseGroup() so that it always sets error condition on error. Previously it was not done, because parseIdentifier looks never do that, assuming that caller should do it if he wants to. So previously cases from test were silently accepted and produced broken output. Differential revision: https://reviews.llvm.org/D41559 llvm-svn: 321439
* [SafepointIRVerifier] Allow non-dereferencing uses of unrelocated or ↵Max Kazantsev2017-12-254-27/+266
| | | | | | | | | | | | | | | | | | poisoned PHI nodes PHI that has at least one unrelocated input cannot cause any issues by itself, though its uses should be carefully verified. With this patch PHIs are allowed to have any inputs but when all inputs are unrelocated the PHI is marked as unrelocated and if not all inputs are unrelocated then the PHI is marked as poisoned. Poisoned pointers can be used only in three ways: to derive new pointers, in PHIs or in comparisons against constants that are exclusively derived from null. Patch by Daniil Suchkov! Differential Revision: https://reviews.llvm.org/D41006 llvm-svn: 321438
* [X86] Add a DAG combines to turn vXi64 muls into VPMULDQ/VPMULUDQ if the ↵Craig Topper2017-12-253-56/+54
| | | | | | | | | | upper bits are all sign bits or zeros. Normally we catch this during lowering, but vXi64 mul is considered legal when we have AVX512DQ. This DAG combine allows us to avoid PMULLQ with AVX512DQ if we can prove its unnecessary. PMULLQ is 3 uops that take 4 cycles each. While pmuldq/pmuludq is only one 4 cycle uop. llvm-svn: 321437
* [X86] Add avx512vl and avx512dq command lines to combine-pmuldq.ll to ↵Craig Topper2017-12-251-31/+101
| | | | | | | | demonstrate where we fail to use pmuldq/pmuludq and use to pmullq instead. It's nice that pmullq exists, but it has higher latency and probably lower throughput than pmuldq/pmuludq. We should prefer those if we can. llvm-svn: 321436
* [libcxx] Suppress unused warning on apple.Don Hinton2017-12-251-0/+1
| | | | | | | | | | | | | | | | Summary: This warning is already suppressed on non-apple platforms, so this change just suppresses it on apple as well. Reviewers: EricWF, lichray Reviewed By: lichray Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D41248 llvm-svn: 321435
* [cmake] Always respect existing CMAKE_REQUIRED_FLAGS when adding additional ↵Don Hinton2017-12-253-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | ones. Summary: Always respect existing CMAKE_REQUIRED_FLAGS when adding additional ones. This is important when cross compiling where --sysroot and -target were already added. In particular, this is needed when cross compiling from Darwin to Linux, since --sysroot is required to find headers and libraries. Cmake has a similar bug in check_include_file[_cxx] where CMAKE_REQUIRED_LIBRARIES isn't passed, which causes try_compile to fail. (please see https://gitlab.kitware.com/cmake/cmake/merge_requests/1620) Reviewers: compnerd, silvas, beanz, brad.king Reviewed By: compnerd Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D41568 llvm-svn: 321434
* [X86] Make some helper methods static functions instead. NFCCraig Topper2017-12-252-19/+15
| | | | llvm-svn: 321433
* [X86] Use SelectionDAG::getFPExtendOrRound to simplify some code.Craig Topper2017-12-251-10/+1
| | | | llvm-svn: 321432
* Fix PR35739: chkstk and chkst2 should only be built for WindowsDimitry Andric2017-12-241-4/+0
| | | | | | | | | | | | | | | | | | | | As reported in PR35739, rL252927 added the Windows specific chkstk and chkstk2 sources unconditionally, and since these are assembly without a NO_EXEC_STACK_DIRECTIVE at the end, automated vulnerability scanners warned about the objects having an executable stack. Avoid the problem by only including these files when Windows is targeted. Reviewers: compnerd, rnk, martell Reviewed By: martell Subscribers: mstorsjo, mgorny, martell, javed.absar, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D41567 llvm-svn: 321431
* Allow relocations in rw sections to create plt entries.Rafael Espindola2017-12-245-10/+24
| | | | | | | | | | | If a relocation cannot be implemented by the dynamic linker and the section is rw, allow creating a plt entry to use as the function address as if the section was ro. This matches bfd and gold. It also matches our behavior with -z notext. llvm-svn: 321430
* [AST] Inline CompoundStmt contents into the parent allocation.Benjamin Kramer2017-12-248-59/+62
| | | | | | Saves a pointer on every CompoundStmt. llvm-svn: 321429
* [AST] Convert AttributedStmt to llvm::TrailingObjects.Benjamin Kramer2017-12-242-7/+8
| | | | | | No functionality change intended. llvm-svn: 321428
* [OPENMP] Fix the tests for 32bits targets, NFC.Alexey Bataev2017-12-242-6/+6
| | | | llvm-svn: 321427
* [X86][AVX] Add AVX1/AVX2 vmul testsSimon Pilgrim2017-12-241-939/+2056
| | | | llvm-svn: 321426
* Make helpers static. No functionality change.Benjamin Kramer2017-12-244-6/+15
| | | | llvm-svn: 321425
* [X86][X87] Mark pseudo memory fold instructions as load/sideeffects ↵Simon Pilgrim2017-12-242-5/+3
| | | | | | | | (PR21160, PR34080, PR34454). Match regular x87 memory fold instructions with load/sideeffects tags, to prevent the schedulers from re-ordering them across the fnstcw/fldcw sequences for truncating stores while they are still pseudo during the stack conversion pass. llvm-svn: 321424
* [X86][X87] Renamed CHECK prefix, its not actually broken anymore just ↵Simon Pilgrim2017-12-241-39/+39
| | | | | | scheduled differently llvm-svn: 321423
* [X86][X87] Add another test case mentioned on PR34080Simon Pilgrim2017-12-241-0/+136
| | | | | | Did my best to reduce this, but the X87 scheduling bug is hard to hit at the best of times... llvm-svn: 321422
* [OMPT] Set and reset frame address when creating a task with dependencesJoachim Protze2017-12-242-13/+31
| | | | | | | | | As for normal task creation, the task frame addresses need to be stored for the encountering task. Differential Revision: https://reviews.llvm.org/D41165 llvm-svn: 321421
* [X86] Fix (v2f64 (s/uint_to_fp (v2i1))) to avoid scalarization without AVX512DQ.Craig Topper2017-12-243-45/+44
| | | | | | Previously we extended v2i1 to v2f64 and then tried to use cvtuqq2pd/cvtqq2pd, but that only works with avx512dq. So we ended up scalarizing it. Now we widen to v4i1 first and extend to v4i32. llvm-svn: 321420
* [MC] - Teach llvm-mc to handle comdats whose names are numbers.George Rimar2017-12-242-1/+33
| | | | | | | | | | | | | | | Currently llvm-mc ignores COMDATs whose names are numbers, for example following code: .section .foo,"G",@progbits,123,comdat would produce no COMDATs at all. Patch fixes the issue. Differential revision: https://reviews.llvm.org/D41552 llvm-svn: 321419
* Fix output section offset and contents when linker script uses memory region ↵Rafael Espindola2017-12-242-0/+38
| | | | | | | | | | | | | | | | | and data commands. Advance the memory region offset when handling a linker script data command such as BYTE or LONG. Failure to advance the offset results in corrupted output with overlapping sections. Update tests to check for this combination of both a) memory regions and b) data commands. Fixes https://bugs.llvm.org/show_bug.cgi?id=35565 Patch by Owen Shaw! llvm-svn: 321418
* [DAGCombiners] Don't turn ANDs to shuffles with zero so early. Give some ↵Craig Topper2017-12-242-9/+8
| | | | | | | | other combines a chance to run. This moves the combine for turning ANDs into shuffle with zero out of SimplifyVBinOps and places it only in visitAND below the reassociate handling. This fixes the specific case I noticed where we failed to combine two ands with constants. llvm-svn: 321417
* [X86] Add assembler predicates to BITALG/VBMI2/VNNI features to be ↵Craig Topper2017-12-241-3/+6
| | | | | | consistent with the other AVX512 ISAs. llvm-svn: 321416
* [X86] Teach WidenMaskArithmetic to handle any constant buildvector on the ↵Craig Topper2017-12-243-31/+117
| | | | | | RHS not just all zeros/ones. llvm-svn: 321415
* [SelectionDAG] Teach SelectionDAG::getNode to constant fold zext/aext/sext ↵Craig Topper2017-12-235-30/+25
| | | | | | of constant build vectors. llvm-svn: 321414
* [CallSiteSplitting] Remove isOrHeader restriction.Florian Hahn2017-12-233-27/+176
| | | | | | | | | | | By following the single predecessors of the predecessors of the call site, we do not need to restrict the control flow. Reviewed By: junbuml, davide Differential Revision: https://reviews.llvm.org/D40729 llvm-svn: 321413
* [clangd] Use Builder for symbol slabs, and use sorted-vector for storageSam McCall2017-12-2311-119/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This improves a few things: - the insert -> freeze -> read sequence is now enforced/communicated by the type system - SymbolSlab::const_iterator iterates over symbols, not over id-symbol pairs - we avoid permanently storing a second copy of the IDs, and the string map's hashtable The slab size is now down to 21.8MB for the LLVM project. Of this only 2.7MB is strings, the rest is #symbols * `sizeof(Symbol)`. `sizeof(Symbol)` is currently 96, which seems too big - I think SymbolInfo isn't efficiently packed. That's a topic for another patch! Also added simple API to see the memory usage/#symbols of a slab, since it seems likely we will continue to care about this. Reviewers: ilya-biryukov Subscribers: klimek, mgrang, cfe-commits Differential Revision: https://reviews.llvm.org/D41506 llvm-svn: 321412
* [Index] Reduce size of SymbolInfo struct.Sam McCall2017-12-233-38/+43
| | | | | | | | | | | | | | | | | | | | | Summary: This is currently 16 bytes, the patch reduces it to 4. (Building with clang on linux x84, I guess others are similar) The only subfield that might need a bigger type is SymbolPropertySet, I've moved it to the end of the struct so if it grows, SymbolInfo will only be 8 bytes. With a full index of namespace-scope symbols from the LLVM project (200k) loaded into clangd, this saves ~2MB of RAM. Reviewers: akyrtzi Subscribers: ilya-biryukov, cfe-commits Differential Revision: https://reviews.llvm.org/D41514 llvm-svn: 321411
* [NFC] Remove a cast rendered unnecessary by r321409Faisal Vali2017-12-231-1/+1
| | | | | | See https://reviews.llvm.org/rC321409 for additional context. llvm-svn: 321410
* [NFC] Update the template-parameter parsers and analyzers to return ↵Faisal Vali2017-12-234-16/+16
| | | | | | | | NamedDecl (vs Decl) This patch addresses a FIXME and has the template-parameter processing functions return a more derived common type NamedDecl (as opposed to a type needlessly higher up in the inheritance hierarchy : Decl). llvm-svn: 321409
* [X86] Remove type restrictions from WidenMaskArithmetic.Craig Topper2017-12-234-94/+40
| | | | | | This can help AVX-512 code where mask types are legal allowing us to remove extends and truncates to/from mask types. llvm-svn: 321408
* [X86] In WidenMaskArithmetic, make sure we check the input type of a ↵Craig Topper2017-12-231-1/+2
| | | | | | | | truncate on N1. Later in the code we explicitly bypass the truncate so we should be checking its type to make sure that it's safe. llvm-svn: 321407
* [X86] Remove unneeded EVT variable. NFCCraig Topper2017-12-231-6/+5
| | | | | | | | Immediately after it is created we check if its equal to another EVT. Then we inconsistently use one or the other variables in the code below. Instead do the equality check directly on the getValueType result and remove the variable. Use the origina VT variable throughout the remaining code. llvm-svn: 321406
* [X86][X87] Wrap FpI_ pseudo to use PseudoI. NFCI.Simon Pilgrim2017-12-231-2/+1
| | | | llvm-svn: 321405
* Detemplate reportDuplicate.Rafael Espindola2017-12-2310-126/+98
| | | | | | | | | | We normally avoid "switch (Config->EKind)", but in this case I think it is worth it. It is only executed when there is an error and it allows detemplating a lot of code. llvm-svn: 321404
* [ELF] - Fix mistype in comment. NFC.George Rimar2017-12-231-1/+1
| | | | llvm-svn: 321403
* [SCCP] Manually fold branches on undef.Davide Italiano2017-12-231-3/+26
| | | | | | | | | | | | | | | This code was originally removed and replace with an assertion because believed unnecessary. It turns out there was simply no test coverage for this case, and the constant folder doesn't yet know about patterns like `br undef %label1, %label2`. Presumably at some point the constant folder might learn about these patterns, but it's a broader change. A testcase will be added to make sure this doesn't regress again in the future. Fixes PR35723. llvm-svn: 321402
* [X86] Add default InstrItinClass to PseudoISimon Pilgrim2017-12-231-2/+3
| | | | | | This will be used to help tidyup existing pseudos that we've added scheduling info to. llvm-svn: 321401
* [ELF] - Allow using PLT relocations when "-z notext" is given.George Rimar2017-12-233-28/+68
| | | | | | | | | | | | | | | This is part of PR35720. Currently LLD allows dynamic relocations against text when -z notext is given. Though for non-PIC relocations like R_X86_64_PC32 that does not work, we produce "relocation R_X86_64_PC32 cannot be used against shared object;" error because they may overflow in runtime. Solution implemented is to use PLT for them. Differential revision: https://reviews.llvm.org/D41541 llvm-svn: 321400
* [X86] Pass the right VT to the getZeroExtendInReg introduced in r321398Craig Topper2017-12-231-1/+1
| | | | | | Apparently we don't have tests for this which I didn't realize before. I'll try to fix that but wanted to fix the obvious bug. llvm-svn: 321399
* [X86] Use SelectionDAG::getZeroExtendInReg instead of implementing it manually.Craig Topper2017-12-231-9/+3
| | | | llvm-svn: 321398
* [SelectionDAG][X86] Don't use ->getValueType(0) after a call to getOperand ↵Craig Topper2017-12-234-14/+14
| | | | | | | | | | to get the type of the operand. getOperand returns an SDValue that contains the node and the result number. There is no guarantee that the result number if 0. By using the -> operator we are calling SDNode::getValueType rather than SDValue::getValueType. This requires supplying a result number and we shouldn't assume it was 0. I don't have a test case. Just noticed while cleaning up some other code and saw that it occurred in other places. llvm-svn: 321397
* [ODRHash] Disable hashing on methods.Richard Trieu2017-12-231-0/+3
| | | | | | | Turn off hashing for class methods, but leave it on for other functions. This should get the buildbot to green for the time being. llvm-svn: 321396
* [ODRHash] Support ODR violation detection in functions.Richard Trieu2017-12-2310-49/+456
| | | | | | | Extend the hashing to functions, which allows detection of function definition mismatches across modules. This is a re-commit of r320230. llvm-svn: 321395
OpenPOWER on IntegriCloud