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

10534 Commits

Author SHA1 Message Date
Gabor Greif
bd0b1357e0 must not peephole away side effects
llvm-svn: 113848
2010-09-14 20:46:08 +00:00
Devang Patel
632686ac96 Use frame index, if available for byval argument while lowering dbg_declare. Otherwise let getRegForValue() find register for this argument.
llvm-svn: 113843
2010-09-14 20:29:31 +00:00
Michael J. Spencer
90f807fda5 Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."
This reverts commit r113632

Conflicts:

	cmake/modules/AddLLVM.cmake

llvm-svn: 113819
2010-09-13 23:59:48 +00:00
Jakob Stoklund Olesen
52d3045d23 Mechanically replace LiveInterval* with LiveIntervalMap for intervals being
edited without actually using LiveIntervalMap functionality.

llvm-svn: 113816
2010-09-13 23:29:11 +00:00
Jakob Stoklund Olesen
060ad376c4 Allow LiveIntervalMap to be reused by resetting the current live interval.
llvm-svn: 113815
2010-09-13 23:29:09 +00:00
Jakob Stoklund Olesen
0e83d54b2a Let's just declare that it is impossible to construct a std::pair from a null
pointer and work around that.

llvm-svn: 113788
2010-09-13 21:29:45 +00:00
Benjamin Kramer
9859d9eee4 Fix linux/msvc build, move include.
llvm-svn: 113776
2010-09-13 20:04:49 +00:00
Eric Christopher
02df36a2fb Silence more warnings. Two more unused variables.
llvm-svn: 113771
2010-09-13 18:30:57 +00:00
John Thompson
ae3a86d6de Added skeleton for inline asm multiple alternative constraint support.
llvm-svn: 113766
2010-09-13 18:15:37 +00:00
Bill Wendling
038bcd275f Rename ConvertToSetZeroFlag to something more general.
llvm-svn: 113670
2010-09-11 00:13:50 +00:00
Bill Wendling
f2b0c99610 No need to recompute the SrcReg and CmpValue.
llvm-svn: 113666
2010-09-10 23:46:12 +00:00
Bill Wendling
e54ebc2cbe Move some of the decision logic for converting an instruction into one that sets
the 'zero' bit down into the back-end. There are other cases where this logic
isn't sufficient, so they should be handled separately.

llvm-svn: 113665
2010-09-10 23:34:19 +00:00
Bob Wilson
cc4cd788ec Fix a comment typo.
llvm-svn: 113653
2010-09-10 22:42:21 +00:00
Bill Wendling
dc260a07f6 Modify the comparison optimizations in the peephole optimizer to update the
iterator when an optimization took place. This allows us to do more insane
things with the code than just remove an instruction or two.

llvm-svn: 113640
2010-09-10 21:55:43 +00:00
Michael J. Spencer
98ad3f2ea7 CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.
llvm-svn: 113632
2010-09-10 21:14:25 +00:00
Devang Patel
346f59b31c Add DEBUG message.
llvm-svn: 113614
2010-09-10 20:32:09 +00:00
Evan Cheng
c9cb37516d Teach if-converter to be more careful with predicating instructions that would
take multiple cycles to decode.
For the current if-converter clients (actually only ARM), the instructions that
are predicated on false are not nops. They would still take machine cycles to
decode. Micro-coded instructions such as LDM / STM can potentially take multiple
cycles to decode. If-converter should take treat them as non-micro-coded
simple instructions.

llvm-svn: 113570
2010-09-10 01:29:16 +00:00
Jakob Stoklund Olesen
db1636ff8c Remove dead code.
llvm-svn: 113386
2010-09-08 18:50:24 +00:00
Jakob Stoklund Olesen
bd8da2d3ee Don't add <imp-def> operands during register rewriting.
LiveIntervals already adds <imp-def> operands for super-registers when a subreg
def defines the whole register. Thus, it is not necessary to do it again when
rewriting.

In fact, the super-register imp-defs caused miscompilations because the late
scheduler couldn't see that the super-register was read.

