oota-llvm.git
13 years agoBuild EnhancedDisassembly as a shared library too.
Oscar Fuentes [Sat, 12 Mar 2011 22:01:47 +0000 (22:01 +0000)]
Build EnhancedDisassembly as a shared library too.

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

13 years agoBuild CompilerDriver library.
Oscar Fuentes [Sat, 12 Mar 2011 22:01:42 +0000 (22:01 +0000)]
Build CompilerDriver library.

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

13 years agoBuild LTO as a static library too.
Oscar Fuentes [Sat, 12 Mar 2011 22:01:36 +0000 (22:01 +0000)]
Build LTO as a static library too.

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

13 years agoBuild LTO as a static library too.
Oscar Fuentes [Sat, 12 Mar 2011 17:32:30 +0000 (17:32 +0000)]
Build LTO as a static library too.

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

13 years agoTeach ComputeMaskedBits about sub nsw.
Benjamin Kramer [Sat, 12 Mar 2011 17:18:11 +0000 (17:18 +0000)]
Teach ComputeMaskedBits about sub nsw.

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

13 years agoWhe we build a shared library, add its list of used libraries to the
Oscar Fuentes [Sat, 12 Mar 2011 16:48:54 +0000 (16:48 +0000)]
Whe we build a shared library, add its list of used libraries to the
link command.

Fixed a pair of IF expressions too.

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

13 years agoUpdate link components for llvm-dis and LTO.
Oscar Fuentes [Sat, 12 Mar 2011 16:48:49 +0000 (16:48 +0000)]
Update link components for llvm-dis and LTO.

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

13 years agoSpeculatively revert commit 127478 (jsjodin) in an attempt to fix the
Duncan Sands [Sat, 12 Mar 2011 13:07:37 +0000 (13:07 +0000)]
Speculatively revert commit 127478 (jsjodin) in an attempt to fix the
llvm-gcc-i386-linux-selfhost and llvm-x86_64-linux-checks buildbots.
The original log entry:
Remove optimization emitting a reference insted of label difference, since
it can create more relocations. Removed isBaseAddressKnownZero method,
because it is no longer used.

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

13 years agoThis patch removes some of useless instructions generated by bitfield access.
Jin-Gu Kang [Sat, 12 Mar 2011 12:18:44 +0000 (12:18 +0000)]
This patch removes some of useless instructions generated by bitfield access.

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

13 years agoInclude snippets in the live stack interval.
Jakob Stoklund Olesen [Sat, 12 Mar 2011 04:25:36 +0000 (04:25 +0000)]
Include snippets in the live stack interval.

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

13 years agoSpill multiple registers at once.
Jakob Stoklund Olesen [Sat, 12 Mar 2011 04:17:20 +0000 (04:17 +0000)]
Spill multiple registers at once.

Live range splitting can create a number of small live ranges containing only a
single real use. Spill these small live ranges along with the large range they
are connected to with copies. This enables memory operand folding and maximizes
the spill to fill distance.

Work in progress with known bugs.

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

13 years agoFixed the comparison operator for the enhanced
Sean Callanan [Sat, 12 Mar 2011 03:27:54 +0000 (03:27 +0000)]
Fixed the comparison operator for the enhanced
disassembler's disassembler map.

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

13 years agoThat's it, I am declaring this a failure of the C++03 STL.
Jakob Stoklund Olesen [Sat, 12 Mar 2011 01:50:35 +0000 (01:50 +0000)]
That's it, I am declaring this a failure of the C++03 STL.

There are too many compatibility problems with using mixed types in
std::upper_bound, and I don't want to spend 110 lines of boilerplate setting up
a call to a 10-line function. Binary search is not /that/ hard to implement
correctly.

I tried terminating the binary search with a linear search, but that actually
made the algorithm slower against my expectation. Most live intervals have less
than 4 segments. The early test against endIndex() does pay, and this version is
25% faster than plain std::upper_bound().

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

13 years agoSaving files before committing is overrated.
Eric Christopher [Sat, 12 Mar 2011 01:36:23 +0000 (01:36 +0000)]
Saving files before committing is overrated.

Add a RUN line to this test.

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

