oota-llvm.git
16 years agoadd support for running the test suite with valgrind. to run it just type 'make VG...
Nuno Lopes [Tue, 7 Oct 2008 14:48:14 +0000 (14:48 +0000)]
add support for running the test suite with valgrind. to run it just type 'make VG=1', as in clang
beware of the 42000 leaks reported by valgrind in the Constant.cpp + Type.cpp files. it needs fixing IMHO

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

16 years agoExpand arith on machines without carry flags
Andrew Lenharth [Tue, 7 Oct 2008 14:15:42 +0000 (14:15 +0000)]
Expand arith on machines without carry flags

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

16 years agoAdd two forgotten </i>'s.
Matthijs Kooijman [Tue, 7 Oct 2008 10:03:45 +0000 (10:03 +0000)]
Add two forgotten </i>'s.

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

16 years agofix filetype suffix
Gabor Greif [Tue, 7 Oct 2008 06:41:02 +0000 (06:41 +0000)]
fix filetype suffix

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

16 years agoAdvance version to 2.5
Tanya Lattner [Tue, 7 Oct 2008 04:35:08 +0000 (04:35 +0000)]
Advance version to 2.5

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

16 years agono need to write the output to the disk
Chris Lattner [Tue, 7 Oct 2008 04:06:55 +0000 (04:06 +0000)]
no need to write the output to the disk

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

16 years agoAdd test case for ADDC ADDE expansion
Andrew Lenharth [Tue, 7 Oct 2008 02:30:13 +0000 (02:30 +0000)]
Add test case for ADDC ADDE expansion

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

16 years agoNote that ADDC and company don't actually expand yet (missing in legalize
Andrew Lenharth [Tue, 7 Oct 2008 02:10:26 +0000 (02:10 +0000)]
Note that ADDC and company don't actually expand yet (missing in legalize

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

16 years agoMark negative-zero-to-int conversion as Inexact,
Dale Johannesen [Tue, 7 Oct 2008 00:40:01 +0000 (00:40 +0000)]
Mark negative-zero-to-int conversion as Inexact,
since -0.0 can't be represented as an int.
This prevents llvm from reducing -0.0 to a
load-and-convert of int 0.  Fixes
ieee.exp/mzero[2356].c in gcc testsuite.

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

16 years agoCorrectly handle calls with no return values. This fixes
Dan Gohman [Tue, 7 Oct 2008 00:12:37 +0000 (00:12 +0000)]
Correctly handle calls with no return values. This fixes
2006-01-23-UnionInit on x86-64 when inlining is not enabled.

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

16 years agoFix typo, fix PR 2865.
Devang Patel [Mon, 6 Oct 2008 23:22:54 +0000 (23:22 +0000)]
Fix typo, fix PR 2865.

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

16 years agoBe more precise about which conversions of NaNs
Dale Johannesen [Mon, 6 Oct 2008 22:59:10 +0000 (22:59 +0000)]
Be more precise about which conversions of NaNs
are Inexact.  (These are not Inexact as defined
by IEEE754, but that seems like a reasonable way
to abstract what happens:  information is lost.)

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

16 years agoSet UNIVERSAL_ARCH value.
Devang Patel [Mon, 6 Oct 2008 21:24:48 +0000 (21:24 +0000)]
Set UNIVERSAL_ARCH value.
Fixes build failure when target is i386.

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

16 years agoFix PR2850 and PR2863. Only generate movddup for 128-bit SSE vector shuffles.
Evan Cheng [Mon, 6 Oct 2008 21:13:08 +0000 (21:13 +0000)]
Fix PR2850 and PR2863. Only generate movddup for 128-bit SSE vector shuffles.

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

16 years agoTemporarily revert functionality change from my previous patch;
Dale Johannesen [Mon, 6 Oct 2008 20:43:48 +0000 (20:43 +0000)]
Temporarily revert functionality change from my previous patch;
it is too aggressive.

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

