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

61770 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen
9a567d08e5 Teach AdjustCopiesBackFrom to also use CoalescerPair to identify compatible copies.
llvm-svn: 106780
2010-06-24 20:16:00 +00:00
Dale Johannesen
257b602b8b Disallow matching "i" constraint to symbol addresses when
address requires a register or secondary load to compute
(most PIC modes).  This improves "g" constraint handling.  8015842.

The test from 2007 is attempting to test the fix for PR1761,
but since -relocation-model=static doesn't work on Darwin
x86-64, it was not testing what it was supposed to be testing
and was passing erroneously.  Fixed to use Linux x86-64.

llvm-svn: 106779
2010-06-24 20:14:51 +00:00
Eric Christopher
7405c7bdb8 Silence some unused variable warnings.
llvm-svn: 106778
2010-06-24 20:14:34 +00:00
Jakob Stoklund Olesen
1a6a8cfc51 Remove the -fast-spill option.
This code path has never really been used, and we are going to be handling
spilling through the Spiller interface in the future.

llvm-svn: 106777
2010-06-24 19:56:08 +00:00
Dan Gohman
47d999b275 Document problems that I encountered when working on -scev-aa.
llvm-svn: 106776
2010-06-24 19:34:03 +00:00
Evan Cheng
c3976de390 Oops. IT block formation pass needs to be run at any optimization level.
llvm-svn: 106775
2010-06-24 19:10:14 +00:00
Bill Wendling
09bb5dd804 Loosen up the requirements in the Horrible Hack(tm) to include all selectors
which don't have a catch-all associated with them not just clean-ups. This fixes
the SingleSource/Benchmarks/Shootout-C++/except.cpp testcase that broke because
of my change r105902.

llvm-svn: 106772
2010-06-24 18:49:10 +00:00
Eli Friedman
0698ec53f6 Always allow Thumb-2 SXTB, SXTH, UXTB, and UXTH. Fixes PR7324.
llvm-svn: 106770
2010-06-24 18:20:04 +00:00
Jakob Stoklund Olesen
9f8104463f Replace a big gob of old coalescer logic with the new CoalescerPair class.
CoalescerPair can determine if a copy can be coalesced, and which register gets
merged away. The old logic in SimpleRegisterCoalescing had evolved into
something a bit too convoluted.

This second attempt fixes some crashes that only occurred Linux.

llvm-svn: 106769
2010-06-24 18:15:01 +00:00
Dan Gohman
b9c2ab6698 Add an exports file for the Hello example plugin.
llvm-svn: 106768
2010-06-24 17:36:51 +00:00
Jakob Stoklund Olesen
3ac29b4f55 Print the LSBs of a SlotIndex symbolically using letters referring to the
[L]oad, [u]se, [d]ef, or [S]tore slots.

This makes it easier to see if two indices refer to the same instruction,
avoiding mental mod 4 calculations.

llvm-svn: 106766
2010-06-24 17:31:07 +00:00
Dan Gohman
e457bb6d5a Simplify this code; switch lowering shouldn't produce cases
which trivially fold away.

llvm-svn: 106765
2010-06-24 17:08:31 +00:00
Dan Gohman
dc46a52b6a A few minor micro-optimizations.
llvm-svn: 106764
2010-06-24 16:57:52 +00:00
Dan Gohman
006947c4da Teach getExactSDiv to evaluate x/1 to x up front, as it's a common
enough special case, and it theoretically allows more folding because
it works even when x is unanalyzable.

llvm-svn: 106763
2010-06-24 16:51:25 +00:00
Bob Wilson
26297589b7 PR7458: Try commuting Thumb2 instruction operands to put them into 2-address
form so they can be narrowed to 16-bit instructions.

llvm-svn: 106762
2010-06-24 16:50:20 +00:00
Bob Wilson
2b2d62ad11 Edit and clarify comments for TargetInstrInfo methods:
None of the existing implementations of commuteInstruction create new
instructions unless the NewMI parameter is true, but the comment had
implied otherwise.

findCommutedOpIndices returns false, not true, when it doesn't know
how to commute the instruction.

llvm-svn: 106761
2010-06-24 16:48:26 +00:00
Dan Gohman
bfbfa95b51 Don't try to preserve pointer types in SCEVConstants; the old code
was over-complicated.

llvm-svn: 106760
2010-06-24 16:47:03 +00:00
Dan Gohman
bb9ce7fbcd Fix copy+pasto issues in isMulSExtable.
llvm-svn: 106759
2010-06-24 16:45:11 +00:00
Dan Gohman
35a5a7285a Make the trunc code consistent with the zext and sext code in its
handling of pointer types.

llvm-svn: 106757
2010-06-24 16:33:38 +00:00
Dan Gohman
4f088f99fe Add a comment about a thread safety issue in Statistic.h.
llvm-svn: 106756
2010-06-24 16:31:32 +00:00
Dan Gohman
abeebe353c Add overloads for getFile and getFileOrSTDIN which take a const char *
instead of a StringRef, avoiding the need to copy the string in the
common case.

llvm-svn: 106754
2010-06-24 16:25:50 +00:00
Jakob Stoklund Olesen
f01eb3aab6 Be more strict about subreg-to-subreg copies in CoalescerPair.
Also keep track of the original DstREg before subregister adjustments.

