summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* MIR Serialization: Serialize the GOT pseudo source values.Alex Lorenz2015-08-124-1/+10
| | | | llvm-svn: 244809
* [RewriteStatepointsForGC] Handle extractelement fully in the base pointer ↵Philip Reames2015-08-121-61/+96
| | | | | | | | | | algorithm When rewriting the IR such that base pointers are available for every live pointer, we potentially need to duplicate instructions to propagate the base. The original code had only handled PHI and Select under the belief those were the only instructions which would need duplicated. When I added support for vector instructions, I'd added a collection of hacks for ExtractElement which caught most of the common cases. Of course, I then found the one test case my hacks couldn't cover. :) This change removes all of the early hacks for extract element. By defining extractelement as a BDV (rather than trying to look through it), we can extend the rewriting algorithm to duplicate the extract as needed. Note that a couple of peephole optimizations were left in for the moment, because while we now handle extractelement as a first class citizen, we're not yet handling insertelement. That change will follow in the near future. llvm-svn: 244808
* MIR Serialization: Serialize the stack pseudo source values.Alex Lorenz2015-08-124-1/+9
| | | | llvm-svn: 244806
* fix typo; NFCSanjay Patel2015-08-121-1/+1
| | | | llvm-svn: 244805
* MIR Serialization: Serialize the constant pool pseudo source values.Alex Lorenz2015-08-124-16/+60
| | | | llvm-svn: 244803
* Fix missing space in libfuzzer's help text.Lenny Maiorani2015-08-121-1/+1
| | | | llvm-svn: 244800
* [PM/AA] Add missing static dependency edges from DSE and memdep to TLI.Chandler Carruth2015-08-122-2/+4
| | | | | | | | I forgot to add these in r244780 and r244778. Sorry about that. Also order the static dependencies in a lexicographical order. llvm-svn: 244787
* [PM/AA] Explicitly depend on TLI rather than getting it out of theChandler Carruth2015-08-121-1/+7
| | | | | | | | | | AliasAnalysis. Same as the other commits, the TLI access from an alias analysis is going away and isn't very clean -- it is better to explicitly mark the dependencies. llvm-svn: 244785
* [PM/AA] Stop getting the TargetLibraryInfo out of the AliasAnalysis andChandler Carruth2015-08-121-36/+36
| | | | | | | | | | | | | | just depend on it directly. This was particularly frustrating because there was a really wide mixture of using a member variable and re-extracting it from the AA that happened to be around. I think the result is much more clear. I've also deleted all of the pointless null checks and used references across the APIs where I could to make it explicit that this cannot be null in a useful fashion. llvm-svn: 244780
* WebAssembly: floating-point comparisonsJF Bastien2015-08-122-0/+16
| | | | | | | | | | | | | | | | | | Summary: D11924 implemented part of the floating-point comparisons, this patch implements the rest: * Tell ISelLowering that all booleans are either 0 or 1. * Expand the eq/ne/lt/le/gt/ge floating-point comparisons to the canonical ones (similar to what Mips32r6InstrInfo.td does). * Add tests for ord/uno. * Add tests for ueq/one/ult/ule/ugt/uge. * Fix existing comparison tests to remove the (res & 1) code, which setBooleanContents stops from generating. Reviewers: sunfish Subscribers: llvm-commits, jfb Differential Revision: http://reviews.llvm.org/D11970 llvm-svn: 244779
* [PM/AA] Have memdep explicitly get and use TargetLibraryInfo rather thanChandler Carruth2015-08-121-5/+7
| | | | | | | | | relying on sneaking it out of its AliasAnalysis. This abuse of AA (to shuffle TLI around rather than explicitly depending on it) is going away with my refactor of AA. llvm-svn: 244778
* [LoopVer] Optionally allow using memchecks from LAAAdam Nemet2015-08-121-0/+9
| | | | | | | | | | | r243382 changed the behavior to always require a set of memchecks to be passed to LoopVer. This change restores the prior behavior as an alternative to the new behavior. This allows the checks to be implicitly taken from the LAA object. Patch by Ashutosh Nema! llvm-svn: 244763
* 80-cols; NFCSanjay Patel2015-08-121-2/+2
| | | | llvm-svn: 244755
* [ValueTracking] Tweak a comment slightlyJames Molloy2015-08-121-2/+2
| | | | | | Hal asked for this change in D11146, but I missed it when I committed originally. llvm-svn: 244754
* fix typo; NFCSanjay Patel2015-08-121-1/+1
| | | | llvm-svn: 244753
* Redo "Make global aliases have symbol size equal to their type"John Brawn2015-08-121-0/+14
| | | | | | | | | | | | r242520 was reverted in r244313 as the expected behaviour of the alias attribute in C is that the alias has the same size as the aliasee. However we can re-introduce adding the size on the alias when the aliasee does not, from a source code or object perspective, exist as a discrete entity. This happens when the aliasee is not a symbol, or when that symbol is private. Differential Revision: http://reviews.llvm.org/D11943 llvm-svn: 244752
* [GlobalMerge] Only emit aliases for internal linkage variables for non-Mach-OJohn Brawn2015-08-121-3/+10
| | | | | | | | On Mach-O emitting aliases for the variables that make up a MergedGlobals variable can cause problems when linking with dead stripping enabled so don't do that, except for external variables where we must emit an alias. llvm-svn: 244748
* [mips][microMIPS] Create microMIPS64r6 subtarget and implement DALIGN, DAUI, ↵Zoran Jovanovic2015-08-128-9/+192
| | | | | | | | DAHI, DATI, DEXT, DEXTM and DEXTU instructions Differential Revision: http://reviews.llvm.org/D10923 llvm-svn: 244744
* [X86] Disable mul -> shl + lea combine when compiling for minsizeMichael Kuperstein2015-08-121-0/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D11904 llvm-svn: 244740
* [X86] Allow x86 call frame optimization to fold more loads into pushesMichael Kuperstein2015-08-123-9/+10
| | | | | | | | | | This abstracts away the test for "when can we fold across a MachineInstruction" into the the MI interface, and changes call-frame optimization use the same test the peephole optimizer users. Differential Revision: http://reviews.llvm.org/D11945 llvm-svn: 244729
* AMDGPU: Fix assert on dbg_value instructionsMatt Arsenault2015-08-121-0/+6
| | | | llvm-svn: 244728
* unused variable warning fix.Simon Pilgrim2015-08-121-1/+1
| | | | llvm-svn: 244725
* [InstCombine] Move SSE/AVX vector blend folding to instcombinerSimon Pilgrim2015-08-122-60/+17
| | | | | | | | | | | | As discussed in D11886, this patch moves the SSE/AVX vector blend folding to instcombiner from PerformINTRINSIC_WO_CHAINCombine (which allows us to remove this completely). InstCombiner already had partial support for this, I just had to add support for zero (ConstantAggregateZero) masks and also the case where both selection inputs were the same (allowing us to ignore the mask). I also moved all the relevant combine tests into InstCombine/blend_x86.ll Differential Revision: http://reviews.llvm.org/D11934 llvm-svn: 244723
* X86: hoist a condition into a variable (NFC)Saleem Abdulrasool2015-08-121-7/+8
| | | | | | | | The same value is used multiple times through the function. Hoist the condition into a variable. This should fix a silly static analysis warning where the conditions flip around. No functional change intended. llvm-svn: 244713
* [libFuzzer] add two flags, -tbm_depth and -tbm_width to control how the ↵Kostya Serebryany2015-08-127-12/+31
| | | | | | trace-based-mutations are applied llvm-svn: 244712
* [libFuzzer] add colons to the stats output to avoid confusionKostya Serebryany2015-08-121-2/+3
| | | | llvm-svn: 244708
* [libFuzzer] use raw C IO to reduce the risk of a deadlock in a signal handler.Kostya Serebryany2015-08-121-2/+5
| | | | llvm-svn: 244707
* [x86] enable machine combiner reassociations for 256-bit vector FP mul/addSanjay Patel2015-08-121-0/+4
| | | | llvm-svn: 244705
* PseudoSourceValue: Transform the mips subclass to target independent subclassesAlex Lorenz2015-08-113-82/+51
| | | | | | | | | | | | This commit transforms the mips-specific 'MipsCallEntry' subclass of the 'PseudoSourceValue' class into two, target-independent subclasses named 'GlobalValuePseudoSourceValue' and 'ExternalSymbolPseudoSourceValue'. This change makes it easier to serialize the pseudo source values by removing target-specific pseudo source values. Reviewers: Akira Hatanaka llvm-svn: 244698
* PseudoSourceValue: Replace global manager with a manager in a machine function.Alex Lorenz2015-08-1148-532/+558
| | | | | | | | | | | | | | | | | | | | | | This commit removes the global manager variable which is responsible for storing and allocating pseudo source values and instead it introduces a new manager class named 'PseudoSourceValueManager'. Machine functions now own an instance of the pseudo source value manager class. This commit also modifies the 'get...' methods in the 'MachinePointerInfo' class to construct pseudo source values using the instance of the pseudo source value manager object from the machine function. This commit updates calls to the 'get...' methods from the 'MachinePointerInfo' class in a lot of different files because those calls now need to pass in a reference to a machine function to those methods. This change will make it easier to serialize pseudo source values as it will enable me to transform the mips specific MipsCallEntry PseudoSourceValue subclass into two target independent subclasses. Reviewers: Akira Hatanaka llvm-svn: 244693
* PseudoSourceValue: Introduce a 'PSVKind' enumerator.Alex Lorenz2015-08-112-19/+22
| | | | | | | | | | | | | | This commit introduces a new enumerator named 'PSVKind' in the 'PseudoSourceValue' class. This enumerator is now used to distinguish between the various kinds of pseudo source values. This change is done in preparation for the changes to the pseudo source value object management and to the PseudoSourceValue's class hierarchy - the next two PseudoSourceValue commits will get rid of the global variable that manages the pseudo source values and the mips specific MipsCallEntry subclass. Reviewers: Akira Hatanaka llvm-svn: 244687
* PseudoSourceValue: Update comments and fix lowercase variable names. NFC.Alex Lorenz2015-08-111-1/+1
| | | | | | | | | | | This commit updates the documentation comments in PseudoSourceValue.cpp and PseudoSourceValue.h based on the LLVM's documentation style. It also fixes several instances of variable names that started with a lowercase letter. This change is done in preparation for the changes to the pseudo source value object management and to the PseudoSourceValue's class hierarchy. llvm-svn: 244686
* Reformat PseudoSourceValue.cpp and PseudoSourceValue.h. NFC.Alex Lorenz2015-08-111-29/+26
| | | | | | | | | This commit reformats the files lib/CodeGen/PseudoSourceValue.cpp and include/llvm/CodeGen/PseudoSourceValue.h using clang-format. This change is done in preparation for the changes to the pseudo source value object management and to the PseudoSourceValue's class hierarchy. llvm-svn: 244685
* Use 32-bit divides instead of 64-bit divides where possible.Mark Heffernan2015-08-111-0/+4
| | | | | | | | | For NVPTX, try to use 32-bit division instead of 64-bit division when the dividend and divisor fit in 32 bits. This speeds up some internal benchmarks significantly. The underlying reason is that many index computations are carried out in 64-bits but never actually exceed the capacity of a 32-bit word. llvm-svn: 244684
* Make DW_AT_[MIPS_]linkage_name optional, and off by default for SCE.Paul Robinson2015-08-113-1/+21
| | | | | | | | | | | | | | Mangled "linkage" names can be huge, and if the debugger (or other tools) have no use for them, the size savings can be very impressive (on the order of 40%). Add one test for controlling behavior, and modify a number of tests to either stop using linkage names, or make llc emit them (so these tests will still run when the default triple is for PS4). Differential Revision: http://reviews.llvm.org/D11374 llvm-svn: 244678
* Fix PR24354.Sanjoy Das2015-08-111-3/+2
| | | | | | | | | | `InstCombiner::OptimizeOverflowCheck` was asserting an invariant (operands to binary operations are ordered by decreasing complexity) that wasn't really an invariant. Fix this by instead having `InstCombiner::OptimizeOverflowCheck` establish the invariant if it does not hold. llvm-svn: 244676
* don't repeat function names in comments; NFCSanjay Patel2015-08-111-39/+34
| | | | llvm-svn: 244672
* fix 80-cols; NFCSanjay Patel2015-08-111-19/+22
| | | | llvm-svn: 244668
* NFC SelectionDAGDumper: fix typoJF Bastien2015-08-111-1/+1
| | | | | | | | Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11959 llvm-svn: 244667
* WebAssembly: implement comparison.JF Bastien2015-08-114-25/+36
| | | | | | | | | | | | Some of the FP comparisons (ueq, one, ult, ule, ugt, uge) are currently broken, I'll fix them in a follow-up. Reviewers: sunfish Subscribers: llvm-commits, jfb Differential Revision: http://reviews.llvm.org/D11924 llvm-svn: 244665
* [x86] enable machine combiner reassociations for 128-bit vector ↵Sanjay Patel2015-08-111-2/+6
| | | | | | single/double multiplies llvm-svn: 244657
* [LowerSwitch] Skip dead blocks for processSwitchInst()Chen Li2015-08-111-4/+10
| | | | | | | | | | | | Summary: This patch adds check for dead blocks and skip them for processSwitchInst(). This will help reduce compilation time. Reviewers: reames, hans Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11953 llvm-svn: 244656
* WebAssembly: implement WebAssemblyTargetLowering::getTargetNodeNameJF Bastien2015-08-112-1/+13
| | | | | | | | | | Summary: Implementation is the same as in AArch64. Subscribers: aemerson, jfb, llvm-commits, sunfish Differential Revision: http://reviews.llvm.org/D11956 llvm-svn: 244655
* fix minsize detection: minsize attribute implies optimizing for sizeSanjay Patel2015-08-111-2/+1
| | | | | | Also, add a test for optsize because this was not part of any existing regression test. llvm-svn: 244651
* SelectionDAG: Prefer to combine multiplication with less uses for fmaJingyue Wu2015-08-111-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: For example: s6 = s0*s5; s2 = s6*s6 + s6; ... s4 = s6*s3; We notice that it is possible for s2 is folded to fma (s0, s5, fmul (s6 s6)). This only happens when Aggressive is true, otherwise hasOneUse() check already prevents from folding the multiplication with more uses. Test Plan: test/CodeGen/NVPTX/fma-assoc.ll Patch by Xuetian Weng Reviewers: hfinkel, apazos, jingyue, ohsallen, arsenm Subscribers: arsenm, jholewinski, llvm-commits Differential Revision: http://reviews.llvm.org/D11855 llvm-svn: 244649
* [LowerSwitch] Fix a bug when LowerSwitch deletes the default blockChen Li2015-08-111-5/+10
| | | | | | | | | | | | Summary: LowerSwitch crashed with the attached test case after deleting the default block. This happened because the current implementation of deleting dead blocks is wrong. After the default block being deleted, it contains no instruction or terminator, and it should no be traversed anymore. However, since the iterator is advanced before processSwitchInst() function is executed, the block advanced to could be deleted inside processSwitchInst(). The deleted block would then be visited next and crash dyn_cast<SwitchInst>(Cur->getTerminator()) because Cur->getTerminator() returns a nullptr. This patch fixes this problem by recording dead default blocks into a list, and delete them after all processSwitchInst() has been done. It still possible to visit dead default blocks and waste time process them. But it is a compile time issue, and I plan to have another patch to add support to skip dead blocks. Reviewers: kariddi, resistor, hans, reames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11852 llvm-svn: 244642
* Use llvm::make_unique to fix the MSVC build.Rafael Espindola2015-08-111-1/+1
| | | | llvm-svn: 244641
* fix minsize detection: minsize attribute implies optimizing for sizeSanjay Patel2015-08-111-4/+3
| | | | llvm-svn: 244631
* Enable EliminateAvailableExternally pass in the LTO pipeline.Teresa Johnson2015-08-111-0/+3
| | | | | | | | | | | | | | | Summary: For LTO we need to enable this pass in the LTO pipeline, as it is skipped during the "-flto -c" compile step (when PrepareForLTO is set). Reviewers: rnk Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11919 llvm-svn: 244622
* Variable names should start with an upper case letter; NFCSanjay Patel2015-08-111-9/+9
| | | | llvm-svn: 244618
OpenPOWER on IntegriCloud