oota-llvm.git
9 years agoIR: Remove MDTupleTypedArrayWrapper::operator MDTuple*()
Duncan P. N. Exon Smith [Tue, 7 Apr 2015 16:50:39 +0000 (16:50 +0000)]
IR: Remove MDTupleTypedArrayWrapper::operator MDTuple*()

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

9 years agoCleanup register pressure calculation in MachineLICM.
Daniel Jasper [Tue, 7 Apr 2015 16:42:35 +0000 (16:42 +0000)]
Cleanup register pressure calculation in MachineLICM.

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

9 years ago[mips] [IAS] Allow .set assignments for already defined symbols.
Toma Tabacu [Tue, 7 Apr 2015 13:59:39 +0000 (13:59 +0000)]
[mips] [IAS] Allow .set assignments for already defined symbols.

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

9 years agoRefactor a lot of duplicated code for stub output.
Rafael Espindola [Tue, 7 Apr 2015 13:42:44 +0000 (13:42 +0000)]
Refactor a lot of duplicated code for stub output.

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

9 years agoSilencing several "enumeral and non-enumeral type in conditional expression" warnings...
Aaron Ballman [Tue, 7 Apr 2015 13:28:37 +0000 (13:28 +0000)]
Silencing several "enumeral and non-enumeral type in conditional expression" warnings; NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234314 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoClear the stub map in getSortedStubs.
Rafael Espindola [Tue, 7 Apr 2015 12:59:28 +0000 (12:59 +0000)]
Clear the stub map in getSortedStubs.

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

9 years ago[TableGen] Prevent invalid code generation when emitting AssemblerPredicate conditions.
Toma Tabacu [Tue, 7 Apr 2015 12:10:11 +0000 (12:10 +0000)]
[TableGen] Prevent invalid code generation when emitting AssemblerPredicate 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

9 years ago[MachineLICM] Remove obsolete comment about not considering reg pressure.
Daniel Jasper [Tue, 7 Apr 2015 11:43:32 +0000 (11:43 +0000)]
[MachineLICM] Remove obsolete comment about not considering reg pressure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234310 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd test showing that MachineLICM is calculating register pressure wrong
Daniel Jasper [Tue, 7 Apr 2015 11:41:40 +0000 (11:41 +0000)]
Add test showing that MachineLICM is calculating register pressure wrong

More details: http://llvm.org/PR23143

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234309 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[RuntimeDyld] Always allocate at least 1 byte for object sections in the JIT to
Lang Hames [Tue, 7 Apr 2015 06:27:56 +0000 (06:27 +0000)]
[RuntimeDyld] Always allocate at least 1 byte for object sections in the JIT to
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

9 years ago[Orc] Save all the x86-64 GPRs before re-entering the JIT.
Lang Hames [Tue, 7 Apr 2015 06:12:21 +0000 (06:12 +0000)]
[Orc] Save all the x86-64 GPRs before re-entering the JIT.

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

9 years agoTry a third time to fix MSVC build after r234290
Duncan P. N. Exon Smith [Tue, 7 Apr 2015 05:03:47 +0000 (05:03 +0000)]
Try a third time to fix MSVC build after r234290

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

9 years agoTry again to fix MSVC build after r234290
Duncan P. N. Exon Smith [Tue, 7 Apr 2015 04:49:13 +0000 (04:49 +0000)]
Try again to fix MSVC build after r234290

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

9 years agoTry to fix MSVC build after r234290
Duncan P. N. Exon Smith [Tue, 7 Apr 2015 04:33:42 +0000 (04:33 +0000)]
Try to fix MSVC build after r234290

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

9 years agoDebugInfo: Remove DITypedArray<>, replace with typedefs
Duncan P. N. Exon Smith [Tue, 7 Apr 2015 04:14:33 +0000 (04:14 +0000)]
DebugInfo: Remove DITypedArray<>, replace with typedefs

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

9 years agoDebugInfo: Remove DICompositeType mutation API
Duncan P. N. Exon Smith [Tue, 7 Apr 2015 04:12:02 +0000 (04:12 +0000)]
DebugInfo: Remove DICompositeType mutation API

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

