summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Reverting r348215Ranjeet Singh2018-12-043-30/+20
| | | | | | Causing failures on ubsan buildbot boxes. llvm-svn: 348230
* [analyzer] MoveChecker: Improve warning and note messages.Artem Dergachev2018-12-042-95/+126
| | | | | | | | | | | | | | | | | | | The warning piece traditionally describes the bug itself, i.e. "The bug is a _____", eg. "Attempt to delete released memory", "Resource leak", "Method call on a moved-from object". Event pieces produced by the visitor are usually in a present tense, i.e. "At this moment _____": "Memory is released", "File is closed", "Object is moved". Additionally, type information is added into the event pieces for STL objects (in order to highlight that it is in fact an STL object), and the respective event piece now mentions that the object is left in an unspecified state after it was moved, which is a vital piece of information to understand the bug. Differential Revision: https://reviews.llvm.org/D54560 llvm-svn: 348229
* Add interceptors for the sysctl(3) API family from NetBSDKamil Rytarowski2018-12-043-0/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add new interceptors for: - sysctl - sysctlbyname - sysctlgetmibinfo - sysctlnametomib - asysctl - asysctlbyname Cover the API with a new test file TestCases/NetBSD/sysctl.cc. Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: devnexen, kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54076 llvm-svn: 348228
* Add interceptors for the fts(3) API family from NetBSDKamil Rytarowski2018-12-045-0/+120
| | | | | | | | | | | | | | | | | | | | | | | Summary: fts(3) is API to traverse a file hierarchy. Cover this interface with interceptors. Add a test to validate the interface reading the number of regular files in /etc. Based on original work by Yang Zheng. Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: tomsun.0.7, kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54247 llvm-svn: 348227
* [TableGen] Improve the formatting of the emitted predicates (NFC)Evandro Menezes2018-12-041-8/+7
| | | | llvm-svn: 348226
* [TableGen] Fix typo in emitted comment (NFC)Evandro Menezes2018-12-041-1/+1
| | | | llvm-svn: 348225
* Add new interceptor for regex(3) in NetBSDKamil Rytarowski2018-12-045-0/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add interceptors for the NetBSD style of regex(3) present inside libc: - regcomp - regexec - regerror - regfree - regnsub - regasub Add a dedicated test verifying the installed interceptors. Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54584 llvm-svn: 348224
* [ExecutionEngine] Change NotifyObjectEmitted/NotifyObjectFreed API.Lang Hames2018-12-048-67/+75
| | | | | | | | | | | | | This patch renames both methods (NotifyObjectEmitted -> notifyObjectLoaded, and NotifyObjectFreed -> notifyObjectFreed), adds an abstract "ObjectKey" (uint64_t) parameter to notifyObjectLoaded, and replaces the ObjectFile parameter for notifyObjectFreed with an ObjectKey. Using an ObjectKey to track identify events, rather than a reference to the ObjectFile, allows us to free the ObjectFile after notifyObjectLoaded is called, saving memory. https://reviews.llvm.org/D53773 llvm-svn: 348223
* [ARM64][Windows] Fix local stack size for funcletsSanjin Sijaric2018-12-042-3/+61
| | | | | | | | | | | The comment was misplaced, and the code didn't do what the comment indicated, namely ignoring the varargs portion when computing the local stack size of a funclet in emitEpilogue. This results in incorrect offset computations within funclets that are contained in vararg functions. Differential Revision: https://reviews.llvm.org/D55096 llvm-svn: 348222
* [asan] Reduce binary size by using unnamed private aliasesVitaly Buka2018-12-042-4/+4
| | | | | | | | | | | | | | | Summary: --asan-use-private-alias increases binary sizes by 10% or more. Most of this space was long names of aliases and new symbols. These symbols are not needed for the ODC check at all. Reviewers: eugenis Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D55146 llvm-svn: 348221
* [MachineOutliner] Move stack instr check logic to getOutliningCandidateInfoJessica Paquette2018-12-042-96/+144
| | | | | | | | | | | | | | | | This moves the stack check logic into a lambda within getOutliningCandidateInfo. This allows us to be less conservative with stack checks. Whether or not a stack instruction is safe to outline is dependent on the frame variant and call variant of the outlined function; only in cases where we modify the stack can these be unsafe. So, if we move that logic later, when we're looking at an individual candidate, we can make better decisions here. This gives some code size savings as a result. llvm-svn: 348220
* [MachineOutliner][AArch64][NFC] Add early exit to candidate discarding logicJessica Paquette2018-12-041-0/+6
| | | | | | | | If we dropped too many candidates to be beneficial when dropping candidates that modify the stack, there's no reason to check for other cost model qualities. llvm-svn: 348219
* NFC: Make this test kinder on downstream forksErik Pilkington2018-12-042-7/+4
| | | | | | | | | | | Downstream forks that have their own attributes often run into this test failing when a new attribute is added to clang because the number of supported attributes no longer match. This is redundant information for this test, so we can get by without it. rdar://46288577 llvm-svn: 348218
* [projects] Use directory name for add_llvm_external_projectsShoaib Meenai2018-12-041-1/+2
| | | | | | | | add_llvm_external_projects expects the directory name instead of the full path, otherwise the check for an in-tree subproject will fail and the project won't be configured. llvm-svn: 348217
* [ThinLTO] Look through aliases when computing hash keysGeorge Burgess IV2018-12-042-8/+16
| | | | | | | | | | | Without this, we don't consider types used by aliasees in our cache key. This caused issues when using the same cache for thin-linking the same TU with different sets of virtual call candidates for a virtual call inside of a constructor. That's sort of a mouthful. :) Differential Revision: https://reviews.llvm.org/D55060 llvm-svn: 348216
* [IR] Don't assume all functions are 4 byte alignedRanjeet Singh2018-12-043-20/+30
| | | | | | | | | | | In some cases different alignments for function might be used to save space e.g. thumb mode with -Oz will try to use 2 byte function alignment. Similar patch that fixed this in other areas exists here https://reviews.llvm.org/D46110 Differential Revision: https://reviews.llvm.org/D55115 llvm-svn: 348215
* [Hexagon] Fix intrinsic testKrzysztof Parzyszek2018-12-031-4/+0
| | | | llvm-svn: 348214
* Relax test even more for WindowsAdrian Prantl2018-12-031-1/+1
| | | | llvm-svn: 348213
* Remove unused empty arm64 directoryYi Kong2018-12-030-0/+0
| | | | llvm-svn: 348212
* Relax tests to also work on WindowsAdrian Prantl2018-12-032-5/+9
| | | | llvm-svn: 348211
* [analyzer] MoveChecker: Restrict to locals and std:: objects.Artem Dergachev2018-12-032-25/+154
| | | | | | | | | | | | | | | | | | | | | | | | In general case there use-after-move is not a bug. It depends on how the move-constructor or move-assignment is implemented. In STL, the convention that applies to most classes is that the move-constructor (-assignment) leaves an object in a "valid but unspecified" state. Using such object without resetting it to a known state first is likely a bug. Objects Local value-type variables are special because due to their automatic lifetime there is no intention to reuse space. If you want a fresh object, you might as well make a new variable, no need to move from a variable and than re-use it. Therefore, it is not always a bug, but it is obviously easy to suppress when it isn't, and in most cases it indeed is - as there's no valid intention behind the intentional use of a local after move. This applies not only to local variables but also to parameter variables, not only of value type but also of rvalue reference type (but not to lvalue references). Differential Revision: https://reviews.llvm.org/D54557 llvm-svn: 348210
* NFC: Add .vscode to .gitignoreGor Nishanov2018-12-031-0/+5
| | | | llvm-svn: 348209
* [analyzer] MoveChecker: NFC: Remove the workaround for the "zombie symbols" bug.Artem Dergachev2018-12-032-44/+19
| | | | | | | | | | | | | | | | | | The checker had extra code to clean up memory regions that were sticking around in the checker without ever being cleaned up due to the bug that was fixed in r347953. Because of that, if a region was moved from, then became dead, and then reincarnated, there were false positives. Why regions are even allowed to reincarnate is a separate story. Luckily, this only happens for local regions that don't produce symbols when loaded from. No functional change intended. The newly added test demonstrates that even though no cleanup is necessary upon destructor calls, the early return cannot be removed. It was not failing before the patch. Differential Revision: https://reviews.llvm.org/D54372 llvm-svn: 348208
* [FileSystem] Migrate MonitoringProcessLauncherJonas Devlieghere2018-12-031-10/+5
| | | | | | Use the FileSystem helpers instead of using the file system directly. llvm-svn: 348207
* [Hexagon] Switch to auto-generated intrinsic definitions and patternsKrzysztof Parzyszek2018-12-035-10994/+8697
| | | | llvm-svn: 348206
* [CodeExtractor] Split PHI nodes with incoming values from outlined region ↵Vedant Kumar2018-12-034-82/+167
| | | | | | | | | | | | | | | | | (PR39433) If a PHI node out of extracted region has multiple incoming values from it, split this PHI on two parts. First PHI has incomings only from region and extracts with it (they are placed to the separate basic block that added to the list of outlined), and incoming values in original PHI are replaced by first PHI. Similar solution is already used in CodeExtractor for PHIs in entry block (severSplitPHINodes method). It covers PR39433 bug. Patch by Sergei Kachkov! Differential Revision: https://reviews.llvm.org/D55018 llvm-svn: 348205
* [WebAssembly] Don't set a maximum size when importing the tableSam Clegg2018-12-033-5/+1
| | | | | | | | | We shouldn't be setting setting a max size for a table that is being imported. Differential Revision: https://reviews.llvm.org/D55231 llvm-svn: 348204
* Adapt gcov to changes in CFE.Adrian Prantl2018-12-031-7/+15
| | | | | | | | | | | | The clang frontend no longer emits the current working directory for DIFiles containing an absolute path in the filename: and will move the common prefix between current working directory and the file into the directory: component. This fixes the GCOV tests in compiler-rt that were broken by the Clang change. llvm-svn: 348203
* [Documentation] Fix formatting and wrap up to 80 characters in Clang-tidy ↵Eugene Zelenko2018-12-031-9/+10
| | | | | | readability-uppercase-literal-suffix documentation. llvm-svn: 348202
* [analyzer] Rename MisusedMovedObjectChecker to MoveCheckerArtem Dergachev2018-12-034-38/+34
| | | | | | | | | This follows the Static Analyzer's tradition to name checkers after things in which they find bugs, not after bugs they find. Differential Revision: https://reviews.llvm.org/D54556 llvm-svn: 348201
* [analyzer] Dump stable identifiers for objects under construction.Artem Dergachev2018-12-032-5/+20
| | | | | | | | | | This continues the work that was started in r342313, which now gets applied to object-under-construction tracking in C++. Makes it possible to debug temporaries by dumping exploded graphs again. Differential Revision: https://reviews.llvm.org/D54459 llvm-svn: 348200
* [AST] [analyzer] NFC: Reuse code in stable ID dumping methods.Artem Dergachev2018-12-035-21/+6
| | | | | | | | Use the new fancy method introduced in r348197 to simplify some code. Differential Revision: https://reviews.llvm.org/D54488 llvm-svn: 348199
* [AST] Generate unique identifiers for CXXCtorInitializer objects.Artem Dergachev2018-12-032-0/+11
| | | | | | | | | This continues the work started in r342309 and r342315 to provide identifiers to AST objects that are shorter and easier to read and remember than pointers. Differential Revision: https://reviews.llvm.org/D54457 llvm-svn: 348198
* BumpPtrAllocator: Add a couple of convenient wrappers around identifyObject().Artem Dergachev2018-12-031-0/+27
| | | | | | | | | This allows obtaining smaller, more readable identifiers in a more comfortable way. Differential Revision: https://reviews.llvm.org/D54486 llvm-svn: 348197
* [Hexagon] Extract operand decoders into a separate file, NFCKrzysztof Parzyszek2018-12-032-56/+74
| | | | | | | These decoders are automatically generated. Keeping them separated makes updating architectures easier. llvm-svn: 348196
* [DAGCombiner] narrow truncated vector binops when legalSanjay Patel2018-12-034-311/+181
| | | | | | | | | | | | | | | | This is the smallest vector enhancement I could find to D54640. Here, we're allowing narrowing to only legal vector ops because we'll see regressions without that. All of the test diffs are wins from what I can tell. With AVX/AVX512, we can shrink ymm/zmm ops to xmm. x86 vector multiplies are the problem case that we're avoiding due to the patchwork ISA, and it's not clear to me if we can dance around those regressions using TLI hooks or if we need preliminary patches to plug those holes. Differential Revision: https://reviews.llvm.org/D55126 llvm-svn: 348195
* [mips] Fix TestDWARF32Version5Addr8AllForms test failure on MIPS hostsSimon Atanasyan2018-12-035-10/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | The `DIEExpr` is used in debug information entries for either TLS variables or call sites. For now the last case is unsupported for targets with delay slots, for MIPS in particular. The `DIEExpr::EmitValue` method calls a virtual `EmitDebugThreadLocal` routine which, in case of MIPS, always emits either `.dtprelword` or `.dtpreldword` directives. That is okay for "main" code, but in unit tests `DIEExpr` instances can be created not for TLS variables only even on MIPS hosts. That is a reason of the `TestDWARF32Version5Addr8AllForms` failure because handling of the `R_MIPS_TLS_DTPREL` relocation writes incorrect value into dwarf structures. And anyway unconditional emitting of `.dtprelword` directives will be incorrect when/if debug information entries for call sites become supported on MIPS. The patch solves the problem by wrapping expression created in the `MipsTargetObjectFile::getDebugThreadLocalSymbol` method in to the `MipsMCExpr` expression with a new `MEK_DTPREL` tag. This tag is recognized in the `MipsAsmPrinter::EmitDebugThreadLocal` method and `.dtprelword` directives created in this case only. In other cases the expression saved as a regular data. Differential Revision: http://reviews.llvm.org/D54937 llvm-svn: 348194
* [Hexagon] Remove unused encodings, NFCKrzysztof Parzyszek2018-12-031-741/+114
| | | | llvm-svn: 348193
* Typo correction; NFC.Aaron Ballman2018-12-031-1/+1
| | | | llvm-svn: 348192
* [InstCombine] fix undef propagation bug with shuffle+binopSanjay Patel2018-12-032-6/+22
| | | | | | | | | | | | | | When we have a shuffle that extends a source vector with undefs and then do some binop on that, we must make sure that the extra elements remain undef with that binop if we reverse the order of the binop and shuffle. 'or' is probably the easiest example to show the bug because 'or C, undef --> -1' (not undef). But there are other opcode/constant combinations where this is true as shown by the 'shl' test. llvm-svn: 348191
* [gn build] Use print_function in write_cmake_config.pyNico Weber2018-12-031-3/+5
| | | | | | | | | No behavior change, just makes the script match the other scripts in llvm/utils/gn/build. Differential Revision: https://reviews.llvm.org/D55183 llvm-svn: 348190
* NFC: Simplify dumpStmt child handlingStephen Kelly2018-12-031-8/+3
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55068 llvm-svn: 348189
* Re-apply r347954 "[analyzer] Nullability: Don't detect post factum violation..."Artem Dergachev2018-12-033-8/+88
| | | | | | | | | | | Buildbot failures were caused by an unrelated UB that was introduced in r347943 and fixed in r347970. Also the revision was incorrectly specified as r344580 during revert. Differential Revision: https://reviews.llvm.org/D54017 llvm-svn: 348188
* [gcov/Darwin] Ensure external symbols are exported when using an export listVedant Kumar2018-12-035-9/+42
| | | | | | | | | | | | | | Make sure that symbols needed to implement runtime support for gcov are exported when using an export list on Darwin. Without the clang driver exporting these symbols, the linker hides them, resulting in tapi verification failures. rdar://45944768 Differential Revision: https://reviews.llvm.org/D55151 llvm-svn: 348187
* Skip TestDriverOptions on WindowsJonas Devlieghere2018-12-031-0/+3
| | | | | | | It's not clear to me why this is failing on Windows. Maybe it has something to do with the path? llvm-svn: 348186
* [WebAssembly] Enforce assembler emits to streamer in order.Wouter van Oortmerssen2018-12-032-0/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The assembler processes directives and instructions in whatever order they are in the file, then directly emits them to the streamer. This could cause badly written (or generated) .s files to produce incorrect binaries. It now has state that tracks what it has most recently seen, to enforce they are emitted in a given order that always produces correct wasm binaries. Also added a new test that compares obj2yaml output from llc (the backend) to that going via .s and the assembler to ensure both paths generate the same binaries. The features this test covers could be extended. Passes all wasm Lit tests. Fixes: https://bugs.llvm.org/show_bug.cgi?id=39557 Reviewers: sbc100, dschuff, aheejin Subscribers: jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D55149 llvm-svn: 348185
* Portable Python script across Python versionSerge Guelton2018-12-031-9/+12
| | | | | | | | Workaround naming and hierarchy changes in BaseHTTPServer and SimpleHTTPServer module. Differential Revision: https://reviews.llvm.org/D55203 llvm-svn: 348184
* [Hexagon] Update timing classesKrzysztof Parzyszek2018-12-035-5770/+5651
| | | | llvm-svn: 348183
* Portable Python script across Python versionSerge Guelton2018-12-031-1/+1
| | | | | | | | Python2 supports both backticks and `repr` to access the __repr__ slot. Python3 only supports `repr`. Differential Revision: https://reviews.llvm.org/D55201 llvm-svn: 348182
* [InstCombine] foldICmpWithLowBitMaskedVal(): disable 2 faulty folds.Roman Lebedev2018-12-033-8/+16
| | | | | | | | | | | These two folds are invalid for this non-constant pattern when the mask ends up being all-ones: https://rise4fun.com/Alive/9au https://rise4fun.com/Alive/UcQM Fixes https://bugs.llvm.org/show_bug.cgi?id=39861 llvm-svn: 348181
OpenPOWER on IntegriCloud