13 years agoSometimes isPredicable lies to us and tells us we don't need the operands.
Eric Christopher [Sat, 12 Mar 2011 01:09:29 +0000 (01:09 +0000)]
Sometimes isPredicable lies to us and tells us we don't need the operands.
Go ahead and add them on when we might want to use them and let
later passes remove them.

Fixes rdar://9118569

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

13 years agoRemove no-longer-correct special case for disasm of ARM BL instructions.
Jim Grosbach [Sat, 12 Mar 2011 01:05:29 +0000 (01:05 +0000)]
Remove no-longer-correct special case for disasm of ARM BL instructions.

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

13 years agoAdd FIXME.
Jim Grosbach [Sat, 12 Mar 2011 00:51:00 +0000 (00:51 +0000)]
Add FIXME.

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

13 years agoPseudo-ize the ARM Darwin *r9 call instruction definitions. They're the same
Jim Grosbach [Sat, 12 Mar 2011 00:45:26 +0000 (00:45 +0000)]
Pseudo-ize the ARM Darwin *r9 call instruction definitions. They're the same
actual instruction as the non-Darwin defs, but have different call-clobber
semantics and so need separate patterns. They don't need to duplicate the
encoding information, however.

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

13 years agoAdd a FIXME.
Jim Grosbach [Fri, 11 Mar 2011 23:25:21 +0000 (23:25 +0000)]
Add a FIXME.

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

13 years agoPseudo-ize the ARM 'B' instruction.
Jim Grosbach [Fri, 11 Mar 2011 23:24:15 +0000 (23:24 +0000)]
Pseudo-ize the ARM 'B' instruction.

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

13 years agoRemove dead code. These ARM instruction definitions no longer exist.
Jim Grosbach [Fri, 11 Mar 2011 23:15:02 +0000 (23:15 +0000)]
Remove dead code. These ARM instruction definitions no longer exist.

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

13 years agoRemove dead code. These ARM instruction definitions no longer exist.
Jim Grosbach [Fri, 11 Mar 2011 23:11:41 +0000 (23:11 +0000)]
Remove dead code. These ARM instruction definitions no longer exist.

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

13 years agoPseudo-ize VMOVDcc and VMOVScc.
Jim Grosbach [Fri, 11 Mar 2011 23:09:50 +0000 (23:09 +0000)]
Pseudo-ize VMOVDcc and VMOVScc.

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

13 years ago80 columns
Jim Grosbach [Fri, 11 Mar 2011 23:00:16 +0000 (23:00 +0000)]
80 columns

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

13 years agoProperly pseudo-ize the ARM LDMIA_RET instruction. This has the nice side-
Jim Grosbach [Fri, 11 Mar 2011 22:51:41 +0000 (22:51 +0000)]
Properly pseudo-ize the ARM LDMIA_RET instruction. This has the nice side-
effect that we get proper instruction printing using the "pop" mnemonic for it.

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

13 years agoRoll r127459 back in:
Cameron Zwarich [Fri, 11 Mar 2011 21:52:04 +0000 (21:52 +0000)]
Roll r127459 back in:

Optimize trivial branches in CodeGenPrepare, which often get created from the
lowering of objectsize intrinsics. Unfortunately, a number of tests were relying
on llc not optimizing trivial branches, so I had to add an option to allow them
to continue to test what they originally tested.

This fixes <rdar://problem/8785296> and <rdar://problem/9112893>.

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

13 years agoFix the GCC test suite issue exposed by r127477, which was caused by stack
Cameron Zwarich [Fri, 11 Mar 2011 21:51:56 +0000 (21:51 +0000)]
Fix the GCC test suite issue exposed by r127477, which was caused by stack
protector insertion not working correctly with unreachable code. Since that
revision was rolled out, this test doesn't actual fail before this fix.

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

13 years agoTeach FastISel to support register-immediate-immediate instructions.
Owen Anderson [Fri, 11 Mar 2011 21:33:55 +0000 (21:33 +0000)]
Teach FastISel to support register-immediate-immediate instructions.

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

13 years ago80 columns.
Jim Grosbach [Fri, 11 Mar 2011 21:02:27 +0000 (21:02 +0000)]
80 columns.

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

13 years agoTrailing whitespace.
Jim Grosbach [Fri, 11 Mar 2011 20:59:19 +0000 (20:59 +0000)]
Trailing whitespace.

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

