summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Make home_directory look in the password database in addition to $HOME.Zachary Turner2017-03-222-5/+31
| | | | | | | | | | | | | This is something of an edge case, but when the $HOME environment variable is not set, we can still look in the password database to get the current user's home directory. Added a test for this by getting the value of $HOME, then unsetting it, then calling home_directory() and verifying that it succeeds and that the value is the same as what we originally read from the environment. llvm-svn: 298513
* [ARM] t2_so_imm_neg had a subtle bug in the conversion, and could trigger UB ↵Artyom Skrobov2017-03-222-1/+12
| | | | | | | | | | | | | | by negating (int)-2147483648. By pure luck, none of the pre-existing tests triggered this; so I'm adding one. Summary: Thanks to Vitaly Buka for helping catch this. Reviewers: rengolin, jmolloy, efriedma, vitalybuka Subscribers: llvm-commits, aemerson Differential Revision: https://reviews.llvm.org/D31242 llvm-svn: 298512
* [X86][MMX] Add tests for _mm_set*_* intrinsicsSimon Pilgrim2017-03-221-0/+87
| | | | llvm-svn: 298511
* Introduce another level of metadata to distinguish non-aliasing accessesRoman Gareev2017-03-228-5/+174
| | | | | | | | | | | | | | Introduce another level of alias metadata to distinguish the individual non-aliasing accesses that have inter iteration alias-free base pointers marked with "Inter iteration alias-free" mark nodes. It can be used to, for example, distinguish different stores (loads) produced by unrolling of the innermost loops and, subsequently, sink (hoist) them by LICM. Reviewed-by: Tobias Grosser <tobias@grosser.es> Differential Revision: https://reviews.llvm.org/D30606 llvm-svn: 298510
* Revert "Delete the remainder of platform specific code in FileSpec."Pavel Labath2017-03-2219-210/+210
| | | | | | | This reverts commit r298465 as it breaks TestLLVM.TestHomeDirectory.test_tilde_home_directory. llvm-svn: 298509
* Add default typo to .tbss.*Rafael Espindola2017-03-222-0/+10
| | | | | | This matches gas behavior and is part of pr31888. llvm-svn: 298508
* Map the new load to the base pointer of the invariant load hoisted loadRoman Gareev2017-03-222-0/+35
| | | | | | | | | | | Map the new load to the base pointer of the invariant load hoisted load to be able to find the alias information for it. Reviewed-by: Tobias Grosser <tobias@grosser.es> Differential Revision: https://reviews.llvm.org/D30605 llvm-svn: 298507
* Set the default type for .bss.foo.Rafael Espindola2017-03-222-0/+10
| | | | | | This matches gas and is part of pr31888. llvm-svn: 298506
* Produce INIT_ARRAY for sections named .init_array.*Rafael Espindola2017-03-222-1/+9
| | | | | | | These sections are merged together by the linker, so they should have the same time. llvm-svn: 298505
* Revert "Correct class-template deprecation behavior"Martin Bohme2017-03-2213-141/+43
| | | | | | | This reverts commit r298410 (which produces incorrect warnings, see comments on https://reviews.llvm.org/rL298410). llvm-svn: 298504
* Revert "iFix Test deprecation behavior in C89 mode as a result of r298410"Martin Bohme2017-03-221-4/+1
| | | | | | | This reverts commit r298433. (Required to revert r298410, see comments there.) llvm-svn: 298503
* [AMDGPU][MC] Fix for Bug 28204 + LIT testsDmitry Preobrazhensky2017-03-222-8/+32
| | | | | | | | | | Fixed v_mad_i64_i32/u64_u32 encoding Reviewers: artem.tamazov Differential Revision: https://reviews.llvm.org/D30828 llvm-svn: 298502
* [clang-tidy] Tests should not rely on STL headers being available.Alexander Kornienko2017-03-221-0/+5
| | | | llvm-svn: 298501
* [clang-tidy] clang-format the last patch. NFCAlexander Kornienko2017-03-222-24/+15
| | | | llvm-svn: 298500
* [clang-tidy] modified identifier naming case to use CT_AnyCase for ignoring ↵Alexander Kornienko2017-03-222-82/+103
| | | | | | | | | | | | | | | | | | | | | case style Summary: Using CaseType::CT_AnyCase for selected identifier results in inheriting case style setting from more basic identifier type. This patch changes CT_AnyCase behavior to ignore case style of specified identifier. If case style was not set, llvm::Optional will be used for keeping this information (llvm::Optional<>::hasVal), thus CT_AnyCase will no longer mean more general identifier style should be used. This eliminates false-positives when naming convention is not clear for specific areas of code (legacy, third party) or for selected types. Reviewers: berenm, alexfh Reviewed By: alexfh Subscribers: cfe-commits, JDevlieghere Differential Revision: https://reviews.llvm.org/D30931 llvm-svn: 298499
* [CMake] Use variable interpolation instead of string concatenationSerge Pavlov2017-03-221-3/+3
| | | | | | | String concatenation used in r298336 allowed to get rid of extra spaces but also resulted in lost delimiter spaces, so use previous method. llvm-svn: 298498
* [X86] Add multiply by constant tests (PR28513)Simon Pilgrim2017-03-223-0/+1685
| | | | | | As discussed on PR28513, add tests for constant multiplication by constants between 1 to 32 llvm-svn: 298497
* r286814 resulted that CallPenalty can be subtracted twice:Evgeny Astigeevich2017-03-221-1/+1
| | | | | | | | | | | - First time, during calculation of the cost in InlineCost.cpp - Second time, during calculation of the cost in Inliner.cpp This patches fixes this. Differential Revision: https://reviews.llvm.org/D31137 llvm-svn: 298496
* [X86] Remove unnecessary duplicate code (PR30649). NFCI.Simon Pilgrim2017-03-221-5/+0
| | | | llvm-svn: 298495
* Remove an overly aggressive assert in r298491 and leave a commentChandler Carruth2017-03-222-1/+19
| | | | | | | | | | explaining why we have to ignore errors here even though in other parts of codegen we can be more strict with builtins. Also add a test case based on the code in a TSan test that found this issue. llvm-svn: 298494
* [Serialization] Serialize DependentSizedExtVectorTypeAlex Lorenz2017-03-224-3/+36
| | | | | | | | rdar://30659700 Differential Revision: https://reviews.llvm.org/D31134 llvm-svn: 298493
* tsan: fix a typoDmitry Vyukov2017-03-221-2/+2
| | | | | | s/covert_morder/convert_morder/ llvm-svn: 298492
* [nonnull] Teach Clang to attach the nonnull LLVM attribute toChandler Carruth2017-03-225-77/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | declarations and calls instead of just definitions, and then teach it to *not* attach such attributes even if the source code contains them. This follows the design direction discussed on cfe-dev here: http://lists.llvm.org/pipermail/cfe-dev/2017-January/052066.html The idea is that for C standard library builtins, even if the library vendor chooses to annotate their routines with __attribute__((nonnull)), we will ignore those attributes which pertain to pointer arguments that have an associated size. This allows the widespread (and seemingly reasonable) pattern of calling these routines with a null pointer and a zero size. I have only done this for the library builtins currently recognized by Clang, but we can now trivially add to this set. This will be controllable with -fno-builtin if anyone should care to do so. Note that this does *not* change the AST. As a consequence, warnings, static analysis, and source code rewriting are not impacted. This isn't even a regression on any platform as neither Clang nor LLVM have ever put 'nonnull' onto these arguments for declarations. All this patch does is enable it on other declarations while preventing us from ever accidentally enabling it on these libc functions due to a library vendor. It will also allow any other libraries using this annotation to gain optimizations based on the annotation even when only a declaration is visible. llvm-svn: 298491
* Add LibreOffice Clang plugin to ExternalClangExamples.rstStephan Bergmann2017-03-221-0/+8
| | | | | | | | | | Reviewers: rsmith, rizsotto.mailinglist Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D31133 llvm-svn: 298490
* Revert "[ScalarEvolution] Predicate implication from operations"Max Kazantsev2017-03-223-498/+16
| | | | | | | | This reverts commit rL298481 Fails clang-with-lto-ubuntu build. llvm-svn: 298489
* [ValueTracking] Make sure we keep range metadata information when ↵Craig Topper2017-03-222-2/+19
| | | | | | calculating known bits for calls to bitreverse intrinsic. llvm-svn: 298488
* Move setting of LangOpts based on target flags out of CompilerInstanceEric Christopher2017-03-224-10/+13
| | | | | | | | | and into TargetInfo::adjust so that it gets called in more places throughout the compiler (AST serialization in particular). Should fix PPC modules after removing of faltivec. llvm-svn: 298487
* [ValueTracking] use setLowBits/setHighBits/setBitsFrom to replace |= ↵Craig Topper2017-03-221-16/+13
| | | | | | getHighBits/getLowBits. NFCI llvm-svn: 298486
* [X86] Remove an unused function from release builds. Reported by gccs unused ↵Craig Topper2017-03-221-0/+2
| | | | | | function warning. llvm-svn: 298485
* [SystemZ] Don't drop any operands in expandZExtPseudo()Jonas Paulsson2017-03-223-17/+158
| | | | | | | | Make sure that any operands, e.g. of an implicit def of a super reg is transferred to the new instruction. Review: Ulrich Weigand llvm-svn: 298484
* Revert "[ARM] Recommit the glueless lowering of addc/adde in Thumb1, ↵Vitaly Buka2017-03-224-299/+39
| | | | | | | | | | including the amended (no UB anymore) fix for adding/subtracting -2147483648." Fails check-llvm with ubsan This reverts commit r298417. llvm-svn: 298482
* [ScalarEvolution] Predicate implication from operationsMax Kazantsev2017-03-223-16/+498
| | | | | | | | | | | | | | | | | | | | | | | This patch allows SCEV predicate analysis to prove implication of some expression predicates from context predicates related to arguments of those expressions. It introduces three new rules: For addition: (A >X && B >= 0) || (B >= 0 && A > X) ===> (A + B) > X. For division: (A > X) && (0 < B <= X + 1) ===> (A / B > 0). (A > X) && (-B <= X < 0) ===> (A / B >= 0). Using these rules, SCEV is able to prove facts like "if X > 1 then X / 2 > 0". They can also be combined with the same context, to prove more complex expressions like "if X > 1 then X/2 + 1 > 1". Diffirential Revision: https://reviews.llvm.org/D30887 Reviewed by: sanjoy llvm-svn: 298481
* [XRay][compiler-rt] Remove dependency on <system_error>Dean Michael Berris2017-03-224-48/+84
| | | | | | | | | | | | | | | | | | Summary: Depending on C++11 <system_error> introduces a link-time requirement to C++11 symbols. Removing it allows us to depend on header-only C++11 and up libraries. Partially fixes http://llvm.org/PR32274 -- we know there's more invasive work to be done, but we're doing it incrementally. Reviewers: dblaikie, kpw, pelikan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31233 llvm-svn: 298480
* lit: remove python2-ismsBrian Gesiak2017-03-221-2/+2
| | | | | | | | | | | | | | | | | Summary: `assert.assertItemEqual` went away in Python 3. Seeing how lists are ordered, comparing a list against each other should work just as well. Patch by @jbergstroem (Johan Bergström). Reviewers: modocache, gparker42 Reviewed By: modocache Differential Revision: https://reviews.llvm.org/D31229 llvm-svn: 298479
* [InstCombine] Teach SimplifyDemandedUseBits to shrink Constants on the left ↵Craig Topper2017-03-222-1/+45
| | | | | | | | | | | | | | | | side of subtracts Summary: Subtracts can have constants on the left side, but we don't shrink them based on demanded bits. This patch fixes that to match the right hand side. Reviewers: davide, majnemer, spatel, sanjoy, hfinkel Reviewed By: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31119 llvm-svn: 298478
* Suppress warning on unreachable [[clang::fallthrough]] within a template ↵Richard Smith2017-03-222-4/+33
| | | | | | | | | | | | | instantiation. We don't know whether some other instantiation of the template might be able to reach the annotation, so warning on it has a high chance of false positives. Patch by Ahmed Asadi! Differential Revision: https://reviews.llvm.org/D31069 llvm-svn: 298477
* XFAIL CFI stats test while LLD produces corrupt PDBs that confuse DIAReid Kleckner2017-03-221-0/+2
| | | | llvm-svn: 298476
* Update LLD tests for codeview dumping changesReid Kleckner2017-03-221-5/+5
| | | | llvm-svn: 298475
* [codeview] Use separate records for LF_SUBSTR_LIST and LF_ARGLISTReid Kleckner2017-03-228-8/+70
| | | | | | | They are structurally the same, but now we need to distinguish them because one record lives in the IPI stream and the other lives in TPI. llvm-svn: 298474
* [GlobalISel]: Create VREGs for ConstantInt argsAditya Nandakumar2017-03-222-5/+3
| | | | | | | | | | | | This patch changes the behavior of IRTranslating intrinsics where we now create VREG + G_CONSTANT for ConstantInt values. We already do this for FloatingPoint values. This makes it easier for the backends to select code and it won't have to de-duplicate creation+selection of constants. Reviewed by: ab llvm-svn: 298473
* Don't compose DWARF expressions with multiple subregisters.Adrian Prantl2017-03-222-0/+131
| | | | | | | | | If a register location can only be described by a complex expression (i.e., multiple subregisters) it doesn't safely compose with another complex expression. For example, it is not possible to apply a DW_OP_deref operation to multiple DW_OP_pieces. llvm-svn: 298472
* DwarfExpression: Defer emitting DWARF register operationsAdrian Prantl2017-03-222-47/+76
| | | | | | | | | | until the rest of the expression is known. This is still an NFC refactoring in preparation of a subsequent bugfix. This reapplies r298388 with a bugfix for non-physical frame registers. llvm-svn: 298471
* Reverting r298421 due to using a header that's unavailable to all systems ↵Aaron Ballman2017-03-222-29/+4
| | | | | | and some other post-commit review feedback. llvm-svn: 298470
* Remove -ffp-contract=fast from this testAdam Nemet2017-03-221-1/+1
| | | | | | | It does not need it and causes mismatch after -ffp-contract=fast is turned into an FMF. llvm-svn: 298469
* Change -ffp-contract=fast test to run on Aarch64Adam Nemet2017-03-221-3/+3
| | | | | | | (I don't have powerpc enabled in my build and I am changing how -ffp-contract=fast works.) llvm-svn: 298468
* [COFF] Put the PDB next to the image if the user doesn't pass /PDB:Reid Kleckner2017-03-223-23/+10
| | | | | | | | | | | | Summary: This is compatible with MSVC link.exe. Reviewers: ruiu Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31224 llvm-svn: 298467
* Break the cycle between Host and PluginProcessUtility.Zachary Turner2017-03-226-10/+9
| | | | | | | | | | | There are only two users of NativeRegisterContextRegisterInfo, and both are in process plugins. Moving this code from Host to Plugins/Process/Utility thus makes sense, and as it is the only dependency from Host -> PluginProcessUtility, it also breaks this cycle, reducing LLDB's overall cycle count from 45 to 44. llvm-svn: 298466
* Delete the remainder of platform specific code in FileSpec.Zachary Turner2017-03-2219-210/+210
| | | | | | Differential Revision: https://reviews.llvm.org/D31129 llvm-svn: 298465
* [Modules] Rebuild modules on umbrella header mismatchBruno Cardoso Lopes2017-03-221-7/+3
| | | | | | | | | | | | This restores behavior pre-r230064 since after PCMCache work (r298278) we don't reload PCMs from disk within the same compiler invocation. Testcases from r230064 are still left around since they still guarantee the correct behavior we're expecting. rdar://problem/19889777 llvm-svn: 298464
* Define Config::Is64.Rui Ueyama2017-03-224-7/+10
| | | | | | | | This is a shorthand for Config->Wordsize == 8. So this is not strictly necessary but seems handy. "Is 64 bit?" is easier to read than "Is wordsize 8 byte?" llvm-svn: 298463
OpenPOWER on IntegriCloud