summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Added helper to get size of PrecompiledPreambleIlya Biryukov2017-12-212-4/+32
| | | | llvm-svn: 321266
* [OMPT] Fix return address handling in a few GOMP interface methodsJoachim Protze2017-12-212-8/+14
| | | | | | | | | | | This revision fixes failing testcases with parallel for loops and the gomp interface. The return address needs to be stored at entry to runtime. The storage is cleared on usage, so we need to update the storage before calling again internal functions, that will trigger event callbacks. Differential Revision: https://reviews.llvm.org/D41181 llvm-svn: 321265
* [OMPT] Handle null pointer in set_callback to improve performanceJoachim Protze2017-12-211-2/+5
| | | | | | | | | | | | | We use the bitmap ompt_enabled thoughout the runtime, to avoid loading the vector of callback functions when testing if specific code should be executed. Before invoking an event callback function, the pointer is tested for NULL. This revision resets the corresponding bit in ompt_enabled to 0 if NULL is passed in set_callback. Differential Revision: https://reviews.llvm.org/D41171 llvm-svn: 321264
* [OMPT] Use frames at different level when using clang version 5 or higher ↵Joachim Protze2017-12-217-18/+35
| | | | | | | | | | | | with debug flag Clang 5 or higher adds an intermediate function call in certain cases when compiling with debug flag. This revision updates the testcases to work correctly. Differential Revision: https://reviews.llvm.org/D40595 llvm-svn: 321263
* [OMPT] Add annotations to testcases that are expected to fail when using ↵Joachim Protze2017-12-2126-7/+32
| | | | | | | | | | | | | | | | | certain compilers Reasons for expected failures are mainly bugs when using lables in OpenMP regions or missing support of some OpenMP features. For some worksharing clauses, support to distinguish the kind of workshare was added just recently. If an issue was fixed in a minor release version of a compiler, we flag the test as unsupported for this compiler version to avoid false positives. Same for fixes that where backported to older compiler versions. Differential Revision: https://reviews.llvm.org/D40384 llvm-svn: 321262
* [X86] Add v48i8 AVG test case, based on discussion on D41440Simon Pilgrim2017-12-211-0/+404
| | | | llvm-svn: 321261
* [mips][compiler-rt] Provide 64bit atomic add and subSimon Dardis2017-12-213-73/+125
| | | | | | | | | | | | | r318733 introduced a build failure for native MIPS32 systems for xray due to the lack of __sync_fetch_and_add / __syn_fetch_and_sub support. This patch extends the existing support providing atomics so that xray can be successfully built. Reviewers: atanasyan, dberris Differential Revision: https://reviews.llvm.org/D40385 llvm-svn: 321260
* [DAGCombine] Improve ReduceLoadWidth for SRLSam Parker2017-12-213-22/+140
| | | | | | | | | | | If the SRL node is only used by an AND, we may be able to set the ExtVT to the width of the mask, making the AND redundant. To support this, another check has been added in isLegalNarrowLoad which queries whether the load is valid. Differential Revision: https://reviews.llvm.org/D41350 llvm-svn: 321259
* [AArch64] add required arch specific code for running OMPT test casesPaul Osmialowski2017-12-211-0/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D41482 llvm-svn: 321258
* [Support] Remove MemoryBuffer::getNewUninitMemBufferPavel Labath2017-12-213-20/+9
| | | | | | | | | | | There is nothing useful that can be done with a read-only uninitialized buffer without const_casting its contents to initialize it. A better solution is to obtain a writable buffer (WritableMemoryBuffer::getNewUninitMemBuffer), and then convert it to a read-only buffer after initialization. All callers of this function have already been updated to do this, so this function is now unused. llvm-svn: 321257
* [ARM] Armv8-R DFB instructionSam Parker2017-12-219-5/+49
| | | | | | | | Implement MC support for the Armv8-R 'Data Full Barrier' instruction. Differential Revision: https://reviews.llvm.org/D41430 llvm-svn: 321256
* Make sure DataBufferLLVM contents are writablePavel Labath2017-12-2112-79/+61
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: We sometimes need to write to the object file we've mapped into memory, generally to apply relocations to debug info sections. We've had that ability before, but with the introduction of DataBufferLLVM, we have lost it, as the underlying llvm class (MemoryBuffer) only supports read-only mappings. This switches DataBufferLLVM to use the new llvm::WritableMemoryBuffer class as a back-end, as this one guarantees to return a writable buffer. This removes the need for the "Private" flag to the DataBufferLLVM creation functions, as it was really used to mean "writable". The LLVM function also does not have the NullTerminate flag, so I've modified our clients to not require this feature and removed that flag as well. Reviewers: zturner, clayborg, jingham Subscribers: emaste, aprantl, arichardson, krytarowski, lldb-commits Differential Revision: https://reviews.llvm.org/D40079 llvm-svn: 321255
* [llvm-readobj] Fix ambiguous call to the `printNumber`Simon Atanasyan2017-12-211-1/+1
| | | | llvm-svn: 321254
* [llvm-readobj] Support 'GNU' style for MIPS GOT/PLT dumpingSimon Atanasyan2017-12-213-263/+611
| | | | | | | | | | This change adds `printMipsGOT` and `printMipsPLT` methods to the `DumpStyle` class and overrides them in the `GNUStyle` and `LLVMStyle` descendants. To pass information about GOT/PLT layout into these methods, the `MipsGOTParser` class has been extended to hold all necessary data. llvm-svn: 321253
* [clangd] Use the clang-tools-extra as the official repo for `vscode-clangd` ↵Haojian Wu2017-12-214-15/+88
| | | | | | | | | | | | | | | | | | | | | | | extension. Summary: Previously, we use a separate GitHub repository (https://github.com/llvm-vs-code-extensions/vscode-clangd) for publishing `vscode-clangd` extension to marketplace. To reduce the maintain burden, we will use the vscode extension in the clang-tools-extra, and deprecate the one on GitHub. Test in https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.clangd-vscode-test Reviewers: sammccall, krasimir Reviewed By: sammccall Subscribers: klimek, ilya-biryukov, cfe-commits Differential Revision: https://reviews.llvm.org/D41391 llvm-svn: 321252
* [X86] Use PSHUFB for v32i16 shuffles before falling back to VPERMW/VPERMI2W.Craig Topper2017-12-212-0/+19
| | | | | | PSHUFB has the ability to implicitly 0 elements which VPERMI2W can't do. So give a chance to use it first. llvm-svn: 321251
* [CodeGen] Fix access sizes in new-format TBAA tagsIvan A. Kosarev2017-12-211-1/+3
| | | | | | | | | | | | The new format requires to specify both the type of the access and its size. This patch fixes setting access sizes for TBAA tags that denote accesses to structure members. This fix affects all future TBAA metadata tests for the new format, so I guess we don't need any special tests for this fix. Differential Revision: https://reviews.llvm.org/D41452 llvm-svn: 321250
* [X86] Use VPERMI2B for v16i8 shuffles if we have VBMI+VLX and would have ↵Craig Topper2017-12-212-20/+38
| | | | | | otherwise used two PSHUFBs ORed together. llvm-svn: 321249
* [X86] Use VPERMB/VPERMI2B for v32i8 shuffle lowering if VBMI and VLX are ↵Craig Topper2017-12-212-143/+252
| | | | | | supported. llvm-svn: 321248
* [X86] Add avx512vbmi command lines to vector-shuffle-256-v32.llCraig Topper2017-12-211-211/+372
| | | | llvm-svn: 321247
* [WebAssembly] Remove unneeded sub-directorySam Clegg2017-12-215-4/+4
| | | | | | | | | This is the only wasm def (and likely likely will be for the foreseeable) file so no need for a sub-directory Differential Revision: https://reviews.llvm.org/D41476 llvm-svn: 321246
* [WebAssmebly] Fix references to weak aliasesSam Clegg2017-12-213-12/+13
| | | | | | | | Corresponding LLVM change: https://reviews.llvm.org/D41472 Differential Revision: https://reviews.llvm.org/D41473 llvm-svn: 321244
* Revert "Expose a TargetMachine::getTargetTransformInfo function"Sanjoy Das2017-12-2129-84/+89
| | | | | | This reverts commit r321234. It breaks the -DBUILD_SHARED_LIBS=ON build. llvm-svn: 321243
* [WebAssembly] Fix local references to weak aliasesSam Clegg2017-12-214-35/+74
| | | | | | | | | | | | | | | | When weak aliases are used with in same translation unit we need to be able to directly reference to alias and not just the thing it is aliases. We do this by defining both a wasm import and a wasm export in this case that result in a single Symbol. This change is a partial revert of rL314245. A corresponding lld change address the previous issues we had with this. See: https://github.com/WebAssembly/tool-conventions/issues/34 Differential Revision: https://reviews.llvm.org/D41472 llvm-svn: 321242
* [WebAssembly] Improve weak alias tests casesSam Clegg2017-12-213-28/+114
| | | | | | | | | | | Based on: https://github.com/WebAssembly/tool-conventions/issues/34 Currently weak-alias-overide.ll exhibits incorrect behaviour in that call_direct() calls the wrong function. Differential Revision: https://reviews.llvm.org/D41460 llvm-svn: 321241
* Pass an InputFile to the InputSection constructor.Rafael Espindola2017-12-215-15/+14
| | | | | | | This simplifies toRegularSection and reduces the noise in a followup patch. llvm-svn: 321240
* Fix for PR32990Erich Keane2017-12-216-27/+138
| | | | | | | | | This fixes the bug in https://bugs.llvm.org/show_bug.cgi?id=32990. Patch By: zahiraam Differential Revision: https://reviews.llvm.org/D39063 llvm-svn: 321239
* Convert a few more InputFiles to references.Rafael Espindola2017-12-213-48/+48
| | | | | | | We use null files in sections to represent linker created sections, so ObjFile<ELFT> is never null. llvm-svn: 321238
* Reverting a file that snuck in with r321229 by accident.Aaron Ballman2017-12-211-1/+1
| | | | llvm-svn: 321237
* [SimplifyCFG] Avoid quadratic on a predecessors number behavior in ↵Michael Zolotukhin2017-12-213-25/+19
| | | | | | | | | | | | | | | | | | | | | | instruction sinking. If a block has N predecessors, then the current algorithm will try to sink common code to this block N times (whenever we visit a predecessor). Every attempt to sink the common code includes going through all predecessors, so the complexity of the algorithm becomes O(N^2). With this patch we try to sink common code only when we visit the block itself. With this, the complexity goes down to O(N). As a side effect, the moment the code is sunk is slightly different than before (the order of simplifications has been changed), that's why I had to adjust two tests (note that neither of the tests is supposed to test SimplifyCFG): * test/CodeGen/AArch64/arm64-jumptable.ll - changes in this test mimic the changes that previous implementation of SimplifyCFG would do. * test/CodeGen/ARM/avoid-cpsr-rmw.ll - in this test I disabled common code sinking by a command line flag. llvm-svn: 321236
* Detemplate createCommentSection.Rafael Espindola2017-12-215-25/+21
| | | | | | | It was only templated so it could create a dummy section header that was immediately parsed back. llvm-svn: 321235
* Expose a TargetMachine::getTargetTransformInfo functionSanjoy Das2017-12-2129-89/+84
| | | | | | | | | | | | | | | | | | | | | | | Summary: This makes the TargetMachine interface a bit simpler. We still need the std::function in TargetIRAnalysis to avoid having to add a dependency from Analysis to Target. See discussion: http://lists.llvm.org/pipermail/llvm-dev/2017-December/119749.html I avoided adding all of the backend owners to this review since the change is simple, but let me know if you feel differently about this. Reviewers: echristo, MatzeB, hfinkel Reviewed By: hfinkel Subscribers: jholewinski, jfb, arsenm, dschuff, mcrosier, sdardis, nemanjai, nhaehnle, javed.absar, sbc100, jgravelle-google, aheejin, kbarton, llvm-commits Differential Revision: https://reviews.llvm.org/D41464 llvm-svn: 321234
* Attempt to pacify 4.8.5 with makeArrayRefReid Kleckner2017-12-211-1/+1
| | | | llvm-svn: 321233
* [ubsan] Diagnose noreturn functions which return (compiler-rt)Vedant Kumar2017-12-213-4/+24
| | | | | | | | This is paired with the clang change: https://reviews.llvm.org/D40698 Differential Revision: https://reviews.llvm.org/D40700 llvm-svn: 321232
* [ubsan] Diagnose noreturn functions which returnVedant Kumar2017-12-218-19/+135
| | | | | | | | | | | | | | | | | | Diagnose 'unreachable' UB when a noreturn function returns. 1. Insert a check at the end of functions marked noreturn. 2. A decl may be marked noreturn in the caller TU, but not marked in the TU where it's defined. To diagnose this scenario, strip away the noreturn attribute on the callee and insert check after calls to it. Testing: check-clang, check-ubsan, check-ubsan-minimal, D40700 rdar://33660464 Differential Revision: https://reviews.llvm.org/D40698 llvm-svn: 321231
* [Driver] Ensure no overlap between trapping & recoverable sanitizers. NFC.Vedant Kumar2017-12-212-0/+4
| | | | | | | This is NFC because in EmitCheck(), -fsanitize-trap=X overrides -fsanitize-recover=X. llvm-svn: 321230
* Reverting r321223 and its follow-up commit because of failing bots due to ↵Aaron Ballman2017-12-2018-1996/+1980
| | | | | | Misc/ast-dump-color.cpp. llvm-svn: 321229
* Silence a -Wreorder warning from r321223.Aaron Ballman2017-12-201-2/+2
| | | | llvm-svn: 321228
* [clangd-fuzzer] Update ClangdLSPServer constructor call.Matt Morehouse2017-12-201-1/+2
| | | | | | Build was broken by r321092. llvm-svn: 321226
* [orc][cmake] Check if 8 byte atomics require libatomic for unittestSimon Dardis2017-12-201-1/+6
| | | | | | | | | | | | | rL319838 introduced SymbolStringPool which uses 8 byte atomics for reference counters. On systems which do not support such atomics natively such as MIPS32, explicitly add libatomic as one of the libraries for SymbolStringPool's unittest. Reviewers: lhames, beanz Differential Revision: https://reviews.llvm.org/D41010 llvm-svn: 321225
* [ARM] Optimize {s,u}{add,sub}.with.overflow.Joel Galenson2017-12-203-2/+207
| | | | | | | | The AArch64 backend contains code to optimize {s,u}{add,sub}.with.overflow during SelectionDAG. This commit ports that code to the ARM backend. Differential revision: https://reviews.llvm.org/D35635 llvm-svn: 321224
* Add a printing policy to the ASTDumper.Aaron Ballman2017-12-2017-1979/+1995
| | | | | | This allows you to dump C++ code that spells bool instead of _Bool, leaves off the elaborated type specifiers when printing struct or class names, and other C-isms. llvm-svn: 321223
* Fix an assertion failure regression in isDesignatorAtObjectEnd forAlex Lorenz2017-12-202-1/+23
| | | | | | | | | | | | | | __builtin_object_size with incomplete array type in struct The commit r316245 introduced a regression that causes an assertion failure when Clang tries to cast an IncompleteArrayType to a PointerType when evaluating __builtin_object_size. rdar://36094951 Differential Revision: https://reviews.llvm.org/D41405 llvm-svn: 321222
* [Hexagon] Use ArrayRef member functions instead of custom onesKrzysztof Parzyszek2017-12-201-19/+10
| | | | llvm-svn: 321221
* [Hexagon] Allow construction of HVX vector predicatesKrzysztof Parzyszek2017-12-2011-170/+408
| | | | | | Handle BUILD_VECTOR of boolean values. llvm-svn: 321220
* Use dyn_cast instead of dyn_cast_or_null.Rafael Espindola2017-12-202-2/+2
| | | | | | There should be no null sections in InputSections. llvm-svn: 321219
* [Hexagon] Legalize vector elements to i32 in buildVector32/64Krzysztof Parzyszek2017-12-201-15/+22
| | | | llvm-svn: 321218
* Do not generate an empty switch statement as it causes MSVC to issue ↵Aaron Ballman2017-12-201-4/+7
| | | | | | diagnostics about switch statements without case or default labels. llvm-svn: 321217
* clang-format. NFC.Rafael Espindola2017-12-201-5/+5
| | | | llvm-svn: 321216
* bpf: add support for objdump -print-imm-hexYonghong Song2017-12-202-5/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for 'objdump -print-imm-hex' for imm64, operand imm and branch target. If user programs encode immediate values as hex numbers, such an option will make it easy to correlate asm insns with source code. This option also makes it easy to correlate imm values with insn encoding. There is one changed behavior in this patch. In old way, we print the 64bit imm as u64: O << (uint64_t)Op.getImm(); and the new way is: O << formatImm(Op.getImm()); The formatImm is defined in llvm/MC/MCInstPrinter.h as format_object<int64_t> formatImm(int64_t Value) So the new way to print 64bit imm is i64 type. If a 64bit value has the highest bit set, the old way will print the value as a positive value and the new way will print as a negative value. The new way is consistent with x86_64. For the code (see the test program): ... if (a == 0xABCDABCDabcdabcdULL) ... x86_64 objdump, with and without -print-imm-hex, looks like: 48 b8 cd ab cd ab cd ab cd ab movabsq $-6067004223159161907, %rax 48 b8 cd ab cd ab cd ab cd ab movabsq $-0x5432543254325433, %rax Signed-off-by: Yonghong Song <yhs@fb.com> llvm-svn: 321215
OpenPOWER on IntegriCloud