13 years agoRemove dead code. These ARM instruction definitions don't exist.
Jim Grosbach [Fri, 11 Mar 2011 20:51:07 +0000 (20:51 +0000)]
Remove dead code. These ARM instruction definitions don't exist.

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

13 years agoARM VDUPfd and VDUPfq can just be patterns. The instruction is the same
Jim Grosbach [Fri, 11 Mar 2011 20:44:08 +0000 (20:44 +0000)]
ARM VDUPfd and VDUPfq can just be patterns. The instruction is the same
as for VDUP32d and VDUP32q, respectively.

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

13 years agoRemove dead code. These ARM instruction definitions don't exist.
Jim Grosbach [Fri, 11 Mar 2011 20:38:18 +0000 (20:38 +0000)]
Remove dead code. These ARM instruction definitions don't exist.

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

13 years agoARM VDUPLNfq and VDUPLNfd definitions can just be Pat<>s for VDUPLN32q
Jim Grosbach [Fri, 11 Mar 2011 20:31:17 +0000 (20:31 +0000)]
ARM VDUPLNfq and VDUPLNfd definitions can just be Pat<>s for VDUPLN32q
and VDUPLN32d, respectively.

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

13 years agoARM VREV64df and VREV64qf can just be patterns. The instruction is the same
Jim Grosbach [Fri, 11 Mar 2011 20:18:05 +0000 (20:18 +0000)]
ARM VREV64df and VREV64qf can just be patterns. The instruction is the same
as for VREV64d32 and VREV64q32, respectively.

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

13 years agoThis FIXME has been fixed.
Jim Grosbach [Fri, 11 Mar 2011 20:07:37 +0000 (20:07 +0000)]
This FIXME has been fixed.

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

13 years agoProperly pseudo-ize ARM MVNCCi.
Jim Grosbach [Fri, 11 Mar 2011 19:55:55 +0000 (19:55 +0000)]
Properly pseudo-ize ARM MVNCCi.

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

13 years agoAdd missing 'return on failure'. Previously we'd crash after emitting
Jim Grosbach [Fri, 11 Mar 2011 19:52:52 +0000 (19:52 +0000)]
Add missing 'return on failure'. Previously we'd crash after emitting
the diagnostic.

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

13 years agoRemove optimization emitting a reference insted of label difference, since it can...
Jan Sjödin [Fri, 11 Mar 2011 19:37:02 +0000 (19:37 +0000)]
Remove optimization emitting a reference insted of label difference, since it can create more relocations. Removed isBaseAddressKnownZero method, because it is no longer used.

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

13 years agoRevert r127459, "Optimize trivial branches in CodeGenPrepare, which often get
Daniel Dunbar [Fri, 11 Mar 2011 19:30:30 +0000 (19:30 +0000)]
Revert r127459, "Optimize trivial branches in CodeGenPrepare, which often get
created from the", it broke some GCC test suite tests.

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

13 years agoForce re-linking of LLVMgold.so when its exports file changes.
Oscar Fuentes [Fri, 11 Mar 2011 18:27:13 +0000 (18:27 +0000)]
Force re-linking of LLVMgold.so when its exports file changes.

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

13 years agoFix processing of gold.exports.
Oscar Fuentes [Fri, 11 Mar 2011 18:07:46 +0000 (18:07 +0000)]
Fix processing of gold.exports.

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

13 years agoWhile printing annotations, print line number and variable name if debug info is...
Devang Patel [Fri, 11 Mar 2011 18:07:33 +0000 (18:07 +0000)]
While printing annotations, print line number and variable name if debug info is present.

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

13 years agoFix MOVCCi32imm to be have ARM-mode Requires and a proper size (8 bytes, was 4).
Jim Grosbach [Fri, 11 Mar 2011 18:00:42 +0000 (18:00 +0000)]
Fix MOVCCi32imm to be have ARM-mode Requires and a proper size (8 bytes, was 4).

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

13 years agoReplace -dag-chain-limit flag with constant. It has survived a release cycle without...
Andrew Trick [Fri, 11 Mar 2011 17:46:59 +0000 (17:46 +0000)]
Replace -dag-chain-limit flag with constant. It has survived a release cycle without being touched, so no longer needs to pollute the hidden-help text.

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

