1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

46268 Commits

Author SHA1 Message Date
Bill Wendling
50971fd69c The second part of the change from -fast to -O#. This changes the JIT to accept
an optimization level instead of a simple boolean telling it to generate code
"fast" or the other type of "fast".

llvm-svn: 70347
2009-04-29 00:32:19 +00:00
Bill Wendling
7546bed590 Second attempt:
Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to
use the old behavior, the flag is -O0. This change allows for finer-grained
control over which optimizations are run at different -O levels.

Most of this work was pretty mechanical. The majority of the fixes came from
verifying that a "fast" variable wasn't used anymore. The JIT still uses a
"Fast" flag. I'll change the JIT with a follow-up patch.

llvm-svn: 70343
2009-04-29 00:15:41 +00:00
Bill Wendling
5cbc488785 Correct comment.
llvm-svn: 70340
2009-04-29 00:09:22 +00:00
Dan Gohman
346c77f79d As with r70333, give the primary induction variable a use so
that it can't be trivially eliminated.

llvm-svn: 70334
2009-04-28 22:05:13 +00:00
Dan Gohman
5bb06cda1e Make this testcase slightly less trivial, so that it doesn't fail
if indvars happens to optimize away the unused primary induction
variable.

llvm-svn: 70333
2009-04-28 22:03:26 +00:00
Dan Gohman
211c5de27d Fix a grammaro in a comment.
llvm-svn: 70331
2009-04-28 21:54:23 +00:00
Anton Korobeynikov
1799ac4b55 Properly print 'P' modifier on inline asm memory operands.
This should fix PR3379 and PR4064.
Patch inspired by Edwin Török!

llvm-svn: 70328
2009-04-28 21:49:33 +00:00
Bob Wilson
6c49824b6f Fix trailing whitespace and 80-col. violations in recent TableGen changes.
llvm-svn: 70319
2009-04-28 19:41:44 +00:00
Evan Cheng
46e0ff09e5 Move getMatchingSuperReg() out of coalescer and into TargetRegisterInfo.
llvm-svn: 70309
2009-04-28 18:29:27 +00:00
Dale Johannesen
db6d3a77dc Test for llvm-gcc bug fixed by 70301.
llvm-svn: 70302
2009-04-28 17:16:30 +00:00
Sanjiv Gupta
19e7fe61ce GlobalValue is always pointer type, so an assert isn't required.
llvm-svn: 70300
2009-04-28 16:39:45 +00:00
Stefanus Du Toit
984008e1d7 Fix choice of version of Windows callback to use to consider not only the Visual Studio version, but also the Windows SDK version.
Patch by Tareq Siraj.

llvm-svn: 70299
2009-04-28 16:37:58 +00:00
Jakob Stoklund Olesen
6a489c6d7e Don't coalesce a physical register with an incompatible virtual register.
If the physical register does not belong to the virtual register's regclass,
don't coalesce. The physical register could be an invalid operand for an
instruction using the vreg.

The regclass matching is done after determining the actual subregisters being copied.

llvm-svn: 70298
2009-04-28 16:34:35 +00:00
Sanjiv Gupta
51c8ca2ca6 Initialized arrays can be in any address space.
llvm-svn: 70297
2009-04-28 16:34:20 +00:00
Jakob Stoklund Olesen
26d9b11da5 Move getSubRegisterRegClass from ScheduleDagSDNodesEmit.cpp to a TargetRegisterClass method.
Also make the method non-asserting. It will return NULL when given an invalid subreg index.

The method is needed by an upcoming patch.

llvm-svn: 70296
2009-04-28 16:34:09 +00:00
Evan Cheng
754a0d2f9e Fix PR4034. Bug in LiveInterval::join when it's compacting new valno's.
llvm-svn: 70291
2009-04-28 06:24:09 +00:00
Jakob Stoklund Olesen
a900530bf2 Initial test commit
llvm-svn: 70290
2009-04-28 06:15:00 +00:00
Evan Cheng
8a9736a26c Fix for PR4051. When 2address pass delete an instruction, update kill info when necessary.
llvm-svn: 70279
2009-04-28 02:12:36 +00:00
Bill Wendling
ef47ace92f r70270 isn't ready yet. Back this out. Sorry for the noise.
llvm-svn: 70275
2009-04-28 01:04:53 +00:00
Bill Wendling
2799e916c3 Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to
use the old behavior, the flag is -O0. This change allows for finer-grained
control over which optimizations are run at different -O levels.

