Mon P Wang [Thu, 23 Dec 2010 01:41:32 +0000 (01:41 +0000)]
Preserve the address space when generating bitcasts for MemTransferInst in ConvertToScalarInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122462
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Thu, 23 Dec 2010 00:58:24 +0000 (00:58 +0000)]
Change all self assignments X=X to (void)X, so that we can turn on a
new gcc warning that complains on self-assignments and
self-initializations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122458
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 23 Dec 2010 00:49:18 +0000 (00:49 +0000)]
Default to armv7 instead of armv6.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122457
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 22 Dec 2010 23:26:02 +0000 (23:26 +0000)]
Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122456
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 22 Dec 2010 23:17:45 +0000 (23:17 +0000)]
DAGCombine add (sext i1), X into sub X, (zext i1) if sext from i1 is illegal. The latter usually compiles into smaller code.
example code:
unsigned foo(unsigned x, unsigned y) {
if (x != 0) y--;
return y;
}
before:
_foo: ## @foo
cmpl $1, 4(%esp) ## encoding: [0x83,0x7c,0x24,0x04,0x01]
sbbl %eax, %eax ## encoding: [0x19,0xc0]
notl %eax ## encoding: [0xf7,0xd0]
addl 8(%esp), %eax ## encoding: [0x03,0x44,0x24,0x08]
ret ## encoding: [0xc3]
after:
_foo: ## @foo
cmpl $1, 4(%esp) ## encoding: [0x83,0x7c,0x24,0x04,0x01]
movl 8(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x08]
adcl $-1, %eax ## encoding: [0x83,0xd0,0xff]
ret ## encoding: [0xc3]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122455
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 22 Dec 2010 23:12:15 +0000 (23:12 +0000)]
InstCombine: creating selects from -1 and 0 is fine, they combine into a sext from i1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122453
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 22 Dec 2010 23:09:28 +0000 (23:09 +0000)]
X86: Lower a select directly to a setcc_carry if possible.
int test(unsigned long a, unsigned long b) { return -(a < b); }
compiles to
_test: ## @test
cmpq %rsi, %rdi ## encoding: [0x48,0x39,0xf7]
sbbl %eax, %eax ## encoding: [0x19,0xc0]
ret ## encoding: [0xc3]
instead of
_test: ## @test
xorl %ecx, %ecx ## encoding: [0x31,0xc9]
cmpq %rsi, %rdi ## encoding: [0x48,0x39,0xf7]
movl $-1, %eax ## encoding: [0xb8,0xff,0xff,0xff,0xff]
cmovael %ecx, %eax ## encoding: [0x0f,0x43,0xc1]
ret ## encoding: [0xc3]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122451
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 22 Dec 2010 22:16:24 +0000 (22:16 +0000)]
Add r122359 back now that the bug in MCDwarfLineAddrFragment fragment has been
fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122448
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 22 Dec 2010 22:10:08 +0000 (22:10 +0000)]
Constify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122447
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 22 Dec 2010 22:04:28 +0000 (22:04 +0000)]
Assert that the AddrDelta expression is really constant and wrap it in a set
if we have a lame assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122446
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 22 Dec 2010 22:01:30 +0000 (22:01 +0000)]
When RegAllocGreedy decides to spill the interferences of the current register,
pick the victim with the lowest total spill weight.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122445
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 22 Dec 2010 22:01:28 +0000 (22:01 +0000)]
Include a shadow of the original CFG edges in the edge bundle graph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122444
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 22 Dec 2010 21:51:29 +0000 (21:51 +0000)]
Rename NeedsSetToChangeDiffSize to HasAggressiveSymbolFolding which is a much
better name and matches what is used in the MachO writer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122443
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 22 Dec 2010 21:26:43 +0000 (21:26 +0000)]
MC/Mach-O/ARM: Don't try to use scattered relocs for BR24 fixups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122441
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 22 Dec 2010 21:15:13 +0000 (21:15 +0000)]
Add reduced test from 8845.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122438
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 22 Dec 2010 19:05:49 +0000 (19:05 +0000)]
Revert r122359 while I debug PR8845.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122427
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Wed, 22 Dec 2010 18:25:55 +0000 (18:25 +0000)]
Fix another conditional expression mismatched enum type warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122419
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 22 Dec 2010 17:15:25 +0000 (17:15 +0000)]
When determining whether the new instruction was already present in
the original instruction, half the cases were missed (making it not
wrong but suboptimal). Also correct a typo (A <-> B) in the second
chunk.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122414
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 22 Dec 2010 17:08:04 +0000 (17:08 +0000)]
Make this test not depend on how the variable is named.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122413
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 22 Dec 2010 16:52:19 +0000 (16:52 +0000)]
MC/Mach-O/ARM: We always use the SECTDIFF reloc type on ARM, which is
esp. important given that the LOCAL_SECTDIFF enumeration got redefined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122412
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 22 Dec 2010 16:45:29 +0000 (16:45 +0000)]
MC/Mach-O/ARM: Clone off an ARM version of RecordScatteredRelocation until I figure out how it is supposed to work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122410
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 22 Dec 2010 16:32:41 +0000 (16:32 +0000)]
MC/Mach-O: Return to reporting errors if we see unexpected fixup kinds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122409
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 22 Dec 2010 16:32:37 +0000 (16:32 +0000)]
MC/Mach-O/ARM: Recognize generic _Data_N fixup kinds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122408
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 22 Dec 2010 16:19:24 +0000 (16:19 +0000)]
MC/Mach-O/ARM: Add enough relocation logic to get BR24 relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122407
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 22 Dec 2010 16:19:20 +0000 (16:19 +0000)]
MC/Mach-O/ARM: Fix thinko.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122406
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 22 Dec 2010 16:11:57 +0000 (16:11 +0000)]
Use references and simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122405
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 22 Dec 2010 16:03:00 +0000 (16:03 +0000)]
Simplify the handling of .size expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122404
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 22 Dec 2010 13:50:05 +0000 (13:50 +0000)]
MC/Mach-O/ARM: Stub out RecordARMRelocation, which is mostly a copy of
RecordRelocation with lots of FIXMEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122402
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 22 Dec 2010 13:49:56 +0000 (13:49 +0000)]
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122401
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 22 Dec 2010 13:49:43 +0000 (13:49 +0000)]
MC/Mach-O: Split out RecordARMRelocation for now, it is weird enough it isn't
clear how to keep in the generic path (yet).
- Will revisit when it actually works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122400
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 22 Dec 2010 13:36:08 +0000 (13:36 +0000)]
Add a generic expansion transform: A op (B op' C) -> (A op B) op' (A op C)
if both A op B and A op C simplify. This fires fairly often but doesn't
make that much difference. On gcc-as-one-file it removes two "and"s and
turns one branch into a select.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122399
91177308-0d34-0410-b5e6-
96231b3b80d8
Che-Liang Chiou [Wed, 22 Dec 2010 10:38:51 +0000 (10:38 +0000)]
ptx: add ld instruction and test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122398
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 22 Dec 2010 09:40:51 +0000 (09:40 +0000)]
Add some statistics, good for understanding how much more powerful
instcombine is compared to instsimplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122397
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Wed, 22 Dec 2010 08:30:17 +0000 (08:30 +0000)]
Fixes file extension for loadable modules on OS X.
Patch by Wesley Peck!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122395
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 22 Dec 2010 08:02:57 +0000 (08:02 +0000)]
Fix a bug in ReduceLoadWidth that wasn't handling extending
loads properly. We miscompiled the testcase into:
_test: ## @test
movl $128, (%rdi)
movzbl 1(%rdi), %eax
ret
Now we get a proper:
_test: ## @test
movl $128, (%rdi)
movsbl (%rdi), %eax
movzbl %ah, %eax
ret
This fixes PR8757.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122392
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 22 Dec 2010 08:01:44 +0000 (08:01 +0000)]
more cleanups, move a check for "roundedness" earlier to reject
unhanded cases faster and simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122391
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 22 Dec 2010 07:36:50 +0000 (07:36 +0000)]
reduce indentation and improve comments, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122389
91177308-0d34-0410-b5e6-
96231b3b80d8
Wesley Peck [Wed, 22 Dec 2010 01:29:32 +0000 (01:29 +0000)]
Don't generate carry bit when loading immediate values on the Microblaze.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122385
91177308-0d34-0410-b5e6-
96231b3b80d8
Wesley Peck [Wed, 22 Dec 2010 01:15:01 +0000 (01:15 +0000)]
Add support for some of the LLVM atomic operations to the MBlaze backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122384
91177308-0d34-0410-b5e6-
96231b3b80d8
Wesley Peck [Wed, 22 Dec 2010 00:53:07 +0000 (00:53 +0000)]
Modeling the carry bit in the MSR register of the MicroBlaze.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122381
91177308-0d34-0410-b5e6-
96231b3b80d8
Wesley Peck [Wed, 22 Dec 2010 00:22:59 +0000 (00:22 +0000)]
Fix a regression introduced into the MBlaze delay slot filler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122379
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 21 Dec 2010 23:54:34 +0000 (23:54 +0000)]
Give GVN back the ability to perform simple conditional propagation on conditional branch values.
I still think that LVI should be handling this, but that capability is some ways off in the future,
and this matters for some significant benchmarks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122378
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Tue, 21 Dec 2010 23:43:23 +0000 (23:43 +0000)]
GCC objects to the two sides of a conditional expression having different enum
types, but they're just getting converted to unsigned anyway, so cast first
(and ask questions later).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122377
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 21 Dec 2010 22:31:24 +0000 (22:31 +0000)]
Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122371
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 21 Dec 2010 22:27:44 +0000 (22:27 +0000)]
In DelayForLiveRegsBottomUp, handle instructions that read and write
the same physical register. Simplifies the fix from the previous
checkin r122211.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122370
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 21 Dec 2010 22:25:04 +0000 (22:25 +0000)]
whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122368
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 21 Dec 2010 21:55:50 +0000 (21:55 +0000)]
Reapply 122353-122355 with fixes. 122354 was wrong;
the shift type was needed one place, the shift count
type another. The transform in 123555 had the same
problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122366
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 21 Dec 2010 21:41:44 +0000 (21:41 +0000)]
Add some x86 specific dagcombines for conditional increments.
(add Y, (sete X, 0)) -> cmp X, 1; adc 0, Y
(add Y, (setne X, 0)) -> cmp X, 1; sbb -1, Y
(sub (sete X, 0), Y) -> cmp X, 1; sbb 0, Y
(sub (setne X, 0), Y) -> cmp X, 1; adc -1, Y
for
unsigned foo(unsigned a, unsigned b) {
if (a == 0) b++;
return b;
}
we now get:
foo:
cmpl $1, %edi
movl %esi, %eax
adcl $0, %eax
ret
instead of:
foo:
testl %edi, %edi
sete %al
movzbl %al, %eax
addl %esi, %eax
ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122364
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 21 Dec 2010 21:30:19 +0000 (21:30 +0000)]
GVN's Expression is not POD-like (it contains a SmallVector). Simplify code while at it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122362
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 21 Dec 2010 21:22:27 +0000 (21:22 +0000)]
Revert 122353-122355 for the moment, they broke stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122360
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 21 Dec 2010 20:51:42 +0000 (20:51 +0000)]
Simplify EvaluateAsAbsolute now that EvaluateAsRelocatableImpl does all
the folding it can.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122359
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 21 Dec 2010 20:35:18 +0000 (20:35 +0000)]
Don't relax org or align. They change size as the relaxation happens, but they
are not actually relaxed. For example, a section with only alignments will never
needs relaxation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122356
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 21 Dec 2010 20:10:51 +0000 (20:10 +0000)]
Add a new transform to DAGCombiner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122355
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 21 Dec 2010 20:06:19 +0000 (20:06 +0000)]
Get the type of a shift from the shift, not from its shift
count operand. These should be the same but apparently are
not always, and this is cleaner anyway. This improves the
code in an existing test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122354
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 21 Dec 2010 20:00:06 +0000 (20:00 +0000)]
Shift by the word size is invalid IR; don't create it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122353
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 21 Dec 2010 18:05:22 +0000 (18:05 +0000)]
fix some typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122349
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Tue, 21 Dec 2010 17:25:43 +0000 (17:25 +0000)]
Revert 122341. It breaks some darwin tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122346
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Tue, 21 Dec 2010 17:16:58 +0000 (17:16 +0000)]
Fix indentation, add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122345
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 21 Dec 2010 17:08:55 +0000 (17:08 +0000)]
Visit instructions deterministically. Use a FIFO so as to approximately
visit instructions before their uses, since InstructionSimplify does a
better job in that case. All this prompted by Frits van Bommel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122343
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Tue, 21 Dec 2010 17:07:24 +0000 (17:07 +0000)]
Missing logic for nested CALLSEQ_START/END.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122342
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Tue, 21 Dec 2010 16:55:53 +0000 (16:55 +0000)]
Fix PR 8199. This patch prepends the build tool dir to LLVM programs
being tested. This ensures that we test the tools just built and not
some random tools that might happen to be in the user's PATH. This
makes LLVM testing much more stable and predictable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122341
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 21 Dec 2010 16:16:00 +0000 (16:16 +0000)]
Tidy up a bit. Trailing whitespace, hard tabs and 80-columns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122337
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 21 Dec 2010 16:12:03 +0000 (16:12 +0000)]
If an instruction simplifies, try again to simplify any uses of it. This is
not very important since the pass is only used for testing, but it does make
it more realistic. Suggested by Frits van Bommel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122336
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 21 Dec 2010 15:26:45 +0000 (15:26 +0000)]
MC/Mach-O: Shuffle enums a bit to make it harder to inadvertently use the wrong
type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122334
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 21 Dec 2010 15:12:22 +0000 (15:12 +0000)]
Add an additional InstructionSimplify factorization test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122333
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 21 Dec 2010 15:03:43 +0000 (15:03 +0000)]
While I don't think any later transforms can fire, it seems cleaner to
not assume this (for example in case more transforms get added below
it). Suggested by Frits van Bommel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122332
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 21 Dec 2010 14:48:48 +0000 (14:48 +0000)]
Fix inverted condition noticed by Frits van Bommel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122331
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 21 Dec 2010 14:00:22 +0000 (14:00 +0000)]
Pull a few more simplifications out of instcombine (there are still
plenty left though!), in particular for multiplication.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122330
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 21 Dec 2010 13:39:20 +0000 (13:39 +0000)]
Fix typo in comment, spotted by Deewiant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122329
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 21 Dec 2010 13:32:22 +0000 (13:32 +0000)]
Teach InstructionSimplify about distributive laws. These transforms fire
quite often, but don't make much difference in practice presumably because
instcombine also knows them and more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122328
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 21 Dec 2010 09:09:15 +0000 (09:09 +0000)]
Move checking of the recursion limit into the various Thread methods.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122327
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 21 Dec 2010 08:49:00 +0000 (08:49 +0000)]
Add generic simplification of associative operations, generalizing
a couple of existing transforms. This fires surprisingly often, for
example when compiling gcc "(X+(-1))+1->X" fires quite a lot as well
as various "and" simplifications (usually with a phi node operand).
Most of the time this doesn't make a real difference since the same
thing would have been done elsewhere anyway, eg: by instcombine, but
there are a few places where this results in simplifications that we
were not doing before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122326
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Tue, 21 Dec 2010 06:54:43 +0000 (06:54 +0000)]
Incremental progress towards a new implementation of StrongPHIElimination. Most
of the problems with my last attempt were in the updating of LiveIntervals
rather than the coalescing itself. Therefore, I decided to get that right first
by essentially reimplementing the existing PHIElimination using LiveIntervals.
It works correctly, with only a few tests failing (which may not be legitimate
failures) and no new verifier failures (at least as far as I can tell, I didn't
count the number per file).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122321
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 21 Dec 2010 06:43:19 +0000 (06:43 +0000)]
Add ARM-specific DAG combining to cast i64 vector element load/stores to f64.
Type legalization splits up i64 values into pairs of i32 values, which leads
to poor quality code when inserting or extracting i64 vector elements.
If the vector element is loaded or stored, it can be treated as an f64 value
and loaded or stored directly from a VPR register. Use the pre-legalization
DAG combiner to cast those vector elements to f64 types so that the type
legalizer won't mess them up. Radar
8755338.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122319
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 21 Dec 2010 04:22:09 +0000 (04:22 +0000)]
Layout one section until no relaxations are done and then move to the next
section.
This helps because in practice sections form a dag with debug sections pointing
to text sections. Finishing up the text sections first makes the debug section
relaxation trivial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122314
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 21 Dec 2010 03:50:43 +0000 (03:50 +0000)]
Arm and thumb call instructions are also in different orders.
Fixes rdar://
8782223
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122313
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 21 Dec 2010 03:31:05 +0000 (03:31 +0000)]
Grammar corrections and some formatting changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122312
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 21 Dec 2010 02:38:05 +0000 (02:38 +0000)]
rename MVT::Flag to MVT::Glue. "Flag" is a terrible name for
something that just glues two nodes together, even if it is
sometimes used for flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122310
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 21 Dec 2010 02:12:07 +0000 (02:12 +0000)]
If we're not using reg+reg offset we're using reg+imm, set the opcode
to be the one we want to use. bugpoint reduced testcase is a little large,
I'll see if I can simplify it down more.
Fixes part of rdar://
8782207
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122307
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 21 Dec 2010 02:07:03 +0000 (02:07 +0000)]
improve "cannot yet select" errors a trivial amount: now
they are just as useless, but at least a bit more gramatical
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122305
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 21 Dec 2010 01:57:15 +0000 (01:57 +0000)]
Fix a copy-pasto. When the tBR_JTr instruction was converted to using the
tPseudoInst class, its size was changed from "special" to "2 bytes". This is
incorrect because the jump table will no longer be taken into account when
calculating branch offsets.
<rdar://problem/
8782216>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122303
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 21 Dec 2010 01:54:40 +0000 (01:54 +0000)]
Comment cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122302
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 21 Dec 2010 01:50:21 +0000 (01:50 +0000)]
Add EdgeBundles to SplitKit.
Edge bundles is an annotation on the CFG that turns it into a bipartite directed
graph where each basic block is connected to an outgoing and an ingoing bundle.
These bundles are useful for identifying regions of the CFG for live range
splitting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122301
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 21 Dec 2010 00:48:17 +0000 (00:48 +0000)]
Use IntEqClasses to compute connected components of live intervals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122296
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 21 Dec 2010 00:04:46 +0000 (00:04 +0000)]
Add ADT/IntEqClasses.h as a light-weight implementation of EquivalenceClasses.h.
This implementation already exists as ConnectedVNInfoEqClasses in
LiveInterval.cpp, and it seems to be generally useful to have a light-weight way
of forming equivalence classes of small integers.
IntEqClasses doesn't allow enumeration of the elements in a class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122293
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 20 Dec 2010 23:53:19 +0000 (23:53 +0000)]
Speculatively revert the use of DenseMap in LazyValueInfo, which may be causing Linux self-host failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122291
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 20 Dec 2010 23:23:18 +0000 (23:23 +0000)]
Attempt to appease the DragonEgg buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122288
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 20 Dec 2010 22:28:03 +0000 (22:28 +0000)]
Revert r122114 (CallbackVH observing use-list changes) because it caused severe slowdowns on the Linux self-host configuration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122279
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Mon, 20 Dec 2010 22:04:24 +0000 (22:04 +0000)]
Implement feedback from Bruno on making pblendvb an x86-specific ISD node in addition to being an intrinsic, and convert
lowering to use it. Hopefully the pattern fragment is doing the right thing with XMM0, looks correct in testing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122277
91177308-0d34-0410-b5e6-
96231b3b80d8
Wesley Peck [Mon, 20 Dec 2010 21:54:50 +0000 (21:54 +0000)]
Update the target feature matrix to reflect some new features in the MBlaze backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122276
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 20 Dec 2010 21:30:54 +0000 (21:30 +0000)]
Convert one of LVI's primary maps to a DenseMap, now that we know are more assured of iterator stability.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122273
91177308-0d34-0410-b5e6-
96231b3b80d8
Wesley Peck [Mon, 20 Dec 2010 21:18:04 +0000 (21:18 +0000)]
Teach the MBlaze disassembler to disassemble special purpose registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122269
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Mon, 20 Dec 2010 21:14:39 +0000 (21:14 +0000)]
Set the value of absolute symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122268
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 20 Dec 2010 21:14:18 +0000 (21:14 +0000)]
This is still used and issuing an annoying warning. Don't deprecate something in
the library unless *all* uses have been converted over to the new form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122267
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 20 Dec 2010 21:07:42 +0000 (21:07 +0000)]
Oops, forgot to add the pass itself!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122265
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 20 Dec 2010 20:54:37 +0000 (20:54 +0000)]
Add a new convenience pass for testing InstructionSimplify. Previously
it could only be tested indirectly, via instcombine, gvn or some other
pass that makes use of InstructionSimplify, which means that testcases
had to be carefully contrived to dance around any other transformations
that that pass did.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122264
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Mon, 20 Dec 2010 20:49:43 +0000 (20:49 +0000)]
Print all 64bits for st_value and st_size. Adjust tests accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122263
91177308-0d34-0410-b5e6-
96231b3b80d8
Wesley Peck [Mon, 20 Dec 2010 20:43:24 +0000 (20:43 +0000)]
Teach the MBlaze asm parser how to parse special purpose register names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122261
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Mon, 20 Dec 2010 20:10:50 +0000 (20:10 +0000)]
Cosmetic changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122259
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 20 Dec 2010 20:00:31 +0000 (20:00 +0000)]
Add a check missing from my last commit and avoid a potential overflow situation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122258
91177308-0d34-0410-b5e6-
96231b3b80d8