summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [Analyzer] Do not use static storage to for implementations created in ↵George Karpenkov2017-10-235-60/+56
| | | | | | | | BodyFarm.cpp Differential Revision: https://reviews.llvm.org/D39208 llvm-svn: 316400
* [analyzer] Fix handling of labels in getLValueElementAlexander Shaposhnikov2017-10-232-1/+9
| | | | | | | | | | | In getLValueElement Base may represent the address of a label (as in the newly-added test case), in this case it's not a loc::MemRegionVal and Base.castAs<loc::MemRegionVal>() triggers an assert, this diff makes getLValueElement return UnknownVal instead. Differential revision: https://reviews.llvm.org/D39174 llvm-svn: 316399
* [codeview] Add support for inlinee listsReid Kleckner2017-10-235-3/+48
| | | | | | | | | | | This adds type index discovery and dumper support for symbol record kind 0x1168, which is a list of inlined function ids. This symbol kind is undocumented, but S_INLINEES is consistent with the existing nomenclature. Fixes PR34222 llvm-svn: 316398
* [PM] Fix TypoJustin Lebar2017-10-231-1/+1
| | | | | | Patch by Nick Sarnie. llvm-svn: 316397
* [MachineOutliner] Add optimisation remarks for successful outliningJessica Paquette2017-10-232-45/+134
| | | | | | | | | | | | | | | | | | | This commit adds optimisation remarks for outlining which fire when a function is successfully outlined. To do this, OutlinedFunctions must now contain references to their Candidates. Since the Candidates must still be sorted and worked on separately, this is done by working on everything in terms of shared_ptrs to Candidates. This is good; it means that we can easily move everything to outlining in terms of the OutlinedFunctions rather than the individual Candidates. This is far more intuitive than what's currently there! (Remarks are output when a function is created for some group of Candidates. In a later commit, all of the outlining logic should be rewritten so that we loop over OutlinedFunctions rather than over Candidates.) llvm-svn: 316396
* [Sanitizers-libFuzzer] Addressing coding style issues.Alex Shlyapnikov2017-10-231-37/+44
| | | | | | | | | | | | Summary: The result of clang-format and few manual changes (as prompted on D39155). Reviewers: vitalybuka Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39211 llvm-svn: 316395
* More fuzzing interfacesMarshall Clow2017-10-233-20/+145
| | | | llvm-svn: 316394
* [lldbtests] Handle errors instead of crashing.Davide Italiano2017-10-231-1/+5
| | | | | | | | | | | | | | | | | | If you pass an invalid compiler/debugger path on the cmdline to `dotest.py` this is what you get. Traceback (most recent call last): [...] File "dotest.py", line 7, in <module> lldbsuite.test.run_suite() [...] And with the patch applied: /home/davide/work/build-lldb/bin/clandasfasg is not a valid path, exiting Differential Revision: https://reviews.llvm.org/D39199 llvm-svn: 316393
* [PDB] Add test for S_THUNK32 recordsReid Kleckner2017-10-231-0/+2747
| | | | | | | | | I locally reverted r316385 and confirmed that this test fails without it. Really fixes the cause of PR35014. llvm-svn: 316392
* Use ipv4 localhost address in lldb-server testsPavel Labath2017-10-231-1/+1
| | | | | | | | | | | | Since the ipv6 patch, we've experienced occasional flakyness in lldb-server tests. This was due to the fact that lldb-server was trying to listen on both v4 and v6 localhost sockets (and consider it a success if at least one of them succeeded), while the test framework was only trying to connect to the v4 one. This change makes sure lldb-server only listens on the v4 socket. llvm-svn: 316391
* [Symbol] Remove dead code. NFCI.Davide Italiano2017-10-231-23/+0
| | | | llvm-svn: 316390
* AMDGPU: Initialize WavefrontSize from TD filesKonstantin Zhuravlyov2017-10-232-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D39205 llvm-svn: 316389
* [GISel][ARM]: Fix illegal Generic copies in testsAditya Nandakumar2017-10-234-227/+382
| | | | | | | This is in preparation for a verifier check that makes sure copies are of the same size (when generic virtual registers are involved). llvm-svn: 316388
* [GISel][AArch64]: Fix illegal Generic copies in testsAditya Nandakumar2017-10-2316-77/+168
| | | | | | | This is in preparation for a verifier check that makes sure copies are of the same size (when generic virtual registers are involved). llvm-svn: 316387
* [PDB] Fix logging of bad type indicesReid Kleckner2017-10-231-1/+1
| | | | llvm-svn: 316386
* [codeview] Recognize two records with no type index fieldsReid Kleckner2017-10-231-0/+2
| | | | | | | | Thunk records do not have types and frame cookies do not have types. These were found while linking libconcrt.lib from MSVC. llvm-svn: 316385
* [PM] Add pgo-memop-opt pass to the new pass managerRong Xu2017-10-232-0/+8
| | | | | | | | | This pass adds pgo-memop-opt pass to the new pass manager. It is in the old pass manager but somehow left out in the new pass manager. Differential Revision: http://reviews.llvm.org/D39145 llvm-svn: 316384
* [X86][SSE] combineBitcastvxi1 - use PACKSSWB directly to pack v8i16 to v16i8Simon Pilgrim2017-10-235-139/+70
| | | | | | Avoid difficulties determining the number of sign bits later on in shuffle lowering to lower to PACKSS llvm-svn: 316383
* [libFuzzer] Periodically purge allocator's quarantine to prolong fuzzing ↵Alex Shlyapnikov2017-10-236-1/+32
| | | | | | | | | | | | | | | | | | | | | sessions. Summary: Fuzzing targets that allocate/deallocate a lot of memory tend to consume a lot of RSS when ASan quarantine is enabled. Purging quarantine between iterations and returning memory to OS keeps RSS down and should not reduce the quarantine effectiveness provided the fuzz target does not preserve state between iterations (in this case this feature can be turned off). Based on D39153. Reviewers: vitalybuka Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39155 llvm-svn: 316382
* [Sema] Add support for flexible array members in Obj-C.Volodymyr Sapsai2017-10-2311-55/+577
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow Obj-C ivars with incomplete array type but only as the last ivar. Also add a requirement for ivars that contain a flexible array member to be at the end of class too. It is possible to add in a subclass another ivar at the end but we'll emit a warning in this case. Also we'll emit a warning if a variable sized ivar is declared in class extension or in implementation because subclasses won't know they should avoid adding new ivars. In ARC incomplete array objects are treated as __unsafe_unretained so require them to be marked as such. Prohibit synthesizing ivars with flexible array members because order of synthesized ivars is not obvious and tricky to control. Spelling out ivar explicitly gives control to developers and helps to avoid surprises with unexpected ivar ordering. For C and C++ changed diagnostic to tell explicitly a field is not the last one and point to the next field. It is not as useful as in Obj-C but it is an improvement and it is consistent with Obj-C. For C for unions emit more specific err_flexible_array_union instead of generic err_field_incomplete. rdar://problem/21054495 Reviewers: rjmccall, theraven Reviewed By: rjmccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D38773 llvm-svn: 316381
* Add a new Simulator entry for the target triple environment.Bob Wilson2017-10-233-1/+17
| | | | | | | | | | | | | | | | | | | | | | | Apple's iOS, tvOS and watchOS simulator platforms have never been clearly distinguished in the target triples. Even though they are intended to behave similarly to the corresponding device platforms, they have separate SDKs and are really separate platforms from the compiler's perspective. Clang now defines a macro when building for one of these simulator platforms (r297866) but that relies on the very indirect mechanism of checking to see which option was used to specify the minimum deployment target. That is not so great. Swift would also like to distinguish these simulator platforms in a similar way, but unlike Clang, Swift does not use a separate option to specify the minimum deployment target -- it uses a -target option to specify the target triple directly, including the OS version number. Using a different target triple for the simulator platforms is a much more direct and obvious way to specify this. Putting the "simulator" in the environment component of the triple means the OS values can stay the same and existing code the looks at the OS field will not be affected. https://reviews.llvm.org/D39143 rdar://problem/34729432 llvm-svn: 316380
* [Driver] Use ld.lld directly for Fuchsia rather than passing flavorPetr Hosek2017-10-234-12/+8
| | | | | | | | | | | Passing a flavor to LLD requires command line argument, but if these are being passed through a response file, this will fail because LLD needs to know which driver to use before processing the response file. Use ld.lld directly instead to avoid this issue. Differential Revision: https://reviews.llvm.org/D39176 llvm-svn: 316379
* Make Ctx a plain pointer again.Rafael Espindola2017-10-232-7/+12
| | | | | | | | | | | If a struct has a std::unique_ptr member, the logical interpretation is that that member will be destroyed with the struct. That is not the case for Ctx. It is has to be deleted earlier and its lifetime is defined by the functions where the AddressState is created. llvm-svn: 316378
* Fix buildbot breakageGeorge Burgess IV2017-10-231-0/+1
| | | | | | SP is only used in an assert. Caused by r316374. llvm-svn: 316377
* Document a change of behavior in r315552.Rafael Espindola2017-10-231-0/+17
| | | | | | | We used to reject this, but we now accept. The output seems reasonable, so this is probably an OK extension over bfd/gold. llvm-svn: 316376
* Made llvm-cfi-verify not execute unit tests on non-x86 builds.Mitch Phillips2017-10-235-26/+77
| | | | | | | | | | | | | | Patched out from D38427. Reviewers: vlad.tsyrklevich Reviewed By: vlad.tsyrklevich Subscribers: llvm-commits, kcc, pcc, mgorny Differential Revision: https://reviews.llvm.org/D39197 llvm-svn: 316375
* Don't crash when we see unallocatable registers in clobbersGeorge Burgess IV2017-10-234-15/+52
| | | | | | | | | | | | | | This fixes a bug where we'd crash given code like the test-case from https://bugs.llvm.org/show_bug.cgi?id=30792 . Instead, we let the offending clobber silently slide through. This doesn't fully fix said bug, since the assembler will still complain the moment it sees a crypto/fp/vector op, and we still don't diagnose calls that require vector regs. Differential Revision: https://reviews.llvm.org/D39030 llvm-svn: 316374
* Graph builder implementation.Mitch Phillips2017-10-237-7/+986
| | | | | | | | | | | | | | | | | | Implement a localised graph builder for indirect control flow instructions. Main interface is through GraphBuilder::buildFlowGraph, which will build a flow graph around an indirect CF instruction. Various modifications to FileVerifier are also made to const-expose some members needed for machine code analysis done by the graph builder. Reviewers: vlad.tsyrklevich Reviewed By: vlad.tsyrklevich Subscribers: llvm-commits, kcc, pcc Differential Revision: https://reviews.llvm.org/D38427 llvm-svn: 316372
* Revert "[PowerPC] Try to simplify a Swap if it feeds a Splat"Stefan Pintilie2017-10-232-181/+0
| | | | | | | | | Revert commit r316366. Previous commit causes p8-scalar_vector_conversions.ll to fail. This reverts commit 990e764ad8a2eec206ce5dda6aefab059ccd4e92. llvm-svn: 316371
* lld::COFF: better behavior when using as a libraryRui Ueyama2017-10-237-14/+19
| | | | | | | | | | | | | | | Previously, the COFF driver would call exit(0) when called as a library. Now it takes `ExitEarly` option, and if it is false, it doesn't exit. So it is now more library-friendly. Furthermore, link() calls freeArena() before returning, to clean up resources. Based on an Andrew Kelley's patch. Differential Revision: https://reviews.llvm.org/D39202 llvm-svn: 316370
* [GVNSink] Fix failing GVNSink tests in the reverse iteration botMandeep Singh Grang2017-10-231-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The elts of ActivePreds which is defined as a SmallPtrSet are copied into Blocks using std::copy. This makes the resultant order of Blocks non-deterministic. We cannot simply sort Blocks as they need to match the corresponding Values. So a better approach is to define ActivePreds as SmallSetVector. This fixes the following failures in http://lab.llvm.org:8011/builders/reverse-iteration: LLVM :: Transforms/GVNSink/indirect-call.ll LLVM :: Transforms/GVNSink/sink-common-code.ll LLVM :: Transforms/GVNSink/struct.ll Reviewers: dberlin, jmolloy, bkramer, efriedma Reviewed By: dberlin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39025 llvm-svn: 316369
* Logging: Disable logging after fork()Pavel Labath2017-10-236-7/+24
| | | | | | | | | | | | | | | | | | | | | | | Summary: We had a bug where if we had forked (in the ProcessLauncherPosixFork) while another thread was writing a log message, we would deadlock. This happened because the fork child inherited the locked log rwmutex, which would never get unlocked. This meant the child got stuck trying to disable all log channels. The bug existed for a while but only started being apparent after D37930, which started using ThreadLauncher (which uses logging) instead of std::thread (which does not) for launching TaskPool threads. The fix is to use pthread_atfork to disable logging in the forked child. Reviewers: zturner, eugene, clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D38938 llvm-svn: 316368
* [Hexagon] Return the correct chain edge for i1 function callsKrzysztof Parzyszek2017-10-232-1/+25
| | | | | | | | | | | | | | | | | In HexagonISelLowering, there is code to handle the case when a function returns an i1 type. In this case, we need to generate extra nodes to copy the result from R0 to a predicate register. The code was returning the wrong value for the chain edge which caused an assert "Wrong topological sorting" when converting the instructions to MIs. This patch fixes the problem by returning the chain for the final copy. Patch by Brendon Cahoon. llvm-svn: 316367
* [PowerPC] Try to simplify a Swap if it feeds a SplatStefan Pintilie2017-10-232-0/+181
| | | | | | | | | If we have the situation where a Swap feeds a Splat we can sometimes change the index on the Splat and then remove the Swap instruction. Differential Revision: https://reviews.llvm.org/D39009 llvm-svn: 316366
* LLD: Fix large integer implicitly truncated to unsigned type gcc warningKonstantin Zhuravlyov2017-10-231-1/+1
| | | | | | | | This fixes gcc warning. Change by Brian Sumner llvm-svn: 316365
* Abstract rwlocks into a class, provide a SRW lock implementation for windowsMartin Storsjo2017-10-234-30/+97
| | | | | | | | | | | | | | This requires _WIN32_WINNT >= 0x0600. If someone wants to spend effort on supporting earlier versions, one can easily add another fallback implementation based on critical sections, or try to load SRW lock functions dynamically. This makes sure that the FDE cache is thread safe on windows. Differential Revision: https://reviews.llvm.org/D38704 llvm-svn: 316364
* [Hexagon] Add extra pattern for S4_addaddiKrzysztof Parzyszek2017-10-232-0/+15
| | | | | | One combination was missing: add(add(x,y),c). llvm-svn: 316363
* [OpenMP] Avoid VLAs for some reductions on array sectionsJonas Hahnfeld2017-10-235-111/+416
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases the compiler can deduce the length of an array section as constants. With this information, VLAs can be avoided in place of a constant sized array or even a scalar value if the length is 1. Example: int a[4], b[2]; pragma omp parallel reduction(+: a[1:2], b[1:1]) { } For chained array sections, this optimization is restricted to cases where all array sections except the last have a constant length 1. This trivially guarantees that there are no holes in the memory region that needs to be privatized. Example: int c[3][4]; pragma omp parallel reduction(+: c[1:1][1:2]) { } This relands commit r316229 that I reverted in r316235 because it failed on some bots. During investigation I found that this was because Clang and GCC evaluate the two arguments to emplace_back() in ReductionCodeGen::emitSharedLValue() in a different order, hence leading to a different order of generated instructions in the final LLVM IR. Fix this by passing in the arguments from temporary variables that are evaluated in a defined order. Differential Revision: https://reviews.llvm.org/D39136 llvm-svn: 316362
* Fix FormatVariadicTest with GCCJonas Hahnfeld2017-10-231-1/+3
| | | | | | Looks like GCC didn't like the original specialization, try within namespace. llvm-svn: 316361
* [globalisel][tablegen] Import stores and allow GISel to automatically ↵Daniel Sanders2017-10-238-9/+171
| | | | | | | | | | | | | | | | | substitute zero regs like WZR/XZR/$zero. This patch enables the import of stores. Unfortunately, doing so by itself, loses an optimization where storing 0 to memory makes use of WZR/XZR. To mitigate this, this patch also introduces a new feature that allows register operands to nominate a zero register. When this is done, GlobalISel will substitute (G_CONSTANT 0) with the nominated register automatically. This is currently configured to only apply to the stores. Applying it to GPR32/GPR64 register classes in general will be done after review see (https://reviews.llvm.org/D39150). llvm-svn: 316360
* Accidently merged an incomplete upstream patch in ↵Mitch Phillips2017-10-234-10/+7
| | | | | | 10e6ee563a6b5ca498f27972ca6dbe6c308f1ac2 - reverting the changes. llvm-svn: 316359
* Patch inMitch Phillips2017-10-234-7/+10
| | | | llvm-svn: 316358
* [wasm] readSection: Avoid reading past eof (fixes oss-fuzz #3219)Vedant Kumar2017-10-233-3/+7
| | | | | | | | | | | | | A wasm file crafted with a bogus section size can trigger an ASan issue in the DWARFObjInMemory constructor. Nip the problem in the bud when we read the wasm section. Found by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3219 Differential Revision: https://reviews.llvm.org/D38777 llvm-svn: 316357
* [Sanitizers] Add total primary allocator RSS to allocator report.Alex Shlyapnikov2017-10-231-8/+14
| | | | | | | | | | | | Summary: . Reviewers: cryptoad Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D39131 llvm-svn: 316356
* [lldbtest] Simplify removing an unneeded else. NFCI.Davide Italiano2017-10-231-2/+1
| | | | llvm-svn: 316355
* [X86][SSE] Regenerate PACKSS tests on 32 + 64-bit targetsSimon Pilgrim2017-10-231-74/+67
| | | | llvm-svn: 316354
* CodeGen: Fix invalid bitcast in partial initialization of automatic arrary ↵Yaxun Liu2017-10-232-1/+9
| | | | | | | | variable Differential Revision: https://reviews.llvm.org/D39184 llvm-svn: 316353
* Updated 'Getting Started' to use valid git links (added trailing slashes)Mitch Phillips2017-10-231-33/+33
| | | | | | | | | | | | Reviewers: pcc, asl, tonic Reviewed By: pcc Subscribers: llvm-commits, kcc Differential Revision: https://reviews.llvm.org/D38516 llvm-svn: 316352
* [PassManager] add test to show the new PM uses -latesimplifycfg early; NFCSanjay Patel2017-10-231-0/+95
| | | | llvm-svn: 316351
* [globalisel] Add very brief docs summarizing the ISel part of the LLVMDev ↵Daniel Sanders2017-10-231-5/+69
| | | | | | | | tutorial. Also added links to the talks available. llvm-svn: 316350
OpenPOWER on IntegriCloud