summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-04-07R600/SI: Initial support for assembler and inline assemblyassembler-pushTom Stellard30-141/+3236
This is currently considered experimental, but most of the more commonly used instructions should work. So far only SI has been extensively tested, CI and VI probably work too, but may be buggy. The current set of tests cases do not give complete coverage, but I think it is sufficient for an experimental assembler. See the documentation in R600Usage for more information.
2015-04-07R600/SI: Add missing SOPK instructionsTom Stellard3-13/+72
2015-04-07R600/SI: Don't print offset0/offset1 DS operands when they are 0Tom Stellard7-41/+45
2015-04-07Enable W4 warnings by default for MSVC buildsAndrew Kaylor1-8/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234343 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07Remove unused argument.Rafael Espindola1-9/+6
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234342 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07DebugInfo: Remove constructors for DIRef<>Duncan P. N. Exon Smith3-96/+17
Remove all constructors for `DIRef<>` *except* the ones forwarding from `TypedDebugNodeRef`. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234340 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07add some const to FastMathFlags getters; NFCSanjay Patel1-6/+6
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234337 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07[lit] Allow disabling an entire gtest suite, as is done in tsanReid Kleckner1-1/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234336 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07Revert "Try a third time to fix MSVC build after r234290"Duncan P. N. Exon Smith1-3/+3
This reverts commit r234295 (and r234294 and r234292 before it). I removed the implicit conversion to `MDTuple*` r234326, so there's no longer an ambiguity in `operator[]()`. I think MSVC should accept the original code now... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234335 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07AArch64: Don't lower ISD::SELECT to ISD::SELECT_CCMatthias Braun2-44/+60
Instead of lowering SELECT to SELECT_CC which is further lowered later immediately call the SELECT_CC lowering code. This is preferable because: - Avoids an unnecessary roundtrip through the legalization queues with an intermediate node. - More importantly: Lowered operations get visited last leading to SELECT_CC getting visited with legalized operands and unlegalized ones for preexisting SELECT_CC nodes. This does not hurt the current code (hence no testcase) but is required for another patch I am working on. Differential Revision: http://reviews.llvm.org/D8187 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234334 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07Revert "Workaround bot failure with explicit conversion to MDTuple*"Duncan P. N. Exon Smith1-1/+1
This reverts commit r234329, which insufficiently appeased older `clang`s (apparently that wasn't the only call site). r234331 was a more complete fix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234333 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07Workaround continued bot failures with MDTupleTypedArrayWrapperDuncan P. N. Exon Smith1-4/+4
Change the explicit constructor to be more specific. I think this will get us past the continued bot failures [1] with older clangs. [1]: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_build/8203 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234331 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07Workaround bot failure with explicit conversion to MDTuple*Duncan P. N. Exon Smith1-1/+1
A bot is failing [1] after r234326, apparently because this code doesn't do what I think it should: template <class U> explicit MDTupleTypedArrayWrapper( const U &Tuple, typename std::enable_if< std::is_constructible<const MDTuple *, U>::value>::type * = nullptr) : N(Tuple) {} Just be explicit for now. [1]: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_build/8201/ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234329 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07IR: Remove MDTupleTypedArrayWrapper::operator MDTuple*()Duncan P. N. Exon Smith9-89/+128
Remove `MDTupleTypedArrayWrapper::operator MDTuple*()`, since it causes ambiguity (at least in some [1] compilers [2]) when using indexes to `MDTupleTypedArrayWrapper::operator[](unsigned)` that are convertible to (but not the same as) `unsigned`. [1]: http://lab.llvm.org:8011/builders/sanitizer-windows/builds/2308 [2]: http://lab.llvm.org:8011/builders/clang-cmake-mips/builds/4442 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234326 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07Cleanup register pressure calculation in MachineLICM.Daniel Jasper1-107/+65
There were four almost identical implementations of calculating/updating the register pressure for a certain MachineInstr. Cleanup to have a single implementation (well, controlled with two bool flags until this is cleaned up more). No functional changes intended. Tested by verify that there are no binary changes in the entire llvm test-suite. A new test was added separately in r234309 as it revealed a pre-existing error in the register pressure calculation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234325 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07[mips] [IAS] Allow .set assignments for already defined symbols.Toma Tabacu2-5/+19
Summary: This is not possible when using the IAS for MIPS, but it is possible when using the IAS for other architectures and when using GAS for MIPS. Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8578 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234316 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07Refactor a lot of duplicated code for stub output.Rafael Espindola9-129/+76
This also moves it earlier so that it they are produced before we print an end symbol for the data section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234315 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07Silencing several "enumeral and non-enumeral type in conditional expression" ↵Aaron Ballman1-4/+4
warnings; NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234314 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07Clear the stub map in getSortedStubs.Rafael Espindola3-14/+16
This makes sure they are only output once (and frees a bit of memory). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234313 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07[TableGen] Prevent invalid code generation when emitting AssemblerPredicate ↵Toma Tabacu2-1/+34
conditions. Summary: The loop which emits AssemblerPredicate conditions also links them together by emitting a '&&'. If the 1st predicate is not an AssemblerPredicate, while the 2nd one is, nothing gets emitted for the 1st one, but we still emit the '&&' because of the 2nd predicate. This generated code looks like "( && Cond2)" and is invalid. Reviewers: dsanders Reviewed By: dsanders Subscribers: dsanders, llvm-commits Differential Revision: http://reviews.llvm.org/D8294 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234312 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07[MachineLICM] Remove obsolete comment about not considering reg pressure.Daniel Jasper1-4/+0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234310 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07Add test showing that MachineLICM is calculating register pressure wrongDaniel Jasper1-0/+39
More details: http://llvm.org/PR23143 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234309 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07[RuntimeDyld] Always allocate at least 1 byte for object sections in the JIT toLang Hames1-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>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234299 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07[Orc] Save all the x86-64 GPRs before re-entering the JIT.Lang Hames1-6/+13
The re-entry code should work for all calling conventions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234298 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07Try a third time to fix MSVC build after r234290Duncan P. N. Exon Smith1-3/+3
I have no idea what MSVC means with its error text here :(. http://lab.llvm.org:8011/builders/sanitizer-windows/builds/2310 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234295 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07Try again to fix MSVC build after r234290Duncan P. N. Exon Smith1-3/+3
Still failing: http://lab.llvm.org:8011/builders/sanitizer-windows/builds/2309 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234294 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07Try to fix MSVC build after r234290Duncan P. N. Exon Smith1-2/+2
http://lab.llvm.org:8011/builders/sanitizer-windows/builds/2308 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234292 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07DebugInfo: Remove DITypedArray<>, replace with typedefsDuncan P. N. Exon Smith13-145/+100
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234290 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07DebugInfo: Remove DICompositeType mutation APIDuncan P. N. Exon Smith3-36/+13
Change `DIBuilder` to mutate `MDCompositeTypeBase` directly, and remove the wrapping API in `DICompositeType`. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234289 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07DebugInfo: Use DebugNodeRef in MDImportedEntity::getEntity()Duncan P. N. Exon Smith2-4/+5
A quick cleanup to sue `DebugNodeRef` instead of `Metadata*` for `MDImportedEntity::getEntity()`. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234288 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07DebugInfo: Move DIFlag accessors from DIVariable to MDLocalVariableDuncan P. N. Exon Smith2-8/+5
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234287 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07DebugInfo: Move DIExpression bit-piece API to MDExpressionDuncan P. N. Exon Smith4-25/+30
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234286 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07DebugInfo: Remove special iterators from DIExpressionDuncan P. N. Exon Smith7-83/+27
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234285 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07[LoopAccesses] New API to query if memchecks are necessary after partitioningAdam Nemet2-0/+15
This is used by Loop Distribution. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234283 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07DebugInfo: Move DISubprogram::is*() queries to MDSubprogramDuncan P. N. Exon Smith2-33/+37
Move body of `DISubprogram::isPrivate()` (etc.) to `MDSubprogram`, and change the versions in `DISubprogram` to forward there. This is just like r234275, but for subprograms instead of types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234282 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07DebugInfo: Move DIType::is*() queries to MDTypeDuncan P. N. Exon Smith2-30/+39
Move body of `DIType::isObjectPointer()` (etc.) to `MDType`, and change the versions in `DIType` to forward there. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234275 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07DebugInfo: Move DIFlag-related API from DIDescriptor to DebugNodeDuncan P. N. Exon Smith7-95/+95
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234274 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07IR: Rename MDSubrange::getLo() to getLowerBound()Duncan P. N. Exon Smith6-18/+23
During initial review, the `lo:` field was renamed to `lowerBound:`. Make the same change to the C++ API. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234267 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07Fix some minor abuse of C++ terminology in comments.Richard Smith1-6/+6
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234265 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07DebugInfo: Drop dead code for loose DIDescriptor construction APIDuncan P. N. Exon Smith1-62/+21
Delete `DIDescriptor::is*()` and the various constructors from `MDNode*` in `DIDescriptor` subclasses. If this just broke your out-of-tree code, you need to make updates along the lines of r234255, r234256, r234257 and r234258: - Generally, `DIX().isX()` => `isa<MDX>()`. So, `D.isCompileUnit()` should just be `isa<MDCompileUnit>(D)`, modulo checks for null. - Exception: `DILexicalBlock` => `MDLexicalBlockBase`. - Exception: `DIDerivedType` => `MDDerivedTypeBase`. - Exception: `DICompositeType` => `MDCompositeTypeBase`. - Exception: `DIVariable` => `MDLocalVariable`. - Note that (e.g.) `DICompileUnit` has an implicit constructor from `MDCompileUnit*`. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234263 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07bindings/go: Stop using DIDescriptor::is*() and auto-castingDuncan P. N. Exon Smith1-32/+29
Go bindings edition of r234255. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234262 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-06IR: Fix -Werror noasserts build after r234255Duncan P. N. Exon Smith1-0/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234259 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-06CodeGen: Stop using DIDescriptor::is*() and auto-castingDuncan P. N. Exon Smith22-167/+143
Same as r234255, but for lib/CodeGen and lib/Target. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234258 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-06Transforms: Stop using DIDescriptor::is*() and auto-castingDuncan P. N. Exon Smith6-35/+23
Same as r234255, but for lib/Analysis and lib/Transforms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234257 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-06IR: Stop using DIDescriptor::is*() and auto-castingDuncan P. N. Exon Smith7-163/+134
`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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234255 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-06Fix failure on builder clang-cmake-mips where it was printing a 32-bit addressKevin Enderby1-1/+2
incorrectly because it came from an expression using S.getAddress() which always returns a 64-bit value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234251 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-06DebugInfo: Allow isa<> on DIDescriptor and subclassesDuncan P. N. Exon Smith1-0/+60
Allow LLVM-style casting on `DIDescriptor` and its subclasses so they can behave more like raw pointers. I haven't bothered with tests since I have a follow-up commit coming shortly that uses them extensively in tree, and I'm hoping to kill `DIDescriptor` entirely before too long (so they won't have time to bitrot). Usage examples: DIDescriptor D = foo(); if (DICompileUnit CU = dyn_cast<MDCompileUnit>(D)) return bar(CU); else if (auto *SP = dyn_cast<MDSubprogram>(D)) return baz(SP); return other(D); git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234250 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-06Use sext in fast isel.Rafael Espindola4-16/+27
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234249 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-06DebugInfo: Reimplement DIRef<>::resolve() using TypedDebugNodeRef<>Duncan P. N. Exon Smith3-16/+22
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`. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234248 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-06[lit] Skip gtest names starting with DISABLED_Reid Kleckner1-0/+4
The sanitizer test suite uses this idiom to disable a test. Now that we actually check if a test ran after invoking it, we see that zero tests ran, and complain. Instead, ignore tests starting with DISABLED_ completely. Fixes the sanitizer test suite failures on Windows. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234247 91177308-0d34-0410-b5e6-96231b3b80d8