16 years agoRemove interfaces implemented by dead pass from the list of available passes.
Devang Patel [Mon, 6 Oct 2008 20:36:36 +0000 (20:36 +0000)]
Remove interfaces implemented by dead pass from the list of available passes.
Patch By Matthijs Kooijman.

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

16 years agoCosmetic.
Evan Cheng [Mon, 6 Oct 2008 20:33:02 +0000 (20:33 +0000)]
Cosmetic.

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

16 years agoUpdate function attributes docs.
Devang Patel [Mon, 6 Oct 2008 18:50:38 +0000 (18:50 +0000)]
Update function attributes docs.

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

16 years agoThis is an objective-c test, not an objective-c++ one.
Evan Cheng [Mon, 6 Oct 2008 18:42:48 +0000 (18:42 +0000)]
This is an objective-c test, not an objective-c++ one.

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

16 years agoMark shortening NaN conversions as Inexact. PR 2856.
Dale Johannesen [Mon, 6 Oct 2008 18:22:29 +0000 (18:22 +0000)]
Mark shortening NaN conversions as Inexact.  PR 2856.
Improve description of unsupported formats.

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

16 years agoIt is possible that all functions in one module are not being
Devang Patel [Mon, 6 Oct 2008 18:03:39 +0000 (18:03 +0000)]
It is possible that all functions in one module are not being
optimized for size. Set OptForSize for each function separately.

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

16 years agoDon't dereference the end() iterator. Thanks to
Dan Gohman [Mon, 6 Oct 2008 18:00:07 +0000 (18:00 +0000)]
Don't dereference the end() iterator. Thanks to
ENABLE_EXPENSIVE_CHECKS for finding this.

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

16 years agoRemove unncessary isDeclaration() checks.
Devang Patel [Mon, 6 Oct 2008 17:30:07 +0000 (17:30 +0000)]
Remove unncessary isDeclaration() checks.

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

16 years agoAllow scalarrepl to treat an all-zero GEP just as bitcast.
Matthijs Kooijman [Mon, 6 Oct 2008 16:23:31 +0000 (16:23 +0000)]
Allow scalarrepl to treat an all-zero GEP just as bitcast.

This includes not marking a GEP involving a vector as unsafe, but only when it
has all zero indices. This allows scalarrepl to work in a few more cases.

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

16 years agoActually run Obj-C++ tests if llvm-gcc supports.
Duncan Sands [Mon, 6 Oct 2008 10:31:21 +0000 (10:31 +0000)]
Actually run Obj-C++ tests if llvm-gcc supports.
Before there were two problems: (1) configure
turned "obj-c++" into "obj" in the langs line;
(2) the dejagnu library called it objc++ not
obj-c++.
Now the problem is that some of these tests don't
pass!

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

16 years agoClarify the relationship between byval and readonly/
Duncan Sands [Mon, 6 Oct 2008 08:14:18 +0000 (08:14 +0000)]
Clarify the relationship between byval and readonly/
readnone.  Make clearer that readnone functions do not
dereference pointer arguments.  Do not use the highly
ambiguous "side-effects" in the readonly description
(since such functions can have control flow side-effects,
such as throwing an exception, or looping for ever).

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

16 years agoreorder #include order, patch by Kenneth Boyd!
Chris Lattner [Mon, 6 Oct 2008 03:54:25 +0000 (03:54 +0000)]
reorder #include order, patch by Kenneth Boyd!

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

16 years agoAdd #include to get alloca, patch by Kenneth Boyd!
Chris Lattner [Mon, 6 Oct 2008 03:53:16 +0000 (03:53 +0000)]
Add #include to get alloca, patch by Kenneth Boyd!

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

16 years agoFix shift overflow bug that would occur when a field was a full 32-bits
Chris Lattner [Sun, 5 Oct 2008 18:31:58 +0000 (18:31 +0000)]
Fix shift overflow bug that would occur when a field was a full 32-bits
in tblgen.  This is PR2827, thanks to Waldemar Knorr for tracking this
down.

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

