summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [WebAssembly] Update comments for non-splat pow2 vector test caseHeejin Ahn2018-06-291-1/+3
| | | | | | | | | | | | | | | | | | | Summary: After rL335727, (sdiv X, 1) is treated as a special case, so we can safely transform 'sdiv's in non-splat pow vectors into 'shr's even when some of its entries are '1'. The test expectations have been already fixed in rL335771, but the comments were out of date. Also changed the filename from `vector_sdiv.ll` to `vector-sdiv.ll` to be consistent with other test file names. Reviewers: RKSimon Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D48692 llvm-svn: 336018
* [WebAssembly] Comment out a switch block in ISelDAGToDAGHeejin Ahn2018-06-291-5/+4
| | | | | | | | | | | | Summary: Fixes PR37977. Reviewers: RKSimon Subscribers: dschuff, sbc100, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D48737 llvm-svn: 336017
* [modules] Emit the type of the TypeSourceInfo for a DeclaratorDecl (butRichard Smith2018-06-296-18/+36
| | | | | | | | | | | not the corresponding location information) earlier. We need the type as written in order to properly merge functions with deduced return types, so we need to load that early. But we don't want to load the location information early, because that contains problematic things such as the function parameters. llvm-svn: 336016
* [MemorySSA] Add APIs to MemoryPhis to delete incoming blocks/values, and an ↵Alina Sbirlea2018-06-294-3/+88
| | | | | | | | | | | | | | | | updater API to remove blocks. Summary: MemoryPhis now have APIs analogous to BB Phis to remove an incoming value/block. The MemorySSAUpdater uses the above APIs when updating MemorySSA given a set of dead blocks about to be deleted. Reviewers: george.burgess.iv Subscribers: sanjoy, jlebar, Prazek, llvm-commits Differential Revision: https://reviews.llvm.org/D48396 llvm-svn: 336015
* Introduce a separate preprocessor macro, _LIBUNWIND_USE_DLADDR, for directly ↵Jordan Rupprecht2018-06-291-2/+10
| | | | | | | | | | | | controlling a dependency on dladdr(). This will allow us to use libunwind without adding a libdl dependency. Reviewers: saugustine Subscribers: christof, chrib, cfe-commits, echristo Differential Revision: https://reviews.llvm.org/D48733 llvm-svn: 336014
* Specify an explicit underlying type for this enum to fix WindowsRichard Smith2018-06-291-1/+1
| | | | | | | | | | buildbots. On Windows targets, enums always get an underlying type of 'int', even if they have wider enumerators. (This is non-conforming, but it's effectively part of the target ABI.) llvm-svn: 336013
* Revert "Revert "Support for multiarch runtimes layout""Eric Christopher2018-06-291-6/+9
| | | | | | This reverts commit r336005 that was accidentally committed. llvm-svn: 336012
* [HWASan] Do not retag allocas before return from the function.Alex Shlyapnikov2018-06-293-14/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Retagging allocas before returning from the function might help detecting use after return bugs, but it does not work at all in real life, when instrumented and non-instrumented code is intermixed. Consider the following code: F_non_instrumented() { T x; F1_instrumented(&x); ... } { F_instrumented(); F_non_instrumented(); } - F_instrumented call leaves the stack below the current sp tagged randomly for UAR detection - F_non_instrumented allocates its own vars on that tagged stack, not generating any tags, that is the address of x has tag 0, but the shadow memory still contains tags left behind by F_instrumented on the previous step - F1_instrumented verifies &x before using it and traps on tag mismatch, 0 vs whatever tag was set by F_instrumented Reviewers: eugenis Subscribers: srhines, llvm-commits Differential Revision: https://reviews.llvm.org/D48664 llvm-svn: 336011
* [LLVMContext] Detecting leaked instructions with metadataVedant Kumar2018-06-291-0/+8
| | | | | | | | | | When instructions with metadata are accidentally leaked, the result is a difficult-to-find memory corruption in ~LLVMContextImpl that leads to random crashes. Patch by Arvīds Kokins! llvm-svn: 336010
* [lldb-mi] Clean up and update a few MI commands.Alexander Polyakov2018-06-292-51/+35
| | | | | | | | | | | | | | | | | Summary: This patch updates a few MI commands using a new way of handling an errors in lldb-mi and removes unnecessary m_lldbResult variables. Reviewers: aprantl, clayborg, labath Reviewed By: aprantl, clayborg Subscribers: ki.stfu, lldb-commits Differential Revision: https://reviews.llvm.org/D47992 llvm-svn: 336009
* Request init/fini array on FreeBSD 12 and laterDimitry Andric2018-06-292-0/+10
| | | | | | | | | | | | | | | | | | | | | | | Summary: It seems a bad idea to change the default in the middle of a release branch due to possible changes in global ctor / dtor ordering between .ctors and .init_array. With FreeBSD 11.0's release imminent lets change the default now for FreeBSD 12 (the current development stream) and later. FreeBSD rtld has supported .init_array / .fini_array for many years. As of Jan 1 2017 all supported FreeBSD releases and branches will have support. Reviewers: dim, brooks, arichardson Reviewed By: dim, brooks, arichardson Subscribers: bsdjhb, krytarowski, emaste, cfe-commits Differential Revision: https://reviews.llvm.org/D24867 llvm-svn: 336008
* Pass DWARFUnit to verifier by reference not by value. I am moderatelyPaul Robinson2018-06-292-2/+2
| | | | | | sure this should not cause a memory leak. llvm-svn: 336007
* Add a blank line to docs/README.txt test commit accessJordan Rupprecht2018-06-291-0/+1
| | | | | | | | Subscribers: christof, cfe-commits Differential Revision: https://reviews.llvm.org/D48785 llvm-svn: 336006
* Revert "Support for multiarch runtimes layout"Jordan Rupprecht2018-06-291-9/+6
| | | | | | This reverts commit 0c7cea3c0c6338b99e30c13201365a3dd4edc6f4. llvm-svn: 336005
* [mips][ias] Enable IAS by default for OpenBSD / FreeBSD mips64/mips64el.Brad Smith2018-06-293-4/+20
| | | | | | | | Reviewers: atanasyan Differential Revision: https://reviews.llvm.org/D48515 llvm-svn: 336004
* [analyzer] Replace the vector of ConstraintSets by a single ConstraintSet ↵Mikhail R. Gadelha2018-06-292-18/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and a function to merge ConstraintSets Now, instead of adding the constraints when they are removed, this patch adds them when they first appear and, since we walk the bug report backward, it should be the last set of ranges generated by the CSA for a given symbol. These are the number before and after the patch: ``` Project | current | patch | tmux | 283.222 | 123.052 | redis | 614.858 | 400.347 | openssl | 308.292 | 307.149 | twin | 274.478 | 245.411 | git | 547.687 | 477.335 | postgresql | 2927.495 | 2002.526 | sqlite3 | 3264.305 | 1028.416 | ``` Major speedups in tmux and sqlite (less than half of the time), redis and postgresql were about 25% faster while the rest are basically the same. Reviewers: NoQ, george.karpenkov Reviewed By: george.karpenkov Subscribers: rnkovacs, xazax.hun, szepet, a.sidorin Differential Revision: https://reviews.llvm.org/D48565 llvm-svn: 336002
* [MachineOutliner] Make -mno-outline use -enable-machine-outliner=neverJessica Paquette2018-06-292-16/+23
| | | | | | | | This updates -mno-outline so that it passes -enable-machine-outliner=never instead of nothing. This puts it in sync with the behaviour in llc and other tools. llvm-svn: 336001
* Revert "Extend CFGPrinter and CallPrinter with Heat Colors"Sean Fertile2018-06-2912-919/+129
| | | | | | This reverts r335996 which broke graph printing in Polly. llvm-svn: 336000
* AMDGPU: Don't use struct type for argument layoutMatt Arsenault2018-06-2910-751/+771
| | | | | | | | | | This was introducing unnecessary padding after the explicit arguments, depending on the alignment of the total struct type. Also has the side effect of avoiding creating an extra GEP for the offset from the base kernel argument to the explicit kernel argument offset. llvm-svn: 335999
* [X86] Limit the number of target specific nodes emitted in LowerShiftPartsCraig Topper2018-06-293-54/+29
| | | | | | | | | | The important part is the creation of the SHLD/SHRD nodes. The compare and the conditional move can use target independent nodes that can be legalized on their own. This gives some opportunities to trigger the optimizations present in the lowering for those things. And its just better to limit the number of places we emit target specific nodes. The changed test cases still aren't optimal. Differential Revision: https://reviews.llvm.org/D48619 llvm-svn: 335998
* [cfi] Use __builtin version of __clear_cache.Evgeniy Stepanov2018-06-291-1/+1
| | | | | | __builtin___clear_cache is also present on X86 and does the right thing (i.e. nop) there. llvm-svn: 335997
* Extend CFGPrinter and CallPrinter with Heat ColorsSean Fertile2018-06-2912-129/+919
| | | | | | | | | | | | | | | Extends the CFGPrinter and CallPrinter with heat colors based on heuristics or profiling information. The colors are enabled by default and can be toggled on/off for CFGPrinter by using the option -cfg-heat-colors for both -dot-cfg[-only] and -view-cfg[-only]. Similarly, the colors can be toggled on/off for CallPrinter by using the option -callgraph-heat-colors for both -dot-callgraph and -view-callgraph. Patch by Rodrigo Caetano Rocha! Differential Revision: https://reviews.llvm.org/D40425 llvm-svn: 335996
* [dsymutil] Rename conflicting declarationJonas Devlieghere2018-06-292-9/+9
| | | | | | | Using MemoryBuffer as member name clashed with the llvm::MemoryBuffer class. llvm-svn: 335995
* [X86] Use a std::vector for the memory unfolding table.Craig Topper2018-06-292-26/+56
| | | | | | | | | | Previously we used a DenseMap which is costly to set up due to multiple full table rehashes as the size increases and causes the table to be reallocated. This patch changes the table to a vector of structs. We now walk the reg->mem tables and push new entries in the mem->reg table for each row not marked TB_NO_REVERSE. Once all the table entries have been created, we sort the vector. Then we can use a binary search for lookups. Differential Revision: https://reviews.llvm.org/D48585 llvm-svn: 335994
* [Fixed Point Arithmetic] Rename `-fsame-fbits` flagLeonard Chan2018-06-299-31/+33
| | | | | | | | | | | - Rename the `-fsame-fbits` flag to `-fpadding-on-unsigned-fixed-point` - Move the flag from a driver option to a cc1 option - Rename the `SameFBits` member in TargetInfo to `PaddingOnUnsignedFixedPoint` - Updated descriptions Differential Revision: https://reviews.llvm.org/D48727 llvm-svn: 335993
* [ELF] Set -o because current directory may not be writable during a testFangrui Song2018-06-291-1/+1
| | | | llvm-svn: 335992
* [dsymutil] Make the CachedBinaryHolder the defaultJonas Devlieghere2018-06-2910-383/+126
| | | | | | | | Replaces all uses of the old binary holder with its cached variant. Differential revision: https://reviews.llvm.org/D48770 llvm-svn: 335991
* [dsymutil] Introduce a new CachedBinaryHolderJonas Devlieghere2018-06-296-32/+409
| | | | | | | | | | | | | | | | | | | | | | | | The original binary holder has an optimization where it caches a static library (archive) between consecutive calls to GetObjects. However, the actual memory buffer wasn't cached between calls. This made sense when dsymutil was processing objects one after each other, but when processing them in parallel, several binaries have to be in memory at the same time. For this reason, every link context contained a binary holder. Having one binary holder per context is problematic, because the same static archive was cached for every object file. Luckily, when the file is mmap'ed, this was only costing us virtual memory. This patch introduces a new BinaryHolder variant that is fully cached, for all the object files it load, as well as the static archives. This way, we don't have to give up on this optimization of bypassing the file system. Differential revision: https://reviews.llvm.org/D48501 llvm-svn: 335990
* [mips] Support shrink-wrappingPetar Jovanovic2018-06-296-13/+405
| | | | | | | | | | Except for -O0, it's enabled by default. Patch by Vladimir Stefanovic. Differential Revision: https://reviews.llvm.org/D47947 llvm-svn: 335989
* [AMDGPU] Enable LICM in the BE pipelineStanislav Mekhanoshin2018-06-299-32/+290
| | | | | | | | | | This allows to hoist code portion to compute reciprocal of loop invariant denominator in integer division after codegen prepare expansion. Differential Revision: https://reviews.llvm.org/D48604 llvm-svn: 335988
* [OPENMP, NVPTX] Sync threads before start ordered loops.Alexey Bataev2018-06-291-1/+6
| | | | | | | | | | | | Summary: Threads must be synchronized before starting ordered construct. Reviewers: grokos Subscribers: guansong, openmp-commits Differential Revision: https://reviews.llvm.org/D48732 llvm-svn: 335987
* [MachineOutliner] Add always and never options to -enable-machine-outlinerJessica Paquette2018-06-292-4/+23
| | | | | | | | | | | | | | | | | This is a recommit of r335887, which was erroneously committed earlier. To enable the MachineOutliner by default on AArch64, we need to be able to disable the MachineOutliner and also provide an option to "always" enable the outliner. This adds that capability. It allows the user to still use the old -enable-machine-outliner option, which defaults to "always". This is building up to allowing the user to specify "always" versus the target default outlining behaviour. https://reviews.llvm.org/D48682 llvm-svn: 335986
* [lld] Address post-commit review of r335848Filipe Cabecinhas2018-06-291-1/+1
| | | | llvm-svn: 335985
* [InstCombine] add more tests for shuffle-binop folds; NFCSanjay Patel2018-06-291-1/+73
| | | | | | | The mul+shl tests add coverage for the fold enabled with D48678. The and+or tests are not handled yet; that's D48662. llvm-svn: 335984
* [clang-format/ObjC] Fix NS_SWIFT_NAME(foo(bar:baz:)) after ObjC method declBen Hamilton2018-06-292-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In D44638, I partially fixed `NS_SWIFT_NAME(foo(bar:baz:))`-style annotations on C functions, but didn't add a test for Objective-C method declarations. For ObjC method declarations which are annotated with `NS_SWIFT_NAME(...)`, we currently fail to annotate the final component of the selector name as `TT_SelectorName`. Because the token type is left unknown, clang-format will happily cause a compilation error when it changes the following: ``` @interface Foo - (void)doStuffWithFoo:(id)name bar:(id)bar baz:(id)baz NS_SWIFT_NAME(doStuff(withFoo:bar:baz:)); @end ``` to: ``` @interface Foo - (void)doStuffWithFoo:(id)name bar:(id)bar baz:(id)baz NS_SWIFT_NAME(doStuff(withFoo:bar:baz :)); @end ``` (note the linebreak before the final `:`). The logic which decides whether or not to annotate the token before a `:` with `TT_SelectorName` is pretty fragile, and has to handle some pretty odd cases like pair-parameters: ``` [I drawRectOn:surface ofSize:aa:bbb atOrigin:cc:dd]; ``` So, to minimize the effect of this change, I decided to only annotate unknown identifiers before a `:` as `TT_SelectorName` for Objective-C declaration lines. Test Plan: New tests included. Confirmed tests failed before change and passed after change. Ran tests with: % make -j16 FormatTests && ./tools/clang/unittests/Format/FormatTests Reviewers: djasper, krasimir, jolesiak Reviewed By: krasimir Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D48679 llvm-svn: 335983
* [scs] Disable negative test in shadowcallstack.Evgeniy Stepanov2018-06-291-9/+1
| | | | | | | | The test checks that scs does NOT work correctly w/o runtime support. That's a strange thing to test, and it is also flaky, because things may just work if x18 happens to point to a writable page. llvm-svn: 335982
* [scudo] Add some runtime tests for the minimal runtimeKostya Kortchinsky2018-06-294-4/+43
| | | | | | | | | | | | | | | | Summary: As well as some tests to ensure that various combinations of the clang command line flags work (shared/static/minimal). Reviewers: eugenis, alekseyshl, vitalybuka Reviewed By: vitalybuka Subscribers: srhines, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D48553 llvm-svn: 335981
* [clangd] codeComplete returns more structured completion items, LSP. NFC.Sam McCall2018-06-294-197/+283
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: LSP has some presentational fields with limited semantics (e.g. 'detail') and doesn't provide a good place to return information like namespace. Some places where more detailed information is useful: - tools like quality analysis - alternate frontends that aren't strictly LSP - code completion unit tests In this patch, ClangdServer::codeComplete still return LSP CompletionList, but I plan to switch that soon (should be a no-op for ClangdLSPServer). Deferring this makes it clear that we don't change behavior (tests stay the same) and also keeps the API break to a small patch which can be reverted. Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, cfe-commits, jkorous Differential Revision: https://reviews.llvm.org/D48762 llvm-svn: 335980
* [ELF] - Linker script: add tests for checking malformed numbers parsing.George Rimar2018-06-291-2/+17
| | | | | | | | | | | | | | Previoulsy we had no test that covered malfolmed numbers with 'H', 'K' and 'M' suffixes, so the following lines were uncovered: https://github.com/llvm-mirror/lld/blob/master/ELF/ScriptParser.cpp#L996 https://github.com/llvm-mirror/lld/blob/master/ELF/ScriptParser.cpp#L1003 https://github.com/llvm-mirror/lld/blob/master/ELF/ScriptParser.cpp#L1008 Patch fixes that. llvm-svn: 335979
* [clang-format] Support additional common functions for text proto formattingKrasimir Georgiev2018-06-291-1/+4
| | | | | | | | | | | | | | Summary: This adds a few more common function names expecting a text proto argument. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D48760 llvm-svn: 335978
* [llvm-mca] Remove field HasReadAdvanceEntries from class ReadDescriptor.Andrea Di Biagio2018-06-293-15/+0
| | | | | | | | | | | | This simplifies the logic that updates RAW dependencies in the DispatchStage. There is no advantage in storing that flag in the ReadDescriptor; we should simply rely on the call to `STI.getReadAdvanceCycles()` to obtain the ReadAdvance cycles. If there are no read-advance entries, then method `getReadAdvanceCycles()` quickly returns 0. No functional change intended. llvm-svn: 335977
* [DEBUG_INFO, NVPTX] Do not emit .debug_loc section.Alexey Bataev2018-06-293-53/+24
| | | | | | | | | | | | | | | Summary: .debug_loc section is not supported for NVPTX target. If there is an object whose location can change during its lifetime, we do not generate debug location info for this variable. Reviewers: echristo Subscribers: jholewinski, JDevlieghere, llvm-commits Differential Revision: https://reviews.llvm.org/D48730 llvm-svn: 335976
* [Hexagon] Remove unused instruction itineraties, NFCKrzysztof Parzyszek2018-06-291-680/+0
| | | | llvm-svn: 335975
* [InstCombine] enhance shuffle-of-binops to allow different variable ops ↵Sanjay Patel2018-06-292-47/+66
| | | | | | | | | | | | | | | | | | | | | | | (PR37806) This was discussed in D48401 as another improvement for: https://bugs.llvm.org/show_bug.cgi?id=37806 If we have 2 different variable values, then we shuffle (select) those lanes, shuffle (select) the constants, and then perform the binop. This eliminates a binop. The new shuffle uses the same shuffle mask as the existing shuffle, so there's no danger of creating a difficult shuffle. All of the earlier constraints still apply, but we also check for extra uses to avoid creating more instructions than we'll remove. Additionally, we're disallowing the fold for div/rem because that could expose a UB hole. Differential Revision: https://reviews.llvm.org/D48678 llvm-svn: 335974
* [ELF] - Eliminate dead code from shouldKeepInSymtab. NFC.George Rimar2018-06-291-3/+0
| | | | | | | | | | | | | | | | shouldKeepInSymtab is called from copyLocalSymbols: https://github.com/llvm-mirror/lld/blob/master/ELF/Writer.cpp#L574 The pre-condition is that symbol should be Defined: https://github.com/llvm-mirror/lld/blob/master/ELF/Writer.cpp#L572 And its section is Live: https://github.com/llvm-mirror/lld/blob/master/ELF/Writer.cpp#L548 InputSection::Discarded section can never be Live. And hence I believe check I removed in this patch is excessive. llvm-svn: 335973
* [clangd] Improve output of --help and --version. NFC.Sam McCall2018-06-291-1/+11
| | | | | | | | | | Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D48634 llvm-svn: 335972
* Use range for in normalizeValInst [NFCI]Tobias Grosser2018-06-291-27/+25
| | | | llvm-svn: 335971
* Translate a couple of foreach callbacks into range-based iterator loopsTobias Grosser2018-06-291-38/+25
| | | | | | | Thanks to Philip Pfaffe for providing iterator support in the previous commit. llvm-svn: 335970
* [ELF] - EhFrame.cpp: cover personality encoding handling code with the test ↵George Rimar2018-06-296-0/+196
| | | | | | | | | | | | | | | | cases. CIEs augmentation string can have 'P' character, what means the next byte is the personality encoding, a DW_EH_PE_xxx value. This is followed by a pointer to the personality function. We had the support of the different encodings earlier, but had no test cases. This change adds coverage of DW_EH_PE_absptr/DW_EH_PE_signed/DW_EH_PE_udata2/DW_EH_PE_sdata2 and DW_EH_PE_udata8/DW_EH_PE_sdata8 cases for place below: https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L123 llvm-svn: 335969
* [ASTImporter] Added import of CXXStdInitializerListExprGabor Marton2018-06-293-0/+26
| | | | | | | | | | | | | | Reviewers: a.sidorin Reviewed By: a.sidorin Subscribers: martong, cfe-commits Differential Revision: https://reviews.llvm.org/D48631 Patch by Balazs Keri! llvm-svn: 335968
OpenPOWER on IntegriCloud