Most of this work was pretty mechanical. The majority of the fixes came from
verifying that a "fast" variable wasn't used anymore. The JIT still uses a
"Fast" flag. I'm not 100% sure if it's necessary to change it there...

llvm-svn: 70270
2009-04-28 00:21:31 +00:00
Dan Gohman
418f294b3b Remove an obsolete comment.
llvm-svn: 70262
2009-04-27 22:12:34 +00:00
Dale Johannesen
626b0a32f7 Fix PR 4086, a bug in FP IV elimination.
llvm-svn: 70247
2009-04-27 21:03:15 +00:00
Evan Cheng
c315cf24e3 Fix PR4076. Correctly create live interval of physical register with two-address update.
llvm-svn: 70245
2009-04-27 20:42:46 +00:00
Dan Gohman
e1a532cb4f Permit ChangeCompareStride to rewrite a comparison when the factor
between the comparison's iv stride and the candidate stride is
exactly -1.

llvm-svn: 70244
2009-04-27 20:35:32 +00:00
Jeffrey Yasskin
114afdef8b Add tests for WeakVH and AssertingVH. These pointed out that the overloads for
the comparison operators were not only unnecessary in the presence of the
implicit conversion; they caused ambiguous overload errors. So I deleted them.

llvm-svn: 70243
2009-04-27 20:32:07 +00:00
Dan Gohman
ff30ebd710 Teach getZeroExtendExpr and getSignExtendExpr to use trip-count
information to simplify [sz]ext({a,+,b}) to {zext(a),+,[zs]ext(b)},
as appropriate.

These functions and the trip count code each call into the other, so
this requires careful handling to avoid infinite recursion. During
the initial trip count computation, conservative SCEVs are used,
which are subsequently discarded once the trip count is actually
known.

Among other benefits, this change lets LSR automatically eliminate
some unnecessary zext-inreg and sext-inreg operation where the
operand is an induction variable.

llvm-svn: 70241
2009-04-27 20:16:15 +00:00
Chris Lattner
c8838e7b00 give bitstreamreader an API to ignore names for blocks/records,
only llvm-bcanalyzer wants this info.

llvm-svn: 70239
2009-04-27 20:04:08 +00:00
Owen Anderson
b313524b03 Don't skip the CopyMI when removing kill markers.
This should have no effect on generated code, but makes the intermediate state
of the coalescer more sane.

llvm-svn: 70238
2009-04-27 19:55:47 +00:00
Duncan Sands
ae8fb3fbcb Now that PR2957 is resolved, remove a bunch of
no-longer needed workarounds.

llvm-svn: 70234
2009-04-27 19:33:03 +00:00
Dale Johannesen
2a494ee2e1 Test for (llvm-gcc) 70231.
llvm-svn: 70233
2009-04-27 19:15:09 +00:00
Nate Begeman
7902a2344d Revert accidental testcase reduction
llvm-svn: 70226
2009-04-27 18:42:40 +00:00
Nate Begeman
9d121924fd 2nd attempt, fixing SSE4.1 issues and implementing feedback from duncan.
PR2957

ISD::VECTOR_SHUFFLE now stores an array of integers representing the shuffle
mask internal to the node, rather than taking a BUILD_VECTOR of ConstantSDNodes
as the shuffle mask.  A value of -1 represents UNDEF.

In addition to eliminating the creation of illegal BUILD_VECTORS just to 
represent shuffle masks, we are better about canonicalizing the shuffle mask,
resulting in substantially better code for some classes of shuffles.

llvm-svn: 70225
2009-04-27 18:41:29 +00:00
Chris Lattner
bd53d3b24f Print statistics for each record kind saying the number of bits
and % abbreviated.  For example:

	Record Histogram:
		  Count    # Bits   % Abv  Record Kind
		  25738   3424174  100.00  SM_SLOC_INSTANTIATION_ENTRY
		    814    562079  100.00  SM_SLOC_FILE_ENTRY
		    798     34110          SM_HEADER_FILE_INFO
		      3     91104  100.00  SM_SLOC_BUFFER_BLOB
		      3       498  100.00  SM_SLOC_BUFFER_ENTRY
		      1       465          SM_LINE_TABLE

