OSDN Git Service

android-x86/external-llvm.git
16 years agoFix asm printing of MOVSDto64mr and MOV64toSDrm.
Evan Cheng [Mon, 25 Aug 2008 04:11:42 +0000 (04:11 +0000)]
Fix asm printing of MOVSDto64mr and MOV64toSDrm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55300 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix this test. Don't null out the file, just XFAIL it until patch can be fixed.
Bill Wendling [Sun, 24 Aug 2008 21:48:46 +0000 (21:48 +0000)]
Fix this test. Don't null out the file, just XFAIL it until patch can be fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55296 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTemporarily reverting r55292. It's causing a bootstraping failure:
Bill Wendling [Sun, 24 Aug 2008 21:45:30 +0000 (21:45 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55295 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoremove the type checking logic already done by tblgen, just keep the
Chris Lattner [Sun, 24 Aug 2008 20:46:13 +0000 (20:46 +0000)]
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! :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55294 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agosimplify PseudoSourceValue printing a bit. Unnest all of PseudoSourceValue.cpp from...
Chris Lattner [Sun, 24 Aug 2008 20:37:32 +0000 (20:37 +0000)]
simplify PseudoSourceValue printing a bit.  Unnest all of PseudoSourceValue.cpp from the llvm namespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55293 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMove callseq_start above the call address load to allow load to be folded into the...
Evan Cheng [Sun, 24 Aug 2008 19:19:55 +0000 (19:19 +0000)]
Move callseq_start above the call address load to allow load to be folded into the call node.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55292 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPrint PseudoSourceValue.
Evan Cheng [Sun, 24 Aug 2008 18:51:20 +0000 (18:51 +0000)]
Print PseudoSourceValue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55291 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agowe should use 'class' for non-pod types instead of 'struct' to
Chris Lattner [Sun, 24 Aug 2008 18:38:56 +0000 (18:38 +0000)]
we should use 'class' for non-pod types instead of 'struct' to
make it easier to deal with the VC++ struct/class bug.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55290 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd a hack to temporarily allow pseudo source values.
Chris Lattner [Sun, 24 Aug 2008 18:33:17 +0000 (18:33 +0000)]
add a hack to temporarily allow pseudo source  values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55289 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agomake sure to flush the stream after dumping, to make sure it goes out immediately.
Chris Lattner [Sun, 24 Aug 2008 18:28:30 +0000 (18:28 +0000)]
make sure to flush the stream after dumping, to make sure it goes out immediately.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55288 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse additionnal include directory instead of ../ in #include.
Cedric Venet [Sun, 24 Aug 2008 12:30:46 +0000 (12:30 +0000)]
Use additionnal include directory instead of ../ in #include.
Suggested by aKor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55282 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdating VC++ project.
Cedric Venet [Sun, 24 Aug 2008 11:56:40 +0000 (11:56 +0000)]
Updating VC++ project.
Adding one include file and correct one declaration from class to struct in order to make llvm compile on VC2005.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55279 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdate GC docs for clarified naming and AsmWriter refactoring.
Gordon Henriksen [Sun, 24 Aug 2008 03:18:23 +0000 (03:18 +0000)]
Update GC docs for clarified naming and AsmWriter refactoring.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55275 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoimprove encapsulation of the BBExecutable set.
Chris Lattner [Sat, 23 Aug 2008 23:39:31 +0000 (23:39 +0000)]
improve encapsulation of the BBExecutable set.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55271 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSwitch an assortment of maps, sets and vectors to more efficient versions,
Chris Lattner [Sat, 23 Aug 2008 23:36:38 +0000 (23:36 +0000)]
Switch an assortment of maps, sets and vectors to more efficient versions,
patch contributed by m-s!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55270 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoget MachineConstantPool off std::ostream, onto raw_ostream. It would be
Chris Lattner [Sat, 23 Aug 2008 22:53:13 +0000 (22:53 +0000)]
get MachineConstantPool off std::ostream, onto raw_ostream.  It would be
really nice if someone converted MachineFunction::print to raw_ostream.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55268 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agominor cleanups.
Chris Lattner [Sat, 23 Aug 2008 22:52:27 +0000 (22:52 +0000)]
minor cleanups.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55267 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoremove dead method.
Chris Lattner [Sat, 23 Aug 2008 22:43:21 +0000 (22:43 +0000)]
remove dead method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55266 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd raw_stream adaptors that write into an std::string and SmallVector/SmallString.
Chris Lattner [Sat, 23 Aug 2008 22:43:04 +0000 (22:43 +0000)]
Add raw_stream adaptors that write into an std::string and SmallVector/SmallString.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55265 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSwitch the asmprinter (.ll) and all the stuff it requires over to
Chris Lattner [Sat, 23 Aug 2008 22:23:09 +0000 (22:23 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55263 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agouse proper namespace qualifications
Chris Lattner [Sat, 23 Aug 2008 22:00:15 +0000 (22:00 +0000)]
use proper namespace qualifications

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55259 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd #include
Chris Lattner [Sat, 23 Aug 2008 21:34:34 +0000 (21:34 +0000)]
Add #include

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55258 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd #include
Chris Lattner [Sat, 23 Aug 2008 21:33:24 +0000 (21:33 +0000)]
add #include

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55257 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd #include
Chris Lattner [Sat, 23 Aug 2008 20:34:06 +0000 (20:34 +0000)]
add #include

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55252 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSplit format() out to its own file, add support for formatting
Chris Lattner [Sat, 23 Aug 2008 19:48:00 +0000 (19:48 +0000)]
Split format() out to its own file, add support for formatting
up to three values in one call.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55251 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoconditionalize this to work on windows, untested but it should work
Chris Lattner [Sat, 23 Aug 2008 19:27:03 +0000 (19:27 +0000)]
conditionalize this to work on windows, untested but it should work
according to the intarnetz

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55248 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd a simple mechanism for formatted output. This gives raw_ostream's
Chris Lattner [Sat, 23 Aug 2008 19:23:10 +0000 (19:23 +0000)]
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';

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55246 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTestcase for 64bit maskmovq
Anton Korobeynikov [Sat, 23 Aug 2008 15:53:47 +0000 (15:53 +0000)]
Testcase for 64bit maskmovq

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55239 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoProvide a 64 bit variant of mmx.maskmovq intrinsic lowering.
Anton Korobeynikov [Sat, 23 Aug 2008 15:53:19 +0000 (15:53 +0000)]
Provide a 64 bit variant of mmx.maskmovq intrinsic lowering.
Is there way to avoid explicit target check?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55238 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoReverting r55227. This was causing the following failures in the regression
Bill Wendling [Sat, 23 Aug 2008 09:46:46 +0000 (09:46 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55233 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd a new trivial -inst-namer pass which makes it possible to diff the
Chris Lattner [Sat, 23 Aug 2008 06:07:02 +0000 (06:07 +0000)]
Add a new trivial -inst-namer pass which makes it possible to diff the
before/after effects of a pass, crazy!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55230 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoVerify that the alignment argument to llvm.memcpy is a constant
Chris Lattner [Sat, 23 Aug 2008 05:31:10 +0000 (05:31 +0000)]
Verify that the alignment argument to llvm.memcpy is a constant
integer, PR2318.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55228 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoremove verification for gc intrinsic argument types. it was indented wrong
Chris Lattner [Sat, 23 Aug 2008 05:26:35 +0000 (05:26 +0000)]
remove verification for gc intrinsic argument types.  it was indented wrong
and tblgen now knows intrinsic prototypes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55227 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix PR2423 by checking all indices for out of range access, not only
Chris Lattner [Sat, 23 Aug 2008 05:21:06 +0000 (05:21 +0000)]
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].

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55226 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agothe bug was apparently fixed long ago, reenable the assertion
Chris Lattner [Sat, 23 Aug 2008 03:48:35 +0000 (03:48 +0000)]
the bug was apparently fixed long ago, reenable the assertion

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55224 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake MBBMap a DenseMap instead of a std::map.
Dan Gohman [Sat, 23 Aug 2008 02:44:46 +0000 (02:44 +0000)]
Make MBBMap a DenseMap instead of a std::map.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55220 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMove the point at which FastISel taps into the SelectionDAGISel
Dan Gohman [Sat, 23 Aug 2008 02:25:05 +0000 (02:25 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55219 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAvoid creating shift-by-zero SDNodes in the common case of
Dan Gohman [Sat, 23 Aug 2008 01:06:51 +0000 (01:06 +0000)]
Avoid creating shift-by-zero SDNodes in the common case of
i8* getelementptr. DAGCombine eliminates these, but this is
a fairly common case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55214 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMove SelectionDAG's constructor out of line.
Dan Gohman [Sat, 23 Aug 2008 00:50:30 +0000 (00:50 +0000)]
Move SelectionDAG's constructor out of line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55212 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd a clear() method to FoldingSet.
Dan Gohman [Sat, 23 Aug 2008 00:42:16 +0000 (00:42 +0000)]
Add a clear() method to FoldingSet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55210 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTest all currently supported atomic builtins on x86-{32,64}.
Dale Johannesen [Fri, 22 Aug 2008 22:39:21 +0000 (22:39 +0000)]
Test all currently supported atomic builtins on x86-{32,64}.
These just test that they go through the BE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55208 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoComprehensive test of FE handling of __sync builtins.
Dale Johannesen [Fri, 22 Aug 2008 21:47:03 +0000 (21:47 +0000)]
Comprehensive test of FE handling of __sync builtins.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55206 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoReapply r55191 and r55192.
Dan Gohman [Fri, 22 Aug 2008 21:28:19 +0000 (21:28 +0000)]
Reapply r55191 and r55192.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55205 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake option variables static, so they won't cause nameclash
Anton Korobeynikov [Fri, 22 Aug 2008 21:27:49 +0000 (21:27 +0000)]
Make option variables static, so they won't cause nameclash

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55203 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoReverting r55190, r55191, and r55192. They broke the build with this error message:
Bill Wendling [Fri, 22 Aug 2008 20:51:05 +0000 (20:51 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55200 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix the InsertBranch call.
Dan Gohman [Fri, 22 Aug 2008 19:26:10 +0000 (19:26 +0000)]
Fix the InsertBranch call.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55192 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSupport non-fallthrough unconditional branches in FastISel.
Dan Gohman [Fri, 22 Aug 2008 19:21:41 +0000 (19:21 +0000)]
Support non-fallthrough unconditional branches in FastISel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55191 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAnyext tweaks for x86. When extloading a value to i32 or i64, choose
Dan Gohman [Fri, 22 Aug 2008 19:19:31 +0000 (19:19 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55190 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix typo.
Owen Anderson [Fri, 22 Aug 2008 18:26:07 +0000 (18:26 +0000)]
Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55189 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd FastISel support for PHINodes. Machine PHI nodes
Dan Gohman [Fri, 22 Aug 2008 17:37:48 +0000 (17:37 +0000)]
Add FastISel support for PHINodes. Machine PHI nodes
are not yet updated properly, but that's a separate
task.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55187 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplement __sync_synchronize on ppc32. Patch by Gary Benson.
Dale Johannesen [Fri, 22 Aug 2008 17:20:54 +0000 (17:20 +0000)]
Implement __sync_synchronize on ppc32.  Patch by Gary Benson.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55186 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd an empty() member to FoldingSet.
Dan Gohman [Fri, 22 Aug 2008 16:14:23 +0000 (16:14 +0000)]
Add an empty() member to FoldingSet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55182 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix SmallVector's size calculation so that a size of 0 is
Dan Gohman [Fri, 22 Aug 2008 16:07:55 +0000 (16:07 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55181 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoimprove support for systems that need unistd.h to get STDOUT_FILENO.
Chris Lattner [Fri, 22 Aug 2008 15:45:00 +0000 (15:45 +0000)]
improve support for systems that need unistd.h to get STDOUT_FILENO.
Patch contributed by Bjorn Reese!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55179 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAlso overload for char, since the "char" type depends on the host.
Nicolas Geoffray [Fri, 22 Aug 2008 08:44:47 +0000 (08:44 +0000)]
Also overload for char, since the "char" type depends on the host.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55173 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoOverload for both signed and unsigned char.
Owen Anderson [Fri, 22 Aug 2008 07:42:25 +0000 (07:42 +0000)]
Overload for both signed and unsigned char.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55171 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoconsolidate DenseMapInfo implementations, and add one for std::pair.
Chris Lattner [Fri, 22 Aug 2008 05:08:25 +0000 (05:08 +0000)]
consolidate DenseMapInfo implementations, and add one for std::pair.
Patch contributed by m-s.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55167 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRewrite ppc code generated for __sync_{bool|val}_compare_and_swap
Dale Johannesen [Fri, 22 Aug 2008 03:49:10 +0000 (03:49 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55163 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd a few comments.
Dan Gohman [Fri, 22 Aug 2008 00:28:15 +0000 (00:28 +0000)]
Add a few comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55157 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFactor out the predicate check code from DAGISelEmitter.cpp
Dan Gohman [Fri, 22 Aug 2008 00:20:26 +0000 (00:20 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55156 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove tabs.
Bill Wendling [Fri, 22 Aug 2008 00:04:26 +0000 (00:04 +0000)]
Remove tabs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55154 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTestcase for PR2585.
Bill Wendling [Thu, 21 Aug 2008 23:04:49 +0000 (23:04 +0000)]
Testcase for PR2585.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55151 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTemporarily reverting r55137. This was causing the bootstrap to go into an
Bill Wendling [Thu, 21 Aug 2008 22:40:10 +0000 (22:40 +0000)]
Temporarily reverting r55137. This was causing the bootstrap to go into an
infinite loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55149 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix write() when the string being written is larger than the buffer. This broke...
Owen Anderson [Thu, 21 Aug 2008 22:39:33 +0000 (22:39 +0000)]
Fix write() when the string being written is larger than the buffer.  This broke various ObjC testcases
with very long symbol names.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55148 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoIf part of the mask is "undef", then ignore it as we don't care what goes into it.
Bill Wendling [Thu, 21 Aug 2008 22:36:36 +0000 (22:36 +0000)]
If part of the mask is "undef", then ignore it as we don't care what goes into it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55147 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix whitespace. No functionality change.
Bill Wendling [Thu, 21 Aug 2008 22:35:37 +0000 (22:35 +0000)]
Fix whitespace. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55146 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd -mattr=sse2 so this test doesn't fail on non-x86 hosts.
Dan Gohman [Thu, 21 Aug 2008 22:34:25 +0000 (22:34 +0000)]
Add -mattr=sse2 so this test doesn't fail on non-x86 hosts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55145 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake x86 and sse2 explicit for non-x86 hosts.
Dale Johannesen [Thu, 21 Aug 2008 21:26:06 +0000 (21:26 +0000)]
Make x86 and sse2 explicit for non-x86 hosts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55141 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAccept NOT of a constant vector of int.
Dale Johannesen [Thu, 21 Aug 2008 21:20:09 +0000 (21:20 +0000)]
Accept NOT of a constant vector of int.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55140 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a number of byval / memcpy / memset related codegen issues.
Evan Cheng [Thu, 21 Aug 2008 21:00:15 +0000 (21:00 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55139 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMove non-trivial methods out of line to avoid code-size bloat.
Owen Anderson [Thu, 21 Aug 2008 20:58:52 +0000 (20:58 +0000)]
Move non-trivial methods out of line to avoid code-size bloat.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55138 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix ComputeMaskedBits to handle phis correctly. We need to take the
David Greene [Thu, 21 Aug 2008 20:45:12 +0000 (20:45 +0000)]
Fix ComputeMaskedBits to handle phis correctly.  We need to take the
minimum of the known zeros.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55137 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTreat floating point ST1 the same as ST0 when lowering for a call result
Mon P Wang [Thu, 21 Aug 2008 19:54:16 +0000 (19:54 +0000)]
Treat floating point ST1 the same as ST0 when lowering for a call result

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55135 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove unneeded #include.
Owen Anderson [Thu, 21 Aug 2008 19:51:25 +0000 (19:51 +0000)]
Remove unneeded #include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55134 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd libcalls for the new rounding opcodes.
Dan Gohman [Thu, 21 Aug 2008 18:38:14 +0000 (18:38 +0000)]
Add libcalls for the new rounding opcodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55133 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a typo that Dale noticed.
Dan Gohman [Thu, 21 Aug 2008 18:13:12 +0000 (18:13 +0000)]
Fix a typo that Dale noticed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55132 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd libm-oriented ISD opcodes for rounding operations.
Dan Gohman [Thu, 21 Aug 2008 17:55:02 +0000 (17:55 +0000)]
Add libm-oriented ISD opcodes for rounding operations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55130 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoHave FastISel skip the multiply by 1 for getelementptr on i8*.
Dan Gohman [Thu, 21 Aug 2008 17:37:05 +0000 (17:37 +0000)]
Have FastISel skip the multiply by 1 for getelementptr on i8*.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55129 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAllow inline asm nodes with empty bodies inside JIT.
Anton Korobeynikov [Thu, 21 Aug 2008 17:33:01 +0000 (17:33 +0000)]
Allow inline asm nodes with empty bodies inside JIT.
This unbreaks explicit reg vars inside JIT, which are
implemented in such hacky way :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55128 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSwitch from an O(n) method to an O(1) method for changing non-constant
Chris Lattner [Thu, 21 Aug 2008 17:31:45 +0000 (17:31 +0000)]
Switch from an O(n) method to an O(1) method for changing non-constant
operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55127 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agogetelementptr doesn't work on x86-64 yet, because it
Dan Gohman [Thu, 21 Aug 2008 17:28:42 +0000 (17:28 +0000)]
getelementptr doesn't work on x86-64 yet, because it
has MOV64ri32 and no plain MOV64ri.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55126 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMVT::getMVT uses iPTR for pointer types, while we need the actual
Dan Gohman [Thu, 21 Aug 2008 17:25:26 +0000 (17:25 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55125 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSimplify SelectRoot's interface, and factor out some common code
Dan Gohman [Thu, 21 Aug 2008 16:36:34 +0000 (16:36 +0000)]
Simplify SelectRoot's interface, and factor out some common code
from all targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55124 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoElements in DeadNodeSet are checked for use_empty() before they
Dan Gohman [Thu, 21 Aug 2008 16:24:54 +0000 (16:24 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55123 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSelectionDAGISel::SelectRootInit does not need to be virtual.
Dan Gohman [Thu, 21 Aug 2008 16:06:51 +0000 (16:06 +0000)]
SelectionDAGISel::SelectRootInit does not need to be virtual.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55122 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake HandleSDNode::getValue return an SDValue instead of
Dan Gohman [Thu, 21 Aug 2008 16:02:46 +0000 (16:02 +0000)]
Make HandleSDNode::getValue return an SDValue instead of
the full SDUse, which isn't needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55121 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDon't silently ignore errors when opening output streams.
Dan Gohman [Thu, 21 Aug 2008 15:33:45 +0000 (15:33 +0000)]
Don't silently ignore errors when opening output streams.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55120 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoClean up whitespace.
Bill Wendling [Thu, 21 Aug 2008 08:38:54 +0000 (08:38 +0000)]
Clean up whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55117 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoremove redundant include
Chris Lattner [Thu, 21 Aug 2008 06:41:07 +0000 (06:41 +0000)]
remove redundant include

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55116 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix the build with gcc 4.3 as the host, patch by Zhongxing Xu!
Chris Lattner [Thu, 21 Aug 2008 06:25:28 +0000 (06:25 +0000)]
Fix the build with gcc 4.3 as the host, patch by Zhongxing Xu!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55115 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplement operator<< in terms of basic types rather than [u]int*_t, which is better...
Owen Anderson [Thu, 21 Aug 2008 06:20:47 +0000 (06:20 +0000)]
Implement operator<< in terms of basic types rather than [u]int*_t, which is better for portability.  There might be some way to factor this all with metaprogramming magic, but I'm not sure how offhand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55114 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRevert r54876 r54877 r54906 and r54907. Evan found that these caused a 20%
Nick Lewycky [Thu, 21 Aug 2008 05:56:10 +0000 (05:56 +0000)]
Revert r54876 r54877 r54906 and r54907. Evan found that these caused a 20%
slowdown in bzip2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55113 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agounbreak the CBE on treeadd an many others.
Chris Lattner [Thu, 21 Aug 2008 05:51:43 +0000 (05:51 +0000)]
unbreak the CBE on treeadd an many others.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55112 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix build on GCC 4.3.
Nick Lewycky [Thu, 21 Aug 2008 05:36:03 +0000 (05:36 +0000)]
Fix build on GCC 4.3.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55110 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove size_t operator; this unbreaks the build on Linux. Committing on
Eli Friedman [Thu, 21 Aug 2008 04:28:31 +0000 (04:28 +0000)]
Remove size_t operator; this unbreaks the build on Linux.  Committing on
the suggestion of resistor.

If this breaks some other platform, please go ahead and back this out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55106 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agorecommit bcreader, handling packed structs correctly. Apparently
Chris Lattner [Thu, 21 Aug 2008 02:34:16 +0000 (02:34 +0000)]
recommit bcreader, handling packed structs correctly.  Apparently
people want fast *and* correct.  Sheesh.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55102 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRevert 55090, regressions in:
Daniel Dunbar [Thu, 21 Aug 2008 01:54:58 +0000 (01:54 +0000)]
Revert 55090, regressions in:
 - Postgres
 - llvm-test/SingleSource/UnitTests/{2006-01-23-InitializedBitField,
   2004-11-28-GlobalBoolLayout, 2003-05-02-DependentPHI}

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55100 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoBasic fast-isel support for instructions with constant int operands.
Dan Gohman [Thu, 21 Aug 2008 01:41:07 +0000 (01:41 +0000)]
Basic fast-isel support for instructions with constant int operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55099 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoType of first GEP operand is always the same as the target pointer type.
Evan Cheng [Thu, 21 Aug 2008 01:19:11 +0000 (01:19 +0000)]
Type of first GEP operand is always the same as the target pointer type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55097 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove the code that limited FastISel to certain fixed signatures.
Dan Gohman [Thu, 21 Aug 2008 00:35:26 +0000 (00:35 +0000)]
Remove the code that limited FastISel to certain fixed signatures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55096 91177308-0d34-0410-b5e6-96231b3b80d8