1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

70974 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen
b4df99dc06 Prevent infinite growth of SmallPtrSet instances.
Rehash but don't grow when full of tombstones.

Patch by José Fonseca!

llvm-svn: 128566
2011-03-30 18:32:48 +00:00
Jakob Stoklund Olesen
0daa5f56cb Prevent infinite growth of SmallMap instances.
Rehash but don't grow when full of tombstones.

Patch by José Fonseca!

llvm-svn: 128565
2011-03-30 18:32:44 +00:00
Jakob Stoklund Olesen
492f97910d Prevent infinite growth of the DenseMap.
When the hash function uses object pointers all free entries eventually
become tombstones as they are used at least once, regardless of the size.

DenseMap cannot function with zero empty keys, so it double size to get
get ridof the tombstones.

However DenseMap never shrinks automatically unless it is cleared, so
the net result is that certain tables grow infinitely.

The solution is to make a fresh copy of the table without tombstones
instead of doubling size, by simply calling grow with the current size.

Patch by José Fonseca!

llvm-svn: 128564
2011-03-30 18:32:41 +00:00
Jakob Stoklund Olesen
30de09d279 Fix evil VirtRegRewriter bug.
The rewriter can keep track of multiple stack slots in the same register if they
happen to have the same value. When an instruction modifies a stack slot by
defining a register that is mapped to a stack slot, other stack slots in that
register are no longer valid.

This is a very rare problem, and I don't have a simple test case. I get the
impression that VirtRegRewriter knows it is about to be deleted, inventing a
last opaque problem.

<rdar://problem/9204040>

llvm-svn: 128562
2011-03-30 18:14:07 +00:00
Jakob Stoklund Olesen
41a7b0951b Teach VirtRegRewriter about the new virtual register numbers. No functional change.
llvm-svn: 128561
2011-03-30 18:14:04 +00:00
Benjamin Kramer
e6e5b11a65 Avoid turning a floating point division with a constant power of two into a denormal multiplication.
Some platforms may treat denormals as zero, on other platforms multiplication
with a subnormal is slower than dividing by a normal.

llvm-svn: 128555
2011-03-30 17:02:54 +00:00
Benjamin Kramer
310f9bb68e InstCombine: If the divisor of an fdiv has an exact inverse, turn it into an fmul.
Fixes PR9587.

llvm-svn: 128546
2011-03-30 15:42:35 +00:00
Benjamin Kramer
7888d0935d Add APFloat::getExactInverse.
The idea is, that if an ieee 754 float is divided by a power of two, we can
turn the division into a cheaper multiplication. This function sees if we can
get an exact multiplicative inverse for a divisor and returns it if possible.

This is the hard part of PR9587.

I tested many inputs against llvm-gcc's frotend implementation of this
optimization and didn't find any difference. However, floating point is the
land of weird edge cases, so any review would be appreciated.

llvm-svn: 128545
2011-03-30 15:42:27 +00:00
Jay Foad
770a07e1a3 Fix more zero length memset warnings.
llvm-svn: 128543
2011-03-30 15:31:02 +00:00
Jay Foad
bab2718661 Add a comment on PHINode::Create().
llvm-svn: 128540
2011-03-30 13:29:06 +00:00
Jay Foad
53632b7c03 Remove PHINode::reserveOperandSpace(). Instead, add a parameter to
PHINode::Create() giving the (known or expected) number of operands.

llvm-svn: 128537
2011-03-30 11:28:46 +00:00
Jay Foad
dc5a008237 (Almost) always call reserveOperandSpace() on newly created PHINodes.
llvm-svn: 128535
2011-03-30 11:19:20 +00:00
Bob Wilson
41d1bf3f9f Revert a minor comment change inadvertently included with r128502.
llvm-svn: 128526
2011-03-30 05:26:51 +00:00
Jakob Stoklund Olesen
8ce46ee438 Treat clones the same as their origin.
When DCE clones a live range because it separates into connected components,
make sure that the clones enter the same register allocator stage as the
register they were cloned from.