We still add super-reg <imp-use,kill> operands when rewriting virtuals to
physicals.

llvm-svn: 113299
2010-09-07 22:38:45 +00:00
Chris Lattner
6c08c3b321 add a comment about where this should eventually move.
llvm-svn: 113117
2010-09-05 20:33:40 +00:00
Lang Hames
af037cded6 Added initialisers for reduction rule counters.
llvm-svn: 113108
2010-09-05 13:42:32 +00:00
Chris Lattner
684ae57b8e implement rdar://6653118 - fastisel should fold loads where possible.
Since mem2reg isn't run at -O0, we get a ton of reloads from the stack,
for example, before, this code:

int foo(int x, int y, int z) {
  return x+y+z;
}

used to compile into:

_foo:                                   ## @foo
	subq	$12, %rsp
	movl	%edi, 8(%rsp)
	movl	%esi, 4(%rsp)
	movl	%edx, (%rsp)
	movl	8(%rsp), %edx
	movl	4(%rsp), %esi
	addl	%edx, %esi
	movl	(%rsp), %edx
	addl	%esi, %edx
	movl	%edx, %eax
	addq	$12, %rsp
	ret

Now we produce:

_foo:                                   ## @foo
	subq	$12, %rsp
	movl	%edi, 8(%rsp)
	movl	%esi, 4(%rsp)
	movl	%edx, (%rsp)
	movl	8(%rsp), %edx
	addl	4(%rsp), %edx    ## Folded load
	addl	(%rsp), %edx     ## Folded load
	movl	%edx, %eax
	addq	$12, %rsp
	ret

Fewer instructions and less register use = faster compiles.

llvm-svn: 113102
2010-09-05 02:18:34 +00:00
Jakob Stoklund Olesen
14f6dc4465 Remove dead code.
Clobber ranges are no longer used when joining physical registers.
Instead, all aliases are checked for interference.

llvm-svn: 113084
2010-09-04 21:09:33 +00:00
Chris Lattner
8df3ffd7ac zap dead code.
llvm-svn: 113073
2010-09-04 18:12:00 +00:00
Jim Grosbach
f61aac8c15 previous patch was a little too tricky for its own good. Don't try to
overload UserInInstr. Explicitly check Allocatable. The early exit in the
condition will mean the performance impact of the extra test should be
minimal.

llvm-svn: 113016
2010-09-03 21:45:15 +00:00
Bob Wilson
5170a69b9f Add a missing check when legalizing a vector extending load. This doesn't
solve the root problem, but it corrects the bug in the code I added to
support legalizing in the case where the non-extended type is also legal.

llvm-svn: 112997
2010-09-03 19:20:37 +00:00
Jakob Stoklund Olesen
0806eee7ae VirtRegRewriter checks for early clobbers before it reuses an available stack
slot.

Teach it to also check for early clobbered aliases, and early clobber operands
following the current operand.

This fixes the miscompilation in PR8044 where EC registers eax and ecx were
being used for inputs.

llvm-svn: 112988
2010-09-03 18:36:56 +00:00
Duncan Sands
e5c010f505 Reapply commit 112702 which was speculatively reverted by echristo.
Original commit message:
Use the SSAUpdator to turn calls to eh.exception that are not in a
landing pad into uses of registers rather than loads from a stack
slot.  Doesn't touch the 'orrible hack code - Bill needs to persuade
me harder :)

llvm-svn: 112952
2010-09-03 08:31:48 +00:00
Devang Patel
e431686861 There is no need to use .set here.
Thanks Chris!

llvm-svn: 112900
2010-09-02 23:01:10 +00:00
Devang Patel
5d3e68d22b Detect undef value early and save unnecessary NodeMap query.
llvm-svn: 112864
2010-09-02 21:29:42 +00:00
Dan Gohman
6824bfc554 Don't narrow the load and store in a load+twiddle+store sequence unless
there are clearly no stores between the load and the store. This fixes
this miscompile reported as PR7833.

This breaks the test/CodeGen/X86/narrow_op-2.ll optimization, which is
safe, but awkward to prove safe. Move it to X86's README.txt.