13 years agoAdd LTO and gold plugin to the CMake build. Linux-only, support for
Oscar Fuentes [Fri, 11 Mar 2011 15:44:24 +0000 (15:44 +0000)]
Add LTO and gold plugin to the CMake build. Linux-only, support for
other systems pending.

PR9456.

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

13 years agoComputeMaskedBits: sub falls through to add, and sub doesn't have the same overflow...
Benjamin Kramer [Fri, 11 Mar 2011 14:46:49 +0000 (14:46 +0000)]
ComputeMaskedBits: sub falls through to add, and sub doesn't have the same overflow semantics as add.

Should fix the selfhost failures that started with r127463.

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

13 years agoInstCombine: Fix a thinko where transform an icmp under the assumption that it's...
Benjamin Kramer [Fri, 11 Mar 2011 11:37:40 +0000 (11:37 +0000)]
InstCombine: Fix a thinko where transform an icmp under the assumption that it's a zero comparison when it's not.

Fixes PR9454.

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

13 years agoTeach ComputeMaskedBits about nsw on add. I don't think there's anything we can
Nick Lewycky [Fri, 11 Mar 2011 09:00:19 +0000 (09:00 +0000)]
Teach ComputeMaskedBits about nsw on add. I don't think there's anything we can
do with nuw here, but sub and mul should be given similar treatment.
Fixes PR9343 #15!

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

13 years agoFix use of CompEnd predicate to be standards conforming
John Wiegley [Fri, 11 Mar 2011 08:54:34 +0000 (08:54 +0000)]
Fix use of CompEnd predicate to be standards conforming

The existing CompEnd predicate does not define a strict weak order as required
by the C++03 standard; therefore, its use as a predicate to std::upper_bound
is invalid. For a discussion of this issue, see
http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#270

This patch replaces the asymmetrical comparison with an iterator adaptor that
achieves the same effect while being strictly standard-conforming by ensuring
an apples-to-apples comparison.

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

13 years agoOptimize trivial branches in CodeGenPrepare, which often get created from the
Cameron Zwarich [Fri, 11 Mar 2011 04:54:27 +0000 (04:54 +0000)]
Optimize trivial branches in CodeGenPrepare, which often get created from the
lowering of objectsize intrinsics. Unfortunately, a number of tests were relying
on llc not optimizing trivial branches, so I had to add an option to allow them
to continue to test what they originally tested.

This fixes <rdar://problem/8785296> and <rdar://problem/9112893>.

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

13 years agoTeach TableGen to pre-calculate register enum values when creating the
Jim Grosbach [Fri, 11 Mar 2011 02:19:02 +0000 (02:19 +0000)]
Teach TableGen to pre-calculate register enum values when creating the
CodeGenRegister entries. Use this information to more intelligently build
the literal register entires in the DAGISel matcher table. Specifically,
use a single-byte OPC_EmitRegister entry for registers with a value of
less than 256 and OPC_EmitRegister2 entry for registers with a larger value.

rdar://9066491

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

13 years agosilence a conditional assignment -Wuninitialized warning.
Chris Lattner [Fri, 11 Mar 2011 02:12:51 +0000 (02:12 +0000)]
silence a conditional assignment -Wuninitialized warning.

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

13 years agoMake the register enum value part of the CodeGenRegister struct.
Jim Grosbach [Fri, 11 Mar 2011 01:33:54 +0000 (01:33 +0000)]
Make the register enum value part of the CodeGenRegister struct.

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

13 years agoTrailing whitespace.
Jim Grosbach [Fri, 11 Mar 2011 01:27:24 +0000 (01:27 +0000)]
Trailing whitespace.

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

13 years agoTrailing whitespace.
Jim Grosbach [Fri, 11 Mar 2011 01:19:05 +0000 (01:19 +0000)]
Trailing whitespace.

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

13 years agoTidy up since ARM MOVCCi and MOVCCi16 are now pseudos.
Jim Grosbach [Fri, 11 Mar 2011 01:16:49 +0000 (01:16 +0000)]
Tidy up since ARM MOVCCi and MOVCCi16 are now pseudos.

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

