1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

71483 Commits

Author SHA1 Message Date
Chris Lattner
5e00f501ff Fix rdar://9289512 - not folding load into compare at -O0
The basic issue here is that bottom-up isel is matching the branch
and compare, and was failing to fold the load into the branch/compare
combo.  Fixing this (by allowing folding into any instruction of a
sequence that is selected) allows us to produce things like:


cmpb    $0, 52(%rax)
je      LBB4_2

instead of:

movb    52(%rax), %cl
cmpb    $0, %cl
je      LBB4_2

This makes the generated -O0 code run a bit faster, but also speeds up
compile time by putting less pressure on the register allocator and 
generating less code.

This was one of the biggest classes of missing load folding.  Implementing
this shrinks 176.gcc's c-decl.s (as a random example) by about 4% in (verbose-asm)
line count.

llvm-svn: 129656
2011-04-17 06:35:44 +00:00
Chris Lattner
1fe5f78b7e split a complex predicate out to a helper function. Simplify two for loops,
which don't need to check for falling off the end of a block *and* end of phi
nodes, since terminators are never phis.

llvm-svn: 129655
2011-04-17 06:03:19 +00:00
Eli Friedman
50f9e90852 Remove working entry from README.
llvm-svn: 129654
2011-04-17 02:36:27 +00:00
Chris Lattner
cb194276e0 fix rdar://9289583 - fast isel should handle non-canonical commutative binops
allowing us to fold the immediate into the 'and' in this case:

int test1(int i) {
  return 8&i;
}

llvm-svn: 129653
2011-04-17 01:16:47 +00:00
Eli Friedman
2798137293 PR9055: extend the fix to PR4050 (r70179) to apply to zext and anyext.
Returning a new node makes the code try to replace the old node, which
in the included testcase is killed by CSE.

llvm-svn: 129650
2011-04-16 23:25:34 +00:00
Frits van Bommel
09c24968b1 Rename a misleadingly-named variable.
llvm-svn: 129644
2011-04-16 14:32:34 +00:00
Frits van Bommel
978376c200 Add test cases for Jay's r129641 and fix a 32-bit-centric testcase in a file with a 64-bit datalayout.
llvm-svn: 129643
2011-04-16 14:31:50 +00:00
Francois Pichet
1cc1375d03 Unbreak the MSVC 2010 build.
For further information on this particular issue see: http://connect.microsoft.com/VisualStudio/feedback/details/520043/error-converting-from-null-to-a-pointer-type-in-std-pair

llvm-svn: 129642
2011-04-16 14:20:39 +00:00
Jay Foad
e80e7f1de5 Fix bug when checking phi operands in InstCombiner::visitPHINode(),
found by code inspection.

llvm-svn: 129641
2011-04-16 14:17:37 +00:00
Francois Pichet
dd7a5695e3 MSVC needs the return 0 to compile.
llvm-svn: 129640
2011-04-16 13:59:23 +00:00
Benjamin Kramer
0b3416e2f5 Remove unused variable.
llvm-svn: 129639
2011-04-16 10:30:47 +00:00
Benjamin Kramer
c7d15fb261 Write out uint64_t as i{0..32},i{33..64} instead of i{0..32},0.
llvm-svn: 129638
2011-04-16 10:25:32 +00:00
Nick Lewycky
e704042077 Don't use C++ comments in C code.
llvm-svn: 129637
2011-04-16 04:25:36 +00:00
Rafael Espindola
9e5aaa3b78 Put each personality function in a section. This fixes the gnu ld warning:
error in foo.o; no .eh_frame_hdr table will be created.

llvm-svn: 129635
2011-04-16 03:51:21 +00:00
Stuart Hastings
4575e2a398 Correct result when a branch condition is live across a block
boundary.  <rdar://problem/8933028>