9 years agoDebugInfo: Use DebugNodeRef in MDImportedEntity::getEntity()
Duncan P. N. Exon Smith [Tue, 7 Apr 2015 04:07:31 +0000 (04:07 +0000)]
DebugInfo: Use DebugNodeRef in MDImportedEntity::getEntity()

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

9 years agoDebugInfo: Move DIFlag accessors from DIVariable to MDLocalVariable
Duncan P. N. Exon Smith [Tue, 7 Apr 2015 03:55:30 +0000 (03:55 +0000)]
DebugInfo: Move DIFlag accessors from DIVariable to MDLocalVariable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234287 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDebugInfo: Move DIExpression bit-piece API to MDExpression
Duncan P. N. Exon Smith [Tue, 7 Apr 2015 03:49:59 +0000 (03:49 +0000)]
DebugInfo: Move DIExpression bit-piece API to MDExpression

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234286 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDebugInfo: Remove special iterators from DIExpression
Duncan P. N. Exon Smith [Tue, 7 Apr 2015 03:45:57 +0000 (03:45 +0000)]
DebugInfo: Remove special iterators from DIExpression

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

9 years ago[LoopAccesses] New API to query if memchecks are necessary after partitioning
Adam Nemet [Tue, 7 Apr 2015 03:35:26 +0000 (03:35 +0000)]
[LoopAccesses] New API to query if memchecks are necessary after partitioning

This is used by Loop Distribution.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234283 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDebugInfo: Move DISubprogram::is*() queries to MDSubprogram
Duncan P. N. Exon Smith [Tue, 7 Apr 2015 03:33:57 +0000 (03:33 +0000)]
DebugInfo: Move DISubprogram::is*() queries to MDSubprogram

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

9 years agoDebugInfo: Move DIType::is*() queries to MDType
Duncan P. N. Exon Smith [Tue, 7 Apr 2015 01:24:30 +0000 (01:24 +0000)]
DebugInfo: Move DIType::is*() queries to MDType

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

9 years agoDebugInfo: Move DIFlag-related API from DIDescriptor to DebugNode
Duncan P. N. Exon Smith [Tue, 7 Apr 2015 01:21:40 +0000 (01:21 +0000)]
DebugInfo: Move DIFlag-related API from DIDescriptor to DebugNode

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234274 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Rename MDSubrange::getLo() to getLowerBound()
Duncan P. N. Exon Smith [Tue, 7 Apr 2015 00:39:59 +0000 (00:39 +0000)]
IR: Rename MDSubrange::getLo() to getLowerBound()

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

9 years agoFix some minor abuse of C++ terminology in comments.
Richard Smith [Tue, 7 Apr 2015 00:14:27 +0000 (00:14 +0000)]
Fix some minor abuse of C++ terminology in comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234265 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDebugInfo: Drop dead code for loose DIDescriptor construction API
Duncan P. N. Exon Smith [Tue, 7 Apr 2015 00:09:47 +0000 (00:09 +0000)]
DebugInfo: Drop dead code for loose DIDescriptor construction API

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

9 years agobindings/go: Stop using DIDescriptor::is*() and auto-casting
Duncan P. N. Exon Smith [Tue, 7 Apr 2015 00:08:31 +0000 (00:08 +0000)]
bindings/go: Stop using DIDescriptor::is*() and auto-casting

Go bindings edition of r234255.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234262 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Fix -Werror noasserts build after r234255
Duncan P. N. Exon Smith [Mon, 6 Apr 2015 23:34:41 +0000 (23:34 +0000)]
IR: Fix -Werror noasserts build after r234255

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234259 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCodeGen: Stop using DIDescriptor::is*() and auto-casting
Duncan P. N. Exon Smith [Mon, 6 Apr 2015 23:27:40 +0000 (23:27 +0000)]
CodeGen: Stop using DIDescriptor::is*() and auto-casting

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