13 years agoProperly pseudo-ize ARM MOVCCi and MOVCCi16.
Jim Grosbach [Fri, 11 Mar 2011 01:09:28 +0000 (01:09 +0000)]
Properly pseudo-ize ARM MOVCCi and MOVCCi16.

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

13 years agoChange the x86 32-bit scheduler to register pressure and fix up the
Eric Christopher [Fri, 11 Mar 2011 01:05:58 +0000 (01:05 +0000)]
Change the x86 32-bit scheduler to register pressure and fix up the
corresponding testcases back to the previous versions.

Fixes some performance regressions only seen on 32-bit.

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

13 years agoAvoid replacing the value of a directly stored load with the stored value if the...
Evan Cheng [Fri, 11 Mar 2011 00:48:56 +0000 (00:48 +0000)]
Avoid replacing the value of a directly stored load with the stored value if the load is indexed. rdar://9117613.

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

13 years agoProperly pseudo-ize MOVCCr and MOVCCs.
Jim Grosbach [Thu, 10 Mar 2011 23:56:09 +0000 (23:56 +0000)]
Properly pseudo-ize MOVCCr and MOVCCs.

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

13 years agoRecursivelyDeleteTriviallyDeadInstructions only needs a
Dan Gohman [Thu, 10 Mar 2011 20:57:44 +0000 (20:57 +0000)]
RecursivelyDeleteTriviallyDeadInstructions only needs a
Value, not an Instruction, so casting is not necessary. Also,
it's theoretically possible that the Value is not an
Instruction, since WeakVH follows RAUWs.

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

13 years agoDon't compute the file size if we don't need to.
Rafael Espindola [Thu, 10 Mar 2011 20:54:07 +0000 (20:54 +0000)]
Don't compute the file size if we don't need to.

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

13 years agoFix reassociate to postpone certain instruction deletions until
Dan Gohman [Thu, 10 Mar 2011 19:51:54 +0000 (19:51 +0000)]
Fix reassociate to postpone certain instruction deletions until
after it has finished all of its reassociations, because its
habit of unlinking operands and holding them in a datastructure
while working means that it's not easy to determine when an
instruction is really dead until after all its regular work is
done. rdar://9096268.

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

13 years agoDMB can just be a pat referencing MCR.
Jim Grosbach [Thu, 10 Mar 2011 19:27:17 +0000 (19:27 +0000)]
DMB can just be a pat referencing MCR.

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

13 years agoReorganize a bit. No functional change, just moving patterns up.
Jim Grosbach [Thu, 10 Mar 2011 19:21:08 +0000 (19:21 +0000)]
Reorganize a bit. No functional change, just moving patterns up.

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

13 years agoPseudo-instructions are codegenonly by definition.
Jim Grosbach [Thu, 10 Mar 2011 19:06:39 +0000 (19:06 +0000)]
Pseudo-instructions are codegenonly by definition.

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

13 years agoMemory barrier instructions don't need special handling in tblgen anymore.
Jim Grosbach [Thu, 10 Mar 2011 19:05:48 +0000 (19:05 +0000)]
Memory barrier instructions don't need special handling in tblgen anymore.

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

13 years agoInstCombine: Turn umul_with_overflow into mul nuw if we can prove that it cannot...
Benjamin Kramer [Thu, 10 Mar 2011 18:40:14 +0000 (18:40 +0000)]
InstCombine: Turn umul_with_overflow into mul nuw if we can prove that it cannot overflow.

This happens a lot in clang-compiled C++ code because it adds overflow checks to operator new[]:
  unsigned *foo(unsigned n) { return new unsigned[n]; }
We can optimize away the overflow check on 64 bit targets because (uint64_t)n*4 cannot overflow.

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

13 years agoAdd r127409 back now that the windows file was updated.
Rafael Espindola [Thu, 10 Mar 2011 18:33:29 +0000 (18:33 +0000)]
Add r127409 back now that the windows file was updated.

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

13 years agoTry to fix the windows build.
Rafael Espindola [Thu, 10 Mar 2011 18:30:48 +0000 (18:30 +0000)]
Try to fix the windows build.

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

13 years agoRevert r127409 which broke all the Windows bots.
Jakob Stoklund Olesen [Thu, 10 Mar 2011 18:01:43 +0000 (18:01 +0000)]
Revert r127409 which broke all the Windows bots.

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

