summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* [PGO] eliminate use of static variableXinliang David Li2016-01-221-7/+10
| | | | llvm-svn: 258486
* NFC WebAssembly: update linksJF Bastien2016-01-221-2/+2
| | | | | | I got a vanity URL, and moved the github waterfall repo. llvm-svn: 258484
* [SelectionDAG] Fold more offsets into GlobalAddressesDan Gohman2016-01-222-75/+123
| | | | | | | | This reapplies r258296 and r258366, and also fixes an existing bug in SelectionDAG.cpp's isMemSrcFromString, neglecting to account for the offset in a GlobalAddressSDNode, which is uncovered by those patches. llvm-svn: 258482
* Replace Type::getInt32Ty() and comparison by isIntegerTy(32). NFC.Manuel Jacob2016-01-221-3/+1
| | | | llvm-svn: 258480
* Revert r258473 as it's breaking the build with libc++Ivan Krasin2016-01-224-57/+17
| | | | | | | | Reviewers: kcc Differential Revision: http://reviews.llvm.org/D16441 llvm-svn: 258479
* [opaque pointer types] [NFC] DataLayout::getIndexedOffset: take source ↵Eduard Burtescu2016-01-224-31/+25
| | | | | | | | | | | | | | element type instead of pointer type and rename to getIndexedOffsetInType. Summary: Reviewers: mjacob, dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16282 llvm-svn: 258478
* [opaque pointer types] [NFC] FindAvailableLoadedValue: take LoadInst instead ↵Eduard Burtescu2016-01-224-7/+7
| | | | | | | | | | | | of just the pointer. Reviewers: mjacob, dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16422 llvm-svn: 258477
* [opaque pointer types] [NFC] gep_type_{begin,end} now take source element ↵Eduard Burtescu2016-01-221-1/+4
| | | | | | | | | | | | type and address space. Reviewers: mjacob, dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16436 llvm-svn: 258474
* Use std::piecewise_constant_distribution instead of ad-hoc binary search.Ivan Krasin2016-01-224-17/+57
| | | | | | | | | | | | | | | | | | Summary: Fix the issue with the most recently discovered unit receiving much less attention. Note: I had to change the seed for one test to make it pass. Alternatively, the number of runs could be increased. I believe that the average time of 'foo' discovery is not increased, just seed=1 was particularly convenient for the previous PRNG scheme used. Reviewers: aizatsky, kcc Subscribers: llvm-commits, kcc Differential Revision: http://reviews.llvm.org/D16419 llvm-svn: 258473
* [opaque pointer types] [NFC] Add an explicit type argument to ↵Eduard Burtescu2016-01-226-28/+28
| | | | | | | | | | | | ConstantFoldLoadFromConstPtr. Reviewers: mjacob, dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16418 llvm-svn: 258472
* Do not lower VSETCC if operand is an f16 vectorPirama Arumuga Nainar2016-01-221-0/+3
| | | | | | | | | | | | | | | | | Summary: SETCC with f16 vectors has OperationAction set to Expand but still gets lowered to FCM* intrinsics based on its result type. This patch skips lowering of VSETCC if the operand is an f16 vector. v4 and v8 tests included. Reviewers: ab, jmolloy Subscribers: srhines, llvm-commits Differential Revision: http://reviews.llvm.org/D15361 llvm-svn: 258471
* Revert "[SelectionDAG] Fold more offsets into GlobalAddresses"Reid Kleckner2016-01-222-120/+73
| | | | | | | | | | | | | | This reverts r258296 and the follow up r258366. With this change, we miscompiled the following program on Windows: #include <string> #include <iostream> static const char kData[] = "asdf jkl;"; int main() { std::string s(kData + 3, sizeof(kData) - 3); std::cout << s << '\n'; } llvm-svn: 258465
* [libFuzzer] don't do expensive memmem if the result will not be usedKostya Serebryany2016-01-221-0/+2
| | | | llvm-svn: 258462
* [ThinLTO] Do metadata linking during batch function importingTeresa Johnson2016-01-222-29/+7
| | | | | | | | | | | | | | | | | | | | Summary: Since we are currently not doing incremental importing there is no need to link metadata as a postpass. The module linker will only link in the imported subroutines due to the functionality added by r256003. (Note that the metadata postpass linking functionalitiy is still used by llvm-link, and may be needed here in the future if a more incremental strategy is adopted.) Reviewers: joker.eph Subscribers: joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D16424 llvm-svn: 258458
* [opaque pointer types] [NFC] Take advantage of get{Source,Result}ElementType ↵Eduard Burtescu2016-01-211-45/+58
| | | | | | | | | | | | | | when folding GEPs. Summary: Reviewers: mjacob, dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16302 llvm-svn: 258456
* move function definitions so we don't need separate declarations ; NFCISanjay Patel2016-01-211-67/+63
| | | | llvm-svn: 258455
* [LibCallSimplifier] refactor FP function signature checks ; NFCISanjay Patel2016-01-211-60/+24
| | | | | | | | | Use the helper function added in r258428. The check should really be hoisted to the caller of all of these optimize* functions, but that's another step. llvm-svn: 258446
* avoid variable shadowing; NFCSanjay Patel2016-01-211-2/+2
| | | | llvm-svn: 258445
* remove unnecessary variable; NFCSanjay Patel2016-01-211-2/+1
| | | | llvm-svn: 258444
* Avoid unnecessary stack realignment in musttail thunks with SSE2 enabledReid Kleckner2016-01-211-1/+2
| | | | | | | | | | | The X86 musttail implementation finds register parameters to forward by running the calling convention algorithm until a non-register location is returned. However, assigning a vector memory location has the side effect of increasing the function's stack alignment. We shouldn't increase the stack alignment when we are only looking for register parameters, so this change conditionalizes it. llvm-svn: 258442
* [X86][SSE] Improve i16 splatting shufflesSimon Pilgrim2016-01-211-0/+20
| | | | | | | | | | | | Better handling of the annoying pshuflw/pshufhw ops which only shuffle lower/upper halves of a vector. Added vXi16 unary shuffle support for cases where i16 elements (from the same half of the source) are being splatted to the whole of one of the halves. This avoids the general lowering case which must shuffle the 32-bit elements first - meaning that we used to end up with unnecessary duplicate pshuflw/pshufhw shuffles. Note this has the side effect of a lot of SSSE3 test cases no longer needing to use PSHUFB, as it falls below the 3 op combine threshold for when PSHUFB is typically worth it. I've raised PR26183 to discuss if the threshold should be changed and whether we need to make it more specific to the target CPU. Differential Revision: http://reviews.llvm.org/D14901 llvm-svn: 258440
* [RuntimeDyld][AArch64] Add support for the MachO ARM64_RELOC_SUBTRACTOR reloc.Lang Hames2016-01-211-1/+53
| | | | llvm-svn: 258438
* Fix for two constant propagation problems in GVN with the assume intrinsicDavid L Kreitzer2016-01-212-4/+5
| | | | | | | | | | instruction. Patch by Yuanrui Zhang. Differential Revision: http://reviews.llvm.org/D16100 llvm-svn: 258435
* Fix MachOObjectFile::getSymbolSection() to not call report_fatal_error()Kevin Enderby2016-01-211-1/+1
| | | | | | | | | but to return object_error::parse_failed.  Then made the code in llvm-nm do for Mach-O files what is done in the darwin native tools which is to print "(?,?)" or just "s" for bad section indexes. Also added a test to show it prints the bad section index of "42" when printing the fields as raw hex. llvm-svn: 258434
* [LibCallSimplifier] don't get fooled by a fake fmin()Sanjay Patel2016-01-211-9/+25
| | | | | | | | | | | | | | | | This is similar to the bug/fix: https://llvm.org/bugs/show_bug.cgi?id=26211 http://reviews.llvm.org/rL258325 The fmin() test case reveals another bug caused by sloppy code duplication. It will crash without this patch because fp128 is a valid floating-point type, but we would think that we had matched a function that used doubles. The new helper function can be used to replace similar checks that are used in several other places in this file. llvm-svn: 258428
* [InstCombine] Simplify (x >> y) <= xDavid Majnemer2016-01-211-2/+4
| | | | | | | | | | | | This commit extends the patterns recognised by InstSimplify to also handle (x >> y) <= x in the same way as (x /u y) <= x. The missing optimisation was found investigating why LLVM did not optimise away bound checks in a binary search: https://github.com/rust-lang/rust/pull/30917 Patch by Andrea Canciani! Differential Revision: http://reviews.llvm.org/D16402 llvm-svn: 258422
* Partially revert "Add command line options to force function/loop alignments."Chad Rosier2016-01-211-10/+0
| | | | | | This partially reverts r256571 in favor of the solution in r258409. llvm-svn: 258421
* [PGO] Passmanagerbuilder change that enable IR level PGO instrumentationRong Xu2016-01-212-1/+30
| | | | | | | | | | This patch includes the passmanagerbuilder change that enables IR level PGO instrumentation. It adds two passmanagerbuilder options: -profile-generate=<profile_filename> and -profile-use=<profile_filename>. The new options are primarily for debug purpose. Reviewers: davidxl, silvas Differential Revision: http://reviews.llvm.org/D15828 llvm-svn: 258420
* [TTI] Add getCacheLineSizeAdam Nemet2016-01-214-5/+20
| | | | | | | | | | | | | | | | | Summary: And use it in PPCLoopDataPrefetch.cpp. @hfinkel, please let me know if your preference would be to preserve the ppc-loop-prefetch-cache-line option in order to be able to override the value of TTI::getCacheLineSize for PPC. Reviewers: hfinkel Subscribers: hulx2000, mcrosier, mssimpso, hfinkel, llvm-commits Differential Revision: http://reviews.llvm.org/D16306 llvm-svn: 258419
* [PGO] IR level instrumentation of indirect call value profilingRong Xu2016-01-211-4/+52
| | | | | | | | | | This patch adds the instrumentation for indirect call value profiling. It finds all the indirect call-sites and generates instrprof_value_profile intrinsic calls. A new opt level option -disable-vp is introduced to disable this instrumentation. Reviewers: davidxl, betulb, vsk Differential Revision: http://reviews.llvm.org/D16016 llvm-svn: 258417
* make helper functions static; NFCISanjay Patel2016-01-211-7/+5
| | | | llvm-svn: 258416
* Undo r258163 "Move part of an if condition into an assertion. NFC."Manuel Jacob2016-01-211-2/+2
| | | | | | | | This undoes the change made in r258163. The assertion fails if `Ptr` is of a vector type. The previous code doesn't look completely correct either, so I'll investigate this more. llvm-svn: 258411
* [BlockPlacement] Add option to align all non-fall-through blocks.Geoff Berry2016-01-211-0/+16
| | | | | | | | | | | | Summary: This option is being added for testing purposes. Reviewers: mcrosier Subscribers: mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D16410 llvm-svn: 258409
* Revert "[SLP] Truncate expressions to minimum required bit width"Matthew Simpson2016-01-211-143/+11
| | | | | | This reverts commit r258404. llvm-svn: 258408
* Use early return to simplify code (NFC)Teresa Johnson2016-01-211-22/+21
| | | | | | Follow on to r258405. llvm-svn: 258407
* [GCOV] Avoid emitting profile arcs for module and skeleton CUsVedant Kumar2016-01-211-0/+10
| | | | | | | | | | | | | | | | | | | Do not emit profile arc files and note files for module and skeleton CU's. Our users report seeing unexpected *.gcda and *.gcno files in their projects when using gcov-style profiling with modules or frameworks. The unwanted files come from these modules. This is not very helpful for end-users. Further, we've seen reports of instrumented programs crashing while writing these files out (due to I/O failures). rdar://problem/22838296 Reviewed-by: aprantl Differential Revision: http://reviews.llvm.org/D15997 llvm-svn: 258406
* [ThinLTO] Avoid unnecesary hash lookups during metadata linking (NFC)Teresa Johnson2016-01-212-19/+20
| | | | | | | Replace sequences of count() followed by operator[] with either find() or insert(), depending on the context. llvm-svn: 258405
* [SLP] Truncate expressions to minimum required bit widthMatthew Simpson2016-01-211-11/+143
| | | | | | | | | | | | | | | This change attempts to produce vectorized integer expressions in bit widths that are narrower than their scalar counterparts. The need for demotion arises especially on architectures in which the small integer types (e.g., i8 and i16) are not legal for scalar operations but can still be used in vectors. Like similar work done within the loop vectorizer, we rely on InstCombine to perform the actual type-shrinking. We use the DemandedBits analysis and ComputeNumSignBits from ValueTracking to determine the minimum required bit width of an expression. Differential revision: http://reviews.llvm.org/D15815 llvm-svn: 258404
* [mips] Allowed dla instructions on 32-bit architectures.Scott Egerton2016-01-211-5/+15
| | | | | | | | | | | | | | | Summary: This is now the same as the behaviour of the GNU assembler. This was done as it is required in order to build the Linux kernel with the integrated assembler enabled. Reviewers: dsanders, vkalintiris Subscribers: dsanders, llvm-commits Differential Revision: http://reviews.llvm.org/D13594 llvm-svn: 258400
* AVX512: Masked move intrinsic implementation.Igor Breger2016-01-212-11/+24
| | | | | | | | Implemented intrinsic for the follow instructions (reg move) : VMOVDQU8/16, VMOVDQA32/64, VMOVAPS/PD. Differential Revision: http://reviews.llvm.org/D16316 llvm-svn: 258398
* [AVX512] Adding VPERMT2B and VPERMI2B Intrinsics Michael Zuckerman2016-01-211-0/+18
| | | | | | Differential Revision: http://reviews.llvm.org/D16398 llvm-svn: 258397
* PR26172: unnecessary indirection in HexagonCopyToCombine.cppKrzysztof Parzyszek2016-01-211-1/+1
| | | | llvm-svn: 258395
* [X86] - Removing warning on legal cases caused by commit r258132Marina Yatsina2016-01-211-4/+13
| | | | | | | | | | | | | There's an overloading of the "movsd" and "cmpsd" instructions, e.g. movsd can be either "Move Data from String to String" or "Move or Merge Scalar Double-Precision Floating-Point Value". The former should produce warnings when parsing a memory operand that is not ESI/EDI, but the latter should not. Fixed the code to produce warnings only after making sure we're dealing with the first case. Expanded the tests of the produced warnings + fixed RUN line of the test so that it would check both stdout and stderr Differential Revision: http://reviews.llvm.org/D16359 llvm-svn: 258393
* Change ConstantFoldInstOperands to take Instruction instead of opcode and ↵Manuel Jacob2016-01-215-57/+61
| | | | | | | | | | | | | | | | | | | | | type. NFC. Summary: The previous form, taking opcode and type, is moved to an internal helper and the new form, taking an instruction, is a wrapper around this helper. Although this is a slight cleanup on its own, the main motivation is to refactor the constant folding API to ease migration to opaque pointers. This will be follow-up work. Reviewers: eddyb Subscribers: dblaikie, llvm-commits Differential Revision: http://reviews.llvm.org/D16383 llvm-svn: 258391
* Introduce ConstantFoldCastOperand function and migrate some callers of ↵Manuel Jacob2016-01-213-61/+73
| | | | | | | | | | | | | | | | | ConstantFoldInstOperands to use it. NFC. Summary: Although this is a slight cleanup on its own, the main motivation is to refactor the constant folding API to ease migration to opaque pointers. This will be follow-up work. Reviewers: eddyb Subscribers: zzheng, dblaikie, llvm-commits Differential Revision: http://reviews.llvm.org/D16380 llvm-svn: 258390
* Introduce ConstantFoldBinaryOpOperands function and migrate some callers of ↵Manuel Jacob2016-01-212-78/+42
| | | | | | | | | | | | | | | | | ConstantFoldInstOperands to use it. NFC. Summary: Although this is a slight cleanup on its own, the main motivation is to refactor the constant folding API to ease migration to opaque pointers. This will be follow-up work. Reviewers: eddyb Subscribers: dblaikie, llvm-commits Differential Revision: http://reviews.llvm.org/D16378 llvm-svn: 258389
* AMDGPU/SI: Pass whether to use the SI scheduler via Target AttributeTom Stellard2016-01-214-1/+13
| | | | | | | | | | | | | | | | Summary: Currently the SI scheduler can be selected via command line option, but it turned out it would be better if it was selectable via a Target Attribute. This patch adds "si-scheduler" attribute to the backend. Reviewers: tstellarAMD, echristo Subscribers: echristo, arsenm Differential Revision: http://reviews.llvm.org/D16192 llvm-svn: 258386
* Rename MCLineEntry to MCDwarfLineEntryDavid Majnemer2016-01-212-9/+9
| | | | | | | MCLineEntry gives the impression that it is generic MC machinery. However, it is specific to DWARF. llvm-svn: 258381
* [libFuzzer] don't use std::vector in one more hot pathKostya Serebryany2016-01-211-6/+29
| | | | llvm-svn: 258380
* [GlobalISel] make library an optional componentAndrew Wilkins2016-01-211-1/+1
| | | | | | | | | | | | | | | | | | | Summary: Mark the LLVMGlobalISel library as optional in LLVMBuild.txt, since the library is only built if LLVM_BUILD_GLOBAL_ISEL is set. Without doing this, llvm-config includes the library in the list of components regardless of whether it's built, and then will error out when asked for the library names/paths. Reviewers: qcolombet Subscribers: joker.eph, llvm-commits, vkalintiris Differential Revision: http://reviews.llvm.org/D16386 llvm-svn: 258379
OpenPOWER on IntegriCloud