summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [OpenMP][libomptarget] Add function for checking SPMD modeGheorghe-Teodor Bercea2018-05-152-0/+8
| | | | | | | | | | | | | | Summary: Add function to the NVPTX libomptarget library that will return true if the current target region is being executed in SPMD mode. Reviewers: ABataev, grokos, carlo.bertolli, caomhin Reviewed By: grokos Subscribers: guansong, openmp-commits Differential Revision: https://reviews.llvm.org/D46840 llvm-svn: 332360
* [SI] Create Scop Name lazilyPhilip Pfaffe2018-05-152-4/+9
| | | | | | | | | | | | | Summary: Creating the Scop name is expensive, because creating the Region name it's derived from is expensive. So create the name lazily, because getName() is actually called rarely. This is a reiteration of r328666, which introduced a use-after-free and got reverted in r331363. Differential Revision: https://reviews.llvm.org/D46868 llvm-svn: 332359
* [DAG] propagate FMF for all FPMathOperatorsSanjay Patel2018-05-158-77/+55
| | | | | | | | | | | | | | | | | This is a simple hack based on what's proposed in D37686, but we can extend it if needed in follow-ups. It gets us most of the FMF functionality that we want without adding any state bits to the flags. It also intentionally leaves out non-FMF flags (nsw, etc) to minimize the patch. It should provide a superset of the functionality from D46563 - the extra tests show propagation and codegen diffs for fcmp, vecreduce, and FP libcalls. The PPC log2() test shows the limits of this most basic approach - we only applied 'afn' to the last node created for the call. AFAIK, there aren't any libcall optimizations based on the flags currently, so that shouldn't make any difference. Differential Revision: https://reviews.llvm.org/D46854 llvm-svn: 332358
* [X86] Split off F16C WriteCvtPH2PS/WriteCvtPS2PH scheduler classesSimon Pilgrim2018-05-1515-145/+127
| | | | | | | | | Btver2 - VCVTPH2PSYrm needs to double pump the AGU Broadwell - missing VCVTPS2PH*mr stores extra latency Allows us to remove the WriteCvtF2FSt conversion store class llvm-svn: 332357
* [llvm-objcopy] Add --keep-symbol (-K) optionPaul Semel2018-05-154-0/+114
| | | | | | | | | This option permits to explicitly keep the specified symbol so that it doesn't get removed. Differential Revision: https://reviews.llvm.org/D46819 llvm-svn: 332356
* [arc] Remove unittesting from arcconfigPhilip Pfaffe2018-05-154-310/+1
| | | | | | | | | | | | | | Summary: Unittests aren't working, and I don't think they ever were. Just remove them, so that we don't have to write `arc --nounit` all the time. Reviewers: grosser, Meinersbur, bollu Subscribers: bollu, pollydev, llvm-commits Differential Revision: https://reviews.llvm.org/D46869 llvm-svn: 332355
* Fix broken asan Support testsEric Liu2018-05-151-8/+14
| | | | | | | | The asan failures were caught in google internal asan tests after r332311 o Make StackOption support cl::list o Rememeber to removeArguments for cl::alias in tests. llvm-svn: 332354
* Reapply "Remove Process references from the Host module"Pavel Labath2018-05-159-28/+38
| | | | | | This re-lands r332250/D46395, after fixing Mac build errors. llvm-svn: 332353
* [polly] Update uses of DEBUG macro to LLVM_DEBUG.Nicola Zaghen2018-05-1521-238/+268
| | | | | | | | | | | The DEBUG() macro is very generic so it might clash with other projects. The renaming was done as follows: - git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/LLVM_DEBUG(/g' - git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 -style LLVM Differential Revision: https://reviews.llvm.org/D44978 llvm-svn: 332352
* [lld] Update uses of DEBUG macro to LLVM_DEBUG.Nicola Zaghen2018-05-1511-94/+102
| | | | | | | | | | | The DEBUG() macro is very generic so it might clash with other projects. The renaming was done as follows: - git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/LLVM_DEBUG(/g' - git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 -style LLVM Differential Revision: https://reviews.llvm.org/D44977 llvm-svn: 332351
* [clang] Update uses of DEBUG macro to LLVM_DEBUG.Nicola Zaghen2018-05-1527-126/+136
| | | | | | | | | | | | | The DEBUG() macro is very generic so it might clash with other projects. The renaming was done as follows: - git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/LLVM_DEBUG(/g' - git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 -style LLVM Explicitly avoided changing the strings in the clang-format tests. Differential Revision: https://reviews.llvm.org/D44975 llvm-svn: 332350
* Reapply "DWARFVerifier: Check "completeness" of .debug_names section"Pavel Labath2018-05-155-4/+392
| | | | | | | | | This is a resubmit of r331868 (D46583), which was reverted due to failures on the PS4 bot. These have been resolved with r332246/D46748. llvm-svn: 332349
* [llvm-exegesis] Split AsmTemplate.Name into components.Clement Courbet2018-05-155-24/+44
| | | | | | | | | | | | | | Summary: AsmTemplate becomes IntructionBenchmarkKey, which has three components. This allows retreiving the opcode for analysis. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D46873 llvm-svn: 332348
* [llvm-mca][x86] Add F16C instruction testsSimon Pilgrim2018-05-155-0/+302
| | | | llvm-svn: 332347
* Fix compilation under pre-c++14 gccs.Clement Courbet2018-05-151-1/+1
| | | | llvm-svn: 332346
* Fix r332344: only the native target is linked.Clement Courbet2018-05-151-1/+4
| | | | llvm-svn: 332345
* [llvm-exegesis] Add an analysis mode.Clement Courbet2018-05-156-40/+209
| | | | | | | | | | | | | | | | Summary: The analysis mode gives the user a clustered view of the measurement results. Next steps are (requires the split ok AsmTemplate.Name into {mnemonic, mode}): - Show the sched class. - Highlight any inconsistencies with the checked-in data. Reviewers: gchatelet Subscribers: mgorny, llvm-commits, tschuett Differential Revision: https://reviews.llvm.org/D46865 llvm-svn: 332344
* [Solaris] Only define _REENTRANT if -pthreadRainer Orth2018-05-151-1/+2
| | | | | | | | | | | | When looking at lib/Basic/Targets/OSTargets.h, I noticed that _REENTRANT is defined unconditionally on Solaris, unlike all other targets and what either Studio cc (only define it with -mt) or gcc (only define it with -pthread) do. This patch follows that lead. Differential Revision: https://reviews.llvm.org/D41241 llvm-svn: 332343
* [MergeFunctions] Fix merging of small weak functionswhitequark2018-05-152-35/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | When two interposable functions are merged, we cannot replace uses and have to emit calls to a common internal function. However, writeThunk() will not actually emit a thunk if the function is too small. This leaves us in a broken state where mergeTwoFunctions already rewired the functions, but writeThunk doesn't do anything. This patch changes the implementation so that: * writeThunk() does just that. * The direct replacement of calls is moved into mergeTwoFunctions() into the non-interposable case only. * isThunkProfitable() is extracted and will be called for the non-iterposable case always, and in the interposable case only if uses are still left after replacement. This issue has been introduced in https://reviews.llvm.org/D34806, where the code for checking thunk profitability has been moved. Differential Revision: https://reviews.llvm.org/D46804 Reviewed By: whitequark llvm-svn: 332342
* [mips] Fix formatting of floating point conversion patternsSimon Dardis2018-05-151-8/+8
| | | | llvm-svn: 332341
* [mips] Add disassembly support for comparison instructionsSimon Dardis2018-05-153-4/+198
| | | | llvm-svn: 332340
* [mips] Fix predicates of mfc1, mtc1 instructionsSimon Dardis2018-05-157-28/+46
| | | | | | | | Reviewers: atanasyan, abeserminji, smaksimovic Differential Revision: https://reviews.llvm.org/D46692 llvm-svn: 332339
* [ASTImporter] Extend lookup logic in class templatesAleksei Sidorin2018-05-152-2/+41
| | | | | | | | | | | | | | During import of a class template, lookup may find a forward declaration and structural match falsely reports equivalency between a forward decl and a definition. The result is that some definitions are not imported if we had imported a forward decl previously. This patch gives a fix. Patch by Gabor Marton! Differential Revision: https://reviews.llvm.org/D46353 llvm-svn: 332338
* [llvm-mca] Remove unused include header files. NFCAndrea Di Biagio2018-05-151-4/+3
| | | | | | Also, run clang-format on RetireControlUnit.cpp. llvm-svn: 332337
* [X86] Improve unsigned saturation downconvert detection.Artur Gainullin2018-05-153-77/+81
| | | | | | | | | | | | | | | | | | | | | | | Summary: New unsigned saturation downconvert patterns detection was implemented in X86 Codegen: (truncate (smin (smax (x, C1), C2)) to dest_type), where C1 >= 0 and C2 is unsigned max of destination type. (truncate (smax (smin (x, C2), C1)) to dest_type) where C1 >= 0, C2 is unsigned max of destination type and C1 <= C2. These two patterns are equivalent to: (truncate (umin (smax(x, C1), unsigned_max_of_dest_type)) to dest_type) Reviewers: RKSimon Subscribers: llvm-commits, a.elovikov Differential Revision: https://reviews.llvm.org/D45315 llvm-svn: 332336
* Make ast-print-record-decl.c pass on Windows after r332314Hans Wennborg2018-05-151-2/+2
| | | | | | | | | It was failing because on Windows, -ast-print prints __single_inheritance(1) before T1. Adding a triple is a stop-gap fix until it can be fixed properly. llvm-svn: 332335
* [llvm-mca] Add file header to RetireControlUnit.cpp.Andrea Di Biagio2018-05-151-0/+15
| | | | | | | Strictly speaking, this is not necessary for .cpp files. However, other .cpp files from this same tool have it. This also matches what we do in other tools. llvm-svn: 332334
* [ELF] Implement --keep-unique optionPeter Smith2018-05-155-4/+67
| | | | | | | | | | | | | | The --keep-unique <symbol> option is taken from gold. The intention is that <symbol> will be prevented from being folded by ICF. Although not specifically mentioned in the documentation <symbol> only matches global symbols, with a warning if the symbol is not found. The implementation finds the Section defining <symbol> and removes it from the set of sections considered for ICF. Differential Revision: https://reviews.llvm.org/D46755 llvm-svn: 332332
* [llvm-exegesis] InMemoryAssembler: handle return-less targets (e.g. arm).Clement Courbet2018-05-155-5/+114
| | | | | | | | | | | | Summary: Arm does not have a ret code per se. Reviewers: gchatelet Subscribers: mgorny, javed.absar, kristof.beyls, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D45672 llvm-svn: 332331
* [llvm-exegesis] Check perf event validity.Clement Courbet2018-05-151-1/+5
| | | | | | | | This was part of https://reviews.llvm.org/D46821. Authored by Guillaume Chatelet llvm-svn: 332330
* [llvm-rc] Add support for parsing memory flagsMartin Storsjo2018-05-159-52/+533
| | | | | | | | | | | | | | | | | | | | | | | | Most of the handling is pretty straightforward; fetch the default memory flags for the specific resource type before parsing the flags and apply them on top of that, except that some flags imply others and some flags clear more than one flag. For icons and cursors, the flags set get passed on to all individual single icon/cursor resources, while only some flags affect the icon/cursor group resource. For stringtables, the behaviour is pretty simple; the first stringtable resource of a bundle sets the flags for the whole bundle. The output of these tests match rc.exe byte for byte. The actual use of these memory flags is deprecated and they have no effect since Win16, but some resource script files may still happen to have them in place. Differential Revision: https://reviews.llvm.org/D46818 llvm-svn: 332329
* [llvm-rc] Read the Planes/BitCount fields from BITMAPINFOHEADER for iconsMartin Storsjo2018-05-152-21/+27
| | | | | | | | | | | | | | | | Previously these fields were only read from this header for cursors, while Planes was hardcoded to 1 for icons (with a comment that it was unknown why this was needed) and BitCount was left at the value read originally in the RESDIRENTRY. This fixes the single byte that was differing for the icon/cursor test compared to rc.exe. This is based on research/testing by Nico Weber. Differential Revision: https://reviews.llvm.org/D46816 llvm-svn: 332328
* [MinGW] Add a LLD specific option -pdbMartin Storsjo2018-05-153-2/+12
| | | | | | | | | This allows producing pdb debug info. This is an LLD specific option since GCC and GNU binutils doesn't support the PDB file format. Differential Revision: https://reviews.llvm.org/D46796 llvm-svn: 332327
* [X86] Add fast isel tests for some of the avx512 truncate intrinsics to ↵Craig Topper2018-05-154-0/+451
| | | | | | match current clang codegen. llvm-svn: 332326
* [NFC] pull a function into its own lambdaJF Bastien2018-05-151-19/+21
| | | | | | | | | As requested in D46858, pulling this function into its own lambda makes it easier to read that part of the code and reason as to what's going on because the scope it can be called from is extremely limited. We want to keep it as a function because it's called from the two subsequent lines. llvm-svn: 332325
* rootn: Use denormal path onlyJan Vesely2018-05-151-10/+1
| | | | | | | | | | | | It's OK to either flush to 0 or return denormal result if the device does not support denormals. See sec 7.2 and 7.5.3 of OCL specs Use 0.0f explicitly intead of relying on GPU to flush it. Fixes CTS on carrizo and turks Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Acked-by: Aaron Watry <awatry@gmail.com> Tested-by: Aaron Watry <awatry@gmail.com> llvm-svn: 332324
* [NFC] Update commentsJF Bastien2018-05-153-34/+33
| | | | | | Don't prepend function or data name before each comment. Split into its own NFC patch as requested in D46858. llvm-svn: 332323
* [X86] Revert part of r332266: Use __builtin_convertvector to replace some of ↵Craig Topper2018-05-155-40/+32
| | | | | | | | the avx512 truncate builtins. The masking doesn't work right in the backend for the ones that produce byte or word elements without avx512bw. llvm-svn: 332322
* [X86] Revert part of r332267: Remove GCCBuiltin from the intrinsics that ↵Craig Topper2018-05-151-4/+8
| | | | | | | | clang stopped using in r332266. The masking of instructions that produce byte or word elements doesn't work right without avx512bw since the generic i8/i16 select won't be legal in the SelectionDAG. llvm-svn: 332321
* [sanitizer] Intercept __pthread_mutex_lock and __pthread_mutex_unlockVitaly Buka2018-05-153-0/+55
| | | | | | | | | | Reviewers: eugenis, dvyukov Subscribers: srhines, kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D46793 llvm-svn: 332320
* [asan] Workaround to avoid hangs in Chromium testsVitaly Buka2018-05-151-3/+3
| | | | | | | | | | | | | | | | | | Summary: For some reasons on Chromium when we start leak checking we get own pid as 1. After that we see threads with PPID:0 assuming that thread is dead in infinite loop. To resolve particularly this case and possible issues like this, when IsAlive check failed to detect thread status, we need to limit the number of SuspendAllThreads iterations. Reviewers: eugenis Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D46852 llvm-svn: 332319
* [RISCV] Define FeatureRelax and shouldForceRelocation for RISCV linker ↵Shiva Chen2018-05-153-0/+14
| | | | | | | | | | | | | | relaxation 1. Deine FeatureRelax to enable/disable linker relaxation. 2. Define shouldForceRelocation to preserve relocation types even if the fixup can be resolved when linker relaxation enabled. This is necessary for correctness as offsets may change during relaxation. Differential Revision: https://reviews.llvm.org/D46674 llvm-svn: 332318
* [NFC] Add const to method signatureMax Kazantsev2018-05-151-1/+1
| | | | llvm-svn: 332317
* [libFuzzer] deprecate equivalence_serverKostya Serebryany2018-05-154-2/+6
| | | | llvm-svn: 332316
* Fix debug build by adding missing dependencies on libBinaryFormatSam Clegg2018-05-153-0/+3
| | | | | | | | Debug BUILD_SHARED_LIBS build was broken by rL332305 Differential Revision: https://reviews.llvm.org/D46859 llvm-svn: 332315
* [AST] Fix printing tag decl groups in decl contextsJoel E. Denny2018-05-155-41/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For example, given: struct T1 { struct T2 *p0; }; -ast-print produced: struct T1 { struct T2; struct T2 *p0; }; Compiling that produces a warning that the first struct T2 declaration does not declare anything. Details: A tag decl group is one or more decls that share a type specifier that is a tag decl (that is, a struct/union/class/enum decl). Within functions, the parser builds such a tag decl group as part of a DeclStmt. However, in decl contexts, such as file scope or a member list, the parser does not group together the members of a tag decl group. Previously, detection of tag decl groups during printing was implemented but only if the tag decl was unnamed. Otherwise, as in the above example, the members of the group did not print together and so sometimes introduced warnings. This patch extends detection of tag decl groups in decl contexts to any tag decl that is recorded in the AST as not free-standing. Reviewed by: rsmith Differential Revision: https://reviews.llvm.org/D45465 llvm-svn: 332314
* [XRay][profiler] Part 2: XRay Function Call TrieDean Michael Berris2018-05-158-0/+837
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is part of the larger XRay Profiling Mode effort. This patch implements a central data structure for capturing statistics about XRay instrumented function call stacks. The `FunctionCallTrie` type does the following things: * It keeps track of a shadow function call stack of XRay instrumented functions as they are entered (function enter event) and as they are exited (function exit event). * When a function is entered, the shadow stack contains information about the entry TSC, and updates the trie (or prefix tree) representing the current function call stack. If we haven't encountered this function call before, this creates a unique node for the function in this position on the stack. We update the list of callees of the parent function as well to reflect this newly found path. * When a function is exited, we compute statistics (TSC deltas, function call count frequency) for the associated function(s) up the stack as we unwind to find the matching entry event. This builds upon the XRay `Allocator` and `Array` types in Part 1 of this series of patches. Depends on D45756. Reviewers: echristo, pelikan, kpw Reviewed By: kpw Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D45757 llvm-svn: 332313
* [Debugify] Add -debugify-each for testing each pass in a pipelineVedant Kumar2018-05-158-58/+218
| | | | | | | | | | | | | | | | This adds a -debugify-each mode to opt which, when enabled, wraps each {Module,Function}Pass in a pipeline with logic to add, check, and strip synthetic debug info for testing purposes. This mode can be used to test complex pipelines for debug info bugs, or to collect statistics about the number of debug values & locations lost throughout various stages of a pipeline. Patch by Son Tuan Vu! Differential Revision: https://reviews.llvm.org/D46525 llvm-svn: 332312
* [CommandLine] Error message for incorrect PositionalEatArgs usageKeno Fischer2018-05-143-10/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: bugpoint has several options specified as `PositionalEatArgs` to pass options through to the underlying tool, e.g. `-tool-args`. The `-help` message suggests the usage is: `-tool-args=<string>`. However, this is misleading, because that's not how these arguments work. Rather than taking a value, the option consumes all positional arguments until the next recognized option (or all arguments if `--` is specified at some point). To make this slightly clearer, instead print the help as: ``` -tool-args <string>... - <tool arguments>... ``` Additionally, add an error if the user attempts to use a `PositionalEatArgs` argument with a value, instead of silently ignoring it. Example: ``` ./bin/bugpoint -tool-args=-mpcu=skylake-avx512 bugpoint: for the -tool-args option: This argument does not take a value. Instead, it consumes any positional arguments until the next recognized option. ``` Reviewed By: aprantl Differential Revision: https://reviews.llvm.org/D46787 llvm-svn: 332311
* Enable control flow pruning of float overflow warnings.Richard Trieu2018-05-142-1/+36
| | | | | | | | | Like other conversion warnings, allow float overflow warnings to be disabled in known dead paths of template instantiation. This often occurs when a template template type is a numeric type and the template will check the range of the numeric type before performing the conversion. llvm-svn: 332310
OpenPOWER on IntegriCloud