summaryrefslogtreecommitdiffstats
path: root/llvm/include
Commit message (Collapse)AuthorAgeFilesLines
...
* Minor refactor to make VP writing more efficientXinliang David Li2015-11-241-4/+10
| | | | llvm-svn: 253994
* Add vector types for intrinsicsKrzysztof Parzyszek2015-11-241-6/+17
| | | | | Author: Ron Lieberman <ronl@codeaurora.org> llvm-svn: 253992
* Add new vector types for 512-, 1024- and 2048-bit vectorsKrzysztof Parzyszek2015-11-243-141/+219
| | | | | | | | Those types are needed to implement instructions for Hexagon Vector Extensions (HVX): 16x32, 16x64, 32x16, 32x32, 32x64, 64x8, 64x16, 64x32, 128x8, 128x16, 256x8, 512x1, and 1024x1. llvm-svn: 253978
* Let SelectionDAG start to use probability-based interface to add successors.Cong Hou2015-11-242-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | The patch in http://reviews.llvm.org/D13745 is broken into four parts: 1. New interfaces without functional changes. 2. Use new interfaces in SelectionDAG, while in other passes treat probabilities as weights. 3. Use new interfaces in all other passes. 4. Remove old interfaces. This the second patch above. In this patch SelectionDAG starts to use probability-based interfaces in MBB to add successors but other MC passes are still using weight-based interfaces. Therefore, we need to maintain correct weight list in MBB even when probability-based interfaces are used. This is done by updating weight list in probability-based interfaces by treating the numerator of probabilities as weights. This change affects many test cases that check successor weight values. I will update those test cases once this patch looks good to you. Differential revision: http://reviews.llvm.org/D14361 llvm-svn: 253965
* Add a FunctionImporter helper to perform summary-based cross-module function ↵Mehdi Amini2015-11-242-0/+52
| | | | | | | | | | | | | | | | | importing Summary: This is a helper to perform cross-module import for ThinLTO. Right now it is importing naively every possible called functions. Reviewers: tejohnson Subscribers: dexonsmith, llvm-commits Differential Revision: http://reviews.llvm.org/D14914 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 253954
* Add findFunctionInfoList() accessor to FunctionInfoIndex.Mehdi Amini2015-11-241-0/+5
| | | | | | | | | | | | | | | Summary: This allows to query for a function in the map without creating an entry, allowing to use a const FunctionInfoIndex. Reviewers: tejohnson Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14912 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 253953
* [DIE] Make DIE.h NDEBUG conditional-free.Davide Italiano2015-11-241-26/+0
| | | | | | Switch dump()/print() method definitions to LLVM_DUMP_METHOD instead. llvm-svn: 253945
* Use make_unique [NFC]Xinliang David Li2015-11-241-1/+2
| | | | llvm-svn: 253942
* Remove trailing space in commentsXinliang David Li2015-11-241-5/+3
| | | | llvm-svn: 253941
* Revert r253923.Krzysztof Parzyszek2015-11-233-194/+116
| | | | | | Per Eric's request. llvm-svn: 253928
* Add new vector types for 512-, 1024- and 2048-bit vectorsKrzysztof Parzyszek2015-11-233-116/+194
| | | | | | | | Those types are needed to implement instructions for Hexagon Vector Extensions (HVX): 16x32, 16x64, 32x16, 32x32, 32x64, 64x8, 64x16, 64x32, 128x8, 128x16, 256x8, 512x1, and 1024x1. llvm-svn: 253923
* [Support] Add optional argument to SaturatingAdd() and SaturatingMultiply() ↵Nathan Slingerland2015-11-231-7/+40
| | | | | | | | | | | | | | to indicate that overflow occurred Summary: Adds the ability for callers to detect when saturation occurred on the result of saturating addition/multiplication. Reviewers: davidxl, silvas, rsmith Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14931 llvm-svn: 253921
* [PGO] Add --text option for llvm-profdata show|merge commandsXinliang David Li2015-11-231-0/+5
| | | | | | | | | | | | | | The new option is similar to the SampleProfile dump option. - dump raw/indexed format into text profile format - merge the profile and output into text profile format. Note that Value Profiling data text format is not yet designed. That functionality will be added later. Differential Revision: http://reviews.llvm.org/D14894 llvm-svn: 253913
* [ThinLTO] Deduplicate function index loading into shared helper (NFC)Teresa Johnson2015-11-231-0/+7
| | | | | | | | Add a shared helper routine to read the function index from a file and create/return the function index object. Use it in llvm-link and llvm-lto. llvm-svn: 253903
* [PGO] Introduce alignment macro for instr-prof control data(NFC)Xinliang David Li2015-11-231-1/+3
| | | | llvm-svn: 253893
* Fix comment not allowed in C90Xinliang David Li2015-11-231-2/+2
| | | | llvm-svn: 253880
* [Support] Fix SaturatingMultiply<T>() to be correct (and fast), Re-enable ↵Nathan Slingerland2015-11-231-6/+24
| | | | | | | | | | | | | | | | | | Unit Tests Summary: This change fixes the SaturatingMultiply<T>() function template to not cause undefined behavior with T=uint16_t. Thanks to Richard Smith's contribution, it also no longer requires an integer division. Patch by Richard Smith. Reviewers: silvas, davidxl Subscribers: rsmith, davidxl, llvm-commits Differential Revision: http://reviews.llvm.org/D14845 llvm-svn: 253870
* Move two Value Profiler data structs to InstrProfData.inc (NFC)Xinliang David Li2015-11-232-7/+19
| | | | llvm-svn: 253848
* [PGO] Fix remaining bugs in ProfData template file (when used by compiler-rt)Xinliang David Li2015-11-232-17/+17
| | | | | | | | 1. move const qualifier out of raw header field type as runtime use of the header needs to initialze the fields 2. use C style casting for integer types. llvm-svn: 253844
* Add const qualifier for FunctionInfoIndex in ModuleLinker and linkInModule() ↵Mehdi Amini2015-11-231-1/+1
| | | | | | | (NFC) From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 253840
* Add const qualifier on FunctionInfoIndex::hasExportedFunctions() (NFC)Mehdi Amini2015-11-231-1/+1
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 253839
* [SCEV] Simplify code. NFC.Benjamin Kramer2015-11-221-16/+5
| | | | llvm-svn: 253825
* Revert r253810. The builds should be fine now.Krzysztof Parzyszek2015-11-222-2/+2
| | | | llvm-svn: 253822
* Avoid dependency between TableGen and CodeGenKrzysztof Parzyszek2015-11-222-67/+29
| | | | | | | | Duplicate a few common definitions between DFAPacketizer.cpp and DFAPacketizerEmitter.cpp to avoid including files from CodeGen in TableGen. llvm-svn: 253820
* [PGO] move names of runtime sections definitions to InstrProfData.inc Xinliang David Li2015-11-222-6/+50
| | | | | | | | | | In profile runtime implementation for Darwin, Linux and FreeBSD, the names of sections holding profile control/counter/naming data need to be known by the runtime in order to locate the start/end of the data. Moving the name definitions to the common file to specify the connection. llvm-svn: 253814
* Temporary fix broken build.ninja after r253790.NAKAMURA Takumi2015-11-222-2/+2
| | | | | | | | | | | | | | FIXME: This can be reverted several hours later. r253790 introduced cyclic deps around llvm-tblgen and it was affecting after reverting. ninja: error: dependency cycle: include/llvm/IR/Attributes.inc -> include/llvm/IR/Attributes.inc.tmp -> bin/llvm-tblgen -> utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/DFAPacketizerEmitter.cpp.o -> include/llvm/IR/Attributes.inc It may be a ninja's bug. FYI, renaming DFAPacketizerEmitter.cpp would be useless. llvm-svn: 253810
* [PGO] move raw magic and version def to InstrProfData.inc Xinliang David Li2015-11-222-22/+25
| | | | | | These are shared definitions too. (NFC) llvm-svn: 253809
* [PGO] InstrProf Template file documentation changeXinliang David Li2015-11-221-39/+73
| | | | | | | | | | Add more complete description of the content and structure of the template file. Made the comment in C style to be shared by C runtime. Also enhance the file structure so that it can included as standalone header for common definitions. llvm-svn: 253807
* [PGO] Move Value Profile Kind to InstrProfData.incXinliang David Li2015-11-222-4/+20
| | | | | | | ValueProfKind value affects runtime data structure and definition is shared between compiler-rt and LLVM. llvm-svn: 253806
* [PGO] Define value profiling updater API signature in InstrProfData.inc (NFC)Xinliang David Li2015-11-221-1/+18
| | | | llvm-svn: 253805
* Have a single way for creating unique value names.Rafael Espindola2015-11-221-0/+3
| | | | | | | | | | | We had two code paths. One would create names like "foo.1" and the other names like "foo1". For globals it is important to use "foo.1" to help C++ name demangling. For locals there is no strong reason to go one way or the other so I kept the most common mangling (foo1). llvm-svn: 253804
* [PGO] Move Raw Header def into template file InstrProfData.incXinliang David Li2015-11-222-21/+35
| | | | | | To enable code sharing with compiler-rt (NFC) llvm-svn: 253803
* [ThinLTO] Handle bitcode without function summary sections gracefullyTeresa Johnson2015-11-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Several fixes to the handling of bitcode files without function summary sections so that they are skipped during ThinLTO processing in llvm-lto and the gold plugin when appropriate instead of aborting. 1 Don't assert when trying to add a FunctionInfo that doesn't have a summary attached. 2 Skip FunctionInfo structures that don't have attached function summary sections when trying to create the combined function summary. 3 In both llvm-lto and gold-plugin, check whether a bitcode file has a function summary section before trying to parse the index, and skip the bitcode file if it does not. 4 Fix hasFunctionSummaryInMemBuffer in BitcodeReader, which had a bug where we returned to early while looking for the summary section. Also added llvm-lto and gold-plugin based tests for cases where we don't have function summaries in the bitcode file. I verified that either the first couple fixes described above are enough to avoid the crashes, or fixes 1,3,4. But have combined them all here for added robustness. Reviewers: joker.eph Subscribers: llvm-commits, joker.eph Differential Revision: http://reviews.llvm.org/D14903 llvm-svn: 253796
* [MachineInstrBuilder] Support for adding a ConstantPoolIndex MO with an ↵Simon Pilgrim2015-11-211-10/+12
| | | | | | | | | | | | | | additional offset. MachineInstrBuilder::addDisp can already add an immediate or global address MO with an adjusted offset, this patch adds support for constant pool indices as well. All remaining MO types still assert - there are a number of other types that could support adjusted offsets but I have no test cases at this time. Required to fix a regression in D13988 found by Mikael Holmén during stress testing (test case attached). Differential Revision: http://reviews.llvm.org/D14867 llvm-svn: 253795
* Hexagon V60/HVX DFA scheduler supportKrzysztof Parzyszek2015-11-213-4/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extended DFA tablegen to: - added "-debug-only dfa-emitter" support to llvm-tblgen - defined CVI_PIPE* resources for the V60 vector coprocessor - allow specification of multiple required resources - supports ANDs of ORs - e.g. [SLOT2, SLOT3], [CVI_MPY0, CVI_MPY1] means: (SLOT2 OR SLOT3) AND (CVI_MPY0 OR CVI_MPY1) - added support for combo resources - allows specifying ORs of ANDs - e.g. [CVI_XLSHF, CVI_MPY01] means: (CVI_XLANE AND CVI_SHIFT) OR (CVI_MPY0 AND CVI_MPY1) - increased DFA input size from 32-bit to 64-bit - allows for a maximum of 4 AND'ed terms of 16 resources - supported expressions now include: expression => term [AND term] [AND term] [AND term] term => resource [OR resource]* resource => one_resource | combo_resource combo_resource => (one_resource [AND one_resource]*) Author: Dan Palermo <dpalermo@codeaurora.org> kparzysz: Verified AMDGPU codegen to be unchanged on all llc tests, except those dealing with instruction encodings. Reapply the previous patch, this time without circular dependencies. llvm-svn: 253793
* Revert r253790: it breaks all builds for some reason.Krzysztof Parzyszek2015-11-212-60/+4
| | | | llvm-svn: 253791
* Hexagon V60/HVX DFA scheduler supportKrzysztof Parzyszek2015-11-212-4/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extended DFA tablegen to: - added "-debug-only dfa-emitter" support to llvm-tblgen - defined CVI_PIPE* resources for the V60 vector coprocessor - allow specification of multiple required resources - supports ANDs of ORs - e.g. [SLOT2, SLOT3], [CVI_MPY0, CVI_MPY1] means: (SLOT2 OR SLOT3) AND (CVI_MPY0 OR CVI_MPY1) - added support for combo resources - allows specifying ORs of ANDs - e.g. [CVI_XLSHF, CVI_MPY01] means: (CVI_XLANE AND CVI_SHIFT) OR (CVI_MPY0 AND CVI_MPY1) - increased DFA input size from 32-bit to 64-bit - allows for a maximum of 4 AND'ed terms of 16 resources - supported expressions now include: expression => term [AND term] [AND term] [AND term] term => resource [OR resource]* resource => one_resource | combo_resource combo_resource => (one_resource [AND one_resource]*) Author: Dan Palermo <dpalermo@codeaurora.org> kparzysz: Verified AMDGPU codegen to be unchanged on all llc tests, except those dealing with instruction encodings. llvm-svn: 253790
* Add some constantness to GetSuccessorNumber().Rong Xu2015-11-201-1/+1
| | | | llvm-svn: 253733
* [llvm-profdata] Add merge() to InstrProfRecordNathan Slingerland2015-11-201-18/+39
| | | | | | | | | | | | | | | | | Summary: This change refactors two aspects of InstrProfRecord: 1) Add a merge() method to InstrProfRecord (previously InstrProfWriter combineInstrProfRecords()) in order to better encapsulate this functionality and to make the InstrProfRecord and SampleRecord APIs more consistent. 2) Make InstrProfRecord mergeValueProfData() a private method since it is only ever called internally by merge(). Reviewers: dnovillo, bogner, davidxl Subscribers: silvas, vsk, llvm-commits Differential Revision: http://reviews.llvm.org/D14786 llvm-svn: 253695
* Avoid duplicate entry for cortex-a7 in the TargetParser (NFC)Artyom Skrobov2015-11-201-1/+0
| | | | | | | | | | Reviewers: t.p.northover, rengolin Subscribers: aemerson, rengolin, llvm-commits Differential Revision: http://reviews.llvm.org/D14757 llvm-svn: 253676
* Handle ARMv6-J as an alias, instead of fake architectureArtyom Skrobov2015-11-201-4/+2
| | | | | | | | | | | | | | | | | | | | | | Summary: This follows D14577 to treat ARMv6-J as an alias for ARMv6, instead of an architecture in its own right. The functional change is that the default CPU when targeting ARMv6-J changes from arm1136j-s to arm1136jf-s, which is currently used as the default CPU for ARMv6; both are, in fact, ARMv6-J CPUs. The J-bit (Jazelle support) is irrelevant to LLVM, and it doesn't affect code generation, attributes, optimizations, or anything else, apart from selecting the default CPU. Reviewers: rengolin, logan, compnerd Subscribers: aemerson, llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D14755 llvm-svn: 253675
* [ThinLTO] Add MODULE_CODE_METADATA_VALUES recordTeresa Johnson2015-11-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is split out from the ThinLTO metadata mapping patch http://reviews.llvm.org/D14752. To avoid needing to parse the module level metadata during function importing, a new module-level record is added which holds the number of module-level metadata values. This is required because metadata value ids are assigned implicitly during parsing, and the function-level metadata ids start after the module-level metadata ids. I made a change to this version of the code compared to D14752 in order to add more consistent and thorough assertion checking of the new record value. We now unconditionally use the record value to initialize the MDValueList size, and handle it the same in parseMetadata for all module level metadata cases (lazy loading or not). Reviewers: dexonsmith, joker.eph Subscribers: davidxl, llvm-commits, joker.eph Differential Revision: http://reviews.llvm.org/D14825 llvm-svn: 253668
* Revert the revert 253497 and 253539 - These commits aren't the cause of the ↵Daniel Sanders2015-11-203-9/+29
| | | | | | | | clang-cmake-mips failures. Sorry for the noise. llvm-svn: 253662
* Revert 253497 and 253539 to try to fix clang-cmake-mips buildbot.Daniel Sanders2015-11-203-29/+9
| | | | | | | | | | It caused link errors of the form: InstrProfiling.c:(.text.__llvm_profile_instrument_target+0x1c0): undefined reference to `__sync_fetch_and_add_8' We had a network outage at the time of the commit so the first build to show a problem is http://lab.llvm.org:8011/builders/clang-cmake-mips/builds/10827 llvm-svn: 253656
* [LTO] Add option to emit assembly from LTOCodeGeneratorTobias Edler von Koch2015-11-192-13/+21
| | | | | | | | | | This adds a new API, LTOCodeGenerator::setFileType, to choose the output file format for LTO CodeGen. A corresponding change to use this new API from llvm-lto and a test case is coming in a separate commit. Differential Revision: http://reviews.llvm.org/D14554 llvm-svn: 253622
* Cleanup some -Wundef warnings in include/llvm/Support/MathExtras.hArch D. Robison2015-11-191-6/+6
| | | | | | | | | | Fix avoids gratuitous warnings from gcc for "_MSC_VER" not being defined. Differential Revision: http://reviews.llvm.org/D14598 Patch by Tony Kelman <tony@kelman.net> llvm-svn: 253614
* X86: More efficient legalization of wide integer comparesHans Wennborg2015-11-191-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular, this makes the code for 64-bit compares on 32-bit targets much more efficient. Example: define i32 @test_slt(i64 %a, i64 %b) { entry: %cmp = icmp slt i64 %a, %b br i1 %cmp, label %bb1, label %bb2 bb1: ret i32 1 bb2: ret i32 2 } Before this patch: test_slt: movl 4(%esp), %eax movl 8(%esp), %ecx cmpl 12(%esp), %eax setae %al cmpl 16(%esp), %ecx setge %cl je .LBB2_2 movb %cl, %al .LBB2_2: testb %al, %al jne .LBB2_4 movl $1, %eax retl .LBB2_4: movl $2, %eax retl After this patch: test_slt: movl 4(%esp), %eax movl 8(%esp), %ecx cmpl 12(%esp), %eax sbbl 16(%esp), %ecx jge .LBB1_2 movl $1, %eax retl .LBB1_2: movl $2, %eax retl Differential Revision: http://reviews.llvm.org/D14496 llvm-svn: 253572
* SamplePGO - Sort samples by source location when emitting as text.Diego Novillo2015-11-191-0/+27
| | | | | | | | When dumping function samples or writing them out as text format, it helps if the samples are emitted sorted by source location. The sorting of the maps is a bit slow, so we only do it on demand. llvm-svn: 253568
* AVX512: Implemented encoding, intrinsics and DAG lowering for VMOVDDUP ↵Igor Breger2015-11-191-0/+18
| | | | | | | | instructions. Differential Revision: http://reviews.llvm.org/D14702 llvm-svn: 253548
* Revert "Change memcpy/memset/memmove to have dest and source alignments."Pete Cooper2015-11-194-73/+27
| | | | | | | | | | This reverts commit r253511. This likely broke the bots in http://lab.llvm.org:8011/builders/clang-ppc64-elf-linux2/builds/20202 http://bb.pgr.jp/builders/clang-3stage-i686-linux/builds/3787 llvm-svn: 253543
OpenPOWER on IntegriCloud