summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* clang-format: Support formatting Java 8 interface default methods.Nico Weber2018-01-232-3/+19
| | | | llvm-svn: 323218
* [PowerPC][asan] Fix asan tests to handle changed memory layoutsBill Seurer2018-01-231-5/+13
| | | | | | | | | | In more recent Linux kernels with 47 bit VMAs the layout of virtual memory for powerpc64 changed causing the address sanitizer to not work properly. This patch fixes up a test case that was found to fail on some newer Fedora releases that use different address ranges. ref: https://reviews.llvm.org/D40907 llvm-svn: 323217
* Verifier: fix bug treating debug info issue as non-debug info issueYaxun Liu2018-01-232-3/+3
| | | | | | | | | | | | | | | Normally when llvm-as sees only debug info errors in LLVM assembly, it simply drops the debug info and outputs a valid LLVM bitcode and returns 0. There is a bug in LLVM verifier which incorrectly treats a debug info error as non-debug info error, which causes llvm-as returns 1 even though llvm-as can drop the invalid debug info and outputs a valid LLVM bitcode. This patch fixes that. Differential Revision: https://reviews.llvm.org/D42391 llvm-svn: 323216
* [x86] Reautogenerate a bunch of tests for D42287. NFCAlexander Ivchenko2018-01-236-257/+273
| | | | llvm-svn: 323215
* CodeGen: Fix assertion in ScheduleDAGMILive::scheduleMI due to llvm.dbg.valueYaxun Liu2018-01-232-0/+437
| | | | | | | | | | Fix a bug in ScheduleDAGMILive::scheduleMI which causes BotRPTracker not tracking CurrentBottom in some rare cases involving llvm.dbg.value. This issues causes amdgcn target to assert when compiling some user codes with -g. Differential Revision: https://reviews.llvm.org/D42394 llvm-svn: 323214
* [X86] Rewrite vXi1 element insertion by using a vXi1 scalar_to_vector and ↵Craig Topper2018-01-237-619/+519
| | | | | | | | | | inserting into a vXi1 vector. The existing code was already doing something very similar to subvector insertion so this allows us to remove the nearly duplicate code. This patch is a little larger than it should be due to differences between the DQI handling between the two today. llvm-svn: 323212
* [X86][SSE] LowerBUILD_VECTORAsVariablePermute - ensure that the source ↵Simon Pilgrim2018-01-232-1/+253
| | | | | | | | vector is not larger than the destination We might be able to support this in the future with VPERMV3, OR(PSHUFB, PSHUFB) etc. llvm-svn: 323210
* [x86] Mostly reautogenerate a bunch of tests that affect D37775. NFCAlexander Ivchenko2018-01-2317-1418/+2140
| | | | | | | | | | | | | | | | | Tests required minor manual tweaks: CodeGen/MIR/X86/generic-instr-type.mir CodeGen/X86/GlobalISel/select-copy.mir CodeGen/X86/GlobalISel/select-ext.mir CodeGen/X86/GlobalISel/select-intrinsic-x86-flags-read-u32.mir CodeGen/X86/GlobalISel/select-phi.mir CodeGen/X86/GlobalISel/select-trunc.mir CodeGen/X86/GlobalISel/select-frameIndex.mir And following tests are split into 32/64 versions: CodeGen/X86/GlobalISel/legalize-GV.mir CodeGen/X86/GlobalISel/select-frameIndex.mir llvm-svn: 323209
* [clang-tidy] Handle bitfields in modernize-use-default-member-init if using ↵Malcolm Parsons2018-01-232-1/+13
| | | | | | | | | | | | | | | | | | C++2a Summary: C++2a allows bitfields to have default member initializers. Add support for this to clang-tidy's modernize-use-default-member-init check. Reviewers: aaron.ballman, alexfh Reviewed By: aaron.ballman Subscribers: klimek, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D42413 llvm-svn: 323208
* Use EVT::changeVectorElementTypeToInteger() to convert index type to integerSimon Pilgrim2018-01-231-4/+4
| | | | llvm-svn: 323207
* [X86][SSE] LowerBUILD_VECTORAsVariablePermute - ensure that the index vector ↵Simon Pilgrim2018-01-232-0/+115
| | | | | | has the correct number of elements llvm-svn: 323206
* AArch64: get type from correct result when forming BFXTim Northover2018-01-232-1/+18
| | | | | | | Some nodes produce multiple values so when obtaining the type of an ISD::OR we need to make sure we ask for the correct one. Hopefully that's all of them. llvm-svn: 323205
* [clangd] Simplify code handling compile commandsIlya Biryukov2018-01-236-146/+102
| | | | | | | | | | | | | | | | Summary: CppFile can now change compilation arguments during rebuild. This allows simplifying code that manages CppFiles. Reviewers: sammccall, bkramer, jkorous-apple Reviewed By: sammccall Subscribers: ioeric, jkorous-apple, klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D42173 llvm-svn: 323204
* Accept iso date format in COFF/unchanged-importlib.testHans Wennborg2018-01-231-1/+1
| | | | llvm-svn: 323203
* AArch64: get type from correct result when forming BFI/BFMTim Northover2018-01-232-1/+18
| | | | | | | Some nodes produce multiple values so when obtaining the type of an ISD::OR we need to make sure we ask for the correct one. llvm-svn: 323202
* [X86] Legalize v32i1 without BWI via splitting to v16i1 rather than the ↵Craig Topper2018-01-2316-16698/+3363
| | | | | | | | | | | | | | | | | | | | | | | | | default of promoting to v32i8. Summary: For the most part its better to keep v32i1 as a mask type of a narrower width than trying to promote it to a ymm register. I had to add some overrides to the methods that get the types for the calling convention so that we still use v32i8 for argument/return purposes. There are still some regressions in here. I definitely saw some around shuffles. I think we probably should move vXi1 shuffle from lowering to a DAG combine where I think the extend and truncate we have to emit would be better combined. I think we also need a DAG combine to remove trunc from (extract_vector_elt (trunc)) Overall this removes something like 13000 CHECK lines from lit tests. Reviewers: zvi, RKSimon, delena, spatel Reviewed By: RKSimon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D42031 llvm-svn: 323201
* [X86] Add missing MOVSX/MOVZX instructions to load folding tables.Craig Topper2018-01-231-0/+3
| | | | | | | | I'm not sure there's any way to generate these folding cases especially the movzx ones since even the register form is never emitted by codegen. I'm just adding them to remove the difference with the autogenerated version of the folding table. llvm-svn: 323200
* Fix Driver/solaris-ld.c test on WindowsFedor Sergeev2018-01-231-0/+5
| | | | | | Fixing failure introduced with r323193. llvm-svn: 323199
* llvm-objdump: prevent out of bounds accesses during unwind dumping.Tim Northover2018-01-231-57/+80
| | | | | | | | | | | | We were a bit too trusting about the offsets encoded in MachO compact unwind sections, so this passes every access through a bounds check just in case. It prevents a few segfaults on malformed object files, if one should ever come along. Mostly to silence fuzzers in the vague hope they might be able to produce something useful without the noise. llvm-svn: 323198
* Fix memory leaks in GoParserRaphael Isemann2018-01-231-1/+5
| | | | | | | | | | | | | | Summary: The GoParser is leaking memory in the tests due to not freeing allocated nodes when encountering some parsing errors. With this patch all GoParser tests are passing with enabled memory sanitizers/ubsan. Reviewers: labath, davide Reviewed By: labath Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D42409 llvm-svn: 323197
* [clang-tidy] Add -vfsoverlay flagIlya Biryukov2018-01-236-9/+74
| | | | | | | | | | | | | | | | | | | | | Summary: It allows to remap and override files and directories on disk when running clang-tidy. The intended use case for the flag is running standalone clang-tidy binary for IDE and editor integration. Patch by Vladimir Plyashkun. Reviewers: alexfh, benlangmuir, ilya-biryukov Reviewed By: ilya-biryukov Subscribers: ilya-biryukov, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D41535 llvm-svn: 323196
* [Tooling] Added a VFS parameter to ClangToolIlya Biryukov2018-01-233-3/+26
| | | | | | | | | | | | | | | | | | Summary: The parameter overrides the underlying vfs used by ClangTool for filesystem operations. Patch by Vladimir Plyashkun. Reviewers: alexfh, ilya-biryukov Reviewed By: ilya-biryukov Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D41947 llvm-svn: 323195
* [Solaris] Make RHEL devtoolsets handling Linux-specificFedor Sergeev2018-01-231-6/+3
| | | | | | | | | | | | | | | | | | | | | Summary: This patch is meant to address the last outstanding review comment on the already approved (but not yet commited) https://reviews.llvm.org/D35755, namely making the handling of the RHEL devtoolsets Linux-specific. Don't know if it's best integrated into the former or applied subsequently. Tested on i386-pc-solaris2.11 and x86_64-pc-linux-gnu. Reviewers: fedor.sergeev, tstellar, jyknight Reviewed By: fedor.sergeev Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D42029 llvm-svn: 323194
* [Solaris] gcc toolchain handling revampFedor Sergeev2018-01-2339-189/+382
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: General idea is to utilize generic (mostly Generic_GCC) code and get rid of Solaris-specific handling as much as possible. In particular: - scanLibDirForGCCTripleSolaris was removed, relying on generic CollectLibDirsAndTriples - findBiarchMultilibs is now properly utilized to switch between m32 and m64 include & lib paths on Solaris - C system include handling copied from Linux (bar multilib hacks) Fixes PR24606. Reviewers: dlj, rafael, jyknight, theraven, tstellar Reviewed By: jyknight Subscribers: aaron.ballman, mgorny, krytarowski, ro, joerg, cfe-commits Differential Revision: https://reviews.llvm.org/D35755 llvm-svn: 323193
* [CGP] Fix the GV handling in complex addressing modeSerguei Katkov2018-01-232-15/+36
| | | | | | | | | | | | | | | If in complex addressing mode the difference is in GV then base reg should not be installed because we plan to use base reg as a merge point of different GVs. This is a fix for PR35980. Reviewers: reames, john.brawn, santosh Reviewed By: john.brawn Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D42230 llvm-svn: 323192
* [clang-tidy] Don't generate fixes for invalid new expr location in ↵Haojian Wu2018-01-232-0/+13
| | | | | | | | | | | | | | modernize-make-unique. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: klimek, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D42363 llvm-svn: 323191
* [X86][SSE] LowerBUILD_VECTORAsVariablePermute - fix PSHUFB source/index ↵Simon Pilgrim2018-01-232-5/+5
| | | | | | | | | | operand ordering As detailed in rL317463, PSHUFB (like most variable shuffle instructions) uses Op[0] for the source vector and Op[1] for the shuffle index vector, VPERMV works in reverse which is probably where the confusion comes from. Differential Revision: https://reviews.llvm.org/D42380 llvm-svn: 323190
* [clangd] Use accessible scopes to query indexes for global code completion.Haojian Wu2018-01-232-42/+213
| | | | | | | | | | | | | | | | | | | Summary: * For qualified completion (foo::a^) * unresolved qualifier - use global namespace ("::") * resolved qualifier - use all accessible namespaces inside the resolved qualifier. * For unqualified completion (vec^), use scopes that are accessible from the scope from which code completion occurs. Reviewers: sammccall, ilya-biryukov Reviewed By: sammccall Subscribers: jkorous-apple, ioeric, klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D42073 llvm-svn: 323189
* [clang-format] Ignore UnbreakableTailLength sometimes during breakingKrasimir Georgiev2018-01-234-7/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch fixes an issue where the UnbreakableTailLength would be counted towards the length of a token during breaking, even though we can break after the token. For example, this proto text with column limit 20 ``` # ColumnLimit: 20 V foo: { bar: { bazoo: "aaaaaaa" } } ``` was broken: ``` # ColumnLimit: 20 V foo: { bar: { bazoo: "aaaaaaa" } } ``` because the 2 closing `}` were counted towards the string literal's `UnbreakableTailLength`. Reviewers: djasper Reviewed By: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D42376 llvm-svn: 323188
* [Analysis] Disable exp/exp2/pow finite lib calls on Android with -ffast-math.MinSeong Kim2018-01-232-0/+38
| | | | | | | | | | | | | | | | | | | Summary: Since r322087, glibc's finite lib calls are generated when possible. However, glibc is not supported on Android. Therefore this change enables llvm to finely distinguish between linux and Android for unsupported library calls. The change also include some regression tests. Reviewers: srhines, pirama Reviewed By: srhines Subscribers: kongyi, chh, javed.absar, llvm-commits Differential Revision: https://reviews.llvm.org/D42288 llvm-svn: 323187
* [ARM] Pass _Float16 as int or floatSjoerd Meijer2018-01-233-8/+41
| | | | | | | | | | | | Pass and return _Float16 as if it were an int or float for ARM, but with the top 16 bits unspecified, similarly like we already do for __fp16. We will implement proper half-precision function argument lowering in the ARM backend soon, but want to use this workaround in the mean time. Differential Revision: https://reviews.llvm.org/D42318 llvm-svn: 323185
* [mips] Properly select abs and sqrt instructionsStefan Maksimovic2018-01-2329-56/+266
| | | | | | | | | | | | | - Alter abs for micromips to have both AFGR64 and FGR64 variants, same as sqrt - Remove sqrt and abs from MicroMips32r6InstrInfo.td, use micromips FGR64 variants - Restrict non-micromips abs/sqrt with NotInMicroMips predicate Differential revision: https://reviews.llvm.org/D41439 llvm-svn: 323184
* This change add's optimization remark in LoopVersioning LICM pass.Ashutosh Nema2018-01-233-2/+60
| | | | | | | | | | | | | Summary: This patch is adding remark messages to the LoopVersioning LICM pass, which will be useful for optimization remark emitter (ORE) infrastructure. Patch by: Deepak Porwal Reviewers: anemet, ashutosh.nema, eastig Subscribers: eastig, vivekvpandya, fhahn, llvm-commits llvm-svn: 323183
* [InstSimplify] (X << Y) % X -> 0Anton Bikineev2018-01-232-12/+11
| | | | llvm-svn: 323182
* Prevent unaligned memory read in parseMinidumpStringRaphael Isemann2018-01-231-5/+10
| | | | | | | | | | | | | | | | | | | Summary: It's possible to hit an unaligned memory read when reading `source_length` as the `data` array is only aligned with 2 bytes (it's actually a UTF16 array). This patch memcpy's `source_length` into a local variable to prevent this: ``` MinidumpTypes.cpp:49:23: runtime error: load of misaligned address 0x7f0f4792692a for type 'const uint32_t' (aka 'const unsigned int'), which requires 4 byte alignment ``` Reviewers: dvlahovski, zturner, davide Reviewed By: davide Subscribers: davide, lldb-commits Differential Revision: https://reviews.llvm.org/D42348 llvm-svn: 323181
* Fix name of 'macOS' and add asteriks to brands, NFC.Jonas Hahnfeld2018-01-231-1/+1
| | | | llvm-svn: 323180
* update_mir_test_checks: Improve the check for LLVM IR in MIR filesJustin Bogner2018-01-231-1/+1
| | | | | | | | | The LLVM IR section of a MIR document can start with "--- |" rather than just "---", because "|" is a sigil for a freeform document in YAML. We need to handle this so that we don't try to add check lines to the LLVM IR functions in a MIR file. llvm-svn: 323178
* [NFC] fix trivial typos in commentsHiroshi Inoue2018-01-234-4/+4
| | | | | | "the the" -> "the" llvm-svn: 323177
* [NFC] fix trivial typos in commentsHiroshi Inoue2018-01-2317-21/+21
| | | | | | "the the" -> "the" llvm-svn: 323176
* [X86] Don't reorder (srl (and X, C1), C2) if (and X, C1) can be matched as a ↵Craig Topper2018-01-234-1058/+1044
| | | | | | | | | | | | | | | | | | | movzx Summary: If we can match as a zero extend there's no need to flip the order to get an encoding benefit. As movzx is 3 bytes with independent source/dest registers. The shortest 'and' we could make is also 3 bytes unless we get lucky in the register allocator and its on AL/AX/EAX which have a 2 byte encoding. This patch was more impressive before r322957 went in. It removed some of the same Ands that got deleted by that patch. Reviewers: spatel, RKSimon Reviewed By: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D42313 llvm-svn: 323175
* [X86] Remove 'NOREX' comment from the printing of _NOREX instructions.Craig Topper2018-01-2311-57/+57
| | | | | | Some of the NOREX instructions are used in 32-bit mode making this printing confusing. It also doesn't provide a lot of value since you can see the h-register being used by the instruction. llvm-svn: 323174
* [X86] Various vXi1 insertion improvements.Craig Topper2018-01-233-17/+27
| | | | | | Add missing patterns for inserting v1i1 into a zero vector. Use insert_subvector to zero upper bits before inserting an element into a vXi1 vector. Replace kshift based isel pattern with insert_subvector based pattern now that code that caused the pattern has been fixed to emit insert_subvector. llvm-svn: 323173
* Use 4 as the alignment of .eh_frame_hdr.Rafael Espindola2018-01-232-3/+3
| | | | | | It includes 32 bit values and this matches both gold and bfd. llvm-svn: 323172
* [cmake] Always respect existing CMAKE_REQUIRED_FLAGS when adding additional ↵Don Hinton2018-01-231-1/+1
| | | | | | | | ones. * Previously part of https://reviews.llvm.org/D41622. llvm-svn: 323171
* libcxx: Provide overloads for basic_filebuf::open() et al that take wchar_t* ↵Peter Collingbourne2018-01-2311-0/+500
| | | | | | | | | | | | filenames on Windows. This is an MSVC standard library extension. It seems like a reasonable enough extension to me because wchar_t* is the native format for filenames on that platform. Differential Revision: https://reviews.llvm.org/D42225 llvm-svn: 323170
* libcxx: Move Windows threading support into a .cpp file.Peter Collingbourne2018-01-232-266/+307
| | | | | | | | | This allows us to avoid polluting the namespace of users of <thread> with the definitions in windows.h. Differential Revision: https://reviews.llvm.org/D42214 llvm-svn: 323169
* [WebAssembly] Update to match llvm changes to TABLE relocationsSam Clegg2018-01-239-71/+80
| | | | | | | | | | | | | TABLE relocations now store the function that is being refered to indirectly. See rL323165. Also extend the call-indirect.ll a little. Based on a patch by Nicholas Wilson! llvm-svn: 323168
* NewPM: Improve/fix GCOV - which needs to run early in the pass pipeline.David Blaikie2018-01-232-3/+13
| | | | | | | Using a new extension point in the new PM, register GCOV at the start of the pipeline rather than the end. llvm-svn: 323167
* NewPM: Add an extension point for the start of the pipeline.David Blaikie2018-01-235-4/+47
| | | | | | | | | | This applies to most pipelines except the LTO and ThinLTO backend actions - it is for use at the beginning of the overall pipeline. This extension point will be used to add the GCOV pass when enabled in Clang. llvm-svn: 323166
* [WebAssembly] Store function index rather than table index in TABLE_INDEX ↵Sam Clegg2018-01-235-64/+58
| | | | | | | | | | | | | | | | | | | | | relocations Relocations of type R_WEBASSEMBLY_TABLE_INDEX represent places where the table index for a given function is needed. While the value stored in this location is a table index, the index in the relocation entry itself is a function index (the index of the function which is to be called indirectly). This is how is was spec'd originally but the LLVM implementation didn't do this. This makes things a little simpler in the linker since the table in the input file can essentially be ignored that the output table can be created purely based on these relocations. Patch by Nicholas Wilson! Differential Revision: https://reviews.llvm.org/D42080 llvm-svn: 323165
OpenPOWER on IntegriCloud