summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
...
* remove FIXME comment (fixed with r284424); NFCSanjay Patel2016-10-171-2/+0
| | | | llvm-svn: 284427
* [Support] Add support for "advanced" number formatting.Zachary Turner2016-10-175-98/+730
| | | | | | | | | | | | | | | raw_ostream has not afforded a lot of flexibility in terms of how to format numbers when outputting. Wrap this all up into a set of low level helper functions that can be used to output numbers with arbitrary precision, alignment, format, etc and then update raw_ostream to use these functions. This will be useful for upcoming improvements to llvm's string formatting libraries, but are still useful independently. Differential Revision: https://reviews.llvm.org/D25497 llvm-svn: 284425
* [DAG] use isConstOrConstSplat in ComputeNumSignBits to optimize SRASanjay Patel2016-10-172-11/+1
| | | | | | | | | | | | | | The scalar version of this pattern was noted in: https://reviews.llvm.org/D25485 and fixed with: https://reviews.llvm.org/rL284395 More refactoring of the constant/splat helpers is needed and will happen in follow-up patches. Differential Revision: https://reviews.llvm.org/D25685 llvm-svn: 284424
* [DAG] make isConstOrConstSplat and isConstOrConstSplatFP more accessible; NFCSanjay Patel2016-10-173-38/+45
| | | | | | | | | | | | As noted in: https://reviews.llvm.org/D25685 This is the next-to-smallest step needed to enable the ComputeNumSignBits fix in that patch. In a minor attempt to keep some structure, we're pulling the FP helper over along with its integer sibling, but clearly we can and should do more refactoring of the similar helper functions in DAGCombiner and SelectionDAG to simplify and not duplicate functionality. llvm-svn: 284421
* [opt] Strip coverage if debug info is not present.Davide Italiano2016-10-172-1/+25
| | | | | | | | | | | | | | | If -coverage is passed, but -g is not, clang populates the PassManager pipeline with StripSymbols(debugOnly = true). The stripSymbol pass therefore scans the list of named metadata, drops !llvm.dbg.cu, but leaves !llvm.gcov and !0 (the compileUnit MD) around. The verifier runs, and finds out that there's a CU not listed in !llvm.dbg.cu (as it was previously dropped) -> crash. When we strip debug info, so, check if there's coverage data, and strip it as well, in order to avoid pending metadata left around. Differential Revision: https://reviews.llvm.org/D25689 llvm-svn: 284418
* Ignore debug info when making optimization decisions in SimplifyCFG.Dehao Chen2016-10-172-15/+35
| | | | | | | | | | | | Summary: Debug info should *not* affect code generation. This patch properly handles debug info to make sure the generated code are the same with or without debug info. Reviewers: davidxl, mzolotukhin, jmolloy Subscribers: aprantl, llvm-commits Differential Revision: https://reviews.llvm.org/D25286 llvm-svn: 284415
* Delete dead code.Rafael Espindola2016-10-171-5/+0
| | | | llvm-svn: 284414
* [doc] use double `` to prevent html output of merging double dashMehdi Amini2016-10-171-3/+3
| | | | llvm-svn: 284412
* Test commit.Michael LeMay2016-10-171-1/+1
| | | | llvm-svn: 284411
* Handle relocations to thumb functions when dynamic linking COFF modulesWalter Erquinigo2016-10-173-13/+88
| | | | | | | | | | | | | | | | Summary: This adds the necessary logic to support relocations to thumb functions in the COFF dynamic linker. The jumps to function addresses are mostly blx, which requires the ISA selection bit when jumping to a thumb function. Note: I'm determining if the relocation requires the ISA bit when creating the relocation entries and not when resolving the relocation. I have to do that because I need the ObjectFile and the actual Symbol, which are available only when creating the entries. It would require a gross refactor if I do it otherwise, but I'm okay with doing it if you think it's better. Reviewers: peter.smith, compnerd Subscribers: rengolin, sas Differential Revision: https://reviews.llvm.org/D25151 llvm-svn: 284410
* Return a StringRef instead of a Comdat*.Rafael Espindola2016-10-172-9/+8
| | | | | | | This is a small step in making this interface compatible with an bitcode symbol table. llvm-svn: 284408
* GlobalISel: support wider range of load/store sizes in AArch64.Tim Northover2016-10-172-0/+168
| | | | llvm-svn: 284406
* AMDGPU/SI: LowerParameter() should be computing align based on memory typeTom Stellard2016-10-171-1/+1
| | | | | | | | | | Reviewers: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, tony-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D25203 llvm-svn: 284398
* AMDGPU/SI: Fix LowerParameter() for i16 argumentsTom Stellard2016-10-172-15/+19
| | | | | | | | | | | | | | Summary: If we are loading an i16 value from a 32-bit memory location, then we need to be able to truncate the loaded value to i16. Reviewers: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, tony-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D25198 llvm-svn: 284397
* [DAG] optimize away an arithmetic-right-shift of a 0 or -1 valueSanjay Patel2016-10-172-3/+4
| | | | | | | | | This came up as part of: https://reviews.llvm.org/D25485 Note that the vector case is missed because ComputeNumSignBits() is deficient for vectors. llvm-svn: 284395
* [x86] add tests to show missing DAG folds for arithmetic-shift-rightSanjay Patel2016-10-171-0/+44
| | | | llvm-svn: 284394
* [x86] auto-generate checksSanjay Patel2016-10-171-0/+17
| | | | llvm-svn: 284393
* Rename interface for querying physical hardware concurrencyTeresa Johnson2016-10-173-5/+7
| | | | | | | | | | Based on post-commit review for D25585/r284180, rename hardware_physical_concurrency to heavyweight_hardware_concurrency, to better reflect what type of tasks it should be used for and to enable other systems to map this to something other than the number of physical cores. llvm-svn: 284390
* [Object/ELF] - Check Header->e_shoff value earlier and do not crash.George Rimar2016-10-173-0/+10
| | | | | | | | | Patch checks that section pointer is aligned properly. This should be done before getStringTable() call. Differential revision: https://reviews.llvm.org/D25462 llvm-svn: 284387
* [Support] remove_dots: Remove windows test.Benjamin Kramer2016-10-171-2/+0
| | | | | | | Windows doesn't have roots, so I think this test doesn't make sense there. llvm-svn: 284386
* [Support] remove_dots: Remove .. from absolute paths.Benjamin Kramer2016-10-172-5/+12
| | | | | | | /../foo is still a proper path after removing the dotdot. This should now finally match https://9p.io/sys/doc/lexnames.html [Cleaning names]. llvm-svn: 284384
* [SDAG] Use ABI type alignment for constant pools when optimizing for sizeJames Molloy2016-10-172-1/+22
| | | | | | | | SelectionDAG::getConstantPool will automatically determine an appropriate alignment if one is not specified. It does this by querying the type's preferred alignment. This can end up creating quite a lot of padding when the preferred alignment for vectors is 128. In optimize-for-size mode, it makes sense to instead query the ABI type alignment which is often smaller and causes less padding. llvm-svn: 284381
* [docs] Reduce the number of places 'minimum requirements' is mentioned to oneRenato Golin2016-10-171-1/+2
| | | | llvm-svn: 284380
* [SimplifyCFG] Don't lower complex ConstantExprs to lookup tablesOliver Stannard2016-10-172-1/+44
| | | | | | | | | | Not all ConstantExprs can be represented by a global variable, for example most pointer arithmetic other than addition of a constant, so we can't convert these values from switch statements to lookup tables. Differential Revision: https://reviews.llvm.org/D25550 llvm-svn: 284379
* [SCEV] Consider delinearization pattern with extension with identity factorTobias Grosser2016-10-172-1/+66
| | | | | | | | | | | | Summary: The delinearization algorithm did not consider terms which had an extension without a multiply factor, i.e. a identify factor. We lose cases where size is char type where there will no multiply factor. Reviewers: sanjoy, grosser Subscribers: mzolotukhin, Eugene.Zelenko, llvm-commits, mssimpso, sanjoy, grosser Differential Revision: https://reviews.llvm.org/D16492 llvm-svn: 284378
* [CodeGenPrepare] When moving a zext near to its associated load, do not ↵Andrea Di Biagio2016-10-172-0/+79
| | | | | | | | | | | | | | | | | | | | | | | | | retain the original debug location. CodeGenPrepare knows how to move a zext of a load into the same basic block where the load lives. The goal is to help ISel match a zero-extending load instead of two separated instructions. CGP attempts to move a zext computation even if it lives in a basic block that does not post-dominate the load's basic block. That means, the hoisted zext may be speculated. Preserving the zext location would hurt the debugging experience and the quality of sample pgo. With this patch, when moving a zext near to its associated load, CGP no longer propagates the zext's debug location. Instead, CGP conservatively reuses the same debug location for the load and the zext. An alternative approach would be to assign an artificial line-0 location to the zext. However we don't want to over-use the 'line-0' for this particular case because it would have a size cost in the line-table section for no additional benefit. Differential Revision: https://reviews.llvm.org/D25611 llvm-svn: 284377
* Recommit r284371 "[Object/ELF] - Check that e_shnum is null when e_shoff is."George Rimar2016-10-175-1/+8
| | | | | | | | | | | | | | | | | | | | | With fix: hex edited the precompiled inputs from another testcases to pass new checks. Original commit message: [Object/ELF] - Check that e_shnum is null when e_shoff is. Spec says (http://www.sco.com/developers/gabi/1998-04-29/ch4.eheader.html) : e_shnum This member holds the number of entries in the section header table. Thus the product of e_shentsize and e_shnum gives the section header table's size in bytes. If a file has no section header table, e_shnum holds the value zero. Revealed using "id_000037,sig_11,src_000015,op_havoc,rep_8" from PR30540 That was the reason of crash in lld on incorrect input file. Binary reduced using afl-min. Differential revision: https://reviews.llvm.org/D25090 llvm-svn: 284374
* Revert r284371 "[Object/ELF] - Check that e_shnum is null when e_shoff is."George Rimar2016-10-173-8/+1
| | | | | | | It broke build bot: http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/builds/908/steps/test-stage1-compiler/logs/stdio llvm-svn: 284373
* [Object/ELF] - Check that e_shnum is null when e_shoff is.George Rimar2016-10-173-1/+8
| | | | | | | | | | | | | | | Spec says (http://www.sco.com/developers/gabi/1998-04-29/ch4.eheader.html) : e_shnum This member holds the number of entries in the section header table. Thus the product of e_shentsize and e_shnum gives the section header table's size in bytes. If a file has no section header table, e_shnum holds the value zero. Revealed using "id_000037,sig_11,src_000015,op_havoc,rep_8" from PR30540 That was the reason of crash in lld on incorrect input file. Binary reduced using afl-min. Differential revision: https://reviews.llvm.org/D25090 llvm-svn: 284371
* [Object/ELF] - Do not crash on invalid section index.George Rimar2016-10-173-4/+6
| | | | | | | | | | | | | | | | If object has wrong (large) string table index and also incorrect large value for amount of sections in total, then section index passes the check: if (Index >= getNumSections()) return object_error::invalid_section_index; But result pointer then is far after end of file data, what result in a crash. Differential revision: https://reviews.llvm.org/D25081 llvm-svn: 284369
* Support: Drop LLVM_ATTRIBUTE_UNUSED_RESULTJustin Bogner2016-10-172-9/+4
| | | | | | | | Uses of this have all been updated to use LLVM_NODISCARD, which matches the C++17 [[nodiscard]] semantics rather than those of GCC's __attribute__((warn_unused_result)). llvm-svn: 284367
* [X86] Fix shuffle decoding assertions to print the right number of required ↵Craig Topper2016-10-171-8/+8
| | | | | | operands. Update the checks themselves to be >= to the same number instead of > one less than the required number. llvm-svn: 284365
* ADT: Use LLVM_NODISCARD instead of LLVM_ATTRIBUTE_UNUSED_RESULT for StringRefJustin Bogner2016-10-171-21/+5
| | | | | | | | Instead of annotating (most of) the StringRef API, we can just annotate the type directly. This is less code and it will warn in more cases. llvm-svn: 284364
* [AVX-512] Add shuffle combining support for vpermi2var shuffles derived from ↵Craig Topper2016-10-172-32/+14
| | | | | | existing support for vpermt2var. llvm-svn: 284357
* [AVX-512] Add vpermi2var test cases to shuffle combining test case. ↵Craig Topper2016-10-171-0/+112
| | | | | | Combining will be added in a future commit. llvm-svn: 284356
* [AVX-512] Add support for turning a 256-bit load that goes to both halfs of ↵Craig Topper2016-10-164-73/+99
| | | | | | | | an insert_subvector into a subvector broadcast. Differential Revision: https://reviews.llvm.org/D25650 llvm-svn: 284353
* unittests: Explicitly ignore some return values in crash testsJustin Bogner2016-10-161-16/+18
| | | | | | | | Ideally these would actually check that the results are reasonable, but given that we're looping over so many different kinds of path that isn't really practical. llvm-svn: 284350
* Support: Return void from Scanner::scan_ns_uri_char, no one uses the resultJustin Bogner2016-10-161-7/+2
| | | | | | | Simplify this a little bit since the result is never used. It can be added back easily enough if that changes. llvm-svn: 284348
* MachineModuleInfo: Prefer the LLVM_NODISCARD spellingJustin Bogner2016-10-161-2/+1
| | | | | | | Update a function annotated with LLVM_ATTRIBUTE_UNUSED_RESULT to use LLVM_NODISCARD instead. llvm-svn: 284346
* SCEV: Prefer the LLVM_NODISCARD spellingJustin Bogner2016-10-161-9/+9
| | | | | | | Update functions annotated with LLVM_ATTRIBUTE_UNUSED_RESULT to use LLVM_NODISCARD instead. llvm-svn: 284345
* Support: Prefer the LLVM_NODISCARD spellingJustin Bogner2016-10-161-23/+25
| | | | | | | Update functions annotated with LLVM_ATTRIBUTE_UNUSED_RESULT to use LLVM_NODISCARD instead. llvm-svn: 284344
* ADT: Prefer the LLVM_NODISCARD spellingJustin Bogner2016-10-168-11/+11
| | | | | | | Update functions annotated with LLVM_ATTRIBUTE_UNUSED_RESULT to use LLVM_NODISCARD instead. llvm-svn: 284343
* ADT: Use LLVM_NODISCARD instead of LLVM_ATTRIBUTE_UNUSED_RESULT for ArrayRefJustin Bogner2016-10-161-14/+2
| | | | | | | Instead of annotating (most of) the ArrayRef API, we can just annotate the type directly. This is less code and it will warn in more cases. llvm-svn: 284342
* PR30711: Fix incorrect profiling of 'long long' in FoldingSet, then use it toRichard Smith2016-10-162-4/+25
| | | | | | fix TBAA violation in profiling of pointers. llvm-svn: 284336
* [AVX-512] Fix the operand order for vpermi2var_qi intrinsics to match the ↵Craig Topper2016-10-163-12/+12
| | | | | | other vpermi2var intrinsics. llvm-svn: 284329
* [AVX-512] Correct execution domain for VPERMT2PS and VPERMI2PS.Craig Topper2016-10-168-94/+94
| | | | llvm-svn: 284328
* [AVX-512] Move (v4i64 (X86SubVBroadcast (v2i64))) alternate patterns under a ↵Craig Topper2016-10-161-9/+9
| | | | | | HasVLX predicate. Similar for floating point. llvm-svn: 284327
* [ArmFastISel] Kill dead code. NFCI.Davide Italiano2016-10-161-35/+0
| | | | llvm-svn: 284320
* [MachineMemOperand] Move synchronization scope and atomic orderings from ↵Konstantin Zhuravlyov2016-10-1512-142/+145
| | | | | | | | SDNode to MachineMemOperand, and remove redundant getAtomic* member functions from SelectionDAG. Differential Revision: https://reviews.llvm.org/D24577 llvm-svn: 284312
* [GVN/PRE] Hoist global values outside of loops.Davide Italiano2016-10-153-36/+115
| | | | | | | | | | | In theory this could be generalized to move anything where we prove the operands are available, but that would require rewriting PRE. As NewGVN will hopefully come soon, and we're trying to rewrite PRE in terms of NewGVN+MemorySSA, it's probably not worth spending too much time on it. Fix provided by Daniel Berlin! llvm-svn: 284311
OpenPOWER on IntegriCloud