llvm-svn: 129634
2011-04-16 03:31:26 +00:00
Evan Cheng
b720f37282 Fix divmod libcall lowering. Convert to {S|U}DIVREM first and then expand the node to a libcall. rdar://9280991
llvm-svn: 129633
2011-04-16 03:08:26 +00:00
Rafael Espindola
b9bb29267f Fix cmake build.
llvm-svn: 129632
2011-04-16 02:06:46 +00:00
Nick Lewycky
a2958ced1e Move the re-stemming function up top and use it where it's currently inlined.
Break the arc-profile code out to a function like the notes emission code is,
and reorder the functions in the file.

The only functionality change is that we no longer modify the Module when the
Module has no debug info to use.

llvm-svn: 129631
2011-04-16 02:05:18 +00:00
Nick Lewycky
9aeaafc27a Rename LineProfiling to GCOVProfiling to more accurately represent what it
does. Also mostly implement it. Still a work-in-progress, but generates legal
output on crafted test cases.

llvm-svn: 129630
2011-04-16 01:20:23 +00:00
Devang Patel
eddab1d186 Introduce support to encode Objective-C property information in debugging information generated for an interface.
llvm-svn: 129624
2011-04-16 00:11:51 +00:00
Johnny Chen
d7a6b974bc Thumb2 BFC was insufficiently encoded.
rdar://problem/9292717

llvm-svn: 129619
2011-04-15 22:52:15 +00:00
Johnny Chen
2a183b813d A8.6.315 VLD3 (single 3-element structure to all lanes)
The a bit must be encoded as 0.

rdar://problem/9292625

llvm-svn: 129618
2011-04-15 22:49:08 +00:00
Akira Hatanaka
ee5ee33cfc Re-enable test o32_cc_vararg.ll.
llvm-svn: 129616
2011-04-15 22:23:09 +00:00
Douglas Gregor
2bebd9880d Initial work to improve documentation for Clang's diagnostics, from Matthieu Monrocq
llvm-svn: 129613
2011-04-15 22:04:07 +00:00
Akira Hatanaka
74d45b54f1 Reverse unnecessary changes made in r129606 and r129608. There is no change in functionality.
llvm-svn: 129612
2011-04-15 21:51:11 +00:00
Cameron Zwarich
5e9c2506d8 Add ORR and EOR to the CMP peephole optimizer. It's hard to get isel to generate
a case involving EOR, so I only added a test for ORR.

llvm-svn: 129610
2011-04-15 21:24:38 +00:00
Douglas Gregor
054dd418ca Fix some broken links, from Matthieu Monrocq
llvm-svn: 129609
2011-04-15 21:21:31 +00:00
Akira Hatanaka
d4fd6b478e Fix lines that exceed 80 columns. There is no change in functionality.
llvm-svn: 129608
2011-04-15 21:06:38 +00:00
Rafael Espindola
2723cb649f Add this test back for Darwin.
llvm-svn: 129607
2011-04-15 21:06:27 +00:00
Akira Hatanaka
6f900185ed Fix lines that have incorrect indentation or exceed 80 columns. There is no change in functionality.
llvm-svn: 129606
2011-04-15 21:00:26 +00:00
Cameron Zwarich
05fb4f0c81 The AND instruction leaves the V flag unmodified, so it falls victim to the same
problem as all of the other instructions we fold with CMPs.

llvm-svn: 129602
2011-04-15 20:45:00 +00:00
Rafael Espindola
4daf38357c Fix cmake build.
llvm-svn: 129601
2011-04-15 20:34:45 +00:00
Rafael Espindola
694ad2f25c Some refactoring suggested by Anton Korobeynikov.
llvm-svn: 129600
2011-04-15 20:32:03 +00:00
Cameron Zwarich
ddbf79c32b Add missing register forms of instructions to the ARM CMP-folding code. This
fixes <rdar://problem/9287901>.

