Jin-Gu Kang [Sun, 13 Mar 2011 14:05:51 +0000 (14:05 +0000)]
Add comment as following:
load and store reference same memory location, the memory location
is represented by getelementptr with two uses (load and store) and
the getelementptr's base is alloca with single use. At this point,
instructions from alloca to store can be removed.
(this pattern is generated when bitfield is accessed.)
For example,
%u = alloca %struct.test, align 4 ; [#uses=1]
%0 = getelementptr inbounds %struct.test* %u, i32 0, i32 0;[#uses=2]
%1 = load i8* %0, align 4 ; [#uses=1]
%2 = and i8 %1, -16 ; [#uses=1]
%3 = or i8 %2, 5 ; [#uses=1]
store i8 %3, i8* %0, align 4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127565
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Sun, 13 Mar 2011 03:06:59 +0000 (03:06 +0000)]
LTO is not ready for Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127562
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 13 Mar 2011 01:29:32 +0000 (01:29 +0000)]
Now that we are deleting unused live intervals during allocation, pointers may be reused.
Use the virtual register number as a cache tag instead. They are not reused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127561
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 13 Mar 2011 01:23:11 +0000 (01:23 +0000)]
Tell the register allocator about new unused virtual registers.
This allows the allocator to free any resources used by the virtual register,
including physical register assignments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127560
91177308-0d34-0410-b5e6-
96231b3b80d8
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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