16 years agofix an incorrect and extremely confusing error message
Chris Lattner [Sun, 5 Oct 2008 18:24:03 +0000 (18:24 +0000)]
fix an incorrect and extremely confusing error message

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

16 years agomake the autoupgrade code for ret attributes dramatically simpler
Chris Lattner [Sun, 5 Oct 2008 18:22:09 +0000 (18:22 +0000)]
make the autoupgrade code for ret attributes dramatically simpler
and actually work.  We can now read the llvm 2.3 bc file from PR2849

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

16 years agoA word got optimized out, thanks to Duncan for pointing this out
Chris Lattner [Sun, 5 Oct 2008 17:14:59 +0000 (17:14 +0000)]
A word got optimized out, thanks to Duncan for pointing this out

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

16 years agoregenerate
Nuno Lopes [Sun, 5 Oct 2008 16:49:34 +0000 (16:49 +0000)]
regenerate

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

16 years agoclean ArgTypeListI production: free the PATypeHolder
Nuno Lopes [Sun, 5 Oct 2008 16:49:03 +0000 (16:49 +0000)]
clean ArgTypeListI production: free the PATypeHolder

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

16 years agoEmit type-correct constant null. Also fix a typo.
Anton Korobeynikov [Sun, 5 Oct 2008 15:07:06 +0000 (15:07 +0000)]
Emit type-correct constant null. Also fix a typo.

Patch by Robert G. Jakabosky!

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

16 years agoFix weird think-o and unbreak build on all gcc-3.4.x-based platforms (e.g. mingw)
Anton Korobeynikov [Sun, 5 Oct 2008 08:53:29 +0000 (08:53 +0000)]
Fix weird think-o and unbreak build on all gcc-3.4.x-based platforms (e.g. mingw)

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

16 years agothis case is matched now.
Chris Lattner [Sun, 5 Oct 2008 02:16:12 +0000 (02:16 +0000)]
this case is matched now.

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

16 years agorewrite bswap matching to be more general, allowing arbitrary
Chris Lattner [Sun, 5 Oct 2008 02:13:19 +0000 (02:13 +0000)]
rewrite bswap matching to be more general, allowing arbitrary
shifting and masking inside a bswap expr.  This allows it to handle
the cases from PR2842, which involve the intermediate 'or'
expressions being shifted, not just the input value.

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

16 years agoUpdate VC++ project file
Steve Naroff [Sun, 5 Oct 2008 01:04:07 +0000 (01:04 +0000)]
Update VC++ project file

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

16 years agofix a bug where the bswap matcher could match a case involving
Chris Lattner [Sun, 5 Oct 2008 00:50:57 +0000 (00:50 +0000)]
fix a bug where the bswap matcher could match a case involving
ashr.  It should only apply to lshr.

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

16 years agowrap some long lines and expand i32 mul's to libcalls, inspired by a
Chris Lattner [Sat, 4 Oct 2008 21:27:46 +0000 (21:27 +0000)]
wrap some long lines and expand i32 mul's to libcalls, inspired by a
patch by Mikael Lepisto!

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

16 years agoCMake: Reflected changes on source file structure. New plugin support
Oscar Fuentes [Sat, 4 Oct 2008 21:18:50 +0000 (21:18 +0000)]
CMake: Reflected changes on source file structure. New plugin support
for llvmc2 incomplete.

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

16 years agoUpdate the documentation for first-class aggregates changes,
Dan Gohman [Sat, 4 Oct 2008 19:00:07 +0000 (19:00 +0000)]
Update the documentation for first-class aggregates changes,
and remove getresult and references thereto.

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

16 years agoadd a note about inline asm
Chris Lattner [Sat, 4 Oct 2008 18:36:02 +0000 (18:36 +0000)]
add a note about inline asm

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

