summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [ODRHash] static_cast and Stmt hashing.Richard Trieu2017-02-226-91/+366
| | | | | | | | | | Add support for static_cast in classes. Add pointer-independent profiling for Stmt's, sharing most of the logic with Stmt::Profile. This is the first of the deep sub-Decl diffing for error messages. Differential Revision: https://reviews.llvm.org/D21675 llvm-svn: 295890
* PredicateInfo: Support switch statementsDaniel Berlin2017-02-227-81/+306
| | | | | | | | | | | | | | | | | | | Summary: Depends on D29606 and D29682 Makes us pass GVN's edge.ll (we also will pass a few other testcases they just need cleaning up). Thoughts on the Predicate* hiearchy of classes especially welcome :) (it's not clear to me how best to organize it, and currently, the getBlock* seems ... uglier than maybe wasting a field somewhere or something). Reviewers: davide Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29747 llvm-svn: 295889
* Add pair conversion functions to BasicBlockEdge.Daniel Berlin2017-02-221-0/+4
| | | | llvm-svn: 295888
* Move updating functions to MemorySSAUpdater.Daniel Berlin2017-02-227-231/+220
| | | | | | | | | | | | | | | Add updater to passes that now need it. Move around code in MemorySSA to expose needed functions. Summary: Mostly cleanup Reviewers: george.burgess.iv Subscribers: llvm-commits, Prazek Differential Revision: https://reviews.llvm.org/D30221 llvm-svn: 295887
* PR32034: Evaluate _Atomic(T) in-place when T is a class or array type.Richard Smith2017-02-222-12/+46
| | | | | | | | This is necessary in order for the evaluation of an _Atomic initializer for those types to have an associated object, which an initializer for class or array type needs. llvm-svn: 295886
* [LV] Update floating-point induction test checks (NFC)Matthew Simpson2017-02-221-57/+129
| | | | llvm-svn: 295885
* [LSR] Canonicalize formula and put recursive Reg related with current loop ↵Wei Mi2017-02-222-39/+148
| | | | | | | | | | | | | | | | in ScaledReg. After rL294814, LSR formula can have multiple SCEVAddRecExprs inside of its BaseRegs. Previous canonicalization will swap the first SCEVAddRecExpr in BaseRegs with ScaledReg. But now we want to swap the SCEVAddRecExpr Reg related with current loop with ScaledReg. Otherwise, we may generate code like this: RegA + lsr.iv + RegB, where loop invariant parts RegA and RegB are not grouped together and cannot be promoted outside of loop. With this patch, it will ensure lsr.iv to be generated later in the expr: RegA + RegB + lsr.iv, so that RegA + RegB can be promoted outside of loop. Differential Revision: https://reviews.llvm.org/D26781 llvm-svn: 295884
* [RDF] Support for partial structural aliases in RegisterAggrKrzysztof Parzyszek2017-02-222-61/+67
| | | | llvm-svn: 295883
* Fix header documentation.Greg Clayton2017-02-221-2/+2
| | | | llvm-svn: 295882
* Fix header documentation.Greg Clayton2017-02-221-5/+3
| | | | llvm-svn: 295881
* [Support] Re-add the special OSX flags on mmap.Zachary Turner2017-02-221-0/+19
| | | | | | | | The problem appears to be that these flags can only be used when mapping a file for read-only, not for readwrite. So we do that here. llvm-svn: 295880
* [Hexagon] Add intrinsics for masked vector storesKrzysztof Parzyszek2017-02-224-0/+146
| | | | | | Patch by Harsha Jagasia. llvm-svn: 295879
* AMDGPU: Don't look at chain users when adjusting writemaskMatt Arsenault2017-02-222-0/+90
| | | | | | Fixes not adjusting using new intrinsics with chains. llvm-svn: 295878
* AMDGPU: Always allocate emergency stack slot at offset 0Matt Arsenault2017-02-2219-174/+222
| | | | | | | | | This allows us to ensure that 0 is never a valid pointer to a user object, and ensures that the offset is always legal without needing a register to access it. This comes at the cost of usable offsets and wasted stack space. llvm-svn: 295877
* Add a comment about thread safety.Rui Ueyama2017-02-221-0/+4
| | | | llvm-svn: 295876
* [WebAssembly] Update llvm-readobj tests for switch to version 0x1Derek Schuff2017-02-222-1/+1
| | | | llvm-svn: 295875
* AMDGPU: Add fmed3 half builtinMatt Arsenault2017-02-226-2/+34
| | | | llvm-svn: 295874
* AMDGPU: Change exp with compr bit printingMatt Arsenault2017-02-222-29/+55
| | | | llvm-svn: 295873
* stop using associative comdats for SEH filter functionsBob Haarman2017-02-222-14/+3
| | | | | | | | | | | | Summary: We implement structured exception handling (SEH) by generating filter functions for functions that use exceptions. Currently, we use associative comdats to ensure that the filter functions are preserved if and only if the functions we generated them for are preserved. This can lead to problems when generating COFF objects - LLVM may decide to inline a function that uses SEH and remove its body, at which point we will end up with a comdat that COFF cannot represent. To avoid running into that situation, this change makes us not use associative comdats for SEH filter functions. We can still get the benefits we used the associative comdats for: we will always preserve filter functions we use, and dead stripping can eliminate the ones we don't use. Reviewers: rnk, pcc, ruiu Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D30117 llvm-svn: 295872
* Revert "AMDGPU : Update TrapCode based on Trap Handler ABI."Wei Ding2017-02-225-18/+14
| | | | | | This reverts commit r295867. llvm-svn: 295871
* [CodeGen] Note where we add ABI-specific args in ctors. NFC.George Burgess IV2017-02-224-44/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | Meta: The ultimate goal is to teach ExtParameterInfo about pass_object_size attributes. This is necessary for that, since our ExtParameterInfo is a bit buggy in C++. I plan to actually make use of this Prefix/Suffix info in the near future, but I like small single-purpose changes. Especially when those changes are hard to actually test... At the moment, some of our C++-specific CodeGen pretends that ABIs can only add arguments to the beginning of a function call. This isn't quite correct: args can be appended to the end, as well. It hasn't mattered much until now, since we seem to only use this "number of arguments added" data when calculating the ExtParameterInfo to use when making a CGFunctionInfo. Said ExtParameterInfo is currently only used for ParameterABIs (Swift) and ns_consumed (ObjC). So, this patch allows ABIs to indicate whether args they added were at the beginning or end of an argument list. We can use this information to emit ExtParameterInfos more correctly, though like said, that bit is coming soon. No tests since this is theoretically a nop. llvm-svn: 295870
* [WebAssembly] Update llvm-objdump tests for the new wasm version number.Dan Gohman2017-02-222-1/+1
| | | | llvm-svn: 295869
* [SLP] Fix for PR32036: Vectorized horizontal reduction returning wrong resultAlexey Bataev2017-02-222-17/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: If the same value is used several times as an extra value, SLP vectorizer takes it into account only once instead of actual number of using. For example: ``` int val = 1; for (int y = 0; y < 8; y++) { for (int x = 0; x < 8; x++) { val = val + input[y * 8 + x] + 3; } } ``` We have 2 extra rguments: `1` - initial value of horizontal reduction and `3`, which is added 8*8 times to the reduction. Before the patch we added `1` to the reduction value and added once `3`, though it must be added 64 times. Reviewers: mkuper, mzolotukhin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30262 llvm-svn: 295868
* AMDGPU : Update TrapCode based on Trap Handler ABI.Wei Ding2017-02-225-14/+18
| | | | | | Differential Revision: http://reviews.llvm.org/D30232 llvm-svn: 295867
* Improve support for 'decltype(auto)' in template template parameter matching.Richard Smith2017-02-222-6/+20
| | | | | | | | | | | | | | | A 'decltype(auto)' parameter can match any other kind of non-type template parameter, so should be usable in place of any other parameter in a template template argument. The standard is sadly extremely unclear on how this is supposed to work, but this seems like the obviously-correct result. It's less clear whether an 'auto' parameter should be able to match 'decltype(auto)', since the former cannot be used if the latter turns out to be used for a reference type, but if we disallow that then consistency suggests we should also disallow 'auto' matching 'T' for the same reason, defeating intended use cases of the feature. llvm-svn: 295866
* Move llvm_unreachable out of switch.Rafael Espindola2017-02-221-2/+5
| | | | | | | This should make gcc happy and still produce a clang warning if we add another value to the enum. llvm-svn: 295865
* Bring back 2>&1 redirection for this testMatthias Braun2017-02-221-1/+1
| | | | llvm-svn: 295864
* [AArch64] Extend AArch64RedundantCopyElimination to do simple copy propagation.Geoff Berry2017-02-222-43/+422
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Extend AArch64RedundantCopyElimination to catch cases where the register that is known to be zero is COPY'd in the predecessor block. Before this change, this pass would catch cases like: CBZW %W0, <BB#1> BB#1: %W0 = COPY %WZR // removed After this change, cases like the one below are also caught: %W0 = COPY %W1 CBZW %W1, <BB#1> BB#1: %W0 = COPY %WZR // removed This change results in a 4% increase in static copies removed by this pass when compiling the llvm test-suite. It also fixes regressions caused by doing post-RA copy propagation (a separate change to be put up for review shortly). Reviewers: junbuml, mcrosier, t.p.northover, qcolombet, MatzeB Subscribers: aemerson, rengolin, llvm-commits Differential Revision: https://reviews.llvm.org/D30113 llvm-svn: 295863
* [LV] Add scalar floating-point induction test (NFC)Matthew Simpson2017-02-221-0/+58
| | | | llvm-svn: 295862
* [ModuleSummaryAnalysis] Don't crash when referencing unnamed globals.Davide Italiano2017-02-222-0/+16
| | | | | | | Instead, just be conservative as these are unfrequent enough. Thanks to Peter Collingbourne for the discussion about this on IRC. llvm-svn: 295861
* [WebAssembly] Implement the wasm binary container header.Dan Gohman2017-02-224-2/+15
| | | | | | | Also, update the version number to 0x1, which is what engines are now expecting. llvm-svn: 295860
* MIRTests: Remove unnecessary 2>&1 redirectionMatthias Braun2017-02-2269-69/+69
| | | | | | | llc mir output goes to stdout nowadays, so the 2>&1 is not necessary anymore for most tests. llvm-svn: 295859
* [LoopVectorize] Added address space check when analysing interleaved accessesKarl-Johan Karlsson2017-02-222-14/+56
| | | | | | | | | | | | | | | | | | | | Prevent memory objects of different address spaces to be part of the same load/store groups when analysing interleaved accesses. This is fixing pr31900. Reviewers: HaoLiu, mssimpso, mkuper Reviewed By: mssimpso, mkuper Subscribers: llvm-commits, efriedma, mzolotukhin Differential Revision: https://reviews.llvm.org/D29717 This reverts r295042 (re-applies r295038) with an additional fix for the buildbot problem. llvm-svn: 295858
* [WebAssembly] Define a table of function signatures for runtime library calls.Dan Gohman2017-02-223-0/+1345
| | | | | | | | | | LLVM CodeGen emits references to external symbols that are never declared in LLVM IR level, so they have no declared signature. However, WebAssembly requires all functions be declared with signatures. This patch adds a table for providing signatures for known runtime libcalls that will be used in subsequent patches to emit declarations for such functions. llvm-svn: 295857
* [RDF] Skip undef uses when calculating kill flagsKrzysztof Parzyszek2017-02-221-1/+1
| | | | llvm-svn: 295856
* [RDF] Only access block live-ins when tracking livenessKrzysztof Parzyszek2017-02-221-2/+4
| | | | llvm-svn: 295855
* [Support] Provide linux/magic.h fallback for older kernelsMichal Gorny2017-02-222-0/+24
| | | | | | | | | | | | | | | | | | | | | The function for distinguishing local and remote files added in r295768 unconditionally uses linux/magic.h header to provide necessary filesystem magic numbers. However, in kernel headers predating 2.6.18 the magic numbers are spread throughout multiple include files. Furthermore, LLVM did not require kernel headers being installed so far. To increase the portability across different versions of Linux kernel and different Linux systems, add CMake header checks for linux/magic.h and -- if it is missing -- the linux/nfs_fs.h and linux/smb.h headers which contained the numbers previously. Furthermore, since the numbers are static and the feature does not seem critical enough to make LLVM require kernel headers at all, add fallback constants for the case when none of the necessary headers is available. Differential Revision: https://reviews.llvm.org/D30261 llvm-svn: 295854
* [SLP] Test with extra argument used several times.Alexey Bataev2017-02-221-0/+108
| | | | llvm-svn: 295853
* Fix an obvious bug in SampleProfileReaderGCC.Dehao Chen2017-02-223-5/+29
| | | | | | | | | | | | | | Summary: The CallTargetProfile should be added to FProfile to be consistent with other profile readers. Reviewers: dnovillo, davidxl Reviewed By: davidxl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30233 llvm-svn: 295852
* [WebAssembly] Configure codegen to legalize f16 values.Dan Gohman2017-02-222-0/+33
| | | | llvm-svn: 295850
* [DAGCombiner] revert r295336Bill Seurer2017-02-229-74/+170
| | | | | | | | | | | r295336 causes a bootstrapped clang to fail for many compilations on powerpc BE. See http://lab.llvm.org:8011/builders/clang-ppc64be-linux-multistage/builds/2315 for example. Reverting as per the developer's request. llvm-svn: 295849
* [X86][SSE] getTargetConstantBitsFromNode - insert constant bits directly ↵Simon Pilgrim2017-02-221-18/+15
| | | | | | | | into masks. Minor optimization, don't create temporary mask APInts that are just going to be OR'd into the accumulate masks - insert directly instead. llvm-svn: 295848
* [DeLICM] Add regression tests for DeLICM reject cases.Michael Kruse2017-02-227-3/+401
| | | | | | | | | | | | | | | | | These tests were not included in the main DeLICM commit. These check the cases where zone analysis cannot be successful because of assumption violations. We use the LLVM optimization remark infrastructure as it seems to be the best fit for this kind of messages. I tried to make use if the OptimizationRemarkEmitter. However, it would insert additional function passes into the pass manager to get the hotness information. The pass manager would insert them between the flatten pass and delicm, causing the ScopInfo with the flattened schedule being thrown away. Differential Revision: https://reviews.llvm.org/D30253 llvm-svn: 295846
* [X86][SSE] Use APInt::getBitsSet() instead of APInt::getLowBitsSet().shl() ↵Simon Pilgrim2017-02-222-8/+10
| | | | | | separately. NFCI. llvm-svn: 295845
* [OpenCL] r600 needs OpenCL kernel calling conventionJan Vesely2017-02-222-1/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D30236 llvm-svn: 295843
* [Support] XFAIL is_local for mipsSimon Dardis2017-02-221-0/+36
| | | | | | | is_local can't pass on some our buildbots as some of our buildbots use network shares for building and testing LLVM. llvm-svn: 295840
* Remove superfluous initializer. Yaron Keren2017-02-221-1/+1
| | | | | | The following fully-covered switch either sets value to External or exits the function. llvm-svn: 295839
* [DeLICM] Fix wrong comment. NFC.Michael Kruse2017-02-221-1/+1
| | | | | | | Correct a comment that claimed that a store after load was detected when the code checks a load after a store. llvm-svn: 295835
* * [AMDGPU][mc][tests] Updated coverage/smoke tests for gfx7 and gfx8; minor ↵Dmitry Preobrazhensky2017-02-224-100835/+114665
| | | | | | | test corrections. NB: several old tests have been corrected because they violated constant bus limitations llvm-svn: 295834
* [DeLICM] Print message when zone analysis is not available on -analysis.Michael Kruse2017-02-221-0/+5
| | | | | | | This is to distinguish the cases that analysis has failed from the case where not transformation was performed. llvm-svn: 295833
OpenPOWER on IntegriCloud