Evan Cheng
ae26b91353
Revert r122955. It seems using movups to lower memcpy can cause massive regression (even on Nehalem) in edge cases. I also didn't see any real performance benefit.
...
llvm-svn: 123015
2011-01-07 19:35:30 +00:00
David Greene
e9b2fb7e0d
Rename lisp-like functions as suggested by Gabor Greif as loooong time
...
ago. This is both easier to learn and easier to read.
llvm-svn: 123001
2011-01-07 17:05:37 +00:00
Benjamin Kramer
a842a10fc1
Try to unbreak the arm buildbot.
...
llvm-svn: 122999
2011-01-07 11:35:21 +00:00
Bob Wilson
8341c8971d
Add testcases for PR8411 (vget_low and vget_high implemented as shuffles).
...
llvm-svn: 122997
2011-01-07 06:44:14 +00:00
Bob Wilson
22f18a7e94
Add ARM patterns to match EXTRACT_SUBVECTOR nodes.
...
Also fix an off-by-one in SelectionDAGBuilder that was preventing shuffle
vectors from being translated to EXTRACT_SUBVECTOR.
Patch by Tim Northover.
The test changes are needed to keep those spill-q tests from testing aligned
spills and restores. If the only aligned stack objects are spill slots, we
no longer realign the stack frame. Prior to this patch, an EXTRACT_SUBVECTOR
was legalized by loading from the stack, which created an aligned frame index.
Now, however, there is nothing except the spill slot in the stack frame, so
I added an aligned alloca.
llvm-svn: 122995
2011-01-07 04:59:04 +00:00
Bob Wilson
d9a324ac11
Fix a comment typo.
...
llvm-svn: 122994
2011-01-07 04:58:58 +00:00
Bob Wilson
bcbb3375dd
Change EXTRACT_SUBVECTOR to require a constant index.
...
We were never generating any of these nodes with variable indices, and there
was one legalizer function asserting on a non-constant index. If we ever have
a need to support variable indices, we can add this back again.
llvm-svn: 122993
2011-01-07 04:58:56 +00:00
Bill Wendling
0bf94c2188
Early exit if we don't have invokes. The 'Unwinds' vector isn't modified unless
...
we have invokes, so there is no functionality change here.
llvm-svn: 122990
2011-01-07 02:54:45 +00:00
Duncan Sands
06444485ee
Fix the other problem reported in PR8582. Testcase and patch by
...
Nadav Rotem.
llvm-svn: 122983
2011-01-06 23:45:22 +00:00
Duncan Sands
883391f3f2
Add a testcase for PR8582, which mysteriously fixed itself, in case the problem
...
comes back some day.
llvm-svn: 122982
2011-01-06 23:04:29 +00:00
Eric Christopher
16127008fd
Add some fairly duplicated code to let type legalization split illegal
...
typed atomics. This will lower exclusively to libcalls at the moment.
llvm-svn: 122979
2011-01-06 22:28:56 +00:00
Chris Lattner
2fd8a095b1
With Benjamin's recent amazing patches, we should be able to do even better things :)
...
llvm-svn: 122978
2011-01-06 22:25:00 +00:00
Chris Lattner
6430d12360
use isNullValue() to simplify code, add an assert.
...
llvm-svn: 122977
2011-01-06 22:24:29 +00:00
Devang Patel
7cb0e7c2ef
Emit 128 bit constant.
...
This fixes PR 8913 crash.
llvm-svn: 122971
2011-01-06 21:39:25 +00:00
Bob Wilson
461eb28678
PR8921: LDM/POP do not support interworking prior to v5t.
...
llvm-svn: 122970
2011-01-06 19:24:41 +00:00
Bob Wilson
f4a821c3d3
Remove extra whitespace.
...
llvm-svn: 122969
2011-01-06 19:24:36 +00:00
Bob Wilson
42b8976610
Fix comment typo.
...
llvm-svn: 122968
2011-01-06 19:24:32 +00:00
Benjamin Kramer
4e31a65344
Add a note from llvmdev, this time with more info.
...
llvm-svn: 122966
2011-01-06 17:35:50 +00:00
Abramo Bagnara
d4c067af6e
Fixed parsing of hex floats.
...
llvm-svn: 122963
2011-01-06 16:55:14 +00:00
Rafael Espindola
64814fff0b
Correctly disassemble truncated asm.
...
Patch by Richard Simth.
llvm-svn: 122962
2011-01-06 16:48:42 +00:00
Benjamin Kramer
fb2bb22b6f
InstCombine: Turn _chk functions into the "unsafe" variant if length and max langth are equal.
...
This happens when we take the (non-constant) length from a malloc.
llvm-svn: 122961
2011-01-06 14:22:52 +00:00
Benjamin Kramer
33e41f4986
EarlyCSE does this now (and GVN always did it).
...
llvm-svn: 122960
2011-01-06 13:19:46 +00:00
Benjamin Kramer
5834b2bab8
InstCombine: If we call llvm.objectsize on a malloc call we can replace it with the size passed to malloc.
...
llvm-svn: 122959
2011-01-06 13:11:05 +00:00
Benjamin Kramer
d5e1c24646
InstCombine: Teach llvm.objectsize folding to look through GEPs.
...
llvm-svn: 122958
2011-01-06 13:07:49 +00:00
Benjamin Kramer
dcff486813
Remove dead code and silence warnings.
...
llvm-svn: 122957
2011-01-06 13:01:02 +00:00
Evan Cheng
1a1771584e
Use movups to lower memcpy and memset even if it's not fast (like corei7).
...
The theory is it's still faster than a pair of movq / a quad of movl. This
will probably hurt older chips like P4 but should run faster on current
and future Intel processors. rdar://8817010
llvm-svn: 122955
2011-01-06 07:58:36 +00:00
Chris Lattner
40973baa5f
add a note about object size from drystone, add a poorly optimized loop from 179.art.
...
llvm-svn: 122954
2011-01-06 07:41:22 +00:00
Chris Lattner
69ff12968c
add a trivial instcombine missed in Dhrystone
...
llvm-svn: 122953
2011-01-06 07:09:23 +00:00
Evan Cheng
cb39cc2164
Re-implement r122936 with proper target hooks. Now getMaxStoresPerMemcpy
...
etc. takes an option OptSize. If OptSize is true, it would return
the inline limit for functions with attribute OptSize.
llvm-svn: 122952
2011-01-06 06:52:41 +00:00
Chris Lattner
83067bc3e7
implement constant folding support for an exotic constant expr:
...
ret i64 ptrtoint (i8* getelementptr ([1000 x i8]* @X, i64 1, i64 sub (i64 0, i64 ptrtoint ([1000 x i8]* @X to i64))) to i64)
to "ret i64 1000". This allows us to correctly compute the trip count
on a loop in PR8883, which occurs with std::fill on a char array. This
allows us to transform it into a memset with a constant size.
llvm-svn: 122950
2011-01-06 06:19:46 +00:00
Evan Cheng
70711ea54d
Revert r122936. I'll re-implement the change.
...
llvm-svn: 122949
2011-01-06 06:17:53 +00:00
Michael J. Spencer
223074e281
UnitTests/Path: Add magical tests. This will also test identify_magic.
...
llvm-svn: 122948
2011-01-06 05:58:02 +00:00
Michael J. Spencer
2b6edb1efa
UnitTests/Path: More ASSERT_NO_ERROR cleanup.
...
llvm-svn: 122947
2011-01-06 05:57:54 +00:00
Cameron Zwarich
246056cbb7
Add the CallInst optimizations that don't involve expanding inline assembly to
...
OptimizeInst() so that they can be used on a worklist instruction.
llvm-svn: 122945
2011-01-06 02:56:42 +00:00
Cameron Zwarich
314d16039a
Move the GEP handling in CodeGenPrepare to OptimizeInst().
...
llvm-svn: 122944
2011-01-06 02:44:52 +00:00
Cameron Zwarich
40cfb75bd7
Split the optimizations in CodeGenPrepare that don't manipulate the iterators
...
into a separate function, so that it can be called from a loop using a worklist
rather than a loop traversing a whole basic block.
llvm-svn: 122943
2011-01-06 02:37:26 +00:00
Jakob Stoklund Olesen
b3e7b27c1f
Zap the last two -Wself-assign warnings in llvm.
...
Simplify RALinScan::DowngradeRegister with TRI::getOverlaps while we are there.
llvm-svn: 122940
2011-01-06 01:33:22 +00:00
Jakob Stoklund Olesen
7b1480ff12
Add the SpillPlacement analysis pass.
...
This pass precomputes CFG block frequency information that can be used by the
register allocator to find optimal spill code placement.
Given an interference pattern, placeSpills() will compute which basic blocks
should have the current variable enter or exit in a register, and which blocks
prefer the stack.
The algorithm is ready to consume block frequencies from profiling data, but for
now it gets by with the static estimates used for spill weights.
This is a work in progress and still not hooked up to RegAllocGreedy.
llvm-svn: 122938
2011-01-06 01:21:53 +00:00
Bill Wendling
b3bf7cd562
Fix test to coincide with r122934 change from PR8919.
...
llvm-svn: 122937
2011-01-06 01:09:35 +00:00
Evan Cheng
d425aa5d2a
r105228 reduced the memcpy / memset inline limit to 4 with -Os to avoid blowing
...
up freebsd bootloader. However, this doesn't make much sense for Darwin, whose
-Os is meant to optimize for size only if it doesn't hurt performance.
rdar://8821501
llvm-svn: 122936
2011-01-06 01:04:47 +00:00
Evan Cheng
2af40ae781
Avoid zero extend bit test operands to pointer type if all the masks fit in
...
the original type of the switch statement key.
rdar://8781238
llvm-svn: 122935
2011-01-06 01:02:44 +00:00
Bill Wendling
a59afdaec5
PR8919 - LLVM incorrectly generates "_alloca" as the stack probing call. That
...
works only on MinGW32. On 64-bit, the function to call is "__chkstk".
Patch by KS Sreeram!
llvm-svn: 122934
2011-01-06 00:50:34 +00:00
Bill Wendling
fae0dd1afa
PR8918 - When used with MinGW64, LLVM generates a "calll __main" at the
...
beginning of the "main" function. The assembler complains about the invalid
suffix for the 'call' instruction. The right instruction is "callq __main".
Patch by KS Sreeram!
llvm-svn: 122933
2011-01-06 00:47:10 +00:00
Cameron Zwarich
eeea9f7113
Stop reallocating SunkAddrs for each basic block. When we move to an instruction
...
worklist, the key will need to become std::pair<BasicBlock*, Value*>.
llvm-svn: 122932
2011-01-06 00:42:50 +00:00
Owen Anderson
ba8ae674d7
Reorder, rename, and document some members to make this easier to follow.
...
llvm-svn: 122929
2011-01-05 23:26:22 +00:00
Evan Cheng
bf92316fab
Optimize:
...
r1025 = s/zext r1024, 4
r1026 = extract_subreg r1025, 4
to:
r1026 = copy r1024
llvm-svn: 122925
2011-01-05 23:06:49 +00:00
Chris Lattner
3ef9db5cd4
fix PR8900, a shuffle miscompilation. Patch by Nadav Rotem!
...
llvm-svn: 122921
2011-01-05 22:28:46 +00:00
Chris Lattner
0caa2500c0
silence more self assignment warnings.
...
llvm-svn: 122920
2011-01-05 22:26:52 +00:00
Jakob Stoklund Olesen
ce25984bae
Add a hidden command line option to display edge bundle graphs as they are
...
calculated.
llvm-svn: 122912
2011-01-05 21:50:24 +00:00
Jakob Stoklund Olesen
bd9910dbe2
Silence a warning from non-standard warning avoidance code.
...
llvm-svn: 122911
2011-01-05 21:50:21 +00:00