summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [PM] Make default pipeline test for the new PM strictMichael Kuperstein2017-01-192-83/+176
| | | | | | | | | | | | | | | | | Use CHECK-NEXT to verify that a test breaks whenever unexpected passes, analyses, or invalidations show up in default pipelines. The test case is constructed so that we don't expect to invalidate anything, and needs to be kept that way. The test is slightly less strict than we'd like because of differences in type pretty-printing. (Right now it does show some invalidations - all of those are intentional and temporary.) Differential Revision: https://reviews.llvm.org/D28887 llvm-svn: 292536
* [pdb] Add HashTable data structure.Zachary Turner2017-01-198-174/+606
| | | | | | | | | | | | | | | | This was being parsed / serialized ad-hoc inside the code for a specific PDB stream. But this data structure is used in multiple ways / places within the PDB format. To be able to re-use it we need to raise this code out and make it more generic. In doing so, a number of bugs are fixed in the original implementation, and support is added for growing the hash table and deleting items from the hash table, which had either been omitted or incorrect implemented in the initial version. Differential Revision: https://reviews.llvm.org/D28715 llvm-svn: 292535
* Revert r292530 since it breaks buildbots.Michael Kuperstein2017-01-192-176/+83
| | | | llvm-svn: 292534
* clang-format SampleProfile.cpp (NFC)Dehao Chen2017-01-191-6/+4
| | | | llvm-svn: 292533
* LTO: Flush the resolution file after writing to it.Peter Collingbourne2017-01-191-0/+1
| | | | | | Without this the file could be truncated if the linker crashes. llvm-svn: 292532
* [SCCP] Teach the pass how to handle `div` with overdefined operands.Davide Italiano2017-01-192-0/+38
| | | | | | | | | | | | | | | | | | This can prove that: extern int f; int g() { int x = 0; for (int i = 0; i < 365; ++i) { x /= f; } return x; } always returns zero. Thanks to Sanjoy for confirming this transformation actually made sense (bugs are mine). llvm-svn: 292531
* [PM] Make default pipeline test for the new PM strictMichael Kuperstein2017-01-192-83/+176
| | | | | | | | | | | | | | Use CHECK-NEXT to verify that a test breaks whenever unexpected passes, analyses, or invalidations show up in default pipelines. The test case is constructed so that we don't expect to invalidate anything, and needs to be kept that way. (Right now it does show some invalidations - all of those are intentional and temporary.) Differential Revision: https://reviews.llvm.org/D28887 llvm-svn: 292530
* Revert "[InlineCost] Use TTI to check if GEP is free."Haicheng Wu2017-01-192-47/+2
| | | | | | This reverts commit r292526. The test case has problem. llvm-svn: 292529
* [SelectionDAG] Improve knownbits handling of UMIN/UMAX (PR31293)Simon Pilgrim2017-01-192-15/+35
| | | | | | | | | | | | This patch improves the knownbits logic for unsigned integer min/max opcodes. For UMIN we know that the result will have the maximum of the inputs' known leading zero bits in the result, similarly for UMAX the maximum of the inputs' leading one bits. This is particularly useful for simplifying clamping patterns,. e.g. as SSE doesn't have a uitofp instruction we want to use sitofp instead where possible and for that we need to confirm that the top bit is not set. Differential Revision: https://reviews.llvm.org/D28853 llvm-svn: 292528
* [InlineCost] Use TTI to check if GEP is free.Haicheng Wu2017-01-192-2/+47
| | | | | | | | | | Currently, a GEP is considered free only if its indices are all constant. TTI::getGEPCost() can give target-specific more accurate analysis. TTI is already used for the cost of many other instructions. Differential Revision: https://reviews.llvm.org/D28693 llvm-svn: 292526
* [AMDGPU] Add exec copy to LiveIntervals in SILowerControlFlow::emitElseStanislav Mekhanoshin2017-01-191-1/+3
| | | | | | | | | This instruction is missing from LiveIntervals. I'm not aware of any problems because of this though. Differential Revision: https://reviews.llvm.org/D28879 llvm-svn: 292521
* [libFuzzer] ensure that entries in PersistentAutoDictionary are not emptyKostya Serebryany2017-01-191-0/+3
| | | | llvm-svn: 292520
* [SCCP] Update comment in visitBinaryOp() after recent changes.Davide Italiano2017-01-191-3/+4
| | | | llvm-svn: 292519
* [XRay][Arm] Repair XRay table emission on Arm32 and add tests to identify ↵Serge Rogatch2017-01-193-0/+15
| | | | | | | | | | | | | | | | | | | such problem earlier Summary: Emission of XRay table was occasionally disabled for Arm32, but this bug was not then detected because earlier (also by mistake) testing of XRay was occasionally disabled on 32-bit Arm targets. This patch should fix that problem and detect such problems in the future. This patch is one of a series, see also - https://reviews.llvm.org/D28623 Reviewers: rengolin, dberris Reviewed By: dberris Subscribers: llvm-commits, aemerson, rengolin, dberris, iid_iunknown Differential Revision: https://reviews.llvm.org/D28624 llvm-svn: 292516
* [Assembler] Improve error when unable to evaluate expression.Chad Rosier2017-01-196-33/+36
| | | | | | | | | Add a SMLoc to MCExpr. Most code does not generate or consume the SMLoc (yet). Patch by Sanne Wouda <sanne.wouda@arm.com>! Differential Revision: https://reviews.llvm.org/D28861 llvm-svn: 292515
* Fix aliases to thumbfunc-based exprs to be thumbfunc.Evgeniy Stepanov2017-01-192-3/+19
| | | | | | | | | If F is a Thumb function symbol, and G = F + const, and G is a function symbol, then G is Thumb. Because what else could it be? Differential Revision: https://reviews.llvm.org/D28878 llvm-svn: 292514
* [libFuzzer] improve -minimize_crash: honor -artifact_prefix= and don't ↵Kostya Serebryany2017-01-195-12/+37
| | | | | | special case 2-byte inputs llvm-svn: 292511
* Improve what can be promoted in LICM.Xin Tong2017-01-192-9/+149
| | | | | | | | | | | | | | | | Summary: In case of non-alloca pointers, we check for whether it is a pointer from malloc-like calls and it is not captured. In such case, we can promote the pointer, as the caller will have no way to access this pointer even if there is unwinding in middle of the loop. Reviewers: hfinkel, sanjoy, reames, eli.friedman Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28834 llvm-svn: 292510
* [libFuzzer] add two tests for experimenting with equivalence fuzzingKostya Serebryany2017-01-194-0/+46
| | | | llvm-svn: 292509
* Add an interface to scale the frequencies of a set of blocks.Easwaran Raman2017-01-193-0/+36
| | | | | | | | The scaling is done with reference to the the new frequency of a reference block. Differential Revision: https://reviews.llvm.org/D28535 llvm-svn: 292507
* [InstCombine] Simplify gep (gep p, a), (b-a)Davide Italiano2017-01-192-19/+40
| | | | | | | | Patch by Andrea Canciani. Differential Revision: https://reviews.llvm.org/D27413 llvm-svn: 292506
* [X86][SSE] Improve comments describing combineTruncatedArithmetic. NFCI.Simon Pilgrim2017-01-191-0/+7
| | | | llvm-svn: 292502
* Remove this test from the r292500 commit till Chris and I figure outKevin Enderby2017-01-191-50/+0
| | | | | | why it is failing on a couple of build bots. llvm-svn: 292501
* Add support for the new LC_NOTE load command.Kevin Enderby2017-01-1911-0/+137
| | | | | | | | | | It describes a region of arbitrary data included in a Mach-O file. Its initial use is to record extra data in MH_CORE files. rdar://30001545 rdar://30001731 llvm-svn: 292500
* [X86][SSE] Attempt to pre-truncate arithmetic operations that have already ↵Simon Pilgrim2017-01-192-235/+97
| | | | | | | | been extended As discussed on D28219 - it is profitable to combine trunc(binop (s/zext(x), s/zext(y)) to binop(trunc(s/zext(x)), trunc(s/zext(y))) assuming the trunc(ext()) will simplify further llvm-svn: 292493
* [InstCombine] icmp Pred (shl nsw X, C1), C0 --> icmp Pred X, C0 >> C1Sanjay Patel2017-01-192-74/+68
| | | | | | | | | | | | | | Try harder to fold icmp with shl nsw as discussed here: http://lists.llvm.org/pipermail/llvm-dev/2017-January/108749.html This is similar to the 'shl nuw' transforms that were added with D25913. This may eventually help solve: https://llvm.org/bugs/show_bug.cgi?id=30773 Differential Revision: https://reviews.llvm.org/D28406 llvm-svn: 292492
* [X86][SSE] Added tests for pre-truncating arithmetic operations that have ↵Simon Pilgrim2017-01-191-0/+127
| | | | | | | | already been extended As discussed on D28219 - it is profitable to combine trunc(binop (s/zext(x), s/zext(y)) to binop(trunc(s/zext(x)), trunc(s/zext(y))) assuming the trunc(ext()) will simplify further llvm-svn: 292487
* [DAG] Don't increase SDNodeOrder for dbg.value/declare.Mikael Holmen2017-01-194-4/+199
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: The SDNodeOrder is saved in the IROrder field in the SDNode, and this field may affects scheduling. Thus, letting dbg.value/declare increase the order numbers may in turn affect scheduling. Because of this change we also need to update the code deciding when dbg values should be output, in ScheduleDAGSDNodes.cpp/ProcessSDDbgValues. Dbg values now have the same order as the SDNode they are connected to, not the following orders. Test cases provided by Florian Hahn. Reviewers: bogner, aprantl, sunfish, atrick Reviewed By: atrick Subscribers: fhahn, probinson, andreadb, llvm-commits, MatzeB Differential Revision: https://reviews.llvm.org/D25318 llvm-svn: 292485
* [docs] Tell Doxygen to expand LLVM_ALIGNAS to nothingMalcolm Parsons2017-01-191-3/+3
| | | | | | | | | | | | | | | | | Summary: Docs for clang::Decl and clang::TemplateSpecializationType have not been generated since LLVM_ALIGNAS was added to them. Tell Doxygen to expand LLVM_ALIGNAS to nothing as described at https://www.stack.nl/~dimitri/doxygen/manual/preprocessing.html Reviewers: aaron.ballman, klimek, alexfh Subscribers: ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D28850 llvm-svn: 292483
* Test commit access, remove trailing whitespaceMikael Holmen2017-01-191-1/+1
| | | | llvm-svn: 292482
* [GlobalISel] Pointers are legal operands for G_SELECT on AArch64Kristof Beyls2017-01-193-2/+14
| | | | | | Differential Revision: https://reviews.llvm.org/D28805 llvm-svn: 292481
* Recommiting unsigned saturation with a bugfix.Elena Demikhovsky2017-01-193-0/+353
| | | | | | | A test case that crached is added to avx512-trunc.ll. (PR31589) llvm-svn: 292479
* Re-commit: [globalisel] Tablegen-erate current Register Bank InformationDaniel Sanders2017-01-1917-193/+442
| | | | | | | | | | | | | | | | | | | | | Summary: Adds a RegisterBank tablegen class that can be used to declare the register banks and an associated tablegen pass to generate the necessary code. Changes since first commit attempt: * Added missing guards * Added more missing guards * Found and fixed a use-after-free bug involving Twine locals Reviewers: t.p.northover, ab, rovka, qcolombet Reviewed By: qcolombet Subscribers: aditya_nandakumar, rengolin, kristof.beyls, vkalintiris, mgorny, dberris, llvm-commits, rovka Differential Revision: https://reviews.llvm.org/D27338 llvm-svn: 292478
* GlobalISel: Implement widening for shiftsJustin Bogner2017-01-192-5/+53
| | | | llvm-svn: 292476
* [AVX-512] Add test cases that show where we are using two subvector inserts ↵Craig Topper2017-01-192-0/+58
| | | | | | | | | | to broadcast a 128-bit subvector into a 512-bit vector. We'd be better off using something like SHUFF32X4. If the subvector comes from a load, we convert to SUBV_BROADCAST and use a broadcast instruction. But if there is no load we keep the inserts. I think we should create the SUBV_BROADCAST even without the load and let isel use the fallback patterns that are used if the load can't be folded. This will use the SHUFF32X4 or similar instruction for the 128-bit into 512-bit case and a single insert for 128 into 256 or 256 into 512. This should be fixed so subvector broadcast intrinsics can be replaced with native IR since some of those currently lower directly to SHUFF32X4. llvm-svn: 292475
* [AVX-512] Support ADD/SUB/MUL of mask vectorsCraig Topper2017-01-193-18/+223
| | | | | | | | | | | | | | | | | Summary: Currently we expand and scalarize these operations, but I think we should be able to implement ADD/SUB with KXOR and MUL with KAND. We already do this for scalar i1 operations so I just extended it to vectors of i1. Reviewers: zvi, delena Reviewed By: delena Subscribers: guyblank, llvm-commits Differential Revision: https://reviews.llvm.org/D28888 llvm-svn: 292474
* AMDGPU: Disable some fneg combines unless nszMatt Arsenault2017-01-194-41/+122
| | | | | | | | | | | | For -(x + y) -> (-x) + (-y), if x == -y, this would change the result from -0.0 to 0.0. Since the fma/fmad combine is an extension of this problem it also applies there. fmul should be fine, and I don't think any of the unary operators or conversions should be a problem either. llvm-svn: 292473
* AMDGPU: Remove modifiers from v_div_scale_*Matt Arsenault2017-01-195-18/+14
| | | | | | | | They seem to produce nonsense results when used. This should be applied to the release branch. llvm-svn: 292472
* [X86] Merge LowerADD and LowerSUB into a single LowerADD_SUB since they are ↵Craig Topper2017-01-191-13/+3
| | | | | | identical. llvm-svn: 292469
* [sancov] applying blacklist to covered points tooMike Aizatsky2017-01-193-6/+30
| | | | | | Differential Revision: https://reviews.llvm.org/D28872 llvm-svn: 292468
* llvm-cxxfilt: filter out invalid manglingsSaleem Abdulrasool2017-01-192-3/+12
| | | | | | | | | | c++filt does not attempt to demangle symbols which do not match its expected format. This means that the symbol must start with _Z or ___Z (block invocation function extension). Any other symbols are returned as is. Note that this is different from the behaviour of __cxa_demangle which will demangle fragments. llvm-svn: 292467
* [AVX-512] Use VSHUF instructions instead of two inserts as fallback for ↵Craig Topper2017-01-192-90/+39
| | | | | | subvector broadcasts that can't fold the load. llvm-svn: 292466
* [AVX-512] Add additional test cases for broadcast intrinsics that ↵Craig Topper2017-01-194-0/+158
| | | | | | demonstates that we don't fold the loads to use a broadcast instruction. llvm-svn: 292465
* [PM] Add LoopVectorize to the default module pipelineMichael Kuperstein2017-01-192-4/+1
| | | | | | | | LV no longer "requires" LCSSA and LoopSimplify, and instead forms them internally as required. So, there's nothing preventing it from being enabled. llvm-svn: 292464
* LowerTypeTests: Implement exporting of type identifiers.Peter Collingbourne2017-01-197-31/+359
| | | | | | | | | | | | Type identifiers are exported by: - Adding coarse-grained information about how to test the type identifier to the summary. - Creating symbols in the object file (aliases and absolute symbols) containing fine-grained information about the type identifier. Differential Revision: https://reviews.llvm.org/D28424 llvm-svn: 292462
* GlobalISel: Implement narrowing for G_LOADJustin Bogner2017-01-192-0/+36
| | | | llvm-svn: 292461
* GlobalISel: Fix text wrapping in a comment. NFCJustin Bogner2017-01-191-2/+1
| | | | llvm-svn: 292460
* Use an actual valid register in testMatthias Braun2017-01-191-2/+2
| | | | llvm-svn: 292459
* Add -debug-info-for-profiling to emit more debug info for sample pgo profile ↵Dehao Chen2017-01-197-10/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | collection Summary: SamplePGO binaries built with -gmlt to collect profile. The current -gmlt debug info is limited, and we need some additional info: * start line of all subprograms * linkage name of all subprograms * standalone subprograms (functions that has neither inlined nor been inlined) This patch adds these information to the -gmlt binary. The impact on speccpu2006 binary size (size increase comparing with -g0 binary, also includes data for -g binary, which does not change with this patch): -gmlt(orig) -gmlt(patched) -g 433.milc 4.68% 5.40% 19.73% 444.namd 8.45% 8.93% 45.99% 447.dealII 97.43% 115.21% 374.89% 450.soplex 27.75% 31.88% 126.04% 453.povray 21.81% 26.16% 92.03% 470.lbm 0.60% 0.67% 1.96% 482.sphinx3 5.77% 6.47% 26.17% 400.perlbench 17.81% 19.43% 73.08% 401.bzip2 3.73% 3.92% 12.18% 403.gcc 31.75% 34.48% 122.75% 429.mcf 0.78% 0.88% 3.89% 445.gobmk 6.08% 7.92% 42.27% 456.hmmer 10.36% 11.25% 35.23% 458.sjeng 5.08% 5.42% 14.36% 462.libquantum 1.71% 1.96% 6.36% 464.h264ref 15.61% 16.56% 43.92% 471.omnetpp 11.93% 15.84% 60.09% 473.astar 3.11% 3.69% 14.18% 483.xalancbmk 56.29% 81.63% 353.22% geomean 15.60% 18.30% 57.81% Debug info size change for -gmlt binary with this patch: 433.milc 13.46% 444.namd 5.35% 447.dealII 18.21% 450.soplex 14.68% 453.povray 19.65% 470.lbm 6.03% 482.sphinx3 11.21% 400.perlbench 8.91% 401.bzip2 4.41% 403.gcc 8.56% 429.mcf 8.24% 445.gobmk 29.47% 456.hmmer 8.19% 458.sjeng 6.05% 462.libquantum 11.23% 464.h264ref 5.93% 471.omnetpp 31.89% 473.astar 16.20% 483.xalancbmk 44.62% geomean 16.83% Reviewers: davidxl, echristo, dblaikie Reviewed By: echristo, dblaikie Subscribers: aprantl, probinson, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D25434 llvm-svn: 292457
* [LV] Run loop-simplify and LCSSA explicitly instead of "requiring" themMichael Kuperstein2017-01-193-13/+71
| | | | | | | | | | | | This changes the vectorizer to explicitly use the loopsimplify and lcssa utils, instead of "requiring" the transformations as if they were analyses. This is not NFC, since it changes the LCSSA behavior - we no longer run LCSSA for all loops, but rather only for the loops we expect to modify. Differential Revision: https://reviews.llvm.org/D28868 llvm-svn: 292456
OpenPOWER on IntegriCloud