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

68271 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen
1811e4cb20 Start using SplitKit and MachineLoopRanges in RegAllocGreedy in preparation of
live range splitting around loops guided by register pressure.

So far, trySplit() simply prints a lot of debug output.

llvm-svn: 121918
2010-12-15 23:46:13 +00:00
Jakob Stoklund Olesen
d40af5ffbd Add MachineLoopRanges analysis.
A MachineLoopRange contains the intervals of slot indexes covered by the blocks
in a loop. This representation of the loop blocks is more efficient to compare
against interfering registers during register coalescing.

llvm-svn: 121917
2010-12-15 23:41:23 +00:00
Bill Wendling
63ebdf4786 If we're changing the frame register to a physical register other than SP, we
need to use tLDRi and tSTRi instead of tLDRspi and tSTRspi respectively.

llvm-svn: 121915
2010-12-15 23:32:27 +00:00
Bill Wendling
ed6c88ead9 Whitespace cleanups.
llvm-svn: 121914
2010-12-15 23:31:24 +00:00
Bob Wilson
7e64a19960 Teach the Neon intrinsic generator to widen half-precision float types.
This isn't currently used for anything but I ran into it when experimenting
with some changes, and it might be useful in the future.

llvm-svn: 121911
2010-12-15 23:16:25 +00:00
Matt Beaumont-Gay
64b9dd6a4b Better fix for opt build
llvm-svn: 121910
2010-12-15 23:14:45 +00:00
Dan Gohman
4b073c7a7f Fix a typo that Bill spotted.
llvm-svn: 121909
2010-12-15 23:09:41 +00:00
Evan Cheng
72dca1ee17 Only rr forms of ADD*_DB are commutable.
llvm-svn: 121908
2010-12-15 22:57:36 +00:00
Rafael Espindola
37a22419ce Typo.
llvm-svn: 121906
2010-12-15 22:33:06 +00:00
Owen Anderson
aefeb448a9 Add an InstCombine transform to recognize instances of manual overflow-safe addition
(performing the addition in a wider type and explicitly checking for overflow), and
fold them down to intrinsics.  This currently only supports signed-addition, but could
be generalized if someone works out the magic constant formulas for other operations.

Fixes <rdar://problem/8558713>.

llvm-svn: 121905
2010-12-15 22:32:38 +00:00
Matt Beaumont-Gay
d59894002d Fix opt -Werror build
llvm-svn: 121904
2010-12-15 22:21:20 +00:00
Evan Cheng
68e1ed8752 Teach machine cse to commute instructions.
llvm-svn: 121903
2010-12-15 22:16:21 +00:00
Bob Wilson
438a9a1367 Add Neon VCVT instructions for f32 <-> f16 conversions.
Clang is now providing intrinsics for these and so we need to support them
in the backend.  Radar 8068427.

llvm-svn: 121902
2010-12-15 22:14:12 +00:00
Bob Wilson
1082705e72 Fix misspelled target triples in MC/ARM test commands.
llvm-svn: 121901
2010-12-15 22:14:01 +00:00
Dan Gohman
7c7b24af4d Reapply r121886, and also update DecomposeGEPExpression to keep
it in sync.

llvm-svn: 121895
2010-12-15 20:49:55 +00:00
Jakob Stoklund Olesen
1fc1f0c4a0 Add SlotIndexes::getMBBRange() to get the range of a basic block in a single
lookup.

llvm-svn: 121893
2010-12-15 20:40:22 +00:00
Dan Gohman
4f6b802044 Revert r121886. DecomposeGEPExpression needs to be kept
in sync.

llvm-svn: 121892
2010-12-15 20:39:25 +00:00
Wesley Peck
2a376c535e Lower the MBlaze target specific calling conventions for "interrupt_handler"
and "save_volatiles" correctly. This completes the custom calling convention
functionality changes for the MBlaze backend that were started in 121888.

llvm-svn: 121891
2010-12-15 20:27:28 +00:00
Wesley Peck
66ff11fc09 Adding target specific calling conventions to support the MBlaze GCC function
attributes "interrupt_handle" and "save_volatiles". Support for lowering these
correctly will be in an upcoming commit.

llvm-svn: 121888
2010-12-15 20:14:09 +00:00
Dan Gohman
8b09daa387 Strengthen GetUnderlyingObject using InstructionSimplify.
While LLVM's main design is that analysis code shouldn't
go out of its way to understand code which hasn't been
InstCombined, analysis utility routines like this can
find themselves being called in the middle of transform
passes when instcombine hasn't had a chance to run.

llvm-svn: 121886
2010-12-15 20:10:26 +00:00
Dan Gohman
295ba3ab26 Move Value::getUnderlyingObject to be a standalone
function so that it can live in Analysis instead of
VMCore.

llvm-svn: 121885
2010-12-15 20:02:24 +00:00
Wesley Peck
be7405993f Add some special purpose register definitions to the MBlaze backend and cleanup some old, unused floating point register definitions.
llvm-svn: 121882
2010-12-15 19:35:36 +00:00
Owen Anderson
1bf81c7f14 Fix typo in r121875.
llvm-svn: 121880
2010-12-15 19:24:24 +00:00
Jim Grosbach
30e7f0d09e Tweak a few pseudo-inst pattern base classes.
llvm-svn: 121878
2010-12-15 19:03:16 +00:00
Nick Lewycky
44b582fb69 Clean up some of LVI:
* mergeIn now uses constant folding for constants that are provably not-equal.
 * sink some sanity checks from the get*() methods into the mark*() methods, to ensure that we never have a constant/notconstant ConstantInt
 * some textual cleanups, whitespace changes, removing "else" after return, that sort of thing.

