summaryrefslogtreecommitdiffstats
path: root/llvm/include
Commit message (Collapse)AuthorAgeFilesLines
* [AMDGPU] Change frexp.exp intrinsic to return i16 for f16 inputKonstantin Zhuravlyov2016-11-181-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D26862 llvm-svn: 287389
* [LoopSimplify] Preserve LCSSA when removing edges from unreachable blocks.Michael Zolotukhin2016-11-181-1/+2
| | | | | | This fixes PR30454. llvm-svn: 287379
* Revert "Add link-time detection of LLVM_ABI_BREAKING_CHECKS mismatch"Mehdi Amini2016-11-181-21/+0
| | | | | | This reverts commit r287352, LLDB CI is broken. llvm-svn: 287374
* Statistic/Timer: Include timers in PrintStatisticsJSON().Matthias Braun2016-11-182-2/+29
| | | | | | Differential Revision: https://reviews.llvm.org/D25588 llvm-svn: 287370
* Timer: Track name and description.Matthias Braun2016-11-182-11/+27
| | | | | | | | | | | | | The previously used "names" are rather descriptions (they use multiple words and contain spaces), use short programming language identifier like strings for the "names" which should be used when exporting to machine parseable formats. Also removed a unused TimerGroup from Hexxagon. Differential Revision: https://reviews.llvm.org/D25583 llvm-svn: 287369
* [LTO] Add option to generate optimization recordsAdam Nemet2016-11-181-0/+5
| | | | | | | | | | It is used to drive this from the clang driver via -mllvm. Same option name is used as in opt. Differential Revision: https://reviews.llvm.org/D26832 llvm-svn: 287356
* [DebugInfo] Fix some Clang-tidy modernize-use-default, ↵Eugene Zelenko2016-11-1817-95/+154
| | | | | | | | modernize-use-equal-delete and Include What You Use warnings; other minor fixes (NFC). Per Zachary Turner and Mehdi Amini suggestion to make only post-commit reviews. llvm-svn: 287355
* Add link-time detection of LLVM_ABI_BREAKING_CHECKS mismatchMehdi Amini2016-11-181-0/+21
| | | | | | | | | | | | | | | | | | | | | Summary: LLVM will define a symbol, either EnableABIBreakingChecks or DisableABIBreakingChecks depending on the configuration setting for LLVM_ABI_BREAKING_CHECKS. The llvm-config.h header will add weak references to these symbols in every clients that includes this header. This should ensure that a mismatch triggers a link failure (or a load time failure for DSO). On MSVC, the pragma "detect_mismatch" is used instead. Reviewers: rnk, jroelofs Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D26841 llvm-svn: 287352
* [AVX-512] Replace masked 16-bit element variable shift intrinsics with new ↵Craig Topper2016-11-181-28/+28
| | | | | | | | | | unmasked versions and selects. The same thing was done to 32-bit and 64-bit element sizes previously. This will allow us to support these shuffls in InstCombineCalls along with the other variable shift intrinsics. llvm-svn: 287312
* MachineOperand: Add dump() methodMatthias Braun2016-11-181-0/+1
| | | | llvm-svn: 287302
* [CodeView] Fix some Clang-tidy modernize-use-default, modernize-use-override ↵Eugene Zelenko2016-11-1712-93/+153
| | | | | | | | and Include What You Use warnings; other minor fixes (NFC). Per Zachary Turner and Mehdi Amini suggestion to make only post-commit reviews. llvm-svn: 287243
* [Orc] Clang-format the recent RPC update (r286620 and related).Lang Hames2016-11-175-378/+307
| | | | llvm-svn: 287195
* Use profile info to adjust loop unroll threshold.Dehao Chen2016-11-171-0/+5
| | | | | | | | | | | | | | Summary: For flat loop, even if it is hot, it is not a good idea to unroll in runtime, thus we set a lower partial unroll threshold. For hot loop, we set a higher unroll threshold and allows expensive tripcount computation to allow more aggressive unrolling. Reviewers: davidxl, mzolotukhin Subscribers: sanjoy, mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D26527 llvm-svn: 287186
* Introduce GlobalSplit pass.Peter Collingbourne2016-11-162-0/+5
| | | | | | | | | This pass splits globals into elements using inrange annotations on getelementptr indices. Differential Revision: https://reviews.llvm.org/D22295 llvm-svn: 287178
* [CodeGen] Pass references, not pointers, to MMI helpers. NFC.Ahmed Bougacha2016-11-161-3/+3
| | | | | | While there, rename them to follow the coding style. llvm-svn: 287169
* [CodeGen] Pull MMI helpers from FunctionLoweringInfo to MMI. NFC.Ahmed Bougacha2016-11-162-13/+16
| | | | | | | | | | | They're not SelectionDAG- or FunctionLoweringInfo-specific. They are, however, specific to building MMI from IR. We could make them members, but it's nice having MMI be a "simple" data structure and this logic kept separate. This also lets us reuse them from GlobalISel. llvm-svn: 287167
* [CodeGen] Cleanup MachineModuleInfo doxygen comments. NFC.Ahmed Bougacha2016-11-161-103/+78
| | | | | | Remove redundant names and only keep header comments. llvm-svn: 287166
* [CodeGen] Sort MMI forward declarations. NFC.Ahmed Bougacha2016-11-161-2/+2
| | | | llvm-svn: 287165
* Bitcode: Introduce initial multi-module reader API.Peter Collingbourne2016-11-161-0/+38
| | | | | | | | Implement getLazyBitcodeModule() and parseBitcodeFile() in terms of it. Differential Revision: https://reviews.llvm.org/D26719 llvm-svn: 287156
* [ExecutionEngine] Fix examples build broken in r287126 and other Include ↵Eugene Zelenko2016-11-161-0/+16
| | | | | | What You Use warnings. llvm-svn: 287130
* fix comment formatting; NFCSanjay Patel2016-11-161-3/+3
| | | | llvm-svn: 287127
* [ExecutionEngine] Fix some Clang-tidy modernize-use-default, ↵Eugene Zelenko2016-11-1610-92/+147
| | | | | | | | modernize-use-equals-delete and Include What You Use warnings; other minor fixes. Differential revision: https://reviews.llvm.org/D26729 llvm-svn: 287126
* Add a little endian variant of TCE.Pekka Jaaskelainen2016-11-161-0/+1
| | | | llvm-svn: 287111
* [X86][AVX512] Autoupgrade lossless i32/u32 to f64 conversion intrinsics with ↵Simon Pilgrim2016-11-161-36/+0
| | | | | | | | | | | | generic IR Both the (V)CVTDQ2PD (i32 to f64) and (V)CVTUDQ2PD (u32 to f64) conversion instructions are lossless and can be safely represented as generic SINT_TO_FP/UINT_TO_FP calls instead of x86 intrinsics without affecting final codegen. LLVM counterpart to D26686 Differential Revision: https://reviews.llvm.org/D26736 llvm-svn: 287108
* Remove TimeValue classPavel Labath2016-11-161-397/+0
| | | | | | | | | | | | | | Summary: All uses have been replaced by appropriate std::chrono types, and the class is now unused. Reviewers: zturner, mehdi_amini Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D26447 llvm-svn: 287094
* [X86][AVX512] Removing llvm x86 intrinsics for _mm_mask_move_{ss|sd} intrinsics.Ayman Musa2016-11-161-14/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D26128 llvm-svn: 287087
* [X86] Remove the scalar intrinsics for fadd/fsub/fdiv/fmulCraig Topper2016-11-161-24/+0
| | | | | | | | | | | | Summary: These intrinsics have been unused for clang for a while. This patch removes them. We auto upgrade them to extractelements, a scalar operation and then an insertelement. This matches the sequence used by clangs intrinsic file. Reviewers: zvi, delena, RKSimon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D26660 llvm-svn: 287083
* [ELF] Convert ELF.h to Expected<T>.Davide Italiano2016-11-162-160/+203
| | | | | | | | | | | | This has two advantages: 1) We slowly move away from ErrorOr to the new handling interface, in the hope of having an uniform error handling in LLVM, eventually. 2) We're starting to have *meaningful* error messages for invalid object ELF files, rather than a generic "parse error". At some point we should include also the offset to improve the quality of the diagnostic. llvm-svn: 287081
* [AArch64] Add support for Qualcomm's Falkor CPU.Chad Rosier2016-11-151-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D26673 llvm-svn: 287036
* Fix llvm-symbolizer to correctly sort a symbol array and calculate symbol sizesKuba Brecka2016-11-151-0/+11
| | | | | | | | Sometimes, llvm-symbolizer gives wrong results due to incorrect sizes of some symbols. The reason for that was an incorrectly sorted array in computeSymbolSizes. The comparison function used subtraction of unsigned types, which is incorrect. Let's change this to return explicit -1 or 1. Differential Revision: https://reviews.llvm.org/D26537 llvm-svn: 287028
* [ELF] Rewrite isMips64EL() using isMipsELF64(). NFCI.Davide Italiano2016-11-151-2/+1
| | | | llvm-svn: 287011
* [AMDGPU] Add wave barrier builtinStanislav Mekhanoshin2016-11-151-0/+3
| | | | | | | | | | | The wave barrier represents the discardable barrier. Its main purpose is to carry convergent attribute, thus preventing illegal CFG optimizations. All lanes in a wave come to convergence point simultaneously with SIMT, thus no special instruction is needed in the ISA. The barrier is discarded during code generation. Differential Revision: https://reviews.llvm.org/D26585 llvm-svn: 287007
* vector load store with length (left justified) llvm portionZaara Syeda2016-11-151-0/+12
| | | | llvm-svn: 286993
* Revert "[JumpThreading] Unfold selects that depend on the same condition"Pablo Barrio2016-11-151-2/+0
| | | | | | This reverts commit ac54d0066c478a09c7cd28d15d0f9ff8af984afc. llvm-svn: 286976
* [PowerPC] Implement BE VSX load/store builtins - llvm portion.Tony Jiang2016-11-151-1/+8
| | | | | | | | | | | | This patch implements all the overloads for vec_xl_be and vec_xst_be. On BE, they behaves exactly the same with vec_xl and vec_xst, therefore they are simply implemented by defining a matching macro. On LE, they are implemented by defining new builtins and intrinsics. For int/float/long long/double, it is just a load (lxvw4x/lxvd2x) or store(stxvw4x/stxvd2x). For char/char/short, we also need some extra shuffling before or after call the builtins to get the desired BE order. For int128, simply call vec_xl or vec_xst. llvm-svn: 286967
* clang format include/llvm/Support/ELF.h. NFC.Rafael Espindola2016-11-151-700/+671
| | | | llvm-svn: 286956
* DWARFAbbreviationDeclaration.h: Fix a typo in r286924. [-Wdocumentation]NAKAMURA Takumi2016-11-151-1/+1
| | | | llvm-svn: 286954
* Introduce TLI predicative for base-relative Jump Tables.Joerg Sonnenberger2016-11-151-0/+4
| | | | | | | | | | | For 64bit ABIs it is common practice to use relative Jump Tables with potentially different relocation bases. As the logic for the jump table itself doesn't depend on the relocation base, make it easier for targets to use the generic logic. Start by dropping the now redundant MIPS logic. Differential Revision: https://reviews.llvm.org/D26578 llvm-svn: 286951
* TableGen: Add operator !orMatt Arsenault2016-11-151-1/+1
| | | | llvm-svn: 286936
* [ORC] Work around an apparent modules/linkage issue.Lang Hames2016-11-151-0/+8
| | | | | | <rdar://problem/29247092> llvm-svn: 286930
* Improve DWARF parsing speed by improving DWARFAbbreviationDeclarationGreg Clayton2016-11-153-5/+75
| | | | | | | | | | | | | | | | | | | | This patch gets a DWARF parsing speed improvement by having DWARFAbbreviationDeclaration instances know if they have a fixed byte size. If an abbreviation has a fixed byte size that can be calculated given a DWARFUnit, then parsing a DIE becomes two steps: parse ULEB128 abbrev code, and then add constant size to the offset. This patch also adds a fixed byte size to each DWARFAbbreviationDeclaration::AttributeSpec so that attributes can quickly skip their values if needed without the need to lookup the fixed for size. Notable improvements: - DWARFAbbreviationDeclaration::findAttributeIndex() now returns an Optional<uint32_t> instead of a uint32_t and we no longer have to look for the magic -1U return value - Optional<uint32_t> DWARFAbbreviationDeclaration::findAttributeIndex(dwarf::Attribute attr) const; - DWARFAbbreviationDeclaration now has a getAttributeValue() function that extracts an attribute value given a DIE offset that takes advantage of the DWARFAbbreviationDeclaration::AttributeSpec::ByteSize - bool DWARFAbbreviationDeclaration::getAttributeValue(const uint32_t DIEOffset, const dwarf::Attribute Attr, const DWARFUnit &U, DWARFFormValue &FormValue) const; - A DWARFAbbreviationDeclaration instance can return a fixed byte size for itself so DWARF parsing is faster: - Optional<size_t> DWARFAbbreviationDeclaration::getFixedAttributesByteSize(const DWARFUnit &U) const; - Any functions that used to take a "const DWARFUnit *U" that would crash if U was NULL now take a "const DWARFUnit &U" and are only called with a valid DWARFUnit Differential Revision: https://reviews.llvm.org/D26567 llvm-svn: 286924
* Add a file magic for CL.exe's object file created with /GL.Rui Ueyama2016-11-152-0/+6
| | | | | | | | | | | | This patch makes it possible to identify object files created by CL.exe with /GL option. Such file contains Microsoft proprietary intermediate code instead of target machine code to do LTO. I need this to print out user-friendly error message from LLD. Differential Revision: https://reviews.llvm.org/D26645 llvm-svn: 286919
* Avoid calling std::memcmp with nullptrVitaly Buka2016-11-151-3/+6
| | | | | | | | | | | | | | | | Summary: UBSAN complains that this is undefined behavior. We can assume that empty substring (N==1) always satisfy conditions. So std::memcmp will be called only only for N > 1 and Str.size() > 0. Reviewers: ruiu, zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D26646 llvm-svn: 286910
* Remove redundant uses of \brief.Adrian Prantl2016-11-141-42/+42
| | | | llvm-svn: 286897
* Don't pass nullptr into memcpyVitaly Buka2016-11-141-0/+3
| | | | | | | | | | | | | | | Summary: It's undefined according UBSAN. Not sure which CL caused test failures, but seems writeBytes for empty buffer should be OK. Reviewers: rnk, zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D26638 llvm-svn: 286896
* RegAllocGreedy: Properly initialize this pass, so that -run-pass will workTom Stellard2016-11-142-0/+4
| | | | | | | | | | Reviewers: qcolombet, MatzeB Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D26572 llvm-svn: 286895
* [tsan] Add support for C++ exceptions into TSan (call __tsan_func_exit ↵Kuba Brecka2016-11-143-0/+61
| | | | | | | | | | during unwinding), LLVM part This adds support for TSan C++ exception handling, where we need to add extra calls to __tsan_func_exit when a function is exitted via exception mechanisms. Otherwise the shadow stack gets corrupted (leaked). This patch moves and enhances the existing implementation of EscapeEnumerator that finds all possible function exit points, and adds extra EH cleanup blocks where needed. Differential Revision: https://reviews.llvm.org/D26177 llvm-svn: 286893
* Add a checkSymbolTable() method to the MachOObjectFile class.Kevin Enderby2016-11-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The philosophy of the error checking in libObject for Mach-O files is that the constructor will check the load commands so for their tables the offsets and sizes are properly contained in the file. But there is no checking of the entries of any of the tables. For the contents of the tables themselves the methods accessing the contents of the entries return errors as needed. In some cases this however makes it difficult or cumbersome to produce a good error message which would include the tool name, file name, archive member, and name of the architecture of a slice of a universal file the error occurred in. So idea is that there will be a method to check a table which can be called up front before using it allowing a good error message to be produced before a table is used. And if only verification of the Mach-O file and its tables are wanted a new possible method checkAllTables() could be added to call all of the methods to check all the tables at some time when such methods exist. The checkSymbolTable() is the first of such methods to check one of the Mach-O file tables. This method initially will used in llvm-objdump’s DisassembleMachO() routine before it gets the section and symbol information. As if there are problems with the symbol table currently the error is first encountered by the bool operator() in the SymbolSorter() struct which passed to std::sort(). In this case there is no context as to the file name the symbol which results a poor error message: LLVM ERROR: truncated or malformed object (bad string index: 22 for symbol at index 1) with the added call to the checkSymbolTable() method the error message includes the tool name and file name: llvm-objdump: 'macho-invalid-symbol-strx': truncated or malformed object (bad string table index: 22 past the end of string table, for symbol at index 1) llvm-svn: 286887
* [PPC] Add intrinsic mapping to the xscvhpsp instructionSean Fertile2016-11-141-0/+3
| | | | | | | | | add an intrinsic to expose the 'VSX Scalar Convert Half-Precision to Single-Precision' instruction. Differential review: https://reviews.llvm.org/D26536 llvm-svn: 286862
* Restore "[ThinLTO] Prevent exporting of locals used/defined in module level asm"Teresa Johnson2016-11-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This restores the rest of r286297 (part was restored in r286475). Specifically, it restores the part requiring adding a dependency from the Analysis to Object library (downstream use changed to correctly model split BitReader vs BitWriter libraries). Original description of this part of patch follows: Module level asm may also contain defs of values. We need to prevent export of any refs to local values defined in module level asm (e.g. a ref in normal IR), since that also requires renaming/promotion of the local. To do that, the summary index builder looks at all values in the module level asm string that are not marked Weak or Global, which is exactly the set of locals that are defined. A summary is created for each of these local defs and flagged as NoRename. This required adding handling to the BitcodeWriter to look at GV declarations to see if they have a summary (rather than skipping them all). Finally, added an assert to IRObjectFile::CollectAsmUndefinedRefs to ensure that an MCAsmParser is available, otherwise the module asm parse would silently fail. Initialized the asm parser in the opt tool for use in testing this fix. Fixes PR30610. llvm-svn: 286844
OpenPOWER on IntegriCloud