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

79174 Commits

Author SHA1 Message Date
Benjamin Kramer
0ce9fd3032 Remove VectorExtras. This unused helper was written for a type of API that is discouraged now.
llvm-svn: 147738
2012-01-07 19:42:13 +00:00
Craig Topper
17901c2d33 Remove unnecessary check of hasAVX(). It's already included in hasXMM().
llvm-svn: 147734
2012-01-07 18:48:43 +00:00
Craig Topper
66a349f55d Replace some uses of hasNUsesOfValue(0, X) with !hasAnyUseOfValue(X)
llvm-svn: 147733
2012-01-07 18:31:09 +00:00
Benjamin Kramer
b13cdd4879 Port the trick to skip the check for empty buckets from StringMap to DenseMap.
This should fix the odd behavior that find() is slower than lookup().

llvm-svn: 147731
2012-01-07 13:12:07 +00:00
Craig Topper
8648954580 Add some DAG combines for SUBC/SUBE. If nothing uses the carry/borrow out of subc, turn it into a sub. Turn (subc x, x) into 0 with no borrow. Turn (subc x, 0) into x with no borrow. Turn (subc -1, x) into (xor x, -1) with no borrow. Turn sube with no borrow in into subc.
llvm-svn: 147728
2012-01-07 09:06:39 +00:00
Cameron Zwarich
49330adc9c Fix TableGen so that it will emit the correct signature for FastEmit_f:
/// FastEmit_f - This method is called by target-independent code
  /// to request that an instruction with the given type, opcode, and
  /// floating-point immediate operand be emitted.
  virtual unsigned FastEmit_f(MVT VT,
                              MVT RetVT,
                              unsigned Opcode,
                              const ConstantFP *FPImm);

Currently, it emits an accidentally overloaded version without the const on the
ConstantFP*. This doesn't affect anything in the tree, since nothing causes that
method to be autogenerated, but I have been playing with some ARM TableGen
refactorings that hit this problem.

llvm-svn: 147727
2012-01-07 08:18:37 +00:00
Jakob Stoklund Olesen
b6f6f2baa9 Optimize reserved register coalescing.
Reserved registers don't have proper live ranges, their LiveInterval
simply has a snippet of liveness for each def.  Virtual registers with a
single value that is a copy of a reserved register (typically %esp) can
be coalesced with the reserved register if the live range doesn't
overlap any reserved register defs.

When coalescing with a reserved register, don't modify the reserved
register live range.  Just leave it as a bunch of dead defs.  This
eliminates quadratic coalescer behavior in i386 functions with many
function calls.

PR11699

llvm-svn: 147726
2012-01-07 07:39:50 +00:00
Jakob Stoklund Olesen
3221d31706 Use the 'regalloc' debug tag for most register allocator tracing.
llvm-svn: 147725
2012-01-07 07:39:47 +00:00
Andrew Trick
60dbff489b Enable redundant phi elimination after LSR.
This will be more important as we extend the LSR pass in ways that don't rely on the formula solver. In particular, we need it for constructing IV chains.

llvm-svn: 147724
2012-01-07 07:08:17 +00:00
Eli Bendersky
af558b888a Fix dead link
llvm-svn: 147721
2012-01-07 04:11:27 +00:00
Jakob Stoklund Olesen
71f92061aa Use getRegForValue() to materialize the address of ARM globals.
This enables basic local CSE, giving us 20% smaller code for
consumer-typeset in -O0 builds.

<rdar://problem/10658692>

llvm-svn: 147720
2012-01-07 04:07:22 +00:00
Evan Cheng
3c2cf59a22 Revert part of r147716. Looks like x87 instructions kill markers are all messed
up so branch folding pass can't use the scavenger. :-(  This doesn't breaks
anything currently. It just means targets which do not carefully update kill
markers cannot run post-ra scheduler (not new, it has always been the case).

We should fix this at some point since it's really hacky.

llvm-svn: 147719
2012-01-07 03:35:48 +00:00
Andrew Trick
d9eb9c8780 LSR: Don't optimize loops if an outer loop has no preheader.
LoopSimplify may not run on some outer loops, e.g. because of indirect
branches. SCEVExpander simply cannot handle outer loops with no preheaders.
Fixes rdar://10655343 SCEVExpander segfault.

