Commit Graph

52935 Commits

Author SHA1 Message Date
Andrew Trick
5e108eeeef Added TargetPassConfig::disablePass/substitutePass as a general mechanism to override specific passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150562 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-15 03:21:47 +00:00
Lang Hames
f58e37f957 Don't emit live ranges for physregs live-ins that are dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150553 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-15 01:31:10 +00:00
Lang Hames
da7984fbba Disentangle moving a machine instr from updating LiveIntervals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150552 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-15 01:23:52 +00:00
Pete Cooper
bbfa5c02be Added hook to let targets custom lower splitting of illegal vectors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150550 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-15 00:55:31 +00:00
Chad Rosier
15b4497333 Use a temporary variable, rather then a series of redundant calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150538 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-15 00:36:26 +00:00
Pete Cooper
9989a63818 Stop custom lowering forr x86 DEC64m from happening if the load in the lowered sequence has more than 1 user
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150537 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-15 00:33:37 +00:00
Chad Rosier
92fd017364 Use a temporary variable, rather then a series of redundant calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150536 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-15 00:23:55 +00:00
Jakob Stoklund Olesen
d5d61edfc6 Fix global live range splitting regmask accuracy.
Pretend that regmask interference ends at the 'dead' slot, even when
there is other interference ending at the 'reg' slot of the same
instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150531 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 23:53:23 +00:00
Jakob Stoklund Olesen
cac5fa39bd Fix details in local live range splitting with regmasks.
Perform all comparisons at instruction granularity, and make sure
register masks on uses count in both gaps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150530 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 23:51:27 +00:00
Jakob Stoklund Olesen
1cf8b0f2a5 Handle regmasks in findRegisterDefOperandIdx().
Only accept register masks when looking for an 'overlapping' def. When
Overlap is not set, the function searches for a proper definition of
Reg.

This means MI->modifiesRegister() considers register masks, but
MI->definesRegister() doesn't.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150529 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 23:49:37 +00:00
Jakob Stoklund Olesen
6b7913893b Use the proper clobber check in handleLiveInRegister().
When a physreg is live in to a basic block, look for any instruction in
the block that clobbers the physreg.

The instruction doesn't have to properly redefine the register, any
overlapping clobber is OK.

This slightly changes live ranges when compiling with register masks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150528 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 23:46:24 +00:00
Jakob Stoklund Olesen
f658af5484 Dump live intervals in numerical order.
The old DenseMap hashed order was very confusing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150527 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 23:46:21 +00:00
Lang Hames
94b6e14182 Don't create a new copy of reserved regs - we already have one handy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150525 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 23:06:12 +00:00
Chad Rosier
5793a6586d Remove unnecessary assignment to temporary, ResultReg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150520 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 22:29:48 +00:00
Aaron Ballman
010ad7d353 Using the new external-linkage warning recently added instead of disabling all return type warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150512 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 21:44:03 +00:00
Aaron Ballman
da32e46936 Fixing warning due to the new "UTD return type in extern 'C'".
Patch by Matt Johnson

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150508 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 21:29:32 +00:00
Bill Wendling
b464d3ff72 Add code to the target lowering object file module to handle module flags.
The MachO back-end needs to emit the garbage collection flags specified in the
module flags. This is a WIP, so the front-end hasn't been modified to emit these
flags just yet. Documentation and front-end switching to occur soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150507 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 21:28:13 +00:00
Lang Hames
03698deb25 Update MachineVerifier to check the new physreg live-in rules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150496 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 19:17:48 +00:00
Lang Hames
342c64c904 Tighten physical register invariants: Allocatable physical registers can
only be live in to a block if it is the function entry point or a landing pad.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150494 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 18:51:53 +00:00
Nadav Rotem
8b7c3d0ee4 Fix PR12000. Some vector operations may use scalar operands with types
that are greater than the vector element type. For example BUILD_VECTOR
of type <1 x i1> with a constant i8 operand.
This patch fixes the assertion.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150477 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 13:06:32 +00:00
Benjamin Kramer
fc52a52323 Turn push_back loops into append/insert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150471 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 10:29:27 +00:00
Bill Wendling
75b3d68867 Capitalize messages so that they appear nicely with the linker's error messages.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150466 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 09:13:54 +00:00
Craig Topper
233a64846e Move old movl vector_shuffle patterns. Not needed anymore since vector_shuffles shouldn't reach isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150462 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 08:14:53 +00:00
Lang Hames
0796134bde Rename getExceptionAddressRegister() to getExceptionPointerRegister() for consistency with setExceptionPointerRegister(...).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150460 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 04:45:49 +00:00
Lang Hames
cd339b71ff Use convenience function for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150457 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 03:04:29 +00:00
Kostya Serebryany
3eccaa6625 [tsan] fix compiler warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150449 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 00:52:07 +00:00
Lang Hames
1a4cb1caf0 Third time's the charm...?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150447 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 00:34:30 +00:00
Lang Hames
6b0e9d97fa Unswap swap operands, partially reducing confusion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150444 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 00:17:12 +00:00
Andrew Trick
f6629ab847 Add simplifyLoopLatch to LoopRotate pass.
This folds a simple loop tail into a loop latch. It covers the common (in fortran) case of postincrement loops. It's a "free" way to expose this type of loop to downstream loop optimizations that bail out on non-canonical loops (getLoopLatch is a heavily used check).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150439 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 00:00:23 +00:00
Andrew Trick
c3a825b76c whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150438 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 00:00:19 +00:00
Bill Wendling
bdf9db6f49 Don't reserve the R0 and R1 registers here. We don't use these registers, and
marking them as "live-in" into a BB ruins some invariants that the back-end
tries to maintain.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150437 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13 23:47:16 +00:00
Bill Wendling
150a371569 Don't recalculate the size of the vector each time through the loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150436 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13 23:45:26 +00:00
Lang Hames
2cc494b963 Make operands for VSWP read-modify-write.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150433 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13 23:37:19 +00:00
Jakob Stoklund Olesen
16a7ff3165 Add register mask support to ScheduleDAGRRList.
The scheduler will sometimes check the implicit-def list on instructions
to properly handle pre-colored DAG edges.

