summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [Hexagon] Use integrated assembler by defaultKrzysztof Parzyszek2015-12-094-65/+67
| | | | llvm-svn: 255127
* Revert "[InstCombine] fold bitcasts around an extractelement"Mehdi Amini2015-12-092-42/+8
| | | | | | | | | This reverts commit r255124. Broke http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/4193/steps/test/logs/stdio From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 255126
* [WebAssembly] Reintroduce ARGUMENT moving logicDan Gohman2015-12-0910-7/+123
| | | | | | | | | | | | | | | | | | | Reinteroduce the code for moving ARGUMENTS back to the top of the basic block. While the ARGUMENTS physical register prevents sinking and scheduling from moving them, it does not appear to be sufficient to prevent SelectionDAG from moving them down in the initial schedule. This patch introduces a patch that moves them back to the top immediately after SelectionDAG runs. This is still hopefully a temporary solution. http://reviews.llvm.org/D14750 is one alternative, though the review has not been favorable, and proposed alternatives are longer-term and have other downsides. This fixes the main outstanding -verify-machineinstrs failures, so it adds -verify-machineinstrs to several tests. Differential Revision: http://reviews.llvm.org/D15377 llvm-svn: 255125
* [InstCombine] fold bitcasts around an extractelementSanjay Patel2015-12-092-8/+42
| | | | | | | | | | | | | | | | | | | | | | | | Example: bitcast (extractelement (bitcast <2 x float> %X to <2 x i32>), 1) to float ---> extractelement <2 x float> %X, i32 1 This is part of fixing PR25543: https://llvm.org/bugs/show_bug.cgi?id=25543 The next step will be to generalize this fold: trunc ( lshr ( bitcast X) ) -> extractelement (X) Ie, I'm hoping to replace the existing transform of: bitcast ( trunc ( lshr ( bitcast X))) added by: http://reviews.llvm.org/rL112232 with 2 less specific transforms to catch the case in the bug report. Differential Revision: http://reviews.llvm.org/D14879 llvm-svn: 255124
* Change hasUniqueInitializer() to call isStrongDefinitionForLinker() instead ↵Mehdi Amini2015-12-092-12/+29
| | | | | | | | | | | | | | | | | | | | | | of !isWeakForLinker() Summary: Available_externally global variable with initializer were considered "hasInitializer()", while obviously it can't match the description: Whether the global variable has an initializer, and any changes made to the initializer will turn up in the final executable. since modifying the initializer of an externally available variable does not make sense. Reviewers: pcc, rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15351 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 255123
* Re-commit r255115, with the PredicatedScalarEvolution class moved toSilviu Baranga2015-12-098-165/+250
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ScalarEvolution.h, in order to avoid cyclic dependencies between the Transform and Analysis modules: [LV][LAA] Add a layer over SCEV to apply run-time checked knowledge on SCEV expressions Summary: This change creates a layer over ScalarEvolution for LAA and LV, and centralizes the usage of SCEV predicates. The SCEVPredicatedLayer takes the statically deduced knowledge by ScalarEvolution and applies the knowledge from the SCEV predicates. The end goal is that both LAA and LV should use this interface everywhere. This also solves a problem involving the result of SCEV expression rewritting when the predicate changes. Suppose we have the expression (sext {a,+,b}) and two predicates P1: {a,+,b} has nsw P2: b = 1. Applying P1 and then P2 gives us {a,+,1}, while applying P2 and the P1 gives us sext({a,+,1}) (the AddRec expression was changed by P2 so P1 no longer applies). The SCEVPredicatedLayer maintains the order of transformations by feeding back the results of previous transformations into new transformations, and therefore avoiding this issue. The SCEVPredicatedLayer maintains a cache to remember the results of previous SCEV rewritting results. This also has the benefit of reducing the overall number of expression rewrites. Reviewers: mzolotukhin, anemet Subscribers: jmolloy, sanjoy, llvm-commits Differential Revision: http://reviews.llvm.org/D14296 llvm-svn: 255122
* [RenderScript] Add hook for destroyed allocationsEwan Crawford2015-12-092-1/+46
| | | | | | | New hook for rsdAllocationDestroy() which is called when allocations are deleted. LLDB should be aware of this so we can remove the allocation from our internal list. llvm-svn: 255121
* ARM: don't use a deleted node as the BaseReg in complex pattern.Tim Northover2015-12-092-1/+19
| | | | | | | | | | We mutated the DAG, which invalidated the node we were trying to use as a base register. Sometimes we got away with it, but other times the node really did get deleted before it was finished with. Should fix PR25733 llvm-svn: 255120
* WebAssembly: add missing failure to the list.JF Bastien2015-12-091-0/+1
| | | | llvm-svn: 255119
* Correctly XFAIL TestReturnValuePavel Labath2015-12-091-1/+1
| | | | | | android is not an "os", use the target triple to match it. llvm-svn: 255118
* Revert r255115 until we figure out how to fix the bot failures.Silviu Baranga2015-12-098-249/+164
| | | | llvm-svn: 255117
* Avoid extended mnemonic 'mfvrsave' in assembly codeBill Schmidt2015-12-091-2/+2
| | | | llvm-svn: 255116
* [LV][LAA] Add a layer over SCEV to apply run-time checked knowledge on SCEV ↵Silviu Baranga2015-12-098-164/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | expressions Summary: This change creates a layer over ScalarEvolution for LAA and LV, and centralizes the usage of SCEV predicates. The SCEVPredicatedLayer takes the statically deduced knowledge by ScalarEvolution and applies the knowledge from the SCEV predicates. The end goal is that both LAA and LV should use this interface everywhere. This also solves a problem involving the result of SCEV expression rewritting when the predicate changes. Suppose we have the expression (sext {a,+,b}) and two predicates P1: {a,+,b} has nsw P2: b = 1. Applying P1 and then P2 gives us {a,+,1}, while applying P2 and the P1 gives us sext({a,+,1}) (the AddRec expression was changed by P2 so P1 no longer applies). The SCEVPredicatedLayer maintains the order of transformations by feeding back the results of previous transformations into new transformations, and therefore avoiding this issue. The SCEVPredicatedLayer maintains a cache to remember the results of previous SCEV rewritting results. This also has the benefit of reducing the overall number of expression rewrites. Reviewers: mzolotukhin, anemet Subscribers: jmolloy, sanjoy, llvm-commits Differential Revision: http://reviews.llvm.org/D14296 llvm-svn: 255115
* Fix cycle in selection DAG introduced by extractelement legalizationRobert Lougher2015-12-092-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | During selection DAG legalization, extractelement is replaced with a load instruction. To do this, a temporary store to the stack is used unless an existing store is found that can be re-used. If re-using a store, the chain going out of the store must be replaced by the one going out of the new load (this ensures that any stores that must take place after the store happens after the load, else the value might be overwritten before it is loaded). The problem is, if the extractelement index is dependent on the store replacing the chain will introduce a cycle in the selection DAG (the load uses the index, and by replacing the chain we will make the index dependent on the load). To fix this, if the index is dependent on the store, the store is skipped. This is conservative as we may end up creating an unnecessary extra store to the stack. However, the situation is not expected to occur very often. Differential Revision: http://reviews.llvm.org/D15330 llvm-svn: 255114
* [AArch64] Fix FP16 vector instructions that should only accept low registersOliver Stannard2015-12-092-3/+43
| | | | llvm-svn: 255113
* [mips][ias] Range check uimm10 operandsDaniel Sanders2015-12-097-28/+33
| | | | | | | | | | | | Summary: Reviewers: vkalintiris Subscribers: dsanders, llvm-commits Differential Revision: http://reviews.llvm.org/D15229 llvm-svn: 255112
* WebAssembly: add known failuresJF Bastien2015-12-092-2/+444
| | | | | | The bots are now running the torture tests properly. Bin all failures from the GCC C torture tests so that we can tackle failures and make the tree go red on regressions. llvm-svn: 255111
* [mips] Use multiclass patterns for f32/f64 comparisons and i32 selects.Vasileios Kalintiris2015-12-091-75/+69
| | | | | | | | | | | | | | | Summary: Although the multiclass for i32 selects might seem redundant as it has only one instantiation, we will use it to replace the correspondent patterns in Mips64r6InstrInfo.td in follow-up commits. Reviewers: dsanders Subscribers: llvm-commits, dsanders Differential Revision: http://reviews.llvm.org/D14612 llvm-svn: 255110
* Revert r254897 "[mips][microMIPS] Implement LH, LHE, LHU and LHUE instructions"Zlatko Buljan2015-12-0911-113/+10
| | | | | | | | | Commited patch was intended to implement LH, LHE, LHU and LHUE instructions. After commit test-suite failed with error message in the form of: fatal error: error in backend: Cannot select: t124: i32,ch = load<LD2[%d](tbaa=<0x94acc48>), sext from i16> t0, t2, undef:i32 For that reason I decided to revert commit r254897 and make new patch which besides implementation and standard regression tests will also have dedicated tests (CodeGen) for the above error. llvm-svn: 255109
* [LLDB][MIPS] Adding call to IsMSAAvailable() while creating ↵Sagar Thakur2015-12-092-7/+11
| | | | | | | | RegisterInfoInterface This patch will fix the test case test_p_returns_correct_data_size_for_each_qRegisterInfo_attach_llgs_* of TestLldbGdbServer.py on mips. The test fails because we were sending RegisterInfo for msa registers to client even when msa registers are not available. With this commit server will send E45(end of resigters) response if msa registers are not available. llvm-svn: 255108
* executeScopConditionally: Introduce special exiting blockTobias Grosser2015-12-0917-27/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | When introducing separate control flow for the original and optimized code we introduce now a special 'ExitingBlock': \ / EnteringBB | SplitBlock---------\ _____|_____ | / EntryBB \ StartBlock | (region) | | \_ExitingBB_/ ExitingBlock | | MergeBlock---------/ | ExitBB / \ This 'ExitingBlock' contains code such as the final_reloads for scalars, which previously were just added to whichever statement/loop_exit/branch-merge block had been generated last. Having an explicit basic block makes it easier to find these constructs when looking at the CFG. llvm-svn: 255107
* test: Fix misspelled test lineTobias Grosser2015-12-091-1/+1
| | | | llvm-svn: 255106
* XFAIL TestReturnValue for remote Windows->Android testsPavel Labath2015-12-092-1/+4
| | | | | | this also adds the ability to match the host platform to the expectedFailureAll decorator. llvm-svn: 255105
* Fix a cleanup error in TestPlatformProcessConnect.pyTamas Berghammer2015-12-091-1/+1
| | | | llvm-svn: 255104
* [ELF] - Implement the TLS relocation optimization for 32-bit x86.George Rimar2015-12-094-3/+283
| | | | | | | | | | | Implement the TLS relocation optimization for 32-bit x86 that is described in "ELF Handling For Thread-Local Storage" by Ulrich Drepper, chapter 5, "IA-32 Linker Optimizations". Specifically, this patch implements these optimizations: LD->LE, GD->IE, GD->LD, and IE->LE. Differential revision: http://reviews.llvm.org/D15292 llvm-svn: 255103
* EarlyCSE: fix typo from rL255054.JF Bastien2015-12-091-1/+1
| | | | llvm-svn: 255102
* Revert "Implement a new pass - LiveDebugValues - to compute the set of live ↵Mehdi Amini2015-12-0914-1132/+5
| | | | | | | | | | | DEBUG_VALUEs at each basic block and insert them. Reviewed and accepted at: http://reviews.llvm.org/D11933" This reverts commit r255096. Break the bots: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/16378/ From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 255101
* The current importing scheme is processing one function at a time,Mehdi Amini2015-12-091-54/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | loading the source Module, linking the function in the destination module, and destroying the source Module before repeating with the next function to import (potentially from the same Module). Ideally we would keep the source Module alive and import the next Function needed from this Module. Unfortunately this is not possible because the linker does not leave it in a usable state. However we can do better by first computing the list of all candidates per Module, and only then load the source Module and import all the function we need for it. The trick to process callees is to materialize function in the source module when building the list of function to import, and inspect them in their source module, collecting the list of callees for each callee. When we move the the actual import, we will import from each source module exactly once. Each source module is loaded exactly once. The only drawback it that it requires to have all the lazy-loaded source Module in memory at the same time. Currently this patch already improves considerably the link time, a multithreaded link of llvm-dis on my laptop was: real 1m12.175s user 6m32.430s sys 0m10.529s and is now: real 0m40.697s user 2m10.237s sys 0m4.375s Note: this is the full link time (linker+Import+Optimizer+CodeGen) Differential Revision: http://reviews.llvm.org/D15178 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 255100
* clang-format: Improve documentation of AlignOperands.Daniel Jasper2015-12-091-0/+7
| | | | llvm-svn: 255099
* Reformat linefeeds.NAKAMURA Takumi2015-12-094-22/+3
| | | | llvm-svn: 255098
* wire timeouts and exceptional inferior process exits through the test event ↵Todd Fiala2015-12-095-54/+420
| | | | | | | | | | | | | | | | | | | | | | | system The results formatter system is now fed timeouts and exceptional process exits (i.e. inferior dotest.py process that exited by signal on POSIX systems). If a timeout or exceptional exit happens while a test method is running on the worker queue, the timeout or exceptional exit is charged and reported against that test method. Otherwise, if no test method was running at the time of the timeout or exceptional exit, only the test filename will be reported as the TIMEOUT or ERROR. Implements: https://llvm.org/bugs/show_bug.cgi?id=24830 https://llvm.org/bugs/show_bug.cgi?id=25703 In support of: https://llvm.org/bugs/show_bug.cgi?id=25450 llvm-svn: 255097
* Implement a new pass - LiveDebugValues - to compute the set of live ↵Vikram TV2015-12-0914-5/+1132
| | | | | | DEBUG_VALUEs at each basic block and insert them. Reviewed and accepted at: http://reviews.llvm.org/D11933 llvm-svn: 255096
* Test commit access - Fix few missing '.' in comments of LoopInterchange code.Vikram TV2015-12-091-4/+4
| | | | llvm-svn: 255095
* Revert r255001, "Add parse and sema for OpenMP distribute directive and all ↵NAKAMURA Takumi2015-12-0929-1455/+23
| | | | | | | | its clauses excluding dist_schedule." It causes memory leak. Some tests in test/OpenMP would fail. llvm-svn: 255094
* Add some additional safety checks to the StructuredData accessJason Molenda2015-12-091-52/+74
| | | | | | | | | | | | methods - lldb can still crash pretty easily on corrupt JSON text, and these will help eliminate a bunch of cases where that would result in a crash. Some of the methods would check that e.g. GetItemAtIndex would actually return an item before dereferencing it, some would not, that kind of thing. <rdar://problem/23768693> llvm-svn: 255093
* Fix the order of destructors in LibLTOCodeGeneratorSteven Wu2015-12-092-0/+6
| | | | | | | | | | | | | | | | Summary: The order of destructors in LTOCodeGenerator gets changed in r254696. It is possible for LTOCodeGenerator to have a MergedModule created in the OwnedContext, in which case the module must be destructed before the context. Reviewers: rafael, dexonsmith Subscribers: llvm-commits, joker.eph Differential Revision: http://reviews.llvm.org/D15346 llvm-svn: 255092
* [Basic] Rangify two for loops. NFC.Vedant Kumar2015-12-091-4/+4
| | | | llvm-svn: 255091
* When printing warnings, the repeat_key should beSean Callanan2015-12-092-3/+3
| | | | | | | const void * because the data is never accessed, the pointer is the only useful piece of data. llvm-svn: 255090
* [AArch64][ARM] Don't base interleaved op legality on type alloc size.Ahmed Bougacha2015-12-096-15/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, we think that most types that look like they'd fit in a legal vector type are legal (so, basically, *any* vector type with a size between 33 and 128 bits, I think, since we use pow2 alignment; e.g., v2i25, v3f32, ...). DataLayout::getTypeAllocSize rounds up based on alignment. When checking for target intrinsic legality, that's not what we want: if rounding makes a difference, the type isn't legal, and the target intrinsics shouldn't be used, as they are always assumed legal. One could make the argument that alloc size is ultimately the most relevant here, since we're dealing with LD/ST intrinsics. That's only true if we did legalize them though; that's a problem for another day. Use DataLayout::getTypeSizeInBits instead of getTypeAllocSizeInBits. Type::getSizeInBits can't be used because that'd gratuitously break pointer vector support. Some of these uses are currently fine, because we only hit them when the type is already known legal (e.g., r114454). Update them for consistency. It's faster to avoid the rounding anyway! llvm-svn: 255089
* Don't drop attributes when inlining through "deopt" operand bundlesSanjoy Das2015-12-092-0/+41
| | | | | | | Test case attached (test case also checks that we don't drop the calling convention, but that functionality was correct before this patch). llvm-svn: 255088
* Simplify testMergedProgram.Rafael Espindola2015-12-091-26/+19
| | | | | | It now receives and returns std::unique_ptr. llvm-svn: 255087
* Simplify memory management. NFC.Rafael Espindola2015-12-091-79/+72
| | | | | | | This passes std::unique_ptr to predicates that are expected to delete their argument. llvm-svn: 255086
* Don't bypass the GOT for delta32toGOT references.Pete Cooper2015-12-093-1/+60
| | | | | | | | | | | The gcc_except_tab was generating these references to point to the typeinfo in the data section. gcc_except_tab also had the DW_EH_PE_indirect flag set which means that at runtime we are going to dereference this entry as if it is in the GOT. Reviewed by Nick Kledzik in http://reviews.llvm.org/D15360. llvm-svn: 255085
* Return std::unique_ptr from SplitFunctionsOutOfModule. NFC.Rafael Espindola2015-12-093-30/+25
| | | | llvm-svn: 255084
* Fix DoReadMemory for Windows mini dumps.Adrian McCarthy2015-12-091-1/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D15359 llvm-svn: 255083
* Simplify memory management. NFC.Rafael Espindola2015-12-091-11/+10
| | | | llvm-svn: 255082
* [UBSan] Clarify the way we disable de-duplication of reports from ↵Alexey Samsonov2015-12-094-24/+38
| | | | | | | | | | | unrecoverable handlers. Let unrecoverable handlers be responsbile for killing the program with Die(), and let functions which print the error report know if it's going to happen. Re-write the comments to describe the situation. llvm-svn: 255081
* X86-FMA3: Defined the ExeDomain property for Scalar FMA3 opcodes.Vyacheslav Klochkov2015-12-095-67/+70
| | | | | | | Reviewer: Simon Pilgrim. Differential Revision: http://reviews.llvm.org/D15317 llvm-svn: 255080
* Simplify memory management a bit. NFC.Rafael Espindola2015-12-091-9/+8
| | | | llvm-svn: 255079
* Return a std::unique_ptr from CloneModule. NFC.Rafael Espindola2015-12-086-40/+42
| | | | llvm-svn: 255078
OpenPOWER on IntegriCloud