Jakob Stoklund Olesen
05a2f5178e
Extract a method. No functional change.
...
llvm-svn: 127040
2011-03-04 22:11:11 +00:00
Bill Wendling
88842e4574
Initialize variable.
...
llvm-svn: 127038
2011-03-04 21:38:47 +00:00
Jakob Stoklund Olesen
d7e1bb80a9
Go back to comparing spill weights when deciding if interference can be evicted.
...
It gives better results. Sometimes, a live range can be large and still have
high spill weight. Such a range should not be spilled.
llvm-svn: 127036
2011-03-04 21:32:50 +00:00
Bruno Cardoso Lopes
434248a62c
Improve div/rem node handling on mips. Patch by Akira Hatanaka
...
llvm-svn: 127034
2011-03-04 21:03:24 +00:00
Bruno Cardoso Lopes
a744ef3f90
Expands register/immediate pairs when the immediate is too large to fit in 16-bit field. Patch by Akira Hatanaka
...
llvm-svn: 127032
2011-03-04 20:48:08 +00:00
Dan Gohman
aa036eedb8
When decling to reuse existing expressions that involve casts, ignore
...
bitcasts, which are really no-ops here. This fixes slowdowns on
MultiSource/Applications/aha and others.
llvm-svn: 127031
2011-03-04 20:46:46 +00:00
Bruno Cardoso Lopes
8887d6593f
Rewrite and simplify o32 vaarg passing, no functional changes. Patch by Sasa Stankovic
...
llvm-svn: 127029
2011-03-04 20:27:44 +00:00
Joerg Sonnenberger
62f759791a
Be nice to Xcore and the XMOS assembler and avoid quoting section names
...
that contain only letters, digits and the characters "_" and ".".
llvm-svn: 127028
2011-03-04 20:03:14 +00:00
Bruno Cardoso Lopes
f8198e4311
Lowers block address. Currently asserts when relocation model is not PIC. Patch by Akira Hatanaka
...
llvm-svn: 127027
2011-03-04 20:01:52 +00:00
Benjamin Kramer
dfb0ad30a8
raw_ostream: while it is generally desirable to do larger writes, it can lead to
...
inefficient file system buffering if the writes are not a multiple of the desired
buffer size. Avoid this by limiting the large write to a multiple of the buffer
size and copying the remainder into the buffer.
Thanks to Dan for pointing this out.
llvm-svn: 127026
2011-03-04 19:49:30 +00:00
Jakob Stoklund Olesen
b8e6fdc23c
Renumber slot indexes locally when possible.
...
Initially, slot indexes are quad-spaced. There is room for inserting up to 3
new instructions between the original instructions.
When we run out of indexes between two instructions, renumber locally using
double-spaced indexes. The original quad-spacing means that we catch up quickly,
and we only have to renumber a handful of instructions to get a monotonic
sequence. This is much faster than renumbering the whole function as we did
before.
llvm-svn: 127023
2011-03-04 19:43:38 +00:00
Nick Lewycky
41c529bd09
Revert broken srem logic from r126991.
...
llvm-svn: 127021
2011-03-04 19:26:08 +00:00
Bruno Cardoso Lopes
328e2ce043
Fix an old copy-n-paste
...
llvm-svn: 127020
2011-03-04 19:20:24 +00:00
Devang Patel
a0d73fd65e
Disable ARMGlobalMerge on darwin. The debugger is not yet able to extract individual variable's info from merged global.
...
llvm-svn: 127019
2011-03-04 19:11:05 +00:00
Bruno Cardoso Lopes
22b69db8dd
Expands FCOS and FSIN nodes when type is f64.
...
llvm-svn: 127017
2011-03-04 18:54:14 +00:00
Jakob Stoklund Olesen
348d8e8ba6
Number SlotIndexes uniformly without looking at the number of defs on each instruction.
...
You can't really predict how many indexes will be needed from the number of
defs, so let's keep it simple.
Also remove an extra empty index that was inserted after each basic block. It
was intended for live-out ranges, but it was never used that way.
llvm-svn: 127014
2011-03-04 18:51:09 +00:00
Benjamin Kramer
acf0842088
raw_ostream: If writing a string that is larger than the buffer, write it directly instead of doing many buffer-sized writes.
...
This caps the number of write(2) calls per string to a maximum of 2.
llvm-svn: 127010
2011-03-04 18:18:16 +00:00
Jakob Stoklund Olesen
b88f6adf0f
Add SlotIndex statistics.
...
llvm-svn: 127007
2011-03-04 18:08:29 +00:00
Jakob Stoklund Olesen
d4f788952d
Tweak debug output. No functional changes.
...
llvm-svn: 127006
2011-03-04 18:08:26 +00:00
Bruno Cardoso Lopes
db93ddb41b
Fixes addc pattern when immediate cannot be represented with 16-bit. Patch by Akira Hatanaka
...
llvm-svn: 127005
2011-03-04 17:59:18 +00:00
Bruno Cardoso Lopes
ed874eff93
Remove (hopefully) all trailing whitespaces from the mips backend. Patch by Hatanaka, Akira
...
llvm-svn: 127003
2011-03-04 17:51:39 +00:00
Duncan Sands
6bd1044222
Revert commit 126684 "Use the correct shift amount type". It is only the correct
...
type after type legalization has completed. Before then it may simply not be big
enough to hold the shift amount, particularly on x86 which uses a very small type
for shifts (this issue broke stuff in the past which is why LegalizeTypes carefully
uses a large type for shift amounts).
llvm-svn: 127000
2011-03-04 14:28:59 +00:00
Kalle Raiskila
a1d947dd14
Allow vector shifts (shl,lshr,ashr) on SPU.
...
There was a previous implementation with patterns that would
have matched e.g.
shl <v4i32> <i32>,
but this is not valid LLVM IR so they never were selected.
llvm-svn: 126998
2011-03-04 13:19:18 +00:00
Kalle Raiskila
3531e9b0d9
Allow load from constant on SPU.
...
A 'load <4 x i32>* null' crashes llc before this fix.
llvm-svn: 126995
2011-03-04 12:00:11 +00:00
Nick Lewycky
8e3a79da9f
Fold "icmp pred (srem X, Y), Y" like we do for urem. Handle signed comparisons
...
in the urem case, though not the other way around. This is enough to get #3 from
PR9343!
llvm-svn: 126991
2011-03-04 10:06:52 +00:00
Nick Lewycky
3cec6f5563
Teach instruction simplify to use constant ranges to solve problems of the form
...
"icmp pred %X, CI" and a number of examples where "%X = binop %Y, CI2".
Some of these cases (div and rem) used to make it through opt -O2, but the
others are probably now making code elsewhere redundant (probably instcombine).
llvm-svn: 126988
2011-03-04 07:00:57 +00:00
Jakob Stoklund Olesen
e2017b6f2e
DenseMap<uintptr_t,...> doesn't allow all values as keys.
...
Avoid colliding with the sentinels, hopefully unbreaking
llvm-gcc-x86_64-linux-selfhost.
llvm-svn: 126982
2011-03-04 02:48:56 +00:00
Andrew Trick
c88b7ecb88
Minor pre-RA-sched fixes and cleanup.
...
Fix the PendingQueue, then disable it because it's not required for
the current schedulers' heuristics.
Fix the logic for the unused list-ilp scheduler.
llvm-svn: 126981
2011-03-04 02:03:45 +00:00
Devang Patel
213264c03d
Add ArrayRef variant.
...
llvm-svn: 126978
2011-03-04 01:20:33 +00:00
Jakob Stoklund Olesen
c332e727b4
Precompute block frequencies, pow() isn't free.
...
llvm-svn: 126975
2011-03-04 00:58:40 +00:00
Jakob Stoklund Olesen
1a69e23300
Use an IndexedMap instead of a DenseMap for the live-out cache.
...
This speeds up updateSSA() so it only accounts for 5% of the live range
splitting time.
llvm-svn: 126972
2011-03-04 00:15:36 +00:00
Eli Friedman
f63614a982
PR9377: Handle x86 str with register operand in a way consistent with gas.
...
llvm-svn: 126970
2011-03-04 00:10:17 +00:00
Bill Wendling
f3658f3872
There are times when the landing pad won't have a call to 'eh.selector' in
...
it. It's been assumed up til now that it would be in its immediate
successor. However, this isn't necessarily the case. It could be in one of its
successor's successors.
Modify the code to more thoroughly check for an 'eh.selector' call in
successors. It only looks at a successor if we get there as a result of an
unconditional branch.
Testcase ObjC/exceptions-4.m in r126968.
llvm-svn: 126969
2011-03-03 23:14:05 +00:00
Bob Wilson
f5d23beff7
PR8053: Fix encoding of S bit in some ARM instructions.
...
Patch by Zonr Chang!
llvm-svn: 126967
2011-03-03 23:07:15 +00:00
Eli Friedman
d8a555bb3b
Revert r123908; the code in question is completely untested and wrong.
...
llvm-svn: 126964
2011-03-03 22:33:23 +00:00
Joerg Sonnenberger
852ab890b5
Bug#9033: For the ELF assembler output, always quote the section name.
...
llvm-svn: 126963
2011-03-03 22:31:08 +00:00
Devang Patel
63b3e76370
Fix typo.
...
llvm-svn: 126962
2011-03-03 21:49:41 +00:00
Devang Patel
34a7ab400e
Fix thinko in previous check-in.
...
Add comment.
llvm-svn: 126959
2011-03-03 20:08:10 +00:00
Devang Patel
4ab660b077
llvm::Function argument count is not a good indicator of how many arugments does the function have at source level. If we need more space, just resize vector conservatively. This vector is only used once per function.
...
llvm-svn: 126957
2011-03-03 20:02:02 +00:00
Jim Grosbach
7e200664f6
Allow a target to choose whether to prefer the scavenger emergency spill slot
...
be next to the frame pointer or the stack pointer.
llvm-svn: 126956
2011-03-03 20:01:52 +00:00
Jan Sjödin
771911e28b
Split MCEELFStreamer and ELFObjectWriter into .h and .cpp files, so that other components can use them.
...
llvm-svn: 126942
2011-03-03 14:52:12 +00:00
Richard Osborne
5003782293
Fix typo in comment.
...
llvm-svn: 126941
2011-03-03 14:21:22 +00:00
Richard Osborne
af52c52569
Optimize fprintf -> iprintf if there are no floating point arguments
...
and siprintf is available on the target.
llvm-svn: 126940
2011-03-03 14:20:22 +00:00
Justin Holewinski
8e9a126a6c
PTX: Fix Emacs renaming a symbol
...
llvm-svn: 126938
2011-03-03 14:09:40 +00:00
Richard Osborne
2dfb888392
Optimize sprintf -> siprintf if there are no floating point arguments
...
and siprintf is available on the target.
llvm-svn: 126937
2011-03-03 14:09:28 +00:00
Justin Holewinski
969dfbcff6
PTX: Fix a couple of lint violations
...
llvm-svn: 126936
2011-03-03 13:34:29 +00:00
Richard Osborne
815de536e5
Optimize printf -> iprintf if there are no floating point arguments
...
and iprintf is available on the target. Currently iprintf is only
marked as being available on the XCore.
llvm-svn: 126935
2011-03-03 13:17:51 +00:00
Tilmann Scheller
3bc0bcf3ad
Use X86_thiscall calling convention for Win64 as well.
...
llvm-svn: 126934
2011-03-03 07:49:07 +00:00
Eli Friedman
d92d17bf67
PR9352: Always emit a relocation for weak symbols. Not emitting relocations
...
for calls to weak symbols with a definition has the appearance of working
with LLVM-generated code because weak symbol definitions are put in their
own sections.
llvm-svn: 126933
2011-03-03 07:24:36 +00:00
Bob Wilson
ab8881accd
Add a readme entry for the redundant movw issue for pr9370.
...
llvm-svn: 126930
2011-03-03 06:39:09 +00:00