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

28078 Commits

Author SHA1 Message Date
Dan Gohman
63bab48951 Implement getSCEVAtScope for SCEV cast expressions.
llvm-svn: 70422
2009-04-29 22:29:01 +00:00
Dan Gohman
06aff30f01 Generalize the cast-of-addrec folding to handle folding of SCEVs like
(sext i8 {-128,+,1} to i64) to i64 {-128,+,1}, where the iteration
crosses from negative to positive, but is still safe if the trip
count is within range.

llvm-svn: 70421
2009-04-29 22:28:28 +00:00
Dan Gohman
8b1b8d5891 Reword and tidy up some comments.
llvm-svn: 70416
2009-04-29 22:01:05 +00:00
Jakob Stoklund Olesen
0bfaaea2a4 MachineInstr::isRegTiedTo{Use,Def}Operand can safely be made const.
llvm-svn: 70408
2009-04-29 20:57:16 +00:00
Dan Gohman
55befacc69 Include the source type in SCEV cast expression debug output, and
print sext, zext, and trunc, instead of signextend, zeroextend,
and truncate, respectively, for consistency with the main IR.

llvm-svn: 70405
2009-04-29 20:27:52 +00:00
Nate Begeman
e4dd5a96ba Update comment, replace theoretically impossible check with an assert.
llvm-svn: 70391
2009-04-29 18:13:31 +00:00
Dale Johannesen
15486ddd95 Fix recent regression in gcc.dg/pr26719.c (6835035).
llvm-svn: 70386
2009-04-29 16:38:47 +00:00
Evan Cheng
62fdc300dd spillPhysRegAroundRegDefsUses() may have invalidated iterators stored in fixed_ IntervalPtrs. Reset them.
llvm-svn: 70378
2009-04-29 07:16:34 +00:00
Nate Begeman
414534b3eb Implement review feedback for vector shuffle work.
llvm-svn: 70372
2009-04-29 05:20:52 +00:00
Sanjiv Gupta
b1c777e865 Add a public method called getAddressSpace() to the GlobalAddressSDNode.
llvm-svn: 70366
2009-04-29 04:43:24 +00:00
Chris Lattner
e1eefefdc3 Disable the load-shrinking optimization from looking at
anything larger than 64-bits, avoiding a crash.  This should
really be fixed to use APInts, though type legalization happens
to help us out and we get good code on the attached testcase at
least.

This fixes rdar://6836460

llvm-svn: 70360
2009-04-29 03:45:07 +00:00
Dan Gohman
4f8ccd5bc8 Update comments to reflect the current code.
llvm-svn: 70357
2009-04-29 01:54:20 +00:00
Evan Cheng
51727d25b2 Determine allocation 'preference' with right register class. I haven't seen this changing codegen so no test case.
llvm-svn: 70351
2009-04-29 00:42:27 +00:00
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
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
Evan Cheng
46e0ff09e5 Move getMatchingSuperReg() out of coalescer and into TargetRegisterInfo.
llvm-svn: 70309
2009-04-28 18:29:27 +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
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
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
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
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
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
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
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
Chris Lattner
a43dcba929 Make a major API change to BitstreamReader: split all the reading
state out of the BitstreamReader class into a BitstreamCursor class.
Doing this allows the client to have multiple cursors into the same
file, each with potentially different live block stacks and
abbreviation records.

llvm-svn: 70157
2009-04-26 20:59:02 +00:00
Sanjiv Gupta
0877e1eabe Any size of integral indices are allowed in gep for indexing into sequential types. Also adding a test case to check the indices type allowed into struct.
llvm-svn: 70134
2009-04-26 17:14:35 +00:00
Chris Lattner
f795b63fb2 testcase and asmparser fix for PR4066
llvm-svn: 70080
2009-04-25 21:26:00 +00:00
Chris Lattner
034358326a Allow aliasee to be a GEP or bitcast instead of just a bitcast.
The real fix for this whole mess is to require the operand of the
alias to be a *GlobalValue* (not a general constant, including 
constant exprs) but allow the operand and the alias type to be
unrelated.

This fixes PR4066

llvm-svn: 70079
2009-04-25 21:23:19 +00:00
Evan Cheng
cd5a58a3e4 Reuse unused val#'s to avoid running out of memory in extreme cases.
llvm-svn: 70069
2009-04-25 20:20:15 +00:00
Chris Lattner
d68b203337 Fix PR4040: APInt's string constructor is too strict
patch by Jeff Yasskin!

llvm-svn: 70058
2009-04-25 18:34:04 +00:00
Chris Lattner
b47e34ac59 add support for detecting process features on win64, patch by
Nicolas Capens!

llvm-svn: 70057
2009-04-25 18:27:23 +00:00