For instance, clones may be split even when they where created during spilling.
Other registers created during spilling are not candidates for splitting or even
(re-)spilling.

llvm-svn: 128524
2011-03-30 02:52:39 +00:00
Bill Wendling
c007d0af6d Remove dead code.
llvm-svn: 128519
2011-03-30 01:03:48 +00:00
Johnny Chen
326082e0b2 Add a test case for thumb stc2 instruction.
llvm-svn: 128517
2011-03-30 01:02:06 +00:00
Argyrios Kyrtzidis
bea6ccf737 ClangSAEmClangSACheckersEmitter, emit info about groups.
llvm-svn: 128515
2011-03-30 00:22:00 +00:00
Bill Wendling
83903bc85f Set the unnamed_addr only when we're creating a new GV in the dest module.
llvm-svn: 128507
2011-03-29 23:31:06 +00:00
Bill Wendling
48a0bb7712 Revert r128501. It caused test failures.
llvm-svn: 128506
2011-03-29 23:28:02 +00:00
Jim Grosbach
47b87dbc29 Tidy up. 80 columns and trailing whitespace.
llvm-svn: 128504
2011-03-29 23:20:22 +00:00
Francois Pichet
7ba639e6f5 Update CMake link dependency.
llvm-svn: 128503
2011-03-29 23:18:51 +00:00
Evan Cheng
ed09135349 Add intrinsics @llvm.arm.neon.vmulls and @llvm.arm.neon.vmullu.* back. Frontends
was lowering them to sext / uxt + mul instructions. Unfortunately the
optimization passes may hoist the extensions out of the loop and separate them.
When that happens, the long multiplication instructions can be broken into
several scalar instructions, causing significant performance issue.

Note the vmla and vmls intrinsics are not added back. Frontend will codegen them
as intrinsics vmull* + add / sub. Also note the isel optimizations for catching
mul + sext / zext are not changed either.

First part of rdar://8832507, rdar://9203134

llvm-svn: 128502
2011-03-29 23:06:19 +00:00
Bill Wendling
ed457e662c We need to copy over the unnamed_addr attribute.
llvm-svn: 128501
2011-03-29 23:05:41 +00:00
Matt Beaumont-Gay
50e8fa1c50 Revert accidental change to LLVMLibDeps.cmake
llvm-svn: 128499
2011-03-29 22:42:41 +00:00
Matt Beaumont-Gay
bf215beedb Quiet a gcc warning about changed name lookup rules
llvm-svn: 128497
2011-03-29 22:25:36 +00:00
Benjamin Kramer
4ae67c9fcb InstCombine: Add a few missing combines for ANDs and ORs of sign bit tests.
On x86 we now compile "if (a < 0 && b < 0)" into
	testl	%edi, %esi
	js	IF.THEN

llvm-svn: 128496
2011-03-29 22:06:41 +00:00
Kevin Enderby
976435fa83 Adding a test for "-inf" as well.
llvm-svn: 128495
2011-03-29 21:54:10 +00:00
Johnny Chen
28a32ef2d7 Add a test case for MSRi.
llvm-svn: 128494
2011-03-29 21:52:02 +00:00
Cameron Zwarich
95260e5ebb Add Neon SINT_TO_FP and UINT_TO_FP lowering from v4i16 to v4f32. Fixes
<rdar://problem/8875309> and <rdar://problem/9057191>.

llvm-svn: 128492
2011-03-29 21:41:55 +00:00
Jakob Stoklund Olesen
a292fa3d1e Recompute register class and hint for registers created during spilling.
The spill weight is not recomputed for an unspillable register - it stays infinite.

llvm-svn: 128490
2011-03-29 21:20:19 +00:00
Argyrios Kyrtzidis
e923f22a2e In ClangSACheckersEmitter:
- Also emit a list of packages and groups sorted by name
  - Avoid iterating over DenseSet so that the output of the arrays is deterministic.

llvm-svn: 128489
2011-03-29 21:16:19 +00:00
Kevin Enderby
1ece39d99c Added support symbolic floating point constants in the MC assembler for Infinity
and Nans with the same strings as GAS supports.  rdar://8673024

