summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Use llvm_unreachable for unreachable code.Rui Ueyama2018-11-011-2/+2
| | | | llvm-svn: 345885
* Set MAttrs in LTO modeFangrui Song2018-11-015-0/+6
| | | | | | | | | | | | | | | | Summary: Without this patch, MAttrs are not set. Patch by Yin Ma Reviewers: espindola, MaskRay, ruiu, pcc Reviewed By: MaskRay, pcc Subscribers: pcc, emaste, sbc100, inglorion, arichardson, aheejin, steven_wu, llvm-commits Differential Revision: https://reviews.llvm.org/D53446 llvm-svn: 345884
* [Hexagon] Remove unintended fallthrough from MC duplex codeReid Kleckner2018-11-011-5/+5
| | | | | | | | | | | | I added these annotations in r345878 because I wasn't sure if the fallthrough was intended. Krzysztof Parzyszek confirmed that they should be breaks, so that's what this patch does. Reviewers: kparzysz Differential Revision: https://reviews.llvm.org/D53991 llvm-svn: 345883
* Fix clang -Wimplicit-fallthrough warnings across llvm, NFCReid Kleckner2018-11-0161-64/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch should not introduce any behavior changes. It consists of mostly one of two changes: 1. Replacing fall through comments with the LLVM_FALLTHROUGH macro 2. Inserting 'break' before falling through into a case block consisting of only 'break'. We were already using this warning with GCC, but its warning behaves slightly differently. In this patch, the following differences are relevant: 1. GCC recognizes comments that say "fall through" as annotations, clang doesn't 2. GCC doesn't warn on "case N: foo(); default: break;", clang does 3. GCC doesn't warn when the case contains a switch, but falls through the outer case. I will enable the warning separately in a follow-up patch so that it can be cleanly reverted if necessary. Reviewers: alexfh, rsmith, lattner, rtrieu, EricWF, bollu Differential Revision: https://reviews.llvm.org/D53950 llvm-svn: 345882
* [LoopInterchange] Fix unused variables in release buildFlorian Hahn2018-11-011-0/+2
| | | | llvm-svn: 345881
* [WebAssembly] Fixup `main` signature by defaultSam Clegg2018-11-017-13/+8
| | | | | | Differential Revision: https://reviews.llvm.org/D53396 llvm-svn: 345880
* [codeview] Add breaks to fix -Wimplicit-fallthroughReid Kleckner2018-11-011-0/+2
| | | | | | | | | This is a minor bug fix. Previously, if you tried to encode the RSP register on the x86 platform, that might have succeeded and been encoded incorrectly. However, no existing producer or consumer passes the x86_64 registers when targeting x86_32. llvm-svn: 345879
* Annotate possibly unintended fallthroughs in Hexagon MC code, NFCReid Kleckner2018-11-011-0/+6
| | | | | | | | | | | | | | | | Clang's -Wimplicit-fallthrough check fires on these switch cases. GCC does not warn when a case body that ends in a switch falls through to a case label of an outer switch. It's not clear if these fall throughs are truly intended. The Hexagon tests pass regardless of whether these case blocks fall through or break. For now, I have applied the intended fallthrough annotation macro with a FIXME comment to unblock enabling the warning. I will send a follow-up patch that converts them to breaks to the Hexagon maintainers. llvm-svn: 345878
* [LoopInterchange] Remove support for inner-only reductions.Florian Hahn2018-11-015-391/+149
| | | | | | | | | | | | | | | | | | | | | | Inner-loop only reductions require additional checks to make sure they form a load-phi-store cycle across inner and outer loop. Otherwise the reduction value is not properly preserved. This patch disables interchanging such loops for now, as it causes miscompiles in some cases and it seems to apply only for a tiny amount of loops. Across the test-suite, SPEC2000 and SPEC2006, 61 instead of 62 loops are interchange with inner loop reduction support disabled. With -loop-interchange-threshold=-1000, 3256 instead of 3267. See the discussion and history of D53027 for an outline of how such legality checks could look like. Reviewers: efriedma, mcrosier, davide Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D53027 llvm-svn: 345877
* Remove unnecessary fallthrough annotation after unreachableReid Kleckner2018-11-011-2/+0
| | | | | | | | | | Clang's -Wimplicit-fallthrough implementation warns on this. I built clang with GCC 7.3 in +asserts and -asserts mode, and GCC doesn't warn on this in either configuration. I think it is unnecessary. I separated it from the large mechanical patch (https://reviews.llvm.org/D53950) in case I am wrong and it has to be reverted. llvm-svn: 345876
* [GlobalISel] Fix a bug in LegalizeRuleSet::clampMaxNumElementsVolkan Keles2018-11-014-23/+45
| | | | | | | | | | | | | | | | Summary: This function was causing a crash when `MaxElements == 1` because it was trying to create a single element vector type. Reviewers: dsanders, aemerson, aditya_nandakumar Reviewed By: dsanders Subscribers: rovka, kristof.beyls, javed.absar, llvm-commits Differential Revision: https://reviews.llvm.org/D53734 llvm-svn: 345875
* Output "rule" information in SARIF exports.Aaron Ballman2018-11-016-2/+386
| | | | | | SARIF allows you to export descriptions about rules that are present in the SARIF log. Expose the help text table generated into Checkers.inc as the rule's "full description" and export all of the rules present in the analysis output. This information is useful for analysis result viewers like CodeSonar. llvm-svn: 345874
* Add LLVM_FALLTHROUGH annotation after switchReid Kleckner2018-11-011-0/+1
| | | | | | | | | | | This silences a -Wimplicit-fallthrough warning from clang. GCC does not appear to warn when the case body ends in a switch. This is a somewhat surprising but intended fallthrough that I pulled out from my mechanical patch. The code intends to handle 'Yi' and related constraints as the 'x' constraint. llvm-svn: 345873
* Revert "[COFF, ARM64] Change setjmp for AArch64 Windows to use ↵Mandeep Singh Grang2018-11-012-7/+4
| | | | | | | | Intrinsic.sponentry" This reverts commit 619111f5ccf349b635e4987ec02d15777c571495. llvm-svn: 345872
* Revert "Reapply Logging: make os_log buffer size an integer constant ↵Tim Northover2018-11-018-19/+16
| | | | | | | | expression." Still more dependency hell. llvm-svn: 345871
* Use C++11 fallthrough attribute syntax when available and add a breakReid Kleckner2018-11-012-1/+6
| | | | | | | | | | | | | | | | | | | Summary: This silences the two -Wimplicit-fallthrough warnings clang finds in ItaniumDemangle.h in libc++abi. Clang does not have a GNU attribute spelling for this attribute, so this is necessary. I will commit the same change to the LLVM demangler soon. Reviewers: EricWF, ldionne Subscribers: christof, erik.pilkington, cfe-commits Differential Revision: https://reviews.llvm.org/D53985 llvm-svn: 345870
* [LegalizeDAG] Add generic vector CTPOP expansion (PR32655)Simon Pilgrim2018-11-013-55/+28
| | | | | | | | This patch adds support for expanding vector CTPOP instructions and removes the x86 'bitmath' lowering which replicates the same expansion. Differential Revision: https://reviews.llvm.org/D53258 llvm-svn: 345869
* [Hexagon] Fix MO_JumpTable const extender conversionReid Kleckner2018-11-011-0/+1
| | | | | | | | | | Previously this case fell through to unreachable, so it is clearly not covered by any test case in LLVM. It may be dynamically unreachable, in fact. However, if it were to run, this is what it would logically do. The assert suggests that the intended behavior was not to allow folding offsets from jump table indices, which makes sense. llvm-svn: 345868
* [OpenMP][libomptarget] Add runtime function for pushing coalesced global recordsGheorghe-Teodor Bercea2018-11-015-35/+45
| | | | | | | | | | | | | | Summary: In the case of coalesced global records, we need to push the exact data size passed in. This patch fixes this by outlining the common functionality of the previous push function and by adding a separate entry point for coalesced pushes. The pop function remains unchanged. Reviewers: ABataev, grokos, caomhin Reviewed By: ABataev, grokos Subscribers: jholewinski, cfe-commits, Hahnfeld, guansong, jfb, openmp-commits Differential Revision: https://reviews.llvm.org/D53141 llvm-svn: 345867
* Reapply Logging: make os_log buffer size an integer constant expression.Tim Northover2018-11-018-16/+19
| | | | | | | | | | | | The size of an os_log buffer is known at any stage of compilation, so making it a constant expression means that the common idiom of declaring a buffer for it won't result in a VLA. That allows the compiler to skip saving and restoring the stack pointer around such buffers. This also moves the OSLog helpers from libclangAnalysis to libclangAST to avoid a circular dependency. llvm-svn: 345866
* [llvm-mca] Add extra counters for move elimination in view ↵Andrea Di Biagio2018-11-0112-47/+183
| | | | | | | | | | | | | | | | | | RegisterFileStatistics. This patch teaches view RegisterFileStatistics how to report events for optimizable register moves. For each processor register file, view RegisterFileStatistics reports the following extra information: - Number of optimizable register moves - Number of register moves eliminated - Number of zero moves (i.e. register moves that propagate a zero) - Max Number of moves eliminated per cycle. Differential Revision: https://reviews.llvm.org/D53976 llvm-svn: 345865
* [AArch64] Fix unintended fallthrough and strengthen castReid Kleckner2018-11-011-3/+4
| | | | | | | | | | | This was added in r330630. GCC's -Wimplicit-fallthrough seems to not fire when the previous case contains a switch itself. This fallthrough was bening because the helper function implementing the case used dyn_cast to re-check the type of the node in question. After fixing the fallthrough, we can strengthen the cast. llvm-svn: 345864
* Revert "[COFF, ARM64] Implement Intrinsic.sponentry for AArch64"Mandeep Singh Grang2018-11-0110-191/+30
| | | | | | This reverts commit 585b6667b4712e3c7f32401e929855b3313b4ff2. llvm-svn: 345863
* Replace two fallthrough annotations after covered switch with unreachableReid Kleckner2018-11-011-4/+2
| | | | | | | | | | | | | Both preceding switches handle all possible enumerators, so the fallthrough is actually unreachable. This strengthens that to an assertion. The first instance had a comment from 2010 indicating that fallthrough was possible, but that was back when we had a unary operator for offsetof. Now it is its own expression kind, so the annotation was stale. llvm-svn: 345862
* [llvm-strip] Support --keep and --strip-all-gnu from llvm-objcopyJordan Rupprecht2018-11-015-3/+17
| | | | | | | | | | | | | | Summary: Add --keep and --strip-all-gnu from llvm-objcopy into llvm-strip. Reviewers: jakehehrlich, jhenderson, alexshap Reviewed By: jhenderson, alexshap Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D53954 llvm-svn: 345861
* [FileSystem] Fix typo in ProcessFreeBSDJonas Devlieghere2018-11-011-1/+1
| | | | llvm-svn: 345860
* [llvm-objcopy] Support --{enable,disable}-deterministic-archivesJordan Rupprecht2018-11-016-4/+110
| | | | | | | | | | | | | | Summary: ar and objcopy/strip all support configuring whether archives are written deterministically (timestamps/UIDs/GIDs/etc zero'd). This has been ported to llvm-ar (the U/D modifiers) but not yet to llvm-objcopy/strip. Reviewers: jakehehrlich, jhenderson, alexshap Reviewed By: jhenderson Subscribers: ruiu, mgrang, llvm-commits Differential Revision: https://reviews.llvm.org/D53913 llvm-svn: 345859
* Fix the issue that not recognizing single acronym with prefix as ObjC ↵Yan Zhang2018-11-012-5/+5
| | | | | | | | | | | | | | | | property name. Summary: This will make clang-tidy accept property names like xyz_URL (URL is a common acronym). Reviewers: benhamilton, hokein Reviewed By: benhamilton Subscribers: jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D53955 llvm-svn: 345858
* [FileSystem] Fix Exists call sitesJonas Devlieghere2018-11-015-8/+13
| | | | | | | There were some calls left to Exists() on non-darwin platforms (Windows, Linux and FreeBSD) that weren't yet updated to use the FileSystem. llvm-svn: 345857
* [llvm-objcopy] Don't apply --localize flags to common symbolsJordan Rupprecht2018-11-015-5/+45
| | | | | | | | | | | | | | | | | Summary: --localize-symbol and --localize-hidden will currently localize common symbols. GNU objcopy will not localize these symbols even when explicitly requested, which seems reasonable; common symbols should always be global so they can be merged during linking. See PR39461 Reviewers: jakehehrlich, jhenderson, alexshap, MaskRay, espindola Reviewed By: jakehehrlich, jhenderson, alexshap, MaskRay Subscribers: emaste, arichardson, alexshap, MaskRay, llvm-commits Differential Revision: https://reviews.llvm.org/D53782 llvm-svn: 345856
* [llvm-objcopy] For multiclass Eq, associate help text with --name= , not ↵Fangrui Song2018-11-012-81/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | with --name Summary: Before: % llvm-objcopy -help ... --weaken-symbol=symbol Mark <symbol> as weak --weaken-symbol symbol Mark <symbol> as weak After: % llvm-objcopy -help ... --weaken-symbol=symbol Mark <symbol> as weak Reviewers: jhenderson, rupprecht, alexshap, jakehehrlich Reviewed By: jhenderson Subscribers: llvm-commits, kristina Differential Revision: https://reviews.llvm.org/D53983 llvm-svn: 345855
* [FileSystem] Remove Exists() from FileSpecJonas Devlieghere2018-11-0152-171/+178
| | | | | | | | | This patch removes the Exists method from FileSpec and updates its uses with calls to the FileSystem. Differential revision: https://reviews.llvm.org/D53845 llvm-svn: 345854
* [FileSystem] Remove ResolveExecutableLocation() from FileSpecJonas Devlieghere2018-11-0110-58/+50
| | | | | | | | | This patch removes the ResolveExecutableLocation method from FileSpec and updates its uses with calls to the FileSystem. Differential revision: https://reviews.llvm.org/D53834 llvm-svn: 345853
* [InstCombine] add test for ComputeNumSignBits on 2-input shuffle; NFCSanjay Patel2018-11-011-0/+21
| | | | llvm-svn: 345852
* Fix whitespace in test/Assembler/fast-math-flags.llCameron McInally2018-11-011-69/+69
| | | | | | Differential Revision: https://reviews.llvm.org/D53981 llvm-svn: 345851
* [ARM] Attempt to fix ppc64be buildbotSam Parker2018-11-011-2/+3
| | | | llvm-svn: 345850
* [FileSystem] Improve assert and add Terminate in unit test.Jonas Devlieghere2018-11-012-3/+6
| | | | | | | | Speculative fix for the Xcode bots where we were seeing the assertion being triggered because we would re-initialize the FileSystem without terminating it. llvm-svn: 345849
* [NativePDB] Get LLDB types from PDB function types.Zachary Turner2018-11-0110-9/+562
| | | | | | | | | | | | | | This adds basic support for getting function signature types into LLDB's type system, including into clang's AST. There are a few edge cases which are not correctly handled, mostly dealing with nested classes, but this isn't specific to functions and apply equally to variable types. Note that no attempt has been made yet to deal with member function types, which will happen in subsequent patches. Differential Revision: https://reviews.llvm.org/D53951 llvm-svn: 345848
* [Diagnostics] Implement -Wsizeof-pointer-div David Bolvansky2018-11-013-2/+62
| | | | | | | | | | | | | | | | | | | Summary: void test(int *arr) { int arr_len = sizeof(arr) / sizeof(*arr); // warn, incorrect way to compute number of array elements } Enabled under -Wall (same behaviour as GCC) Reviewers: rsmith, MTC, aaron.ballman Reviewed By: aaron.ballman Subscribers: MTC, thakis, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D52949 llvm-svn: 345847
* Revert "Logging: make os_log buffer size an integer constant expression.Tim Northover2018-11-014-16/+12
| | | | | | | | This also reverts a couple of follow-up commits trying to fix the dependency issues. Latest revision added a cyclic dependency that can't just be patched up in 5 minutes. llvm-svn: 345846
* [llvm-objcopy] Use proper casesFangrui Song2018-11-011-17/+17
| | | | | | | | | | | | Reviewers: jhenderson, alexshap, jakehehrlich, espindola, rupprecht Reviewed By: jhenderson, rupprecht Subscribers: emaste, arichardson, rupprecht, llvm-commits Differential Revision: https://reviews.llvm.org/D53971 llvm-svn: 345845
* [clang] Improve ctor initializer completions.Kadir Cetinkaya2018-11-014-95/+165
| | | | | | | | | | | | | | | | Summary: Instead of providing generic "args" for member and base class initializers, tries to fetch relevant constructors and show their signatures. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: ZaMaZaN4iK, eraman, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D53654 llvm-svn: 345844
* [FileSystem] Remove GetPermissions() and Readable() from FileSpecJonas Devlieghere2018-11-0113-50/+17
| | | | | | | | | This patch removes the GetPermissions and GetReadable methods from FileSpec and updates its uses with calls to the FileSystem. Differential revision: https://reviews.llvm.org/D53831 llvm-svn: 345843
* [DAGCombiner] make sure we have a whole-number extract before trying to ↵Sanjay Patel2018-11-012-1/+23
| | | | | | | | | | | | narrow a vector op (PR39511) The test causes a crash because we were trying to extract v4f32 to v3f32, and the narrowing factor was then 4/3 = 1 producing a bogus narrow type. This should fix: https://bugs.llvm.org/show_bug.cgi?id=39511 llvm-svn: 345842
* [MC] Implement EmitRawText in MCNullStreamerDaniel Sanders2018-11-012-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This adds dummy implementation of `EmitRawText` in `MCNullStreamer`. This fixes the behavior of `AsmPrinter` with `MCNullStreamer` on targets on which no integrated assembler is used. An attempt to emit inline asm on such a target would previously lead to a crash, since `AsmPrinter` does not check for `hasRawTextSupport` in `EmitInlineAsm` and calls `EmitRawText` anyway if integrated assembler is disabled (the behavior has changed in D2686). Error message printed by MCStreamer: > EmitRawText called on an MCStreamer that doesn't support it, something > must not be fully mc'ized Patch by Eugene Sharygin Reviewers: dsanders, echristo Reviewed By: dsanders Subscribers: eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D53938 llvm-svn: 345841
* [ARM][CGP] Negative constant operand handlingSam Parker2018-11-019-69/+238
| | | | | | | | | | | | | | | | | While mutating instructions, we sign extended negative constant operands for binary operators that can safely overflow. This was to allow instructions, such as add nuw i8 %a, -2, to still be able to perform a subtraction. However, the code to handle constants doesn't take into consideration that instructions, such as sub nuw i8 -2, %a, require the i8 -2 to be converted into i32 254. This is a relatively simple fix, but I've taken the time to reorganise the code a bit - mainly that instructions that can be promoted are cached and splitting up the Mutate function. Differential Revision: https://reviews.llvm.org/D53972 llvm-svn: 345840
* Multiversioning- Ensure all MV functions are emitted.Erich Keane2018-11-014-50/+60
| | | | | | | | Multiverson function versions are always used (by the resolver), so ensure that they are always emitted. Change-Id: I5d2e0841fddf0d18918b3fb92ae76814add7ee96 llvm-svn: 345839
* CPU-Dispatch- Fix type of a member function, prevent deferralsErich Keane2018-11-012-2/+31
| | | | | | | | | | The member type creation for a cpu-dispatch function was not correctly including the 'this' parameter, so ensure that the type is properly determined. Also, disable defer in the cases of emitting the functoins, as it can end up resulting in the wrong version being emitted. Change-Id: I0b8fc5e0b0d1ae1a9d98fd54f35f27f6e5d5d083 llvm-svn: 345838
* [MS Demangler] Expose the Demangler AST publicly.Zachary Turner2018-11-014-254/+289
| | | | | | | | | LLDB would like to use this in order to build a clang AST from a mangled name. This is NFC otherwise. llvm-svn: 345837
* [X86][X86FixupLEA] Rename processInstructionForSLM to ↵Simon Pilgrim2018-11-011-7/+6
| | | | | | | | | | processInstructionForSlowLEA (NFCI) The function isn't SLM specific (its driven by the FeatureSlowLEA flag). Minor tidyup prior to PR38225. llvm-svn: 345836
OpenPOWER on IntegriCloud