summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* [RuntimeDyld] Always allocate at least 1 byte for object sections in the JIT toLang Hames2015-04-071-13/+16
| | | | | | | | | | | | ensure that section addresses are distinct. mapSectionAddress will fail if two sections are allocated the same address, which can happen if any section has zero size (since malloc(0) is implementation defined). Unfortunately I've been unable to repro this with a simple test case. Fixes <rdar://problem/20314015>. llvm-svn: 234299
* [Orc] Save all the x86-64 GPRs before re-entering the JIT.Lang Hames2015-04-071-6/+13
| | | | | | The re-entry code should work for all calling conventions. llvm-svn: 234298
* Try a third time to fix MSVC build after r234290Duncan P. N. Exon Smith2015-04-071-3/+3
| | | | | | | | I have no idea what MSVC means with its error text here :(. http://lab.llvm.org:8011/builders/sanitizer-windows/builds/2310 llvm-svn: 234295
* Try again to fix MSVC build after r234290Duncan P. N. Exon Smith2015-04-071-3/+3
| | | | | | | | Still failing: http://lab.llvm.org:8011/builders/sanitizer-windows/builds/2309 llvm-svn: 234294
* Try to fix MSVC build after r234290Duncan P. N. Exon Smith2015-04-071-2/+2
| | | | | | http://lab.llvm.org:8011/builders/sanitizer-windows/builds/2308 llvm-svn: 234292
* DebugInfo: Remove DITypedArray<>, replace with typedefsDuncan P. N. Exon Smith2015-04-079-116/+78
| | | | | | | | | | | | | | | | | Replace all uses of `DITypedArray<>` with `MDTupleTypedArrayWrapper<>` and `MDTypeRefArray`. The APIs are completely different, but the provided functionality is the same: treat an `MDTuple` as if it's an array of a particular element type. To simplify this patch a bit, I've temporarily typedef'ed `DebugNodeArray` to `DIArray` and `MDTypeRefArray` to `DITypeArray`. I've also temporarily conditionalized the accessors to check for null -- eventually these should be changed to asserts and the callers should check for null themselves. There's a tiny accompanying patch to clang. llvm-svn: 234290
* DebugInfo: Remove DICompositeType mutation APIDuncan P. N. Exon Smith2015-04-072-17/+13
| | | | | | | Change `DIBuilder` to mutate `MDCompositeTypeBase` directly, and remove the wrapping API in `DICompositeType`. llvm-svn: 234289
* DebugInfo: Use DebugNodeRef in MDImportedEntity::getEntity()Duncan P. N. Exon Smith2015-04-071-1/+2
| | | | | | | A quick cleanup to sue `DebugNodeRef` instead of `Metadata*` for `MDImportedEntity::getEntity()`. llvm-svn: 234288
* DebugInfo: Move DIExpression bit-piece API to MDExpressionDuncan P. N. Exon Smith2015-04-072-15/+18
| | | | llvm-svn: 234286
* DebugInfo: Remove special iterators from DIExpressionDuncan P. N. Exon Smith2015-04-075-23/+20
| | | | | | | | | | Remove special iterators from `DIExpression` in favour of same in `MDExpression`. There should be no functionality change here. Note that the APIs are slightly different: `getArg(unsigned)` counts from 0, not 1, in the `MDExpression` version of the iterator. llvm-svn: 234285
* [LoopAccesses] New API to query if memchecks are necessary after partitioningAdam Nemet2015-04-071-0/+11
| | | | | | This is used by Loop Distribution. llvm-svn: 234283
* DebugInfo: Move DIFlag-related API from DIDescriptor to DebugNodeDuncan P. N. Exon Smith2015-04-074-46/+47
| | | | llvm-svn: 234274
* IR: Rename MDSubrange::getLo() to getLowerBound()Duncan P. N. Exon Smith2015-04-073-7/+9
| | | | | | | During initial review, the `lo:` field was renamed to `lowerBound:`. Make the same change to the C++ API. llvm-svn: 234267
* IR: Fix -Werror noasserts build after r234255Duncan P. N. Exon Smith2015-04-061-0/+2
| | | | llvm-svn: 234259
* CodeGen: Stop using DIDescriptor::is*() and auto-castingDuncan P. N. Exon Smith2015-04-0621-163/+138
| | | | | | Same as r234255, but for lib/CodeGen and lib/Target. llvm-svn: 234258
* Transforms: Stop using DIDescriptor::is*() and auto-castingDuncan P. N. Exon Smith2015-04-066-35/+23
| | | | | | Same as r234255, but for lib/Analysis and lib/Transforms. llvm-svn: 234257
* IR: Stop using DIDescriptor::is*() and auto-castingDuncan P. N. Exon Smith2015-04-064-134/+111
| | | | | | | | | | | | | | | | | | | | | | | | | `DIDescriptor`'s subclasses allow construction from incompatible pointers, and `DIDescriptor` defines a series of `isa<>`-like functions (e.g., `isCompileUnit()` instead of `isa<MDCompileUnit>()`) that clients tend to use like this: if (DICompileUnit(N).isCompileUnit()) foo(DICompileUnit(N)); These construction patterns work together to make `DIDescriptor` behave differently from normal pointers. Instead, use built-in `isa<>`, `dyn_cast<>`, etc., and only build `DIDescriptor`s from pointers that are valid for their type. I've split this into a few commits for different parts of LLVM and clang (to decrease the patch size and increase the chance of review). Generally the changes I made were NFC, but in a few places I made things stricter if it made sense from the surrounded code. Eventually a follow-up commit will remove the API for the "old" way. llvm-svn: 234255
* Use sext in fast isel.Rafael Espindola2015-04-061-1/+1
| | | | | | | | | | | | | | | | | | Fast isel used to zero extends immediates to 64 bits. This normally goes unnoticed because the value is truncated to 32 bits for output. Two cases were it is noticed: * We fail to use smaller encodings. * If the original constant was smaller than i32. In the tests using i1 constants, codegen would change to use -1, which is fine (and matches what regular isel does) since only the lowest bit is then used. Instead, this patch then changes the ir to use i8 constants, which looks more like what clang produces. llvm-svn: 234249
* DebugInfo: Reimplement DIRef<>::resolve() using TypedDebugNodeRef<>Duncan P. N. Exon Smith2015-04-061-0/+14
| | | | | | | | | | | | | Gut `DIRef<>::resolve()`, reimplementing it using `TypedDebugNodeRef<>::resolve()`. Use three separate functions rather than some sort of type traits, since the latter (i.e., mapping `DIScope` => `MDScope`) seems heavy-handed. I don't expect `DIRef<>` to last much longer in tree anyway. As a drive-by fix, make `TypedDebugNodeRef<>::resolve()` do the right thing with `nullptr`. llvm-svn: 234248
* DebugInfo: Drop confusing forwarding API from DILexicalBlockFileDuncan P. N. Exon Smith2015-04-061-3/+0
| | | | | | | | | | | | | | | | | Remove `DILexicalBlockFile::getScope()` (whose last use was removed from clang in r234245), which illegally returned a `DILexicalBlock` despite its scope sometimes being an `MDSubprogram`. Also remove the `getLineNumber()` and `getColumnNumber()` methods that just forwarded to `DILexicalBlock`'s versions, since there don't seem to be any callers. Note that the block of code removed from `DebugInfo.cpp` was actually dead code, since `isLexicalBlock()` (the previous branch) always returns true when `isLexicalBlockFile()` returns true. An earlier (broken and untested) version of this was squashed into r234222 and reverted in r234225. llvm-svn: 234246
* ArgPromo: Bail out earlier for varargs functionsDavid Blaikie2015-04-061-6/+7
| | | | llvm-svn: 234224
* Move `checkInterfaceFunction` to ModuleUtilsIsmail Pazarbasi2015-04-064-91/+77
| | | | | | | | | | | | | | Summary: Instead of making a local copy of `checkInterfaceFunction` for each sanitizer, move the function in a common place. Reviewers: kcc, samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8775 llvm-svn: 234220
* [opaque pointer type] Avoid using PointerType::getElementType when parsing IRDavid Blaikie2015-04-064-16/+10
| | | | | | | | | | A few calls are left in for error checking - but I'm commenting those out & trying to build some IR tests (aiming for Argument Promotion to start with). When I get any of these tests passing I may add flag to disable the checking so I can add tests that pass with the assertion in place. llvm-svn: 234206
* DebugInfo: Remove DIDescriptor::Verify()Duncan P. N. Exon Smith2015-04-068-93/+12
| | | | | | | | | | | | Remove `DIDescriptor::Verify()` and the `Verify()`s from subclasses. They had already been gutted, and just did an `isa<>` check. In a couple of cases I've temporarily dropped the check entirely, but subsequent commits are going to disallow conversions to the `DIDescriptor`s directly from `MDNode`, so the checks will come back in another form soon enough. llvm-svn: 234201
* DebugInfo: Use MDTypeRef throughout the hierarchyDuncan P. N. Exon Smith2015-04-064-83/+91
| | | | | | | | | | | | | | Use `MDTypeRef` (etc.) in the new debug info hierarchy rather than raw `Metadata *` pointers. I rolled in a change to `DIBuilder` that looks unrelated: take `DIType` instead of `DITypeRef` as type arguments when creating variables. However, this was the simplest way to use `MDTypeRef` within the functions, and didn't require any cleanups from callers in clang (since they were all passing in `DIType`s anyway, relying on their implicit conversions to `DITypeRef`). llvm-svn: 234197
* [WinEH] Don't sink allocas into child handlersReid Kleckner2015-04-062-13/+7
| | | | | | | | | | The uselist isn't enough to infer anything about the lifetime of such allocas. If we want to re-add this optimization, we will need to leverage lifetime markers to do it. Fixes PR23122. llvm-svn: 234196
* 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
OpenPOWER on IntegriCloud