9 years agoTransforms: Stop using DIDescriptor::is*() and auto-casting
Duncan P. N. Exon Smith [Mon, 6 Apr 2015 23:27:00 +0000 (23:27 +0000)]
Transforms: Stop using DIDescriptor::is*() and auto-casting

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

9 years agoIR: Stop using DIDescriptor::is*() and auto-casting
Duncan P. N. Exon Smith [Mon, 6 Apr 2015 23:18:49 +0000 (23:18 +0000)]
IR: Stop using DIDescriptor::is*() and auto-casting

`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

9 years agoFix failure on builder clang-cmake-mips where it was printing a 32-bit address
Kevin Enderby [Mon, 6 Apr 2015 22:33:43 +0000 (22:33 +0000)]
Fix failure on builder clang-cmake-mips where it was printing a 32-bit address
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

9 years agoDebugInfo: Allow isa<> on DIDescriptor and subclasses
Duncan P. N. Exon Smith [Mon, 6 Apr 2015 22:32:20 +0000 (22:32 +0000)]
DebugInfo: Allow isa<> on DIDescriptor and subclasses

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

9 years agoUse sext in fast isel.
Rafael Espindola [Mon, 6 Apr 2015 22:29:07 +0000 (22:29 +0000)]
Use sext in fast isel.

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

9 years agoDebugInfo: Reimplement DIRef<>::resolve() using TypedDebugNodeRef<>
Duncan P. N. Exon Smith [Mon, 6 Apr 2015 22:27:37 +0000 (22:27 +0000)]
DebugInfo: Reimplement DIRef<>::resolve() using TypedDebugNodeRef<>

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

9 years ago[lit] Skip gtest names starting with DISABLED_
Reid Kleckner [Mon, 6 Apr 2015 22:16:58 +0000 (22:16 +0000)]
[lit] Skip gtest names starting with DISABLED_

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

9 years agoDebugInfo: Drop confusing forwarding API from DILexicalBlockFile
Duncan P. N. Exon Smith [Mon, 6 Apr 2015 22:07:46 +0000 (22:07 +0000)]
DebugInfo: Drop confusing forwarding API from DILexicalBlockFile

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234246 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[lit] Fix running gtest type-parameterized tests on Windows
Reid Kleckner [Mon, 6 Apr 2015 21:49:55 +0000 (21:49 +0000)]
[lit] Fix running gtest type-parameterized tests on Windows

The '/' character in the test name of a type-parameterized test is not a
path separator, and should not be '\' on Windows. We were passing a test
name to --gtest_filter which found no tests, so the exit code was zero,
indicating a passed test.

This bug has been here since r84387 in 2009, when Jeff Yasskin added the
original lit support for type-paratermized tests. Somewhere along the
line some of the ValueMapTests started failing, but we can fix those
separately.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234242 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReapply "DebugInfo: Loosen DILexicalBlock constructor"
Duncan P. N. Exon Smith [Mon, 6 Apr 2015 21:46:46 +0000 (21:46 +0000)]
Reapply "DebugInfo: Loosen DILexicalBlock constructor"

This reverts commit r234225, reapplying r234222 in spirit.

This time, just include what the commit message actually describes:
loosen the `DILexicalBlock` constructor to require a
`MDLexicalBlockBase`, since that's what `DILexicalBlock` is wrapping.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234241 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "DebugInfo: Loosen DILexicalBlock constructor"
Duncan P. N. Exon Smith [Mon, 6 Apr 2015 21:30:23 +0000 (21:30 +0000)]
Revert "DebugInfo: Loosen DILexicalBlock constructor"

This reverts commit r234222, while I look into bot failures [1].  I'll
recommit soon.

[1]: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/7117/

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234225 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoArgPromo: Bail out earlier for varargs functions
David Blaikie [Mon, 6 Apr 2015 21:27:31 +0000 (21:27 +0000)]
ArgPromo: Bail out earlier for varargs functions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234224 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDebugInfo: Loosen DILexicalBlock constructor
Duncan P. N. Exon Smith [Mon, 6 Apr 2015 21:16:11 +0000 (21:16 +0000)]
DebugInfo: Loosen DILexicalBlock constructor

This class wraps `MDLexicalBlockBase`, so allow construction from it!
Currently doesn't cause any problems because of the explicit `MNode*`
constructor, but I'll be removing that soon enough.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234222 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMove `checkInterfaceFunction` to ModuleUtils
Ismail Pazarbasi [Mon, 6 Apr 2015 21:09:08 +0000 (21:09 +0000)]
Move `checkInterfaceFunction` to ModuleUtils

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234220 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[opaque pointer type] Avoid using PointerType::getElementType when parsing IR
David Blaikie [Mon, 6 Apr 2015 20:59:48 +0000 (20:59 +0000)]
[opaque pointer type] Avoid using PointerType::getElementType when parsing IR

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234206 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDebugInfo: Remove DIDescriptor::Verify()
Duncan P. N. Exon Smith [Mon, 6 Apr 2015 19:49:39 +0000 (19:49 +0000)]
DebugInfo: Remove DIDescriptor::Verify()

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234201 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDebugInfo: Add MDTypeRefArray, to replace DITypeArray
Duncan P. N. Exon Smith [Mon, 6 Apr 2015 19:48:50 +0000 (19:48 +0000)]
DebugInfo: Add MDTypeRefArray, to replace DITypeArray

This array-like wrapper adapts `MDTuple` to have elements of `MDTypeRef`
(whereas `MDTypeArray` has elements of `MDType`).  This is necessary to
migrate code using `DITypeArray`.  The only use of this is
`MDSubroutineType`'s `getTypeArray()` accessor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234200 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDebugInfo: Remove dead DIType::operator DITypeRef(), NFC
Duncan P. N. Exon Smith [Mon, 6 Apr 2015 19:23:22 +0000 (19:23 +0000)]
DebugInfo: Remove dead DIType::operator DITypeRef(), NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234198 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDebugInfo: Use MDTypeRef throughout the hierarchy
Duncan P. N. Exon Smith [Mon, 6 Apr 2015 19:03:45 +0000 (19:03 +0000)]
DebugInfo: Use MDTypeRef throughout the hierarchy

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`).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234197 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WinEH] Don't sink allocas into child handlers
Reid Kleckner [Mon, 6 Apr 2015 18:50:38 +0000 (18:50 +0000)]
[WinEH] Don't sink allocas into child handlers

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234196 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoARM: do not relax Thumb1 -> Thumb2 if only Thumb1 is available.
Tim Northover [Mon, 6 Apr 2015 18:44:42 +0000 (18:44 +0000)]
ARM: do not relax Thumb1 -> Thumb2 if only Thumb1 is available.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234195 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86][SSE] Use (V)PINSRB for direct byte insertion in 16i8 buildvector on SSE4.1...
Simon Pilgrim [Mon, 6 Apr 2015 18:39:00 +0000 (18:39 +0000)]
[X86][SSE] Use (V)PINSRB for direct byte insertion in 16i8 buildvector on 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234193 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix failure on builder llvm-clang-lld-x86_64-debian-fast as the
Kevin Enderby [Mon, 6 Apr 2015 18:18:23 +0000 (18:18 +0000)]
Fix failure on builder llvm-clang-lld-x86_64-debian-fast as the
test macho-objc-meta-data.test had a line it shouldn't have had.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234190 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd some type safety to GlobalObject/GlobalValue - they're always PointerTypes so...
David Blaikie [Mon, 6 Apr 2015 18:06:06 +0000 (18:06 +0000)]
Add some type safety to GlobalObject/GlobalValue - they're always PointerTypes so let's type them that way.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234189 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDebugInfo: Create MDTypeRef, etc., to replace DITypeRef
Duncan P. N. Exon Smith [Mon, 6 Apr 2015 18:02:43 +0000 (18:02 +0000)]
DebugInfo: Create MDTypeRef, etc., to replace DITypeRef