llvm-svn: 147718
2012-01-07 03:16:50 +00:00
Rafael Espindola
2d545fa143 Split Finish into Finish and FinishImpl to have a common place to do end of
file error checking. Use that to error on an unfinished cfi_startproc.

The error is not nice, but is already better than a segmentation fault.

llvm-svn: 147717
2012-01-07 03:13:18 +00:00
Evan Cheng
8af07ba749 Added a late machine instruction copy propagation pass. This catches
opportunities that only present themselves after late optimizations
such as tail duplication .e.g.
## BB#1:
        movl    %eax, %ecx
        movl    %ecx, %eax
        ret

The register allocator also leaves some of them around (due to false
dep between copies from phi-elimination, etc.)

This required some changes in codegen passes. Post-ra scheduler and the
pseudo-instruction expansion passes have been moved after branch folding
and tail merging. They were before branch folding before because it did
not always update block livein's. That's fixed now. The pass change makes
independently since we want to properly schedule instructions after
branch folding / tail duplication.

rdar://10428165
rdar://10640363

llvm-svn: 147716
2012-01-07 03:02:36 +00:00
Evan Cheng
4009ad2e33 Copy implicit defs (e.g. r0) when changing tBX_RET to tPOP_RET. This bug is
exposed with an upcoming change will would delete the copy to return register
because there is no use! It's amazing anything works.

llvm-svn: 147715
2012-01-07 02:55:54 +00:00
Jakob Stoklund Olesen
536b4e24d8 Use movw+movt in ARMFastISel::ARMMaterializeGV.
This eliminates a lot of constant pool entries for -O0 builds of code
with many global variable accesses.

This speeds up -O0 codegen of consumer-typeset by 2x because the
constant island pass no longer has to look at thousands of constant pool
entries.

<rdar://problem/10629774>

llvm-svn: 147712
2012-01-07 01:47:05 +00:00
Andrew Trick
5b49f3b782 LSR: run DeleteDeadPhis before replaceCongruentPhis.
llvm-svn: 147711
2012-01-07 01:36:44 +00:00
Devang Patel
114ec077a0 Refactor.
Store AsmParser info locally. A small step towards emitting match entries for multiple asm variants.

llvm-svn: 147710
2012-01-07 01:33:34 +00:00
Andrew Trick
b228a75332 Cleanup comments and argument types related to my previous replaceCongruentPhis checkin.
llvm-svn: 147709
2012-01-07 01:29:21 +00:00
Devang Patel
d58787bd93 Eliminate an error check that may not work with all asm syntax variants.
llvm-svn: 147708
2012-01-07 01:22:23 +00:00
Andrew Trick
8a5a1e603e Extended replaceCongruentPhis to handle mixed phi types.
llvm-svn: 147707
2012-01-07 01:12:09 +00:00
Eric Christopher
09a41e8939 Make the 'x' constraint work for AVX registers as well.
Fixes rdar://10614894

llvm-svn: 147704
2012-01-07 01:02:09 +00:00
Andrew Trick
ff8a32f6eb Missing raw_ostream.h breaks MSVC build.
llvm-svn: 147703
2012-01-07 00:54:28 +00:00
Andrew Trick
0ec80535d9 comment typo
llvm-svn: 147701
2012-01-07 00:29:20 +00:00
Andrew Trick
60f6beef61 Expose isNonConstantNegative to users of ScalarEvolution.
llvm-svn: 147700
2012-01-07 00:27:31 +00:00
Chad Rosier
0710841e1e Add comment.
llvm-svn: 147696
2012-01-06 23:45:47 +00:00
Eric Christopher
6261307ea5 Add a comment and ensure that anyone else looking at this code doesn't start
to bleed from the eyes.

llvm-svn: 147695
2012-01-06 23:03:37 +00:00
Eric Christopher
354c1a6691 Use const vector references instead of a vector copy. Spotted by Devang.
llvm-svn: 147694
2012-01-06 23:03:34 +00:00
Eric Christopher
7b19a714c3 Use -> instead of (*iter).
llvm-svn: 147693
2012-01-06 23:03:27 +00:00
Jakob Stoklund Olesen
39a3fa2c29 Enable aligned NEON spilling by default.
Experiments show this to be a small speedup for modern ARM cores.

