summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* AMDGPU: Add alias for tongaTom Stellard2015-12-151-1/+1
| | | | | | Patch by: Vedran Mileti llvm-svn: 255662
* AMDGPU/SI: Implement AMDGPUTargetTransformInfo::isSourceOfDivergence()Tom Stellard2015-12-152-0/+78
| | | | | | | | | | Reviewers: arsenm Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D15476 llvm-svn: 255661
* [SimplifyCFG] allow speculation of exactly one expensive instruction (PR24818)Sanjay Patel2015-12-153-47/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the last general step to allow more IR-level speculation with a safety harness in place in CodeGenPrepare. The intent is to restore the behavior enabled by: http://reviews.llvm.org/rL228826 but prevent bad performance such as: https://llvm.org/bugs/show_bug.cgi?id=24818 Earlier patches in this sequence: D12882 (disable SimplifyCFG speculation for expensive instructions) D13297 (have CGP despeculate expensive ops) D14630 (have CGP despeculate special versions of cttz/ctlz) As shown in the test cases, we only have two instructions currently affected: ctz for some x86 and fdiv generally. Allowing exactly one expensive instruction is a bit of a hack, but it lines up with what is currently implemented in CGP. If we make the despeculation more general in CGP, we can make the speculation here more liberal. A follow-up patch will adjust the cost for sqrt and possibly other typically expensive math intrinsics (currently everything is cheap by default). GPU targets would likely want to override those expensive default costs (just as they probably should already override the cost of div/rem) because just about any math is cheaper than control-flow on those targets. Differential Revision: http://reviews.llvm.org/D15213 llvm-svn: 255660
* [llvm-profdata] Add support for weighted merge of profile data (2nd try)Nathan Slingerland2015-12-1514-55/+369
| | | | | | | | | | | | | | | | | | | | Summary: This change adds support for specifying a weight when merging profile data with the llvm-profdata tool. Weights are specified by using the --weighted-input=<weight>,<filename> option. Input files not specified with this option (normal positional list after options) are given a default weight of 1. Adding support for arbitrary weighting of input profile data allows for relative importance to be placed on the input data from multiple training runs. Both sampled and instrumented profiles are supported. Reviewers: davidxl, dnovillo, bogner, silvas Subscribers: silvas, davidxl, llvm-commits Differential Revision: http://reviews.llvm.org/D15306 llvm-svn: 255659
* AMDGPU: mark ldexp LibCalls as unavailableNicolai Hahnle2015-12-152-10/+16
| | | | | | | | | | | | | | | | | | Summary: The LibCallSimplifier will turn llvm.exp2.* intrinsics into ldexp* libcalls which do not make sense with the AMDGPU backend. In the long run, we'll want an llvm.ldexp.* intrinsic to properly make use of this optimization, but this works around the problem for now. See also: http://reviews.llvm.org/D14327 (suggested llvm.ldexp.* implementation) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92709 Reviewers: arsenm, tstellarAMD Differential Revision: http://reviews.llvm.org/D14990 llvm-svn: 255658
* AMDGPU/SI: Fix bitcast between v2f32 and f64Tom Stellard2015-12-151-0/+4
| | | | | | | | | | The radeonsi fp64 support can hit these now that some redundant bitcasts are folded. Patch by: Michel Dänzer Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> llvm-svn: 255657
* [X86] Smaller code for materializing 32-bit 1 and -1 constantsHans Wennborg2015-12-153-5/+159
| | | | | | | | | "movl $-1, %eax" is 5 bytes, "xorl %eax, %eax; decl %eax" is 3 bytes. This commit makes LLVM use the latter when optimizing for size. Differential Revision: http://reviews.llvm.org/D14971 llvm-svn: 255656
* clang-cl: Add an alias for /wd4100Nico Weber2015-12-152-4/+7
| | | | llvm-svn: 255655
* WebAssembly: update expected torture test failuresJF Bastien2015-12-151-33/+0
| | | | | | We now have 252 expected failures. llvm-svn: 255654
* [Hexagon] Preprocess mapped instructions before lowering to MCKrzysztof Parzyszek2015-12-157-9/+397
| | | | llvm-svn: 255653
* AMDGPU/SI: Add llvm.amdgcn.mbcnt.* intrinsicsTom Stellard2015-12-153-2/+34
| | | | | | | | | | | | | | Summary: These are meant to be used instead of the llvm.SI.tid intrinsic which will be deprecated at some point. Reviewers: arsenm Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D15475 llvm-svn: 255652
* AMDGPU/SI: Add llvm.amdgcn.v.interp.p[12] intrinsicsTom Stellard2015-12-153-0/+58
| | | | | | | | | | | | | | Summary: These are meant to be used instead of the llvm.SI.fs.interp intrinsic which will be deprecated at some point. Reviewers: arsenm Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D15474 llvm-svn: 255651
* AMDGPU/SI: Add getShaderType() function to Utils/Tom Stellard2015-12-155-17/+26
| | | | | | | | | | Reviewers: arsenm Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D15424 llvm-svn: 255650
* Bitcasts between FP and INT values using direct movesNemanja Ivanovic2015-12-155-6/+160
| | | | | | | | | | | | | | | This patch corresponds to review: http://reviews.llvm.org/D15286 This patch was meant to land in revision 255246, but I accidentally uploaded the patch that corresponds to http://reviews.llvm.org/D15372 in that revision accidentally. Thereby, this patch is the actual Bitcasts using direct moves patch, whereas http://reviews.llvm.org/rL255246 actually corresponds to http://reviews.llvm.org/D15372. llvm-svn: 255649
* [Microsoft][C++] Clang doesn't support a use of "this" pointer inside inline ↵Michael Zuckerman2015-12-151-1/+1
| | | | | | | | | | asm add triple to test Differential Revision: http://reviews.llvm.org/D15115 llvm-svn: 255647
* Fixed mistype in comment. NFC.George Rimar2015-12-151-1/+1
| | | | llvm-svn: 255646
* [Microsoft][C++] Clang doesn't support a use of "this" pointer inside inline asmMichael Zuckerman2015-12-153-12/+67
| | | | | | | | | | | | | | | | | | | | | Clang doesn’t support a use of “this” pointer inside inline asm. When I tried to compile a class or a struct (see example) with an inline asm that contains "this" pointer. Clang returns with an error. This patch fixes that. error: expected unqualified-id For example: ''' struct A { void f() { __asm mov eax, this // error: expected unqualified-id } }; ''' Differential Revision: http://reviews.llvm.org/D15115 llvm-svn: 255645
* [x86] adding PKU feature flagAsaf Badouh2015-12-155-0/+11
| | | | | | | | | the feature flag is essential for RDPKRU and WRPKRU instruction more about the instruction can be found in the SDM rev 56, vol 2 from http://www.intel.com/sdm Differential Revision: http://reviews.llvm.org/D15491 llvm-svn: 255644
* Do not try to use i8 and i16 versions of FP_TO_U/SINT soft float library callsMichael Kuperstein2015-12-155-47/+63
| | | | | | | | | | | It appears that neither compiler-rt nor the gnu soft-float libraries actually implement these conversions. Instead of emitting calls to library functions that don't exist, handle it similarly to the way we handle i8 -> float and i16 -> float conversions: call the i32 library function, and adjust the type. Differential Revision: http://reviews.llvm.org/D15151 llvm-svn: 255643
* Define a feature for __float128 support in the PPC back endNemanja Ivanovic2015-12-153-0/+7
| | | | | | | | | | | | | | This patch corresponds to review: http://reviews.llvm.org/D15117 In preparation for supporting IEEE Quad precision floating point, this patch simply defines a feature to specify the target supports this. For now, nothing is done with the target feature, we just don't want warnings from the Clang FE when a user specifies -mfloat128. Calling convention and other related work will add to this patch in the near future. llvm-svn: 255642
* Merge ENABLE_THREADS and ENABLE_STD_THREADS markersTamas Berghammer2015-12-1511-15/+15
| | | | | | | | | | | | Both of these markers are used in the test suit for annotating when a test needs multi threaded support. Previously they had slightly different meening but they converged to the point where they are used interchangably. This CL removes the ENABLE_STD_THREADS one to simplify the test suite and avoid some confusion. Differential revision: http://reviews.llvm.org/D15498 llvm-svn: 255641
* [OPENMP 4.5] Fix test compatibility with 32 bit mode.Alexey Bataev2015-12-151-1/+1
| | | | llvm-svn: 255640
* [OPENMP 4.5] Codegen for 'hint' clause of 'critical' directiveAlexey Bataev2015-12-154-15/+48
| | | | | | OpenMP 4.5 defines 'hint' clause for 'critical' directive. Patch adds codegen for this clause. llvm-svn: 255639
* Improve the successor list update in TailDuplication.cpp.Cong Hou2015-12-152-7/+7
| | | | | | | This patch improves a temporary fix in r255530 so that we can normalize successor list without trigger assertion failures in tail duplication pass. llvm-svn: 255638
* InstCombineLoadStoreAlloca.cpp: Avoid instantiating Twine.NAKAMURA Takumi2015-12-151-4/+9
| | | | llvm-svn: 255637
* clang/test/Analysis/padding_c.c: Suppress a test incompatible to i686-linux.NAKAMURA Takumi2015-12-151-7/+0
| | | | | | | | error: 'warning' diagnostics expected but not seen: File clang/test/Analysis/padding_c.c Line 194 (directive at clang/test/Analysis/padding_c.c:193): Excessive padding in 'struct DefaultAttrAlign' 1 error generated. llvm-svn: 255636
* [libclang] Add a flag to create the precompiled preamble on the first parse.Benjamin Kramer2015-12-157-29/+70
| | | | | | | | | | | | | | | | | | | | | Summary: The current default is to create the preamble on the first reparse, aka second parse. This is useful for clients that do not want to block when opening a file because serializing the preamble takes a bit of time. However, this makes the reparse much more expensive and that may be on the critical path as it's the first interaction a user has with the source code. YouCompleteMe currently optimizes for the first code interaction by parsing the file twice when loaded. That's just unnecessarily slow and this flag helps to avoid that. Reviewers: doug.gregor, klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15490 llvm-svn: 255635
* [PassManagerBuilder] Add a few more scalar optimization passesJames Molloy2015-12-151-0/+13
| | | | | | | | | | | | | | | | | | | | This patch does two things: 1. mem2reg is now run immediately after globalopt. Now that globalopt can localize variables more aggressively, it makes sense to lower them to SSA form earlier rather than later so they can benefit from the full set of optimization passes. 2. More scalar optimizations are run after the loop optimizations in LTO mode. The loop optimizations (especially indvars) can clean up scalar code sufficiently to make it worthwhile running more scalar passes. I've particularly added SCCP here as it isn't run anywhere else in the LTO pass pipeline. Mem2reg is super cheap and shouldn't affect compilation time at all. The rest of the added passes are in the LTO pipeline only so doesn't affect the vast majority of compilations, just the link step. llvm-svn: 255634
* Mark ThreadPool unittests as unsupported on PowerPC64Mehdi Amini2015-12-151-0/+4
| | | | | | | Bots are crashing unexpectingly, see: https://llvm.org/bugs/show_bug.cgi?id=25829 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 255633
* ThreadPool unittest: add a rough mechanism to mark UNSUPPORTED on a given ↵Mehdi Amini2015-12-151-5/+53
| | | | | | | platform From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 255632
* Reapply fixed r255626 that broke buildbot:George Rimar2015-12-151-15/+13
| | | | | | | | | | | | | [ELF] - refactor of code in RelocationSection<ELFT>::writeTo() Just a little reformat of 'if' conditions, NFC. Differential revision: http://reviews.llvm.org/D15453 Fix was: * Renamed unsigned Rel; to unsigned Reloc; llvm-svn: 255631
* [clang-tidy] Check for suspicious string assignments.Gabor Horvath2015-12-157-0/+208
| | | | | | | | | | | It is possible to assign arbitrary integer types to strings. Sometimes it is the result of missing to_string call or apostrophes. Reviewers: alexfh Differential Revision: http://reviews.llvm.org/D15411 llvm-svn: 255630
* Type legalizer for masked gather and scatter intrinsics.Elena Demikhovsky2015-12-159-221/+2085
| | | | | | | | | | | | Full type legalizer that works with all vectors length - from 2 to 16, (i32, i64, float, double). This intrinsic, for example void @llvm.masked.scatter.v2f32(<2 x float>%data , <2 x float*>%ptrs , i32 align , <2 x i1>%mask ) requires type widening for data and type promotion for mask. Differential Revision: http://reviews.llvm.org/D13633 llvm-svn: 255629
* Revert of r255626 "[ELF] - refactor of code in ↵George Rimar2015-12-151-13/+15
| | | | | | | | | | | | | | | RelocationSection<ELFT>::writeTo()" as it broke buildbot: http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/17836/steps/build_Lld/logs/stdio /Users/buildslave/as-bldslv9/lld-x86_64-darwin13/llvm.src/tools/lld/ELF/OutputSections.cpp:268:14: error: redefinition of 'Rel' unsigned Rel; ^ /Users/buildslave/as-bldslv9/lld-x86_64-darwin13/llvm.src/tools/lld/ELF/OutputSections.cpp:241:34: note: previous definition is here for (const DynamicReloc<ELFT> &Rel : Relocs) { That compiles fine on my MSVS 2015 thought. llvm-svn: 255628
* Add a new matcher to match character types.Gabor Horvath2015-12-152-0/+22
| | | | llvm-svn: 255627
* [ELF] - refactor of code in RelocationSection<ELFT>::writeTo()George Rimar2015-12-151-15/+13
| | | | | | | | Just a little reformat of 'if' conditions, NFC. Differential revision: http://reviews.llvm.org/D15453 llvm-svn: 255626
* [OPENMP 4.5] Parsing/sema for 'hint' clause of 'critical' directive.Alexey Bataev2015-12-1519-37/+369
| | | | | | OpenMP 4.5 adds 'hint' clause to critical directive. Patch adds parsing/semantic analysis for this clause. llvm-svn: 255625
* [IR] Add classof for GetElementPtrConstantExpr, CompareConstantExpr, ↵Craig Topper2015-12-152-2/+30
| | | | | | | | InsertValueConstantExpr, and ExtractValueConstantExpr. All but CompareConstantExpr were being used in casts that were erroneously using ConstantExpr::classof due to inheritance. While there use cast<CompareConstantExpr> to simplify code slightly. I believe in one place we were always casting to ExtractValueConstantExpr when we were trying to choose between ExtractValueConstantExpr and InsertValueConstantExpr because of this. But since they have identical layouts this didn't cause any observable problems. llvm-svn: 255624
* Use CmpInst::Predicate instead of 'unsigned short' in some places. NFCCraig Topper2015-12-155-43/+46
| | | | llvm-svn: 255623
* [ELF][MIPS] Remove applying the redundant bit-maskSimon Atanasyan2015-12-151-1/+1
| | | | | | | The `mipsHigh` return type is `uint16_t` so we do not need to extract low 16-bits from return value explicitly. llvm-svn: 255622
* Fix MSVC build with LLVM_ENABLE_THREADS=OFFMehdi Amini2015-12-151-1/+10
| | | | | | | Follow-up to the ThreadPool implementation. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 255621
* LoopUtils: Remove defaults for arguments that are always specified. NFCJustin Bogner2015-12-151-3/+3
| | | | llvm-svn: 255620
* [LLDB][MIPS] Added support for MIPS1, MIPS2, MIPS3, MIPS4 and MIPS5 ↵Sagar Thakur2015-12-151-0/+5
| | | | | | | | | | | | | instruction sets Patch by Nitesh Jain. Summary: This Patch will allowed LLDB to debug respective instruction sets binaries. Reviewers: jaydeep, clayborg Subscribers: lldb-commits, mohit.bhakkad, sagar, bhushan Differential: http://reviews.llvm.org/D15487 llvm-svn: 255619
* Replace the unit test of BranchProbability::normalizeEdgeWeights() with ↵Cong Hou2015-12-151-29/+25
| | | | | | | | BranchProbability::normalizeProbabilities(). BranchProbability::normalizeEdgeWeights() is going to be retired soon. llvm-svn: 255618
* Fix template parameter pack handling in ThreadPoolTeresa Johnson2015-12-152-1/+15
| | | | | | | Fixes passing of template parameter pack via std::forward and add unittest. llvm-svn: 255617
* Bump up MAX_SUBTARGET_FEATURESWeiming Zhao2015-12-151-1/+1
| | | | | | | | | | | | | | | | | | | Summary: Currently, ARMGenSubtargetInfo (from ARM.td) is reaching the limit of 96: enum : uint64_t { ... XScale = 95 }; We need to bump the maximum value up to accommodate future changes and/or customized subtarget definitions. Reviewers: apazos, t.p.northover Subscribers: llvm-commits, aemerson Differential Revision: http://reviews.llvm.org/D15514 llvm-svn: 255616
* NFC: Fix typo in commentVaivaswatha Nagaraj2015-12-151-1/+1
| | | | llvm-svn: 255615
* [ShrinkWrapping] Do not choose restore point inside loops.Quentin Colombet2015-12-152-5/+163
| | | | | | | | | | | | | | | | | | | | The post-dominance property is not sufficient to guarantee that a restore point inside a loop is safe. E.g., while(1) { Save Restore if (...) break; use/def CSRs } All the uses/defs of CSRs are dominated by Save and post-dominated by Restore. However, the CSRs uses are still reachable after Restore and before Save are executed. This fixes PR25824 llvm-svn: 255613
* [WebAssembly] Use an immediate OperandType for offset operands.Dan Gohman2015-12-151-23/+23
| | | | llvm-svn: 255612
* Try to let r255604 have an effect.Nico Weber2015-12-151-6/+6
| | | | llvm-svn: 255611
OpenPOWER on IntegriCloud