summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Factor out UnrollAnalyzer to Analysis, and add unit tests for it.Michael Zolotukhin2016-02-086-239/+420
| | | | | | | | | | | | | | | | Summary: Unrolling Analyzer is already pretty complicated, and it becomes harder and harder to exercise it with usual IR tests, as with them we can only check the final decision: whether the loop is unrolled or not. This change factors this framework out from LoopUnrollPass to analyses, which allows to use unit tests. The change itself is supposed to be NFC, except adding a couple of tests. I plan to add more tests as I add new functionality and find/fix bugs. Reviewers: chandlerc, hfinkel, sanjoy Subscribers: zzheng, sanjoy, llvm-commits Differential Revision: http://reviews.llvm.org/D16623 llvm-svn: 260169
* [X86][SSE1] Add MOVLHPS/MOVHLPS lowering and memory folding supportSimon Pilgrim2016-02-083-6/+52
| | | | | | | | | | As discussed on PR26491, this patch adds support for lowering v4f32 shuffles to the MOVLHPS/MOVHLPS instructions. It also adds support for memory folding with their MOVLPS/MOVHPS load equivalents. This first patch only really helps SSE1 targets as SSE2+ targets will widen the shuffle mask and use v2f64 equivalents (although they still combine to MOVLHPS/MOVHLPS for v2f64 splats). This will have to be addressed in a future patch, most likely when we add support for binary target shuffle combines. Differential Revision: http://reviews.llvm.org/D16956 llvm-svn: 260168
* [asan] Fix Windows build.Evgeniy Stepanov2016-02-081-3/+3
| | | | llvm-svn: 260167
* [llvm-nm] Yet another attempt of simplifying code.Davide Italiano2016-02-081-11/+5
| | | | llvm-svn: 260166
* [asan] Remove leftover debug print statement.Evgeniy Stepanov2016-02-081-1/+0
| | | | llvm-svn: 260165
* [regalloc][WinEH] Do not mark intervals as not spillable if they contain a ↵Andrew Kaylor2016-02-084-2/+119
| | | | | | | | regmask Differential Revision: http://reviews.llvm.org/D16831 llvm-svn: 260164
* [asan] Implement SEGV read vs write detection for ARM and AArch64.Evgeniy Stepanov2016-02-086-25/+84
| | | | llvm-svn: 260163
* llvm-cov: Fix reading gcov data that does not have function namesJustin Bogner2016-02-084-9/+43
| | | | | | | | | | | | | | | | | | | | | In order for recent gcov versions to read the coverage data, you have to use UseCfgChecksum=true and FunctionNamesInData=false options for coverage profiling pass. This is because gcov is expecting the function section in .gcda to be exactly 3 words in size, containing ident and two checksums. While llvm-cov is compatible with UseCfgChecksum=true, it always expects a function name in .gcda function sections (it's not compatible with FunctionNamesInData=false). Thus it's currently impossible to generate one set of coverage files that works with both gcov and llvm-cov. This change fixes the reading of coverage information to only read the function name if it's present. Patch by Arseny Kapoulkine. Thanks! llvm-svn: 260162
* [PGO] Cover more cases of implicitly generated C++ methodsXinliang David Li2016-02-081-4/+38
| | | | llvm-svn: 260161
* This patch adds doxygen comments for all the intrinsincs in the header file ↵Ekaterina Romanova2016-02-081-1/+196
| | | | | | | | pmmintrin.h. The doxygen comments are automatically generated based on Sony's intrinsics document. Differential Revision: http://reviews.llvm.org/D16913 llvm-svn: 260160
* Make ParentMap work with explicit specializations of function templates.Nico Weber2016-02-082-1/+7
| | | | | | | | | | | | | | | | | For an explicit specialization, we first build a FunctionDecl, and then we call SubstDecl() on it to build a second FunctionDecl, which has the first FunctionDecl as canonical decl. The address of an explicit specialization of function template used to be the canonical decl of the FunctionDecl. This is different from all the other DeduceTemplateArguments() calls in SemaOverload, and since the canonical decl isn't visited by ParentMap while the redecl is, it also made ParentMap assert when computing the parent of a address-of-explicit-specialization-fun-template. To fix, remove the getCanonicalDecl() call. No behavior difference for clang, but it fixes an assert in ParentMap (which is e.g. used by libTooling). llvm-svn: 260159
* [Concepts] Remove the IsConcept bit and associated member functions from VarDeclNathan Wilson2016-02-082-17/+8
| | | | | | because the information is now stored in TemplateDecl. llvm-svn: 260155
* cmake: Use "set" instead of "option" for LLVM_ENABLE_LTOJustin Bogner2016-02-081-1/+1
| | | | | | | | | Apparently option is for bools and cmake-gui will display this strangely with option. Pointed out by edward-san - thanks! llvm-svn: 260154
* Move includes inside guards. NFC.Pete Cooper2016-02-083-9/+8
| | | | | | | These includes were before the #ifndef/#define guards. Moving them to where they should be. llvm-svn: 260153
* [WebAssembly] Update the br_if instructions' operand orders to match the spec.Dan Gohman2016-02-085-119/+119
| | | | llvm-svn: 260152
* rangify; NFCSanjay Patel2016-02-081-7/+5
| | | | llvm-svn: 260151
* [PGO] Update InstrProfData.inc to sync with llvmRong Xu2016-02-081-1/+3
| | | | | | Sync InstrProfData.inc with the one in llvm. llvm-svn: 260148
* Fix typo in asan_flags.George Burgess IV2016-02-081-1/+1
| | | | | | Patch by Michael Stapelberg. llvm-svn: 260147
* [PGO] Differentiate Clang instrumentation and IR level instrumentation profilesRong Xu2016-02-0825-13/+147
| | | | | | | | | | | | | | This patch uses one bit in profile version to differentiate Clang instrumentation and IR level instrumentation profiles. PGOInstrumenation generates a COMDAT variable __llvm_profile_raw_version so that the compiler runtime can set the right profile kind. PGOInstrumenation now checks this bit to make sure it's an IR level instrumentation profile. Differential Revision: http://reviews.llvm.org/D15540 llvm-svn: 260146
* [x86] convert masked store of one element to scalar storeSanjay Patel2016-02-082-29/+161
| | | | | | | | | | | Another opportunity to reduce masked stores: in D16691, we decided not to attempt the 'one mask element is set' transform in InstCombine, but this should be a win for any AVX machine. Code comments note that this transform could be extended for other targets / cases. Differential Revision: http://reviews.llvm.org/D16828 llvm-svn: 260145
* cmake: Accept "thin" or "full" as arguments to -DLLVM_ENABLE_LTOJustin Bogner2016-02-082-9/+16
| | | | | | | Mehdi suggested in a review of r259766 that it's also useful to easily set the type of LTO. Augment the cmake variable to support that. llvm-svn: 260143
* [PGO] Simpflify test and increase coverageXinliang David Li2016-02-082-19/+20
| | | | llvm-svn: 260142
* Fix build bot failure Xinliang David Li2016-02-081-0/+0
| | | | llvm-svn: 260138
* AMDGPU/SI: Implement a work-around for smrd corrupting vccz bitTom Stellard2016-02-081-1/+55
| | | | | | | | | | | | | | Summary: We will hit this once we have enabled uniform branches. The smrd-vccz-bug.ll test will be added with the uniform branch commit. Reviewers: mareko, arsenm Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D16725 llvm-svn: 260137
* Add triple to h-registers-3.ll to make bots happy after r260133Hans Wennborg2016-02-081-3/+3
| | | | llvm-svn: 260136
* A number of improvements to decorator conditionals.Zachary Turner2016-02-084-28/+30
| | | | | | | | | | | | | | | | | | | * Change the `not_in` function to be called `no_match`. This makes it clear that keyword arguments can be more than just lists. * Change the name of `_check_list_or_lambda` to `_match_decorator_property`. Again clarifying that decorator params are not always lists. * Always use a regex match when matching strings. This allows automatic support for regex matching on all decorator properties. Also support compiled regex values. * Fix a bug in the compiler check used by _decorateTest. The two arguments were reversed, the condition was always wrong. * Change one test that uses skipUnlessArch to use skipIf, to demonstrate that skipIf can now handle more scenarios. Differential Revision: http://reviews.llvm.org/D16938 llvm-svn: 260135
* Remove expectedFailureWindows decorator.Zachary Turner2016-02-08117-193/+181
| | | | | | | | | | | | | | | expectedFailureWindows is equivalent to using the general expectedFailureAll decorator with oslist="windows". Additionally, by moving towards these common decorators we can solve the issue of having to support decorators that can be called with or without arguments. Once all decorators are always called with arguments, and this is enforced by design (because you can't specify the condition you're decorating for without passing an argument) the implementation of the decorators can become much simpler Differential Revision: http://reviews.llvm.org/D16936 llvm-svn: 260134
* [X86] Don't zero/sign-extend i1, i8, or i16 return values to 32 bits (PR22532)Hans Wennborg2016-02-0819-66/+207
| | | | | | | | | | | | | | | | | | | | This matches GCC and MSVC's behaviour, and saves on code size. We were already not extending i1 return values on x86_64 after r127766. This takes that patch further by applying it to x86 target as well, and also for i8 and i16. The ABI docs have been unclear about the required behaviour here. The new i386 psABI [1] clearly states (Table 2.4, page 14) that i1, i8, and i16 return vales do not need to be extended beyond 8 bits. The x86_64 ABI doc is being updated to say the same [2]. Differential Revision: http://reviews.llvm.org/D16907 [1]. https://01.org/sites/default/files/file_attach/intel386-psabi-1.0.pdf [2]. https://groups.google.com/d/msg/x86-64-abi/E8O33onbnGQ/_RFWw_ixDQAJ llvm-svn: 260133
* [asan] fix the Windows build (MSVC says: cannot specify explicit initializer ↵Kostya Serebryany2016-02-081-2/+4
| | | | | | for arrays) llvm-svn: 260132
* AArch64: match correct order in subtraction pattern.Tim Northover2016-02-082-5/+15
| | | | | | | The accumulator in multiply-and-subtract instructions is actually subtracted *from* so these patterns were computing the wrong value. llvm-svn: 260131
* fix typos; NFCSanjay Patel2016-02-081-17/+17
| | | | llvm-svn: 260130
* [Coverage] Fix crash when handling certain macro expansionsVedant Kumar2016-02-082-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When handling 'if' statements, we crash if the condition and the consequent branch are spanned by a single macro expansion. The crash occurs because of a sanity 'reset' in popRegions(): if an expansion exactly spans an entire region, we set MostRecentLocation to the start of the expansion (its 'include location'). This ensures we don't handleFileExit() ourselves out of the expansion before we're done processing all of the regions within it. This is tested in test/CoverageMapping/macro-expressions.c. This causes a problem when an expansion spans both the condition and the consequent branch of an 'if' statement. MostRecentLocation is updated to the start of the 'if' statement in popRegions(), so the file for the expansion isn't exited by the time we're done handling the statement. We then crash with 'fatal: File exit not handled before popRegions'. The fix for this is to detect these kinds of expansions, and conservatively update MostRecentLocation to the end of expansion region containing the conditional. I've added tests to make sure we don't have the same problem with other kinds of statements. rdar://problem/23630316 Differential Revision: http://reviews.llvm.org/D16934 llvm-svn: 260129
* [asan] re-commit r259961, this time making the test Linux-OnlyKostya Serebryany2016-02-084-1/+301
| | | | llvm-svn: 260128
* Simplify test casesXinliang David Li2016-02-082-22/+8
| | | | llvm-svn: 260126
* Simplify this unittest.Adrian Prantl2016-02-081-5/+2
| | | | | | Thanks to dblaikie for the suggestion! llvm-svn: 260125
* Remove dead code.Richard Smith2016-02-081-4/+0
| | | | llvm-svn: 260124
* AMDGPU: Remove bfi and bfm intrinsicsMatt Arsenault2016-02-085-115/+24
| | | | | | Nothing is using them. llvm-svn: 260123
* [ThinLTO] Remove imported available externally defs from comdats.Teresa Johnson2016-02-083-2/+46
| | | | | | | | | | | | | | | Summary: Available externally definitions are considered declarations for the linker and eventually dropped. As such they are not allowed to be in comdats. Remove any such imported functions from comdats. Reviewers: rafael Subscribers: davidxl, llvm-commits, joker.eph Differential Revision: http://reviews.llvm.org/D16120 llvm-svn: 260122
* Fix windows build bot failureXinliang David Li2016-02-081-1/+2
| | | | llvm-svn: 260120
* [PGO] Enable compression in pgo instrumentationXinliang David Li2016-02-082-28/+46
| | | | | | | | | | | | This reduces sizes of instrumented object files, final binaries, process images, and raw profile data. The format of the indexed profile data remain the same. Differential Revision: http://reviews.llvm.org/D16388 llvm-svn: 260118
* [PGO] Enable compression in pgo instrumentationXinliang David Li2016-02-0817-109/+216
| | | | | | | | | | | | This reduces sizes of instrumented object files, final binaries, process images, and raw profile data. The format of the indexed profile data remain the same. Differential Revision: http://reviews.llvm.org/D16388 llvm-svn: 260117
* Fix missing space (NFC)Rong Xu2016-02-082-3/+3
| | | | | | Fixed the inconsistently placed : (missing space) introduced in in r259811. llvm-svn: 260116
* Clean up a test; get rid of hard-wired char/wchar_t code for template fns ↵Marshall Clow2016-02-081-95/+56
| | | | | | that take any char type. Prep work for PR#26503 llvm-svn: 260115
* math: Add frexp ported from amd-builtinsAaron Watry2016-02-087-0/+151
| | | | | | | | | | | | | | | | | | The float implementation is almost a direct port from the amd-builtins, but instead of just having a scalar and float4 implementation, it has a scalar and arbitrary width vector implementation. The double scalar is also a direct port from AMD's builtin release. The double vector implementation copies the logic in the float vector implementation using the values from the double scalar version. Both have been tested in piglit using tests sent to that project's mailing list. Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 260114
* Use llvm::TempDIScope instead of manually deleting a temporary MDNode.Adrian Prantl2016-02-081-5/+4
| | | | llvm-svn: 260113
* [SCEV][LAA] Re-commit r260085 and r260086, this time with a fix for the memorySilviu Baranga2016-02-0810-41/+728
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sanitizer issue. The PredicatedScalarEvolution's copy constructor wasn't copying the Generation value, and was leaving it un-initialized. Original commit message: [SCEV][LAA] Add no wrap SCEV predicates and use use them to improve strided pointer detection Summary: This change adds no wrap SCEV predicates with: - support for runtime checking - support for expression rewriting: (sext ({x,+,y}) -> {sext(x),+,sext(y)} (zext ({x,+,y}) -> {zext(x),+,sext(y)} Note that we are sign extending the increment of the SCEV, even for the zext case. This is needed to cover the fairly common case where y would be a (small) negative integer. In order to do this, this change adds two new flags: nusw and nssw that are applicable to AddRecExprs and permit the transformations above. We also change isStridedPtr in LAA to be able to make use of these predicates. With this feature we should now always be able to work around overflow issues in the dependence analysis. Reviewers: mzolotukhin, sanjoy, anemet Subscribers: mzolotukhin, sanjoy, llvm-commits, rengolin, jmolloy, hfinkel Differential Revision: http://reviews.llvm.org/D15412 llvm-svn: 260112
* Add a unit test for r259973.Adrian Prantl2016-02-081-0/+20
| | | | llvm-svn: 260111
* [JumpThreading] Change a return of ComputeValueKnownInPredecessors()Haicheng Wu2016-02-081-1/+1
| | | | | | | | | Change a return statement of ComputeValueKnownInPredecessors() to be the same as the rest return statements of the function. Otherwise, it might return true with an empty Result when the current basic block has no predecessors and trigger the first assert of JumpThreading::ProcessThreadableEdges(). llvm-svn: 260110
* SelectionDAG: Lower some range metadata to AssertZextMatt Arsenault2016-02-084-3/+135
| | | | | | | | | | If a range has a lower bound of 0, add an AssertZext from the nearest floor power of two. This allows operations with some workitem intrinsics with known maximum ranges to use fast 24-bit multiplies. llvm-svn: 260109
* [clang-tidy] Some improvements in 'misc-definitions-in-headers' check.Haojian Wu2016-02-081-0/+4
| | | | | | | | | | Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16979 llvm-svn: 260108
OpenPOWER on IntegriCloud