Also check any register mask operands for physreg clobbers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150428 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13 23:25:24 +00:00
Devang Patel
a2e0f6b643 Check against umin while converting fcmp into an icmp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150425 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13 23:05:18 +00:00
Dan Gohman
a3b08d68bd Just like in regular escape analysis, loads and stores through
(but not of) a block pointer do not cause the block pointer to
escape. This fixes rdar://10803830.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150424 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13 22:57:02 +00:00
Kostya Serebryany
60ebb1947f ThreadSanitizer, a race detector. First LLVM commit.
Clang patch (flags) will follow shortly.
The run-time library will also follow, but not immediately.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150423 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13 22:50:51 +00:00
Andrew Trick
d35576b3c0 LiveIntervalAnalysis does not depend on MachineLoopInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150411 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13 20:44:42 +00:00
Jakob Stoklund Olesen
3ed4dee530 Check regmask interference for -join-physregs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150404 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13 18:17:04 +00:00
Nadav Rotem
0877fdf30b Fix a bug in DAGCombine for the optimization of BUILD_VECTOR. We cant generate a shuffle node from two vectors of different types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150383 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13 12:42:26 +00:00
Ahmed Charles
4a5d7e300e Remove duplicate code in this header file which seemed to undergo a copy/paste fiasco.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150369 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13 09:45:36 +00:00
Craig Topper
7505626acd Still more vector_shuffle pattern removal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150365 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13 07:23:41 +00:00
Ahmed Charles
b83a67e1e3 Fix various issues (or do cleanups) found by enabling certain MSVC warnings.
- Use unsigned literals when the desired result is unsigned. This mostly allows unsigned/signed mismatch warnings to be less noisy even if they aren't on by default.
- Remove misplaced llvm_unreachable.
- Add static to a declaration of a function on MSVC x86 only.
- Change some instances of calling a static function through a variable to simply calling that function while removing the unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150364 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13 06:30:56 +00:00
Craig Topper
4eaca023dc Remove more vector_shuffle patterns for unpack. These should be target specific nodes when they get to isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150363 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13 05:48:49 +00:00
Craig Topper
3b17bf9a7c Recommit r150328. Previous test failures should be fixed by r150360.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150362 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13 05:10:10 +00:00
Craig Topper
2dcd718c13 Update CanXFormVExtractWithShuffleIntoLoad to ensure bitcasts of loads only have one use. Matches DAGCombiner and prevents vector_shuffles from reaching isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150360 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13 04:30:38 +00:00
NAKAMURA Takumi
7f42e9886e Revert r150328, "Remove more vector_shuffle patterns."
It caused 3 failures on pre-penryn and non-x86(generic) hosts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150357 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13 00:10:15 +00:00
Pete Cooper
ce3900849a Fixed bug when custom lowering DEC64m on x86.
If the DEC node had more than one user, it was doing this lowering but
leaving the original DEC node around and so decrementing twice.

Fixes PR11964.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150356 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13 00:10:03 +00:00
Nadav Rotem
2ee746b87d This patch addresses the problem of poor code generation for the zext
v8i8 -> v8i32 on AVX machines. The codegen often scalarizes ANY_EXTEND nodes.
The DAGCombiner has two optimizations that can mitigate the problem. First,
if all of the operands of a BUILD_VECTOR node are extracted from an ZEXT/ANYEXT
nodes, then it is possible to create a new simplified BUILD_VECTOR which uses
UNDEFS/ZERO values to eliminate the scalar ZEXT/ANYEXT nodes.
Second, another dag combine optimization lowers BUILD_VECTOR into a shuffle
vector instruction.

In the case of zext v8i8->v8i32 on AVX, a value in an XMM register is to be
shuffled into a wide YMM register.

This patch modifes the second optimization and allows the creation of
shuffle vectors even when the newly generated vector and the original vector
from which we extract the values are of different types.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150340 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-12 15:05:31 +00:00
Benjamin Kramer
61c2c128f7 StringSwitchify the rest of Triple.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150332 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-12 10:56:52 +00:00