llvm-svn: 128488
2011-03-29 21:11:52 +00:00
Johnny Chen
3c4cb78640 Add a thumb test file for printf (iOS 4.3).
llvm-svn: 128487
2011-03-29 21:09:30 +00:00
Jim Grosbach
30c2338560 Instantiate a JITMemoryManager for MCJIT Dyld
llvm-svn: 128485
2011-03-29 21:03:05 +00:00
Oscar Fuentes
4fe82e640f Fixed the build of Clang's unit tests on MinGW. Also removed some
unnecesary conditionals and introduced a new convenience function.

The problem was that the list of libraries for Clang's unit tests was
<clang libraries> <system libraries> <llvm libraries>. As the llvm
libraries references symbols defined on the system libraries, those
were reported as undefined.

llvm-svn: 128484
2011-03-29 20:51:08 +00:00
Benjamin Kramer
a28b1da096 DSE: Remove an early exit optimization that depended on the ordering of a SmallPtrSet.
Fixes PR9569 and will hopefully make selfhost on ASLR-enabled systems more deterministic.

llvm-svn: 128482
2011-03-29 20:28:57 +00:00
Owen Anderson
c2b8d6ac65 Check early if this is an unsupported opcode, so that we can avoid needlessly instantiating the base register in some cases.
llvm-svn: 128481
2011-03-29 20:27:38 +00:00
Johnny Chen
ab342ac374 A8.6.188 STC, STC2
The STC_OPTION and STC2_OPTION instructions should have their coprocessor option enclosed in {}.

rdar://problem/9200661

llvm-svn: 128478
2011-03-29 19:49:38 +00:00
Johnny Chen
9a61664869 Rename invalid-VLDMSDB-arm.txt to be invalid-VLDMSDB_UPD-arm.txt.
llvm-svn: 128477
2011-03-29 19:10:06 +00:00
Johnny Chen
1cd323de0a Add and modify some tests.
llvm-svn: 128476
2011-03-29 19:08:52 +00:00
Argyrios Kyrtzidis
71261edb9b For ClangSACheckersEmitter, allow a package to belong to checker group, in which all its checkers will go into the group.
llvm-svn: 128474
2011-03-29 18:53:00 +00:00
Jakob Stoklund Olesen
229e589bd1 Remember to use the correct register when rematerializing for snippets.
llvm-svn: 128469
2011-03-29 17:47:02 +00:00
Jakob Stoklund Olesen
4676323ac8 Run dead code elimination immediately after rematerialization.
This may eliminate some uses of the spilled registers, and we don't want to
insert reloads for that.

llvm-svn: 128468
2011-03-29 17:47:00 +00:00
Owen Anderson
3310282e25 Add safety check that didn't show up in testing.
llvm-svn: 128467
2011-03-29 17:42:25 +00:00
Devang Patel
1b0c19617d Document llvm.dbg.sp, llvm.dbg.gv and llvm.dbg.enum
llvm-svn: 128466
2011-03-29 17:27:08 +00:00
Bill Wendling
7469ccb3bd Inline check that's used only once.
llvm-svn: 128465
2011-03-29 17:12:55 +00:00
Owen Anderson
d73041e884 Get rid of the non-writeback versions VLDMDB and VSTMDB, which don't actually exist.
llvm-svn: 128461
2011-03-29 16:45:53 +00:00
Bill Wendling
47b8e67328 Rework the logic (and removing the bad check for an unreachable block) so that
the FailBB dominator is correctly calculated. Believe it or not, there isn't a
functionality change here.

llvm-svn: 128455
2011-03-29 07:28:52 +00:00
Cameron Zwarich
d49e32233c Do some simple copy propagation through integer loads and stores when promoting
vector types. This helps a lot with inlined functions when using the ARM soft
float ABI. Fixes <rdar://problem/9184212>.

llvm-svn: 128453
2011-03-29 05:19:52 +00:00
Bill Wendling
ded022ad8b Don't try to add stack protector logic to a dead basic block. It messes up
dominator information.

llvm-svn: 128452
2011-03-29 05:15:48 +00:00