Create a string-based wrapper in the debug info hierarchy for type
references.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234188 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDebugInfo: Remove dead DIRef::getName()
Duncan P. N. Exon Smith [Mon, 6 Apr 2015 17:52:46 +0000 (17:52 +0000)]
DebugInfo: Remove dead DIRef::getName()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234186 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFor llvm-objdump added support for printing Objc2 32-bit runtime meta data
Kevin Enderby [Mon, 6 Apr 2015 17:47:03 +0000 (17:47 +0000)]
For llvm-objdump added support for printing Objc2 32-bit runtime meta data
with the existing -objc-meta-data and -macho options for Mach-O files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234185 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMetadata: Add typed array-like wrapper for MDTuple
Duncan P. N. Exon Smith [Mon, 6 Apr 2015 17:45:07 +0000 (17:45 +0000)]
Metadata: Add typed array-like wrapper for MDTuple

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234183 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDebugInfo: Remove dead code for accessing fields
Duncan P. N. Exon Smith [Mon, 6 Apr 2015 17:21:05 +0000 (17:21 +0000)]
DebugInfo: Remove dead code for accessing fields

Most fields are now accessed via the new debug info hierarchy.  I'll
make the rest of this code dead soon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234182 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAutoUpgrade: Remove obsolete dbg.declare/value upgrade
Duncan P. N. Exon Smith [Mon, 6 Apr 2015 17:17:47 +0000 (17:17 +0000)]
AutoUpgrade: Remove obsolete dbg.declare/value upgrade

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()`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234181 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SLSR] consider &B[S << i] as &B[(1 << i) * S]
Jingyue Wu [Mon, 6 Apr 2015 17:15:48 +0000 (17:15 +0000)]
[SLSR] consider &B[S << i] as &B[(1 << i) * S]

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234180 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[DAGCombiner] Add support for FCEIL, FFLOOR and FTRUNC vector constant folding
Simon Pilgrim [Mon, 6 Apr 2015 17:15:41 +0000 (17:15 +0000)]
[DAGCombiner] Add support for FCEIL, FFLOOR and FTRUNC vector constant folding

Differential Revision: http://reviews.llvm.org/D8715

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234179 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoVerifier: Check composite type template params
Duncan P. N. Exon Smith [Mon, 6 Apr 2015 17:04:58 +0000 (17:04 +0000)]
Verifier: Check composite type template params

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`).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234177 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDebugInfo: Use MDFile instead of accessing operands directly, NFC
Duncan P. N. Exon Smith [Mon, 6 Apr 2015 16:43:40 +0000 (16:43 +0000)]
DebugInfo: Use MDFile instead of accessing operands directly, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234175 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUse a comma after the unique keyword.
Rafael Espindola [Mon, 6 Apr 2015 16:34:41 +0000 (16:34 +0000)]
Use a comma after the unique keyword.

