summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [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
* Logging: put link against libclangAnalysis rather than libLLVMAnalysis for ↵Tim Northover2018-11-011-1/+1
| | | | | | os_log llvm-svn: 345835
* [libcxx] Fix usage of _C2, which is a "nasty macro" in some environmentsLouis Dionne2018-11-013-36/+39
| | | | | | The problem was pointed out in https://reviews.llvm.org/D48896#inline-475775. llvm-svn: 345834
* Logging: add CMake dependency so libAST can use OSLog analysis.Tim Northover2018-11-011-0/+1
| | | | | | | Should fix bots on platforms with slightly different symbol resolution semantics. llvm-svn: 345833
* [InstSimplify] fold icmp based on range of abs/nabs (2nd try)Sanjay Patel2018-11-012-75/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is retrying the fold from rL345717 (reverted at rL347780) ...with a fix for the miscompile demonstrated by PR39510: https://bugs.llvm.org/show_bug.cgi?id=39510 Original commit message: This is a fix for PR39475: https://bugs.llvm.org/show_bug.cgi?id=39475 We managed to get some of these patterns using computeKnownBits in https://reviews.llvm.org/D47041, but that can't be used for nabs(). Instead, put in some range-based logic, so we can fold both abs/nabs with icmp with a constant value. Alive proofs: https://rise4fun.com/Alive/21r Name: abs_nsw_is_positive %cmp = icmp slt i32 %x, 0 %negx = sub nsw i32 0, %x %abs = select i1 %cmp, i32 %negx, i32 %x %r = icmp sgt i32 %abs, -1 => %r = i1 true Name: abs_nsw_is_not_negative %cmp = icmp slt i32 %x, 0 %negx = sub nsw i32 0, %x %abs = select i1 %cmp, i32 %negx, i32 %x %r = icmp slt i32 %abs, 0 => %r = i1 false Name: nabs_is_negative_or_0 %cmp = icmp slt i32 %x, 0 %negx = sub i32 0, %x %nabs = select i1 %cmp, i32 %x, i32 %negx %r = icmp slt i32 %nabs, 1 => %r = i1 true Name: nabs_is_not_over_0 %cmp = icmp slt i32 %x, 0 %negx = sub i32 0, %x %nabs = select i1 %cmp, i32 %x, i32 %negx %r = icmp sgt i32 %nabs, 0 => %r = i1 false Differential Revision: https://reviews.llvm.org/D53844 llvm-svn: 345832
* [InstSimplify] add tests for icmp fold bug (PR39510); NFCSanjay Patel2018-11-011-0/+35
| | | | | | Verify that set intersection/subset are not confused. llvm-svn: 345831
* [mips][micromips] Fix JmpLink to TargetExternalSymbolAleksandar Beserminji2018-11-012-0/+15
| | | | | | | | | | When matching MipsISD::JmpLink t9, TargetExternalSymbol:i32'...', wrong JALR16_MM is selected. This patch adds missing pattern for JmpLink, so that JAL instruction is selected. Differential Revision: https://reviews.llvm.org/D53366 llvm-svn: 345830
* [ADT] Clean up SparseBitVector copying and make it moveableBenjamin Kramer2018-11-012-26/+29
| | | | llvm-svn: 345829
* Logging: make os_log buffer size an integer constant expression.Tim Northover2018-11-013-12/+15
| | | | | | | | | 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. llvm-svn: 345828
* [AArch64] Add support for ARMv8.4 in Saphira.Chad Rosier2018-11-011-1/+1
| | | | llvm-svn: 345827
* CPU-Dispatch-- Fix conflict between 'generic' and 'pentium'Erich Keane2018-11-012-0/+34
| | | | | | | | | | | | | | | | | When a dispatch function was being emitted that had both a generic and a pentium configuration listed, we would assert. This is because neither configuration has any 'features' associated with it so they were both considered the 'default' version. 'pentium' lacks any features because we implement it in terms of __builtin_cpu_supports (instead of Intel proprietary checks), which is unable to decern between the two. The fix for this is to omit the 'generic' version from the dispatcher if both are present. This permits existing code to compile, and still will choose the 'best' version available (since 'pentium' is technically better than 'generic'). Change-Id: I4b69f3e0344e74cbdbb04497845d5895dd05fda0 llvm-svn: 345826
* Allow clk_event_t comparisonsSven van Haastregt2018-11-013-3/+29
| | | | | | | | | Also rename `invalid-clk-events-cl2.0.cl` to `clk_event_t.cl` and repurpose it to include both positive and negative clk_event_t tests. Differential Revision: https://reviews.llvm.org/D53871 llvm-svn: 345825
* [X86][SSE] Move 2-input limit up from getFauxShuffleMask to ↵Simon Pilgrim2018-11-012-16/+14
| | | | | | | | | | resolveTargetShuffleInputs (reapplied) Reapplying an updated version of rL345395 (reverted in rL345451), now the issues noticed in PR39483 have been fixed. This patch allows resolveTargetShuffleInputs to remove UNDEF inputs from cases where we have more than 2 inputs. llvm-svn: 345824
* Update to the 10-10 SARIF spec.Aaron Ballman2018-11-013-16/+13
| | | | | | This removes the Step property (which can be calculated by consumers trivially), and updates the schema and version numbers accordingly. llvm-svn: 345823
* [NFC] Specialize public API of ICFLoopSafetyInfo for insertions and removalsMax Kazantsev2018-11-012-7/+19
| | | | llvm-svn: 345822
* [Mips] Conditionally remove successor blockStefan Maksimovic2018-11-012-3/+4
| | | | | | | | | | | | | | | | In MipsBranchExpansion::splitMBB, upon splitting a block with two direct branches, remove the successor of the newly created block (which inherits successors from the original block) which is pointed to by the last branch in the original block only if the targets of two branches differ. This is to fix the failing test when ran with -verify-machineinstrs enabled. Differential Revision: https://reviews.llvm.org/D53756 llvm-svn: 345821
* [NFC] Reorganize code to prepare it for more transformsMax Kazantsev2018-11-011-4/+15
| | | | llvm-svn: 345820
* [ELF] - Do not crash when -r output uses linker script with `/DISCARD/`George Rimar2018-11-013-5/+34
| | | | | | | | | | | | This is https://bugs.llvm.org/show_bug.cgi?id=39493. We crashed previously because did not handle /DISCARD/ properly when -r was used. I think it is uncommon to use scripts with -r, though I see nothing wrong to handle the /DISCARD/ so that we will not crash at least. Differential revision: https://reviews.llvm.org/D53864 llvm-svn: 345819
* [SystemZ::TTI] Recognize the higher cost of scalar i1 -> fp conversionJonas Paulsson2018-11-012-1/+26
| | | | | | | | | | Scalar i1 to fp conversions are done with a branch sequence, so it should have a higher cost. Review: Ulrich Weigand https://reviews.llvm.org/D53924 llvm-svn: 345818
* [SystemZ::TTI] Accurate costs for i1->double vector conversionsJonas Paulsson2018-11-013-15/+73
| | | | | | | | | | | This factors out a new method getBoolVecToIntConversionCost() containing the code for vector sext/zext of i1, in order to reuse it for i1 to double vector conversions. Review: Ulrich Weigand https://reviews.llvm.org/D53923 llvm-svn: 345817
* [clang][CodeGen] ImplicitIntegerSignChangeSanitizer: actually ignore NOP casts.Roman Lebedev2018-11-012-4/+15
| | | | | | | | | I fully expected for that to be handled by the canonical type check, but it clearly wasn't. Sadly, somehow it hide until now. Reported by Eli Friedman. llvm-svn: 345816
* [Windows] A basic implementation of memory allocations in a debuggee processAleksandr Urakov2018-11-014-1/+82
| | | | | | | | | | | | | | | | | | | Summary: This patch adds a basic implementation of `DoAllocateMemory` and `DoDeallocateMemory` for Windows processes. For now it considers only the executable permission (and always allows reads and writes). Reviewers: zturner, asmith, stella.stamenova, labath, clayborg Reviewed By: zturner Subscribers: Hui, vsk, jingham, aleksandr.urakov, clayborg, abidh, teemperor, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D52618 llvm-svn: 345815
* [IndVars] Smart hard uses detectionMax Kazantsev2018-11-014-16/+118
| | | | | | | | | | | | | | | | When rewriting loop exit values, IndVars considers this transform not profitable if the loop instruction has a loop user which it believes cannot be optimized away. In current implementation only calls that immediately use the instruction are considered as such. This patch extends the definition of "hard" users to any side-effecting instructions (which usually cannot be optimized away from the loop) and also allows handling of not just immediate users, but use chains. Differentlai Revision: https://reviews.llvm.org/D51584 Reviewed By: etherzhhb llvm-svn: 345814
* [SCEV] Avoid redundant computations when doing AddRec mergeMax Kazantsev2018-11-012-6/+7
| | | | | | | | | | | | | When we calculate a product of 2 AddRecs, we end up making quite massive computations to deduce the operands of resulting AddRec. This process can be optimized by computing all args of intermediate sum and then calling `getAddExpr` once rather than calling `getAddExpr` with intermediate result every time a new argument is computed. Differential Revision: https://reviews.llvm.org/D53189 Reviewed By: rtereshin llvm-svn: 345813
* [FileSystem] Remove GetByteSize() from FileSpecJonas Devlieghere2018-11-0113-28/+33
| | | | | | | | | This patch removes the GetByteSize method from FileSpec and updates its uses with calls to the FileSystem. Differential revision: https://reviews.llvm.org/D53788 llvm-svn: 345812
OpenPOWER on IntegriCloud