16 years agoimprove description of param/ret attrs
Chris Lattner [Sat, 4 Oct 2008 18:33:34 +0000 (18:33 +0000)]
improve description of param/ret attrs

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

16 years agoimprove descriptions of function attrs
Chris Lattner [Sat, 4 Oct 2008 18:23:17 +0000 (18:23 +0000)]
improve descriptions of function attrs

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

16 years agonotes are gone.
Chris Lattner [Sat, 4 Oct 2008 18:10:21 +0000 (18:10 +0000)]
notes are gone.

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

16 years agocomment cleanups
Chris Lattner [Sat, 4 Oct 2008 18:08:00 +0000 (18:08 +0000)]
comment cleanups

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

16 years agoMake GenLibDeps.pl more robust in the face of broken piping problems.
Chris Lattner [Sat, 4 Oct 2008 18:03:46 +0000 (18:03 +0000)]
Make GenLibDeps.pl more robust in the face of broken piping problems.
Patch by Kenneth Boyd!

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

16 years agoIgnore loads from and stores to local memory (i.e. allocas)
Duncan Sands [Sat, 4 Oct 2008 13:24:24 +0000 (13:24 +0000)]
Ignore loads from and stores to local memory (i.e. allocas)
when deciding whether to mark a function readnone/readonly.
Since the pass is currently run before SROA, this may be
quite helpful.  Requested by Chris on IRC.

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

16 years agoAllow the construction of SCEVs with SCEVCouldNotCompute operands, by
Nick Lewycky [Sat, 4 Oct 2008 11:19:07 +0000 (11:19 +0000)]
Allow the construction of SCEVs with SCEVCouldNotCompute operands, by
implementing folding. Fixes PR2857.

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

16 years agoRevert r56675 - it breaks unwinding runtime everywhere.
Anton Korobeynikov [Sat, 4 Oct 2008 11:09:36 +0000 (11:09 +0000)]
Revert r56675 - it breaks unwinding runtime everywhere.

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

16 years agoAdd implementations for sys::Memory::setWritable and sys::Memory::setExecutable on...
Argyrios Kyrtzidis [Sat, 4 Oct 2008 08:15:32 +0000 (08:15 +0000)]
Add implementations for sys::Memory::setWritable and sys::Memory::setExecutable on Win32 platform.

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

16 years agoFix compilation error on MSVC.
Argyrios Kyrtzidis [Sat, 4 Oct 2008 08:11:49 +0000 (08:11 +0000)]
Fix compilation error on MSVC.

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

16 years agoFix fast-isel's handling of atomic instructions. They may
Dan Gohman [Sat, 4 Oct 2008 00:56:36 +0000 (00:56 +0000)]
Fix fast-isel's handling of atomic instructions. They may
expand to multiple basic blocks, in which case fast-isel
needs to informed of which block to use as it resumes
inserting instructions.

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

16 years agoFix a bug in the local allocator's liveness computation where it
Dan Gohman [Sat, 4 Oct 2008 00:31:14 +0000 (00:31 +0000)]
Fix a bug in the local allocator's liveness computation where it
was setting kill flags on tied uses in two-address instructions.
The kill flags were causing the allocator to think it could
allocate the use and its tied def in different registers.

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

16 years agoMake atomic Swap work, 64-bit on x86-32.
Dale Johannesen [Fri, 3 Oct 2008 22:25:52 +0000 (22:25 +0000)]
Make atomic Swap work, 64-bit on x86-32.
Make it all work in non-pic mode.

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

16 years agoClean up some multiple-return-value code that is no longer
Dan Gohman [Fri, 3 Oct 2008 22:21:24 +0000 (22:21 +0000)]
Clean up some multiple-return-value code that is no longer
applicable.

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

