summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [AVR] Remove an unused variableDylan McKay2017-05-131-1/+0
| | | | llvm-svn: 302970
* Add LangOptions method to query whether we are tracking the owning module ↵Richard Smith2017-05-133-4/+9
| | | | | | | | for a local declaration. In preparation for expanding this behavior to cover additional cases. llvm-svn: 302969
* [PartialInlining] Profile based cost analysisXinliang David Li2017-05-1210-57/+523
| | | | | | | | | | | | Implemented frequency based cost/saving analysis and related options. The pass is now in a state ready to be turne on in the pipeline (in follow up). Differential Revision: http://reviews.llvm.org/D32783 llvm-svn: 302967
* Remove unused tracking of owning module for MacroInfo objects.Richard Smith2017-05-127-72/+4
| | | | llvm-svn: 302966
* [modules] When creating a declaration, cache its owning module immediatelyRichard Smith2017-05-129-82/+46
| | | | | | | | | | rather than waiting until it's queried. Currently this is only applied to local submodule visibility mode, as we don't yet allocate storage for the owning module in non-local-visibility modules compilations. llvm-svn: 302965
* [GISel]: Add a getConstantFPVRegVal utilityAditya Nandakumar2017-05-122-0/+11
| | | | | | | | This might be useful across various GISel Passes https://reviews.llvm.org/D33051 llvm-svn: 302964
* [GISel]: Fix undefined behavior while accessing DefaultAction mapAditya Nandakumar2017-05-122-6/+13
| | | | | | | | We end up dereferencing the end iterator here when the Aspect doesn't exist in the DefaultAction map. Change the API to return Optional<LLT> and return None when not found. Also update the callers to handle the None case llvm-svn: 302963
* [XRay] Fix build with libc++ (NFC).Eugene Zelenko2017-05-121-4/+5
| | | | llvm-svn: 302962
* [IR] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC).Eugene Zelenko2017-05-1214-159/+260
| | | | llvm-svn: 302961
* [TLI] Add mapping for various '__<func>_finite' forms of the math routines ↵Andrew Kaylor2017-05-122-0/+211
| | | | | | | | | | to SVML routines Patch by Chris Chrulski Differential Revision: https://reviews.llvm.org/D31789 llvm-svn: 302957
* [ConstantFolding] Add folding for various math '__<func>_finite' routines ↵Andrew Kaylor2017-05-122-11/+152
| | | | | | | | | | generated from -ffast-math Patch by Chris Chrulski Differential Revision: https://reviews.llvm.org/D31788 llvm-svn: 302956
* [TLI] Add declarations for various math header file routines from ↵Andrew Kaylor2017-05-125-1/+510
| | | | | | | | | | math-finite.h that create '__<func>_finite as functions Patch by Chris Chrulski Differential Revision: https://reviews.llvm.org/D31787 llvm-svn: 302955
* Fixed the OS X build after Error -> Status rename.Sean Callanan2017-05-121-6/+8
| | | | llvm-svn: 302954
* [APInt] Add early outs for a division by 1 to udiv/urem/udivremCraig Topper2017-05-121-4/+18
| | | | | | | | We already counted the number of bits in the RHS so its pretty cheap to just check if the RHS is 1. Differential Revision: https://reviews.llvm.org/D33154 llvm-svn: 302953
* [APInt] In udivrem, remember the bit width in a local variable so we don't ↵Craig Topper2017-05-121-4/+5
| | | | | | | | reread it from the LHS which might be aliased with Quotient or Remainder. This helped the compiler generate better code for the single word case. It was able to remember that the bit width was still a single word when it created the Remainder APInt and not create code for it possibly being multiword. llvm-svn: 302952
* LTO: Don't verify modules twice in verifyMergedModuleOnceAdrian Prantl2017-05-121-10/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D33140 llvm-svn: 302951
* [Doc] Document "Splat" in the lexiconSanjay Patel2017-05-121-0/+8
| | | | | | | | Patch by Wei-Ren Chen (陳韋任)! Differential Revision: https://reviews.llvm.org/D32964 llvm-svn: 302950
* [x86] add vector tests for demanded bits; NFCSanjay Patel2017-05-121-2/+26
| | | | llvm-svn: 302949
* Fix build on Mac OS.Eugene Zemtsov2017-05-121-2/+1
| | | | llvm-svn: 302948
* Revert r302932, as it appears to be breaking stage2 for some of our ↵Richard Smith2017-05-121-7/+12
| | | | | | modules-enabled buildbots. llvm-svn: 302947
* [test] Add specific test for P0138R2, direct-list-init of fixed enums from ↵Casey Carter2017-05-121-0/+21
| | | | | | | | integers, part 3/3. Test the C++17 Core Language feature independently from other std::byte tests. llvm-svn: 302946
* [test] Avoid P0138R2, direct-list-init of fixed enums from integers, part 2/3.Casey Carter2017-05-1215-45/+0
| | | | | | | | | This C++17 Core Language feature isn't necessary when testing std::byte. It's a minor convenience, but it limits test coverage to very new compilers. This part activates the tests for more compilers. llvm-svn: 302945
* [test] Avoid P0138R2, direct-list-init of fixed enums from integers, part 1/3.Casey Carter2017-05-1215-34/+34
| | | | | | | | | | | This C++17 Core Language feature isn't necessary when testing std::byte. It's a minor convenience, but it limits test coverage to very new compilers. This part changes the code. Fixes D32386. llvm-svn: 302944
* AMDGPU/SI: Don't promote to vector if the load/store is volatile.Changpeng Fang2017-05-122-8/+11
| | | | | | | | | | | | | Summary: We should not change volatile loads/stores in promoting alloca to vector. Reviewers: arsenm Differential Revision: http://reviews.llvm.org/D33107 llvm-svn: 302943
* [NVPTX] Don't flag StoreRetVal memory chain operands as ReadMem (PR32146)Simon Pilgrim2017-05-124-5/+6
| | | | | | | | This fixes 47 of the 75 NVPTX '-verify-machineinstrs with EXPENSIVE_CHECKS' errors in PR32146. Differential Revision: https://reviews.llvm.org/D33147 llvm-svn: 302942
* [Sema] Silence buildbot failures introduced by r302935Simon Dardis2017-05-122-2/+2
| | | | | | | Attempt to silence buildbot failures by pinning the test to a given triple rather than the host's triple. llvm-svn: 302941
* Remove ignore-empty-index-file optionTeresa Johnson2017-05-122-4/+5
| | | | | | | | | | | | | | | | Summary: Clang changes to remove this option and replace with a parameter always set in the context of a ThinLTO distributed backend. Depends on D33133. Reviewers: pcc Subscribers: mehdi_amini, eraman, cfe-commits Differential Revision: https://reviews.llvm.org/D33134 llvm-svn: 302940
* Remove ignore-empty-index-file optionTeresa Johnson2017-05-122-10/+5
| | | | | | | | | | | | | | | Summary: As discussed in the D32195 review thread and on IRC, remove this option and replace with parameter, which will be set to true when invoked from clang in the context of a ThinLTO distributed backend. Reviewers: pcc Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D33133 llvm-svn: 302939
* Add LiveRangeShrink pass to shrink live range within BB.Dehao Chen2017-05-1260-1414/+1672
| | | | | | | | | | | | | | Summary: LiveRangeShrink pass moves instruction right after the definition with the same BB if the instruction and its operands all have more than one use. This pass is inexpensive and guarantees optimal live-range within BB. Reviewers: davidxl, wmi, hfinkel, MatzeB, andreadb Reviewed By: MatzeB, andreadb Subscribers: hiraditya, jyknight, sanjoy, skatkov, gberry, jholewinski, qcolombet, javed.absar, krytarowski, atrick, spatel, RKSimon, andreadb, MatzeB, mehdi_amini, mgorny, efriedma, davide, dberlin, llvm-commits Differential Revision: https://reviews.llvm.org/D32563 llvm-svn: 302938
* [PPC] Move the combine "a << (b % (sizeof(a) * 8)) -> (PPCshl a, b)" to the ↵Tim Shen2017-05-125-58/+108
| | | | | | | | | | | | | | | | | | | | | | backend. NFC. Summary: Eli pointed out that it's unsafe to combine the shifts to ISD::SHL etc., because those are not defined for b > sizeof(a) * 8, even after some of the combiners run. However, PPCISD::SHL defines that behavior (as the instructions themselves). Move the combination to the backend. The tests in shift_mask.ll still pass. Reviewers: echristo, hfinkel, efriedma, iteratee Subscribers: nemanjai, llvm-commits Differential Revision: https://reviews.llvm.org/D33076 llvm-svn: 302937
* [CodeView] Add a random access type visitor.Zachary Turner2017-05-1222-133/+724
| | | | | | | | | | | | This adds a visitor that is capable of accessing type records randomly and caching intermediate results that it learns about during partial linear scans. This yields amortized O(1) access to a type stream even though type streams cannot normally be indexed. Differential Revision: https://reviews.llvm.org/D33009 llvm-svn: 302936
* [Sema] Support implicit scalar to vector conversionsSimon Dardis2017-05-1210-97/+988
| | | | | | | | | | | | | | | | | | This patch teaches clang to perform implicit scalar to vector conversions when one of the operands of a binary vector expression is a scalar which can be converted to the element type of the vector without truncation following GCC's implementation. If the (constant) scalar is can be casted safely, it is implicitly casted to the vector elements type and splatted to produce a vector of the same type. Contributions from: Petar Jovanovic Reviewers: bruno, vkalintiris Differential Revision: https://reviews.llvm.org/D25866 llvm-svn: 302935
* [include-fixer] Don't throw exception when parsing unknown arguments inHaojian Wu2017-05-121-1/+1
| | | | | | vim script. llvm-svn: 302934
* [AArch64][Falkor] Refine modeling of multiply accumulate forwarding.Geoff Berry2017-05-122-44/+61
| | | | llvm-svn: 302933
* [modules] Simplify module macro handling in non-local-submodule-visibility mode.Richard Smith2017-05-121-12/+7
| | | | | | | | | | | | | | | | | | | | | | | | | When reaching the end of a module, we used to convert its macros to ModuleMacros but also leave them in the MacroDirective chain for the identifier. This meant that every lookup of such a macro would find two (identical) definitions. It also made it difficult to determine the correct owner for a macro when reaching the end of a module: the most recent MacroDirective in the chain could be from an #included submodule rather than the current module. Simplify this: whenever we convert a MacroDirective to a ModuleMacro when leaving a module, clear out the MacroDirective chain for that identifier, and just rely on the ModuleMacro to provide the macro definition information. (We don't want to do this for local submodule visibility mode, because in that mode we maintain a distinct MacroDirective chain for each submodule, and we need to keep around the prior MacroDirective in case we re-enter the submodule -- for instance, if its header is #included more than once in a module build, we need the include guard directive to stick around. But the problem doesn't arise in this case for the same reason: each submodule has its own MacroDirective chain, so the macros don't leak out of submodules in the first place.) llvm-svn: 302932
* [APInt] Add an assert to check for divide by zero in udivrem. NFCCraig Topper2017-05-121-0/+1
| | | | | | udiv and urem already had the same assert. llvm-svn: 302931
* [APInt] Remove unnecessary checks of rhsWords==1 with lhsWords==1 from udiv ↵Craig Topper2017-05-121-2/+2
| | | | | | | | and udivrem. NFC At this point in the code rhsWords is guaranteed to be non-zero and less than or equal to lhsWords. So if lhsWords is 1, rhsWords must also be 1. urem alread had the check removed so this makes all 3 consistent. llvm-svn: 302930
* Clang-format and whitespace cleanup of source codeJonathan Peyton2017-05-1275-54486/+53500
| | | | | | | | | | | | | This patch contains the clang-format and cleanup of the entire code base. Some of clang-formats changes made the code look worse in places. A best effort was made to resolve the bulk of these problems, but many remain. Most of the problems were mangling line-breaks and tabbing of comments. Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D32659 llvm-svn: 302929
* AMDGPU: Add lit.local.cfg to disable global-isel tests when global-isel is ↵Tom Stellard2017-05-121-0/+2
| | | | | | | | disabled This should fix bots broken by r302919. llvm-svn: 302928
* Strip trailing whitespace. NFCI.Simon Pilgrim2017-05-121-7/+7
| | | | llvm-svn: 302927
* [Simplify] Reset all stats between runs.Michael Kruse2017-05-121-0/+3
| | | | llvm-svn: 302926
* [KnownBits] Add bit counting methods to KnownBits struct and use them where ↵Craig Topper2017-05-1217-89/+136
| | | | | | | | | | | | possible This patch adds min/max population count, leading/trailing zero/one bit counting methods. The min methods return answers based on bits that are known without considering unknown bits. The max methods give answers taking into account the largest count that unknown bits could give. Differential Revision: https://reviews.llvm.org/D32931 llvm-svn: 302925
* [ubsan] Enable debug info in test binariesReid Kleckner2017-05-122-6/+2
| | | | | | | This fixes tests that use debug info to check ubsan stack traces. One was XFAILd on Windows and the other was actively failing for weeks. llvm-svn: 302924
* [codeview] Fix assertion failure introduced in r295354 refactoringReid Kleckner2017-05-122-2/+26
| | | | | | | | CodeViewDebug sets Asm to nullptr to disable debug info generation. You can get a .ll file like no-cus.ll from 'clang -gcodeview -g0', which happens in the ubsan test suite. llvm-svn: 302923
* Make sure we have actually written what is expected by the test.Galina Kistanova2017-05-121-1/+1
| | | | llvm-svn: 302922
* [ELF] - Apply clang-format. NFC.George Rimar2017-05-121-13/+28
| | | | llvm-svn: 302921
* Disable two failing darwin lsan testsFrancis Ricci2017-05-122-2/+2
| | | | | | | | These tests don't fail consistently in all cases, but they fail most of the time on the buildbots. Mark as UNSUPPORTED for now to avoid buildbots failing due to XPASS. llvm-svn: 302920
* AMDGPU/GlobalISel: Mark 32-bit integer constants as legalTom Stellard2017-05-122-0/+21
| | | | | | | | | | | | Reviewers: arsenm Reviewed By: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, igorb, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D33115 llvm-svn: 302919
* [index] Index template specialization arguments for function templatsAlex Lorenz2017-05-122-0/+49
| | | | | | | | Also ensure that class template specialization arguments are covered rdar://31812032 llvm-svn: 302918
* [asan/win] Re-enable Win64 asan tests on Win8+Reid Kleckner2017-05-121-5/+12
| | | | | | | | Our theory is that reserving large amounts of shadow memory isn't reliable on Win7 and earlier NT kernels. This affects the clang-x64-ninja-win7 buildbot, which uses Windows 7. llvm-svn: 302917
OpenPOWER on IntegriCloud