Owen Anderson
27fb3dcbc7
Make TargetInstrInfo::copyRegToReg return a bool indicating whether the copy requested
...
was inserted or not. This allows bitcast in fast isel to properly handle the case
where an appropriate reg-to-reg copy is not available.
llvm-svn: 55375
2008-08-26 18:03:31 +00:00
Devang Patel
4310d39844
If IV is used in a int-to-float cast inside the loop then try to eliminate the cast operation.
...
llvm-svn: 55374
2008-08-26 17:57:54 +00:00
Owen Anderson
bf05ebaccf
Add support for fast isel of non-constant fptosi instructions.
...
llvm-svn: 55373
2008-08-26 17:44:42 +00:00
Chris Lattner
09f8cef571
If an xmm register is referenced explicitly in an inline asm, make sure to
...
assign it to a version of the xmm register with the regclass that matches its
type. This fixes PR2715, a bug handling some crazy xpcom case in mozilla.
llvm-svn: 55358
2008-08-26 06:19:02 +00:00
Chris Lattner
54ef9f5831
typo fix.
...
llvm-svn: 55355
2008-08-26 06:07:47 +00:00
Dan Gohman
2e834906b9
Actually recycle SDNode allocations. SelectionDAG is using
...
RecyclingAllocator, but this change is needed for the nodes
to actually be recycled. This cuts SelectionDAG's memory
usage high-water-mark in half in some cases.
llvm-svn: 55351
2008-08-26 01:44:34 +00:00
Dan Gohman
cf3e3017c8
Avoid a warning about isTargetNullPtr being unused in release builds.
...
llvm-svn: 55350
2008-08-26 01:38:29 +00:00
Evan Cheng
4884f87822
This is done.
...
llvm-svn: 55348
2008-08-26 01:13:44 +00:00
Owen Anderson
8dd01ccdd8
Add a RetVT parameter to emitted FastISel methods, so that we will be able to pass the desired return
...
type down. This is not currently used.
llvm-svn: 55345
2008-08-25 23:58:18 +00:00
Dale Johannesen
d4eb0521e4
Implement 32 & 64 bit versions of PPC atomic
...
binary primitives.
llvm-svn: 55343
2008-08-25 22:34:37 +00:00
Evan Cheng
2c067325d6
Unbreak build.
...
llvm-svn: 55342
2008-08-25 22:20:39 +00:00
Evan Cheng
2da2e65d7d
80 col. violations.
...
llvm-svn: 55341
2008-08-25 21:58:43 +00:00
Owen Anderson
126afc5cb9
Expand bitcast support in fast isel to support bitcasts of non-constant values by emitting reg-reg copies.
...
llvm-svn: 55340
2008-08-25 21:32:34 +00:00
Evan Cheng
f00f1e50b5
Try approach to moving call address load inside of callseq_start. Now it's done during the preprocess of x86 isel. callseq_start's chain is changed to load's chain node; while load's chain is the last of callseq_start or the loads or copytoreg nodes inserted to move arguments to the right spot.
...
llvm-svn: 55338
2008-08-25 21:27:18 +00:00
Dale Johannesen
765065c982
Remove PPC-specific lowering for atomics; the
...
generic stuff works fine.
Mark rewritten cmp-and-swap as not using CR1.
llvm-svn: 55336
2008-08-25 21:09:52 +00:00
Owen Anderson
32635dbfb2
Add support for fast isel of (integer) immediate materialization pattens, and use them to support
...
bitcast of constants in fast isel.
llvm-svn: 55325
2008-08-25 20:20:32 +00:00
Dale Johannesen
166d6cb1fa
It's important for the cmp-and-swap to balance
...
loads and stores but it's even more important for
it to store the right value.:(
llvm-svn: 55319
2008-08-25 18:53:26 +00:00
Bill Wendling
6cfd3830fb
Nevermind. This broke the bootstrap (?!).
...
llvm-svn: 55318
2008-08-25 18:32:39 +00:00
Bill Wendling
dd6759aea7
MOVQ2DQ and MOVQ2DQ use SSE2. We should conditionalize the use of these
...
instructions on having SSE2.
llvm-svn: 55317
2008-08-25 18:20:52 +00:00
Chris Lattner
dab9425547
Fix pasto (values -> types) noticed by Josh Conner
...
llvm-svn: 55315
2008-08-25 17:03:15 +00:00
Chris Lattner
820eebc5a8
flush stream after dumping.
...
llvm-svn: 55301
2008-08-25 04:55:46 +00:00
Evan Cheng
e414681352
Fix asm printing of MOVSDto64mr and MOV64toSDrm.
...
llvm-svn: 55300
2008-08-25 04:11:42 +00:00
Bill Wendling
5b836c5f77
Temporarily reverting r55292. It's causing a bootstraping failure:
...
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc ... src/libiberty/make-temp-file.c -o make-temp-file.o
Assertion failed: (Node2Index[SU->NodeNum] > Node2Index[I->Dep->NodeNum] && "Wrong topological sorting"), function InitDAGTopologicalSorting, file /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp, line 508.
../../../../llvm-gcc.src/libiberty/hashtab.c:955: internal compiler error: Abort trap
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter > for instructions.
make[4]: *** [hashtab.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [multi-do] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-target-libiberty] Error 2
make: *** [all] Error 2
llvm-svn: 55295
2008-08-24 21:45:30 +00:00
Chris Lattner
25852069ed
remove the type checking logic already done by tblgen, just keep the
...
parts tblgen doesn't do (checking for constant, alloca, enclosing
function has gc marker). This passes dj! :)
llvm-svn: 55294
2008-08-24 20:46:13 +00:00
Chris Lattner
a078d83e17
simplify PseudoSourceValue printing a bit. Unnest all of PseudoSourceValue.cpp from the llvm namespace.
...
llvm-svn: 55293
2008-08-24 20:37:32 +00:00
Evan Cheng
8fa17424f7
Move callseq_start above the call address load to allow load to be folded into the call node.
...
llvm-svn: 55292
2008-08-24 19:19:55 +00:00
Evan Cheng
72e7d91591
Print PseudoSourceValue.
...
llvm-svn: 55291
2008-08-24 18:51:20 +00:00
Chris Lattner
d758625083
add a hack to temporarily allow pseudo source values.
...
llvm-svn: 55289
2008-08-24 18:33:17 +00:00
Chris Lattner
f4bd5cf3dd
make sure to flush the stream after dumping, to make sure it goes out immediately.
...
llvm-svn: 55288
2008-08-24 18:28:30 +00:00
Cedric Venet
404cd15fa5
Use additionnal include directory instead of ../ in #include.
...
Suggested by aKor.
llvm-svn: 55282
2008-08-24 12:30:46 +00:00
Cedric Venet
0f7b5666a2
Updating VC++ project.
...
Adding one include file and correct one declaration from class to struct in order to make llvm compile on VC2005.
llvm-svn: 55279
2008-08-24 11:56:40 +00:00
Chris Lattner
add44f3fb7
improve encapsulation of the BBExecutable set.
...
llvm-svn: 55271
2008-08-23 23:39:31 +00:00
Chris Lattner
65938fc69a
Switch an assortment of maps, sets and vectors to more efficient versions,
...
patch contributed by m-s!
llvm-svn: 55270
2008-08-23 23:36:38 +00:00
Chris Lattner
838aff36dd
get MachineConstantPool off std::ostream, onto raw_ostream. It would be
...
really nice if someone converted MachineFunction::print to raw_ostream.
llvm-svn: 55268
2008-08-23 22:53:13 +00:00
Chris Lattner
82ff923091
minor cleanups.
...
llvm-svn: 55267
2008-08-23 22:52:27 +00:00
Chris Lattner
205af9643d
Add raw_stream adaptors that write into an std::string and SmallVector/SmallString.
...
llvm-svn: 55265
2008-08-23 22:43:04 +00:00
Chris Lattner
0c19df4871
Switch the asmprinter (.ll) and all the stuff it requires over to
...
use raw_ostream instead of std::ostream. Among other goodness,
this speeds up llvm-dis of kc++ with a release build from 0.85s
to 0.49s (88% faster).
Other interesting changes:
1) This makes Value::print be non-virtual.
2) AP[S]Int and ConstantRange can no longer print to ostream directly,
use raw_ostream instead.
3) This fixes a bug in raw_os_ostream where it didn't flush itself
when destroyed.
4) This adds a new SDNode::print method, instead of only allowing "dump".
A lot of APIs have both std::ostream and raw_ostream versions, it would
be useful to go through and systematically anihilate the std::ostream
versions.
This passes dejagnu, but there may be minor fallout, plz let me know if
so and I'll fix it.
llvm-svn: 55263
2008-08-23 22:23:09 +00:00
Chris Lattner
2ecf455f1b
Add #include
...
llvm-svn: 55258
2008-08-23 21:34:34 +00:00
Chris Lattner
339c3cae0c
add #include
...
llvm-svn: 55257
2008-08-23 21:33:24 +00:00
Chris Lattner
da42964999
add #include
...
llvm-svn: 55252
2008-08-23 20:34:06 +00:00
Chris Lattner
22b52c984a
add a simple mechanism for formatted output. This gives raw_ostream's
...
all the power and risk of fprintf format strings. Use them like this:
OS << format("%10.4f", 42.0) << "\n" << format("%x", 42) << '\n';
llvm-svn: 55246
2008-08-23 19:23:10 +00:00
Anton Korobeynikov
31099519d0
Provide a 64 bit variant of mmx.maskmovq intrinsic lowering.
...
Is there way to avoid explicit target check?
llvm-svn: 55238
2008-08-23 15:53:19 +00:00
Bill Wendling
05604e0515
Reverting r55227. This was causing the following failures in the regression
...
tests:
Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/dg.exp ...
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcread-ptrptr.ll for PR1633
Failed with exit(1) at line 1
while running: not llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcread-ptrptr.ll >& /dev/null
child process exited abnormally
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcroot-alloca.ll for PR1633
Failed with exit(1) at line 1
while running: not llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcroot-alloca.ll >& /dev/null
child process exited abnormally
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcroot-meta.ll for PR1633
Failed with exit(1) at line 1
while running: not llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcroot-meta.ll >& /dev/null
child process exited abnormally
FAIL: ndbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcroot-ptrptr.ll for PR1633
Failed with exit(1) at line 1
while running: not llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcroot-ptrptr.ll >& /dev/null
child process exited abnormally
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcwrite-ptrptr.ll for PR1633
Failed with exit(1) at line 1
while running: not llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcwrite-ptrptr.ll >& /dev/null
child process exited abnormally
=== Summary ===
# of expected passes 3021
# of unexpected failures 6
# of expected failures 16
make[1]: *** [check-local] Error 1
make: *** [check] Error 2
llvm-svn: 55233
2008-08-23 09:46:46 +00:00
Chris Lattner
20abc419e5
Add a new trivial -inst-namer pass which makes it possible to diff the
...
before/after effects of a pass, crazy!
llvm-svn: 55230
2008-08-23 06:07:02 +00:00
Chris Lattner
ecded9a22b
Verify that the alignment argument to llvm.memcpy is a constant
...
integer, PR2318.
llvm-svn: 55228
2008-08-23 05:31:10 +00:00
Chris Lattner
4fe10837c3
remove verification for gc intrinsic argument types. it was indented wrong
...
and tblgen now knows intrinsic prototypes.
llvm-svn: 55227
2008-08-23 05:26:35 +00:00
Chris Lattner
3f972c9150
Fix PR2423 by checking all indices for out of range access, not only
...
indices that start with an array subscript. x->field[10000] is just
as bad as (*X)[14][10000].
llvm-svn: 55226
2008-08-23 05:21:06 +00:00
Chris Lattner
f97ab6df07
the bug was apparently fixed long ago, reenable the assertion
...
llvm-svn: 55224
2008-08-23 03:48:35 +00:00
Dan Gohman
48a3623591
Make MBBMap a DenseMap instead of a std::map.
...
llvm-svn: 55220
2008-08-23 02:44:46 +00:00
Dan Gohman
eb0cee91f6
Move the point at which FastISel taps into the SelectionDAGISel
...
process up to a higher level. This allows FastISel to leverage
more of SelectionDAGISel's infastructure, such as updating Machine
PHI nodes.
Also, implement transitioning from SDISel back to FastISel in
the middle of a block, so it's now possible to go back and
forth. This allows FastISel to hand individual CallInsts and other
complicated things off to SDISel to handle, while handling the rest
of the block itself.
To help support this, reorganize the SelectionDAG class so that it
is allocated once and reused throughout a function, instead of
being completely reallocated for each block.
llvm-svn: 55219
2008-08-23 02:25:05 +00:00
Dan Gohman
95d1056831
Avoid creating shift-by-zero SDNodes in the common case of
...
i8* getelementptr. DAGCombine eliminates these, but this is
a fairly common case.
llvm-svn: 55214
2008-08-23 01:06:51 +00:00
Dan Gohman
ac37f9a9be
Move SelectionDAG's constructor out of line.
...
llvm-svn: 55212
2008-08-23 00:50:30 +00:00
Dan Gohman
0e44e0d7a8
Add a clear() method to FoldingSet.
...
llvm-svn: 55210
2008-08-23 00:42:16 +00:00
Dan Gohman
2db3f8a095
Reapply r55191 and r55192.
...
llvm-svn: 55205
2008-08-22 21:28:19 +00:00
Anton Korobeynikov
9f0d0639ca
Make option variables static, so they won't cause nameclash
...
llvm-svn: 55203
2008-08-22 21:27:49 +00:00
Bill Wendling
fc4f64eed0
Reverting r55190, r55191, and r55192. They broke the build with this error message:
...
{standard input}:17:bad register name `%sil'
make[4]: *** [libgcc/./_addvsi3.o] Error 1
make[4]: *** Waiting for unfinished jobs....
{standard input}:23:bad register name `%dil'
{standard input}:28:bad register name `%dil'
make[4]: *** [libgcc/./_addvdi3.o] Error 1
{standard input}:18:bad register name `%sil'
make[4]: *** [libgcc/./_subvsi3.o] Error 1
llvm-svn: 55200
2008-08-22 20:51:05 +00:00
Dan Gohman
04968da460
Fix the InsertBranch call.
...
llvm-svn: 55192
2008-08-22 19:26:10 +00:00
Dan Gohman
87ff7058e7
Support non-fallthrough unconditional branches in FastISel.
...
llvm-svn: 55191
2008-08-22 19:21:41 +00:00
Dan Gohman
736779f088
Anyext tweaks for x86. When extloading a value to i32 or i64, choose
...
instructions that define the full 32 or 64-bit value. When anyexting
from i8 to i16 or i32, it's not necessary to zero out the high
portion of the register.
llvm-svn: 55190
2008-08-22 19:19:31 +00:00
Dan Gohman
a2292c0d34
Add FastISel support for PHINodes. Machine PHI nodes
...
are not yet updated properly, but that's a separate
task.
llvm-svn: 55187
2008-08-22 17:37:48 +00:00
Dale Johannesen
ed86f689cb
Implement __sync_synchronize on ppc32. Patch by Gary Benson.
...
llvm-svn: 55186
2008-08-22 17:20:54 +00:00
Dan Gohman
14714cb4fa
Fix SmallVector's size calculation so that a size of 0 is
...
handled correctly, and change a few SmallVector uses to use
size 0 to more clearly reflect their intent.
llvm-svn: 55181
2008-08-22 16:07:55 +00:00
Chris Lattner
d564f29957
improve support for systems that need unistd.h to get STDOUT_FILENO.
...
Patch contributed by Bjorn Reese!
llvm-svn: 55179
2008-08-22 15:45:00 +00:00
Chris Lattner
5fc8ab6d18
consolidate DenseMapInfo implementations, and add one for std::pair.
...
Patch contributed by m-s.
llvm-svn: 55167
2008-08-22 05:08:25 +00:00
Dale Johannesen
dec51704ed
Rewrite ppc code generated for __sync_{bool|val}_compare_and_swap
...
so that lwarx and stwcx are always executed the same number of times.
This is important for performance, I'm told.
llvm-svn: 55163
2008-08-22 03:49:10 +00:00
Dan Gohman
49e19e906f
Factor out the predicate check code from DAGISelEmitter.cpp
...
and use it in FastISelEmitter.cpp, and make FastISel
subtarget aware. Among other things, this lets it work
properly on x86 targets that don't have SSE, where it
successfully selects x87 instructions.
llvm-svn: 55156
2008-08-22 00:20:26 +00:00
Bill Wendling
25084af26a
Remove tabs.
...
llvm-svn: 55154
2008-08-22 00:04:26 +00:00
Bill Wendling
29cc3aa27d
Temporarily reverting r55137. This was causing the bootstrap to go into an
...
infinite loop.
llvm-svn: 55149
2008-08-21 22:40:10 +00:00
Owen Anderson
3ad8ac90b6
Fix write() when the string being written is larger than the buffer. This broke various ObjC testcases
...
with very long symbol names.
llvm-svn: 55148
2008-08-21 22:39:33 +00:00
Bill Wendling
2fd7dbaf1d
If part of the mask is "undef", then ignore it as we don't care what goes into it.
...
llvm-svn: 55147
2008-08-21 22:36:36 +00:00
Bill Wendling
765d3e0013
Fix whitespace. No functionality change.
...
llvm-svn: 55146
2008-08-21 22:35:37 +00:00
Dale Johannesen
47a5ef381e
Accept NOT of a constant vector of int.
...
llvm-svn: 55140
2008-08-21 21:20:09 +00:00
Evan Cheng
9534ea03e8
Fix a number of byval / memcpy / memset related codegen issues.
...
1. x86-64 byval alignment should be max of 8 and alignment of type. Previously the code was not doing what the commit message was saying.
2. Do not use byte repeat move and store operations. These are slow.
llvm-svn: 55139
2008-08-21 21:00:15 +00:00
Owen Anderson
d2850538db
Move non-trivial methods out of line to avoid code-size bloat.
...
llvm-svn: 55138
2008-08-21 20:58:52 +00:00
David Greene
0d191fd8d1
Fix ComputeMaskedBits to handle phis correctly. We need to take the
...
minimum of the known zeros.
llvm-svn: 55137
2008-08-21 20:45:12 +00:00
Mon P Wang
5c2ac4a5e0
Treat floating point ST1 the same as ST0 when lowering for a call result
...
llvm-svn: 55135
2008-08-21 19:54:16 +00:00
Owen Anderson
893ce348a7
Remove unneeded #include.
...
llvm-svn: 55134
2008-08-21 19:51:25 +00:00
Dan Gohman
2af34bd309
Add libcalls for the new rounding opcodes.
...
llvm-svn: 55133
2008-08-21 18:38:14 +00:00
Dan Gohman
c6337ac069
Add libm-oriented ISD opcodes for rounding operations.
...
llvm-svn: 55130
2008-08-21 17:55:02 +00:00
Dan Gohman
6a7461ad9b
Have FastISel skip the multiply by 1 for getelementptr on i8*.
...
llvm-svn: 55129
2008-08-21 17:37:05 +00:00
Anton Korobeynikov
f16134141d
Allow inline asm nodes with empty bodies inside JIT.
...
This unbreaks explicit reg vars inside JIT, which are
implemented in such hacky way :)
llvm-svn: 55128
2008-08-21 17:33:01 +00:00
Chris Lattner
479c5d9ee2
Switch from an O(n) method to an O(1) method for changing non-constant
...
operands.
llvm-svn: 55127
2008-08-21 17:31:45 +00:00
Dan Gohman
efb7d2d03d
MVT::getMVT uses iPTR for pointer types, while we need the actual
...
intptr_t type in this case. FastISel can now select simple
getelementptr instructions.
llvm-svn: 55125
2008-08-21 17:25:26 +00:00
Dan Gohman
d3582c9bda
Simplify SelectRoot's interface, and factor out some common code
...
from all targets.
llvm-svn: 55124
2008-08-21 16:36:34 +00:00
Dan Gohman
75ea0b83c5
Elements in DeadNodeSet are checked for use_empty() before they
...
are actually deleted, so it's not necessary to remove re-used
nodes from the set.
llvm-svn: 55123
2008-08-21 16:24:54 +00:00
Bill Wendling
75eeeb399e
Clean up whitespace.
...
llvm-svn: 55117
2008-08-21 08:38:54 +00:00
Nick Lewycky
99f4558117
Revert r54876 r54877 r54906 and r54907. Evan found that these caused a 20%
...
slowdown in bzip2.
llvm-svn: 55113
2008-08-21 05:56:10 +00:00
Chris Lattner
c1270f8eac
unbreak the CBE on treeadd an many others.
...
llvm-svn: 55112
2008-08-21 05:51:43 +00:00
Chris Lattner
744299382f
recommit bcreader, handling packed structs correctly. Apparently
...
people want fast *and* correct. Sheesh.
llvm-svn: 55102
2008-08-21 02:34:16 +00:00
Daniel Dunbar
ad1a1de17c
Revert 55090, regressions in:
...
- Postgres
- llvm-test/SingleSource/UnitTests/{2006-01-23-InitializedBitField,
2004-11-28-GlobalBoolLayout, 2003-05-02-DependentPHI}
llvm-svn: 55100
2008-08-21 01:54:58 +00:00
Dan Gohman
fe9056584b
Basic fast-isel support for instructions with constant int operands.
...
llvm-svn: 55099
2008-08-21 01:41:07 +00:00
Evan Cheng
4b5c038cd0
Type of first GEP operand is always the same as the target pointer type.
...
llvm-svn: 55097
2008-08-21 01:19:11 +00:00
Owen Anderson
9371964f47
Use raw_ostream throughout the AsmPrinter.
...
llvm-svn: 55092
2008-08-21 00:14:44 +00:00
Chris Lattner
0bed49ccd7
Fix an N^2 issue handling constant resolution due to RAUW in large arrays
...
this speeds up the bcreader from 6.67s to 0.12s on a testcase Daniel
provided. rdar://6158117
llvm-svn: 55090
2008-08-21 00:11:50 +00:00
Dan Gohman
6a0780cdd7
Fix unused variable warnings.
...
llvm-svn: 55089
2008-08-20 23:53:10 +00:00
Evan Cheng
f5a7e51c81
Silence a compiler warning.
...
llvm-svn: 55087
2008-08-20 23:36:48 +00:00
Evan Cheng
864fcc198d
First cut, un-optimized (and untested) fast isel lowering of GetElementPtrInst.
...
llvm-svn: 55085
2008-08-20 22:45:34 +00:00
Chris Lattner
b078e28338
Add a new ConstantExpr::getWithOperands that takes any array of operands
...
instead of requiring an std::vector.
llvm-svn: 55084
2008-08-20 22:27:40 +00:00
Dan Gohman
814f291664
Move the handling of ANY_EXTEND, SIGN_EXTEND_INREG, and TRUNCATE
...
out of X86ISelDAGToDAG.cpp C++ code and into tablegen code.
Among other things, using tablegen for these things makes them
friendlier to FastISel.
Tablegen can handle the case of i8 subregs on x86-32, but currently
the C++ code for that case uses MVT::Flag in a tricky way, and it
happens to schedule better in some cases. So for now, leave the
C++ code in place to handle the i8 case on x86-32.
llvm-svn: 55078
2008-08-20 21:27:32 +00:00
Dan Gohman
a4305cec93
Simplify the BuildMI calls even more.
...
llvm-svn: 55077
2008-08-20 21:10:53 +00:00
Dan Gohman
02c84b8910
Simplify FastISel's constructor argument list, make the FastISel
...
class hold a MachineRegisterInfo member, and make the
MachineBasicBlock be passed in to SelectInstructions rather
than the FastISel constructor.
llvm-svn: 55076
2008-08-20 21:05:57 +00:00
Dan Gohman
43d1c7c607
Dump the instruction that foiled ISel even when -debug is not used.
...
llvm-svn: 55075
2008-08-20 20:47:32 +00:00
Bill Wendling
cd01e89852
Don't hoist instructions that define a physical register.
...
llvm-svn: 55074
2008-08-20 20:32:05 +00:00
Dan Gohman
07a34a5f69
Make more use of the BuildMI API.
...
llvm-svn: 55072
2008-08-20 18:16:32 +00:00
Dan Gohman
24e8f0cfe6
Minor code reorganization.
...
llvm-svn: 55071
2008-08-20 18:10:48 +00:00
Dan Gohman
2471f6ce0f
Minor whitespace cleanup.
...
llvm-svn: 55070
2008-08-20 18:09:38 +00:00
Dan Gohman
39a5ffb03f
Fix 80 column violation.
...
llvm-svn: 55069
2008-08-20 18:09:02 +00:00
Evan Cheng
7b9cd58596
Kill off SimpleBBISel, it's replaced by FastISel.
...
llvm-svn: 55067
2008-08-20 17:50:32 +00:00
Chris Lattner
1ac3e2545b
Move the fast-path (<=i64) cases of various APInt methods inline
...
and the slow-path cases out of line. This speeds up instcombine
a bit in real world cases. Patch contributed by m-s.
llvm-svn: 55063
2008-08-20 17:02:31 +00:00
Dan Gohman
837c13a029
Disable DAGCombine's alignment inference in "fast" codegen mode.
...
llvm-svn: 55059
2008-08-20 16:30:28 +00:00
Dan Gohman
2da2bedc72
Change the FoldingSetNodeID usage for objects which carry
...
alignment and volatility information, such as loads and
stores, to reduce the number of integer values added to
the FoldingSetNodeID.
llvm-svn: 55058
2008-08-20 15:58:01 +00:00
Dan Gohman
3ad7e96f8a
Clean up a dead return missed in r55055.
...
llvm-svn: 55057
2008-08-20 15:54:46 +00:00
Dan Gohman
8823b0d245
Tablegen generated code already tests the opcode value, so it's not
...
necessary to use dyn_cast in these predicates.
llvm-svn: 55055
2008-08-20 15:24:22 +00:00
Dan Gohman
f6aa60ff71
Use BitVector instead of std::vector<unsigned char>.
...
llvm-svn: 55054
2008-08-20 14:58:41 +00:00
Dan Gohman
0f23237b0c
It's not necessary to check if a value is null before delete[].
...
llvm-svn: 55053
2008-08-20 14:55:37 +00:00
Dan Gohman
c8f9da50ec
Use cast instead of dyn_cast.
...
llvm-svn: 55052
2008-08-20 14:50:24 +00:00
Dan Gohman
c63a46ef39
Avoid an empty-if-body warning in release builds.
...
llvm-svn: 55050
2008-08-20 14:00:56 +00:00
Dan Gohman
1ed0681284
Fix indentation.
...
llvm-svn: 55049
2008-08-20 13:50:12 +00:00
Dan Gohman
a21bdda961
Fix comment spacing.
...
llvm-svn: 55047
2008-08-20 13:46:21 +00:00
Mon P Wang
1b2c061b73
Fixed shuffle optimizations to handle non power of 2 vectors
...
llvm-svn: 55035
2008-08-20 02:23:25 +00:00
Dan Gohman
e8f9a00424
Fix FastISel to recognize that the last block in the function does
...
not have a fall-through successor.
llvm-svn: 55033
2008-08-20 01:17:01 +00:00
Dan Gohman
98265cae87
Fix a leak in the FastISel code that Chris pointed out.
...
llvm-svn: 55031
2008-08-20 00:56:17 +00:00
Dale Johannesen
6f765f392c
Add remaining 64-bit atomic patterns for x86-64.
...
llvm-svn: 55029
2008-08-20 00:48:50 +00:00
Dan Gohman
847ebb90b8
Add support for running SelectionDAG if FastISel fails. This is under
...
a command-line option, so that the default behavior is an abort, which
is useful for exposing code that isn't supported yet.
llvm-svn: 55028
2008-08-20 00:47:54 +00:00
Dan Gohman
f6884373c2
Fix FastISel to recognize unhandled operands, such as constants
...
that aren't available as virtual registers (for now).
llvm-svn: 55026
2008-08-20 00:35:17 +00:00
Bill Wendling
f00f3055d8
Revert r55018 and apply the correct "fix" for the 64-bit sub_and_fetch atomic.
...
Just expand it like the other X-bit sub_and_fetches.
llvm-svn: 55023
2008-08-20 00:28:16 +00:00
Evan Cheng
d5834e90dc
Get rid of a couple of dynamic_cast.
...
llvm-svn: 55022
2008-08-20 00:28:12 +00:00
Dan Gohman
b16a7783c5
Add FastISel support for floating-point operations.
...
llvm-svn: 55021
2008-08-20 00:23:20 +00:00
Dan Gohman
a3e4d5a5e1
Add FastISel support for several more binary operators.
...
llvm-svn: 55020
2008-08-20 00:11:48 +00:00
Bill Wendling
e79740851f
Add support for the __sync_sub_and_fetch atomics and friends for X86. The code
...
was already present, but not hooked up to anything.
llvm-svn: 55018
2008-08-19 23:09:18 +00:00
Dan Gohman
697284fe0a
Add code to call FastISel, and a command-line option to enable it.
...
llvm-svn: 55015
2008-08-19 22:33:34 +00:00
Dan Gohman
214343fbbe
Support unconditional fall-through branches in FastISel.
...
llvm-svn: 55014
2008-08-19 22:31:46 +00:00
Owen Anderson
2a458775db
Allow the fast-path spilling code to attempt folding, but still leaving out remat and splitting.
...
llvm-svn: 55012
2008-08-19 22:12:11 +00:00
Dan Gohman
daef7f43af
Instantiate FastISel for X86.
...
llvm-svn: 55011
2008-08-19 21:45:35 +00:00
Dan Gohman
4619e93bd3
The X86 target will soon have an implementation of createFastISel.
...
llvm-svn: 55010
2008-08-19 21:32:53 +00:00
Dan Gohman
547ce65467
Use the BuildMI overload that sets up a destination register
...
instead of the one that doesn't and then adding it manually.
llvm-svn: 55006
2008-08-19 20:46:54 +00:00
Dan Gohman
c55fdcc935
Handle the case where target-specific fastisel code doesn't have
...
a desired opcode.
llvm-svn: 55005
2008-08-19 20:43:22 +00:00
Owen Anderson
c75ae13566
The fast-path still needs to set kill markers and spill/restore points as appropriate.
...
With this patch, all of MultiSource/Applications and all of SPEC2000/2006 pass with
the SimpleSpiller and this fast-path enabled.
llvm-svn: 55000
2008-08-19 20:09:52 +00:00
Dale Johannesen
5afbf510aa
Add support for 8 and 16 bit forms of __sync
...
builtins on X86.
Change "lock" instructions to be on a separate line.
This is needed to work around a bug in the Darwin
assembler.
llvm-svn: 54999
2008-08-19 18:47:28 +00:00
Gordon Henriksen
1298fb90d3
Delete a dead field.
...
llvm-svn: 54995
2008-08-19 17:09:26 +00:00
Gordon Henriksen
72bd9dfdad
[PR2327] Leverage TargetRegisterInfo to compute frame offsets for GC metadata.
...
llvm-svn: 54994
2008-08-19 17:06:35 +00:00
Nicolas Geoffray
d58c8e759f
Update the JIT exception writer to better mimic the codegen exception writer.
...
Also skip indirect encoding for platforms that ask for one: we direclty
write an address, not a pointer to the address.
llvm-svn: 54987
2008-08-19 14:48:14 +00:00
Chris Lattner
d7dd8b8aeb
add a note
...
llvm-svn: 54985
2008-08-19 06:22:16 +00:00
Chris Lattner
585297e851
more cleanups, random methods shouldn't return ostreams.
...
llvm-svn: 54984
2008-08-19 05:26:17 +00:00
Chris Lattner
1508d3f0fc
more cleanup, eliminate getLLVMName when printing out
...
type names at the top of the file.
llvm-svn: 54983
2008-08-19 05:16:28 +00:00
Chris Lattner
3a36d2ce81
random cleanups, factor some printing code for linkage and visibility
...
llvm-svn: 54982
2008-08-19 05:06:27 +00:00
Chris Lattner
604e351456
Change WriteTypeSymbolic/WriteAsOperand to return void instead of
...
an ostream, which is just weird.
Rename SC_DEBUG -> ST_DEBUG
Remove static indentation strangeness from WriteConstantInt. This makes it
so that large structs are not broken down and printed on multiple lines. If
there is demand for this to return, there are better ways to implement this.
llvm-svn: 54981
2008-08-19 04:47:09 +00:00
Chris Lattner
85ac9b1e4a
whitespace cleanup
...
llvm-svn: 54980
2008-08-19 04:45:47 +00:00
Chris Lattner
57693dda1d
don't use the result of WriteAsOperand
...
llvm-svn: 54979
2008-08-19 04:45:19 +00:00
Chris Lattner
5d2a9a4ae6
don't use the result of WriteTypeSymbolic or WriteAsOperand.
...
llvm-svn: 54978
2008-08-19 04:44:30 +00:00