summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Avoid overflow when computing the size of an arrayDavid Majnemer2016-05-271-0/+4
| | | | llvm-svn: 271031
* Don't assume that there will be enough padding bytesDavid Majnemer2016-05-271-2/+9
| | | | llvm-svn: 271030
* Don't assume that there will be another null byteDavid Majnemer2016-05-271-0/+2
| | | | llvm-svn: 271029
* [MC] Support symbolic expressions in assembly directivesPetr Hosek2016-05-279-62/+176
| | | | | | | | | This matches the behavior of GNU assembler which supports symbolic expressions in absolute expressions used in assembly directives. Differential Revision: http://reviews.llvm.org/D20656 llvm-svn: 271028
* Resubmit "[pdb] Allow zero-copy read support for symbol streams.""Zachary Turner2016-05-2716-61/+120
| | | | | | | | | Due to differences in template instantiation rules, it is not portable to static_assert(false) inside of an invalid specialization of a template. Instead I just =delete the method so that it can't be used, and leave a comment that it must be explicitly specialized. llvm-svn: 271027
* Revert "[pdb] Allow zero-copy read support for symbol streams."Chad Rosier2016-05-2716-122/+61
| | | | | | | | This reverts commit r271024 due to error: static_assert failed "You must either provide a specialization of VarStreamArrayExtractor or a custom extractor" llvm-svn: 271026
* [pdb] Allow zero-copy read support for symbol streams.Zachary Turner2016-05-2716-61/+122
| | | | | | | | | | This reduces the amount of memory used by llvm-pdbdump by roughly 1/3 of the size of the PDB file. Differential Revision: http://reviews.llvm.org/D20724 Reviewed By: ruiu llvm-svn: 271025
* [X86] Clarify PSHUFB+blend lowering function name. NFC.Ahmed Bougacha2016-05-271-9/+11
| | | | | | Also guard against v32i8 users. llvm-svn: 271024
* [ARM] Remove tBLXr Pat made redundant by r269101. NFCI.Ahmed Bougacha2016-05-272-10/+0
| | | | llvm-svn: 271023
* [Headers] Remove redundant typedef. NFC.Ahmed Bougacha2016-05-271-1/+0
| | | | llvm-svn: 271022
* [ProfData] Remove global constructor from ProfileSummaryBuilder.Benjamin Kramer2016-05-272-8/+10
| | | | | | No functionality change intended. llvm-svn: 271021
* Don't generate unnecessary signed ConstantRange during multiply. NFCPete Cooper2016-05-271-0/+7
| | | | | | | | | | | | | | r231483 taught ConstantRange::multiply to be clever about signed vs unsigned ranges. For example, an unsigned range could be full-set while the signed range is more specific than that. In looking at the allocations trace for LTO'ing verify-uselistorder (see r236629 for details), millions of allocations are from APInt, many of which come from ConstantRange's. This change tries to avoid some (3.2 million) allocations by returning the unsigned range if its suitable. The checks here are that it should not be a wrapping range, and should be positive. That should be enough to check for ranges such as [1, 10) which the signed range will be equal to, if we were to calculate it. Differential Revision: http://reviews.llvm.org/D20723 Reviewed by James Molloy llvm-svn: 271020
* Move test to X86 directory: I think it depends on X86 TTI.Tim Northover2016-05-271-0/+0
| | | | llvm-svn: 271019
* Use StringRef::startswith instead of find(...) == 0.Benjamin Kramer2016-05-272-4/+4
| | | | | | It's faster and easier to read. llvm-svn: 271018
* [profile] Add a test to ensure runtime allocator is not invokedXinliang David Li2016-05-272-0/+47
| | | | llvm-svn: 271017
* [sparc] Simplify a slow and verbose way of checking if a string starts with ↵Benjamin Kramer2016-05-271-6/+4
| | | | | | | | "ld". PR27904. llvm-svn: 271016
* Vectorizer: track non-fast FP instructions through phis when finding reductions.Tim Northover2016-05-272-1/+76
| | | | | | | | When we traced through a phi node looking for floating-point reductions, we forgot whether we'd ever seen an instruction without fast-math flags (that would block vectorization). This propagates it through to the end. llvm-svn: 271015
* Reapply r270865 -- previous bot failure is unrelatedXinliang David Li2016-05-271-1/+1
| | | | llvm-svn: 271014
* Make sure these error codes are marked as checkedDavid Majnemer2016-05-273-46/+65
| | | | llvm-svn: 271013
* Make sure there are enough blocks for the streamDavid Majnemer2016-05-271-0/+18
| | | | llvm-svn: 271012
* Make sure the directory block array fits in the fileDavid Majnemer2016-05-271-0/+4
| | | | llvm-svn: 271011
* Add instcombine pass if sampleprofile pass is enabled.Dehao Chen2016-05-271-2/+10
| | | | | | | | | | | | Summary: Sample profile pass need to have instcombine pass. A related change is http://reviews.llvm.org/D17742. But we should not explicitly add dependency between to non-analysis passes. So we add the dependency here. Reviewers: davidxl, dnovillo Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D20502 llvm-svn: 271010
* Remove sample profile dependency to instcombine, which is not a analysis pass.Dehao Chen2016-05-275-12/+4
| | | | | | | | | | | | Summary: This patch removes dependency from sample profile pass to instcombine pass. Reviewers: davidxl, dnovillo Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D20501 llvm-svn: 271009
* Validate the blocksize before using itDavid Majnemer2016-05-271-5/+5
| | | | | | | The blocksize could be zero on disk causing later checks to divide by zero. llvm-svn: 271008
* [X86][AVX] Removed some remains of old (pre-regeneration) filechecksSimon Pilgrim2016-05-271-36/+0
| | | | llvm-svn: 271007
* Add missing OpenMP 4.5 device entries to stubs library.Jonathan Peyton2016-05-273-10/+119
| | | | llvm-svn: 271006
* [msan] add a sentence about inline assemblyKostya Serebryany2016-05-271-0/+2
| | | | llvm-svn: 271005
* [libunwind] Improve unwinder stack usage - IIAsiri Rathnayake2016-05-271-24/+24
| | | | | | | | | | | | | | | | | | | | | | unwind_phase1 and unwind_phase2 allocate their own copies of unw_cursor_t buffers on the stack. This can blow-up stack usage of the unwinder depending on how these two functions get inlined into _Unwind_RaiseException. Clang seems to inline unwind_phase1 into _Unwind_RaiseException but not unwind_phase2, thus creating two unw_cursor_t buffers on the stack. One way to work-around this problem is to mark both unwind_phase1 and unwind_phase2 as noinline. This patch takes the less compiler-dependent approach and explicitly allocate a unw_cursor_t buffer and pass that into unwind_phase1 and unwind_phase2 functions. A follow-up patch will replicate this behavior for the non-EHABI and non-SJLJ implementations. Reviewers: jroelofs, bcraig. Differential revision: http://reviews.llvm.org/D20320 llvm-svn: 271004
* Disable lifetime-start-on-first-use analysis.Than McIntosh2016-05-272-5/+55
| | | | | | | | | | | | | | | | Summary: Turn off lifetime-start-on-first-use enhancement for the moment pending a fix for bug 27903. Bug: 27903 Reviewers: tejohnson, wmi, qcolombet, gbiv Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D20731 llvm-svn: 271003
* Make header self-contained. NFC.Benjamin Kramer2016-05-271-0/+3
| | | | llvm-svn: 271002
* [OpenMP] Fix SEMA bug in the capture of global variables in template functions.Samuel Antao2016-05-272-14/+167
| | | | | | | | | | | | | | Summary: Target regions require globals to be captured. This patch fixes a bug exposed when that happens in a template function. Reviewers: hfinkel, arpith-jacob, kkwli0, carlo.bertolli, ABataev Subscribers: guansong, ABataev, cfe-commits, caomhin, fraggamuffin Differential Revision: http://reviews.llvm.org/D18110 llvm-svn: 271001
* [mips] Compact branch policy setting.Simon Dardis2016-05-277-0/+55
| | | | | | | | | | | | | | This patch adds the commandline option -mcompact-branches={never,optimal,always), which controls how LLVM generates compact branches for MIPSR6 targets. By default, the compact branch policy is 'optimal' where LLVM will generate the most appropriate branch for any situation. The 'never' and 'always' policy will disable or always generate compact branches wherever possible respectfully. Reviewers: dsanders, vkalintiris, atanasyan Differential Revision: http://reviews.llvm.org/D20729 llvm-svn: 271000
* Avoid doing binary search.Rui Ueyama2016-05-275-12/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MergedInputSection::getOffset is the busiest function in LLD if string merging is enabled and input files have lots of mergeable sections. It is usually the case when creating executable with debug info, so it is pretty common. The reason why it is slow is because it has to do faily complex computations. For non-mergeable sections, section contents are contiguous in output, so in order to compute an output offset, we only have to add the output section's base address to an input offset. But for mergeable strings, section contents are split for merging, so they are not contigous. We've got to do some lookups. We used to do binary search on the list of section pieces. It is slow because I think it's hostile to branch prediction. This patch replaces it with hash table lookup. Seems it's working pretty well. Below is "perf stat -r10" output when linking clang with debug info. In this case this patch speeds up about 4%. Before: 6584.153205 task-clock (msec) # 1.001 CPUs utilized ( +- 0.09% ) 238 context-switches # 0.036 K/sec ( +- 6.59% ) 0 cpu-migrations # 0.000 K/sec ( +- 50.92% ) 1,067,675 page-faults # 0.162 M/sec ( +- 0.15% ) 18,369,931,470 cycles # 2.790 GHz ( +- 0.09% ) 9,640,680,143 stalled-cycles-frontend # 52.48% frontend cycles idle ( +- 0.18% ) <not supported> stalled-cycles-backend 21,206,747,787 instructions # 1.15 insns per cycle # 0.45 stalled cycles per insn ( +- 0.04% ) 3,817,398,032 branches # 579.786 M/sec ( +- 0.04% ) 132,787,249 branch-misses # 3.48% of all branches ( +- 0.02% ) 6.579106511 seconds time elapsed ( +- 0.09% ) After: 6312.317533 task-clock (msec) # 1.001 CPUs utilized ( +- 0.19% ) 221 context-switches # 0.035 K/sec ( +- 4.11% ) 1 cpu-migrations # 0.000 K/sec ( +- 45.21% ) 1,280,775 page-faults # 0.203 M/sec ( +- 0.37% ) 17,611,539,150 cycles # 2.790 GHz ( +- 0.19% ) 10,285,148,569 stalled-cycles-frontend # 58.40% frontend cycles idle ( +- 0.30% ) <not supported> stalled-cycles-backend 18,794,779,900 instructions # 1.07 insns per cycle # 0.55 stalled cycles per insn ( +- 0.03% ) 3,287,450,865 branches # 520.799 M/sec ( +- 0.03% ) 72,259,605 branch-misses # 2.20% of all branches ( +- 0.01% ) 6.307411828 seconds time elapsed ( +- 0.19% ) Differential Revision: http://reviews.llvm.org/D20645 llvm-svn: 270999
* [mips] Kill 'support' for untested EABI.Daniel Sanders2016-05-275-23/+5
| | | | | | | | | | | | | | | | | Summary: There are no llvm backend tests* for EABI and no EABI buildbots. There were only three clang tests, all of which checked that -mabi=eabi was passed to the assembler. *There is a single backend test that specifies EABI but it actually tests MIPS16. Reviewers: atanasyan Subscribers: emaste, sdardis, atanasyan, cfe-commits Differential Revision: http://reviews.llvm.org/D20679 llvm-svn: 270998
* Apply clang-tidy's misc-move-constructor-init throughout LLVM.Benjamin Kramer2016-05-2738-99/+139
| | | | | | No functionality change intended, maybe a tiny performance improvement. llvm-svn: 270997
* Apply clang-tidy's misc-move-constructor-init throughout Clang.Benjamin Kramer2016-05-2730-67/+99
| | | | | | No functionality change intended, maybe a tiny performance improvement. llvm-svn: 270996
* [mips] Weaken asm predicate for memory offsetsSimon Dardis2016-05-2716-3/+407
| | | | | | | | | | | | The isMemWithSimmOffset predicate rejects relocations which is incorrect behaviour. Linkers and other tools should handle|warn|error when the field overflows. Reviewers: dsanders, vkalintiris Differential Revision: http://reviews.llvm.org/D20727 llvm-svn: 270995
* Turn copies into references as suggested by clang-tidy's ↵Benjamin Kramer2016-05-276-12/+13
| | | | | | performance-unnecessary-copy-initialization. llvm-svn: 270994
* [RewriteStatepointsForGC] All constant should have null base pointerIgor Laevsky2016-05-275-11/+163
| | | | | | | | | | | | | | | | | | Currently we consider that each constant has itself as a base value. I.e "base(const) = const". This introduces couple of problems when we are trying to avoid reporting constants in statepoint live sets: 1. When querying "base( phi(const1, const2) )" we will get "phi(const1, const2)" as a base pointer. Since it's not a constant we will record it in a stack map. However on practice we don't want this to happen (constant are never relocated). 2. base( phi(const, gc ptr) ) = phi( const, base(gc ptr) ). This particular case imposes challenge on our runtime - we don't expect to see constant base pointers other than null. This problems can be avoided by treating all constant as if they were derived from null pointer base. I.e in a first case we will not include constant pointer in a stack map at all. In a second case we will get "phi(null, base(gc ptr))" as a base pointer which is a lot more convenient. Differential Revision: http://reviews.llvm.org/D20584 llvm-svn: 270993
* Attemp to fix build bot after r270987George Rimar2016-05-271-1/+2
| | | | | | | | | | | It was: "Recommit 270977 - [llvm-mc] - Teach llvm-mc to generate zlib styled compression sections." Fix: since test requires no zlib available and r270987 changed the compression flag for llvm-mc to mandatory specify the compression style, then just add 2 available styles to this test. llvm-svn: 270992
* [Frontend] StringRefize and fix bad indentation.Benjamin Kramer2016-05-271-22/+22
| | | | | | NFC intended. llvm-svn: 270991
* [AMDGPU][llvm-mc] Square-braced-syntax for registers - make ":expr2" optional.Artem Tamazov2016-05-272-6/+39
| | | | | | | | | | | | | | | | | Register numbers may be specified as assembly-time expressions. This feature can be useful in macros and alike. However, expressions are supported within sqare braces only. Sqare braces were initially intended to support specifying of multiple (pairs/quads...) registers. Syntax like v[8:8] which specifies single register is also supported. That allows expressions but looks a bit unnatural. This change supports syntax REG[EXPR]. Tests added. Differential Revision: http://reviews.llvm.org/D20588 llvm-svn: 270990
* [include-fixer] Add a missing .h.Benjamin Kramer2016-05-271-1/+1
| | | | llvm-svn: 270989
* Avoid some copies by using const references.Benjamin Kramer2016-05-2713-25/+22
| | | | | | | clang-tidy's performance-unnecessary-copy-initialization with some manual fixes. No functional changes intended. llvm-svn: 270988
* Recommit 270977 - [llvm-mc] - Teach llvm-mc to generate zlib styled ↵George Rimar2016-05-277-48/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | compression sections. Fix: updated clang code which was not updated by mistake. Original commit message: [llvm-mc] - Teach llvm-mc to generate zlib styled compression sections. This patch is strongly based on previously reverted D20331. (because of gnuutils < 2.26 does not support compressed debug sections in non zlib-gnu style) Difference that this patch supports both zlib and zlib-gnu styles. -compress-debug-sections option now supports next values: -compress-debug-sections=zlib-gnu -compress-debug-sections=zlib -compress-debug-sections=none Previously specifying -compress-debug-sections enabled zlib-gnu compression, so anyone can put "-compress-debug-sections=zlib-gnu" to restore the behavior that was before this patch for case when compression was enabled. Differential revision: http://reviews.llvm.org/D20676 llvm-svn: 270987
* Avoid having to check in a binary.Rafael Espindola2016-05-272-8/+10
| | | | llvm-svn: 270986
* Update for following LLVM commit.George Rimar2016-05-271-1/+1
| | | | | | | It will be: Recommit 270977 - [llvm-mc] - Teach llvm-mc to generate zlib styled compression sections. llvm-svn: 270985
* [mips] Fold MipsTargetInfoBase subclasses into MipsTargetInfoBase and rename ↵Daniel Sanders2016-05-271-317/+209
| | | | | | | | | | | | | | | | | to MipsTargetInfo. NFC Summary: This unifies mips/mipsel and mips64/mips64el into a single class so that we can later support O32 on mips64/mips64el and N32/N64 on mips/mipsel (when an appropriate CPU selected). Reviewers: atanasyan Subscribers: atanasyan, jfb, cfe-commits, dschuff Differential Revision: http://reviews.llvm.org/D20678 llvm-svn: 270984
* Convert assert to static_assert. NFC.Benjamin Kramer2016-05-271-1/+2
| | | | llvm-svn: 270983
* Apply clang-tidy's misc-static-assert where it makes sense.Benjamin Kramer2016-05-278-33/+32
| | | | | | | Also fold conditions into assert(0) where it makes sense. No functional change intended. llvm-svn: 270982
OpenPOWER on IntegriCloud