summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Recommit r322073: [AArch64][SVE] Asm: Add predicated ADD/SUB instructionsSander de Smalen2018-01-098-4/+300
| | | | | | | | | Fixed issue that was found on sanitizer-x86_64-linux-fast. I changed the result type of 'Parser.getTok().getString().lower()' in AArch64AsmParser::tryParseSVEPredicateVector() from 'StringRef' to 'auto', since StringRef::lower() returns a std::string. llvm-svn: 322092
* [ASTImporter] Support importing CXXUnresolvedConstructExpr and ↵Aleksei Sidorin2018-01-092-0/+96
| | | | | | | | | | | | | UnresolvedLookupExpr * Note: This solution is based on https://github.com/haoNoQ/clang/blob/summary-ipa-draft/lib/AST/ASTImporter.cpp#L7605. Patch by Peter Szecsi! Differential Revision: https://reviews.llvm.org/D38694 llvm-svn: 322091
* X86 Tests: Update more isel tests with FastVariableShuffle featureZvi Rackover2018-01-0929-1598/+2675
| | | | | | | | | | | | | | | | | Summary: Added the FastVariableShuffle feature to cases that resembled processors for which this fearure is on. For AVX2 there are processors with and w/o this fearue enable. For AVX512 only KNL does enable this feature so cases which only have +avx512f were left without the FastVariableShuffle enabled. Reviewers: RKSimon, craig.topper Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41851 llvm-svn: 322090
* X86 Tests: Add common check prefix to test-case. NFC.Zvi Rackover2018-01-091-31/+1
| | | | | | As suggested in D41851 llvm-svn: 322089
* [CodeGen] Print frame-setup/destroy flags in -debug output like we do in MIRFrancis Visoiu Mistrih2018-01-092-16/+6
| | | | | | | | | | | | | | | Currently the MachineInstr::print function prints the frame-setup/frame-destroy differently than it does in MIR. Instead of: %x21 = LDR %sp, -16; flags: FrameDestroy print: %x21 = frame-destroy LDR %sp, -16 llvm-svn: 322088
* [SelectionDAG] lower math intrinsics to finite version of libcalls when ↵Sanjay Patel2018-01-096-34/+485
| | | | | | | | | | | | | | | | | | | | | | possible (PR35672) Ingredients in this patch: 1. Add HANDLE_LIBCALL defs for finite mathlib functions that correspond to LLVM intrinsics. 2. Plumbing to send TargetLibraryInfo down to SelectionDAGLegalize. 3. Relaxed math and library checking in SelectionDAGLegalize::ConvertNodeToLibcall() to choose finite libcalls. There was a bug about determining the availability of the finite calls that should be fixed with: rL322010 Not in this patch: This doesn't resolve the question/bug of clang creating the intrinsic IR in the first place. There's likely follow-up work needed to support the long double variants better. There's room for improvement to reduce the code duplication. Create finite calls that don't originate from a corresponding intrinsic or DAG node? Differential Revision: https://reviews.llvm.org/D41338 llvm-svn: 322087
* [CodeGen] Don't print register classes in -debug outputFrancis Visoiu Mistrih2018-01-099-74/+37
| | | | | | | | | | Since register classes and banks are already printed with the register definition, don't print it at the end of every instruction anymore. This follows MIR in this regard and is another step to the unification of the two formats. llvm-svn: 322086
* [DAG] Elide overlapping storesNirav Dave2018-01-092-24/+22
| | | | | | | | | | | | | | | | Relanding after fixing handling of pre-indexed memory operations in BaseIndexOffset analysis (r322003). Extend overlapping store elision to handle overwrites of stores by larger stores. Reviewers: craig.topper, rnk, t.p.northover Subscribers: javed.absar, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D40969 llvm-svn: 322085
* [clangd] Use ToolExecutor to write the global-symbol-builder tool.Eric Liu2018-01-094-52/+64
| | | | | | | | | | | | | | | Summary: This enables more execution modes like standalone and Mapreduce-style execution. See also D41729 Reviewers: hokein, sammccall Subscribers: klimek, ilya-biryukov, cfe-commits Differential Revision: https://reviews.llvm.org/D41730 llvm-svn: 322084
* [EarlyCSE] Salvage debug info during DCEPetar Jovanovic2018-01-092-0/+65
| | | | | | | | | | | EarlyCSE did not try to salvage debug info during erasing of instructions. This change fixes it. Patch by Djordje Todorovic. Differential Revision: https://reviews.llvm.org/D41496 llvm-svn: 322083
* Explicitly specify output file.Alexander Kornienko2018-01-091-2/+2
| | | | | | Otherwise the test fails when LLVM sources are on a read-only partition. llvm-svn: 322082
* [test] Fix tests to use more portable LLVM_ENABLE_ZLIBMichal Gorny2018-01-092-1/+5
| | | | | | | | | | | | | The HAVE_LIBZ variable is not exported by LLVM, and therefore is not available in stand-alone builds of other tools. Use LLVM_ENABLE_ZLIB which is the name under which the effective value is exported. Additional, use llvm_canonicalize_cmake_booleans() to make sure that a correct (Python-safe) boolean value is passed down to lit. Differential Revision: https://reviews.llvm.org/D41725 llvm-svn: 322081
* [clangd] Fix a bug in asynchronous code completionIlya Biryukov2018-01-091-2/+9
| | | | | | | | | A StringRef that goes out of scope was copied and used in a handler running on a separate thread. We didn't catch it because clangd does not use the async completion API yet. llvm-svn: 322080
* [ASTImporter] Fix missing SourceLoc import for ObjCMethodDecl selectorsAleksei Sidorin2018-01-092-2/+8
| | | | | | | | Patch by Nico Rieck, test case by Sean Callanan! Differential Revision: https://reviews.llvm.org/D6550 llvm-svn: 322079
* [InstCombine] Check for out of range ashr values using APInt before calling ↵Simon Pilgrim2018-01-092-3/+28
| | | | | | | | getZExtValue Reduced from oss-fuzz #5032 test case llvm-svn: 322078
* Reverted r322073 because of AddressSanitizer failure onSander de Smalen2018-01-097-299/+3
| | | | | | sanitizer-x86_64-linux-fast builder. llvm-svn: 322077
* [X86][AVX] Add v2i64/v2f64 load testsSimon Pilgrim2018-01-091-0/+29
| | | | | | Ensure these use insertions, not masked load ops llvm-svn: 322076
* TestConflictingSymbols: simplify test by using run_break_set_by_source_regexpPavel Labath2018-01-091-14/+8
| | | | | | follow-up to r321271 based on post-commit feedback by Jim Ingham. llvm-svn: 322075
* Track in the AST whether the operand to a UnaryOperator can overflow and ↵Aaron Ballman2018-01-0918-180/+245
| | | | | | then use that logic when evaluating constant expressions and emitting codegen. llvm-svn: 322074
* [AArch64][SVE] Asm: Add predicated ADD/SUB instructionsSander de Smalen2018-01-097-3/+299
| | | | | | | | | | | | | | | | | Summary: Add the predicated ADD/SUB instructions and corresponding tests. Patch [3/3] in a series to add predicated ADD/SUB instructions for SVE. Reviewers: rengolin, mcrosier, evandro, fhahn, echristo Reviewed By: fhahn Subscribers: aemerson, javed.absar, tschuett, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D41443 llvm-svn: 322073
* [InstCombine] Add pow2 mul -> shl tests for vectors with uniform/non-uniform ↵Simon Pilgrim2018-01-092-13/+57
| | | | | | constants llvm-svn: 322072
* [MIR] Add support for the frame-destroy MachineInstr flagFrancis Visoiu Mistrih2018-01-097-3/+17
| | | | | | | | | We are printing / parsing the `frame-setup` MachineInstr flag but not the `frame-destroy` one. Differential Revision: https://reviews.llvm.org/D41509 llvm-svn: 322071
* [AArch64][SVE] Asm: Add parsing of merging/zeroing suffix for SVE predicate ↵Sander de Smalen2018-01-092-0/+32
| | | | | | | | | | | | | | | | | | | vector operands Summary: Parsing of the '/m' (merging) or '/z' (zeroing) suffix of a predicate operand. Patch [2/3] in a series to add predicated ADD/SUB instructions for SVE. Reviewers: rengolin, mcrosier, evandro, fhahn, echristo, MatzeB, t.p.northover Reviewed By: fhahn Subscribers: t.p.northover, MatzeB, aemerson, javed.absar, tschuett, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D41442 llvm-svn: 322070
* [Nios2] Arithmetic instructions for R1 and R2 ISA.Nikolai Bozhenov2018-01-098-11/+210
| | | | | | | | | | | | | | Summary: This commit enables some of the arithmetic instructions for Nios2 ISA (for both R1 and R2 revisions), implements facilities required to emit those instructions and provides LIT tests for added instructions. Reviewed By: hfinkel Differential Revision: https://reviews.llvm.org/D41236 Author: belickim <mateusz.belicki@intel.com> llvm-svn: 322069
* Fix type mismatch in omp_control_tool() implementation that makes it run ↵Paul Osmialowski2018-01-091-1/+1
| | | | | | | | incorrectly on 32-bit machines. Differential Revision: https://reviews.llvm.org/D41854 llvm-svn: 322068
* [clangd] Catch more symbols in SymbolCollector.Haojian Wu2018-01-092-4/+49
| | | | | | | | | | | | | | | | | | Summary: We currently only collect external-linkage symbols in the collector, which results in missing some typical symbols (like no-linkage type alias symbols). This patch relaxes the constraint a bit to allow collecting more symbols. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D41759 llvm-svn: 322067
* [ELF] Add a comment for ARMExidxSentinelSection::Highest; Use "= nullptr" ↵Igor Kudrin2018-01-091-1/+4
| | | | | | | | instead of "= 0". NFC. Differential Revision: https://reviews.llvm.org/D41234 llvm-svn: 322066
* Avoid assumption that lit tests are writable (in a couple more places). NFCSam McCall2018-01-092-4/+4
| | | | llvm-svn: 322065
* ananas: Add shared library supportEd Schouten2018-01-092-5/+33
| | | | | | | | | | | | | The Ananas Operating System (https://github.com/zhmu/ananas) has shared library support as of commit 57739c0b6ece56dd4872aedf30264ed4b9412c77. This change adds the necessary settings to clang so that shared executables and libraries can be build correctly. Submitted by: Rink Springer Differential Revision: https://reviews.llvm.org/D41500 llvm-svn: 322064
* Added Control Flow Protection FlagOren Ben Simhon2018-01-0912-2/+105
| | | | | | | | | | Cf-protection is a target independent flag that instructs the back-end to instrument control flow mechanisms like: Branch, Return, etc. For example in X86 this flag will be used to instrument Indirect Branch Tracking instructions. Differential Revision: https://reviews.llvm.org/D40478 Change-Id: I5126e766c0e6b84118cae0ee8a20fe78cc373dea llvm-svn: 322063
* Instrument Control Flow For Indirect Branch TrackingOren Ben Simhon2018-01-098-2/+386
| | | | | | | | | | | | | CET (Control-Flow Enforcement Technology) introduces a new mechanism called IBT (Indirect Branch Tracking). According to IBT, each Indirect branch should land on dedicated ENDBR instruction (End Branch). The new pass adds ENDBR instructions for every indirect jmp/call (including jumps using jump tables / switches). For more information, please see the following: https://software.intel.com/sites/default/files/managed/4d/2a/control-flow-enforcement-technology-preview.pdf Differential Revision: https://reviews.llvm.org/D40482 Change-Id: Icb754489faf483a95248f96982a4e8b1009eb709 llvm-svn: 322062
* [cmake] Use symlinks for Windows-hosted toolchains built on UnixShoaib Meenai2018-01-092-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When cross-compiling for Windows on Unix, the built toolchain will need to be transferred to Windows to actually run. My opinion is that the Unix build should use symlinks, and the transfer to Windows should take care of making those symlinks usable. E.g., I envision tarballs to be a common form of transfer from Unix to Windows, in which case the tarball can be created using --dereference to follow the symlinks. The motivation here is that, when cross-compiling for Windows on Unix, the installation will *already* create symlinks. The reason is that the installation script will be invoked without knowing the host system, so the `if(UNIX)` check in the installation symlink creation script will reflect the build system rather than the host system. We could either make the build and install trees both contain copies or both contain symlinks, and using symlinks is a significant space saving without (in my opinion) having any detrimental effect on the usage of the cross- compiled toolchain on Windows. A secondary motivation is that Windows 10 version 1703 and later finally lift the administrator rights requirement for creating symbolic links (if the system is in Developer Mode), which makes symlinks a lot more practical even on Windows. Of course Unix and Windows symlinks aren't interoperable, but symlinks for Windows toolchains is a reasonable future direction to be going in anyway. Differential Revision: https://reviews.llvm.org/D41314 llvm-svn: 322061
* [X86] Allow more cmpps/pd immediate encodings to be commuted during isel.Craig Topper2018-01-092-34/+18
| | | | | | The code that checks the immediate wasn't masking to the lower 3-bits like the code in X86InstrInfo.cpp that's used by the peephole pass does. llvm-svn: 322060
* [SCEV] Do not cache S -> V if S is not equivalent of VSerguei Katkov2018-01-093-3/+124
| | | | | | | | | | | | | | | | SCEV tracks the correspondence of created SCEV to original instruction. However during creation of SCEV it is possible that nuw/nsw/exact flags are lost. As a result during expansion of the SCEV the instruction with nuw/nsw/exact will be used where it was expected and we produce poison incorreclty. Reviewers: sanjoy, mkazantsev, sebpop, jbhateja Reviewed By: sanjoy Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41578 llvm-svn: 322058
* [ELF] Explicit template instantiations for addFileEaswaran Raman2018-01-091-0/+5
| | | | | | | | | | | | | | | Summary: All other templated methods have explicit instantiations but this one is missing. Discovered while building with a clang with inliner modifications. Reviewers: espindola Subscribers: emaste, llvm-commits, davidxl Differential Revision: https://reviews.llvm.org/D41847 llvm-svn: 322057
* [CGP] Fix Complex addressing mode for offsetSerguei Katkov2018-01-092-1/+25
| | | | | | | | | | | | | | If the offset is differ in two addressing mode we can continue only if ScaleReg is not set due to we will use it as merge of different offsets. It should fix PR35799 and PR35805. Reviewers: john.brawn, reames Reviewed By: reames Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41227 llvm-svn: 322056
* [PowerPC] Can not assume an intrinsic argument is a simple type.Sean Fertile2018-01-092-6/+67
| | | | | | | | | | | | | The CTRLoop pass performs checks on the argument of certain libcalls/intrinsics, and assumes the arguments must be of a simple type. This isn't always the case though. For example if we unroll and vectorize a loop we may end up with vectors larger then the largest legal type, along with intrinsics that operate on those wider types. This happened in the ffmpeg build, where we unrolled a loop and ended up with a sqrt intrinsic that operated on V16f64, triggering an assertion. Differential Revision: https://reviews.llvm.org/D41758 llvm-svn: 322055
* Cut and paste error - I wasn't actually running both tests...Jim Ingham2018-01-091-1/+1
| | | | llvm-svn: 322054
* Remove unused function HvxSelector::zerous.Eric Christopher2018-01-091-20/+0
| | | | llvm-svn: 322053
* Fix use-after-free found by address-san on -r322028.Erich Keane2018-01-091-1/+5
| | | | | | | | | | | r322028 attempted to remove something from the "Manglings" list when it was no longer valid, and did so with 'erase'. However, StringRefs to these were stored, so these became dangling references. This patch changes to using 'remove' instead of 'erase' to keep the strings valid. llvm-svn: 322052
* Revert "[PowerPC] Manually schedule the prologue and epilogue"Stefan Pintilie2018-01-096-117/+56
| | | | | | | | [PowerPC] This reverts commit r322036. Failing build bots. Revert the commit now. llvm-svn: 322051
* [X86] Remove llvm.x86.avx512.cvt*2mask.* intrinsics and autoupgrade to (icmp ↵Craig Topper2018-01-0913-252/+217
| | | | | | | | slt X, 0) I had to drop fast-isel-abort from a test because we can't fast isel some of the mask stuff. When we used intrinsics we implicitly fell back to SelectionDAG for the intrinsic call without triggering the abort error. But with native IR that doesn't happen the same way. llvm-svn: 322050
* [X86] Remove unnecessary isel pattern that is a combination of two other ↵Craig Topper2018-01-091-2/+0
| | | | | | | | | | | | | | | patterns. The pattern was this def : Pat<(i32 (zext (i8 (bitconvert (v8i1 VK8:$src))))), (MOVZX32rr8 (EXTRACT_SUBREG (i32 (COPY_TO_REGCLASS VK8:$src, GR32)), sub_8bit))>, Requires<[NoDQI]>; but if you just let (i32 (zext X)) match byte itself you'll get MOVZX32rr8. And if you let (i8 (bitconvert (v8i1 VK8:$src))) match by itself you'll get (EXTRACT_SUBREG (i32 (COPY_TO_REGCLASS VK8:$src, GR32)), sub_8bit). So we can just let isel do the two patterns naturally. llvm-svn: 322049
* [MachineOutliner] AArch64: Handle instrs that use SP and will never need fixupsJessica Paquette2018-01-097-22/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit does two things. Firstly, it adds a collection of flags which can be passed along to the target to encode information about the MBB that an instruction lives in to the outliner. Second, it adds some of those flags to the AArch64 outliner in order to add more stack instructions to the list of legal instructions that are handled by the outliner. The two flags added check if - There are calls in the MachineBasicBlock containing the instruction - The link register is available in the entire block If the link register is available and there are no calls, then a stack instruction can always be outlined without fixups, regardless of what it is, since in this case, the outliner will never modify the stack to create a call or outlined frame. The motivation for doing this was checking which instructions are most often missed by the outliner. Instructions like, say %sp<def> = ADDXri %sp, 32, 0; flags: FrameDestroy are very common, but cannot be outlined in the case that the outliner might modify the stack. This commit allows us to outline instructions like this. llvm-svn: 322048
* Rewrite our relocation processing.Rafael Espindola2018-01-097-192/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | This splits relocation processing in two steps. First, analyze what needs to be done at the relocation spot. This can be a constant (non preemptible symbol, relative got reference, etc) or require a dynamic relocation. At this step we also consider creating copy relocations. Once that is done we decide if we need a got or a plt entry. The code is simpler IMHO. For example: - There is a single call to isPicRel since the logic is not split among adjustExpr and the caller. - R_MIPS_GOTREL is simple to handle now. - The tracking of what is preemptible or not is much simpler now. This also fixes a regression with symbols being both in a got and copy relocated. They had regressed in r268668 and r268149. The other test changes are because of error messages changes or the order of two relocations in the output. llvm-svn: 322047
* [CMake] Support for cross-compilation when build runtimesPetr Hosek2018-01-083-2/+17
| | | | | | | | | | | When cross-compiling, we cannot use the just built toolchain, instead we need to use the host toolchain which we assume has a support for targeting the selected target platform. We also need to pass the path to the native version of llvm-config to external projects. Differential Revision: https://reviews.llvm.org/D41678 llvm-svn: 322046
* [WebAssembly] Write out undefined symbol addresses as zeroSam Clegg2018-01-087-35/+26
| | | | | | | | | | | | | The addresses of undefined symbols that make it into the final executable (i.e. weak references to non-existent symbols) should resolve to zero. Also, make sure to not include function in the indirect function table if they are not included in the output. Differential Revision: https://reviews.llvm.org/D41839 llvm-svn: 322045
* [libcxx] Support the use of compiler-rt in lit testsPetr Hosek2018-01-083-1/+5
| | | | | | | | Don't link tests against libgcc when compiler-rt is being used. Differential Revision: https://reviews.llvm.org/D40513 llvm-svn: 322044
* Document attribute target multiversioning.Erich Keane2018-01-082-0/+24
| | | | | | | | | | Add attribute target multiversioning to the release notes. Additionally adds multiversioning support to the attribute documentation for 'target'. Differential Revision: https://reviews.llvm.org/D41837 llvm-svn: 322043
* [ELF] Small grammar fix. NFCShoaib Meenai2018-01-081-1/+1
| | | | | | The whole consists of the parts, not the other way around. llvm-svn: 322042
OpenPOWER on IntegriCloud