summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [IndVarSimplify] Add AShr exact flags using induction variables ranges.David Green2017-07-052-2/+118
| | | | | | | | | | This adds exact flags to AShr/LShr flags where we can statically prove it is valid using the range of induction variables. This allows further optimisations to remove extra loads. Differential Revision: https://reviews.llvm.org/D34207 llvm-svn: 307157
* [SystemZ] Simplify handling of ISA revisionsUlrich Weigand2017-07-051-26/+22
| | | | | | | | | | This moves determination of the ISA revision from the CPU name to one single place, removing a bunch of duplicated code. It also makes the supported ISA revisions available as feature strings. No functional change. llvm-svn: 307156
* [SystemZ] Simplify handling of 128-bit multiply/divide instructionUlrich Weigand2017-07-057-106/+106
| | | | | | | | | | | Several integer multiply/divide instructions require use of a register pair as input and output. This patch moves setting up the input register pair from C++ code to TableGen, simplifying the whole process and making it more easily extensible. No functional change. llvm-svn: 307155
* [SystemZ] Small cleanups to SystemZScheduleZ13.tdUlrich Weigand2017-07-051-25/+36
| | | | | | | | | | Fixes a couple of whitespace errors, re-sorts the vector floating-point instructions to make them more easily extensible, and adds a missing pseudo instruction. No functional change. llvm-svn: 307154
* [Hexagon] Preclude non-memory test from being optimized away. NFC.Nirav Dave2017-07-0511-38/+38
| | | | llvm-svn: 307153
* [driver][mips] Use AddTargetFeature to check arguments and add feature ↵Simon Atanasyan2017-07-051-7/+2
| | | | | | flags. NFC llvm-svn: 307152
* [driver][mips] Remove redundant curly brackets. NFCSimon Atanasyan2017-07-051-3/+2
| | | | llvm-svn: 307151
* CMake: Add LLVM_UTILS_INSTALL_DIR optionTom Stellard2017-07-052-1/+5
| | | | | | | | | | | | | | | | | | Summary: This is like the LLVM_TOOLS_INSTALL_DIR option, but for the utils that are installed when the LLVM_INSTALL_UTILS. This option defaults to 'bin' to remain consistent with the current behavior, but distros may want to install these to libexec/llvm. Reviewers: beanz Reviewed By: beanz Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D30655 llvm-svn: 307150
* [GlobalISel] Refactor Legalizer helpers for libcallsDiana Picus2017-07-053-24/+33
| | | | | | | | | | We used to have a helper that replaced an instruction with a libcall. That turns out to be too aggressive, since sometimes we need to replace the instruction with at least two libcalls. Therefore, change our existing helper to only create the libcall and leave the instruction removal as a separate step. Also rename the helper accordingly. llvm-svn: 307149
* [AsmParser] Mnemonic Spell CorrectorSjoerd Meijer2017-07-053-2/+119
| | | | | | | | | | | | | | | | | | This implements suggesting other mnemonics when an invalid one is specified, for example: $ echo "adXd r1,r2,#3" | llvm-mc -triple arm <stdin>:1:1: error: invalid instruction, did you mean: add, qadd? adXd r1,r2,#3 ^ The implementation is target agnostic, but as a first step I have added it only to the ARM backend; so the ARM backend is a good example if someone wants to enable this too for another target. Differential Revision: https://reviews.llvm.org/D33128 llvm-svn: 307148
* [clang-format] Fix an uninitialized memory accessKrasimir Georgiev2017-07-051-7/+9
| | | | llvm-svn: 307147
* [globalisel][tablegen] Fix the misuse of STATISTICS() on release builds ↵Daniel Sanders2017-07-051-4/+4
| | | | | | | | | | | | (like r307088) after r307133. r307133 brought back a couple instances of the same mistake that was already fixed by r307088. Fixed it again. Using NumPatternEmitted as a unique id for the tables is not valid on release builds since the counters don't count in that case. llvm-svn: 307146
* [ARM] GlobalISel: Extract tiny helper. NFCDiana Picus2017-07-051-2/+5
| | | | | | Extract functionality for determining if the target uses AEABI. llvm-svn: 307145
* [MachineIRBuilder] Fix formatting. NFC.Diana Picus2017-07-052-3/+2
| | | | llvm-svn: 307144
* Add const to reference arguments of Diagnostic ctorAlexander Kornienko2017-07-052-6/+6
| | | | llvm-svn: 307143
* [GlobalISel][X86] For now don't handle not trivial function arguments lowering.Igor Breger2017-07-051-1/+11
| | | | llvm-svn: 307142
* [MachineIRBuilder] Add buildOr helper. NFC.Diana Picus2017-07-052-0/+17
| | | | | | This isn't used anywhere yet, but I need it for a future commit. llvm-svn: 307141
* [GlobalIsel] allow x86_fp80 values to be dumped.Igor Breger2017-07-052-0/+26
| | | | | | | | | | | | | | | | Summary: Otherwise the fallback path fails with an assertion on x86_64 targets, when "x86_fp80" is encountered. Reviewers: t.p.northover, zvi, guyblank Reviewed By: zvi Subscribers: rovka, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D34975 llvm-svn: 307140
* [MachineIRBuilder] Add buildBinaryOp helper. NFCDiana Picus2017-07-052-29/+12
| | | | | | | Add a helper for building simple binary ops like add, mul, sub, and. This can be used in the future for quickly adding support for or, xor. llvm-svn: 307139
* [globalisel][tablegen] Fix an unused variable warning in release builds ↵Daniel Sanders2017-07-051-1/+1
| | | | | | after r307133 llvm-svn: 307138
* [ELF] Fix Windows build errorPeter Smith2017-07-051-2/+2
| | | | | | | Attempt to fix Windows buildbots From 307131 Replaced return {ET, false}; with return std::make_pair(ET, false); llvm-svn: 307137
* [ELF] Allow multiple thunks to be added for a symbol.Peter Smith2017-07-052-7/+17
| | | | | | | | | | This change permits there to be more than one thunk to be associated with a symbol. For interworking thunks we only require one thunk, but range extension thunks may require more than one. Differential Revision: https://reviews.llvm.org/D34037 llvm-svn: 307136
* Revert "[IndVars] Canonicalize comparisons between non-negative values and ↵Max Kazantsev2017-07-055-62/+6
| | | | | | | | | | | indvars" This patch seems to cause failures of test MathExtras.SaturatingMultiply on multiple buildbots. Reverting until the reason of that is clarified. Differential Revision: https://reviews.llvm.org/rL307126 llvm-svn: 307135
* Fix invalid warnings for header guards in preamblesErik Verbruggen2017-07-055-12/+9
| | | | | | | | Fixes https://bugs.llvm.org/show_bug.cgi?id=33574 Differential Revision: https://reviews.llvm.org/D34882 llvm-svn: 307134
* [globalisel][tablegen] Added instruction emission to the state-machine-based ↵Daniel Sanders2017-07-055-261/+549
| | | | | | | | | | | | | | | | | | | | | | | matcher. Summary: This further improves the compile-time regressions that will be caused by a re-commit of r303259. Also added included preliminary work in preparation for the multi-insn emitter since I needed to change the relevant part of the API for this patch anyway. Depends on D33758 Reviewers: rovka, vitalybuka, ab, t.p.northover, qcolombet, aditya_nandakumar Reviewed By: ab Subscribers: kristof.beyls, igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D33764 llvm-svn: 307133
* [ELF] Introduce Thunk reuse compatibilityPeter Smith2017-07-053-1/+31
| | | | | | | | | | | | | | | | On ARM the interworking thunks are only produced for branch instructions that can't be changed into a blx instruction so only Thumb callers would call Thumb thunks and only ARM callers would call ARM thunks. With range extension thunks branch and link instructions may need a Thunk. These instructions can be rewritten as a blx and can use either ARM or Thumb thunks. We introduce an isCompatibleWith() function so that a caller can check if an existing Thunk is compatible before reusing it. Differential Revision: https://reviews.llvm.org/D34035 llvm-svn: 307132
* [ELF] Extract allocateHeaders() from assignAddresses()Peter Smith2017-07-053-17/+13
| | | | | | | | | | | | | | | The allocateHeaders() function is called at the end of assignAddresses(), it decides whether the ELF header and program header table can be allocated to a PT_LOAD program header. As the function alters state, it prevents assignAddresses() from being called multiple times. This change splits out the call to allocateHeaders() from assignAddresses() this will permit assignAddresses() to be called while processing range extension thunks without trying to allocateHeaders(). Differential Revision: https://reviews.llvm.org/D34344 llvm-svn: 307131
* [clang-tidy] Add "MakeSmartPtrFunction" option to ↵Haojian Wu2017-07-0510-60/+184
| | | | | | | | | | | | | | modernize-make-shared/unique checks. Reviewers: alexfh, aaron.ballman Reviewed By: alexfh Subscribers: JDevlieghere, Eugene.Zelenko, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D34206 llvm-svn: 307130
* [modules ts] Improve merging of module-private declarations.Richard Smith2017-07-056-36/+101
| | | | | | | | | | These cases occur frequently for declarations in the global module (above the module-declaration) in a Modules TS module interface. When we merge a definition from another module into such a module-private definition, ensure that we transitively make everything lexically within that definition visible to that translation unit. llvm-svn: 307129
* [asan] Remove check for stack sizeJonas Hahnfeld2017-07-051-1/+0
| | | | | | | | This has been introduced in r304598 and fails for increased stack sizes. Differential Revision: https://reviews.llvm.org/D34876 llvm-svn: 307127
* [IndVars] Canonicalize comparisons between non-negative values and indvarsMax Kazantsev2017-07-055-6/+62
| | | | | | | | | | | | | | | | | -If there is a IndVar which is known to be non-negative, and there is a value which is also non-negative, then signed and unsigned comparisons between them produce the same result. Both of those can be seen in the same loop. To allow other optimizations to simplify them, we turn all instructions like %c = icmp slt i32 %iv, %b to %c = icmp ult i32 %iv, %b if both %iv and %b are known to be non-negative. Differential Revision: https://reviews.llvm.org/D34979 llvm-svn: 307126
* [GlobalISel][X86] Allow graceful fallback for struct/array argument/return ↵Igor Breger2017-07-052-11/+26
| | | | | | value lowering. Going to support it in follow patch. llvm-svn: 307125
* fix trivial typos in comments; NFCHiroshi Inoue2017-07-051-1/+1
| | | | llvm-svn: 307124
* fix trivial typos in comments; NFCHiroshi Inoue2017-07-052-3/+3
| | | | llvm-svn: 307123
* Add the missing triple to the test case added as part of r307120.Nemanja Ivanovic2017-07-051-1/+1
| | | | llvm-svn: 307122
* [AMDGPU] Fix size and alignment of size_t and pointer typesYaxun Liu2017-07-058-40/+167
| | | | | | Differential Revision: https://reviews.llvm.org/D34995 llvm-svn: 307121
* [PowerPC] Fix for PR33636Nemanja Ivanovic2017-07-052-2/+706
| | | | | | | | Remove casts to a constant when a node can be an undef. Differential Revision: https://reviews.llvm.org/D34808 llvm-svn: 307120
* Fix equivalent test on OS X and FreeBSDEric Fiselier2017-07-051-7/+7
| | | | llvm-svn: 307119
* Add dummy CMake target for *.pass.cpp tests when LIBCXX_CONFIGURE_IDE=ON.Eric Fiselier2017-07-051-0/+33
| | | | | | | | | | | | | | | | In order for IDE's like CLion to correctly parse and highlight the tests it needs to know roughly how to build them. This patch adds a dummy CMake target for each/all of the .pass.cpp tests in the test suite to solve this problem. The target is only created when LIBCXX_CONFIGURE_IDE=ON, so it shouldn't affect most users. Originally I wasn't sure that this change deserved to live upstream, but it's quite frustrating to edit libc++ tests using CLion or Visual Studio without it, in particular the filesystem tests which rely heavily on macros. Even though the change should have no effect on non-IDE users/configurations I decided to commit it upstream with the hopes it will benefit somebody other than me. llvm-svn: 307118
* Implement LWG 2937 - equivalent("dne", "exists") is not an errorEric Fiselier2017-07-053-59/+86
| | | | | | | | | | | | | | This patch speculatively implements the PR for LWG 2937, which fixes two issues with equivalent. (1) It makes equivalent("dne", "exists") an error. Previously only equivalent("dne", "dne") was an error and the former case was not (it returned false). Now equivalent reports an error when either input doesn't exist. (2) It makes equivalent(p1, p2) well-formed when `is_other(p1) && is_other(p2)`. Previously this was an error, but there is seemingly no reason why it should be on POSIX system. llvm-svn: 307117
* [Bash-autocompletion] Show flags which has HelpText or GroupIDYuka Takahashi2017-07-051-1/+1
| | | | | | | | Summary: Otherwise internal flags will be also completed. Differential Revision: https://reviews.llvm.org/D34930 llvm-svn: 307116
* [modules ts] Declarations from a module interface unit are only visible outsideRichard Smith2017-07-0512-23/+134
| | | | | | the module if declared in an export block. llvm-svn: 307115
* Rewrite areNonVolatileConsecutiveLoads to use BaseIndexOffsetNirav Dave2017-07-0510-255/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | Relanding after rewriting undef.ll test to avoid host-dependant endianness. As discussed in D34087, rewrite areNonVolatileConsecutiveLoads using generic checks. Also, propagate missing local handling from there to BaseIndexOffset checks. Tests of note: * test/CodeGen/X86/build-vector* - Improved. * test/CodeGen/BPF/undef.ll - Improved store alignment allows an additional store merge * test/CodeGen/X86/clear_upper_vector_element_bits.ll - This is a case we already do not handle well. Here, the DAG is improved, but scheduling causes a code size degradation. Reviewers: RKSimon, craig.topper, spatel, andreadb, filcab Subscribers: nemanjai, llvm-commits Differential Revision: https://reviews.llvm.org/D34472 llvm-svn: 307114
* [profiledata] Avoid creating a temporary vector in getNumValueDataAlexander Shaposhnikov2017-07-051-4/+1
| | | | | | | | | | | | | getValueSitesForKind returns ArrayRef which has a cast operator to std::vector, as a result a temporary vector is created if the type of the variable is const std::vector& that is suboptimal in this case. Differential revision: https://reviews.llvm.org/D34970 Test plan: make check-all llvm-svn: 307113
* [SafepointIRVerifier] Add verifier pass for finding GC relocation bugsAnna Thomas2017-07-059-0/+638
| | | | | | | | | | | | | | | | | | | | Original Patch and summary by Philip Reames. RewriteStatepointsForGC tries to rewrite a function in a manner where the optimizer can't end up using a pointer value after it might have been relocated by a safepoint. This pass checks the invariant that RSForGC is supposed to establish and that (if we constructed semantics correctly) later passes must preserve. This has been a really useful diagnostic tool when initially developing the rewriting scheme and has found numerous bugs. Differential Revision: https://reviews.llvm.org/D15940 Reviewed by: swaroop.sridhar, mjacob Subscribers: llvm-commits llvm-svn: 307112
* Revert "[AVR] Add the branch selection pass from the GitHub repository"Dylan McKay2017-07-056-276/+7
| | | | | | This reverts commit 602ef067c1d58ecb425d061f35f2bc4c7e92f4f3. llvm-svn: 307111
* Fix PR33635.Rafael Espindola2017-07-056-14/+28
| | | | | | | | | This is a semantic revert of r306036. We have to change the names, otherwise dynamic relocations will point to the wrong name. llvm-svn: 307110
* [AVR] Add the branch selection pass from the GitHub repositoryDylan McKay2017-07-056-7/+276
| | | | | | | We should rewrite this using the generic branch relaxation pass, but for the moment having this pass is better than hitting an assertion error. llvm-svn: 307109
* NFC.Gadi Haber2017-07-041-210/+835
| | | | | | | | | | | | | | | Made some updates to the half.ll test under CodeGen to make it friendly to the update_llc_test_checks .py tool as follows: 1.Removing the llc flag -asm-verbose=false 2.Grouping the multiple check-prefix directives 3.Apply update_llc_test_checks.py tool on the test This change is needed to easily update scheduling changes in an upcoming patch. Reviewers: zvi, RKSimon, craig.topper Differential Revision: https://reviews.llvm.org/D34934 llvm-svn: 307108
* Move clearOutputSections earlier. NFC.Rafael Espindola2017-07-041-6/+3
| | | | | | | | | | This is finally getting to the point where output sections are constructed. createOrphanCommands and fabricateDefaultCommands are moved out so they can be merged with existing code in followup commits. llvm-svn: 307107
OpenPOWER on IntegriCloud