summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [SelectionDAG] Add FSHL/FSHR support to computeKnownBitsSimon Pilgrim2018-12-163-16/+41
| | | | | | Also exposes an issue in DAGCombiner::visitFunnelShift where we were assuming the shift amount had the result type (after legalization it'll have the targets shift amount type). llvm-svn: 349298
* [X86] Add computeKnownBits tests for funnel shift intrinsicsSimon Pilgrim2018-12-161-0/+43
| | | | llvm-svn: 349297
* Improve the comment in previousKamil Rytarowski2018-12-161-2/+2
| | | | llvm-svn: 349296
* Expand TSan sysroot workaround to NetBSDKamil Rytarowski2018-12-161-5/+6
| | | | | | https://bugs.llvm.org/show_bug.cgi?id=26651 llvm-svn: 349295
* [test] [ctime] Ignore -Wformat-zero-length warningsMichal Gorny2018-12-161-0/+4
| | | | | | | | | | | | Explicitly disable the -Wformat-zero-length diagnostic when running ctime tests, since one of the test cases passes zero-length format string to strftime(). When strftime() is appropriately decorated with __attribute__(format, ...), this caused the test to fail because of this warning (e.g. on NetBSD). Differential Revision: https://reviews.llvm.org/D55661 llvm-svn: 349294
* [regex] Use distinct __regex_word on NetBSDMichal Gorny2018-12-161-0/+4
| | | | | | | | | | NetBSD defines character classes up to 0x2000. Use 0x8000 as a safe __regex_word that hopefully will not collide with other values in the foreseeable future. Differential Revision: https://reviews.llvm.org/D55657 llvm-svn: 349293
* [gn build] Merge r349167Nico Weber2018-12-161-0/+1
| | | | llvm-svn: 349291
* [gn build] Add build files for obj2yaml, yaml2obj, and lib/ObjectYAMLNico Weber2018-12-164-0/+58
| | | | | | | | The two executables are needed by check-lld. Differential Revision: https://reviews.llvm.org/D55687 llvm-svn: 349290
* [gn build] Add build files for llvm-as, llvm-dis, llvm-dwarfdump, llvm-mc, ↵Nico Weber2018-12-168-0/+79
| | | | | | | | | | FileCheck, count, not These executables are needed by check-lld. Differential Revision: https://reviews.llvm.org/D55688 llvm-svn: 349289
* Fix a lit test failure after MallocChecker changesKristof Umann2018-12-161-1/+1
| | | | llvm-svn: 349288
* [X86] Autogenerate complete checks. NFCCraig Topper2018-12-151-29/+39
| | | | llvm-svn: 349287
* [X86] Begin cleaning up combineOr -> SHLD/SHRD. NFCI.Simon Pilgrim2018-12-151-5/+5
| | | | | | In preparation for converting to funnel shifts. llvm-svn: 349286
* [X86] Lower to SHLD/SHRD on slow machines for optsizeSimon Pilgrim2018-12-153-81/+31
| | | | | | Use consistent rules for when to lower to SHLD/SHRD for slow machines - fixes a weird issue where funnel shift gets expanded but then X86ISelLowering's combineOr sees the optsize and combines to SHLD/SHRD, but now with the modulo amount guard...... llvm-svn: 349285
* [X86] Add optsize SHLD/SHRD testsSimon Pilgrim2018-12-152-41/+131
| | | | llvm-svn: 349284
* [analyzer][MallocChecker] Improve warning messages on double-delete errorsKristof Umann2018-12-156-19/+27
| | | | | | Differential Revision: https://reviews.llvm.org/D54834 llvm-svn: 349283
* Update the vFile:open: description to note that the flagsJason Molenda2018-12-152-1/+5
| | | | | | | | | | in the packet are lldb enum values, not the open(2) oflags -- forgot about that wrinkle. Also added a comment to File.h noting that the existing values cannot be modified or we'll have a compatibilty break with any alternative platform implementations, or older versions of lldb-server. llvm-svn: 349282
* [analyzer][MallocChecker][NFC] Document and reorganize some functionsKristof Umann2018-12-153-424/+725
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch merely reorganizes some things, and features no functional change. In detail: * Provided documentation, or moved existing documentation in more obvious places. * Added dividers. (the //===----------===// thing). * Moved getAllocationFamily, printAllocDeallocName, printExpectedAllocName and printExpectedDeallocName in the global namespace on top of the file where AllocationFamily is declared, as they are very strongly related. * Moved isReleased and MallocUpdateRefState near RefState's definition for the same reason. * Realloc modeling was very poor in terms of variable and structure naming, as well as documentation, so I renamed some of them and added much needed docs. * Moved function IdentifierInfos to a separate struct, and moved isMemFunction, isCMemFunction adn isStandardNewDelete inside it. This makes the patch affect quite a lot of lines, should I extract it to a separate one? * Moved MallocBugVisitor out of MallocChecker. * Preferred switches to long else-if branches in some places. * Neatly organized some RUN: lines. Differential Revision: https://reviews.llvm.org/D54823 llvm-svn: 349281
* [analyzer][NFC] Merge ClangCheckerRegistry to CheckerRegistryKristof Umann2018-12-155-109/+86
| | | | | | | | | | | Now that CheckerRegistry lies in Frontend, we can finally eliminate ClangCheckerRegistry. Fortunately, this also provides us with a DiagnosticsEngine, so I went ahead and removed some parameters from it's methods. Differential Revision: https://reviews.llvm.org/D54437 llvm-svn: 349280
* Link examples/clang-interpreter against clangSerializationKristof Umann2018-12-151-0/+1
| | | | llvm-svn: 349279
* Fix a compilation error in examples/Kristof Umann2018-12-151-1/+1
| | | | llvm-svn: 349278
* Add NetBSD support in needsRuntimeRegistrationOfSectionRange.Kamil Rytarowski2018-12-151-0/+1
| | | | | | Use linker script magic to get data/cnts/name start/end. llvm-svn: 349277
* Register kASan shadow offset for NetBSD/amd64Kamil Rytarowski2018-12-151-3/+7
| | | | | | | The NetBSD x86_64 kernel uses the 0xdfff900000000000 shadow offset. llvm-svn: 349276
* [analyzer][NFC] Move CheckerRegistry from the Core directory to FrontendKristof Umann2018-12-15105-156/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ClangCheckerRegistry is a very non-obvious, poorly documented, weird concept. It derives from CheckerRegistry, and is placed in lib/StaticAnalyzer/Frontend, whereas it's base is located in lib/StaticAnalyzer/Core. It was, from what I can imagine, used to circumvent the problem that the registry functions of the checkers are located in the clangStaticAnalyzerCheckers library, but that library depends on clangStaticAnalyzerCore. However, clangStaticAnalyzerFrontend depends on both of those libraries. One can make the observation however, that CheckerRegistry has no place in Core, it isn't used there at all! The only place where it is used is Frontend, which is where it ultimately belongs. This move implies that since include/clang/StaticAnalyzer/Checkers/ClangCheckers.h only contained a single function: class CheckerRegistry; void registerBuiltinCheckers(CheckerRegistry &registry); it had to re purposed, as CheckerRegistry is no longer available to clangStaticAnalyzerCheckers. It was renamed to BuiltinCheckerRegistration.h, which actually describes it a lot better -- it does not contain the registration functions for checkers, but only those generated by the tblgen files. Differential Revision: https://reviews.llvm.org/D54436 llvm-svn: 349275
* [analyzer] Prefer returns values to out-params in CheckerRegistry.cppKristof Umann2018-12-156-101/+75
| | | | | | | | | | | | | | | Renaming collectCheckers to getEnabledCheckers Changing the functionality to acquire all enabled checkers, rather then collect checkers for a specific CheckerOptInfo (for example, collecting all checkers for { "core", true }, which meant enabling all checkers from the core package, which was an unnecessary complication). Removing CheckerOptInfo, instead of storing whether the option was claimed via a field, we handle errors immediately, as getEnabledCheckers can now access a DiagnosticsEngine. Realize that the remaining information it stored is directly accessible through AnalyzerOptions.CheckerControlList. Fix a test with -analyzer-disable-checker -verify accidentally left in. llvm-svn: 349274
* [CodeGen] Enhance machine PHIs optimizationDinar Temirbulatov2018-12-154-13/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Make machine PHIs optimization to work for single value register taken from several different copies. This is the first step to fix PR38917. This change allows to get rid of redundant PHIs (see opt_phis2.mir test) to make the subsequent optimizations (like CSE) possible and simpler. For instance, before this patch the code like this: %b = COPY %z ... %a = PHI %bb1, %a; %bb2, %b could be optimized to: %a = %b but the code like this: %c = COPY %z ... %b = COPY %z ... %a = PHI %bb1, %a; %bb2, %b; %bb3, %c would remain unchanged. With this patch the latter case will be optimized: %a = %z```. Committed on behalf of: Anton Afanasyev anton.a.afanasyev@gmail.com Reviewers: RKSimon, MatzeB Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D54839 llvm-svn: 349271
* Regenerate neon copy tests. NFCI.Simon Pilgrim2018-12-151-174/+589
| | | | llvm-svn: 349270
* lldb-test: Improve newline handlingPavel Labath2018-12-153-43/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously lldb-test's LinePrinter would output the indentation spaces even on completely empty lines. This is not nice, as trailing spaces get flagged as errors in some tools/editors, and it prevents FileCheck's CHECK-EMPTY from working. Equally annoying was the fact that the LinePrinter did not terminate it's output with a newline (instead it would leave the unterminated hanging indent from the last NewLine() command), which meant that the shell prompt following the lldb-test command came out wrong. This fixes both issues by changing how newlines are handled. NewLine(), which was ending the previous line ('\n') *and* begging the next line by printing the indent, is now "demoted" to just printing literal "\n". Instead, lines are now delimited via a helper Line object, which makes sure the line is indented and terminated in an RAII fashion. The typical usage would be: Printer.line() << "This text will be indented and terminated"; If one needs to do more work than it will fit into a single statement, one can also assign the result of the line() function to a local variable. The line will then be terminated when that object goes out of scope. Reviewers: zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D55597 llvm-svn: 349269
* ELF: more section creation cleanupPavel Labath2018-12-159-73/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch attempts to move as much code as possible out of the CreateSections function to make room for future improvements there. Some of this may be slightly over-engineered (VMAddressProvider), but I wanted to keep the logic of this function very simple, because once I start taking segment headers into acount (as discussed in D55356), the function is going to grow significantly. While in there, I also added tests for various bits of functionality. This should be NFC, except that I changed the order of hac^H^Heuristicks for determining section type slightly. Previously, name-based deduction (.symtab -> symtab) would take precedence over type-based (SHT_SYMTAB -> symtab) one. In fact we would assert if we ran into a .text section with type SHT_SYMTAB. Though unlikely to matter in practice, this order seemed wrong to me, so I have inverted it. Reviewers: clayborg, krytarowski, espindola Subscribers: emaste, arichardson, lldb-commits Differential Revision: https://reviews.llvm.org/D55706 llvm-svn: 349268
* Remove /proc/pid/maps parsing code from NativeProcessLinuxPavel Labath2018-12-151-101/+18
| | | | | | A utility function doing this was added in r349182, so use that instead. llvm-svn: 349267
* [analyzer] Assume that we always have a SubEngine availableGabor Horvath2018-12-158-53/+40
| | | | | | | | The removed codepath was dead. Differential Revision: https://reviews.llvm.org/D55697 llvm-svn: 349266
* Fix -Wunused-variable warning. NFCI.Simon Pilgrim2018-12-151-0/+4
| | | | llvm-svn: 349265
* [TargetLowering] Add ISD::OR + ISD::XOR handling to SimplifyDemandedVectorEltsSimon Pilgrim2018-12-1531-2654/+2145
| | | | | | Differential Revision: https://reviews.llvm.org/D55600 llvm-svn: 349264
* Enable test/msan/pthread_getname_np.cc for NetBSDKamil Rytarowski2018-12-151-1/+5
| | | | llvm-svn: 349263
* Enable SANITIZER_INTERCEPT_PTHREAD_GETNAME_NP for NetBSDKamil Rytarowski2018-12-151-1/+1
| | | | llvm-svn: 349262
* [InstSimplify] Add tests for saturating add/sub + icmp; NFCNikita Popov2018-12-151-0/+165
| | | | | | | | If a saturating add/sub with a constant operand is compared to another constant, we should be able to determine that the condition is always true/false in some cases (but currently don't). llvm-svn: 349261
* [OpenMP] Fixes for LIBOMP_OMP_VERSION=45/40Roman Lebedev2018-12-1520-9/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: I have discovered this because i wanted to experiment with building static libomp (with openmp-4.0 support only) for debugging purposes. There are three kinds of problems here: 1. `__kmp_compare_and_store_acq()` simply does not exist. It was added in D47903 by @jlpeyton. I'm guessing `__kmp_atomic_compare_store_acq()` was meant. 2. In `__kmp_is_ticket_lock_initialized()`, `lck->lk.initialized` is `std::atomic<bool>`, while `lck` is `kmp_ticket_lock_t *`. Naturally, they can't be equality-compared. Either, it should return the value read from `lck->lk.initialized`, or do what `__kmp_is_queuing_lock_initialized()` does, compare the passed pointer with the field in the struct pointed by the pointer. I think the latter is correct-er choice here. 3. Tests were not versioned. They assume that `LIBOMP_OMP_VERSION` is at the latest version. This does not touch LIBOMP_OMP_VERSION=30. That is still broken. Reviewers: jlpeyton, Hahnfeld, AndreyChurbanov Reviewed By: AndreyChurbanov Subscribers: guansong, jfb, openmp-commits, jlpeyton Tags: #openmp Differential Revision: https://reviews.llvm.org/D55496 llvm-svn: 349260
* [libclang] Add dependency on clangSerialization to unbreak ↵Fangrui Song2018-12-151-0/+1
| | | | | | | | -DBUILD_SHARED_LIBS=1 build after rC349237 Frontend headers have undefined reference on the symbol `clang::PCHContainerOperations::PCHContainerOperations()` through some shared_ptr usage. Any dependents will get the undefined reference which can only be resolved by explicit dependency on clangSerialization (due to -z defs). llvm-svn: 349259
* [mips] Fix test typo in rL348914Fangrui Song2018-12-151-1/+1
| | | | | | RUN; -> RUN: llvm-svn: 349258
* Fix internal_sleep() for NetBSDKamil Rytarowski2018-12-151-1/+1
| | | | | | This is a follow up of a similar fix for Linux from D55692. llvm-svn: 349257
* [MinGW] Produce a vtable and RTTI for dllexported classes without a key functionMartin Storsjo2018-12-152-0/+25
| | | | | | | | | | | | | | This matches what GCC does in these situations. This fixes compiling Qt in debug mode. In release mode, references to the vtable of this particular class ends up optimized away, but in debug mode, the compiler creates references to the vtable, which is expected to be dllexported from a different DLL. Make sure the dllexported version actually ends up emitted. Differential Revision: https://reviews.llvm.org/D55698 llvm-svn: 349256
* Fix typo in test cases as well.Peter Collingbourne2018-12-153-8/+8
| | | | llvm-svn: 349255
* hwasan: Fix typo: Previosly -> Previously.Peter Collingbourne2018-12-151-1/+1
| | | | llvm-svn: 349254
* Fix static assert diagnostic checks in i386Eric Fiselier2018-12-155-5/+5
| | | | llvm-svn: 349252
* [Power9][NFC] add setb exploitation test caseKewen Lin2018-12-151-0/+1302
| | | | | | | | Add an original test case for setb before the exploitation actually takes effect, later we can check the difference. Differential Revision: https://reviews.llvm.org/D55696 llvm-svn: 349251
* Fix includes and dependencies for libclangRichard Trieu2018-12-155-6/+1
| | | | | | | | Remove unneeded includes Add needed include Remove dependency on Serialization llvm-svn: 349237
* Try 2: Fix bug in buildbot start scriptEric Fiselier2018-12-151-1/+1
| | | | llvm-svn: 349236
* Fix bug in buildbot start scriptEric Fiselier2018-12-151-1/+1
| | | | llvm-svn: 349235
* Rework docker setup to make it easier to work around bugs on buildbotsEric Fiselier2018-12-153-2/+19
| | | | llvm-svn: 349234
* Revert "[analyzer] MoveChecker: Add checks for dereferencing a smart pointer..."Artem Dergachev2018-12-152-178/+56
| | | | | | | | This reverts commit r349226. Fails on an MSVC buildbot. llvm-svn: 349233
* Ah, forgot qModuleInfo. Need to look that one upJason Molenda2018-12-151-0/+11
| | | | | | and finish filling this in. llvm-svn: 349232
OpenPOWER on IntegriCloud