H.J. Lu noted that all .section options are separated by a comma.

This patch changes the syntax of unique to require one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234174 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agofix typos; NFC
Sanjay Patel [Mon, 6 Apr 2015 16:21:12 +0000 (16:21 +0000)]
fix typos; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234171 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove unnecessary uses of AliasedSymbol.
Rafael Espindola [Mon, 6 Apr 2015 16:10:05 +0000 (16:10 +0000)]
Remove unnecessary uses of AliasedSymbol.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234169 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemoving a spurious space; NFC.
Aaron Ballman [Mon, 6 Apr 2015 16:09:13 +0000 (16:09 +0000)]
Removing a spurious space; NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234168 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoBe consistent when deciding if a relocation is needed.
Rafael Espindola [Mon, 6 Apr 2015 15:27:57 +0000 (15:27 +0000)]
Be consistent when deciding if a relocation is needed.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234165 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDisable all link optimizations in a debug build.
Rafael Espindola [Mon, 6 Apr 2015 15:04:31 +0000 (15:04 +0000)]
Disable all link optimizations in a debug build.

This taking linking clang on my machine with gold from 16.980257914 to
15.933037649 seconds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234161 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDon't pass -O3 to the linker in debug builds.
Rafael Espindola [Mon, 6 Apr 2015 14:51:01 +0000 (14:51 +0000)]
Don't pass -O3 to the linker in debug builds.