llvm-svn: 129599
2011-04-15 20:28:28 +00:00
Akira Hatanaka
025720d06f Add pass that expands pseudo instructions into target instructions after register allocation. Define pseudos that get expanded into mtc1 or mfc1 instructions.
llvm-svn: 129594
2011-04-15 19:52:08 +00:00
Evan Cheng
e33e4028a6 Increase SubtargetFeatureKV Value and Implies fields to 64 bits since some targets are getting very close to 32 subtarget features. Also teach tablegen to error when there are more than 64 features to guard against undefined behavior. rdar://9282332
llvm-svn: 129590
2011-04-15 19:35:46 +00:00
Joerg Sonnenberger
42c3063de0 Add encoding tests for flds/filds
llvm-svn: 129589
2011-04-15 19:25:31 +00:00
Lenny Maiorani
dfae65d305 Implements StringRef::compare with bounds. It is behaves similarly to strncmp(). Unit tests also included.
llvm-svn: 129582
2011-04-15 17:56:50 +00:00
Jakob Stoklund Olesen
bdd6204582 Teach the SplitKit blitter to handle multiply defined values as well.
The transferValues() function can now handle both singly and multiply defined
values, as long as the resulting live range is known. Only rematerialized values
have their live range recomputed by extendRange().

The updateSSA() function can now insert PHI values in bulk across multiple
values in multiple target registers in one pass. The list of blocks received
from transferValues() is in layout order which seems to work well for the
iterative algorithm. Blocks from extendRange() are still in reverse BFS order,
but this function is used so rarely now that it doesn't matter.

llvm-svn: 129580
2011-04-15 17:24:49 +00:00
Jakob Stoklund Olesen
ea8581b792 Remember to set flag.
llvm-svn: 129579
2011-04-15 17:24:46 +00:00
Rafael Espindola
99831068c8 Add 129518 back with a fix for when we are producing eh just because of debug info.
Change ELF systems to use CFI for producing the EH tables. This reduces the
size of the clang binary in Debug builds from 690MB to 679MB.

llvm-svn: 129571
2011-04-15 15:11:06 +00:00
Chris Lattner
0304b82f80 Fix a ton of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!

llvm-svn: 129558
2011-04-15 05:18:47 +00:00
NAKAMURA Takumi
7aed456653 Revert r129518, "Change ELF systems to use CFI for producing the EH tables. This reduces the"
It broke several builds.

llvm-svn: 129557
2011-04-15 03:35:57 +00:00
Evan Cheng
f33f509d45 Fix another fcopysign lowering bug. If src is f64 and destination is f32, don't
forget to right shift the source by 32 first. rdar://9287902

llvm-svn: 129556
2011-04-15 01:31:00 +00:00
Johnny Chen
f268f057f4 For t2BFI, both Inst{26} and Inst{5} "should" be 0.
Ref: I.1 Instruction encoding diagrams and pseudocode
llvm-svn: 129552
2011-04-15 00:35:08 +00:00
Michael J. Spencer
05b07faeaf Add 3DNow! intrinsics.
llvm-svn: 129551
2011-04-15 00:32:41 +00:00
Johnny Chen
197d67a987 The ARM disassembler did not handle the alignment correctly for VLD*DUP* instructions
(single element or n-element structure to all lanes).

llvm-svn: 129550
2011-04-15 00:10:45 +00:00
Evan Cheng
d01345fcc4 Follow up on r127913. Fix Thumb revsh isel. rdar://9286766
llvm-svn: 129548
2011-04-14 23:27:44 +00:00
Eli Friedman
198c39a4fe Add an instcombine for constructs like a | -(b != c); a select is more
canonical, and generally leads to better code.  Found while looking at
an article about saturating arithmetic.

llvm-svn: 129545
2011-04-14 22:41:27 +00:00
Owen Anderson
268d8f22f8 Fix an infinite alternation in JumpThreading where two transforms would repeatedly undo each other. The solution is to perform more aggressive constant folding to make one of the edges just folded away rather than trying to thread it.
Fixes <rdar://problem/9284786>.

Discovered with CSmith.

llvm-svn: 129538
2011-04-14 21:35:50 +00:00