summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Cast variable to void to resolve unused variable warning in non-asserts builds.Richard Trieu2015-12-151-0/+1
| | | | llvm-svn: 255704
* Fix "Not having LAHF/SAHF" assert.Hans Wennborg2015-12-151-1/+2
| | | | | | It wants to assert that the subtarget is 64-bit, not the register. llvm-svn: 255703
* AMDGPU/SI: Set the code object work group segment size when targeting HSATom Stellard2015-12-152-0/+6
| | | | | | | | | | Reviewers: arsenm Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D15493 llvm-svn: 255702
* [llvm-objdump/MachODump] Shrink code a little bit. NFC.Davide Italiano2015-12-151-4/+1
| | | | llvm-svn: 255701
* [x86] inline calls to fmaxf / llvm.maxnum.f32 using maxss (PR24475)Sanjay Patel2015-12-152-98/+228
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch improves on the suggested codegen from PR24475: https://llvm.org/bugs/show_bug.cgi?id=24475 but only for the fmaxf() case to start, so we can sort out any bugs before extending to fmin, f64, and vectors. The fmax / maxnum definitions provide us flexibility for signed zeros, so the only thing we have to worry about in this replacement sequence is NaN handling. Note 1: It may be better to implement this as lowerFMAXNUM(), but that exposes a problem: SelectionDAGBuilder::visitSelect() transforms compare/select instructions into FMAXNUM nodes if we declare FMAXNUM legal or custom. Perhaps that should be checking for NaN inputs or global unsafe-math before transforming? As it stands, that bypasses a big set of optimizations that the x86 backend already has in PerformSELECTCombine(). Note 2: The v2f32 test reveals another bug; the vector is extended to v4f32, so we have completely unnecessary operations happening on undef elements of the vector. Differential Revision: http://reviews.llvm.org/D15294 llvm-svn: 255700
* [Sparc] Tweak r255668: Use llvm_unreachable.James Y Knight2015-12-151-1/+1
| | | | llvm-svn: 255698
* First pass at LLDBRPC.frameworkGreg Clayton2015-12-153-2/+29
| | | | llvm-svn: 255697
* Add a few common paths that are not to be tracked to the svnignore propertyEnrico Granata2015-12-150-0/+0
| | | | llvm-svn: 255696
* Cross-DSO control flow integrity (compiler-rt part).Evgeniy Stepanov2015-12-1511-3/+511
| | | | | | | | | | | | | | | | | | This is an initial version of the runtime cross-DSO CFI support library. It contains a number of FIXMEs, ex. it does not support the diagnostic mode nor dlopen/dlclose, but it works and can be tested. Diagnostic mode, in particular, would require some refactoring (we'd like to gather all CFI hooks in the UBSan library into one function so that we could easier pass the diagnostic information down to __cfi_check). It will be implemented later. Once the diagnostic mode is in, I plan to create a second test configuration to run all existing tests in both modes. For now, this patch includes only a few new cross-DSO tests. llvm-svn: 255695
* Cross-DSO control flow integrity (Clang part).Evgeniy Stepanov2015-12-1520-52/+489
| | | | | | | | | | | | | | Clang-side cross-DSO CFI. * Adds a command line flag -f[no-]sanitize-cfi-cross-dso. * Links a runtime library when enabled. * Emits __cfi_slowpath calls is bitset test fails. * Emits extra hash-based bitsets for external CFI checks. * Sets a module flag to enable __cfi_check generation during LTO. This mode does not yet support diagnostics. llvm-svn: 255694
* Cross-DSO control flow integrity (LLVM part).Evgeniy Stepanov2015-12-157-0/+263
| | | | | | | | An LTO pass that generates a __cfi_check() function that validates a call based on a hash of the call-site-known type and the target pointer. llvm-svn: 255693
* AMDGPU/SI: Set the code objects private segment size when targeting HSA.Tom Stellard2015-12-153-1/+9
| | | | | | | | | | | | Summary: I'm not sure how things worked before without this. Reviewers: arsenm Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D15492 llvm-svn: 255692
* [LoopVectorizer] Refine loop vectorizer's register usage calculator by ↵Cong Hou2015-12-153-32/+178
| | | | | | | | | | | | | | | | | | | | | | ignoring specific instructions. (This is the third attempt to check in this patch, and the first two are r255454 and r255460. The once failed test file reg-usage.ll is now moved to test/Transform/LoopVectorize/X86 directory with target datalayout and target triple indicated.) LoopVectorizationCostModel::calculateRegisterUsage() is used to estimate the register usage for specific VFs. However, it takes into account many instructions that won't be vectorized, such as induction variables, GetElementPtr instruction, etc.. This makes the loop vectorizer too conservative when choosing VF. In this patch, the induction variables that won't be vectorized plus GetElementPtr instruction will be added to ValuesToIgnore set so that their register usage won't be considered any more. Differential revision: http://reviews.llvm.org/D15177 llvm-svn: 255691
* clang/test/CodeGen/ms_this.cpp: Fix for -Asserts.NAKAMURA Takumi2015-12-151-6/+12
| | | | llvm-svn: 255690
* AMDGPU/SI: Emit constant variables in the .hsatext section when targeting HSATom Stellard2015-12-154-21/+15
| | | | | | | | | | Reviewers: arsenm Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D15426 llvm-svn: 255689
* [PGO] Improve prof library portabilityXinliang David Li2015-12-153-6/+8
| | | | | | | | | Patch by: Johan Engelen Introduce LLVM_LIBRARY_WEAK macro. Define LLVM_LIBRARY_WEAK and LLVM_LIBRARY_VISIBIITY for MSVC llvm-svn: 255688
* Enable the 'type X list' formatters commands to list formatters in language ↵Enrico Granata2015-12-152-35/+60
| | | | | | categories llvm-svn: 255687
* Remove unused _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS macroEric Fiselier2015-12-151-4/+0
| | | | llvm-svn: 255686
* Fix clang/test/CodeGen/ms_this.cpp.NAKAMURA Takumi2015-12-151-3/+1
| | | | llvm-svn: 255685
* [PGO] Open file with explict binary modeXinliang David Li2015-12-151-1/+1
| | | | | | | | | | Patch by: Johan Engelen On windows, opening in text mode will result in line ending chars to be appended leading to profile corruption. llvm-svn: 255684
* [libcxx] Enable noexcept for GCC 4.6 and greaterEric Fiselier2015-12-151-19/+15
| | | | | | | | | | | | | | | | Summary: This patch allows GCC 4.6 and above to use `noexcept` as opposed to `throw()`. Is it an ABI safe change to suddenly switch on `noexcept`? I imagine it must be because it's disabled in w/ clang in C++03 but not C++11. Reviewers: danalbert, jroelofs, mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15516 llvm-svn: 255683
* Wrap include of <future> in some warning suppression pragmasReid Kleckner2015-12-151-1/+11
| | | | | | | | Eventually we may need to sink this include to the .cpp file or something to suport LLVM_ENABLE_THREADS=OFF, but this solves my immediate problem of fixing the build. llvm-svn: 255682
* [WebAssembly] Implement instruction selection for constant offsets in addresses.Dan Gohman2015-12-157-28/+574
| | | | | | | | | | | | | | | | | | | | Add instruction patterns for matching load and store instructions with constant offsets in addresses. The code is fairly redundant due to the need to replicate everything between imm, tglobaldadr, and texternalsym, but this appears to be common tablegen practice. The main alternative appears to be to introduce matching functions with C++ code, but sticking with purely generated matchers seems better for now. Also note that this doesn't yet support offsets from getelementptr, which will be the most common case; that will depend on a change in target-independent code in order to set the NoUnsignedWrap flag, which I'll submit separately. Until then, the testcase uses ptrtoint+add+inttoptr with a nuw on the add. Also implement isLegalAddressingMode with an approximation of this. Differential Revision: http://reviews.llvm.org/D15538 llvm-svn: 255681
* Initialize all bytes in vp data (msan error)Xinliang David Li2015-12-151-4/+5
| | | | llvm-svn: 255680
* Add support for the .debug_macro section of the forthcoming DWARF 5 spec.Eric Christopher2015-12-151-0/+20
| | | | | | Patch by B. Sivachandra Reddy! llvm-svn: 255679
* Fix clang-cl self-host with MSVC 2013 STL std::bind implementationReid Kleckner2015-12-151-1/+6
| | | | llvm-svn: 255678
* [WinEH] Remove unused intrinsic llvm.x86.seh.restoreframeReid Kleckner2015-12-154-74/+5
| | | | | | | We can clean this up now that we have the X86 CATCHRET instruction to restore the FP, SP, and BP. llvm-svn: 255677
* test-infra: refactored new summary results into base ResultsFormatter classTodd Fiala2015-12-154-386/+326
| | | | | | | This allows more specialized formatters to still reuse the results summarization display from the base class. llvm-svn: 255676
* [WinEH] Update clang to use operand bundles on call sitesDavid Majnemer2015-12-152-6/+37
| | | | | | | | | | | This updates clang to use bundle operands to associate an invoke with the funclet which it is contained within. Depends on D15517. Differential Revision: http://reviews.llvm.org/D15518 llvm-svn: 255675
* [WinEH] Use operand bundles to describe call sitesDavid Majnemer2015-12-1536-250/+303
| | | | | | | | | | | | | | | | | SimplifyCFG allows tail merging with code which terminates in unreachable which, in turn, makes it possible for an invoke to end up in a funclet which it was not originally part of. Using operand bundles on invokes allows us to determine whether or not an invoke was part of a funclet in the source program. Furthermore, it allows us to unambiguously answer questions about the legality of inlining into call sites which the personality may have trouble with. Differential Revision: http://reviews.llvm.org/D15517 llvm-svn: 255674
* Test cleanup -- remove duplicate run linesXinliang David Li2015-12-151-4/+0
| | | | llvm-svn: 255673
* AMDGPU/SI: Select constant loads with non-uniform addresses to MUBUF ↵Tom Stellard2015-12-159-43/+178
| | | | | | | | | | | | | | | | | | | | | | | | instructions Summary: We were previously selecting all constant loads to SMRD instructions and legalizing the SMRDs with non-uniform addresses during the SIFixSGPRCopesPass. This new solution is more simple and also generates much better code, because the instruction selector is able to take advantage of all the MUBUF addressing modes that are legalization pass wasn't able to. We also no longer need to generate v_add_* instructions when we have a uniform pointer and a non-uniform offset, as this is now folded into the MUBUF instruction during instruction selection. Reviewers: arsenm Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D15425 llvm-svn: 255672
* LLVM tutorial: fix broken links/anchorsAlex Denisov2015-12-1517-52/+52
| | | | llvm-svn: 255671
* Coverage code refactoring /NFCXinliang David Li2015-12-153-13/+18
| | | | llvm-svn: 255670
* LPM: Stop threading `Pass *` through all of the loop utility APIs. NFCJustin Bogner2015-12-1518-175/+164
| | | | | | | | | | | | | | | | | | | | | | A large number of loop utility functions take a `Pass *` and reach into it to find out which analyses to preserve. There are a number of problems with this: - The APIs have access to pretty well any Pass state they want, so it's hard to tell what they may or may not do. - Other APIs have copied these and pass around a `Pass *` even though they don't even use it. Some of these just hand a nullptr to the API since the callers don't even have a pass available. - Passes in the new pass manager don't work like the current ones, so the APIs can't be used as is there. Instead, we should explicitly thread the analysis results that we actually care about through these APIs. This is both simpler and more reusable. llvm-svn: 255669
* [Sparc] Fix handling of double incoming arguments on sparc little-endian.James Y Knight2015-12-152-9/+204
| | | | | | | | | | | | | | On SparcV8, doubles get passed in two 32-bit integer registers. The call code was already handling endianness correctly, but the incoming argument code was not -- it got the two halves in opposite order. Also remove some dead code in LowerFormalArguments_32 to handle less-than-32bit values, which can't actually happen. Finally, add some test cases for the 32-bit calling convention, cribbed from the 64abi.ll test, and run for both big and little-endian. llvm-svn: 255668
* Unsupport test that should not be run on HexagonKrzysztof Parzyszek2015-12-151-0/+4
| | | | llvm-svn: 255667
* [Docs] Fix Unexpected indentation errors.Akira Hatanaka2015-12-151-0/+2
| | | | llvm-svn: 255665
* [X86] MOVPC32r should only emit CFI adjustments when neededMichael Kuperstein2015-12-152-4/+35
| | | | | | | | | We only want to emit CFI adjustments when actually using DWARF. This fixes PR25828. Differential Revision: http://reviews.llvm.org/D15522 llvm-svn: 255664
* AMDGPU: Add aliases for all VI targetsTom Stellard2015-12-151-1/+1
| | | | llvm-svn: 255663
* 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
OpenPOWER on IntegriCloud