llvm-svn: 112861
2010-09-02 21:18:42 +00:00
Devang Patel
3080c6e860 Tidy up.
llvm-svn: 112858
2010-09-02 21:02:27 +00:00
Jim Grosbach
b35c81846b The scavenger should just use getAllocatableSet() rather than reinventing it
locally.

llvm-svn: 112845
2010-09-02 18:29:04 +00:00
Jim Grosbach
8a3babf59a Anti-dependency breaking needs to be careful not to use reserved regs
llvm-svn: 112832
2010-09-02 17:12:55 +00:00
Devang Patel
bbbd35d042 Fix .debug_range for linux. Patch by Krister Wombell.
llvm-svn: 112830
2010-09-02 16:43:44 +00:00
Lang Hames
e80abebead Added support for register allocators to record which intervals are spill intervals, and where the uses and defs of the original intervals were in the original code.
Spill intervals can be hidden using the "-rmf-intervals=virt-nospills*" option.

llvm-svn: 112811
2010-09-02 08:27:00 +00:00
Chandler Carruth
71b26a9243 Silence an ambiguous else warning from GCC.
llvm-svn: 112809
2010-09-02 07:08:05 +00:00
Lang Hames
d19ac535ea Added counters for PBQP reduction rules.
llvm-svn: 112807
2010-09-02 05:37:52 +00:00
Jim Grosbach
82a4ac2c83 Add a bit of debug output for register scavenging
llvm-svn: 112787
2010-09-02 00:51:37 +00:00
Jim Grosbach
9df54659d3 Tweak to ignoring reserved regs. The allocator was occasionally still looking
at them since they'd end up in the register weights list. Tell it to stop
doing that.

llvm-svn: 112756
2010-09-01 22:48:34 +00:00
Jakob Stoklund Olesen
fe11c81560 Teach RemoveCopyByCommutingDef to check all aliases, not just subregisters.
This caused a miscompilation in WebKit where %RAX had conflicting defs when
RemoveCopyByCommutingDef was commuting a %EAX use.

llvm-svn: 112751
2010-09-01 22:15:35 +00:00
Jim Grosbach
69ffc23491 tidy up trailing whitespace and an 80 column violation.
llvm-svn: 112746
2010-09-01 21:48:06 +00:00
Jim Grosbach
250d5e6af4 cleanup per feedback. use a helper function for getting the first non-reserved
physical register in a register class. Make sure to assert if the register
class is empty.

llvm-svn: 112743
2010-09-01 21:34:41 +00:00
Jim Grosbach
6de7c3ef19 The register allocator shouldn't consider allocating reserved registers. PBQP version.
llvm-svn: 112742
2010-09-01 21:23:03 +00:00
Jim Grosbach
18fc90c535 The register allocator shouldn't consider allocating reserved registers.
r112728 did this for fast regalloc.

llvm-svn: 112741
2010-09-01 21:04:27 +00:00
Jim Grosbach
4672574f24 The register allocator shouldn't consider allocating reserved registers.
llvm-svn: 112728
2010-09-01 19:28:41 +00:00
Jim Grosbach
f727f525cd tidy up a few 80-column and trailing whitespace bits.
llvm-svn: 112726
2010-09-01 19:16:29 +00:00
Eric Christopher
f72b7040a2 Speculatively revert 112699 and 112702, they seem to be causing
self host errors on clang-x86-64.

llvm-svn: 112719
2010-09-01 17:29:10 +00:00
Duncan Sands
6aa2784156 Use the SSAUpdator to turn calls to eh.exception that are not in a
landing pad into uses of registers rather than loads from a stack
slot.  Doesn't touch the 'orrible hack code - Bill needs to persuade
me harder :)

llvm-svn: 112702
2010-09-01 14:07:47 +00:00
Devang Patel
9e8ee9242f Use absolute label for DW_AT_stmt_list if a target does not prefer offset here.
This patch was developed on top of original patch by Artur Pietrek.

llvm-svn: 112678
2010-08-31 23:50:19 +00:00