summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
* [cmake] Clean up add_llvm_subdirectoryShoaib Meenai2018-12-031-14/+17
| | | | | | | | | | | | | | | | | I found the pattern of setting the project_BUILD variable to OFF after processing the project to be pretty confusing. Using global properties to explicitly keep track of whether a project has been processed or not seems much more straightforward, and it also allows us to convert the macro into a function (which is required for the early return). Factor the project+type+name combination out into a variable while I'm here, since it's used a whole bunch of times. I don't believe this should result in any functional changes. Differential Revision: https://reviews.llvm.org/D55104 llvm-svn: 348180
* [TextAPI] Remove a superfluous semicolon, fixing GCC warnings. NFC.Martin Storsjo2018-12-031-1/+1
| | | | llvm-svn: 348179
* [COFF] Remove an outdated/incorrect comment. NFC.Martin Storsjo2018-12-031-4/+0
| | | | | | | | | | | | Making the section writable doesn't affect how windows does base relocs in case a DLL can't be loaded at the intended base address. This comment dates back to SVN r79346. Differential Revision: llvm-svn: 348178
* [COFF] Don't mark mingw .eh_frame sections writableMartin Storsjo2018-12-032-4/+17
| | | | | | | | | | | | | | This improves compatibility with GCC produced object files, where the .eh_frame sections are read only. With mixed flags for the involved .eh_frame sections, LLD creates two separate .eh_frame sections in the output binary, one for each flag combination, while ld.bfd probably merges them. The previous setup of flags can be traced back to SVN r79346. Differential Revision: https://reviews.llvm.org/D55209 llvm-svn: 348177
* Fix compilation failure on Windows.Zachary Turner2018-12-031-1/+1
| | | | | | | This was introduced earlier but apparently used an incorrect class name so it doesn't compile on Windows. llvm-svn: 348176
* [InstCombine] rearrange shuffle+binop fold; NFCSanjay Patel2018-12-031-8/+9
| | | | | | | | This code has a bug dealing with undefs, so we need to add another escape hatch, so doing some cleanup ahead of that. llvm-svn: 348175
* [llvm-objcopy] Add --build-id-link-dir flagJake Ehrlich2018-12-0310-3/+211
| | | | | | | | | | | | | | | This flag does not exist in GNU objcopy but has a major use case. Debugging tools support the .build-id directory structure to find debug binaries. There is no easy way to build this structure up however. One way to do it is by using llvm-readelf and some crazy shell magic. This implements the feature directly. It is most often the case that you'll want to strip a file and send the original to the .build-id directory but if you just want to send a file to the .build-id directory you can copy to /dev/null instead. Differential Revision: https://reviews.llvm.org/D54384 llvm-svn: 348174
* [InstCombine] add tests for shuffle+binop fold; NFCSanjay Patel2018-12-031-2/+58
| | | | llvm-svn: 348173
* [clang-tidy] Fix unordered_map failure with specializing std::hash<> and ↵Jonas Toth2018-12-032-2/+20
| | | | | | remove previous wrong attempt at doing so llvm-svn: 348172
* [Hexagon] Change instruction type field in TSFlags to 7 bitsKrzysztof Parzyszek2018-12-035-182/+177
| | | | llvm-svn: 348171
* [llvm-tapi] initial commit, supports ELF text stubsArmando Montanez2018-12-0311-0/+575
| | | | | | | | | | | | | | | | | | | http://lists.llvm.org/pipermail/llvm-dev/2018-September/126472.html TextAPI is a library and accompanying tool that allows conversion between binary shared object stubs and textual counterparts. The motivations and uses cases for this are explained thoroughly in the llvm-dev proposal [1]. This initial commit proposes a potential structure for the TAPI library, also including support for reading/writing text-based ELF stubs (.tbe) in addition to preliminary support for reading binary ELF files. The goal for this patch is to ensure the project architecture appropriately welcomes integration of Mach-O stubbing from Apple's TAPI [2]. Added: - TextAPI library - .tbe read support - .tbe write (to raw_ostream) support [1] http://lists.llvm.org/pipermail/llvm-dev/2018-September/126472.html [2] https://github.com/ributzka/tapi Differential Revision: https://reviews.llvm.org/D53051 llvm-svn: 348170
* [clang-tidy] Recommit: Add the abseil-duration-comparison checkJonas Toth2018-12-0312-93/+657
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This check finds instances where Duration values are being converted to a numeric value in a comparison expression, and suggests that the conversion happen on the other side of the expression to a Duration. See documentation for examples. This also shuffles some code around so that the new check may perform in sone step simplifications also caught by other checks. Compilation is unbroken, because the hash-function is now directly specified for std::unordered_map, as 'enum class' does not compile as key (seamingly only on some compilers). Patch by hwright. Reviewers: aaron.ballman, JonasToth, alexfh, hokein Reviewed By: JonasToth Subscribers: sammccall, Eugene.Zelenko, xazax.hun, cfe-commits, mgorny Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D54737 llvm-svn: 348169
* [MachineOutliner] Drop candidates that require fixups if it's beneficialJessica Paquette2018-12-034-5/+338
| | | | | | | | | | | | | | | | | | | | | | | If it's a bigger code size win to drop candidates that require stack fixups than to demote every candidate to that variant, the outliner should do that. This happens if the number of bytes taken by calls to functions that don't require fixups, plus the number of bytes that'd be left is less than the number of bytes that it'd take to emit a save + restore for all candidates. Also add tests for each possible new behaviour. - machine-outliner-compatible-candidates shows that when we have candidates that don't use the stack, we can use the default call variant along with the no save/regsave variant. - machine-outliner-all-stack shows that when it's better to fix up the stack, we still will demote all candidates to that case - machine-outliner-drop-stack shows that we can discard candidates that require stack fixups when it would be beneficial to do so. llvm-svn: 348168
* [Hexagon] Add HasV5 predicate for compatibility with auto-generated filesKrzysztof Parzyszek2018-12-031-6/+6
| | | | llvm-svn: 348167
* Fix issue with Tpi Stream hash map.Zachary Turner2018-12-031-0/+6
| | | | | | | | Part of the patch to not build the hash map eagerly was omitted due to a merge conflict. Add it back, which should fix the failing tests. llvm-svn: 348166
* Revert "[clang-tidy] Add the abseil-duration-comparison check"Jonas Toth2018-12-0312-656/+93
| | | | | | This commit broke buildbots and needs adjustments. llvm-svn: 348165
* [X86] Fix bad formatting. NFCCraig Topper2018-12-031-1/+1
| | | | llvm-svn: 348164
* [Hexagon] Remove unused operand definitions, NFCKrzysztof Parzyszek2018-12-031-8/+1
| | | | llvm-svn: 348163
* [Hexagon] Some formatting changes, NFCKrzysztof Parzyszek2018-12-032-5/+3
| | | | llvm-svn: 348162
* [clang-tidy] Add the abseil-duration-comparison checkJonas Toth2018-12-0312-93/+656
| | | | | | | | | | | | | | | | | | | | | Summary: This check finds instances where Duration values are being converted to a numeric value in a comparison expression, and suggests that the conversion happen on the other side of the expression to a Duration. See documentation for examples. This also shuffles some code around so that the new check may perform in sone step simplifications also caught by other checks. Patch by hwright. Reviewers: aaron.ballman, JonasToth, alexfh, hokein Reviewed By: JonasToth Subscribers: sammccall, Eugene.Zelenko, xazax.hun, cfe-commits, mgorny Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D54737 llvm-svn: 348161
* Don't build the Tpi Hash map by default.Zachary Turner2018-12-031-3/+0
| | | | | | | This is very slow and should be done for specific cases where lookups will need to happen. llvm-svn: 348160
OpenPOWER on IntegriCloud