Stuart Hastings [Wed, 1 Jun 2011 17:17:45 +0000 (17:17 +0000)]
Add support for x86 CMPEQSS and friends. These instructions do a
floating-point comparison, generate a mask of 0s or 1s, and generally
DTRT with NaNs. Only profitable when the user wants a materialized 0
or 1 at runtime. rdar://problem/
5993888
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132404
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Wed, 1 Jun 2011 16:42:47 +0000 (16:42 +0000)]
Reapply 132348 with fixes. rdar://problem/
6501862
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132402
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Wed, 1 Jun 2011 16:13:09 +0000 (16:13 +0000)]
A forthcoming SSE patch will break this test; since the test is also
valid for x87, re-target to x87. rdar://problem/
5993888
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132401
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Wed, 1 Jun 2011 15:50:29 +0000 (15:50 +0000)]
Test case for 132396. rdar://problem/
5660695
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132399
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 1 Jun 2011 15:32:10 +0000 (15:32 +0000)]
Fix PR10059 and future variations by handling all register subclasses.
Add TargetRegisterInfo::hasSubClassEq and use it to check for compatible
register classes instead of trying to list all register classes in
X86's getLoadStoreRegOpcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132398
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Wed, 1 Jun 2011 14:04:17 +0000 (14:04 +0000)]
Turn on FGETSIGN for x86. Followup to 132388. rdar://problem/
5660695
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132396
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Wed, 1 Jun 2011 13:10:15 +0000 (13:10 +0000)]
Add new -d option to tblgen. It writes a make(1)-style dependency file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132395
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 1 Jun 2011 12:51:46 +0000 (12:51 +0000)]
This patch is another step in the direction of adding vector select. In this
patch we add a flag to enable a new type legalization decision - to promote
integer elements in vectors. Currently, the rest of the codegen does not support
this kind of legalization. This flag will be removed when the transition is
complete.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132394
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Wed, 1 Jun 2011 04:39:42 +0000 (04:39 +0000)]
FGETSIGN support for x86, using movmskps/pd. Will be enabled with a
patch to TargetLowering.cpp. rdar://problem/
5660695
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132388
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 1 Jun 2011 03:27:56 +0000 (03:27 +0000)]
Add an issue width check to the postRA scheduler. Patch by Max Kazakov!
For targets with no itinerary (x86) it is a nop by default. For
targets with issue width already expressed in the itinerary (ARM) it
bypasses a scoreboard check but otherwise does not affect the
schedule. It does make the code more consistent and complete and
allows new targets to specify their issue width in an arbitrary way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132385
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 1 Jun 2011 02:17:11 +0000 (02:17 +0000)]
First, do no harm -- even if we can't find a selector for an enclosing
landing pad, forward llvm.eh.resume calls to it instead of turning them
invalidly into invokes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132382
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 1 Jun 2011 01:49:35 +0000 (01:49 +0000)]
The ARM stuff already calls the Resume function, not the Resume_or_Rethrow. It
turns out that it could cause an infinite loop in some situations. If this code
is triggered and it converts a cleanup into a catchall, but that cleanup was in
already in a cleanup, then the _Unwind_SjLj_Resume could infinite loop. I.e.,
the code doesn't consume the exception object and passes it on to
_Unwind_SjLj_Resume. But _USjLjR expects it to be consumed (since it's landing
at a catchall instead of a cleanup). So it uses the values that are presently
there, which are the values that tell it to jump to the fake landing pad.
<rdar://problem/
9508402>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132381
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 1 Jun 2011 00:23:24 +0000 (00:23 +0000)]
Incomplete type may not have corresponding DIE, so do not check DIEEntry eagerly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132377
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 31 May 2011 23:30:30 +0000 (23:30 +0000)]
Refactor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132373
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 31 May 2011 22:56:51 +0000 (22:56 +0000)]
Include global types, that are referenced through local variables, in debug_pubtypes list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132371
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 31 May 2011 21:54:28 +0000 (21:54 +0000)]
Ignore Vim swap files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132365
91177308-0d34-0410-b5e6-
96231b3b80d8
Galina Kistanova [Tue, 31 May 2011 21:50:33 +0000 (21:50 +0000)]
Reverted r132135 per Xerxes request. These tests are passing for his setup. Requires more research.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132364
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 31 May 2011 21:17:47 +0000 (21:17 +0000)]
scev: Better sign-extend removal. Normalize postincrement recurrences
so that their sign extended forms are congruent when no overflow occurs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132360
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 31 May 2011 21:02:44 +0000 (21:02 +0000)]
Simplify the eviction policy by making the failsafe explicit.
When assigned ranges are evicted, they are put in the RS_Evicted stage and are
not allowed to evict anything else. That prevents looping automatically.
When evicting ranges just to get a cheaper register, use only spill weights to
find the possible candidates. Avoid breaking hints for this purpose, it is not
worth it.
Start implementing more complex eviction heuristics, guarded by the temporary
-complex-eviction flag. The initial version permits a heavier range to be
evicted if it doesn't have any uses where the evicting range is live. This makes
it a good candidate for live ranfge splitting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132358
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 31 May 2011 20:40:16 +0000 (20:40 +0000)]
llvm.memcpy.* has two distinct associated address spaces; the source address space, and the destination address space. Fix up the interface on MemIntrinsic and MemTransferInst to make this clear, and fix InstructionDereferencesPointer in LazyValueInfo.cpp to use the interface properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132356
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 31 May 2011 20:25:26 +0000 (20:25 +0000)]
Fix uninitialized variables and silence warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132355
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 31 May 2011 20:12:07 +0000 (20:12 +0000)]
Add a minor missing -verify check. Found by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132353
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 31 May 2011 20:00:45 +0000 (20:00 +0000)]
Also remove -lLTO which should have been in r132349. I failed to apply this
from David Meyer's patch!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132352
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Tue, 31 May 2011 19:56:35 +0000 (19:56 +0000)]
Revert to pacify a buildbot. rdar://problem/
6501862
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132351
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 31 May 2011 19:53:26 +0000 (19:53 +0000)]
Make the gold plugin build on Cygwin as well as Linux. Patch by David Meyer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132349
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Tue, 31 May 2011 19:29:55 +0000 (19:29 +0000)]
Followup to 132316; accept arbitrary constants, add with a constant,
sub with a non-constant. Fix comments, enlarge test case.
rdar://problem/
6501862
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132348
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 31 May 2011 18:06:14 +0000 (18:06 +0000)]
Fix html formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132345
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 31 May 2011 17:45:27 +0000 (17:45 +0000)]
Clarify documentation and remove guarantees that are not fulfilled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132344
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Tue, 31 May 2011 16:30:33 +0000 (16:30 +0000)]
Fix 80 column violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132341
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Tue, 31 May 2011 16:24:49 +0000 (16:24 +0000)]
Add XCore intrinsic for crc8.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132340
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Tue, 31 May 2011 14:47:36 +0000 (14:47 +0000)]
Add XCore intrinsic for crc32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132336
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Tue, 31 May 2011 14:00:05 +0000 (14:00 +0000)]
Convert test to FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132335
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 31 May 2011 03:53:41 +0000 (03:53 +0000)]
Introduce PackedVector, useful for storing a vector of values using a specific number of bits for each
value. Both signed and unsigned types can be used, e.g
PackedVector<signed, 2> vec;
will create a vector accepting values -2, -1, 0, 1. Any other value will hit an assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132325
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 31 May 2011 03:33:27 +0000 (03:33 +0000)]
Fix ssat and ssat16 encodings for ARM and Thumb. The bit position value
must be encoded decremented by one. Only add encoding tests for ssat16
because ssat can't be parsed yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132324
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 31 May 2011 02:54:07 +0000 (02:54 +0000)]
This patch implements atomic intrinsics atomic.load.add (sub,and,or,xor,
nand), atomic.swap and atomic.cmp.swap, all in i8, i16 and i32 versions.
The intrinsics are implemented by creating pseudo-instructions, which are
then expanded in the method MipsTargetLowering::EmitInstrWithCustomInserter.
Patch by Sasa Stankovic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132323
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 31 May 2011 02:53:58 +0000 (02:53 +0000)]
This patch implements the thread local storage. Implemented are General
Dynamic, Initial Exec and Local Exec TLS models.
Patch by Sasa Stankovic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132322
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 30 May 2011 20:20:15 +0000 (20:20 +0000)]
Use the dwarf->llvm mapping to print register names in the cfi
directives.
Fixes PR9826.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132317
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Mon, 30 May 2011 20:00:33 +0000 (20:00 +0000)]
(1 - X) * (-2) -> (x - 1) * 2, for all positive nonzero powers of 2
rdar://problem/
6501862
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132316
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 30 May 2011 18:24:44 +0000 (18:24 +0000)]
Split ppc dwarf regnums into ppc64 and ppc32 flavours.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132315
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 30 May 2011 17:49:59 +0000 (17:49 +0000)]
Introduce the DwarfRegAlias class for declaring that two registers have the
same dwarf number. This will be used for creating a dwarf number to register
mapping.
The only case that needs this so far is the XMM/YMM registers that unfortunately
do have the same numbers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132314
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 30 May 2011 16:04:54 +0000 (16:04 +0000)]
Mark the 32 bit registers as invalid in 64 bit mode. In 64 bit mode they are
subregisters of the 64 bit ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132313
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 30 May 2011 15:56:04 +0000 (15:56 +0000)]
Remove the DwarfNumbers from the subregisters. They should use DW_OP_bit_piece
and for now the generic dwarf emission will automatically use the superregister
numbers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132312
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 30 May 2011 03:36:58 +0000 (03:36 +0000)]
replace the intro tutorial from 2004 with a more recent work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132310
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 30 May 2011 01:33:26 +0000 (01:33 +0000)]
Reapply r132245 with a fix for the bug that broke the darwin9/i386 build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132309
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Mon, 30 May 2011 01:08:04 +0000 (01:08 +0000)]
Add the test case for phis in the outer landing pad during the inliner's
forwarding of eh.resume that I promised yesterday.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132307
91177308-0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Mon, 30 May 2011 00:13:34 +0000 (00:13 +0000)]
Emit the handler's data area. For GCC-style exceptions under Win64, the
handler's data area starts with a 4-byte reference to the personality
function, followed by the DWARF LSDA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132302
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 29 May 2011 21:24:39 +0000 (21:24 +0000)]
Revert r132245, "Create two BlockInfo entries when a live range is discontinuous through a block."
This commit seems to have broken a darwin 9 tester.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132299
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 29 May 2011 20:10:28 +0000 (20:10 +0000)]
Fix PR10046 by updating LiveVariables kill info when splitting live ranges.
This only affects targets like Mips where branch instructions may kill virtual
registers. Most other targets branch on flag values, so virtual registers are
not involved.
The problem is that MachineBasicBlock::updateTerminator deletes branches and
inserts new ones while LiveVariables keeps a list of pointers to instructions
that kill virtual registers. That list wasn't properly updated in
MBB::SplitCriticalEdge.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132298
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Sun, 29 May 2011 19:50:32 +0000 (19:50 +0000)]
On Darwin ARM, set the UNWIND_RESUME libcall to _Unwind_SjLj_Resume.
This is important for the correct lowering of unwind instructions
(which doesn't matter at all) and llvm.eh.resume calls (which does).
Take 2, now with more basic competence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132295
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Sun, 29 May 2011 19:44:55 +0000 (19:44 +0000)]
...this is not a good commit day for me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132294
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Sun, 29 May 2011 19:41:56 +0000 (19:41 +0000)]
I didn't mean to commit these residues of a personal project.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132293
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 29 May 2011 19:41:14 +0000 (19:41 +0000)]
Add testcase for r132290, to check for the crasher caught by the buildbots
doing llvm-gcc selfhost (or cross).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132292
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Sun, 29 May 2011 19:39:04 +0000 (19:39 +0000)]
On Darwin ARM, set the UNWIND_RESUME libcall to _Unwind_SjLj_Resume.
This is important for the correct lowering of unwind instructions
(which doesn't matter at all) and llvm.eh.resume calls (which does).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132291
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 29 May 2011 19:33:36 +0000 (19:33 +0000)]
Don't crash owhen ComputeLoadResult can't compute the result of the load.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132290
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 29 May 2011 18:41:56 +0000 (18:41 +0000)]
Obey the isVolatile bit on memory intrinsics when analyzing uses of a global
variable. Noticed by inspection.
Simulate memset in EvaluateFunction where the target of the memset and the
value we're setting are both the null value. Fixes PR10047!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132288
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 29 May 2011 08:10:47 +0000 (08:10 +0000)]
Fix warnings due to 132263; Thanks rdivacky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132285
91177308-0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Sun, 29 May 2011 04:28:35 +0000 (04:28 +0000)]
When generating against the Win64 EH scheme, set the handler to the GCC-specific
handler.
At this moment, only GCC-style exceptions are supported. Other kinds
of exceptions, including "traditional" SEH and Microsoft Visual C++ exceptions,
need more work--and an compiler exception model that isn't specific to
GCC-style exceptions!
In particular, I imagine that it would be possible to mix "traditional" SEH
with GCC-style EH or Microsoft C++ EH. Currently LLVM has no way (beyond some
target-specific defaults and whole-module compiler switches) of knowing which
scheme to use when.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132283
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 29 May 2011 04:04:50 +0000 (04:04 +0000)]
Use %rbp on a 64 bit test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132279
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 29 May 2011 03:58:16 +0000 (03:58 +0000)]
Fix to match the dwarf register numbers that gdb uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132278
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 29 May 2011 03:17:01 +0000 (03:17 +0000)]
Dwarf register 0 is r0, remove incorrect entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132276
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Sun, 29 May 2011 03:01:09 +0000 (03:01 +0000)]
Fix this to work correctly with phis; test case to follow if this successfully
fixes self-host.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132275
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 29 May 2011 02:21:01 +0000 (02:21 +0000)]
Remove the dwarf numbers from the D registers. They don't have dwarf numbers
and should probably be encoded as
DW_OP_reg 32 DW_OP_piece 4 DW_OP_reg 33
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132274
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Sat, 28 May 2011 20:34:49 +0000 (20:34 +0000)]
Fix ARM fast isel to correctly flag memory operands to stores. This fixes
-verify-machineinstrs failures on several tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132268
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sat, 28 May 2011 17:57:14 +0000 (17:57 +0000)]
Refactor the type legalizer. Switch TargetLowering to a new enum - LegalizeTypeAction.
This patch does not change the behavior of the type legalizer. The codegen
produces the same code.
This infrastructural change is needed in order to enable complex decisions
for vector types (needed by the vector-select patch).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132263
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 28 May 2011 11:48:37 +0000 (11:48 +0000)]
Erase instructions _after_ checking their type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132256
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 28 May 2011 11:01:30 +0000 (11:01 +0000)]
Move ARM specific test into the ARM subdir.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132255
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 28 May 2011 10:16:58 +0000 (10:16 +0000)]
ConstantFoldInstOperands doesn't like compares, hand it off to instsimplify instead.
Fixes PR10040.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132254
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 28 May 2011 07:45:59 +0000 (07:45 +0000)]
Implement and document the llvm.eh.resume intrinsic, which is
transformed by the inliner into a branch to the enclosing landing pad
(when inlined through an invoke). If not so optimized, it is lowered
DWARF EH preparation into a call to _Unwind_Resume (or _Unwind_SjLj_Resume
as appropriate). Its chief advantage is that it takes both the
exception value and the selector value as arguments, meaning that there
is zero effort in recovering these; however, the frontend is required
to pass these down, which is not actually particularly difficult.
Also document the behavior of landing pads a bit better, and make it
clearer that it's okay that personality functions don't always land at
landing pads. This is just a fact of life. Don't write optimizations that
rely on pushing things over an unwind edge.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132253
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 28 May 2011 06:31:34 +0000 (06:31 +0000)]
Change how tblgen generates attributes for intrinsics to use a single
switch. With this newfound organization, teach tblgen how not to give
all intrinsics the 'nounwind' attribute. Introduce a new intrinsic,
llvm.eh.resume, which does not have this attribute. Documentation and uses
to follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132252
91177308-0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Sat, 28 May 2011 04:21:04 +0000 (04:21 +0000)]
When generating code for Win64 EH, emit StartProc and EndProc directives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132250
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Sat, 28 May 2011 04:07:29 +0000 (04:07 +0000)]
Add support for ARM ldrexd/strexd intrinsics. They both use i32 register pairs
to load/store i64 values. Since there's no current support to explicitly
declare such restrictions, implement it by using specific hardcoded register
pairs during isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132248
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 28 May 2011 03:16:22 +0000 (03:16 +0000)]
This actually starts at offset 0, not 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132246
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 28 May 2011 02:33:00 +0000 (02:33 +0000)]
Create two BlockInfo entries when a live range is discontinuous through a block.
Delete the Kill and Def markers in BlockInfo. They are no longer
necessary when BlockInfo describes a continuous live range.
This only affects the relatively rare kind of basic block where a live
range looks like this:
|---x o---|
Now live range splitting can pretend that it is looking at two blocks:
|---x
o---|
This allows the code to be simplified a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132245
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 28 May 2011 02:32:57 +0000 (02:32 +0000)]
Add SplitAnalysis::getNumLiveBlocks().
It is important that this function returns the same number of live blocks as
countLiveBlocks(CurLI) because live range splitting uses the number of live
blocks to ensure it is making progress.
This is in preparation of supporting duplicate UseBlock entries for basic blocks
that have a virtual register live-in and live-out, but not live-though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132244
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 28 May 2011 01:41:05 +0000 (01:41 +0000)]
Change the set of callee-saved registers for non-MIPS32 architectures specified
in MipsRegisterInfo::getCalleeSavedRegs so that both registers paired for a
double precision register get saved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132243
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 28 May 2011 01:40:44 +0000 (01:40 +0000)]
Implement the 'M' output modifier for arm inline asm. This is fairly
register allocation dependent and will occasionally break. WIP in the
register allocator to model paired/etc registers.
rdar://
9119939
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132242
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Sat, 28 May 2011 01:35:58 +0000 (01:35 +0000)]
Add missing newlines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132241
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 28 May 2011 01:07:07 +0000 (01:07 +0000)]
Define a wrapper node for target constant nodes (tglobaladdr, etc.).
Need this to prevent emitting illegal conditional move instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132240
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Sat, 28 May 2011 00:39:18 +0000 (00:39 +0000)]
Select DW_AT_const_value size based on global variable size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132239
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 28 May 2011 00:24:37 +0000 (00:24 +0000)]
Add 132187 back now that the real problem is fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132238
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Sat, 28 May 2011 00:15:10 +0000 (00:15 +0000)]
Fix test cases that were previously using grep to use FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132237
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 28 May 2011 00:13:01 +0000 (00:13 +0000)]
Fix the root cause of the bootstrap failure:
There was no way to check if a given register/mode pair was valid. We now return
an error code (-2) instead of asserting. If anyone thinks that an assert
at this point is really needed, we can autogen a hasValidDwarfRegNum instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132236
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Fri, 27 May 2011 23:54:00 +0000 (23:54 +0000)]
Fix the remaining atomic intrinsics to use the right register classes on Thumb2,
and add some basic tests for them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132235
91177308-0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Fri, 27 May 2011 23:47:32 +0000 (23:47 +0000)]
Stub out support for Win64-style exceptions. Note that this is merely using
the Win64 EH mechanism to implement GCC-style exceptions. LLVM supports
hardly anything else at this point!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132234
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Fri, 27 May 2011 23:46:09 +0000 (23:46 +0000)]
ARM asm parser wasn't able to parse a "mov" instruction while in Thumb
mode (only the "mov.w" variant). Now, when parsing "mov" in thumb mode,
default to the Thumb 1 versions/encodings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132233
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 27 May 2011 23:36:02 +0000 (23:36 +0000)]
It looks like 132187 might have broken the llvm-gcc bootstrap. Revert while I check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132230
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 27 May 2011 23:12:48 +0000 (23:12 +0000)]
Force a triple to make this test pass on Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132228
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 27 May 2011 22:50:46 +0000 (22:50 +0000)]
Clean out the 2.9 Release Notes. Mostly limited to What's New in LLVM
and enhancements in sub-project status updates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132227
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Fri, 27 May 2011 22:26:04 +0000 (22:26 +0000)]
Add a GR32_NOREX_NOSP register class and fix a bug where getMatchingSuperRegClass()
was saying that the matching superregister class of GR32_NOREX in GR64_NOREX_NOSP
is GR64_NOREX, which drops the NOSP constraint. This fixes PR10032.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132225
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 27 May 2011 22:15:01 +0000 (22:15 +0000)]
Fix a regression I recently introduced by removing DwarfRegNum of
subregisters:
When a value is in a subregister, at least report the location as being
the superregister. We should extend the .td files to encode the bit
range so that we can produce a DW_OP_bit_piece.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132224
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 27 May 2011 22:05:41 +0000 (22:05 +0000)]
Make size computation less brittle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132222
91177308-0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Fri, 27 May 2011 21:38:47 +0000 (21:38 +0000)]
Add the suffix to the Win64 EH data sections' names if given. Add a test for
this. XFAIL'd, because the COFF AsmParser can't handle .section yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132220
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 27 May 2011 21:03:13 +0000 (21:03 +0000)]
Refactor getActionType and getTypeToTransformTo ; place all of the 'decision'
code in one place. Re-apply 131534 and fix the multi-step promotion of integers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132217
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 27 May 2011 20:31:51 +0000 (20:31 +0000)]
Attempt to preserve debug line info in LICM; as the comment in the code says, it's hard to pick good line numbers for this transformation, but something is better than nothing.
rdar://
9143729
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132215
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 27 May 2011 20:16:57 +0000 (20:16 +0000)]
Typo is test case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132214
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 27 May 2011 20:15:06 +0000 (20:15 +0000)]
Make room for register allocation to improve.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132213
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 27 May 2011 20:13:10 +0000 (20:13 +0000)]
Add change of crc32 intrinsic to release notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132212
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 27 May 2011 20:11:27 +0000 (20:11 +0000)]
Don't use movw / movt for iOS static codegen for now to workaround some tools issues. rdar://
9514789
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132211
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 27 May 2011 20:02:42 +0000 (20:02 +0000)]
Delete a test that is no longer relevant.
According to PR2536, the old spiller had trouble with the IMPLICIT_DEF in this
code:
%reg1028<def> = MOV16rm %reg0, 1, %reg0, <ga:g_5>, Mem:LD(2,2) [g_5 + 0]
%reg1039<def> = IMPLICIT_DEF
%reg1038<def> = INSERT_SUBREG %reg1039, %reg1028, 2
%reg1025<def> = AND32ri %reg1038, 65534, %%EFLAGS<imp-def>
However, today we emit a zero-extending load instead:
%vreg10<def> = MOVZX32rm16 %noreg, 1, %noreg, <ga:@g_5>, %noreg; %mem:LD2[@g_5] GR32:%vreg10
%vreg0<def> = AND32ri %vreg10, 65534, %%EFLAGS<imp-def,dead>; %GR32:%vreg0,%vreg10
This makes the test pointless since it no longer creates the spiller hazard.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132210
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 27 May 2011 19:38:10 +0000 (19:38 +0000)]
CRC32 intrinsics were renamed at revision 132163. This submission
fixes aliasing issues with the old and new names as well as adds test
cases for the auto-upgrader.
Fixes rdar
9472944.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132207
91177308-0d34-0410-b5e6-
96231b3b80d8