16 years agoChange PointerType::get -> getUnqual
Daniel Dunbar [Fri, 3 Oct 2008 22:17:25 +0000 (22:17 +0000)]
Change PointerType::get -> getUnqual

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

16 years agoRename llvmc2/core to llvmc2/driver.
Mikhail Glushenkov [Fri, 3 Oct 2008 21:26:27 +0000 (21:26 +0000)]
Rename llvmc2/core to llvmc2/driver.

Makefiles try to remove 'core' by default, so it wasn't a very good name.

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

16 years agoAnother dependency fix, prevent ObjDir from having trailing slash.
Daniel Dunbar [Fri, 3 Oct 2008 21:24:52 +0000 (21:24 +0000)]
Another dependency fix, prevent ObjDir from having trailing slash.
 - It turns out this is enough to completely break dependency file
   (.d) usage (at least for my gmake).

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

16 years agoFix function attribute verification check.
Devang Patel [Fri, 3 Oct 2008 21:11:02 +0000 (21:11 +0000)]
Fix function attribute verification check.
Thanks Duncan!

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

16 years agoPass MemOperand through for 64-bit atomics on 32-bit,
Dale Johannesen [Fri, 3 Oct 2008 19:41:08 +0000 (19:41 +0000)]
Pass MemOperand through for 64-bit atomics on 32-bit,
incidentally making the case where the memop is a
pointer deref work.  Fix cmp-and-swap regression.

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

16 years agoAdd IS_CLEANING_TARGET Makefile variable.
Daniel Dunbar [Fri, 3 Oct 2008 19:11:19 +0000 (19:11 +0000)]
Add IS_CLEANING_TARGET Makefile variable.
 - Fixes bug in dependency inclusions where make with unspecified
   target wouldn't include dependency files, eek!

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

16 years agoNick Lewycky's patch.
Devang Patel [Fri, 3 Oct 2008 18:57:37 +0000 (18:57 +0000)]
Nick Lewycky's patch.
While hosting instruction check PHI node.

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

16 years agoupdate svn:ignore
Nuno Lopes [Fri, 3 Oct 2008 18:13:54 +0000 (18:13 +0000)]
update svn:ignore

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

16 years agoNew test case.
Evan Cheng [Fri, 3 Oct 2008 18:12:59 +0000 (18:12 +0000)]
New test case.

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

16 years agoUse -1ULL instead of uint64_t(-1), at Anton's suggestion.
Dan Gohman [Fri, 3 Oct 2008 17:56:45 +0000 (17:56 +0000)]
Use -1ULL instead of uint64_t(-1), at Anton's suggestion.

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

16 years agoVerify function attributes.
Devang Patel [Fri, 3 Oct 2008 17:50:00 +0000 (17:50 +0000)]
Verify function attributes.

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

16 years agoFix typos pointed out by Duncan. Also untabify these files.
Evan Cheng [Fri, 3 Oct 2008 17:11:58 +0000 (17:11 +0000)]
Fix typos pointed out by Duncan. Also untabify these files.

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

16 years agoUnbreak build.
Daniel Dunbar [Fri, 3 Oct 2008 17:11:57 +0000 (17:11 +0000)]
Unbreak build.

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

16 years agoAvoid creating two TargetLowering objects for each target.
Dan Gohman [Fri, 3 Oct 2008 16:55:19 +0000 (16:55 +0000)]
Avoid creating two TargetLowering objects for each target.
Instead, just create one, and make sure everything that needs
it can access it. Previously most of the SelectionDAGISel
subclasses all had their own TargetLowering object, which was
redundant with the TargetLowering object in the TargetMachine
subclasses, except on Sparc, where SparcTargetMachine
didn't have a TargetLowering object. Change Sparc to work
more like the other targets here.

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

16 years agoRemove an unused field.
Dan Gohman [Fri, 3 Oct 2008 16:17:33 +0000 (16:17 +0000)]
Remove an unused field.

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

