summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Amend "Remove unused type Either from Utility library".Tatyana Krasnukha2018-08-101-72/+0
| | | | llvm-svn: 339430
* Fix a deprecated warning in the last commit.David Chisnall2018-08-101-1/+1
| | | | | | | Done as a separate commit to make it easier to cherry pick the changes to the release branch. llvm-svn: 339429
* Add Windows support for the GNUstep Objective-C ABI V2.David Chisnall2018-08-1014-179/+363
| | | | | | | | | | | | | | | | | | | | | Summary: Introduces funclet-based unwinding for Objective-C and fixes an issue where global blocks can't have their isa pointers initialised on Windows. After discussion with Dustin, this changes the name mangling of Objective-C types to prevent a C++ catch statement of type struct X* from catching an Objective-C object of type X*. Reviewers: rjmccall, DHowett-MSFT Reviewed By: rjmccall, DHowett-MSFT Subscribers: mgrang, mstorsjo, smeenai, cfe-commits Differential Revision: https://reviews.llvm.org/D50144 llvm-svn: 339428
* [clang-tidy] run-clang-tidy.py - add synchronisation to the outputAndi-Bogdan Postelnicu2018-08-101-5/+11
| | | | | | Differential Revision: https://reviews.llvm.org/D49851 llvm-svn: 339427
* [clangd] Allow consuming limited number of itemsKirill Bobyrev2018-08-103-5/+28
| | | | | | | | | | | | | | | | | This patch modifies `consume` function to allow retrieval of limited number of symbols. This is the "cheap" implementation of top-level limiting iterator. In the future we would like to have a complete limit iterator implementation to insert it into the query subtrees, but in the meantime this version would be enough for a fully-functional proof-of-concept Dex implementation. Reviewers: ioeric, ilya-biryukov Reviewed by: ioeric Differential Revision: https://reviews.llvm.org/D50500 llvm-svn: 339426
* [X86][SSE] Pull out repeated shift getOpcode() calls. NFCI.Simon Pilgrim2018-08-101-23/+23
| | | | llvm-svn: 339425
* clang-cl: accept -fcrash-diagnostics-dir=Hans Wennborg2018-08-102-1/+2
| | | | llvm-svn: 339424
* Fix a wrong type bug in ParsedAttr::TypeTagForDatatypeDataBruno Ricci2018-08-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a wrong type bug inside ParsedAttr::TypeTagForDatatypeData. The details to the best of my knowledge are as follow. The incredible thing is that everything works out just fine by chance due to a sequence of lucky coincidences in the layout of various types. The struct ParsedAttr::TypeTagForDatatypeData contains among other things a ParsedType *MatchingCType, where ParsedType is just OpaquePtr<QualType>. However the member MatchingCType is initialized in the constructor for type_tag_for_datatype attribute as follows: new (&ExtraData.MatchingCType) ParsedType(matchingCType); This results in the ParsedType being constructed in the location of the ParsedType * Later ParsedAttr::getMatchingCType do return *getTypeTagForDatatypeDataSlot().MatchingCType; which instead of dereferencing the ParsedType * will dereference the QualType inside the ParsedType. Now this QualType in this case contains no qualifiers and therefore is a valid Type *. Therefore getMatchingCType returns a Type or at least the stuff that is in the first sizeof(void*) bytes of it, But it turns out that Type inherits from ExtQualsCommonBase and that the first member of ExtQualsCommonBase is a const Type *const BaseType. This Type * in this case points to the original Type pointed to by the QualType and so everything works fine even though all the types were wrong. This bug was only found because I changed the layout of Type, which obviously broke all of this long chain of improbable events. Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D50532 llvm-svn: 339423
* Fix -Wimplicit-fallthrough warning introduced in rL339397.Simon Pilgrim2018-08-101-0/+1
| | | | llvm-svn: 339422
* [Tablegen][SubtargetEmitter] refactor method `emitSchedModelHelpersImpl()`. NFCIAndrea Di Biagio2018-08-101-62/+96
| | | | | | | | | | Part of the logic has been moved to helper functions to (hopefully) improve readability. Added a few code comments to better describe how the algorithm works. No functional change intended. llvm-svn: 339421
* clang-cl: Support /guard:cf,nochecksHans Wennborg2018-08-105-8/+43
| | | | | | | | | | This extension emits the guard cf table without inserting the instrumentation. Currently that's what clang-cl does with /guard:cf anyway, but this allows a user to request that explicitly. Differential Revision: https://reviews.llvm.org/D50513 llvm-svn: 339420
* Rename the cfguard module flag to cfguardtableHans Wennborg2018-08-102-2/+2
| | | | | | | | | | The previous name sounds like it inserts cfguard implementation, but it really just emits the table of address-taken functions. Change the name to better reflect that. Clang will be updated in the next commit. llvm-svn: 339419
* [NFC] Add tests that demonstrate that MustExecute is fundamentally brokenMax Kazantsev2018-08-102-0/+160
| | | | llvm-svn: 339417
* [clangd] Fix a "-Wdangling-else" compiler warning in the test.Haojian Wu2018-08-101-1/+2
| | | | llvm-svn: 339416
* [clang-tidy] Omit cases where loop variable is not used in loop body inHaojian Wu2018-08-102-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | performance-for-range-copy check. Summary: The upstream change r336737 make the check too smart to fix the case where loop variable could be used as `const auto&`. But for the case below, changing to `const auto _` will introduce an unused complier warning. ``` for (auto _ : state) { // no references for _. } ``` This patch omit this case, and it is safe to do it as the case is very rare. Reviewers: ilya-biryukov, alexfh Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D50447 llvm-svn: 339415
* [MSan] Shrink the register save area for non-SSE buildsAlexander Potapenko2018-08-102-2/+36
| | | | | | | | If code is compiled for X86 without SSE support, the register save area doesn't contain FPU registers, so `AMD64FpEndOffset` should be equal to `AMD64GpEndOffset`. llvm-svn: 339414
* [ELF] - Get rid of SyntheticSection::postThunkContents(). NFCI.George Rimar2018-08-103-15/+13
| | | | | | | | | | | | It turns out that postThunkContents() is only used for sorting symbols in .symtab. Though we can instead move the logic to SymbolTableBaseSection::finalizeContents(), postpone calling it and then get rid of postThunkContents completely. Differential revision: https://reviews.llvm.org/D49547 llvm-svn: 339413
* [LLD][ELF] - Fix crash when using empty --defsym.George Rimar2018-08-102-1/+10
| | | | | | | | | | | | | | | | | | | | We have a crash issue when handling the empty -defsym. For parsing this option we are using ScriptParser class which is used generally for reading the linker script. For empty defsym case, we pass the empty memory buffer and crash in the place removed in https://reviews.llvm.org/rL336436. But reverting of the above patch would not help here (we would still crash but a bit later). And even after fixing the crash we would report something like "lld.exe: error: -defsym:1: unexpected EOF" It is probably not the appropriate message because mentions EOF. I think the issue should be handled on a higher level like this patch does. So we do not want to pass the empty memory buffer first of all I believe. Differential revision: https://reviews.llvm.org/D50498 llvm-svn: 339412
* [MemorySSA] "Fix" lifetime intrinsic handlingGeorge Burgess IV2018-08-103-2/+115
| | | | | | | | | | | | | | | | | | | MemorySSA currently creates MemoryAccesses for lifetime intrinsics, and sometimes treats them as clobbers. This may/may not be the best way forward, but while we're doing it, we should consider MayAlias/PartialAlias to be clobbers. The ideal fix here is probably to remove all of this reasoning about lifetimes from MemorySSA + put it into the passes that need to care. But that's a wayyy broader fix that needs some consensus, and we have miscompiles + a release branch today, and this should solve the miscompiles just as well. differential revision is D43269. Landing without an explicit LGTM (and without using the special please-autoclose-this syntax) so we can still use that revision as a place to decide what the right fix here is. llvm-svn: 339411
* [InstCombine] Transform str(n)cmp to memcmpDavid Bolvansky2018-08-102-48/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Motivation examples: int strcmp_memcmp() { char buf[12]; return strcmp(buf, "key") == 0; } int strcmp_memcmp2() { char buf[12]; return strcmp(buf, "key") != 0; } int strncmp_memcmp() { char buf[12]; return strncmp(buf, "key", 3) == 0; } can be turned to memcmp. See test file for more cases. Reviewers: efriedma Reviewed By: efriedma Subscribers: spatel, llvm-commits Differential Revision: https://reviews.llvm.org/D50233 llvm-svn: 339410
* Fix size calculation from r339380Richard Trieu2018-08-101-1/+1
| | | | | | | | | r339380 changed the trailing types of ParsedAttr to use llvm::TrailingObjects. However, it did not copy over one of the size attributes, causing a too small allocation for this object. The error was detected with AddressSanitizer use-after-poison llvm-svn: 339409
* Revert "SafeStack: Delay thread stack clean-up"Vlad Tsyrklevich2018-08-104-89/+29
| | | | | | | | | This reverts commit r339405, it's failing on Darwin buildbots because it doesn't seem to have a tgkill/thr_kill2 interface. It has a __pthread_kill() syscall, but that relies on having a handle to the thread's port which is not equivalent to it's tid. llvm-svn: 339408
* [WebAssembly] Gate i64x2 and f64x2 on -wasm-enable-unimplementedHeejin Ahn2018-08-092-4/+21
| | | | | | | | | | | | | | | | | | Summary: i64x2 and f64x2 operations are not implemented in V8, so we normally do not want to emit them. However, they are in the SIMD spec proposal, so we still want to be able to test them in the toolchain. This patch adds a flag to enable their emission. Reviewers: aheejin, dschuff Subscribers: sunfish, jgravelle-google, sbc100, llvm-commits Differential Revision: https://reviews.llvm.org/D50423 Patch by Thomas Lively (tlively) llvm-svn: 339407
* [X86] Qualify one of the heuristics in combineMul to only apply to positive ↵Craig Topper2018-08-092-4/+6
| | | | | | | | multiply amounts. This seems to slightly help the performance of one of our internal benchmarks. We probably need better heuristics here. llvm-svn: 339406
* SafeStack: Delay thread stack clean-upVlad Tsyrklevich2018-08-094-29/+89
| | | | | | | | | | | | | | | | | | Summary: glibc can call SafeStack instrumented code even after the last pthread data destructor has run. Delay cleaning-up unsafe stacks for threads until the thread is dead by having future threads clean-up prior threads stacks. Reviewers: pcc, eugenis Reviewed By: eugenis Subscribers: cryptoad, eugenis, kubamracek, delcypher, llvm-commits, #sanitizers, kcc Differential Revision: https://reviews.llvm.org/D50406 llvm-svn: 339405
* [llvm-objcopy] NFC: Add some color to error()Jordan Rupprecht2018-08-094-6/+9
| | | | llvm-svn: 339404
* Mark up deprecated methods as suchStephen Kelly2018-08-0921-328/+1312
| | | | | | | | | | Reviewers: teemperor! Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50352 llvm-svn: 339403
* Remove obsolete set callStephen Kelly2018-08-091-8/+0
| | | | | | | | | | | | | | Summary: Case case of the switch statement here makes the same call, but it is already done at the start of the function. Reviewers: rsmith, dblaikie Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50409 llvm-svn: 339402
* Port getLocEnd -> getEndLocStephen Kelly2018-08-0943-59/+59
| | | | | | | | Subscribers: nemanjai, ioeric, kbarton, cfe-commits Differential Revision: https://reviews.llvm.org/D50355 llvm-svn: 339401
* Port getLocStart -> getBeginLocStephen Kelly2018-08-09126-311/+309
| | | | | | | | | | Reviewers: javed.absar Subscribers: nemanjai, kbarton, ilya-biryukov, ioeric, jkorous, arphaman, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D50354 llvm-svn: 339400
* ValueTracking: Start enhancing isKnownNeverNaNMatt Arsenault2018-08-095-15/+97
| | | | llvm-svn: 339399
* [WebAssembly] Fix wasm backend compilation on gcc 5.4: variable name cannot ↵Heejin Ahn2018-08-091-5/+5
| | | | | | | | | | | | | | | | | | | | | | | match class Summary: gcc does not like const Region *Region; It wants a different name for the variable. Is there a better convention for what name to use in such a case? Reviewers: sbc100, aheejin Subscribers: aheejin, jgravelle-google, dschuff, llvm-commits Differential Revision: https://reviews.llvm.org/D50472 Patch by Alon Zakai (kripken) llvm-svn: 339398
* [MC] Move EH DWARF encodings from MC to CodeGen, NFCReid Kleckner2018-08-095-166/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The TType encoding, LSDA encoding, and personality encoding are all passed explicitly by CodeGen to the assembler through .cfi_* directives, so only the AsmPrinter needs to know about them. The FDE CFI encoding however, controls the encoding of the label implicitly created by the .cfi_startproc directive. That directive seems to be special in that it doesn't take an encoding, so the assembler just has to know how to encode one DSO-local label reference from .eh_frame to .text. As a result, it looks like MC will continue to have to know when the large code model is in use. Perhaps we could invent a '.cfi_startproc [large]' flag so that this knowledge doesn't need to pollute the assembler. Reviewers: davide, lliu0, JDevlieghere Subscribers: hiraditya, fedor.sergeev, llvm-commits Differential Revision: https://reviews.llvm.org/D50533 llvm-svn: 339397
* [InstSimplify] move minnum/maxnum with Inf folds from instcombineSanjay Patel2018-08-095-70/+73
| | | | llvm-svn: 339396
* AMDGPU: Add another missing builtinMatt Arsenault2018-08-093-1/+10
| | | | llvm-svn: 339395
* Add owner for llvm-objcopyJake Ehrlich2018-08-091-0/+4
| | | | llvm-svn: 339394
* [OpenMP] Cleanup codeJonathan Peyton2018-08-0924-417/+239
| | | | | | | | | | | | | | | | This patch cleans up unused functions, variables, sign compare issues, and addresses some -Warning flags which are now enabled including -Wcast-qual. Not all the warning flags in LibompHandleFlags.cmake are enabled, but some are with this patch. Some __kmp_gtid_from_* macros in kmp.h are switched to static inline functions which allows us to remove the awkward definition of KMP_DEBUG_ASSERT() and KMP_ASSERT() macros which used the comma operator. This had to be done for the innumerable -Wunused-value warnings related to KMP_DEBUG_ASSERT() Differential Revision: https://reviews.llvm.org/D49105 llvm-svn: 339393
* Added LLVM metadata to generated IR to increase vectorization widthEmmett Neyman2018-08-091-1/+6
| | | | | | | | | | | | | | Summary: Edited `loop_proto_to_llvm` to emit metadata at the end of the generated IR. This metadata will increase the vector width when the IR is optimized. Reviewers: morehouse, kcc Reviewed By: morehouse Subscribers: cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D50530 llvm-svn: 339392
* [NFC] ConstantMerge: factor out some functionsJF Bastien2018-08-091-25/+42
| | | | | | This makes the code easier to read and will make an upcoming patch I have easier to review because that patch needed this refactoring to reuse some of the functions. llvm-svn: 339391
* ConstantMerge: update MadeChange when change is madeJF Bastien2018-08-091-0/+1
| | | | | | It was always false, which is obviously wrong. llvm-svn: 339390
* Fix and recommit r339382 based on solution from RSmith:Erich Keane2018-08-091-3/+1
| | | | | | | | | As sent on cfe-commits: "You need to use "friend TrailingObjects;" here, not "friend class TrailingObjects;", to avoid breaking MSVC (which doesn't implement injected-class-names quite according to spec)." llvm-svn: 339389
* [LICM] Suppress a compiler warning noticed by one of the botsPhilip Reames2018-08-091-0/+1
| | | | llvm-svn: 339388
* Revert -r339382, which apparently breaks the Windows build.Erich Keane2018-08-091-1/+3
| | | | llvm-svn: 339387
* Port getLocEnd -> getEndLocStephen Kelly2018-08-0981-543/+515
| | | | | | | | | | Reviewers: teemperor! Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50351 llvm-svn: 339386
* Port getLocStart -> getBeginLocStephen Kelly2018-08-09147-2553/+2369
| | | | | | | | | | Reviewers: teemperor! Subscribers: jholewinski, whisperity, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D50350 llvm-svn: 339385
* Port getStartLoc -> getBeginLocStephen Kelly2018-08-098-21/+21
| | | | | | | | | | Reviewers: teemperor! Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50349 llvm-svn: 339384
* [NFC] Complete the rule-of-5 for ParsedAttrErich Keane2018-08-091-0/+2
| | | | | | | Add move assign/construct as 'deleted' to ParsedAttr to complete the rule-of-5. llvm-svn: 339383
* [NFC] Simplify 'friend' declaration in ParsedAttrErich Keane2018-08-091-3/+1
| | | | | | | | As suggested in the post-commit review for D50531, change from the templatized TrailingObjects friend declaration to a version referring to the base. llvm-svn: 339382
* [RISC-V] Fixed alias for addi x2, x2, 0Ana Pazos2018-08-092-1/+4
| | | | | | | | A missing check for non-zero immediate in MCOperandPredicate caused c.addi16sp sp, 0 to be selected which is not a valid instruction. llvm-svn: 339381
* [NFC] Convert ParsedAttr to use llvm::TrailingObjectsErich Keane2018-08-093-68/+106
| | | | | | | | | | | ParsedAttr is using a hand-rolled trailing-objects implementation that gets cleaned up quite a bit by just using llvm::TrailingObjects. This is a large TrailingObjects list, but most things are length '0'. Differential Revision: https://reviews.llvm.org/D50531 llvm-svn: 339380
OpenPOWER on IntegriCloud