Chris Lattner
11a33811b6
flags -> glue for selectiondag
...
llvm-svn: 122509
2010-12-23 17:24:32 +00:00
Chris Lattner
f647e95b9a
sdisel flag -> glue.
...
llvm-svn: 122507
2010-12-23 17:13:18 +00:00
Chris Lattner
f7f9e8c978
continue renaming flag -> glue.
...
llvm-svn: 122506
2010-12-23 17:03:20 +00:00
Torok Edwin
5abf51bde0
Fix OCaml bindings crash, PR8847.
...
See http://caml.inria.fr/mantis/view.php?id=4166
If we call only external functions from a module, then its 'let _' bindings
don't get executed, which means that the exceptions don't get registered for use
in the C code.
This in turn causes llvm_raise to call raise_with_arg() with a NULL pointer and
cause a segmentation fault.
The workaround is to declare all 'external' functions as 'val' in these .mli
files.
Also added a separate testcase (the testcase must call only external functions
for the bug to occur).
llvm-svn: 122497
2010-12-23 15:49:26 +00:00
Benjamin Kramer
dfa40f8f19
Remove/fix invalid README entries. The well thought out strcpy function doesn't return a pointer to the end of the string.
...
llvm-svn: 122496
2010-12-23 15:32:07 +00:00
Benjamin Kramer
b37ae33125
Remove some obsolete README items, add a new one off the top of my head.
...
llvm-svn: 122495
2010-12-23 15:07:02 +00:00
Andrew Trick
528fad91d2
Reorganize ListScheduleBottomUp in preparation for modeling machine cycles and instruction issue.
...
llvm-svn: 122491
2010-12-23 05:42:20 +00:00
Andrew Trick
a52f325c35
Converted LiveRegCycles to LiveRegGens. It's easier to work with and allows multiple nodes per cycle.
...
llvm-svn: 122474
2010-12-23 04:16:14 +00:00
Andrew Trick
12acde11cb
In CheckForLiveRegDef use TRI->getOverlaps.
...
llvm-svn: 122473
2010-12-23 03:43:21 +00:00
Andrew Trick
033efdf4d7
Fixes PR8823: add-with-overflow-128.ll
...
In the bottom-up selection DAG scheduling, handle two-address
instructions that read/write unspillable registers. Treat
the entire chain of two-address nodes as a single live range.
llvm-svn: 122472
2010-12-23 03:15:51 +00:00
Mon P Wang
18b762a946
Preserve the address space when generating bitcasts for MemTransferInst in ConvertToScalarInfo
...
llvm-svn: 122462
2010-12-23 01:41:32 +00:00
Jeffrey Yasskin
9b43f33620
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.
llvm-svn: 122458
2010-12-23 00:58:24 +00:00
Bill Wendling
f14bb1e98b
Default to armv7 instead of armv6.
...
llvm-svn: 122457
2010-12-23 00:49:18 +00:00
Jim Grosbach
8c48503baa
Trailing whitespace.
...
llvm-svn: 122456
2010-12-22 23:26:02 +00:00
Benjamin Kramer
1f4dfbbcb0
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]
llvm-svn: 122455
2010-12-22 23:17:45 +00:00
Benjamin Kramer
8ef5001b27
InstCombine: creating selects from -1 and 0 is fine, they combine into a sext from i1.
...
llvm-svn: 122453
2010-12-22 23:12:15 +00:00
Benjamin Kramer
6020ed9d99
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]
llvm-svn: 122451
2010-12-22 23:09:28 +00:00
Rafael Espindola
4124ab1255
Add r122359 back now that the bug in MCDwarfLineAddrFragment fragment has been
...
fixed.
llvm-svn: 122448
2010-12-22 22:16:24 +00:00
Dan Gohman
0bbdaf5723
Constify.
...
llvm-svn: 122447
2010-12-22 22:10:08 +00:00
Rafael Espindola
d91e11932c
Assert that the AddrDelta expression is really constant and wrap it in a set
...
if we have a lame assembler.
llvm-svn: 122446
2010-12-22 22:04:28 +00:00
Jakob Stoklund Olesen
0acb69d53c
When RegAllocGreedy decides to spill the interferences of the current register,
...
pick the victim with the lowest total spill weight.
llvm-svn: 122445
2010-12-22 22:01:30 +00:00
Jakob Stoklund Olesen
29836e6572
Include a shadow of the original CFG edges in the edge bundle graph.
...
llvm-svn: 122444
2010-12-22 22:01:28 +00:00
Rafael Espindola
a6cd2d821a
Rename NeedsSetToChangeDiffSize to HasAggressiveSymbolFolding which is a much
...
better name and matches what is used in the MachO writer.
llvm-svn: 122443
2010-12-22 21:51:29 +00:00
Daniel Dunbar
ac8173cf71
MC/Mach-O/ARM: Don't try to use scattered relocs for BR24 fixups.
...
llvm-svn: 122441
2010-12-22 21:26:43 +00:00
Rafael Espindola
1af01a69d4
Add reduced test from 8845.
...
llvm-svn: 122438
2010-12-22 21:15:13 +00:00
Rafael Espindola
0e14b61c0b
Revert r122359 while I debug PR8845.
...
llvm-svn: 122427
2010-12-22 19:05:49 +00:00
Matt Beaumont-Gay
6b5d2519b3
Fix another conditional expression mismatched enum type warning.
...
llvm-svn: 122419
2010-12-22 18:25:55 +00:00
Duncan Sands
a45cfbd405
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.
llvm-svn: 122414
2010-12-22 17:15:25 +00:00
Duncan Sands
bab9456f81
Make this test not depend on how the variable is named.
...
llvm-svn: 122413
2010-12-22 17:08:04 +00:00
Daniel Dunbar
45140d2efc
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.
llvm-svn: 122412
2010-12-22 16:52:19 +00:00
Daniel Dunbar
11617c8666
MC/Mach-O/ARM: Clone off an ARM version of RecordScatteredRelocation until I figure out how it is supposed to work.
...
llvm-svn: 122410
2010-12-22 16:45:29 +00:00
Daniel Dunbar
dde72ef0c1
MC/Mach-O: Return to reporting errors if we see unexpected fixup kinds.
...
llvm-svn: 122409
2010-12-22 16:32:41 +00:00
Daniel Dunbar
a191cfd97e
MC/Mach-O/ARM: Recognize generic _Data_N fixup kinds.
...
llvm-svn: 122408
2010-12-22 16:32:37 +00:00
Daniel Dunbar
9ccf843a61
MC/Mach-O/ARM: Add enough relocation logic to get BR24 relocations.
...
llvm-svn: 122407
2010-12-22 16:19:24 +00:00
Daniel Dunbar
56f13732e2
MC/Mach-O/ARM: Fix thinko.
...
llvm-svn: 122406
2010-12-22 16:19:20 +00:00
Rafael Espindola
50ce2f06de
Use references and simplify.
...
llvm-svn: 122405
2010-12-22 16:11:57 +00:00
Rafael Espindola
73c0ae77ca
Simplify the handling of .size expressions.
...
llvm-svn: 122404
2010-12-22 16:03:00 +00:00
Daniel Dunbar
083132e131
MC/Mach-O/ARM: Stub out RecordARMRelocation, which is mostly a copy of
...
RecordRelocation with lots of FIXMEs.
llvm-svn: 122402
2010-12-22 13:50:05 +00:00
Daniel Dunbar
a63db77f2e
Simplify.
...
llvm-svn: 122401
2010-12-22 13:49:56 +00:00
Daniel Dunbar
1e5be3653c
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.
llvm-svn: 122400
2010-12-22 13:49:43 +00:00
Duncan Sands
fbb9ac3cca
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.
llvm-svn: 122399
2010-12-22 13:36:08 +00:00
Che-Liang Chiou
aaedf8be1c
ptx: add ld instruction and test
...
llvm-svn: 122398
2010-12-22 10:38:51 +00:00
Duncan Sands
3547d2ebd8
Add some statistics, good for understanding how much more powerful
...
instcombine is compared to instsimplify.
llvm-svn: 122397
2010-12-22 09:40:51 +00:00
Oscar Fuentes
9f2b3842a3
Fixes file extension for loadable modules on OS X.
...
Patch by Wesley Peck!
llvm-svn: 122395
2010-12-22 08:30:17 +00:00
Chris Lattner
cafc1e60bb
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.
llvm-svn: 122392
2010-12-22 08:02:57 +00:00
Chris Lattner
9a499e96eb
more cleanups, move a check for "roundedness" earlier to reject
...
unhanded cases faster and simplify code.
llvm-svn: 122391
2010-12-22 08:01:44 +00:00
Chris Lattner
222374d886
reduce indentation and improve comments, no functionality change.
...
llvm-svn: 122389
2010-12-22 07:36:50 +00:00
Wesley Peck
ff2cd2ea6c
Don't generate carry bit when loading immediate values on the Microblaze.
...
llvm-svn: 122385
2010-12-22 01:29:32 +00:00
Wesley Peck
3a3a5795c5
Add support for some of the LLVM atomic operations to the MBlaze backend.
...
llvm-svn: 122384
2010-12-22 01:15:01 +00:00
Wesley Peck
1cd1554ca0
Modeling the carry bit in the MSR register of the MicroBlaze.
...
llvm-svn: 122381
2010-12-22 00:53:07 +00:00