13 years agoPTX: Add preliminary support for floating-point divide and multiply-and-add
Justin Holewinski [Thu, 10 Mar 2011 16:57:18 +0000 (16:57 +0000)]
PTX: Add preliminary support for floating-point divide and multiply-and-add

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

13 years agoAdd support for MemoryBuffers that are not null terminated and add
Rafael Espindola [Thu, 10 Mar 2011 16:10:30 +0000 (16:10 +0000)]
Add support for MemoryBuffers that are not null terminated and add
support for creating buffers that cover only a part of a file.

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

13 years agorip out llvm 2.8 release notes to make room for llvm 2.9 notes.
Chris Lattner [Thu, 10 Mar 2011 07:43:44 +0000 (07:43 +0000)]
rip out llvm 2.8 release notes to make room for llvm 2.9 notes.

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

13 years agoAdd an option to disable critical edge splitting in PHIElimination.
Cameron Zwarich [Thu, 10 Mar 2011 05:59:17 +0000 (05:59 +0000)]
Add an option to disable critical edge splitting in PHIElimination.

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

13 years agoptx: add the rest of special registers of ISA version 2.0
Che-Liang Chiou [Thu, 10 Mar 2011 04:05:57 +0000 (04:05 +0000)]
ptx: add the rest of special registers of ISA version 2.0

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

13 years agoChange the Spiller interface to take a LiveRangeEdit reference.
Jakob Stoklund Olesen [Thu, 10 Mar 2011 01:51:42 +0000 (01:51 +0000)]
Change the Spiller interface to take a LiveRangeEdit reference.

This makes it possible to register delegates and get callbacks when the spiller
edits live ranges.

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

13 years agoMake SpillIs an optional pointer. Avoid creating a bunch of temporary SmallVectors.
Jakob Stoklund Olesen [Thu, 10 Mar 2011 01:21:58 +0000 (01:21 +0000)]
Make SpillIs an optional pointer. Avoid creating a bunch of temporary SmallVectors.

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

13 years agoUnbreak the CMake build.
Francois Pichet [Thu, 10 Mar 2011 00:51:01 +0000 (00:51 +0000)]
Unbreak the CMake build.

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

13 years agoRevert 127359; it broke lencod.
Stuart Hastings [Thu, 10 Mar 2011 00:25:53 +0000 (00:25 +0000)]
Revert 127359; it broke lencod.

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

13 years agoIntroduce DebugInfoProbe. This is used to monitor how llvm optimizer is treating...
Devang Patel [Thu, 10 Mar 2011 00:21:25 +0000 (00:21 +0000)]
Introduce DebugInfoProbe. This is used to monitor how llvm optimizer is treating debugging information.
It generates output that lools like

8 times line number info lost by Scalar Replacement of Aggregates (SSAUp)
1 times line number info lost by Simplify well-known library calls
12 times variable info lost by Jump Threading

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

13 years agoRe-commit 127368 and 127371. They are exonerated.
Evan Cheng [Thu, 10 Mar 2011 00:16:32 +0000 (00:16 +0000)]
Re-commit 127368 and 127371. They are exonerated.

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

13 years agoRevert 127368 and 127371 for now.
Evan Cheng [Wed, 9 Mar 2011 23:53:17 +0000 (23:53 +0000)]
Revert 127368 and 127371 for now.

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

13 years agoRestore the default implementation of getCrossCopyRegClass: no need for cross-regclas...
Evan Cheng [Wed, 9 Mar 2011 23:15:40 +0000 (23:15 +0000)]
Restore the default implementation of getCrossCopyRegClass: no need for cross-regclass copies.

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

13 years agoRevert "Re-enable test and hope to silence the buildbots", still broken.
Daniel Dunbar [Wed, 9 Mar 2011 22:48:46 +0000 (22:48 +0000)]
Revert "Re-enable test and hope to silence the buildbots", still broken.

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

13 years agoChange the definition of TargetRegisterInfo::getCrossCopyRegClass to be more
Evan Cheng [Wed, 9 Mar 2011 22:47:38 +0000 (22:47 +0000)]
Change the definition of TargetRegisterInfo::getCrossCopyRegClass to be more
flexible.

