summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [OpenCL] Add "cles_khr_int64" extension.Alexey Bader2018-01-262-0/+12
| | | | | | | | | | | | | | | | | | | Summary: For OpenCL 1.1 embedded profile 64 bit integers i.e. long, ulong including the appropriate vector data types and operations on 64-bit integers are optional. The "cles_khr_int64" extension string will be reported if the embedded profile implementation supports 64-bit integers. Reviewers: Anastasia, bader Reviewed By: Anastasia, bader Subscribers: bader, yaxunl, Anastasia, cfe-commits Differential Revision: https://reviews.llvm.org/D42532 llvm-svn: 323522
* [MIR] Add support for addrspace in MIRFrancis Visoiu Mistrih2018-01-269-9/+60
| | | | | | | | | | Add support for printing / parsing the addrspace of a MachineMemOperand. Fixes PR35970. Differential Revision: https://reviews.llvm.org/D42502 llvm-svn: 323521
* Fix linux fallout from c++ gmodules enablePavel Labath2018-01-262-2/+5
| | | | | | | | | | | TestLibcxxListLoop - fails because the evil "define private public" trick does not work with gmodules. The purpose of the test is not to test debug info parsing so I just mark it as no_debug_info_testcase. In the long term it may be interesting to write a mock std::list which will allow us to test bad inputs to data formatters more easily. TestGModules - seems to be a genuine bug. Filed pr36107 and xfailed. llvm-svn: 323520
* [ASTImporter] Support LambdaExprs and improve template supportAleksei Sidorin2018-01-2613-87/+435
| | | | | | | | | | | | | | Also, a number of style and bug fixes was done: * ASTImporterTest: added sanity check for source node * ExternalASTMerger: better lookup for template specializations * ASTImporter: don't add templated declarations into DeclContext * ASTImporter: introduce a helper, ImportTemplateArgumentListInfo getting SourceLocations * ASTImporter: proper set ParmVarDecls for imported FunctionProtoTypeLoc Differential Revision: https://reviews.llvm.org/D42301 llvm-svn: 323519
* [clangd] Fix GCC build break 'declaration changes meaning'Sam McCall2018-01-261-4/+4
| | | | llvm-svn: 323518
* [Tooling] Test more APIs of ToolExecutor. NFC.Eric Liu2018-01-261-3/+8
| | | | llvm-svn: 323517
* [AMDGPU] fix LDS f32 intrinsicsDaniil Fukalov2018-01-265-45/+48
| | | | | | | | | | | | - using qualified pointer addrspace in intrinsics class to avoid .f32 mangling - changed too common atomic mangling to ds - added missing intrinsics to AMDGPUTTIImpl::getTgtMemIntrinsic Reviewed by: b-sumner Differential Revision: https://reviews.llvm.org/D42383 llvm-svn: 323516
* [CallSiteSplitting] Fix infinite loop when recording conditions.Florian Hahn2018-01-262-1/+26
| | | | | | | | | Fix infinite loop when recording conditions by correctly marking basic blocks as visited. Fixes https://bugs.llvm.org/show_bug.cgi?id=36105 llvm-svn: 323515
* [ARM] Accept a subset of Thumb GPR register class when emitting an SP-relativeMomchil Velikov2018-01-262-2/+27
| | | | | | | | | | | | | load instruction The function `Thumb1InstrInfo::loadRegFromStackSlot` accepts only the `tGPR` register class. The function serves to emit a `tLDRspi` instruction and certainly any subset of the `tGPR` register class is a valid destination of the load. Differential revision: https://reviews.llvm.org/D42535 llvm-svn: 323514
* [X86FixupBWInsts] Prefer positive checks in the test. NFCAndrei Elovikov2018-01-261-1/+1
| | | | | | | | | | | | Reviewers: andrew.w.kaylor, craig.topper, MatzeB Reviewed By: andrew.w.kaylor Subscribers: aivchenk, llvm-commits Differential Revision: https://reviews.llvm.org/D42531 llvm-svn: 323513
* [ARM] Armv8.2-A FP16 code generation (part 1/3)Sjoerd Meijer2018-01-2611-29/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the groundwork for Armv8.2-A FP16 code generation . Clang passes and returns _Float16 values as floats, together with the required bitconverts and truncs etc. to implement correct AAPCS behaviour, see D42318. We will implement half-precision argument passing/returning lowering in the ARM backend soon, but for now this means that this: _Float16 sub(_Float16 a, _Float16 b) { return a + b; } gets lowered to this: define float @sub(float %a.coerce, float %b.coerce) { entry: %0 = bitcast float %a.coerce to i32 %tmp.0.extract.trunc = trunc i32 %0 to i16 %1 = bitcast i16 %tmp.0.extract.trunc to half <SNIP> %add = fadd half %1, %3 <SNIP> } When FullFP16 is *not* supported, we don't make f16 a legal type, and we get legalization for "free", i.e. nothing changes and everything works as before. And also f16 argument passing/returning is handled. When FullFP16 is supported, we do make f16 a legal type, and have 2 places that we need to patch up: f16 argument passing and returning, which involves minor tweaks to avoid unnecessary code generation for some bitcasts. As a "demonstrator" that this works for the different FP16, FullFP16, softfp modes, etc., I've added match rules to the VSUB instruction description showing that we can codegen this instruction from IR, but more importantly, also to some conversion instructions. These conversions were causing issue before in the FP16 and FullFP16 cases. I've also added match rules to the VLDRH and VSTRH desriptions, so that we can actually compile the entire half-precision sub code example above. This showed that these loads and stores had the wrong addressing mode specified: AddrMode5 instead of AddrMode5FP16, which turned out not be implemented at all, so that has also been added. This is the minimal patch that shows all the different moving parts. In patch 2/3 I will add some efficient lowering of bitcasts, and in 2/3 I will add the remaining Armv8.2-A FP16 instruction descriptions. Thanks to Sam Parker and Oliver Stannard for their help and reviews! Differential Revision: https://reviews.llvm.org/D38315 llvm-svn: 323512
* [clangd] Modify the Span API so that Spans propagate with contexts.Sam McCall2018-01-266-68/+102
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This is probably the right behavior for distributed tracers, and makes unpaired begin-end events impossible without requiring Spans to be bound to a thread. The API is conceptually clean but syntactically awkward. As discussed offline, this is basically a naming problem and will go away if (when) we use TLS to store the current context. The apparently-unrelated change to onScopeExit are because its move semantics broken if Func is POD-like since r322838. This is true of function pointers, and the lambda I use here that captures two pointers only. I've raised this issue on llvm-dev and will revert this part if we fix it in some other way. Reviewers: ilya-biryukov Subscribers: klimek, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D42499 llvm-svn: 323511
* [NFC] fix trivial typos in comments and documentsHiroshi Inoue2018-01-261-1/+1
| | | | | | "in in" -> "in", "on on" -> "on" etc. llvm-svn: 323510
* [NFC] fix trivial typos in comments and documentsHiroshi Inoue2018-01-269-9/+9
| | | | | | "in in" -> "in", "on on" -> "on" etc. llvm-svn: 323509
* [NFC] fix trivial typos in comments and documentsHiroshi Inoue2018-01-2623-24/+24
| | | | | | "in in" -> "in", "on on" -> "on" etc. llvm-svn: 323508
* [RISCV] Encode RISCV specific ELF e_flags to RISCV Binary by RISCVTargetStreamerShiva Chen2018-01-267-0/+130
| | | | llvm-svn: 323507
* [X86] Remove dead code from LowerBUILD_VECTOR that tried to handle i64 ↵Craig Topper2018-01-261-21/+0
| | | | | | | | element type in 32-bit mode. Type legalization would prevent any i64 operands to the build_vector from existing before we get here. The coverage bots show this code as uncovered. llvm-svn: 323506
* [SelectionDAG] Replace a std::vector<SDValue> with a SmallVector.Craig Topper2018-01-261-1/+1
| | | | | | It likely the number of elements in the type we're legalizing here is reasonably small. llvm-svn: 323505
* [X86] Remove code from combineBitcastvxi1 that was needed to support the ↵Craig Topper2018-01-261-47/+0
| | | | | | | | previous native IR for kunpck intrinsics. The original autoupgrade for kunpck intrinsics used a bitcasted scalar shift, or, and. This combine would turn this into a concat_vectors. Now the kunpck intrinsics are autoupgraded to a vector shuffle that will become a concat_vectors. llvm-svn: 323504
* [X86] Remove unused intrinsic type handling. NFCCraig Topper2018-01-262-28/+2
| | | | llvm-svn: 323503
* [X86] Simplify condition in VSETCC. NFCCraig Topper2018-01-261-2/+1
| | | | | | This listed all legal 128-bit integer types individually, but since we already know we have a legal type and its integer, we can just check is128BitVector. llvm-svn: 323502
* [X86] Remove LowerVSETCC code for handling vXi1 setcc with vXi8/vXi16 input ↵Craig Topper2018-01-261-6/+3
| | | | | | | | type. NFC These kinds of setccs are promoted by a DAG combine before they ever get to legalization. llvm-svn: 323501
* [X86] Remove some dead code from LowerVSETCC. NFCCraig Topper2018-01-261-13/+0
| | | | | | This code was added in r321967, but ultimately I fixed the issue in the legalizer and this code was no longer required. llvm-svn: 323500
* Don't enable _LIBUNWIND_BUILD_ZERO_COST_APIS if building the SJLJ APIsMartin Storsjo2018-01-261-0/+2
| | | | | | | | | | | | Otherwise, a shared library build with SJLJ APIs enabled would end up with duplicate symbols. This didn't occur for the apple && arm case due to specifically checking for that in the surrounding ifdef. Differential Revision: https://reviews.llvm.org/D42555 llvm-svn: 323499
* [CGP] Re-enable Select in complex addressing mode.Serguei Katkov2018-01-262-2/+2
| | | | | | Switch Select handling on after fixing two bugs: rL323192 and rL323497. llvm-svn: 323498
* [X86] Fix killed flag handling in X86FixupLea passSerguei Katkov2018-01-263-3/+4
| | | | | | | | | | | | | | | | When pass creates a MOV instruction for lea (%base,%index,1), %dst => mov %base,%dst; add %index,%dst modification it should clean the killed flag for base if base is equal to index. Otherwise verifier complains about usage of killed register in add instruction. Reviewers: lsaba, zvi, zansari, aaboud Reviewed By: lsaba Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D42522 llvm-svn: 323497
* [cmake] [libunwind] Call llvm_setup_rpath() when adding shared libraries.Don Hinton2018-01-261-0/+3
| | | | | | | | | Clang and llvm already use llvm_setup_rpath(), so this change will help standarize rpath usage across all projects. Differential Revision: https://reviews.llvm.org/D42461 llvm-svn: 323496
* Reland:Don Hinton2018-01-261-0/+3
| | | | | | | | | | | [cmake] [libcxxabi] Call llvm_setup_rpath() when adding shared libraries. Clang and llvm already use llvm_setup_rpath(), so this change will help standarize rpath usage across all projects. Differential Revision: https://reviews.llvm.org/D42460 llvm-svn: 323495
* Reland "[llvm-objcopy] Refactor llvm-objcopy to use reader and writer objects"Jake Ehrlich2018-01-262-11/+11
| | | | | | | Somehow I reverted changes I made in a previous Reland. This change re-relands unconfusing a varible name with a type name. llvm-svn: 323494
* Reland "[llvm-objcopy] Refactor llvm-objcopy to use reader and writer objects"Jake Ehrlich2018-01-261-4/+4
| | | | | | I had more unused varibles. This change removes those to get rid of warnings. llvm-svn: 323493
* Reland: [cmake] [libcxx] Call llvm_setup_rpath() when adding shared libraries.Don Hinton2018-01-261-0/+3
| | | | | | | | | Clang and llvm already use llvm_setup_rpath(), so this change will help standarize rpath usage across all projects. Differential Revision: https://reviews.llvm.org/D42459 llvm-svn: 323492
* libcxx: Use vcruntime declarations for typeinfo on Windows.Peter Collingbourne2018-01-263-3/+10
| | | | | | | | | | | We need to use the vcruntime declarations on Windows to avoid an ODR violation involving rtti.obj, which provides the definition of the runtime function implementing dynamic_cast and depends on the vcruntime implementations of bad_cast and bad_typeid. Differential Revision: https://reviews.llvm.org/D42220 llvm-svn: 323491
* libcxx: Move #include_next <math.h> out of header guard in wrapper header.Peter Collingbourne2018-01-262-2/+33
| | | | | | | | | | | | | | | Code on Windows expects to be able to do: #define _USE_MATH_DEFINES #include <math.h> and receive the definitions of mathematical constants, even if <math.h> has previously been included. To support this scenario, re-include <math.h> every time the wrapper header is included. Differential Revision: https://reviews.llvm.org/D42403 llvm-svn: 323490
* Reland "[llvm-objcopy] Refactor llvm-objcopy to use reader and writer objects"Jake Ehrlich2018-01-261-0/+2
| | | | | | Added line to output the proper files in the output to binary case. llvm-svn: 323489
* Rename a test file.Rui Ueyama2018-01-261-5/+5
| | | | | | | A test for option /foo is usually named foo.test, but this test file is not for the /order option, so rename it to avoid confusion. llvm-svn: 323488
* Fix buildfailure by making some MIPatternMatchers inlineAditya Nandakumar2018-01-261-2/+2
| | | | llvm-svn: 323487
* Revert "Reland "[llvm-objcopy] Refactor llvm-objcopy to use reader and ↵Jake Ehrlich2018-01-262-11/+11
| | | | | | | | | | | | writer objects"" Tests were working on my system because the old correct files were left over and the new bug was that the output files were not being output at all. Consequently the test work on my system but fail on any other system. This reverts commit r323484. llvm-svn: 323486
* [Driver] Add an -fexperimental-isel driver option to enable/disable GlobalISel.Amara Emerson2018-01-265-0/+70
| | | | | | Differential Revision: https://reviews.llvm.org/D42276 llvm-svn: 323485
* Reland "[llvm-objcopy] Refactor llvm-objcopy to use reader and writer objects"Jake Ehrlich2018-01-262-11/+11
| | | | | | I named a varible the same as a type which caused a warning. I also had unamed varibles. llvm-svn: 323484
* [CodeGen] Ignore private symbols in llvm.used for COFFShoaib Meenai2018-01-262-5/+8
| | | | | | | Similar to the existing handling for internal symbols, private symbols are also not visible to the linker and should be ignored. llvm-svn: 323483
* [Debug] LCSSA: Insert dbg.value at the first available insertion pointVedant Kumar2018-01-252-2/+7
| | | | | | | | | | | Inserting a dbg.value instruction at the start of a basic block with a landingpad instruction triggers a verifier failure. We should be OK if we insert the instruction a bit later. Speculative fix for the bot failure described here: https://reviews.llvm.org/D42551 llvm-svn: 323482
* [DWARFv5] Classify all the new forms. NFC.Paul Robinson2018-01-251-14/+25
| | | | | | | | | | Move standard forms from a switch statement to the table of forms; fill in all the missing ones defined in DWARF v5. I'm guessing at classifications in a couple of cases where v5 forms aren't actually supported yet, but whoever adds support for the forms can fix the classifications as needed. llvm-svn: 323481
* [llvm-objcopy] Refactor llvm-objcopy to use reader and writer objectsJake Ehrlich2018-01-257-438/+630
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While writing code for input and output formats in llvm-objcopy it became apparent that there was a code health problem. This change attempts to solve that problem by refactoring the code to use Reader and Writer objects that can read in different objects in different formats, convert them to a single shared internal representation, and then write them to any other representation. New classes: Reader: the base class used to construct instances of the internal representation Writer: the base class used to write out instances of the internal representation ELFBuilder: a helper class for ELFWriter that takes an ELFFile and converts it to a Object SectionVisitor: it became necessary to remove writeSection from SectionBase because, under the new Reader/Writer scheme, it's possible to convert between ELF Types such as ELF32LE and ELF32BE. This isn't possible with writeSection because it (dynamically) depends on the underlying section type *and* (statically) depends on the ELF type. Bad things would happen if the underlying sections for ELF32LE were used for writing to ELF64BE. To avoid this code smell (which would have compiled, run, and output some nonsesnse) I decoupled writing of sections from a class. SectionWriter: This is just the ELFT templated implementation of SectionVisitor. Many classes now have this class as a friend so that the writing methods in this class can write out private data. ELFWriter: This is the Writer that outputs to ELF BinaryWriter: This is the Writer that outputs to Binary ElfType: Because the ELF Type is not a part of the Object anymore we need a way to construct the correct default Writer based on properties of the Reader. This enum just keeps track of the ELF type of the input so it can be used as the default output type as well. Object has correspondingly undergone some serious changes as well. It now has more generic methods for building and manipulating ELF binaries. This interface makes ELFBuilder easy enough to use and will make the BinaryReader/Builder easy to create as well. Most changes in this diff are cosmetic and deal with the fact that a method has been moved from one class to another or a change from a pointer to a reference. Almost no changes should result in a functional difference (this is after all a refactor). One minor functional change was made and the result can be seen in remove-shstrtab-error.test. The fact that it fails hasn't changed but the error message has changed because that failure is detected at a later point in the code now (because WriteSectionHeaders is a property of the ElfWriter *not* a property of the Object). I'd say roughly 80-90% of this code is cosmetically different, 10-19% is different but functionally the same, and 1-5% is functionally different despite not causing a change in tests. Differential Revision: https://reviews.llvm.org/D42222 llvm-svn: 323480
* Mark 2903 as complete; we already do thisMarshall Clow2018-01-251-2/+2
| | | | llvm-svn: 323479
* Add testcase accidentally left out from r323460.Easwaran Raman2018-01-251-0/+35
| | | | llvm-svn: 323478
* [llvm-objcopy] Add --add-gnu-debuglinkJake Ehrlich2018-01-254-0/+104
| | | | | | | | This change adds support for --add-gnu-debuglink to llvm-objcopy Differential Revision: https://reviews.llvm.org/D41731 llvm-svn: 323477
* [DWARFv5] Support DW_FORM_line_strp in llvm-dwarfdump.Paul Robinson2018-01-2510-26/+60
| | | | | | | | | | | This form is like DW_FORM_strp, but points to .debug_line_str instead of .debug_str as the string section. It's intended to be used from the line-table header, and allows string-pooling of directory and filenames across compilation units. Differential Revision: https://reviews.llvm.org/D42553 llvm-svn: 323476
* [SyntheticCounts] Rewrite the code using only graph traits.Easwaran Raman2018-01-254-86/+157
| | | | | | | | | | | | | | | | | | | Summary: The intent of this is to allow the code to be used with ThinLTO. In Thinlink phase, a traditional Callgraph can not be computed even though all the necessary information (nodes and edges of a call graph) is available. This is due to the fact that CallGraph class is closely tied to the IR. This patch first extends GraphTraits to add a CallGraphTraits graph. This is then used to implement a version of counts propagation on a generic callgraph. Reviewers: davidxl Subscribers: mehdi_amini, tejohnson, llvm-commits Differential Revision: https://reviews.llvm.org/D42311 llvm-svn: 323475
* [AArch64] Enable aggressive FMA on T99 and provide AArch64 options for others.Joel Jones2018-01-254-0/+16
| | | | | | | | | | | | | | This patch enables aggressive FMA by default on T99, and provides a -mllvm option to enable the same on other AArch64 micro-arch's (-mllvm -aarch64-enable-aggressive-fma). Test case demonstrating the effects on T99 is included. Patch by: steleman (Stefan Teleman) Differential Revision: https://reviews.llvm.org/D40696 llvm-svn: 323474
* Don't let test write to the source dir after r323426.Nico Weber2018-01-251-11/+11
| | | | llvm-svn: 323473
OpenPOWER on IntegriCloud