summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* MC: Use MCSymbol in RelAndSymbol, NFCDuncan P. N. Exon Smith2015-05-166-26/+18
| | | | | | Switch from `MCSymbolData` to `MCSymbol`. llvm-svn: 237502
* Remove dead code in testcase. NFC.Ahmed Bougacha2015-05-161-4/+0
| | | | llvm-svn: 237501
* [PPC64] Add vector pack/unpack support from ISA 2.07Bill Schmidt2015-05-169-2/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the following new instructions in the Power ISA 2.07: vpksdss vpksdus vpkudus vpkudum vupkhsw vupklsw These instructions are available through the vec_packs, vec_packsu, vec_unpackh, and vec_unpackl built-in interfaces. These are lane-sensitive instructions, so the built-ins have different implementations for big- and little-endian, and the instructions must be marked as killing the vector swap optimization for now. The first three instructions perform saturating pack operations. The fourth performs a modulo pack operation, which means it can be represented with a vector shuffle, and conversely the appropriate vector shuffles may cause this instruction to be generated. The other instructions are only generated via built-in support for now. Appropriate tests have been added. There is a companion patch to clang for the rest of this support. llvm-svn: 237499
* MC: Use MCSymbol in MCObject::IsSymbolRefDifferenceFullyResolvedImpl()Duncan P. N. Exon Smith2015-05-167-25/+23
| | | | | | | | Transition one API from `MCSymbolData` to `MCSymbol`. The function needs both, and the backpointer from `MCSymbolData` to `MCSymbol` is going away. llvm-svn: 237498
* MC: Change MCFragment::Atom to an MCSymbol, NFCDuncan P. N. Exon Smith2015-05-166-46/+50
| | | | | | | Change `MCFragment::Atom` from an `MCSymbolData` to an `MCSymbol`, moving in the direction of removing the back-pointer. llvm-svn: 237497
* MC: Change MCAssembler::Symbols to store MCSymbol, NFCDuncan P. N. Exon Smith2015-05-165-18/+17
| | | | | | | | Instead of storing a list of the `MCSymbolData` in use, store the `MCSymbol`s. Churning in the direction of removing the back pointer from `MCSymbolData`. llvm-svn: 237496
* [BitcodeReader] Don't allow INSERTVAL/EXTRACTVAL with 0 indicesFilipe Cabecinhas2015-05-164-4/+20
| | | | | | | | This would trigger an assertion later. Bug found with AFL fuzz. llvm-svn: 237494
* MC: Merge MCSymbol and MCSymbolDataDuncan P. N. Exon Smith2015-05-163-25/+37
| | | | | | | | | | | | | | | | Turn `MCSymbolData` into a field inside of `MCSymbol`. Keep all the old API alive for now, so that consumers can be updated in a later commit. This means we still temporarily need the back pointer from `MCSymbolData` to `MCSymbol`, but I'll remove it in a follow-up. This optimizes for object emission over assembly emission. By removing the `DenseMap` in `MCAssembler`, llc memory usage drops from around 1040 MB to 1001 MB (3.8%). (I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`; see r236629 for details.) llvm-svn: 237490
* MC: Move MCSymbolData to MCSymbol.h, NFCDuncan P. N. Exon Smith2015-05-162-124/+125
| | | | | | Prepare for always including symbol data in MCSymbol. llvm-svn: 237489
* Remove redundant checks. NFCFilipe Cabecinhas2015-05-151-2/+0
| | | | llvm-svn: 237488
* MC: Change MCAssembler::Symbols to a vectorDuncan P. N. Exon Smith2015-05-151-7/+9
| | | | | | | | | | | | | | | | Instead of an intrusive double-linked linked list, use a `std::vector<>`. This saves a pointer per symbol and simplifies `MCSymbolData`. Otherwise, no functionality change here. While I measured a memory drop from around 1047MB to 1040MB (0.6%) -- and this is a decent cleanup in its own right -- it's primarily a preparation patch for merging `MCSymbol` and `MCSymbolData`. I'll post an updated patch for that to the list in a moment. (I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`; see r236629 for details.) llvm-svn: 237487
* MC: Reduce MCAssembler::Symbols API exposure, NFCDuncan P. N. Exon Smith2015-05-152-13/+7
| | | | | | | | | Stop exposing the storage for `MCAssembler::Symbols`, and have `MCAssembler` add symbols directly to its list instead of using a hook in `MCSymbolData`. This opens up room for a follow-up commit to switch from a linked list to a vector. llvm-svn: 237486
* Remove MCAssembler.h include from MCStreamer.h and fix users of MCStreamer.hPete Cooper2015-05-158-1/+8
| | | | llvm-svn: 237483
* Remove 3 includes from MCInstrDesc.h and explicitly include them where neededPete Cooper2015-05-1517-3/+28
| | | | llvm-svn: 237481
* Move some methods to a new MCInstrDesc.cpp file to allow includes to be ↵Pete Cooper2015-05-153-47/+79
| | | | | | | | | | trimmed. NFC. MCInstrDesc.h includes things like MCInst.h which i can now remove after this. That will be a future commit. Reviewed by Jim Grosbach. llvm-svn: 237478
* [RuntimeDyld] Use isInt to assert that a relocation didn't overflowDavid Majnemer2015-05-151-6/+3
| | | | | | | | | | isInt is a little easier to read, let's use that more consistently. Incidentally, this also silences a warning for shifting a negative number. This fixes PR23532. llvm-svn: 237476
* [X86] Use a better sentinel offset for the FrameAddr indexDavid Majnemer2015-05-151-1/+1
| | | | | | | | | Other pieces of CodeGen want to negate frame object offsets to account for architectures where the stack grows down. Our object is a pseudo object so it's offset doesn't matter. However, we shouldn't choose an offset which results in undefined behavior if you negate it. llvm-svn: 237474
* MC: MCCodeGenInfo naming update. NFC.Jim Grosbach2015-05-1517-18/+18
| | | | | | s/InitMCCodeGenInfo/initMCCodeGenInfo/ llvm-svn: 237471
* MC: clang-format. NFC.Jim Grosbach2015-05-154-149/+107
| | | | llvm-svn: 237470
* MC: Update MCCodeEmitter naming. NFC.Jim Grosbach2015-05-1522-33/+33
| | | | | | s/EncodeInstruction/encodeInstruction/ llvm-svn: 237469
* MC: Update MCFixup naming. NFC.Jim Grosbach2015-05-1514-61/+61
| | | | | | s/MCFixup::Create/MCFixup::create/ llvm-svn: 237468
* [NFC] remove an extra new lineJingyue Wu2015-05-151-1/+0
| | | | llvm-svn: 237462
* While in GlobalValue fix the function(s) that don't follow theEric Christopher2015-05-158-18/+18
| | | | | | naming convention and update users. llvm-svn: 237461
* Add a speculative execution passJingyue Wu2015-05-1510-3/+460
| | | | | | | | | | | | | | | | | | | | | | | Summary: This is a pass for speculative execution of instructions for simple if-then (triangle) control flow. It's aimed at GPUs, but could perhaps be used in other contexts. Enabling this pass gives us a 1.0% geomean improvement on Google benchmark suites, with one benchmark improving 33%. Credit goes to Jingyue Wu for writing an earlier version of this pass. Patched by Bjarke Roune. Test Plan: This patch adds a set of tests in test/Transforms/SpeculativeExecution/spec.ll The pass is controlled by a flag which defaults to having the pass not run. Reviewers: eliben, dberlin, meheff, jingyue, hfinkel Reviewed By: jingyue, hfinkel Subscribers: majnemer, jholewinski, llvm-commits Differential Revision: http://reviews.llvm.org/D9360 llvm-svn: 237459
* Revert "Canonicalize min/max expressions correctly."James Molloy2015-05-154-120/+7
| | | | | | | This reverts r237453 - it was causing timeouts on some bots. Reverting while I investigate (it's probably InstCombine fighting itself...) llvm-svn: 237458
* [SDAGBuilder] Make the AArch64 builder happier.James Molloy2015-05-151-4/+4
| | | | | | | | I intended this loop to only unwrap SplitVector actions, but it was more broad than that, such as unwrapping WidenVector actions, which makes operations seem legal when they're not. llvm-svn: 237457
* [SLSR] handle (B | i) * SJingyue Wu2015-05-152-3/+44
| | | | | | | | | | | | | | | | Summary: Consider (B | i) * S as (B + i) * S if B and i have no bits set in common. Test Plan: @or in slsr-mul.ll Reviewers: broune, meheff Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9788 llvm-svn: 237456
* Mark SMIN/SMAX/UMIN/UMAX nodes as legal and add patterns for them.James Molloy2015-05-153-0/+151
| | | | | | | The new [SU]{MIN,MAX} SDNodes can be lowered directly to instructions for most NEON datatypes - the big exclusion being v2i64. llvm-svn: 237455
* Canonicalize min/max expressions correctly.James Molloy2015-05-154-7/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces a canonical form for min/max idioms where one operand is extended or truncated. This often happens when the other operand is a constant. For example: %1 = icmp slt i32 %a, i32 0 %2 = sext i32 %a to i64 %3 = select i1 %1, i64 %2, i64 0 Would now be canonicalized into: %1 = icmp slt i32 %a, i32 0 %2 = select i1 %1, i32 %a, i32 0 %3 = sext i32 %2 to i64 This builds upon a patch posted by David Majenemer (https://www.marc.info/?l=llvm-commits&m=143008038714141&w=2). That pass passively stopped instcombine from ruining canonical patterns. This patch additionally actively makes instcombine canonicalize too. Canonicalization of expressions involving a change in type from int->fp or fp->int are not yet implemented. llvm-svn: 237453
* Allow min/max detection to see through casts.James Molloy2015-05-152-15/+72
| | | | | | | | | | | | | | This teaches the min/max idiom detector in ValueTracking to see through casts such as SExt/ZExt/Trunc. SCEV can already do this, so we're bringing non-SCEV analyses up to the same level. The returned LHS/RHS will not match the type of the original SelectInst any more, so a CastOp is returned too to inform the caller how to convert to the SelectInst's type. No in-tree users yet; this will be used by InstCombine in a followup. llvm-svn: 237452
* [llvm-readobj] Teach llvm-readobj to print PT_MIPS_ABIFLAGS program headerSimon Atanasyan2015-05-153-5/+18
| | | | llvm-svn: 237451
* NFC - Test case invokes llc on a file rather than redirected from a file.Nemanja Ivanovic2015-05-151-1/+1
| | | | | | | | This has caused some local failures. Updating the test case to be more like the majority of the similar test cases. Committing on behalf of Hubert Tong (hstong@ca.ibm.com). llvm-svn: 237449
* [xcore] Only support the 'm' inline assembly memory constraint. NFC.Daniel Sanders2015-05-151-6/+0
| | | | | | | | | | | | | | | | | | Summary: XCore doesn't seem to have any additional constraints. Therefore remove the target hook. No functional change intended. Reviewers: friedgold Reviewed By: friedgold Subscribers: friedgold, llvm-commits Differential Revision: http://reviews.llvm.org/D8921 llvm-svn: 237442
* [DependenceAnalysis] Fix for PR21585: collectUpperBound triggers assertsJames Molloy2015-05-152-2/+125
| | | | | | | | | | collectUpperBound hits an assertion when the back edge count is wider then the desired type. If that happens, truncate the backedge count. Patch by Philip Pfaffe! llvm-svn: 237439
* [mips] [IAS] Fix expansion of negative 32-bit immediates for LI/DLI.Toma Tabacu2015-05-153-5/+36
| | | | | | | | | | | | | | | | | | Summary: To maintain compatibility with GAS, we need to stop treating negative 32-bit immediates as 64-bit values when expanding LI/DLI. This currently happens because of sign extension. To do this we need to choose the 32-bit value expansion for values which use their upper 33 bits only for sign extension (i.e. no 0's, only 1's). Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8662 llvm-svn: 237428
* Add SDNodes for umin, umax, smin and smax.James Molloy2015-05-159-9/+85
| | | | | | | | | | | | | This adds new SDNodes for signed/unsigned min/max. These nodes are built from select/icmp pairs matched at SDAGBuilder stage. This patch adds the nodes, as well as legalization support and sets them to be "expand" for all targets. NFC for now; this will be tested when I switch AArch64 to using these new nodes. llvm-svn: 237423
* Doxygen: Enable autobrief feature and update coding standards.Matthias Braun2015-05-152-16/+17
| | | | llvm-svn: 237417
* [PlaceSafepoints] Fix a bug that came in with rL236672.Sanjoy Das2015-05-152-0/+44
| | | | | | | | Transfer the calling convention from the invoke being replaced by PlaceStatepoints to the new invoke to gc.statepoint created. Add a test case that would have caught this issue. llvm-svn: 237414
* [PlaceSafepoints] Fix a bug that came in with rL236672.Sanjoy Das2015-05-152-1/+43
| | | | | | | | | rL236672 would generate all invoke statepoints with deopt args set to a list containing the single element "0", instead of an empty list. Also add a test case that would have caught this. llvm-svn: 237413
* Stop resetting SanitizeAddress in TargetMachine::resetTargetOptions. NFC.Akira Hatanaka2015-05-154-5/+12
| | | | | | | | | | | | | | Instead of doing that, create a temporary copy of MCTargetOptions and reset its SanitizeAddress field based on the function's attribute every time an InlineAsm instruction is emitted in AsmPrinter::EmitInlineAsm. This is part of the work to remove TargetMachine::resetTargetOptions (the FIXME added to TargetMachine.cpp in r236009 explains why this function has to be removed). Differential Revision: http://reviews.llvm.org/D9570 llvm-svn: 237412
* Fix the check strings in a test case committed in r212455.Akira Hatanaka2015-05-151-2/+2
| | | | | | | The access size (8, in this case) was missing in the function name that was being checked. llvm-svn: 237410
* docs: Fix up some .rst formattingJustin Bogner2015-05-141-3/+3
| | | | llvm-svn: 237409
* MC: Avoid some UB caused by left shifting a negative value. NFCJustin Bogner2015-05-141-1/+1
| | | | llvm-svn: 237408
* [ValueTracking] refactor: extract method haveNoCommonBitsSetJingyue Wu2015-05-145-71/+100
| | | | | | | | | | | | | | | | | | | | | Summary: Extract method haveNoCommonBitsSet so that we don't have to duplicate this logic in InstCombine and SeparateConstOffsetFromGEP. This patch also makes SeparateConstOffsetFromGEP more precise by passing DominatorTree to computeKnownBits. Test Plan: value-tracking-domtree.ll that tests ValueTracking indeed leverages dominating conditions Reviewers: broune, meheff, majnemer Reviewed By: majnemer Subscribers: jholewinski, llvm-commits Differential Revision: http://reviews.llvm.org/D9734 llvm-svn: 237407
* Add a missing piece of existing practice to the developer policy. This may ↵Nick Lewycky2015-05-141-0/+5
| | | | | | need further refinement, but I think is roughly correct. llvm-svn: 237405
* YAML: Add support for literal block scalar I/O.Alex Lorenz2015-05-144-1/+313
| | | | | | | | | | | | | This commit gives the users of the YAML Traits I/O library the ability to serialize scalars using the YAML literal block scalar notation by allowing them to implement a specialization of the `BlockScalarTraits` struct for their custom types. Reviewers: Duncan P. N. Exon Smith Differential Revision: http://reviews.llvm.org/D9613 llvm-svn: 237404
* 80-col fixups.Eric Christopher2015-05-141-15/+21
| | | | llvm-svn: 237403
* [lib/Fuzzer] Add SHA1 implementation from public domain.Kostya Serebryany2015-05-145-38/+225
| | | | | | | | | | | | | | | | | | | | | | | Summary: This adds a SHA1 implementation taken from public domain code. The change is trivial, but as it involves third-party code I'd like a second pair of eyes before commit. LibFuzzer can not use SHA1 from openssl because openssl may not be available and because we may be fuzzing openssl itself. Using sha1sum via a pipe is too slow. Test Plan: n/a Reviewers: chandlerc Reviewed By: chandlerc Subscribers: majnemer, llvm-commits Differential Revision: http://reviews.llvm.org/D9733 llvm-svn: 237400
* Reflow comments and remove one that predated the enum being inEric Christopher2015-05-141-4/+3
| | | | | | the current file. llvm-svn: 237399
* Remove setting FloatABIType from the X86 port, nothing uses it.Eric Christopher2015-05-141-4/+0
| | | | llvm-svn: 237398
OpenPOWER on IntegriCloud