llvm-svn: 121877
2010-12-15 18:57:18 +00:00
Jim Grosbach
8278d5692a The new t2LEApcrel* pseudo instructions need the size specified.
rdar://8768390

llvm-svn: 121876
2010-12-15 18:48:45 +00:00
Owen Anderson
202d654195 Implement cleanups suggested by Daniel.
llvm-svn: 121875
2010-12-15 18:48:27 +00:00
Dan Gohman
0b9ddf4485 Document some more AliasAnalysis infrastructure limitations.
llvm-svn: 121874
2010-12-15 18:45:20 +00:00
Jakob Stoklund Olesen
3cfea82733 Fix build.
llvm-svn: 121872
2010-12-15 18:07:48 +00:00
Jakob Stoklund Olesen
308656b955 Detect and enumerate bypass loops.
Bypass loops have the current live range live through, but contain no uses or
defs. Splitting around a bypass loop can free registers for other uses inside
the loop by spilling the split range.

llvm-svn: 121871
2010-12-15 17:49:52 +00:00
Jakob Stoklund Olesen
849388944e Separate SplitAnalysis::getSplitLoops().
This method returns the set of loops with uses that are candidates for
splitting.

llvm-svn: 121870
2010-12-15 17:41:19 +00:00
Bob Wilson
3e4aa8ec69 Add a Neon intrinsic test generator.
This is still a WIP.  It's already good enough to expose a few bugs, though.

llvm-svn: 121868
2010-12-15 16:58:45 +00:00
Bob Wilson
114df2f88a Fix Neon intrinsic immediate range checking for some double-register operands.
Some quad-register intrinsics with lane operands only take a double-register
operand for the vector containing the lane.  The valid range of lane numbers
is then half as big as you would expect from the quad-register type.
Note: This currently has no effect because those intrinsics are now handled
entirely in the header file using __builtin_shufflevector, which does its own
range checking, but I want to use this for generating tests.

llvm-svn: 121867
2010-12-15 16:58:42 +00:00
Duncan Sands
2699fb1072 Move Sub simplifications and additional Add simplifications out of
instcombine and into InstructionSimplify.

llvm-svn: 121861
2010-12-15 14:07:39 +00:00
Duncan Sands
a9b837f7c7 If we detect that the instruction we are simplifying is unreachable, arrange for
it to be replaced by undef rather than not replaced at all, the idea being that
this may reduce the amount of work done by whoever called InstructionSimplify.

llvm-svn: 121860
2010-12-15 11:02:22 +00:00
Frits van Bommel
83b7c3773f Teach jump threading to "look through" a select when the branch direction of a terminator depends on it.
When it sees a promising select it now tries to figure out whether the condition of the select is known in any of the predecessors and if so it maps the operands appropriately.

llvm-svn: 121859
2010-12-15 09:51:20 +00:00
Bill Wendling
ab9df10ee5 Add fixups for Thumb LDR/STR instructions.
llvm-svn: 121858
2010-12-15 08:51:02 +00:00
Rafael Espindola
94d026d157 Relax alignment fragments.
With this we don't need the EffectiveSize field anymore. Without that field
LayoutFragment only updates offsets and we don't need to invalidate the
current fragment when it is relaxed (only the ones following it).

This is also a very small improvement in the accuracy of the layout info as
we now use the after relaxation size immediately.

llvm-svn: 121857
2010-12-15 08:45:53 +00:00
Rafael Espindola
f55f520a7a Patch by David Meyer to avoid a O(N^2) behaviour when relaxing fragments.
Since we now don't update addresses so early, we might relax a bit more than
we need to. This is simillar to the issue in PR8467.

llvm-svn: 121856
2010-12-15 07:39:29 +00:00
Chris Lattner
63d08e3444 add another overflow idiom
llvm-svn: 121854
2010-12-15 07:28:58 +00:00
Chris Lattner
ec899c30d9 add a note about overflow idiom recognition.
llvm-svn: 121853
2010-12-15 07:25:55 +00:00
Rafael Espindola
102a0b7b74 Generalize an assert.
llvm-svn: 121851
2010-12-15 07:12:24 +00:00
Chris Lattner
82b8cda077 add a shift/imul missed optimization
llvm-svn: 121850
2010-12-15 07:10:43 +00:00
Chris Lattner
d2022fee87 add a note about a SPEC hack that gcc mainline does.
llvm-svn: 121849
2010-12-15 06:38:24 +00:00
Chris Lattner
81815cd4db take care of some todos, transforming [us]mul_lohi into
a wider mul if the wider mul is legal.

llvm-svn: 121848
2010-12-15 06:04:19 +00:00
Chris Lattner
3bec2e7d0d merge two tests
llvm-svn: 121847
2010-12-15 05:58:59 +00:00
Chris Lattner
746d6a1f60 when transforming a MULHS into a wider MUL, there is no need to SRA the
result, the top bits are truncated off anyway, just use SRL.

llvm-svn: 121846
2010-12-15 05:51:39 +00:00
Chris Lattner
1499119975 make qsort predicate more conformant by returning 0 for equal values.
llvm-svn: 121838
2010-12-15 04:52:41 +00:00
Chris Lattner
e1ee3c537d various cleanups to tblgen, patch by Garrison Venn!
llvm-svn: 121837
2010-12-15 04:48:22 +00:00
Bill Wendling
0611f0ab0b Add mention that we support FreeBSD/amd64.
llvm-svn: 121832
2010-12-15 01:35:55 +00:00