summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* [Sparc] Use MCPhysReg instead of unsigned to size static arrays of ↵Craig Topper2015-10-181-6/+7
| | | | | | registers. Should reduce the table size. llvm-svn: 250644
* Use array_lengthof. NFCCraig Topper2015-10-181-1/+1
| | | | llvm-svn: 250643
* Make a bunch of static arrays const.Craig Topper2015-10-1815-41/+48
| | | | llvm-svn: 250642
* [RuntimeDyld] Add support for absolute symbols.Lang Hames2015-10-183-18/+42
| | | | llvm-svn: 250639
* Minor Instr PGO code restructuringXinliang David Li2015-10-183-115/+42
| | | | | | | | | | | | | | | | 1. Key constant values (version, magic) and data structures related to raw and indexed profile format are moved into one centralized file: InstrProf.h. 2. Utility function such as MD5Hash computation is also moved to the common header to allow sharing with other components in the future. 3. A header data structure is introduced for Indexed format so that the reader and writer can always be in sync. 4. Added some comments to document different places where multiple definition of the data structure must be kept in sync (reader/writer, runtime, lowering etc). No functional change is intended. Differential Revision: http://reviews.llvm.org/D13758 llvm-svn: 250638
* [SCEV] Fix whitespace issues and remove extra braces; NFCSanjoy Das2015-10-181-10/+7
| | | | llvm-svn: 250636
* [SCEV] Use std::all_of and std::any_of; NFCSanjoy Das2015-10-181-16/+11
| | | | llvm-svn: 250635
* [SCEV] Use auto where it helps remove line breaks; NFCSanjoy Das2015-10-181-13/+6
| | | | llvm-svn: 250634
* [SCEV] Use range for loops; NFCSanjoy Das2015-10-181-22/+17
| | | | llvm-svn: 250633
* Use std::find instead of manual loop.Craig Topper2015-10-171-5/+2
| | | | llvm-svn: 250624
* Use std::is_sorted to replace a custom version. Also replace a comparison ↵Craig Topper2015-10-172-16/+4
| | | | | | predicate struct with a lambda. llvm-svn: 250623
* [X86][XOP] Add VPROT instruction opcodesSimon Pilgrim2015-10-175-33/+32
| | | | | | Added X86ISD opcodes for VPROT vector rotate by variable and by immediate. llvm-svn: 250620
* Remove unnecessary 'const' pointed out by David Blaikie.Craig Topper2015-10-171-2/+2
| | | | llvm-svn: 250619
* [DAG] Ensure vector constant folding uses correct scalar undef typesSimon Pilgrim2015-10-171-2/+2
| | | | | | Minor fix to D13665 found during post-commit review. llvm-svn: 250616
* Replace a custom table sort check with std::is_sorted. Change a function to ↵Craig Topper2015-10-171-17/+8
| | | | | | take ArrayRef instead of pointer and length. NFC llvm-svn: 250615
* Use std::begin/end and std::is_sorted to simplify some code. NFCCraig Topper2015-10-172-15/+11
| | | | llvm-svn: 250614
* [CostModel] Fixed AVX integer shift costsSimon Pilgrim2015-10-171-12/+36
| | | | | | Targets with AVX but without AVX2 were incorrectly reporting costs of 256-bit integer shifts. llvm-svn: 250611
* [X86][FastISel] Teach how to select SSE4A nontemporal stores.Simon Pilgrim2015-10-171-4/+15
| | | | | | | | | | Add FastISel support for SSE4A scalar float / double non-temporal stores Follow up to D13698 Differential Revision: http://reviews.llvm.org/D13773 llvm-svn: 250610
* [InstCombine] SSE4A constant folding and conversion to shuffles.Simon Pilgrim2015-10-171-53/+270
| | | | | | | | | | | | | This patch improves support for combining the SSE4A EXTRQ(I) and INSERTQ(I) intrinsics: 1 - Converts INSERTQ/EXTRQ calls to INSERTQI/EXTRQI if the 'bit index' and 'length' operands are constant 2 - Converts INSERTQI/EXTRQI calls to shufflevector if the bit index/length are both byte aligned (we can already lower shuffles to INSERTQI/EXTRQI if its useful) 3 - Constant folding support 4 - Add zeroinitializer handling Differential Revision: http://reviews.llvm.org/D13348 llvm-svn: 250609
* [libFuzzer] add -shuffle flagKostya Serebryany2015-10-174-5/+10
| | | | llvm-svn: 250603
* [Hexagon] Adding skeleton of HVX extension instructions.Colin LeMahieu2015-10-1717-13/+4259
| | | | llvm-svn: 250600
* RegisterPressure: Unify the sparse sets in LiveRegsSet; NFCMatthias Braun2015-10-171-12/+19
| | | | | | Also do some cleanups comment improvements. llvm-svn: 250598
* RegisterPressure: allocatable physreg uses are always killsMatthias Braun2015-10-171-25/+27
| | | | | | | | | | | | | | This property was already used in the code path when no liveness intervals are present. Unfortunately the code path that uses liveness intervals tried to query a cached live interval for an allocatable physreg, those are usually not computed so a conservative default was used. This doesn't affect any of the lit testcases. This is a foreclosure to upcoming changes which should be NFC but without this patch this tidbit wouldn't be NFC. llvm-svn: 250596
* RegisterPressure: Remove 0 entries from PressureChangeMatthias Braun2015-10-171-4/+14
| | | | | | | | | | | This should not change behaviour because as far as I can see all code reading the pressure changes has no effect if the PressureInc is 0. Removing these entries however does avoid unnecessary computation, and results in a more stable debug output. I want the stable debug output to check that some upcoming changes are indeed NFC and identical even at the debug output level. llvm-svn: 250595
* WebAssembly: don't omit dead vregs from localsJF Bastien2015-10-171-2/+4
| | | | | | | | | | | | | | | | | | Summary: This is a temporary hack until we get around to remapping the vreg numbers to local numbers. Dead vregs cause bad numbering and make consumers sad. We could also just look at debug info an use named locals instead, but vregs have to work properly anyways so there! Reviewers: binji, sunfish Subscribers: jfb, llvm-commits, dschuff Differential Revision: http://reviews.llvm.org/D13839 llvm-svn: 250594
* WebAssembly: fix the syntax for comparisonsJF Bastien2015-10-171-8/+8
| | | | | | | | | | | | Summary: It has also slightly changed. Reviewers: binji Subscribers: jfb, dschuff, llvm-commits, sunfish Differential Revision: http://reviews.llvm.org/D13837 llvm-svn: 250591
* RegisterPressure: Hide non-const iterators of PressureDiffMatthias Braun2015-10-171-1/+1
| | | | | | | It is too easy to accidentally violate the ordering requirements when modifying the PressureDiff entries through iterators. llvm-svn: 250590
* [WinEH] Fix eh.exceptionpointer intrinsic loweringJoseph Tremoulet2015-10-171-1/+2
| | | | | | | | | | | | | | | Summary: Some shared code for handling eh.exceptionpointer and eh.exceptioncode needs to not share the part that truncates to 32 bits, which is intended just for exception codes. Reviewers: rnk Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13747 llvm-svn: 250588
* [WinEH] Fix stack alignment in funclets and ParentFrameOffset calculationReid Kleckner2015-10-163-9/+43
| | | | | | | | | | | | Our previous value of "16 + 8 + MaxCallFrameSize" for ParentFrameOffset is incorrect when CSRs are involved. We were supposed to have a test case to catch this, but it wasn't very rigorous. The main effect here is that calling _CxxThrowException inside a catchpad doesn't immediately crash on MOVAPS when you have an odd number of CSRs. llvm-svn: 250583
* RegisterPressure: Use range based for, cleanupMatthias Braun2015-10-161-14/+7
| | | | llvm-svn: 250579
* [libFuzzer] print a stack trace on timeoutKostya Serebryany2015-10-164-0/+17
| | | | llvm-svn: 250571
* Revert "This is a follow-up to the discussion in D12882."Benjamin Kramer2015-10-161-100/+16
| | | | | | Breaks clang selfhost, see PR25222. This reverts commits r250527 and r250528. llvm-svn: 250570
* [libFuzzer] reduce the size of artifacts printed on the screenKostya Serebryany2015-10-161-1/+1
| | | | llvm-svn: 250565
* [libFuzzer] When -test_single_input crashes the test it is not necessary to ↵Kostya Serebryany2015-10-165-5/+18
| | | | | | write crash-file because input is already known to the user. Patch by Mike Aizatsky llvm-svn: 250564
* [x86] promote 'add nsw' to a wider type to allow more combinesSanjay Patel2015-10-161-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The motivation for this patch starts with PR20134: https://llvm.org/bugs/show_bug.cgi?id=20134 void foo(int *a, int i) { a[i] = a[i+1] + a[i+2]; } It seems better to produce this (14 bytes): movslq %esi, %rsi movl 0x4(%rdi,%rsi,4), %eax addl 0x8(%rdi,%rsi,4), %eax movl %eax, (%rdi,%rsi,4) Rather than this (22 bytes): leal 0x1(%rsi), %eax cltq leal 0x2(%rsi), %ecx movslq %ecx, %rcx movl (%rdi,%rcx,4), %ecx addl (%rdi,%rax,4), %ecx movslq %esi, %rax movl %ecx, (%rdi,%rax,4) The most basic problem (the first test case in the patch combines constants) should also be fixed in InstCombine, but it gets more complicated after that because we need to consider architecture and micro-architecture. For example, AArch64 may not see any benefit from the more general transform because the ISA solves the sexting in hardware. Some x86 chips may not want to replace 2 ADD insts with 1 LEA, and there's an attribute for that: FeatureSlowLEA. But I suspect that doesn't go far enough or maybe it's not getting used when it should; I'm also not sure if FeatureSlowLEA should also mean "slow complex addressing mode". I see no perf differences on test-suite with this change running on AMD Jaguar, but I see small code size improvements when building clang and the LLVM tools with the patched compiler. A more general solution to the sext(add nsw(x, C)) problem that works for multiple targets is available in CodeGenPrepare, but it may take quite a bit more work to get that to fire on all of the test cases that this patch takes care of. Differential Revision: http://reviews.llvm.org/D13757 llvm-svn: 250560
* MC: Don't crash after issuing a diagnostic.Jim Grosbach2015-10-161-3/+2
| | | | | | | | | | | | | | | | Crashing is bad, m'kay? Fixing a 4 year old bug of my own creation. Adding the testcase now which I should have added then which would have long since caught this. The problem is that printMessage() will display the diagnostic but not set HadError to true, resulting in the assembler continuing on its way and trying to create relocations for things that may not allow them or otherwise get itself into trouble. Using the Error() helper function here rather than calling printMessage() directly resolves this. rdar://23133240 llvm-svn: 250557
* [WinEH] Fix CatchRetSuccessorColorMap accountingJoseph Tremoulet2015-10-161-2/+0
| | | | | | | | | | | | | | | | Summary: We now use the block for the catchpad itself, rather than its normal successor, as the funclet entry. Putting the normal successor in the map leads downstream funclet membership computations to erroneous results. Reviewers: majnemer, rnk Subscribers: rnk, llvm-commits Differential Revision: http://reviews.llvm.org/D13798 llvm-svn: 250552
* Fix assertion failure with fp128 to unsigned i64 conversionAndrew Kaylor2015-10-161-9/+5
| | | | | | | | Patch by Mitch Bodart Differential Revision: http://reviews.llvm.org/D13780 llvm-svn: 250550
* [Hexagon] Split double registersKrzysztof Parzyszek2015-10-163-0/+1217
| | | | llvm-svn: 250549
* [WinEH] Remove dead code/includes from WinEHPrepareDavid Majnemer2015-10-161-29/+2
| | | | | | No functionality change is intended. llvm-svn: 250545
* [Hexagon] Delete lib/Target/Hexagon/HexagonRemoveSZExtArgs.cppKrzysztof Parzyszek2015-10-163-96/+0
| | | | llvm-svn: 250543
* [Hexagon] Merge adjacent storesKrzysztof Parzyszek2015-10-163-1/+625
| | | | llvm-svn: 250542
* Sample profiles - Re-arrange binary format to emit head samples only on top ↵Diego Novillo2015-10-162-18/+24
| | | | | | | | | | | | | | functions. The number of samples collected at the head of a function only make sense for top-level functions (i.e., those actually called as opposed to being inlined inside another). Head samples essentially count the time spent inside the function's prologue. This clearly doesn't make sense for inlined functions, so we were always emitting 0 in those. llvm-svn: 250539
* WebAssembly: fix load/store syntaxJF Bastien2015-10-161-51/+51
| | | | | | | | | | | | Summary: The syntax has changed a bit recently. Reviewers: binji Subscribers: llvm-commits, jfb, sunfish, dschuff Differential Revision: http://reviews.llvm.org/D13821 llvm-svn: 250535
* [WinEH] Fix endpad coloring/numberingJoseph Tremoulet2015-10-161-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: When a cleanup's cleanupendpad or cleanupret targets a catchendpad, stop trying to propagate the cleanup's parent's color to the catchendpad, since what's needed is the cleanup's grandparent's color and the catchendpad will get that color from the catchpad linkage already. We already had this exclusion for invokes, but were missing it for cleanupendpad/cleanupret. Also add a missing line that tags cleanupendpads' states in the EHPadStateMap, without with lowering invokes that target cleanupendpads which unwind to other handlers (and so don't have the -1 state) will fail. This fixes the reduced IR repro in PR25163. Reviewers: majnemer, andrew.w.kaylor, rnk Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13797 llvm-svn: 250534
* This is a follow-up to the discussion in D12882.Sanjay Patel2015-10-161-16/+100
| | | | | | | | | | | | | | Ideally, we would like SimplifyCFG to be able to form select instructions even when the operands are expensive (as defined by the TTI cost model) because that may expose further optimizations. However, we would then like a later pass like CodeGenPrepare to undo that transformation if the target would likely benefit from not speculatively executing an expensive op (this patch). Once we have this safety mechanism in place, we can adjust SimplifyCFG to restore its select-formation behavior that changed with r248439. Differential Revision: http://reviews.llvm.org/D13297 llvm-svn: 250527
* WebAssembly: relooper analysis passJF Bastien2015-10-163-56/+109
| | | | | | | | | | | | Summary: Make the relooper an analysis pass, to convert CFG to AST. Reviewers: sunfish Subscribers: jfb, dschuff Differential Revision: http://reviews.llvm.org/D12744 llvm-svn: 250524
* [AArch64] Implement vector splitting on UADDV.Charlie Turner2015-10-161-0/+32
| | | | | | | | | | | | Summary: Fixes PR25056. Reviewers: mcrosier, junbuml, jmolloy Subscribers: aemerson, rengolin, llvm-commits Differential Revision: http://reviews.llvm.org/D13466 llvm-svn: 250520
* [mips][microMIPS] Implement LB, LBE, LBU and LBUE instructionsHrvoje Varga2015-10-166-1/+140
| | | | | | Differential Revision: http://reviews.llvm.org/D11633 llvm-svn: 250511
* Use Windows Vista API to get the user's home directoryPawel Bylica2015-10-161-7/+11
| | | | | | | | | | | | Summary: This patch replaces usage of deprecated SHGetFolderPathW with SHGetKnownFolderPath. The usage of SHGetKnownFolderPath is wrapped to allow queries for other "known" folders in the near future. Reviewers: aaron.ballman, gbedwell Subscribers: chapuni, llvm-commits Differential Revision: http://reviews.llvm.org/D13753 llvm-svn: 250501
OpenPOWER on IntegriCloud