summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Make LLDB skip server-client roundtrip for signals that don't require any ↵Eugene Zemtsov2017-03-0712-2/+328
| | | | | | | | | | | | | | actions If QPassSignals packaet is supported by lldb-server, lldb-client will utilize it and ask the server to ignore signals that don't require stops or notifications. Such signals will be immediately re-injected into inferior to continue normal execution. Differential Revision: https://reviews.llvm.org/D30520 llvm-svn: 297231
* [ObjectYAML] Fix issue with DWARF2 AddrSize 8Chris Bieneman2017-03-072-2/+513
| | | | | | | | In my refactoring I introduced a bug where we were using the reference size instead of the offset size for DW_FORM_strp and similar forms. This patch resolves the error and adds a test case testing all the DWARF forms for DWARF2 AddrSize 8. There is similar coverage already in the DWARFDebugInfoTest sources that covers the parser. Once I migrate the DWARFGenerator APIs to be built on the YAML tools they will be fully covered under the same tests. llvm-svn: 297230
* Pass archive files to link.exe if they contain at least one native object file.Rui Ueyama2017-03-072-9/+18
| | | | | | | | | | | | Some archive files created during chromium build contains both BC and native files. If that's the case, we want to pass the archive file to link.exe. Otherwise, the MSVC linker would complain that there's an unresolved symbol in a given set of files. I cannot explain why link.exe doesn't complain about the presence of bitcode files in this case, but it seems link.exe doesn't touch BC. llvm-svn: 297229
* fix format specifier warningsTim Hammerquist2017-03-073-14/+21
| | | | llvm-svn: 297228
* [AArch64] Vulcan is now ThunderXT99Joel Jones2017-03-073-29/+29
| | | | | | | | | | | | | Broadcom Vulcan is now Cavium ThunderX2T99. LLVM Bugzilla: http://bugs.llvm.org/show_bug.cgi?id=32113 Corresponding LLVM change: https://reviews.llvm.org/rL297190 Changes to clang to support the change. Patch by Joel Jones llvm-svn: 297227
* GlobalISel: fix legalization of G_INSERTTim Northover2017-03-072-15/+39
| | | | | | | | We were calculating incorrect extract/insert offsets by trying to be too tricksy with min/max. It's clearer to just split the logic up into "register starts before this segment" vs "after". llvm-svn: 297226
* Strip trailing whitespace.Simon Pilgrim2017-03-071-4/+1
| | | | llvm-svn: 297225
* [coroutines] update coro_end builtin to match llvmGor Nishanov2017-03-072-2/+2
| | | | | | | | | | | | | | Summary: llvm.coro.end intrinsic now returns bool. Updating clang to match it. Reviewers: GorNishanov, rsmith Reviewed By: rsmith Subscribers: mehdi_amini, cfe-commits, EricWF Differential Revision: https://reviews.llvm.org/D30711 llvm-svn: 297224
* [coroutines] Add handling for unwind coro.endsGor Nishanov2017-03-0719-56/+284
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The purpose of coro.end intrinsic is to allow frontends to mark the cleanup and other code that is only relevant during the initial invocation of the coroutine and should not be present in resume and destroy parts. In landing pads coro.end is replaced with an appropriate instruction to unwind to caller. The handling of coro.end differs depending on whether the target is using landingpad or WinEH exception model. For landingpad based exception model, it is expected that frontend uses the `coro.end`_ intrinsic as follows: ``` ehcleanup: %InResumePart = call i1 @llvm.coro.end(i8* null, i1 true) br i1 %InResumePart, label %eh.resume, label %cleanup.cont cleanup.cont: ; rest of the cleanup eh.resume: %exn = load i8*, i8** %exn.slot, align 8 %sel = load i32, i32* %ehselector.slot, align 4 %lpad.val = insertvalue { i8*, i32 } undef, i8* %exn, 0 %lpad.val29 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1 resume { i8*, i32 } %lpad.val29 ``` The `CoroSpit` pass replaces `coro.end` with ``True`` in the resume functions, thus leading to immediate unwind to the caller, whereas in start function it is replaced with ``False``, thus allowing to proceed to the rest of the cleanup code that is only needed during initial invocation of the coroutine. For Windows Exception handling model, a frontend should attach a funclet bundle referring to an enclosing cleanuppad as follows: ``` ehcleanup: %tok = cleanuppad within none [] %unused = call i1 @llvm.coro.end(i8* null, i1 true) [ "funclet"(token %tok) ] cleanupret from %tok unwind label %RestOfTheCleanup ``` The `CoroSplit` pass, if the funclet bundle is present, will insert ``cleanupret from %tok unwind to caller`` before the `coro.end`_ intrinsic and will remove the rest of the block. Reviewers: majnemer Reviewed By: majnemer Subscribers: llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D25543 llvm-svn: 297223
* Implement FreeMachineFunction::getPassName().Yaron Keren2017-03-071-0/+4
| | | | llvm-svn: 297222
* [GlobalISel] Don't translate intrinsics with metadata parameters.Ahmed Bougacha2017-03-072-0/+14
| | | | | | | | | Some intrinsics take metadata parameters. These all need custom handling of some form, and cannot possibly be lowered generically to G_INTRINSIC calls with vreg operands. Reject them, instead of hitting an assert later in getOrCreateVReg. llvm-svn: 297209
* [GlobalISel] Avoid invalidating ValToVReg when translating no-op bitcast.Ahmed Bougacha2017-03-072-2/+37
| | | | | | | | | | | | | | | | | When we translate a no-op (same type) bitcast, we try to be clever and only emit a COPY if we already assigned a vreg to the defined value. However, when we didn't, we tried to assign to a reference into the ValToVReg DenseMap, even though the RHS of the assignment (getOrCreateVReg) could potentially grow that DenseMap, invalidating the reference. Avoid that by getting the source vreg first. I audited the rest of the translator; this is the only tricky case. The test is quite unwieldy, as the problem is caused by the DenseMap growing, which happens after the 47th mapped value. llvm-svn: 297208
* [GlobalISel] Relax vector G_SELECT assertion.Ahmed Bougacha2017-03-072-3/+15
| | | | | | | | | | | For vector operands, the `select` instruction supports both vector and non-vector conditions. The MIR builder had an overly restrictive assertion, that only accepted vector conditions for vector selects (in effect implementing ISD::VSELECT). Make it possible to express the full range of G_SELECTs. llvm-svn: 297207
* [GlobalISel] Add vector select translation test. NFC.Ahmed Bougacha2017-03-071-0/+13
| | | | llvm-svn: 297206
* [GlobalISel] Slightly clean up DBG_VALUE FP build code.Ahmed Bougacha2017-03-071-2/+1
| | | | | | | I messed up my rebases leading to r297200, and ended up with stale (but working) code. Fix it. llvm-svn: 297205
* [fuzzer] Don't crash if LLVMFuzzerMutate was called by CustomCrossOverVitaly Buka2017-03-075-2/+40
| | | | | | | | | | Reviewers: kcc Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D30682 llvm-svn: 297202
* [GlobalISel] Ignore %noreg when applying default regbank mapping.Ahmed Bougacha2017-03-072-0/+52
| | | | | | | | | | | | | When computing the mapping for non-generic instructions, we skipped %noreg operands, because we can't always reason about their banks. Also skip them when applying the mapping. Otherwise, we could end up with mappings that we can't apply. While there, duplicate an assert to distinguish between the two error conditions. llvm-svn: 297201
* [GlobalISel] Emit DBG_VALUE %noreg for non-int/fp constant values.Ahmed Bougacha2017-03-072-1/+8
| | | | | | | | When a dbg_value has a constant operand that isn't representable in MI, there isn't much we can do. Use %noreg (0) for those situations. This matches the SelectionDAG behavior. llvm-svn: 297200
* [GlobalISel] Add constant dbg.value translation tests. NFC.Ahmed Bougacha2017-03-071-2/+6
| | | | llvm-svn: 297199
* [NVPTX] Fixed lowering of unaligned loads/stores of f16 scalars and vectors.Artem Belevich2017-03-073-11/+103
| | | | | | Differential Revision: https://reviews.llvm.org/D30672 llvm-svn: 297198
* SjLjEHPrepare: Fix the pass for swifterror argumentsArnold Schwaighofer2017-03-072-0/+49
| | | | | | | | | | | We cannot leave the identity copies 'select true, arg, undef' that this pass inserts for arguments to simplify handling of values on swifterror arguments. swifterror arguments have restrictions on their uses. rdar://30839288 llvm-svn: 297197
* Fix bugpoint to work with swifterror valuesArnold Schwaighofer2017-03-071-2/+4
| | | | llvm-svn: 297196
* [ScopDetection] Require LoadInst base pointers to be hoisted.Michael Kruse2017-03-0710-16/+109
| | | | | | | | | | | | | | | | | | Only when load-hoisted we can be sure the base pointer is invariant during the SCoP's execution. Most of the time it would be added to the required hoists for the alias checks anyway, except with -polly-ignore-aliasing, -polly-use-runtime-alias-checks=0 or if AliasAnalysis is already sure it doesn't alias with anything (for instance if there is no other pointer to alias with). Two more parts in Polly assume that this load-hoisting took place: - setNewAccessRelation() which contains an assert which tests this. - BlockGenerator which would use to the base ptr from the original code if not load-hoisted (if the access expression is regenerated) Differential Revision: https://reviews.llvm.org/D30694 llvm-svn: 297195
* Use filename in linemarker when compiling preprocessed source (Revised)Taewook Oh2017-03-073-3/+64
| | | | | | | | | | | | | | | | Summary: This is a revised version of D28796. Included test is changed to resolve the target compatibility issue reported (rL293032). Reviewers: inglorion, dblaikie, echristo, aprantl, probinson Reviewed By: inglorion Subscribers: mehdi_amini, cfe-commits Differential Revision: https://reviews.llvm.org/D30663 llvm-svn: 297194
* llvm-objdump: handle line numbers and source options for amdgpu objectsKonstantin Zhuravlyov2017-03-074-0/+120
| | | | | | Differential Revision: https://reviews.llvm.org/D30679 llvm-svn: 297193
* Fix C2712 build error on WindowsKonstantin Zhuravlyov2017-03-071-6/+12
| | | | | | | | Move the __try/__except block outside of the set_thread_name function to avoid a conflict with object unwinding due to the use of the llvm::Storage. Differential Revision: https://reviews.llvm.org/D30707 llvm-svn: 297192
* Do not pass archive files containing bitcode files to the MSVC Linker.Rui Ueyama2017-03-072-2/+46
| | | | | | | | | | | | | | | | If /msvclto is specified, we compile bitcode files and pass it to the MSVC linker, stripping all bitcode files. We haven't stripped archive files, because I was thinking that the MSVC linker wouldn't touch files in archive files. When we pass an object file to link.exe, all symbols have been resolved already, so link.exe shoulnd't need any of the files in archives. It turns out that even though link.exe doesn't need to do that, it seems to try to read each file in all archives. And if there's a non- COFF file in an archive, it exists with an error message. So we need to remove archives from the command line too. llvm-svn: 297191
* [AArch64] Vulcan is now ThunderXT99Joel Jones2017-03-0710-201/+213
| | | | | | | | | | | | | | | | | Broadcom Vulcan is now Cavium ThunderX2T99. LLVM Bugzilla: http://bugs.llvm.org/show_bug.cgi?id=32113 Minor fixes for the alignments of loops and functions for ThunderX T81/T83/T88 (better performance). Patch was tested with SpecCPU2006. Patch by Stefan Teleman Differential Revision: https://reviews.llvm.org/D30510 llvm-svn: 297190
* fix test to not check optimized IR; NFCISanjay Patel2017-03-071-1966/+2536
| | | | | | | | | | | | This test broke with an LLVM instcombine patch (r297166). I changed the RUN line to only run -mem2reg (to save time checking this large chunk of tests) and updated the checks using the script attached to D17999: https://reviews.llvm.org/D17999 The goal is to make this test immune to optimizer changes. If there's something in these tests that was checking for an IR optimization, that should be tested in LLVM, not Clang. llvm-svn: 297189
* Revert r297177: Change LLT constructor string into an LLT-based object ...Daniel Sanders2017-03-0712-330/+267
| | | | | | | | | | More module problems. This time it only showed up in the stage 2 compile of clang-x86_64-linux-selfhost-modules-2 but not the stage 1 compile. Somehow, this change causes the build to need Attributes.gen before it's been generated. llvm-svn: 297188
* [analyzer] Fix crashes in CastToStruct checker for undefined structsDaniel Marjamaki2017-03-072-0/+18
| | | | | | | | This crash was reported in https://bugs.llvm.org//show_bug.cgi?id=31173 Differential Revision: https://reviews.llvm.org/D28297 llvm-svn: 297187
* [JumpThread] Simplify CmpInst-as-Condition branch-folding a bit.Xin Tong2017-03-071-4/+11
| | | | | | | | | | | | | | Summary: Simplify CmpInst-as-Condition branch-folding a bit. Reviewers: sanjoy, efriedma Reviewed By: efriedma Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30429 llvm-svn: 297186
* [cmake] Include openmp with add_llvm_external_projectPirama Arumuga Nainar2017-03-071-1/+3
| | | | | | | | | | | | | | | | Summary: Include projects/openmp into the build using add_llvm_external_project instead of add_subdirectory. This creates an option LLVM_TOOL_OPENMP_BUILD that selects whether this project gets included in an in-tree build. Reviewers: beanz, AndreyChurbanov, jlpeyton Subscribers: srhines, openmp-commits, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D30470 llvm-svn: 297185
* [PowerPC] mark xray test as unsupported on powerpcle in testsuiteBill Seurer2017-03-071-0/+2
| | | | | | | | | Temporarily mark the test as unsupported so the powerpc le buildbot testers can get back to work. There was a brief discussion of this on the mailing list for r296998. llvm-svn: 297184
* [ObjectYAML] Add support for DWARF5 Unit headerChris Bieneman2017-03-075-2/+606
| | | | | | In DWARF5 the Unit header added a new field, UnitType, and swapped the order of the address size and abbreviation offset fields. llvm-svn: 297183
* Add unit tests for changes to SmallPtrSet and PointerLikeTypeTraitsDaniel Berlin2017-03-071-0/+33
| | | | llvm-svn: 297182
* Add PointerLikeTypeTraits for const things, as long as there is one for the ↵Daniel Berlin2017-03-071-0/+14
| | | | | | non-const version. Clang and other users have a number of types they use as pointers, and this avoids having to define both const and non-const versions of PointerLikeTraits. llvm-svn: 297181
* Make SmallPtrSet count and find able to take const PtrType'sDaniel Berlin2017-03-071-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: For our set/map types, count/find normally take const references. This works well for non-pointer types, but can suck for pointer types. DenseSet<int *> foo; const int *b = nullptr; foo.count(b) does not work but the equivalent reference version does work (patch to fix DenseSet/DenseMap coming up) For SmallPtrSet, you have no such option. The following will not work right now: SmallPtrSet<int *> foo; const int *b = nullptr; foo.count(b); This makes const correctness hard in some cases. Example: SmallPtrSet<Instruction *> InstructionsToErase; You can't make this SmallPtrSet<const Instruction *> because then you can't erase the instruction. If I want to see if something is in the set, I may only have a const Instruction *. Given that count and find are non-mutating, this should just work. The places in our code base that do this resort to const_cast :(. This patch makes count and find able to be used with const Instruction * in the above SmallPtrSet examples. This is a bit annoying because of where C++ applies the const, so we have to remove the pointer type from the passed-in-type and rebuild it with const. Reviewers: dblaikie Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30608 llvm-svn: 297180
* [LV] Consider users that are memory accesses in uniforms expansion stepMatthew Simpson2017-03-072-1/+53
| | | | | | | | | | | When expanding the set of uniform instructions beyond the seed instructions (e.g., consecutive pointers), we mark a new instruction uniform if all its loop-varying users are uniform. We should also allow users that are consecutive or interleaved memory accesses. This fixes cases where we have an instruction that is used as the pointer operand of a consecutive access but also used by a non-memory instruction that later becomes uniform as part of the expansion. llvm-svn: 297179
* [X86] Add option to specify preferable loop alignmentSanjoy Das2017-03-071-1/+9
| | | | | | | | | | | | | | | | | | | | | Summary: Loop alignment can cause a significant change of the perfromance for short loops. To be able to evaluate the impact of loop alignment this change introduces the new option x86-experimental-pref-loop-alignment. The alignment will be 2^Value bytes, the default value is 4. Patch by Serguei Katkov! Reviewers: craig.topper Reviewed By: craig.topper Subscribers: sanjoy, llvm-commits Differential Revision: https://reviews.llvm.org/D30391 llvm-svn: 297178
* [globalisel] Change LLT constructor string into an LLT-based object that ↵Daniel Sanders2017-03-0712-267/+330
| | | | | | | | | | | | | | | | | | knows how to generate it. Summary: This will allow future patches to inspect the details of the LLT. The implementation is now split between the Support and CodeGen libraries to allow TableGen to use this class without introducing layering concerns. Thanks to Ahmed Bougacha for finding a reasonable way to avoid the layering issue and providing the version of this patch without that problem. Reviewers: t.p.northover, qcolombet, rovka, aditya_nandakumar, ab, javed.absar Subscribers: arsenm, nhaehnle, mgorny, dberris, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D30046 llvm-svn: 297177
* Further reduce testcaseAdrian Prantl2017-03-071-46/+34
| | | | llvm-svn: 297176
* Tidy up the way we include EHHeaderParser.hpp.Ed Schouten2017-03-071-4/+1
| | | | | | | Other source files in the source tree tend to include this header file unconditionally. It also parses perfectly fine on ARM EHABI systems. llvm-svn: 297175
* Improve readability and correctness of the OS specific libunwind bits.Ed Schouten2017-03-071-26/+25
| | | | | | | | | | | | | | | | | | | | | | | All of the access to __exidx_*, dl_iterate_phdr(), etc. is specific to the findUnwindSections() function. Right now all of the includes and declarations related to them are scattered throughout the source file. For example, for <link.h>, we have a full list of operating systems guarding the #include, even though the code that uses dl_iterate_phdr() miraculously doesn't use the same list. Change the code so that findUnwindSections() is preceded by a block of #ifdefs that share the same structure as the function itself. First comes all of the macOS specific bits, followed by bare-metal ARM, followed by ELF EHABI + DWARF. This actually allows us to build a copy of libunwind without any specific ifdefs for NetBSD, CloudABI, etc. It likely also unbreaks the build of libunwind on FreeBSD/armv6, though I can't confirm. Reviewed by: compnerd Differential Revision: https://reviews.llvm.org/D30696 llvm-svn: 297174
* Fix test and add missing return for llvm-lto2 error caseTeresa Johnson2017-03-072-1/+4
| | | | | | | | | | | | | | | | | Summary: This test was missing the target triple. Once I fixed that, the case with the invalid character error stopped returning 1 from llvm-lto2 and the test reported a failure. Fixed by adding the missing return from llvm-lto2. Apparently we were failing when we eventually tried to get the target. Reviewers: pcc Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D30585 llvm-svn: 297173
* [GlobalISel] Translate floating-point negationVolkan Keles2017-03-075-3/+41
| | | | | | | | | | | | Reviewers: qcolombet, javed.absar, aditya_nandakumar, dsanders, t.p.northover, ab Reviewed By: qcolombet Subscribers: dberris, rovka, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D30671 llvm-svn: 297171
* Update comment in testcaseAdrian Prantl2017-03-071-1/+2
| | | | llvm-svn: 297170
* Update isl to isl-0.18-336-g1e193d9Tobias Grosser2017-03-0714-601/+36
| | | | | | This is a regular maintenance update llvm-svn: 297169
* Rephrase condition for better readability. NFCAdrian Prantl2017-03-071-1/+1
| | | | llvm-svn: 297168
* [fs] Make sure to check S_ISLNK() in fillStatus.Zachary Turner2017-03-071-0/+2
| | | | llvm-svn: 297167
OpenPOWER on IntegriCloud