If it returns a register class that's different from the input, then that's the
register class used for cross-register class copies.
If it returns a register class that's the same as the input, then no cross-
register class copies are needed (normal copies would do).
If it returns null, then it's not at all possible to copy registers of the
specified register class.

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

13 years agoFix mistyped CHECK lines.
Benjamin Kramer [Wed, 9 Mar 2011 22:07:31 +0000 (22:07 +0000)]
Fix mistyped CHECK lines.

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

13 years agoFix a pasto that broke all x86_64-elf targets.
Benjamin Kramer [Wed, 9 Mar 2011 22:07:13 +0000 (22:07 +0000)]
Fix a pasto that broke all x86_64-elf targets.

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

13 years agoTweak test to work on Linux.
Stuart Hastings [Wed, 9 Mar 2011 21:35:10 +0000 (21:35 +0000)]
Tweak test to work on Linux.

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

13 years agoDisable this test temporarily to reduce BuildBot complaints.
Stuart Hastings [Wed, 9 Mar 2011 21:33:47 +0000 (21:33 +0000)]
Disable this test temporarily to reduce BuildBot complaints.

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

13 years agoPreserve line number information while simplifying libcalls.
Devang Patel [Wed, 9 Mar 2011 21:27:52 +0000 (21:27 +0000)]
Preserve line number information while simplifying libcalls.

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

13 years agoX86 byval copies no longer always_inline. <rdar://problem/8706628>
Stuart Hastings [Wed, 9 Mar 2011 21:10:30 +0000 (21:10 +0000)]
X86 byval copies no longer always_inline.  <rdar://problem/8706628>

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

13 years agoAdd a testcase for the addc improvements introduced some commits ago. Patch by Akira...
Bruno Cardoso Lopes [Wed, 9 Mar 2011 21:05:32 +0000 (21:05 +0000)]
Add a testcase for the addc improvements introduced some commits ago. Patch by Akira Hatanaka

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

13 years agoRe-enable test and hope to silence the buildbots
Bruno Cardoso Lopes [Wed, 9 Mar 2011 21:00:16 +0000 (21:00 +0000)]
Re-enable test and hope to silence the buildbots

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

13 years agotry to make o32 cc tests less specific to silence some buildbots. The test isn't...
Bruno Cardoso Lopes [Wed, 9 Mar 2011 20:59:05 +0000 (20:59 +0000)]
try to make o32 cc tests less specific to silence some buildbots. The test isn't enabled yet, this is will be done in a subsequent commit. Patch by Akira Hatanaka.

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

13 years agoLLVM combines the offset mode of A8.6.199 A1 & A2 into STRBT.
Johnny Chen [Wed, 9 Mar 2011 20:01:14 +0000 (20:01 +0000)]
LLVM combines the offset mode of A8.6.199 A1 & A2 into STRBT.
The insufficient encoding information of the combined instruction confuses the decoder wrt
UQADD16.  Add extra logic to recover from that.

Fixed an assert reported by Sean Callanan

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

13 years agoMake these options hidden to reduce the amount of text -help puts on the
Eric Christopher [Wed, 9 Mar 2011 19:46:51 +0000 (19:46 +0000)]
Make these options hidden to reduce the amount of text -help puts on the
command line, they'll still be seen with -help-hidden.

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

13 years agoThese llvm.dbg.* constants are not used anymore.
Devang Patel [Wed, 9 Mar 2011 19:41:33 +0000 (19:41 +0000)]
These llvm.dbg.* constants are not used anymore.

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

13 years agoMake physreg coalescing independent on the number of uses of the virtual register.
Jakob Stoklund Olesen [Wed, 9 Mar 2011 19:27:06 +0000 (19:27 +0000)]
Make physreg coalescing independent on the number of uses of the virtual register.

The damage done by physreg coalescing only depends on the number of instructions
the extended physreg live range covers. This fixes PR9438.

The heuristic is still luck-based, and physreg coalescing really should be
disabled completely. We need a register allocator with better hinting support
before that is possible.

Convert a test to FileCheck and force spilling by inserting an extra call. The
previous spilling behavior was dependent on misguided physreg coalescing
decisions.

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