summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* ARM: do not relax Thumb1 -> Thumb2 if only Thumb1 is available.Tim Northover2015-04-064-13/+16
| | | | | | | | | | | | | | | After recognising that a certain narrow instruction might need a relocation to be represented, we used to unconditionally relax it to a Thumb2 instruction to permit this. Unfortunately, some CPUs (e.g. v6m) don't even have most Thumb2 instructions, so we end up emitting a completely invalid instruction. Theoretically, ELF does have relocations for these situations; but they are fairly unusable with such short ranges and the ABI document even says they're documented "for completeness". So an error is probably better there too. rdar://20391953 llvm-svn: 234195
* [X86][SSE] Use (V)PINSRB for direct byte insertion in 16i8 buildvector on ↵Simon Pilgrim2015-04-061-0/+23
| | | | | | | | | | | | SSE4.1 targets This patch allows SSE4.1 targets to use (V)PINSRB to create 16i8 vectors by inserting i8 scalars directly into a XMM register instead of merging pairs of i8 scalars into a i16 and using the SSE2 PINSRW instruction. This allows folding of byte loads and reduces scalar register usage as well. Differential Revision: http://reviews.llvm.org/D8839 llvm-svn: 234193
* DebugInfo: Create MDTypeRef, etc., to replace DITypeRefDuncan P. N. Exon Smith2015-04-061-8/+1
| | | | | | | Create a string-based wrapper in the debug info hierarchy for type references. llvm-svn: 234188
* Metadata: Add typed array-like wrapper for MDTupleDuncan P. N. Exon Smith2015-04-061-2/+2
| | | | | | | | | Add `MDTupleTypedArrayWrapper`, a wrapper around `MDTuple` that adapts it to look like an array and cast its operands to the given type. This is designed to be a replacement for `DITypedArray<>`, which is in the `DIDescriptor` hierarchy. llvm-svn: 234183
* DebugInfo: Remove dead code for accessing fieldsDuncan P. N. Exon Smith2015-04-061-45/+0
| | | | | | | Most fields are now accessed via the new debug info hierarchy. I'll make the rest of this code dead soon. llvm-svn: 234182
* AutoUpgrade: Remove obsolete dbg.declare/value upgradeDuncan P. N. Exon Smith2015-04-061-49/+0
| | | | | | | | This upgrade of `@llvm.dbg.declare` and `@llvm.dbg.value` isn't useful, since it's for an old debug info version. The calls will get stripped anyway by `UpgradeDebugInfo()`. llvm-svn: 234181
* [SLSR] consider &B[S << i] as &B[(1 << i) * S]Jingyue Wu2015-04-061-2/+7
| | | | | | | | | | | | | | Summary: This reduces handling &B[(1 << i) * s] to handling &B[i * S]. Test Plan: slsr-gep.ll Reviewers: meheff Subscribers: sanjoy, llvm-commits Differential Revision: http://reviews.llvm.org/D8837 llvm-svn: 234180
* [DAGCombiner] Add support for FCEIL, FFLOOR and FTRUNC vector constant foldingSimon Pilgrim2015-04-062-6/+7
| | | | | | Differential Revision: http://reviews.llvm.org/D8715 llvm-svn: 234179
* Verifier: Check composite type template paramsDuncan P. N. Exon Smith2015-04-061-11/+18
| | | | | | | | | Add missing checks for `templateParams:` in `MDCompositeType`. Pull the current check for `MDSubprogram` to reduce duplicated code and fix it up to print a good message when the immediate operand isn't an `MDTuple` (as a drive-by, make the same fix to `variables:` in `MDSubprogram`). llvm-svn: 234177
* DebugInfo: Use MDFile instead of accessing operands directly, NFCDuncan P. N. Exon Smith2015-04-061-2/+4
| | | | llvm-svn: 234175
* Use a comma after the unique keyword.Rafael Espindola2015-04-062-1/+4
| | | | | | | | H.J. Lu noted that all .section options are separated by a comma. This patch changes the syntax of unique to require one. llvm-svn: 234174
* fix typos; NFCSanjay Patel2015-04-061-2/+2
| | | | llvm-svn: 234171
* Remove unnecessary uses of AliasedSymbol.Rafael Espindola2015-04-063-8/+7
| | | | | | | | | As pr19627 points out, every use of AliasedSymbol is likely a bug. The main use was to avoid the oddity of a variable showing up as undefined. That was fixed in r233995, which made these calls nops. llvm-svn: 234169
* Removing a spurious space; NFC.Aaron Ballman2015-04-061-1/+1
| | | | llvm-svn: 234168
* Be consistent when deciding if a relocation is needed.Rafael Espindola2015-04-065-26/+23
| | | | | | | | | | | | | | Before when deciding if we needed a relocation in A-B, we wore only checking if A was weak. This fixes the asymmetry. The "InSet" argument should probably be renamed to "ForValue", since InSet is very MachO specific, but doing so in this patch would make it hard to read. This fixes PR22815. llvm-svn: 234165
* Test commit. Improve comments in APInt. NFC.Pawel Bylica2015-04-061-10/+9
| | | | llvm-svn: 234158
* Store the sh_link of ARM_EXIDX directly in MCSectionELF.Rafael Espindola2015-04-063-25/+24
| | | | | | This avoids some pretty horrible and broken name based section handling. llvm-svn: 234142
* Simplify this function a bit. NFC.Rafael Espindola2015-04-061-20/+4
| | | | | | | | | The case values are not a tidy enum we can fully cover. They even ovelap over the various extension. Just use a default: llvm-svn: 234140
* Simplify mapping from relocation sections to relocated sections.Rafael Espindola2015-04-062-44/+28
| | | | | | | | Just store the section in MCSectionELF. This avoids multiple hash lookups. This will also be used by ARM_EXIDX. llvm-svn: 234139
* [Orc] Tidy up the assembly for the x86-64 resolver block.Lang Hames2015-04-061-44/+45
| | | | llvm-svn: 234138
* clang-format my last commitDavid Blaikie2015-04-051-1/+2
| | | | llvm-svn: 234127
* [opaque pointer type] The last of the GEP IRBuilder API migrationsDavid Blaikie2015-04-052-7/+6
| | | | | | | | | There's still lots of callers passing nullptr, of course - some because they'll never be migrated (InstCombines for bitcasts - well they don't make any sense when the pointer type is opaque anyway, for example) and others that will need more engineering to pass Types around. llvm-svn: 234126
* [DAGCombiner] Merge FMUL Scalar and Vector constant canonicalization to RHS. ↵Simon Pilgrim2015-04-051-8/+2
| | | | | | NFCI. llvm-svn: 234118
* [opaque pointer type] More GEP API migrationsDavid Blaikie2015-04-042-20/+30
| | | | llvm-svn: 234108
* less space; NFCSanjay Patel2015-04-041-1/+0
| | | | llvm-svn: 234106
* Don't mix overload and default values.Rafael Espindola2015-04-041-14/+0
| | | | | | It makes it hard to see which one is being called. llvm-svn: 234100
* Implement unique sections with an unique ID.Rafael Espindola2015-04-047-33/+40
| | | | | | | | | | | This allows the compiler/assembly programmer to switch back to a section. This in turn fixes the bootstrap failure on powerpc (tested on gcc110) without changing the ppc codegen at all. I will try to cleanup the various getELFSection overloads in a followup patch. Just using a default argument now would lead to ambiguities. llvm-svn: 234099
* [DAGCombiner] Canonicalize vector constants for ADD/MUL/AND/OR/XOR ↵Simon Pilgrim2015-04-041-6/+11
| | | | | | | | re-association Scalar integers are commuted to move constants to the RHS for re-association - this ensures vectors do the same. llvm-svn: 234092
* [X86] Apply AddedComplexity consistently for similar patterns. This keeps ↵Craig Topper2015-04-041-4/+8
| | | | | | them together in the DAGISel tables and reduces table size slightly. llvm-svn: 234086
* [X86] Add a comment about the change in r234075.Craig Topper2015-04-041-0/+2
| | | | llvm-svn: 234079
* [X86] Don't use GR64 register 'and with immediate' instructions if the ↵Craig Topper2015-04-041-0/+5
| | | | | | | | | | immediate is zero in the upper 33-bits or upper 57-bits. Use GR32 instructions instead. Previously the patterns didn't have high enough priority and we would only use the GR32 form if the only the upper 32 or 56 bits were zero. Fixes PR23100. llvm-svn: 234075
* [WinEH] Fill out CatchHigh in the TryBlockMapDavid Majnemer2015-04-032-6/+9
| | | | | | Now all fields in the WinEH xdata have been filled out. llvm-svn: 234067
* [opaque pointer type] More GEP IRBuilder API migrationsDavid Blaikie2015-04-033-7/+11
| | | | llvm-svn: 234064
* [WinEH] Fill out .xdata for catch objectsDavid Majnemer2015-04-034-12/+17
| | | | | | | This add support for catching an exception such that an exception object available to the catch handler will be initialized by the runtime. llvm-svn: 234062
* [WinEH] Sink UnwindHelp completely out of IRDavid Majnemer2015-04-034-40/+19
| | | | | | | | We don't need to represent UnwindHelp in IR. Instead, we can use the knowledge that we are emitting the parent function to decide if we should create the UnwindHelp stack object. llvm-svn: 234061
* Fixing a memory leak in WinEHPrepareAndrew Kaylor2015-04-031-0/+2
| | | | llvm-svn: 234059
* [opaque pointer type] More GEP IRBuilder API migrations...David Blaikie2015-04-0311-38/+53
| | | | llvm-svn: 234058
* Use early returns to reduce indentation.David Blaikie2015-04-031-18/+18
| | | | llvm-svn: 234057
* [InstCombine] Use DataLayout to determine vector element widthDavid Majnemer2015-04-031-3/+2
| | | | | | | | | InstCombine didn't realize that it needs to use DataLayout to determine how wide pointers are. This lead to assertion failures. This fixes PR23113. llvm-svn: 234046
* Fixing a build errorAndrew Kaylor2015-04-031-1/+1
| | | | llvm-svn: 234045
* Fixing build warnings.Andrew Kaylor2015-04-031-2/+0
| | | | llvm-svn: 234043
* [opaque pointer type] More GEP API migrations in IRBuilder usesDavid Blaikie2015-04-0310-25/+33
| | | | | | | | | | | | | The plan here is to push the API changes out from the common components (like Constant::getGetElementPtr and IRBuilder::CreateGEP related functions) and just update callers to either pass the type if it's obvious, or pass null. Do this with LoadInst as well and anything else that comes up, then to start porting specific uses to not pass null anymore - this may require some refactoring in each case. llvm-svn: 234042
* [WinEH] Handle nested landing pads in outlined catch handlersAndrew Kaylor2015-04-032-55/+247
| | | | | | Differential Revision: http://reviews.llvm.org/D8596 llvm-svn: 234041
* CodeGen: Assert that inlined-at locations agreeDuncan P. N. Exon Smith2015-04-0312-35/+53
| | | | | | | | | | | | | | | | | As a follow-up to r234021, assert that a debug info intrinsic variable's `MDLocalVariable::getInlinedAt()` always matches the `MDLocation::getInlinedAt()` of its `!dbg` attachment. The goal here is to get rid of `MDLocalVariable::getInlinedAt()` entirely (PR22778), but I'll let these assertions bake for a while first. If you have an out-of-tree backend that just broke, you're probably attaching the wrong `DebugLoc` to a `DBG_VALUE` instruction. The one you want is the location that was attached to the corresponding `@llvm.dbg.declare` or `@llvm.dbg.value` call that you started with. llvm-svn: 234038
* [WinEH] Fold cast into assertion based on review feedbackReid Kleckner2015-04-031-3/+2
| | | | llvm-svn: 234034
* [GraphWriter] Attempt to open .dot files with xdg-open/open firstMatthias Braun2015-04-031-0/+23
| | | | | | | | | | Most desktop environments let the users specify his preferred application per file type. On mac/linux we can use open/xdg-open for that and should try this first before starting a heuristic search for various programs. Differential Revision: http://reviews.llvm.org/D6534 llvm-svn: 234031
* SelectionDAG: Use specialized metadata nodes in EmitFuncArgumentDbgValue(), NFCDuncan P. N. Exon Smith2015-04-032-14/+12
| | | | | | | Use `MDLocalVariable` and `MDExpression` directly for the arguments of `EmitFuncArgumentDbgValue()` to simplify a follow-up patch. llvm-svn: 234026
* Verifier: Check that inlined-at locations agreeDuncan P. N. Exon Smith2015-04-031-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check that the `MDLocalVariable::getInlinedAt()` in a debug info intrinsic's variable always matches the `MDLocation::getInlinedAt()` of its `!dbg` attachment. The goal here is to get rid of `MDLocalVariable::getInlinedAt()` entirely (PR22778), since it's expensive and unnecessary, but I'll let this verifier check bake for a while (a week maybe?) first. I've updated the testcases that had the wrong value for `inlinedAt:`. This checks that things are sane in the IR, but currently things go out of whack in a few places in the backend. I'll follow shortly with assertions in the backend (with code fixes). If you have out-of-tree testcases that just started failing, here's how I updated these ones: 1. The verifier check gives you the basic block, function, instruction, and relevant metadata arguments (metadata numbering doesn't necessarily match the source file, unfortunately). 2. Look at the `@llvm.dbg.*()` instruction, and compare the `inlinedAt:` fields of the variable argument (second `metadata` argument) and the `!dbg` attachment. 3. Figure out based on the variable `scope:` chain and the functions in the file whether the variable has been inlined (and into what), so you can determine which `inlinedAt:` is actually correct. In all of the in-tree testcases, the `!MDLocation()` was correct and the `!MDLocalVariable()` was wrong, but YMMV. 4. Duplicate the metadata that you're going to change, and add/drop the `inlinedAt:` field from one of them. Be careful that the other references to the same metadata node point at the correct one. llvm-svn: 234021
* CodeGen: Fix MachineInstr::print() for DBG_VALUEDuncan P. N. Exon Smith2015-04-031-2/+2
| | | | | | | Grab the `MDLocalVariable` from the second-to-last argument; the last argument is an `MDExpression`, and mixing them up will crash. llvm-svn: 234019
* [MachineLICM] Small cleanup: Constify and rangeify.Daniel Jasper2015-04-031-12/+9
| | | | | | NFC. llvm-svn: 234018
OpenPOWER on IntegriCloud