This takes linking clang in a debug build with gold form 19.518925697 to
16.406388685 seconds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234160 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDon't use -ffunction-sections -fdata-sections on debug builds.
Rafael Espindola [Mon, 6 Apr 2015 14:34:43 +0000 (14:34 +0000)]
Don't use -ffunction-sections -fdata-sections on debug builds.

Unfortunately, on ELF there is not used attribute on the .o files,
so there is no easy way to keep the dump function alive.

If we are not gcing, we may as well produce non gcable files and
avoid the cost.

Linking a debug clang now takes 18.856225992 seconds, before it
took 21.206897447.

I will try avoiding --gc-sections -O3 on a followup patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234159 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTest commit. Improve comments in APInt. NFC.
Pawel Bylica [Mon, 6 Apr 2015 13:31:39 +0000 (13:31 +0000)]
Test commit. Improve comments in APInt. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234158 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoStore the sh_link of ARM_EXIDX directly in MCSectionELF.
Rafael Espindola [Mon, 6 Apr 2015 04:25:18 +0000 (04:25 +0000)]
Store the sh_link of ARM_EXIDX directly in MCSectionELF.

This avoids some pretty horrible and broken name based section handling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234142 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSimplify this function a bit. NFC.
Rafael Espindola [Mon, 6 Apr 2015 03:16:51 +0000 (03:16 +0000)]
Simplify this function a bit. NFC.

The case values are not a tidy enum we can fully cover. They even ovelap
over the various extension.

Just use a default:

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234140 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSimplify mapping from relocation sections to relocated sections.
Rafael Espindola [Mon, 6 Apr 2015 03:09:30 +0000 (03:09 +0000)]
Simplify mapping from relocation sections to relocated sections.

Just store the section in MCSectionELF. This avoids multiple hash lookups.

This will also be used by ARM_EXIDX.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234139 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Orc] Tidy up the assembly for the x86-64 resolver block.
Lang Hames [Mon, 6 Apr 2015 03:01:29 +0000 (03:01 +0000)]
[Orc] Tidy up the assembly for the x86-64 resolver block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234138 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[opaque pointer type] Remove some backwards compatible GEP APIs
David Blaikie [Sun, 5 Apr 2015 22:53:21 +0000 (22:53 +0000)]
[opaque pointer type] Remove some backwards compatible GEP APIs

Just doing the two-step so I don't get so much build-bot spam... (add
new API, migrate callers, remove old API)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234132 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format my last commit
David Blaikie [Sun, 5 Apr 2015 22:44:57 +0000 (22:44 +0000)]
clang-format my last commit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234127 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[opaque pointer type] The last of the GEP IRBuilder API migrations
David Blaikie [Sun, 5 Apr 2015 22:41:44 +0000 (22:41 +0000)]
[opaque pointer type] The last of the GEP IRBuilder API migrations

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234126 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMark BumpPtrAllocator::Allocate as returning a noalias pointer.
Benjamin Kramer [Sun, 5 Apr 2015 17:02:25 +0000 (17:02 +0000)]
Mark BumpPtrAllocator::Allocate as returning a noalias pointer.

The GCC attribute is curiously named 'malloc', but I think it's better
to use LLVM terminology for the wrapper macro.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234121 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[DAGCombiner] Merge FMUL Scalar and Vector constant canonicalization to RHS. NFCI.
Simon Pilgrim [Sun, 5 Apr 2015 14:30:37 +0000 (14:30 +0000)]
[DAGCombiner] Merge FMUL Scalar and Vector constant canonicalization to RHS. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234118 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[opaque pointer type] More GEP API migrations
David Blaikie [Sat, 4 Apr 2015 21:07:10 +0000 (21:07 +0000)]
[opaque pointer type] More GEP API migrations

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234108 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoremove function/variable names from comments; NFC
Sanjay Patel [Sat, 4 Apr 2015 21:06:39 +0000 (21:06 +0000)]
remove function/variable names from comments; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234107 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoless space; NFC
Sanjay Patel [Sat, 4 Apr 2015 21:05:52 +0000 (21:05 +0000)]
less space; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234106 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDon't mix overload and default values.
Rafael Espindola [Sat, 4 Apr 2015 18:16:01 +0000 (18:16 +0000)]
Don't mix overload and default values.

