Bruno Cardoso Lopes
e697a8bcb0
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
a8389213a0
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
0545e7fe48
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
5f2f5fa638
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
99619e5bef
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
49043825b4
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
8b66caf12a
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
Devang Patel
3efe510847
XFAIL for all. These tests are darwin specific anyway.
...
llvm-svn: 127022
2011-03-04 19:38:10 +00:00
Nick Lewycky
75a3dd996d
Revert broken srem logic from r126991.
...
llvm-svn: 127021
2011-03-04 19:26:08 +00:00
Bruno Cardoso Lopes
5347fd6512
Fix an old copy-n-paste
...
llvm-svn: 127020
2011-03-04 19:20:24 +00:00
Devang Patel
23ee9fdba3
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
9390dc6271
Expands FCOS and FSIN nodes when type is f64.
...
llvm-svn: 127017
2011-03-04 18:54:14 +00:00
Jakob Stoklund Olesen
d99d8cfdf0
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
Jakob Stoklund Olesen
61af2752b1
Symbolize the default instruction distance.
...
llvm-svn: 127013
2011-03-04 18:36:51 +00:00
Benjamin Kramer
0376064f8f
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
728fffc159
Deferred SlotIndex renumbering was a good idea but never used.
...
llvm-svn: 127008
2011-03-04 18:08:32 +00:00
Jakob Stoklund Olesen
dfc9b0b15f
Add SlotIndex statistics.
...
llvm-svn: 127007
2011-03-04 18:08:29 +00:00
Jakob Stoklund Olesen
c3193f4aa8
Tweak debug output. No functional changes.
...
llvm-svn: 127006
2011-03-04 18:08:26 +00:00
Bruno Cardoso Lopes
a49a596acf
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
5400401372
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
f6c9de94f8
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
6e33c92ffb
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
72cfda1a29
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
3bc3a84ba8
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
a5f309e983
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
Eli Friedman
7243ca7572
Followup to r126970: add 64-bit encoding tests for str with reg operand.
...
llvm-svn: 126987
2011-03-04 04:06:47 +00:00
Jakob Stoklund Olesen
c7bf5eaafb
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
1478921dc0
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
9dbcb14cd8
Add ArrayRef variant.
...
llvm-svn: 126978
2011-03-04 01:20:33 +00:00
Jakob Stoklund Olesen
3c64ea5ad2
Precompute block frequencies, pow() isn't free.
...
llvm-svn: 126975
2011-03-04 00:58:40 +00:00
Jakob Stoklund Olesen
5bc7a96cca
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
be07c34368
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
6e6a0422eb
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
c48ba54186
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
26f5c96de3
Revert r123908; the code in question is completely untested and wrong.
...
llvm-svn: 126964
2011-03-03 22:33:23 +00:00
Joerg Sonnenberger
bb93506f95
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
a7b5a00033
Fix typo.
...
llvm-svn: 126962
2011-03-03 21:49:41 +00:00
Devang Patel
3c2bd93f9e
Fix thinko in previous check-in.
...
Add comment.
llvm-svn: 126959
2011-03-03 20:08:10 +00:00
Devang Patel
4adbb350be
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
e4ef37b298
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
3c1fa9a68b
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
2186cd4e47
Fix typo in comment.
...
llvm-svn: 126941
2011-03-03 14:21:22 +00:00
Richard Osborne
88d0d840f2
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
396fdaee6d
PTX: Fix Emacs renaming a symbol
...
llvm-svn: 126938
2011-03-03 14:09:40 +00:00
Richard Osborne
021b589253
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
86e749c620
PTX: Fix a couple of lint violations
...
llvm-svn: 126936
2011-03-03 13:34:29 +00:00
Richard Osborne
df829ddcb7
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
ab6450ec63
Use X86_thiscall calling convention for Win64 as well.
...
llvm-svn: 126934
2011-03-03 07:49:07 +00:00
Eli Friedman
f7eb4cce13
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
e24bee9ce8
TableGen should not ignore BX instructions for the ARM disassembler. pr9368.
...
llvm-svn: 126931
2011-03-03 07:19:52 +00:00