llvm-svn: 106753
2010-06-24 16:19:28 +00:00
Gabor Greif
b81fcc907e use ArgOperand API
llvm-svn: 106752
2010-06-24 16:11:44 +00:00
Jakob Stoklund Olesen
a65e246ecf Verify that VNI kills are pointing to existing instructions.
In this case it is essential that the kill is real because the spiller will
decide to omit a spill if it thinks there is a later kill.

llvm-svn: 106751
2010-06-24 15:56:59 +00:00
Gabor Greif
04a3ec3771 use (even more, still) ArgOperand API
llvm-svn: 106750
2010-06-24 15:51:11 +00:00
Dan Gohman
d79ac4a097 Eliminate the other half of the BRCOND optimization, and update
as many tests as possible.

llvm-svn: 106749
2010-06-24 15:24:03 +00:00
Dan Gohman
3285057a9d Eliminate the first have of the optimization which eliminates BRCOND
when the condition is constant. This optimization shouldn't be
necessary, because codegen shouldn't be able to find dead control
paths that the IR-level optimizer can't find. And it's undesirable,
because it encourages bugpoint to leave "br i1 false" branches
in its output. And it wasn't updating the CFG.

I updated all the tests I could, but some tests are too reduced
and I wasn't able to meaningfully preserve them.

llvm-svn: 106748
2010-06-24 15:04:11 +00:00
Gabor Greif
520f2c6cb9 use ArgOperand API and CallSite for arg range; add necessary casts and perform some cosmetics
llvm-svn: 106747
2010-06-24 14:42:01 +00:00
Dan Gohman
a08a9b8a0b Reapply r106634, now that the bug it exposed is fixed.
llvm-svn: 106746
2010-06-24 14:30:44 +00:00
Gabor Greif
63d0d93613 use ArgOperand API and CallSite for arg range
llvm-svn: 106745
2010-06-24 14:13:36 +00:00
Gabor Greif
55a6d5f8c5 use (even more) ArgOperand API
llvm-svn: 106744
2010-06-24 13:54:33 +00:00
Gabor Greif
37ff2f8455 use ArgOperand API
llvm-svn: 106743
2010-06-24 13:42:49 +00:00
Gabor Greif
f53212a5a3 use ArgOperand API
llvm-svn: 106740
2010-06-24 12:58:35 +00:00
Gabor Greif
c7140da218 use ArgOperand API
llvm-svn: 106737
2010-06-24 12:35:13 +00:00
Gabor Greif
847eba58d8 use ArgOperand API, also tighten the type of visitFree to make this work out smoothly
llvm-svn: 106736
2010-06-24 12:21:15 +00:00
Gabor Greif
06307766e9 use ArgOperand API; introduce downcasted pointers into scope to facilitate this
llvm-svn: 106734
2010-06-24 12:03:56 +00:00
Gabor Greif
29b71efff8 use ArgOperand API
llvm-svn: 106731
2010-06-24 10:42:46 +00:00
Gabor Greif
014e415167 use ArgOperand API
llvm-svn: 106730
2010-06-24 10:17:17 +00:00
Gabor Greif
37d6595a5d use callsite to obtain all arguments
llvm-svn: 106729
2010-06-24 10:04:07 +00:00
Gabor Greif
14afc1e2d9 use callsite to obtain all arguments
llvm-svn: 106728
2010-06-24 09:56:43 +00:00
Chris Lattner
606dc0529b Teach the x86 mc assembler that %dr6 = %db6, this implements
rdar://8013734

llvm-svn: 106725
2010-06-24 07:29:18 +00:00
Chris Lattner
877cc43dbb more cleanups
llvm-svn: 106724
2010-06-24 07:18:14 +00:00
Chris Lattner
57b7692849 reduce indentation
llvm-svn: 106723
2010-06-24 07:16:25 +00:00
Chris Lattner
ec4bb143ef fix breakage from r98938 by correctly marking msp430 calls as variadic.
Patch by Ben Ransford!

llvm-svn: 106722
2010-06-24 06:46:50 +00:00
Dan Gohman
214ba7c014 Fix a bug in the code which determines when it's safe to use the
bt instruction, which was exposed by r106263.

llvm-svn: 106718
2010-06-24 02:07:59 +00:00
Eric Christopher
657b8b040e Add a couple more quick comments.
llvm-svn: 106717
2010-06-24 02:07:57 +00:00
Dan Gohman
7953fd5824 Optimize the "bit test" code path for switch lowering in the
case where the bit mask has exactly one bit.

llvm-svn: 106716
2010-06-24 02:06:24 +00:00
Jakob Stoklund Olesen
1c9d50ed92 Revert "Replace a big gob of old coalescer logic with the new CoalescerPair class."
Whiny buildbots.

llvm-svn: 106710
2010-06-24 00:52:22 +00:00
Gabor Greif
39ff38468c use getNumArgOperands
llvm-svn: 106709
2010-06-24 00:48:48 +00:00
Gabor Greif
1d1526999b use ArgOperand API
llvm-svn: 106707
2010-06-24 00:44:01 +00:00