It makes it hard to see which one is being called.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234100 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoImplement unique sections with an unique ID.
Rafael Espindola [Sat, 4 Apr 2015 18:02:01 +0000 (18:02 +0000)]
Implement unique sections with an unique ID.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234099 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[opaque pointer type] More (constant, in this instance) GEP API migrations
David Blaikie [Sat, 4 Apr 2015 15:12:13 +0000 (15:12 +0000)]
[opaque pointer type] More (constant, in this instance) GEP API migrations

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234096 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[DAGCombiner] Canonicalize vector constants for ADD/MUL/AND/OR/XOR re-association
Simon Pilgrim [Sat, 4 Apr 2015 10:20:31 +0000 (10:20 +0000)]
[DAGCombiner] Canonicalize vector constants for ADD/MUL/AND/OR/XOR re-association

Scalar integers are commuted to move constants to the RHS for re-association - this ensures vectors do the same.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234092 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Apply AddedComplexity consistently for similar patterns. This keeps them togeth...
Craig Topper [Sat, 4 Apr 2015 04:22:12 +0000 (04:22 +0000)]
[X86] Apply AddedComplexity consistently for similar patterns. This keeps them together in the DAGISel tables and reduces table size slightly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234086 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix formatting and coding style.
Eric Christopher [Sat, 4 Apr 2015 03:53:25 +0000 (03:53 +0000)]
Fix formatting and coding style.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234084 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Add a comment about the change in r234075.
Craig Topper [Sat, 4 Apr 2015 02:31:43 +0000 (02:31 +0000)]
[X86] Add a comment about the change in r234075.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234079 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoStrip trailing whitespace and reword explanatory comment.
Eric Christopher [Sat, 4 Apr 2015 02:26:47 +0000 (02:26 +0000)]
Strip trailing whitespace and reword explanatory comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234078 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Don't use GR64 register 'and with immediate' instructions if the immediate...
Craig Topper [Sat, 4 Apr 2015 02:08:20 +0000 (02:08 +0000)]
[X86] Don't use GR64 register 'and with immediate' instructions if the 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234075 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WinEH] Fill out CatchHigh in the TryBlockMap
David Majnemer [Fri, 3 Apr 2015 23:37:34 +0000 (23:37 +0000)]
[WinEH] Fill out CatchHigh in the TryBlockMap

Now all fields in the WinEH xdata have been filled out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234067 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[opaque pointer type] More GEP IRBuilder API migrations
David Blaikie [Fri, 3 Apr 2015 23:03:54 +0000 (23:03 +0000)]
[opaque pointer type] More GEP IRBuilder API migrations

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234064 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WinEH] Fill out .xdata for catch objects
David Majnemer [Fri, 3 Apr 2015 22:49:05 +0000 (22:49 +0000)]
[WinEH] Fill out .xdata for catch objects

This add support for catching an exception such that an exception object
available to the catch handler will be initialized by the runtime.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234062 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WinEH] Sink UnwindHelp completely out of IR
David Majnemer [Fri, 3 Apr 2015 22:32:26 +0000 (22:32 +0000)]
[WinEH] Sink UnwindHelp completely out of IR

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234061 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFixing a memory leak in WinEHPrepare
Andrew Kaylor [Fri, 3 Apr 2015 21:44:17 +0000 (21:44 +0000)]
Fixing a memory leak in WinEHPrepare

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234059 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[opaque pointer type] More GEP IRBuilder API migrations...
David Blaikie [Fri, 3 Apr 2015 21:33:42 +0000 (21:33 +0000)]
[opaque pointer type] More GEP IRBuilder API migrations...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234058 91177308-0d34-0410-b5e6-96231b3b80d8