16 years agoOn Darwin ARM, memory needs special handling to do JIT. This patch expands
Jim Grosbach [Fri, 3 Oct 2008 16:17:20 +0000 (16:17 +0000)]
On Darwin ARM, memory needs special handling to do JIT. This patch expands
this handling to work properly for modifying stub functions, relocations
back to entry points after JIT compilation, etc..

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

16 years agoIndexing off by one resulted in errant encoding of source register for
Jim Grosbach [Fri, 3 Oct 2008 15:53:56 +0000 (15:53 +0000)]
Indexing off by one resulted in errant encoding of source register for
reg->reg moves.

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

16 years agoNeedStub/DoesntNeedStub logic was reversed, leading to not using a stub
Jim Grosbach [Fri, 3 Oct 2008 15:52:42 +0000 (15:52 +0000)]
NeedStub/DoesntNeedStub logic was reversed, leading to not using a stub
for global relocations that do need them (libc calls, for example).

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

16 years agoregenerate
Nuno Lopes [Fri, 3 Oct 2008 15:52:39 +0000 (15:52 +0000)]
regenerate

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

16 years agofix more memleaks in ResolveTypeTo() and ParseGlobalVariable()
Nuno Lopes [Fri, 3 Oct 2008 15:51:46 +0000 (15:51 +0000)]
fix more memleaks in ResolveTypeTo() and ParseGlobalVariable()

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

16 years agoregenerate with bison 2.3
Nuno Lopes [Fri, 3 Oct 2008 15:45:58 +0000 (15:45 +0000)]
regenerate with bison 2.3

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

16 years agoSwitch the MachineOperand accessors back to the short names like
Dan Gohman [Fri, 3 Oct 2008 15:45:36 +0000 (15:45 +0000)]
Switch the MachineOperand accessors back to the short names like
isReg, etc., from isRegister, etc.

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

16 years agofix memleak in FunctionHeaderH
Nuno Lopes [Fri, 3 Oct 2008 15:44:21 +0000 (15:44 +0000)]
fix memleak in FunctionHeaderH

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

16 years agoRename llvmc2/src to llvmc2/core.
Mikhail Glushenkov [Fri, 3 Oct 2008 10:27:23 +0000 (10:27 +0000)]
Rename llvmc2/src to llvmc2/core.

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

16 years agoFix build breakage when objdir!=srcdir (proper fix).
Mikhail Glushenkov [Fri, 3 Oct 2008 10:26:37 +0000 (10:26 +0000)]
Fix build breakage when objdir!=srcdir (proper fix).

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

16 years agoFix build breakage (again) when srcdir != objdir, other small fixes.
Mikhail Glushenkov [Fri, 3 Oct 2008 09:09:34 +0000 (09:09 +0000)]
Fix build breakage (again) when srcdir != objdir, other small fixes.

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

16 years agoThe result of getSetCCResultType (eg: i32) may be larger
Duncan Sands [Fri, 3 Oct 2008 07:41:46 +0000 (07:41 +0000)]
The result of getSetCCResultType (eg: i32) may be larger
than the type an i1 is promoted to (eg: i8).  Account
for this.  Noticed by Tilmann Scheller on CellSPU; he
will hopefully take care of fixing this in LegalizeDAG
and adding a testcase!

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

16 years agoTeach internalize to preserve the callgraph.
Duncan Sands [Fri, 3 Oct 2008 07:36:09 +0000 (07:36 +0000)]
Teach internalize to preserve the callgraph.
Why?  Because it was there!

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

16 years agoAcquire the lock only when necessary. More precisely, do not acquire
Nicolas Geoffray [Fri, 3 Oct 2008 07:27:08 +0000 (07:27 +0000)]
Acquire the lock only when necessary. More precisely, do not acquire
the lock when calling a method which may materialize the llvm::Function.

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

