summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* [X86] Use u8imm for the immediate type for all shift and rotate ↵Craig Topper2015-10-121-70/+70
| | | | | | instructions. This way the assembler will perform range checking. Believe this matches gas behavior. llvm-svn: 250016
* [X86] Add support to assembler and MCInst lowering to use the other vmovq ↵Craig Topper2015-10-122-24/+28
| | | | | | %xmmX, %xmmX encoding if it would be a shorter VEX encoding. llvm-svn: 250014
* [X86] Cleanup formatting a bit. NFCCraig Topper2015-10-121-14/+14
| | | | llvm-svn: 250013
* [X86] Change the immediate for IN/OUT instructions to u8imm so the assembly ↵Craig Topper2015-10-122-12/+12
| | | | | | parser will check the size. llvm-svn: 250012
* [X86] Add some instruction aliases to get the assembly parser table to favor ↵Craig Topper2015-10-122-63/+31
| | | | | | | | arithmetic instructions with 8-bit immediates over the forms that implicitly use the ax/eax/rax. This allows us to remove the explicit code for working around the existing priority llvm-svn: 250011
* [X86] Fix CMP and TEST with al/ax/eax/rax to not mark EFLAGS as a use or ↵Craig Topper2015-10-111-27/+34
| | | | | | al/ax/eax/rax as a def. Probably doesn't have a functional affect since these aren't used in isel. llvm-svn: 249994
* [DAGCombiner] Improved FMA combine support for vectorsSimon Pilgrim2015-10-111-33/+36
| | | | | | | | Enabled constant canonicalization for all constants. Improved combining of constant vectors. llvm-svn: 249993
* [X86] Remove special validation for INT immediate operand from AsmParser. ↵Craig Topper2015-10-112-24/+1
| | | | | | | | Instead mark its operand type as u8imm which will cause it to fail to match. This is more consistent with other instruction behavior. This also fixes a bug where negative immediates below -128 were not being reported as errors. llvm-svn: 249989
* [X86] Simplify immediate range checking code.Craig Topper2015-10-112-18/+13
| | | | llvm-svn: 249979
* [DAGCombiner] Tidyup FMINNUM/FMAXNUM constant foldingSimon Pilgrim2015-10-111-14/+14
| | | | | | | | Enable constant folding for vector splats as well as scalars. Enable constant canonicalization for all scalar and vector constants. llvm-svn: 249978
* [InstCombine][X86][XOP] Combine XOP integer vector comparisons to native IRSimon Pilgrim2015-10-111-0/+53
| | | | | | We now have lowering support for XOP PCOM/PCOMU instructions. llvm-svn: 249977
* [X86][XOP] Added support for the lowering of 128-bit vector integer ↵Simon Pilgrim2015-10-115-12/+62
| | | | | | | | comparisons to XOP PCOM/PCOMU instructions. The XOP vector integer comparisons can deal with all signed/unsigned comparison cases directly and can be easily commuted as well (D7646). llvm-svn: 249976
* [ProfileData] Test commit for slingnNathan Slingerland2015-10-111-0/+1
| | | | | | This is a test of the LLVM commit system. In the event of a real commit there would be some useful code changes. llvm-svn: 249972
* Change isUIntN/isIntN calls with constant N to use the template version. NFCCraig Topper2015-10-103-14/+14
| | | | llvm-svn: 249952
* Fix PR25101 - Handle anonymous functions without VST entriesTeresa Johnson2015-10-101-28/+73
| | | | | | | | | | | | | | | | Summary: The change to use the VST function entries for lazy deserialization did not handle the case of anonymous functions without aliases. In that case we must fall back to scanning the function blocks as there is no VST entry. Reviewers: dexonsmith, joker.eph, davidxl Subscribers: tstellarAMD, llvm-commits Differential Revision: http://reviews.llvm.org/D13596 llvm-svn: 249947
* [SystemZ] Fixes in the backend I/R.Jonas Paulsson2015-10-102-3/+5
| | | | | | | | | | | | | | | expandPostRAPseudo(): STX -> 2 * STD: The first STD should not have the kill flag set for the address. SystemZElimCompare: BRC -> BRCT conversion: Don't forget to remove the CC<use,kill> operand. Needed to make SystemZ/asm-17.ll pass with -verify-machineinstrs, which now runs with this flag. Reviewed by Ulrich Weigand. llvm-svn: 249945
* [IndVars] Use `auto`; NFCSanjoy Das2015-10-101-6/+4
| | | | llvm-svn: 249944
* Use range-based for loops. NFCCraig Topper2015-10-101-17/+10
| | | | llvm-svn: 249943
* [RuntimeDyld] Fix performance problem in resolveRelocations with many sectionsKeno Fischer2015-10-101-7/+7
| | | | | | | | | | | | | | | Summary: Rather than just iterating over all sections and checking whether we have relocations for them, iterate over the relocation map instead. This showed up heavily in an artificial julia benchmark that does lots of compilation. On that particular benchmark, this patch gives ~15% performance improvements. As far as I can tell the primary reason why the original loop was so expensive is that Relocations[i] actually constructs a relocationList (allocating memory & doing lots of other unnecessary computing) if none is found. Reviewers: lhames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13545 llvm-svn: 249942
* Use range-based for loops. NFC.Craig Topper2015-10-101-17/+15
| | | | llvm-svn: 249941
* Use emplace_back instead of a constructor call and push_back. NFCCraig Topper2015-10-102-29/+24
| | | | llvm-svn: 249940
* Analysis: Remove implicit ilist iterator conversionsDuncan P. N. Exon Smith2015-10-1022-99/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove implicit ilist iterator conversions from LLVMAnalysis. I came across something really scary in `llvm::isKnownNotFullPoison()` which relied on `Instruction::getNextNode()` being completely broken (not surprising, but scary nevertheless). This function is documented (and coded to) return `nullptr` when it gets to the sentinel, but with an `ilist_half_node` as a sentinel, the sentinel check looks into some other memory and we don't recognize we've hit the end. Rooting out these scary cases is the reason I'm removing the implicit conversions before doing anything else with `ilist`; I'm not at all surprised that clients rely on badness. I found another scary case -- this time, not relying on badness, just bad (but I guess getting lucky so far) -- in `ObjectSizeOffsetEvaluator::compute_()`. Here, we save out the insertion point, do some things, and then restore it. Previously, we let the iterator auto-convert to `Instruction*`, and then set it back using the `Instruction*` version: Instruction *PrevInsertPoint = Builder.GetInsertPoint(); /* Logic that may change insert point */ if (PrevInsertPoint) Builder.SetInsertPoint(PrevInsertPoint); The check for `PrevInsertPoint` doesn't protect correctly against bad accesses. If the insertion point has been set to the end of a basic block (i.e., `SetInsertPoint(SomeBB)`), then `GetInsertPoint()` returns an iterator pointing at the list sentinel. The version of `SetInsertPoint()` that's getting called will then call `PrevInsertPoint->getParent()`, which explodes horribly. The only reason this hasn't blown up is that it's fairly unlikely the builder is adding to the end of the block; usually, we're adding instructions somewhere before the terminator. llvm-svn: 249925
* MC: Remove implicit ilist iterator conversions, NFCDuncan P. N. Exon Smith2015-10-104-4/+4
| | | | llvm-svn: 249922
* [WinEH] Remove more dead codeDavid Majnemer2015-10-106-72/+41
| | | | | | wineh-parent is dead, so is ValueOrMBB. llvm-svn: 249920
* [WinEH] Delete the old landingpad implementation of Windows EHReid Kleckner2015-10-098-3041/+102
| | | | | | | | | | | The new implementation works at least as well as the old implementation did. Also delete the associated preparation tests. They don't exercise interesting corner cases of the new implementation. All the codegen tests of the EH tables have already been ported. llvm-svn: 249918
* [SEH] Update SEH codegen tests to use the new IRReid Kleckner2015-10-091-0/+5
| | | | | | | | | Also Fix a buglet where SEH tables had ranges that spanned funclets. The remaining tests using the old landingpad IR are preparation tests, and will be deleted along with the old preparation. llvm-svn: 249917
* CodeGen: Remove implicit ilist iterator conversions, NFCDuncan P. N. Exon Smith2015-10-099-84/+93
| | | | | | | Finish removing implicit ilist iterator conversions from LLVMCodeGen. I'm sure there are lots more of these in lib/CodeGen/*/. llvm-svn: 249915
* [WinEH] Insert the catchpad return before CSR restorationDavid Majnemer2015-10-091-18/+21
| | | | | | | | x64 catchpads use rax to inform the unwinder where control should go next. However, we must initialize rax before the epilogue sequence so as to not perturb the unwinder. llvm-svn: 249910
* Fix assert when emitting llvm.pow.f86.James Y Knight2015-10-091-5/+4
| | | | | | | | | | | | | This occurred due to introducing the invalid i64 type after type legalization had already finished, in an attempt to workaround bitcast f64 -> v2i32 not doing constant folding. The *right* thing is to actually fix bitcast, but that has other complications. So, for now, just get rid of the broken workaround, and check in a test-case showing that it doesn't crash, with TODOs for emitting proper code. llvm-svn: 249908
* [SEH] Fix _except_handler4 table base statesReid Kleckner2015-10-091-1/+4
| | | | | | | We got them right for the old IR, but not with funclets. Port the old test to the new IR and fix the code. llvm-svn: 249906
* CodeGen: Avoid more ilist iterator implicit conversions, NFCDuncan P. N. Exon Smith2015-10-095-16/+16
| | | | llvm-svn: 249903
* CodeGen: Use range-based for in PostRAScheduler, NFCDuncan P. N. Exon Smith2015-10-091-12/+11
| | | | llvm-svn: 249901
* [SEH] Remember to emit the last invoke range for SEHReid Kleckner2015-10-092-28/+51
| | | | | | | | This wasn't very observable in execution tests, because usually there is an invoke in the catchpad that unwinds the the catchendpad but never actually throws. llvm-svn: 249898
* Generalize convergent check to handle invokes as well as calls.Owen Anderson2015-10-091-4/+4
| | | | llvm-svn: 249892
* Fix assert in X86 backend.James Y Knight2015-10-091-8/+8
| | | | | | | | | | | | | | When running combine on an extract_vector_elt, it wants to look through a bitcast to check if the argument to the bitcast was itself an extract_vector_elt with particular operands. However, it called getOperand() on the argument to the bitcast *before* checking that the opcode was EXTRACT_VECTOR_ELT, assert-failing if there were zero operands for the actual opcode. Fix, and add trivial test. llvm-svn: 249891
* Revert "Simplify code. NFC."Chad Rosier2015-10-091-1/+6
| | | | | | This reverts commit r248610. llvm-svn: 249887
* CodeGen: Continue removing ilist iterator implicit conversionsDuncan P. N. Exon Smith2015-10-097-45/+51
| | | | llvm-svn: 249884
* CodeGen: Remove implicit iterator conversions from MBB.cppDuncan P. N. Exon Smith2015-10-091-8/+8
| | | | | | | | | | Remove implicit ilist iterator conversions from MachineBasicBlock.cpp. I've also added an overload of `splice()` that takes a pointer, since it's a natural API. This is similar to the overloads I added for `remove()` and `erase()` in r249867. llvm-svn: 249883
* CodeGen: Avoid ilist iterator implicit conversions in a few more places, NFCDuncan P. N. Exon Smith2015-10-092-22/+20
| | | | llvm-svn: 249880
* CodeGen: Remove more ilist iterator implicit conversions, NFCDuncan P. N. Exon Smith2015-10-097-28/+27
| | | | llvm-svn: 249879
* CodeGen: Use range-based for in IntrinsicLowering::AddPrototypes, NFCDuncan P. N. Exon Smith2015-10-091-21/+21
| | | | | | This happens to avoid a host of implicit ilist iterator conversions. llvm-svn: 249877
* CodeGen: Use range-based for in GlobalMerge, NFCDuncan P. N. Exon Smith2015-10-091-16/+15
| | | | llvm-svn: 249876
* CodeGen: Remove a few more ilist iterator implicit conversions, NFCDuncan P. N. Exon Smith2015-10-094-45/+53
| | | | llvm-svn: 249875
* Teach LoopUnswitch not to perform non-trivial unswitching on loops ↵Owen Anderson2015-10-091-0/+14
| | | | | | | | | | | containing convergent operations. Doing so could cause the post-unswitching convergent ops to be control-dependent on the unswitch condition where they were not before. This check could be refined to allow unswitching where the convergent operation was already control-dependent on the unswitch condition. llvm-svn: 249874
* CodeGen: Remove implicit conversions from Analysis and BranchFoldingDuncan P. N. Exon Smith2015-10-092-26/+27
| | | | | | | | | | | | Remove a few more implicit ilist iterator conversions, this time from Analysis.cpp and BranchFolding.cpp. I added a few overloads for `remove()` and `erase()`, which quite naturally take pointers as well as iterators as parameters. This will reduce the churn at least in the short term, but I don't really have a problem with these existing for longer. llvm-svn: 249867
* Refine the definition of convergent to only disallow the addition of new ↵Owen Anderson2015-10-092-2/+4
| | | | | | | | | | control dependencies. This covers the common case of operations that cannot be sunk. Operations that cannot be hoisted should already be handled properly via the safe-to-speculate rules and mechanisms. llvm-svn: 249865
* fix typos; NFCSanjay Patel2015-10-091-13/+12
| | | | llvm-svn: 249863
* Add inline stack streaming to binary sample profiles.Diego Novillo2015-10-092-43/+84
| | | | | | | | | | | | With this patch we can now read and write inline stacks in sample profiles to the binary encoded profiles. In a subsequent patch, I will add a string table to the binary encoding. Right now function names are emitted as strings every time we find them. This is too bloated and will produce large files in applications with lots of inlining. llvm-svn: 249861
* [WebAssembly] Rename floating-point operators to match their spec names.Dan Gohman2015-10-091-6/+6
| | | | llvm-svn: 249859
* Add verification for align, dereferenceable, dereferenceable_or_null load ↵Artur Pilipenko2015-10-091-0/+36
| | | | | | | | | | metadata Reviewed By: reames Differential Revision: http://reviews.llvm.org/D13428 llvm-svn: 249856
OpenPOWER on IntegriCloud