summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [clang-move] The new.cc file should include new_header.h instead of old_header.hHaojian Wu2016-09-233-18/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, all #includes (includeing old_header.h) in old.cc will be copied to new.cc, however, the new.cc should include new_header.h instead of the old_header.h Before applying the patch, the new.cc looks like: ``` #include "old_header.h" ... ``` The new.cc looks like with this patch: ``` #include "new_header" ... ``` Reviewers: ioeric Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24828 llvm-svn: 282247
* [Power9] Exploit move and splat instructions for build_vector improvementNemanja Ivanovic2016-09-237-13/+273
| | | | | | | | | | | | | | | This patch corresponds to review: https://reviews.llvm.org/D21135 This patch exploits the following instructions: mtvsrws lxvwsx mtvsrdd mfvsrld In order to improve some build_vector and extractelement patterns. llvm-svn: 282246
* [ELF] - Linkerscript: implement DEFINED() command.George Rimar2016-09-233-0/+39
| | | | | | | | | | | | DEFINED(symbol) Return 1 if symbol is in the linker global symbol table and is defined before the statement using DEFINED in the script, otherwise return 0. Can be used to define default values for symbols. Found it in the wild. Differential revision: https://reviews.llvm.org/D24858 llvm-svn: 282245
* Linker script: fix crash when discarding sectionEugene Leviant2016-09-232-2/+13
| | | | | | | | | If section contains local symbols ldd crashes, because local symbols are added to symbol table before section is discarded by linker script processor. This patch calls copyLocalSymbols() after createSections, so discarded section symbols are not copied llvm-svn: 282244
* [ELF] - Linkerscript: Implemented >> and <<George Rimar2016-09-232-4/+23
| | | | | | | | | | | Found this operators used in the wild scripts, for example: __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; __fixup_entries = (. - _FIXUP_TABLE_)>>2; Differential revision: https://reviews.llvm.org/D24860 llvm-svn: 282243
* Minor tweak. Avoid hardcoding.Daniel Marjamaki2016-09-231-1/+1
| | | | llvm-svn: 282242
* [ARM] Promote small global constants to constant poolsJames Molloy2016-09-2310-6/+460
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a constant is unamed_addr and is only used within one function, we can save on the code size and runtime cost of an indirection by changing the global's storage to inside the constant pool. For example, instead of: ldr r0, .CPI0 bl printf bx lr .CPI0: &format_string format_string: .asciz "hello, world!\n" We can emit: adr r0, .CPI0 bl printf bx lr .CPI0: .asciz "hello, world!\n" This can cause significant code size savings when many small strings are used in one function (4 bytes per string). This recommit contains fixes for a nasty bug related to fast-isel fallback - because fast-isel doesn't know about this optimization, if it runs and emits references to a string that we inline (because fast-isel fell back to SDAG) we will end up with an inlined string and also an out-of-line string, and we won't emit the out-of-line string, causing backend failures. It also contains fixes for emitting .text relocations which made the sanitizer bots unhappy. llvm-svn: 282241
* cmake: Support overriding Sphinx HTML doc install directoryMichal Gorny2016-09-232-2/+14
| | | | | | | | | | | | Provide ${PROJECT}_INSTALL_SPHINX_HTML_DIR variables (e.g. LLVM_INSTALL_SPHINX_HTML_DIR) to override Sphinx HTML doc install directory. Bug: https://llvm.org/bugs/show_bug.cgi?id=23780 Differential Revision: https://reviews.llvm.org/D23757 llvm-svn: 282240
* Revert r282238 "Revert r282235 "[llvm-dwarfdump] - Teach dwarfdump to dump ↵George Rimar2016-09-239-0/+305
| | | | | | | | | | | | | | | | | | | | | | | | | | gdb-index section."" Build bot issues (http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/15856/steps/ninja%20check%201/logs/FAIL%3A%20LLVM%3A%3Adwarfdump-dump-gdbindex.test) should be fixed in that version. Issue was that MSVS does not support "%zu". Though it works fine on MSCS 2015, Bot looks running MSVS 2013 that does not like it. MSDN also says that "z" prefix is not supported: https://msdn.microsoft.com/en-us/library/tcxf1dw6.aspx I had to use PRId64 instead. Original commit message: [llvm-dwarfdump] - Teach dwarfdump to dump gdb-index section. gold linker's --gdb-index option currently is able to create the .gdb_index section that allows GDB to locate and read the .dwo files as it needs them, this helps reduce the total size of the object files processed by the linker. More info about that: https://gcc.gnu.org/wiki/DebugFission https://sourceware.org/gdb/onlinedocs/gdb/Index-Section-Format.html Patch teaches dwarfdump tool to dump this section. Differential revision: https://reviews.llvm.org/D21503 llvm-svn: 282239
* Revert r282235 "[llvm-dwarfdump] - Teach dwarfdump to dump gdb-index section."George Rimar2016-09-239-304/+0
| | | | | | | It broke BB: http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/15856 llvm-svn: 282238
* [InstCombine] Fix for PR29124: reduce insertelements to shufflevectorAlexey Bataev2016-09-236-59/+173
| | | | | | | | | | | | | | | | | | | | | | | | | If inserting more than one constant into a vector: define <4 x float> @foo(<4 x float> %x) { %ins1 = insertelement <4 x float> %x, float 1.0, i32 1 %ins2 = insertelement <4 x float> %ins1, float 2.0, i32 2 ret <4 x float> %ins2 } InstCombine could reduce that to a shufflevector: define <4 x float> @goo(<4 x float> %x) { %shuf = shufflevector <4 x float> %x, <4 x float> <float undef, float 1.0, float 2.0, float undef>, <4 x i32><i32 0, i32 5, i32 6, i32 3> ret <4 x float> %shuf } Also, InstCombine tries to convert shuffle instruction to single insertelement, if one of the vectors is a constant vector and only a single element from this constant should be used in shuffle, i.e. shufflevector <4 x float> %v, <4 x float> <float undef, float 1.0, float undef, float undef>, <4 x i32> <i32 0, i32 5, i32 undef, i32 undef> -> insertelement <4 x float> %v, float 1.0, 1 Differential Revision: https://reviews.llvm.org/D24182 llvm-svn: 282237
* [gdb-remote] Remove the const char * version of SendPacketAndWaitForResponsePavel Labath2016-09-234-136/+105
| | | | | | Switch all callers to use the StringRef version. llvm-svn: 282236
* [llvm-dwarfdump] - Teach dwarfdump to dump gdb-index section.George Rimar2016-09-239-0/+304
| | | | | | | | | | | | | | | gold linker's --gdb-index option currently is able to create the .gdb_index section that allows GDB to locate and read the .dwo files as it needs them, this helps reduce the total size of the object files processed by the linker. More info about that: https://gcc.gnu.org/wiki/DebugFission https://sourceware.org/gdb/onlinedocs/gdb/Index-Section-Format.html Patch teaches dwarfdump tool to dump this section. Differential revision: https://reviews.llvm.org/D21503 llvm-svn: 282235
* [AMDGPU] Refactor VOP1 and VOP2 instruction TD definitionsValery Pykhtin2016-09-2311-1691/+1379
| | | | | | Differential revision: https://reviews.llvm.org/D24738 llvm-svn: 282234
* Fix indentationDaniel Marjamaki2016-09-231-1/+1
| | | | llvm-svn: 282233
* [msan] Prevent initialization failure with newer (2.23+) glibc in use.Maxim Ostapenko2016-09-232-13/+36
| | | | | | | | | | This patch is pretty the same as http://reviews.llvm.org/D20235 that we used for ASan. Using the same hack for MSan fixes its initialization with newer Glibc in use. Differential Revision: https://reviews.llvm.org/D24736 llvm-svn: 282232
* [AVX-512] Split X86ISD::VFPROUND and X86ISD::VFPEXT into separate opcodes ↵Craig Topper2016-09-235-29/+24
| | | | | | | | for each type constraint. This revealed that scalar intrinsics could create nodes with a rounding mode of FROUND_CUR_DIRECTION, but the patterns didn't check for it. It just worked because isel doesn't check operand count and we had a pattern without the rounding mode argument at all. llvm-svn: 282231
* [AVX-512] Add separate ISD opcodes for each form of CVT instructions. Don't ↵Craig Topper2016-09-235-100/+104
| | | | | | reuse non-X86 ISD opcodes with extra X86 specific arguments. llvm-svn: 282230
* [AVX-512] Use different ISD opcodes for some of the scalar intrinsic ↵Craig Topper2016-09-234-27/+34
| | | | | | lowering. Isel is not very robust against using the same ISD opcode with different number of operands so its better to separate. llvm-svn: 282229
* [AVX-512] Add initial support for checking rounding mode arguments of builtins.Craig Topper2016-09-234-0/+107
| | | | | | | | The backend can't encode all possible values of the argument and will fail isel. Checking in the frontend presents a friendlier experience to the user. I started with builtins that can only take _MM_CUR_DIRECTION or _MM_NO_EXC. More builtins coming in the future. llvm-svn: 282228
* [X86] Split up the single switch statement in ↵Craig Topper2016-09-231-15/+27
| | | | | | | | Sema::CheckX86BuiltinFunctionCall into different switches or ifs for each type of check. This in preparation for a new check that will check some of the builtins that already had the immediate range check. llvm-svn: 282227
* Fix windows build caused by mixing enum and enum class.Zachary Turner2016-09-232-2/+2
| | | | llvm-svn: 282226
* [libFuzzer] be more precise about what we reset in TracePCKostya Serebryany2016-09-232-6/+8
| | | | llvm-svn: 282225
* [libFuzzer] fix merging with trace-pc-guardKostya Serebryany2016-09-238-27/+25
| | | | llvm-svn: 282224
* AMDGPU/SI: Include implicit arguments in kernarg_segment_byte_sizeTom Stellard2016-09-234-2/+30
| | | | | | | | | | Reviewers: arsenm Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, llvm-commits, tony-tye Differential Revision: https://reviews.llvm.org/D24835 llvm-svn: 282223
* [libFuzzer] simplify the TracePC logicKostya Serebryany2016-09-233-29/+20
| | | | llvm-svn: 282222
* [RegisterBankInfo] Mark the dump methods with LLVM_DUMP_METHOD.Quentin Colombet2016-09-231-4/+4
| | | | | | NFC llvm-svn: 282221
* [AArch64][RegisterBankInfo] Sanity check TableGen'ed like inputs.Quentin Colombet2016-09-231-0/+47
| | | | | | | Make sure the entries written to mimic the behavior of TableGen are sane. llvm-svn: 282220
* [libFuzzer] move value profiling logic into TracePCKostya Serebryany2016-09-236-32/+21
| | | | llvm-svn: 282219
* Triple: Add opencl environment typeTom Stellard2016-09-233-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: For AMDGPU, we have been using the operating system component of the triple for specifying the low-level runtime that is being used. The rationale for this is that the host operating system (e.g. Linux) is irrelevant for GPU code, since its execution enviroment will be mostly controled by the low-level runtime being used to execute the code. In most cases, higher level languages have their own runtime which is implemented on top of the low-level runtime. The kernel ABIs of each language mostly depend on the low-level runtime, but there may be some slight differences between languages. OpenCL for example, may append additional arguments to the kernel in order to pass values like global offsets or buffers for printf. OpenMP, HCC, or other languages may want to add their own values which differ from OpenCL. The reason for adding a new opencl environment type is to make it possible for the backend to distinguish between the ABIs of the higher-level languages and handle them correctly. It seems cleaner to use the enviroment component for this rather than creating a new OS type for every combination of low-level runtime / high-level language. Reviewers: Anastasia, chandlerc Subscribers: whchung, pekka.jaaskelainen, wdng, yaxunl, llvm-commits Differential Revision: https://reviews.llvm.org/D24735 llvm-svn: 282218
* [MC] Support skip and count for .incbin directivePetr Hosek2016-09-232-8/+87
| | | | | | | | These optional arguments are supported by GNU assembler. Differential Revision: https://reviews.llvm.org/D24714 llvm-svn: 282217
* [libFuzzer] change ValueBitMap to remember the number of bits in itKostya Serebryany2016-09-237-30/+29
| | | | llvm-svn: 282216
* [AArch64][RegisterBankInfo] Switch to TableGen'ed like PartialMapping.Quentin Colombet2016-09-232-20/+70
| | | | | | | | | Statically instanciate the most common PartialMappings. This should be closer to what the code would look like when TableGen support is added for GlobalISel. As a side effect, this should improve compile time. llvm-svn: 282215
* [RegisterBankInfo] Check that the mapping covers the interesting bits.Quentin Colombet2016-09-232-4/+6
| | | | | | | | | | | | | | | In the verify method of the ValueMapping class we used to check that the mapping exactly matches the bits of the input value. This is problematic for statically allocated mappings because we would need a different mapping for each different size of the value that maps on one instruction. For instance, with such scheme, we would need a different mapping for a value of size 1, 5, 23 whereas they all end up on a 32-bit wide instruction. Therefore, change the verifier to check that the meaningful bits are covered by the mapping instead of matching them. llvm-svn: 282214
* [RegisterBankInfo] Use array instead of SmallVector for BreakDown.Quentin Colombet2016-09-234-55/+73
| | | | | | | | | | | | | This is another step toward TableGen'ed like structures. The BreakDown of the mapping of the value will be statically computed by TableGen, thus we only have to point to the right entry in the table instead of dynamically allocate the mapping for each instruction. We still support the dynamic allocation through a factory of PartialMapping to ease the bring-up of the targets while the TableGen backend is not available. llvm-svn: 282213
* Add the ability to append breakpoints to the save file.Jim Ingham2016-09-227-16/+113
| | | | llvm-svn: 282212
* [libFuzzer] simplify the crash minimizer; split MaxLen into two: MaxInputLen ↵Kostya Serebryany2016-09-223-29/+36
| | | | | | and MaxMutationLen, allow MaxMutationLen to be less than MaxInputLen llvm-svn: 282211
* [InstCombine] fold X urem C -> X < C ? X : X - C when C is big (PR28672)Sanjay Patel2016-09-222-3/+19
| | | | | | | | | | | | We already have the udiv variant of this transform, so I think this is ok for InstCombine too even though there is an increase in IR instructions. As the tests and TODO comments show, the transform can lead to follow-on combines. This should fix: https://llvm.org/bugs/show_bug.cgi?id=28672 Differential Revision: https://reviews.llvm.org/D24527 llvm-svn: 282209
* Add the ability to deserialize only breakpoints matching a given name.Jim Ingham2016-09-229-10/+262
| | | | | | Also tests for this and the ThreadSpec serialization. llvm-svn: 282207
* [AsmParser] Remove unused partial template specialization.Davide Italiano2016-09-221-10/+0
| | | | llvm-svn: 282206
* Serilize the thread options within the breakpoint options.Jim Ingham2016-09-224-7/+108
| | | | llvm-svn: 282205
* [utils] Teach the code coverage prep script about --restrictVedant Kumar2016-09-221-14/+27
| | | | | | | | | | | | | | Add two options to the code coverage artifact prep script: * --use-existing-profdata: Use an existing indexed profile instead of merging the same profiles again. * --restrict: Restrict the coverage reporting to the given list of source directories. With this in place, we can teach the coverage bot how to prepare separate reports for each of the llvm tools. llvm-svn: 282204
* [llvm-cov] Document some fields in a class (NFC)Vedant Kumar2016-09-221-4/+15
| | | | llvm-svn: 282203
* [llvm-cov] Add the ability to specify directories of input source filesVedant Kumar2016-09-222-10/+65
| | | | | | | | | We've supported restricting coverage reports to a set of files for a long time. Add support for being able to restrict by entire directories. I suppose this supersedes D20803. llvm-svn: 282202
* MachineScheduler: Slightly simplify release nodeMatthias Braun2016-09-222-21/+11
| | | | llvm-svn: 282201
* MachineScheduler: Remove ineffective heuristic; NFCMatthias Braun2016-09-222-19/+0
| | | | | | | | | Currently all nodes get added to the NextSU list when they are released, so any candidate must be in that list, making the heuristic ineffective. Remove it for now, we can add it back later in a working fashion if necessary. llvm-svn: 282200
* Revert r282168 "GVN-hoist: fix store past load dependence analysis (PR30216)"Hans Wennborg2016-09-222-87/+28
| | | | | | | | and also the dependent r282175 "GVN-hoist: do not dereference null pointers" It's causing compiler crashes building Harfbuzz (PR30499). llvm-svn: 282199
* [Profile] Remove unused variableXinliang David Li2016-09-222-2/+0
| | | | llvm-svn: 282198
* [ELF/GC] Don't crash while processing Discarded sections.Davide Italiano2016-09-222-0/+16
| | | | | | | | | | The ELF spec doesn't allow relocations to point directly to a deduplicated COMDAT section but this unfortunately happens in practice. Bail out early instead of crashing. Differential Revision: https://reviews.llvm.org/D24750 llvm-svn: 282197
* [CMake] Fixing a small hack in add_lldb_libraryChris Bieneman2016-09-221-1/+4
| | | | | | | | This code was adding an explicit dependency on libclang because lldb needs clang headers, changing this to instead depend on the clang tablegen targets means we don't have to depend on building the clang bits in libclang that lldb doesn't need. Note this is still a bit of a hack because we're adding the dependency to all lldb libraries, instead of just the ones that need it. llvm-svn: 282196
OpenPOWER on IntegriCloud