llvm-svn: 147689
2012-01-06 22:19:37 +00:00
Andrew Trick
d5553c6ad2 Put all IVUsers in the processed set. Allow querying IVUsers with isIVUserOrOperand.
llvm-svn: 147686
2012-01-06 21:41:55 +00:00
Jakob Stoklund Olesen
4a98287c88 Abort AdjustBBOffsetsAfter early when possible.
llvm-svn: 147685
2012-01-06 21:40:15 +00:00
Daniel Dunbar
3237171aa4 lit/lit.TestRunner: Add an extra_substitutions argument for executeShTest --
useful for test suites which want to piggyback onto the "shtest" format style.

llvm-svn: 147684
2012-01-06 21:39:06 +00:00
Andrew Trick
a2096be363 SCEVExpander: hoistStep should check strict dominance.
llvm-svn: 147683
2012-01-06 21:23:43 +00:00
Andrew Trick
3da57dd6b3 Tracing to help investigate issues with SjLj spill code.
llvm-svn: 147682
2012-01-06 21:16:27 +00:00
Chad Rosier
07ec6ac15d Initializing to false makes better sense. Thanks, David.
llvm-svn: 147679
2012-01-06 20:11:59 +00:00
Chad Rosier
a498c068f6 Fix uninitialized variable warning.
llvm-svn: 147676
2012-01-06 20:02:49 +00:00
Chad Rosier
990edbc5f1 Fix uninitialized variable warning.
llvm-svn: 147675
2012-01-06 19:59:58 +00:00
Eric Christopher
4da10009fd Fix a leak I noticed while reviewing the accelerator table changes. Passes
lldb testsuite.

rdar://10652330

llvm-svn: 147673
2012-01-06 19:35:04 +00:00
Kostya Serebryany
a7d1b796b9 [asan] cleanup: remove the SIGILL-related code (compiler part)
llvm-svn: 147667
2012-01-06 18:09:21 +00:00
Eli Bendersky
eadeb0383c Fix typo in string
llvm-svn: 147654
2012-01-06 07:49:17 +00:00
Eric Christopher
3f80f9acaa As part of the ongoing work in finalizing the accelerator tables, extend
the debug type accelerator tables to contain the tag and a flag
stating whether or not a compound type is a complete type.

rdar://10652330

llvm-svn: 147651
2012-01-06 04:35:23 +00:00
Dan Gohman
a4fde8485d Fix SpeculativelyExecuteBB to either speculate all or none of the phis
present in the bottom of the CFG triangle, as the transformation isn't
ever valuable if the branch can't be eliminated.

Also, unify some heuristics between SimplifyCFG's multiple
if-converters, for consistency.

This fixes rdar://10627242.

llvm-svn: 147630
2012-01-05 23:58:56 +00:00
Eli Friedman
5af9c3cbbb PR11705, part 2: globalopt shouldn't put inttoptr/ptrtoint operations into global initializers if there's an implied extension or truncation.
llvm-svn: 147625
2012-01-05 23:03:32 +00:00
Rafael Espindola
aaed8dbd04 Link symbols with different visibilities according to the rules in the
System V Application Binary Interface. This lets us use
-fvisibility-inlines-hidden with LTO.
Fixes PR11697.

llvm-svn: 147624
2012-01-05 23:02:01 +00:00
Dan Gohman
4fc691d9ef Revert r56315. When the instruction to speculate is a load, this
code can incorrectly move the load across a store. This never
happens in practice today, but only because the current
heuristics accidentally preclude it.

llvm-svn: 147623
2012-01-05 22:54:35 +00:00
Benjamin Kramer
509b7e6c60 Kill ObjectCodeEmitter and BinaryObject, they were unused and superseded by MC.
llvm-svn: 147618
2012-01-05 22:31:37 +00:00
Nick Lewycky
b02dd59b35 SCCCaptured is trivially false on entry to this loop and not modified inside it.
Eliminate the dead test for it on each loop iteration. No functionality change.

llvm-svn: 147616
2012-01-05 22:21:45 +00:00
Rafael Espindola
408112ede3 Remove the old ELF writer.
llvm-svn: 147615
2012-01-05 22:07:43 +00:00