Dale Johannesen
4a0054dc9a
Teach coalescer about earlyclobber bits.
...
Check bits for preferred register.
llvm-svn: 56384
2008-09-20 02:03:04 +00:00
Evan Cheng
270178bdda
Fix PR2808. When regalloc runs out of register, it spill a physical register around the live interval being allocated. Do not continue to try to spill another register, just grab the physical register and move on.
...
llvm-svn: 56381
2008-09-20 01:28:05 +00:00
Evan Cheng
c01e6c2f59
Clean up the test.
...
llvm-svn: 56380
2008-09-20 01:26:27 +00:00
Evan Cheng
6a86ec1ef0
No need to print function stubs for Mac OS X 10.5 and up. Linker will handle it.
...
llvm-svn: 56378
2008-09-20 00:13:45 +00:00
Evan Cheng
7bcd8409b7
80 column violation.
...
llvm-svn: 56377
2008-09-20 00:13:08 +00:00
Dan Gohman
af1eeb6421
Fix a FastISel GlobalVariable CSE bug.
...
llvm-svn: 56376
2008-09-19 23:42:04 +00:00
Evan Cheng
23e36297d6
Continue after removing the current MI.
...
llvm-svn: 56372
2008-09-19 22:49:39 +00:00
Dan Gohman
f66b3277d3
Refactor X86SelectConstAddr, folding it into X86SelectAddress. This
...
results in better code for globals. Also, unbreak the local CSE for
GlobalValue stub loads.
llvm-svn: 56371
2008-09-19 22:16:54 +00:00
Dale Johannesen
312df3aa6d
Make earlyclobber stuff work when virtual regs
...
have previously been assigned conflicting physreg.
llvm-svn: 56364
2008-09-19 18:52:31 +00:00
Bill Wendling
505ec388e2
Prevent warning about conversion from 64-bit to 32-bit by (yuck) casting...
...
llvm-svn: 56359
2008-09-19 18:34:40 +00:00
Dan Gohman
192b12c522
Now that ConstantSDNode doesn't hold an APInt,
...
use ARG_FLAGSSDNode as the most aligned node type,
as it contains an int64_t, which is 8-byte
aligned on mingw.
llvm-svn: 56358
2008-09-19 18:09:19 +00:00
Ted Kremenek
543bdab683
Added static methods to APSInt: getMinValue and getMaxValue.
...
llvm-svn: 56355
2008-09-19 18:01:14 +00:00
Evan Cheng
14493ffe78
Re-materalized definition instructions may be dead. Whack them.
...
llvm-svn: 56352
2008-09-19 17:38:47 +00:00
Gabor Greif
984ba5a313
backing out my last commit, it was not intended to go on the trunk
...
llvm-svn: 56349
2008-09-19 15:13:20 +00:00
Gabor Greif
67fa076542
first shot at removing Use::Val
...
untested, Use::swap() is definitely not done yet
llvm-svn: 56348
2008-09-19 15:03:57 +00:00
Duncan Sands
317cef874d
Turn on the AddReadAttrs pass.
...
llvm-svn: 56345
2008-09-19 14:34:36 +00:00
Duncan Sands
df9829409c
Add test for improvement of readonly to readnone,
...
and non-demotion of readnone to readonly.
llvm-svn: 56344
2008-09-19 09:20:05 +00:00
Duncan Sands
6c31b40cef
Turn on these tests!
...
llvm-svn: 56343
2008-09-19 09:16:32 +00:00
Duncan Sands
b2b5ddfaf6
Remove the MarkModRef pass (use AddReadAttrs instead).
...
Unfortunately this means removing one regression test
of GlobalsModRef because I couldn't work out how to
perform it without MarkModRef.
llvm-svn: 56342
2008-09-19 08:23:44 +00:00
Duncan Sands
c2ff9ca568
Add a new pass AddReadAttrs which works out which functions
...
can get the readnone/readonly attributes, and gives them it.
The plan is to remove markmodref (which did the same thing
by querying GlobalsModRef) and delete the analogous
functionality from GlobalsModRef.
llvm-svn: 56341
2008-09-19 08:17:05 +00:00
Duncan Sands
bb48df5839
Test the callgraph directly for the missing edge.
...
llvm-svn: 56338
2008-09-19 08:01:57 +00:00
Duncan Sands
aaa27f4261
Teach -callgraph to always print the callgraph (as the
...
description says it does), not just when -analyze is
used as well. This means printing to stderr, so adjust
some tests.
llvm-svn: 56337
2008-09-19 07:57:09 +00:00
Dale Johannesen
214ddc92d0
Remove AsmThatEarlyClobber etc. from LiveIntervalAnalysis
...
and redo as linked list walk. Logic moved into RA.
Per review feedback.
llvm-svn: 56326
2008-09-19 01:02:35 +00:00
Devang Patel
1e7ddf5d31
splitLoop does not handle split condition EQ.
...
Fixes PR 2805
llvm-svn: 56321
2008-09-18 23:45:14 +00:00
Dan Gohman
71b1f15917
Address-mode folding for X86FastISel. It's pretty basic, but it
...
catches a fair number of common cases. Note that this currently
causes Fast-ISel to leave behind lots of dead instructions.
Those will be dealt with in subsequent commits.
llvm-svn: 56320
2008-09-18 23:23:44 +00:00
Bill Wendling
aadf9b22a7
Decrementing the iterator here could be wrong if the worklist is empty after the "erase".
...
Thanks to Ji Young Park for the patch!
llvm-svn: 56316
2008-09-18 23:04:18 +00:00
Devang Patel
201223af46
Try to place hoisted instructions befoe icmp instruction.
...
llvm-svn: 56315
2008-09-18 22:50:42 +00:00
Evan Cheng
bcd694a1b4
Somehow RegAllocLinearScan is keeping two pointers to MachineRegisterInfo.
...
llvm-svn: 56314
2008-09-18 22:38:47 +00:00
Dan Gohman
e1c4ad399a
Simplify this code. The FastISel class has its own TD member.
...
llvm-svn: 56311
2008-09-18 18:26:43 +00:00
Dan Gohman
9dc56fbe40
Don't consider instructions with implicit physical register
...
defs to be necessarily live.
llvm-svn: 56310
2008-09-18 18:22:32 +00:00
Tanya Lattner
e5fe7f7369
Upgrade doxygen.
...
llvm-svn: 56308
2008-09-18 16:32:28 +00:00
Dan Gohman
b7c5b0f44b
Add a new "fast" scheduler. This is currently basically just a
...
copy of the BURRList scheduler, but with several parts ripped
out, such as backtracking, online topological sort maintenance
(needed by backtracking), the priority queue, and Sethi-Ullman
number computation and maintenance (needed by the priority
queue). As a result of all this, it generates somewhat lower
quality code, but that's its tradeoff for running about 30%
faster than list-burr in -fast mode in many cases.
This is somewhat experimental. Moving forward, major pieces of
this can be refactored with pieces in common with
ScheduleDAGRRList.cpp.
llvm-svn: 56307
2008-09-18 16:26:26 +00:00
Evan Cheng
a0459a1c5a
Preliminary support for systems which require changing JIT memory regions privilege from read / write to read / executable.
...
llvm-svn: 56303
2008-09-18 07:54:21 +00:00
Evan Cheng
6acdef5d11
Duh. Default to ARMCC::AL (always).
...
llvm-svn: 56301
2008-09-18 07:28:19 +00:00
Evan Cheng
99a186e39f
Clean up.
...
llvm-svn: 56300
2008-09-18 07:27:23 +00:00
Evan Cheng
b44e839f76
Cosmetic.
...
llvm-svn: 56299
2008-09-18 07:24:33 +00:00
Dan Gohman
5fbd0e95f3
FastISel: For calls, prefer using the callee's address as a constant
...
over having it in a register. And wait until after checking type
legality before requesting that the callee address be placed in a
register. Also, fix support for calls with void return type.
This speeds up fast-isel isel time by about 15% and reduces
instruction counts by about 3% overall on certain testcases. It also
changes many indirect calls to direct calls.
llvm-svn: 56292
2008-09-17 21:18:49 +00:00
Dale Johannesen
99091ed94f
Add a bit to mark operands of asm's that conflict
...
with an earlyclobber operand elsewhere. Propagate
this bit and the earlyclobber bit through SDISel.
Change linear-scan RA not to allocate regs in a way
that conflicts with an earlyclobber. See also comments.
llvm-svn: 56290
2008-09-17 21:13:11 +00:00
Evan Cheng
d3225118a6
Unallocatable registers do not have live intervals.
...
llvm-svn: 56287
2008-09-17 18:36:25 +00:00
Devang Patel
88efee2dcc
Do not hoist instruction above branch condition. The instruction may use branch condition.
...
llvm-svn: 56286
2008-09-17 18:21:49 +00:00
Devang Patel
50c22bf69b
Do not ignore iv uses outside the loop.
...
This one slipped through cracks very well.
llvm-svn: 56284
2008-09-17 17:53:47 +00:00
Devang Patel
f08b10b15d
Fix comments, help messages.
...
llvm-svn: 56282
2008-09-17 16:01:39 +00:00
Dan Gohman
4bef47e8c3
Don't worry about clobbering physical register defs that aren't used.
...
llvm-svn: 56281
2008-09-17 15:25:49 +00:00
Evan Cheng
f2c04a10e6
Fix addrmode1 instruction encodings; fix bx_ret encoding.
...
llvm-svn: 56277
2008-09-17 07:53:38 +00:00
Evan Cheng
d268288d39
Specify instruction encoding using range list to avoid endianess issues.
...
llvm-svn: 56276
2008-09-17 07:16:21 +00:00
Evan Cheng
b3923fd86f
Add instruction names as comments to InstBits entries.
...
llvm-svn: 56275
2008-09-17 06:29:52 +00:00
Dan Gohman
9475c22537
Simplify and generalize X86DAGToDAGISel::CanBeFoldedBy, and draw
...
up some new ascii art to illustrate what it does. This change
currently has no effect on generated code.
llvm-svn: 56270
2008-09-17 01:39:10 +00:00
Dan Gohman
d0c6cb65e8
Add a new MachineInstr-level DCE pass. It is very simple, and is intended to
...
be used with fast-isel.
llvm-svn: 56268
2008-09-17 00:43:24 +00:00
Bill Wendling
b2701e541c
Add trampoline support to PPC. GCC simply calls the "__trampoline_setup"
...
function with appropriate parameters. This allows us to support blocks on PPC.
llvm-svn: 56267
2008-09-17 00:30:57 +00:00
Devang Patel
65b85f3049
Fix cut-n-pasto.
...
llvm-svn: 56265
2008-09-17 00:01:04 +00:00