16 years agoSplitBlock should only attempt to update LoopInfo if it is actually being used.
Owen Anderson [Fri, 3 Oct 2008 06:55:35 +0000 (06:55 +0000)]
SplitBlock should only attempt to update LoopInfo if it is actually being used.

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

16 years agoImplement fast-isel support for zero-extending from i1.
Dan Gohman [Fri, 3 Oct 2008 01:28:47 +0000 (01:28 +0000)]
Implement fast-isel support for zero-extending from i1.
It turns out that this is a fairly common operation,
and it's easy enough to handle.

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

16 years agoFix X86FastISel to handle dynamic allocas that have avoided
Dan Gohman [Fri, 3 Oct 2008 01:27:49 +0000 (01:27 +0000)]
Fix X86FastISel to handle dynamic allocas that have avoided
getting inserted into the ValueMap. This avoids infinite
recursion in some rare cases.

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

16 years agoUnbreak the build.
Bill Wendling [Fri, 3 Oct 2008 00:26:49 +0000 (00:26 +0000)]
Unbreak the build.

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

16 years agoFix a typo.
Dan Gohman [Fri, 3 Oct 2008 00:07:11 +0000 (00:07 +0000)]
Fix a typo.

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

16 years agoAdd support for Canadian Cross builds where the host executables are not
Jim Grosbach [Thu, 2 Oct 2008 22:56:44 +0000 (22:56 +0000)]
Add support for Canadian Cross builds where the host executables are not
runnable on the build machine.

There are a few bits that need built for the build environment (TableGen).
This patch builds those bits, and the associated libraries, for the build
environment as well as the (usual) host environment.

Thanks to Eric C. and Devang P. for pre-commit review.

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

16 years agoFix build breakage.
Mikhail Glushenkov [Thu, 2 Oct 2008 22:41:42 +0000 (22:41 +0000)]
Fix build breakage.

Forgot to include Makefile.plugins.

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

16 years agoOptimize conditional branches in X86FastISel. This replaces
Dan Gohman [Thu, 2 Oct 2008 22:15:21 +0000 (22:15 +0000)]
Optimize conditional branches in X86FastISel. This replaces
sequences like this:
       sete    %al
       testb   %al, %al
       jne     LBB11_1
with this:
       je      LBB11_1

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

16 years agoAdd a new MachineBasicBlock utility function, isLayoutSuccessor, that
Dan Gohman [Thu, 2 Oct 2008 22:09:09 +0000 (22:09 +0000)]
Add a new MachineBasicBlock utility function, isLayoutSuccessor, that
can be used when deciding if a block can transfer control to another
via a fall-through instead of a branch.

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

16 years agoBuild system tweaks to make it more convenient for the plugin authors.
Mikhail Glushenkov [Thu, 2 Oct 2008 21:15:05 +0000 (21:15 +0000)]
Build system tweaks to make it more convenient for the plugin authors.

Plugins can be now compiled in with a slight Makefile change.
For example, to compile the new Clang driver, use:

cd $LLVMC2_DIR
make TOOLNAME=ccc2 BUILTIN_PLUGINS=Clang

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

16 years agofix build gcc 4.3
Andrew Lenharth [Thu, 2 Oct 2008 20:15:08 +0000 (20:15 +0000)]
fix build gcc 4.3

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

16 years agoUse a multimap rather than a map for holding the list of copies to insert, so we...
Owen Anderson [Thu, 2 Oct 2008 19:40:33 +0000 (19:40 +0000)]
Use a multimap rather than a map for holding the list of copies to insert, so we don't lose copies when two of them have
the same source.  I don't know what I was thinking when I wrote this originally.
Note: There's probably a more efficient way to do this, but I need to think about it some more, and about what determinism
guarantees need to be present.

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

16 years agoHandle some 64-bit atomics on x86-32, some of the time.
Dale Johannesen [Thu, 2 Oct 2008 18:53:47 +0000 (18:53 +0000)]
Handle some 64-bit atomics on x86-32, some of the time.

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