llvm-svn: 70215
2009-04-27 18:15:27 +00:00
Chris Lattner
23dfe61ece clean up the output of llvm-bcanalyzer by using printf
instead of ostreams for formatting.

llvm-svn: 70214
2009-04-27 17:59:34 +00:00
Evan Cheng
43fc90ae59 Fix PR4056. It's possible a physical register def is dead if its implicit use is deleted by two-address pass.
llvm-svn: 70213
2009-04-27 17:36:47 +00:00
Evan Cheng
c346651d6f Also delete last unused val#.
llvm-svn: 70212
2009-04-27 17:35:19 +00:00
Dan Gohman
a241dec2fc Rename GR8_ABCD to GR8_ABCD_L and create GR8_ABCD_H, and use these
to precisely describe the h-register subreg register classes.
Thanks to Jakob Stoklund Olesen for spotting this and for the
initial patch!

Also, make getStoreRegOpcode and getLoadRegOpcode aware of the
needs of h registers.

llvm-svn: 70211
2009-04-27 16:41:36 +00:00
Dan Gohman
180fa04e35 Rename GR8_, GR16_, GR32_, and GR64_ to GR8_ABCD, GR16_ABCD,
GR32_ABCD, and GR64_ABCD, respectively, to help describe them.

llvm-svn: 70210
2009-04-27 16:33:14 +00:00
Dan Gohman
885b9c3688 Break up long multi-mnemonic strings into separate lines for readability.
llvm-svn: 70209
2009-04-27 15:13:28 +00:00
Dan Gohman
4aeebb184b Fix the syntax for a PR number in a test.
llvm-svn: 70208
2009-04-27 15:08:34 +00:00
Duncan Sands
8ba0b4d4f2 Fix some confusion in the Ada f-e build instructions between
building without optimization and building with checking.

llvm-svn: 70205
2009-04-27 11:21:35 +00:00
Mon P Wang
904d654436 Revised 68749 to allow matching of load/stores for address spaces < 256.
llvm-svn: 70197
2009-04-27 07:22:10 +00:00
Nick Lewycky
5c4f46c2e9 Under unusual circumstances (jitting a function that causes the creation of
another stub, but then never calling the jitted function) can cause the JIT to
leave a stub in place. Judging by the comments this is a known deficiency, so
we're just not going to use AssertingVH for the StubToFunctionTy map.

Also shorten some lines longer than 80 columns.

This fixes the "make check" failure with ocaml on x86-64 linux.

llvm-svn: 70185
2009-04-27 05:09:44 +00:00
Sanjiv Gupta
e903d414ee Now that any size of integer indices are allowed for sequential types, remove the unneccessary gyan about promoting them.
llvm-svn: 70181
2009-04-27 03:21:00 +00:00
Dan Gohman
220d4325b0 Make this test slightly more strict.
llvm-svn: 70180
2009-04-27 03:05:26 +00:00
Dan Gohman
744f455d55 When transforming sext(trunc(load(x))) into sext(smaller load(x)),
the trunc is directly replaced with the smaller load, so don't
try to create a new sext node. This fixes PR4050.

llvm-svn: 70179
2009-04-27 02:00:55 +00:00
Dan Gohman
820b45049b Handle ands with ~0 correctly too. This fixes PR4052.
llvm-svn: 70176
2009-04-27 01:41:10 +00:00
Dan Gohman
74bf1cb52e Improve bugpoint's error messages when it runs out of memory,
or when some other std::exception is thrown.

llvm-svn: 70175
2009-04-27 01:30:37 +00:00
Chris Lattner
f84ee5d944 Add two new record types to the blockinfo block:
BLOCKNAME and SETRECORDNAME.  This allows a bitcode
file to be self describing with pretty names for 
records and blocks in addition to numbers.  This
enhances llvm-bcanalyzer to use this to print prettily.

llvm-svn: 70165
2009-04-26 22:21:57 +00:00
Chris Lattner
eae2abdfa3 make BitstreamCursor's copyable and assignable.
llvm-svn: 70159
2009-04-26 21:07:02 +00:00