summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo: using && instead of & when evaluating a maskMehdi Amini2017-06-231-1/+1
| | | | | | | | | | | | Summary: Reported by coverity, I don't know how to provide a test. Reviewers: zturner Subscribers: lldb-commits, emaste Differential Revision: https://reviews.llvm.org/D34550 llvm-svn: 306134
* Fix Wdocumentation warning.Simon Pilgrim2017-06-231-2/+0
| | | | llvm-svn: 306133
* [ScopBuilder] Pass ScopStmts around instead of BasicBlocks. NFC.Michael Kruse2017-06-233-96/+129
| | | | | | | | | | | | | | | | | | | | | | | During the construction of MemoryAccesses in ScopBuilder, BasicBlocks were used in function parameters, assuming that the ScopStmt an be directly derived from it. This won't be true anymore once we split BasicBlocks into multiple ScopStmt. As a preparation for such a change in the future, we instead pass the ScopStmt and avoid the use of getStmtFor(). There are two occasions where a kind of mapping from BasicBlock to ScopStmt is still required. 1. Get the statement representing the incoming block of a `PHINode` using `getLastStmtOf`. 2. One statement is required to write a scalar to be readable by those which need it. This is most often the statement which contains its definition, which we get using `getStmtFor(Instruction*)`. Differential Revision: https://reviews.llvm.org/D34369 llvm-svn: 306132
* Regenerate extract-store.ll testsSimon Pilgrim2017-06-231-6/+123
| | | | llvm-svn: 306131
* Fix a misleading indentation warning.Peter Collingbourne2017-06-231-3/+3
| | | | llvm-svn: 306130
* Make the size specification for cache_size_bytes case insensitive.Peter Collingbourne2017-06-232-2/+2
| | | | llvm-svn: 306129
* Add parens for python3.Peter Collingbourne2017-06-231-1/+1
| | | | llvm-svn: 306128
* [GSoC] Add support for CC1 options.Yuka Takahashi2017-06-232-8/+10
| | | | | | | | | | | | | | Summary: Add value completion support for options which are defined in CC1Options.td, because we only handled options in Options.td. Reviewers: ruiu, v.g.vassilev, teemperor Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34558 llvm-svn: 306127
* Add a ThinLTO cache policy for controlling the maximum cache size in bytes.Peter Collingbourne2017-06-236-22/+107
| | | | | | | | | | | | | | This is useful when an upper limit on the cache size needs to be controlled independently of the amount of the amount of free space. One use case is a machine with a large number of cache directories (e.g. a buildbot slave hosting a large number of independent build jobs). By imposing an upper size limit on each cache directory, users can more easily estimate the server's capacity. Differential Revision: https://reviews.llvm.org/D34547 llvm-svn: 306126
* docs: Add documentation for the ThinLTO cache pruning policy string.Peter Collingbourne2017-06-231-0/+32
| | | | | | Differential Revision: https://reviews.llvm.org/D34546 llvm-svn: 306125
* [Hexagon] Handle decreasing of stack alignment in frame loweringKrzysztof Parzyszek2017-06-235-2/+102
| | | | llvm-svn: 306124
* test: fix negative test caseSaleem Abdulrasool2017-06-231-2/+2
| | | | | | | | Add missing -### to the driver to ensure that we dont try to run the actual command. The host may not support the IAS. Should fix the SCEI buildbots. llvm-svn: 306123
* Add a BinarySubstreamRef, and a method to read one.Zachary Turner2017-06-233-0/+20
| | | | | | | | | This is essentially just a BinaryStreamRef packaged with an offset and the logic for reading one is no different than the logic for reading a BinaryStreamRef, except that we save the current offset. llvm-svn: 306122
* Remove trailing whitespace. NFCI.Simon Pilgrim2017-06-231-1/+1
| | | | llvm-svn: 306121
* GlobalISel: remove G_SEQUENCE instruction.Tim Northover2017-06-237-128/+14
| | | | | | | | It was trying to do too many things. The basic lumping together of values for legalization purposes is now handled by G_MERGE_VALUES. More complex things involving gaps and odd sizes are handled by G_INSERT sequences. llvm-svn: 306120
* GlobalISel: convert buildSequence to use non-deprecated instructions.Tim Northover2017-06-236-43/+57
| | | | | | | | G_SEQUENCE is going away soon so as a first step the MachineIRBuilder needs to be taught how to emulate it with alternatives. We use G_MERGE_VALUES where possible, and a sequence of G_INSERTs if not. llvm-svn: 306119
* [InlineCost] Do not take INT_MAX when Cost is negativeJun Bum Lim2017-06-232-5/+48
| | | | | | | | | | | | | | Summary: visitSwitchInst should not take INT_MAX when Cost is negative. Instead of INT_MAX , we also use a valid upperbound cost when overflow occurs in Cost. Reviewers: hans, echristo, dmgreen Reviewed By: dmgreen Subscribers: mcrosier, javed.absar, llvm-commits, eraman Differential Revision: https://reviews.llvm.org/D34436 llvm-svn: 306118
* [SystemZ] Remove unnecessary serialization before volatile loadsUlrich Weigand2017-06-235-38/+6
| | | | | | | | | | | | | | | | | This reverts the use of TargetLowering::prepareVolatileOrAtomicLoad introduced by r196905. Nothing in the semantics of the "volatile" keyword or the definition of the z/Architecture actually requires that volatile loads are preceded by a serialization operation, and no other compiler on the platform actually implements this. Since we've now seen a use case where this additional serialization causes noticable performance degradation, this patch removes it. The patch still leaves in the serialization before atomic loads, which is now implemented directly in lowerATOMIC_LOAD. (This also seems overkill, but that can be addressed separately.) llvm-svn: 306117
* Sort the autocomplete candidates before printing them out.Rui Ueyama2017-06-232-8/+15
| | | | | | | | | | Currently, autocompleted options are displayed in the same order as we wrote them in .td files. This patch sort them out in clang so that they are sorted alphabetically. This should improve usability. Differential Revision: https://reviews.llvm.org/D34557 llvm-svn: 306116
* Revert "Revert r305164/5/7."Saleem Abdulrasool2017-06-2310-33/+182
| | | | | | | | | | | | | | | | | | | | | | | Restore the `-gz` option to the driver with some minor tweaks to handle the additional case for `-Wa,--compress-debug-sections`. This intends to make the compression of the debug information controllable from the driver. The following is the behaviour: -gz enable compression (ambiguous for format, will default to zlib-gnu) -gz=none disable compression -gz=zlib-gnu enable compression (deprecated GNU style zlib compression) -gz=zlib enable compression (zlib based compression) Although -Wa,-compress-debug-sections works, it should be discouraged when using the driver to invoke the assembler. However, we permit the assembler to accept the GNU as style argument --compress-debug-sections to maintain compatibility. Note, -gz/-gz= does *NOT* imply -g. That is, you need to additionally specific -g for debug information to be generated. llvm-svn: 306115
* [x86] auto-generate complete checks; NFCSanjay Patel2017-06-231-41/+93
| | | | llvm-svn: 306114
* [x86] auto-generate complete checks; NFCSanjay Patel2017-06-231-85/+212
| | | | llvm-svn: 306113
* AMDGPU/GlobalISel: Mark 32-bit G_AND as legalTom Stellard2017-06-232-0/+23
| | | | | | | | | | | | 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/D34349 llvm-svn: 306112
* Revert r306103: "PR26195: Set correct NestedNameSpecifierLoc for theAlex Lorenz2017-06-232-126/+0
| | | | | | | | | dependent initializer" It caused buildbot failures such as this one: http://bb.pgr.jp/builders/test-clang-msc-x64-on-i686-linux-RA/builds/3777/steps/test_clang/logs/Clang%20%3A%3A%20Index__ctor-init-source-loc.cpp llvm-svn: 306111
* [x86] remove overridden target settings in test; NFCSanjay Patel2017-06-231-2/+0
| | | | | | r306109 was supposed to make this change, but I committed the wrong version. llvm-svn: 306110
* [x86] rename test file and auto-generate complete checks; NFCSanjay Patel2017-06-232-23/+35
| | | | | | | The command-line params override the target setting in the file itself, so delete that. Also, remove the cpu and arch because those don't matter and neither does the OS specification in the triple. llvm-svn: 306109
* [X86][AVX] Extended vector average testsSimon Pilgrim2017-06-231-411/+917
| | | | | | Added AVX1 tests and merged AVX1/AVX2/AVX512 checks where possible llvm-svn: 306107
* [SystemZ] Fix trap issue and enable expensive checks.Jonas Paulsson2017-06-235-18/+29
| | | | | | | | | | | | | | | | | | | | | | | The isBarrier/isTerminator flags have been removed from the SystemZ trap instructions, so that tests do not fail with EXPENSIVE_CHECKS. This was just an issue at -O0 and did not affect code output on benchmarks. (Like Eli pointed out: "targets are split over whether they consider their "trap" a terminator; x86, AArch64, and NVPTX don't, but ARM, MIPS, PPC, and SystemZ do. We should probably try to be consistent here.". This is still the case, although SystemZ has switched sides). SystemZ now returns true in isMachineVerifierClean() :-) These Generic tests have been modified so that they can be run with or without EXPENSIVE_CHECKS: CodeGen/Generic/llc-start-stop.ll and CodeGen/Generic/print-machineinstrs.ll Review: Ulrich Weigand, Simon Pilgrim, Eli Friedman https://bugs.llvm.org/show_bug.cgi?id=33047 https://reviews.llvm.org/D34143 llvm-svn: 306106
* [RuntimeLoopUnrolling] Rename exit block and move assert earlier. NFCAnna Thomas2017-06-231-23/+23
| | | | | | | The single exit block allowed in runtime unrolling is guaranteed to be the Latch's successor, so rename it as LatchExitBlock. llvm-svn: 306105
* [X86][SSE] Dropped -mcpu from vector average testsSimon Pilgrim2017-06-231-645/+686
| | | | | | Use triple and attribute only for consistency llvm-svn: 306104
* PR26195: Set correct NestedNameSpecifierLoc for the dependent initializerAlex Lorenz2017-06-232-0/+126
| | | | | | | | | | | | | | | | | | This commit fixes incorrect source positions of dependent c'tor initializers like in the following code: template<typename MyBase> struct Derived: MyBase::InnerIterator { Derived() : MyBase::InnerIterator() {} /// This line is problematic: all positions point to InnerIterator and nothing points to MyBase }; Patch by Serge Preis! Differential Revision: https://reviews.llvm.org/D32439 llvm-svn: 306103
* [docs] As of binutils 2.21.51.0.2, ld.bfd supports plugins too, represent ↵Ekaterina Vaartis2017-06-231-11/+9
| | | | | | | | this in docs PR#32760 llvm-svn: 306102
* Fix double->float truncation warning on MSVCSimon Pilgrim2017-06-231-2/+2
| | | | llvm-svn: 306101
* [InstCombine] Recognize and simplify three way comparison idiomsAnna Thomas2017-06-233-4/+498
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Many languages have a three way comparison idiom where comparing two values produces not a boolean, but a tri-state value. Typical values (e.g. as used in the lcmp/fcmp bytecodes from Java) are -1 for less than, 0 for equality, and +1 for greater than. We actually do a great job already of converting three way comparisons into binary comparisons when the result produced has one a single use. Unfortunately, such values can have more than one use, and in that case, our existing optimizations break down. The patch adds a peephole which converts a three-way compare + test idiom into a binary comparison on the original inputs. It focused on replacing the test on the result of the three way compare and does nothing about removing the three way compare itself. That's left to other optimizations (which do actually kick in commonly.) We currently recognize one idiom on signed integer compare. In the future, we plan to recognize and simplify other comparison idioms on other signed/unsigned datatypes such as floats, vectors etc. This is a resurrection of Philip Reames' original patch: https://reviews.llvm.org/D19452 Reviewers: majnemer, apilipenko, reames, sanjoy, mkazantsev Reviewed by: mkazantsev Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34278 llvm-svn: 306100
* Revert r306095: [mips] Fix reg positions in the aui/daui instructionsPetar Jovanovic2017-06-237-12/+12
| | | | | | | | | | | | | | | ELF/mips-plt-r6.s in lld-test is failing. Reverting the change. Original commit message: [mips] Fix register positions in the aui/daui instructions Swapped the position of the rt and rs register in the aut/daui instructions for mips32r6 and mips64r6. With this change, the format of the generated instructions complies with specifications and GCC. Patch by Milos Stojanovic. llvm-svn: 306099
* Fix build breakage caused by r306096Pavel Labath2017-06-231-3/+3
| | | | | | | It seems some targets don't have std::strtof and friends. Hopefully, dropping the std:: will be fine, as that's what the compiler recommends. llvm-svn: 306098
* [X86][SSE] Dropped -mcpu from scalar math testsSimon Pilgrim2017-06-231-6/+4
| | | | | | Use triple and attribute only for consistency llvm-svn: 306097
* [ADT] Add llvm::to_floatPavel Labath2017-06-234-20/+58
| | | | | | | | | | | | | | | | | | Summary: The function matches the interface of llvm::to_integer, but as we are calling out to a C library function, I let it take a Twine argument, so we can avoid a string copy at least in some cases. I add a test and replace a couple of existing uses of strtod with this function. Reviewers: zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34518 llvm-svn: 306096
* [mips] Fix register positions in the aui/daui instructionsPetar Jovanovic2017-06-237-12/+12
| | | | | | | | | | | | Swapped the position of the rt and rs register in the aut/daui instructions for mips32r6 and mips64r6. With this change, the format of the generated instructions complies with specifications and GCC. Patch by Milos Stojanovic. Differential Revision: https://reviews.llvm.org/D33988 llvm-svn: 306095
* [clang-format] Add a SortUsingDeclaration option and enable it by defaultKrasimir Georgiev2017-06-234-26/+69
| | | | | | | | | | | | | | | | Summary: This patch adds a `SortUsingDeclaration` style option and enables it for llvm style. Reviewers: klimek Reviewed By: klimek Subscribers: klimek Differential Revision: https://reviews.llvm.org/D34453 llvm-svn: 306094
* [clang-format] Update dump_format_style.py to indent nested fieldsKrasimir Georgiev2017-06-232-107/+108
| | | | | | | | | | | | | | | | | | Summary: This updates the format options documentation script to indent the documentation of nested fields. The previous format caused some problems, as when a bulleted list ends with a multiline comment. See the buildbot failure http://lab.llvm.org:8011/builders/clang-sphinx-docs/builds/10020/steps/docs-clang-html/logs/stdio Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D34552 llvm-svn: 306093
* [X86][SSE] Dropped -mcpu from insertps testsSimon Pilgrim2017-06-231-3/+3
| | | | | | Use triple and attribute only for consistency llvm-svn: 306092
* [clang-tidy] Fix a false positive in modernize-use-nullptr.Haojian Wu2017-06-232-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The FP happens when a casting nullptr expression is used within a NULL-default-arguemnt cxx constructor. Before the fix, the check will give a warning on nullptr when running with the test case, which should not happen: ``` G(g(static_cast<char*>(nullptr))); ^~~~~~~~~~~ nullptr ``` Reviewers: alexfh Reviewed By: alexfh Subscribers: cfe-commits, xazax.hun Differential Revision: https://reviews.llvm.org/D34524 llvm-svn: 306091
* [mips][msa] Splat.d endianness checkStefan Maksimovic2017-06-232-6/+33
| | | | | | | | | | | | | Before this change, it was always the first element of a vector that got splatted since the lower 6 bits of vshf.d $wd were always zero for little endian. Additionally, masking has been performed for vshf via which splat.d is created. Vshf has a property where if its first operand's elements have either bit 6 or 7 set, destination element is set to zero. Initially masked with 63 to avoid this property, which would result in generation of and.v + vshf.d in all cases. Masking with one results in generating a single splati.d instruction when possible. Differential Revision: https://reviews.llvm.org/D32216 llvm-svn: 306090
* [clang-format] Update style documentation, NFCKrasimir Georgiev2017-06-232-19/+101
| | | | | | | | | | | | Summary: Style documentation is generated automatically by `docs/tools/dump_format_style.py`. This hasn't been ran for a while. Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D34457 llvm-svn: 306089
* Bail out early in case we see an invalid runtime context in buildAliasGroupsTobias Grosser2017-06-231-0/+3
| | | | llvm-svn: 306088
* Hoist buildMinMaxAccess computeout to cover full alias-groupTobias Grosser2017-06-231-12/+13
| | | | | | | | | This allows us to bail out both in case the lexmin/max computation is too expensive, but also in case the commulative cost across an alias group is too expensive. This is an improvement of r303404, which did not seem to be sufficient to keep the Android Buildbot quiet. llvm-svn: 306087
* [islpp] Move buildMinMaxAccess[es] to C++ [NFC]Tobias Grosser2017-06-231-63/+48
| | | | llvm-svn: 306086
* [JumpThreading] Teach jump threading how to analyze (and (cmp A, C1), (cmp ↵Craig Topper2017-06-233-0/+68
| | | | | | | | | | | | | | A, C2)) after InstCombine has turned it into (cmp (add A, C3), C4) Currently JumpThreading can use LazyValueInfo to analyze an 'and' or 'or' of compare if the compare is fed by a livein of a basic block. This can be used to to prove the condition can't be met for some predecessor and the jump from that predecessor can be moved to the false path of the condition. But if the compare is something that InstCombine turns into an add and a single compare, it can't be analyzed because the livein is now an input to the add and not the compare. This patch adds a new method to LVI to get a ConstantRange on an edge. Then we teach jump threading to detect the add livein feeding a compare and to get the ConstantRange and propagate it. Differential Revision: https://reviews.llvm.org/D33262 llvm-svn: 306085
* [JumpThreading] Use some temporary variables to reduce the number of times ↵Craig Topper2017-06-231-12/+16
| | | | | | | | we call the same methods. NFC A future patch will add even more uses of these variables. llvm-svn: 306084
OpenPOWER on IntegriCloud