oota-llvm.git
14 years agoReverting 100048; it broke two Frontend debug info tests.
Stuart Hastings [Wed, 31 Mar 2010 23:08:46 +0000 (23:08 +0000)]
Reverting 100048; it broke two Frontend debug info tests.

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

14 years agoRewrite CorrectExtraCFGEdges() to make it more understandable.
Bill Wendling [Wed, 31 Mar 2010 22:54:38 +0000 (22:54 +0000)]
Rewrite CorrectExtraCFGEdges() to make it more understandable.

* Set the "DestA" and "DestB" according to how they're understood by the
  method. I.e., if one or both of them should point to the "fall through" block,
  then point to the fall through block.

* Improve the loop that removes superfluous edges to be more understandable.

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

14 years agoAdd a redundant PHI testcase for SSAUpdater to go with svn r100047.
Bob Wilson [Wed, 31 Mar 2010 21:38:43 +0000 (21:38 +0000)]
Add a redundant PHI testcase for SSAUpdater to go with svn r100047.

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

14 years agoDebug info can now properly represent functions inside classes inside other functions...
Stuart Hastings [Wed, 31 Mar 2010 21:10:54 +0000 (21:10 +0000)]
Debug info can now properly represent functions inside classes inside other functions.  Partial fix for Radar 7424645.

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

14 years agoRewrite part of the SSAUpdater to be more careful about inserting redundant
Bob Wilson [Wed, 31 Mar 2010 20:51:00 +0000 (20:51 +0000)]
Rewrite part of the SSAUpdater to be more careful about inserting redundant
PHIs.  The previous algorithm was unable to reliably detect when existing
PHIs in a cycle can be reused.  I'm still working on reducing a testcase.
Radar 7711900.

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

14 years agoFix a nasty dangling-pointer heisenbug that could
Dale Johannesen [Wed, 31 Mar 2010 20:37:15 +0000 (20:37 +0000)]
Fix a nasty dangling-pointer heisenbug that could
generate wrong code pretty much anywhere AFAICT.
A case that hits the bug reproducibly is impossible,
but the situation was like this:
Addr = ...
Store -> Addr
Addr2 = GEP , 0, 0
Store -> Addr2
Handling the first store, the code changed replaced Addr
with a sunkaddr and deleted Addr, but not its table
entry.  Code in OptimizedBlock replaced Addr2 with a
bitcast; if that happened to reuse the memory of Addr,
the old table entry was erroneously found when handling
the second store.

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

14 years agotestcase for r99914, provided by baldrick!
Gabor Greif [Wed, 31 Mar 2010 20:37:13 +0000 (20:37 +0000)]
testcase for r99914, provided by baldrick!

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

14 years agoreduce indentation, minor cleanups.
Chris Lattner [Wed, 31 Mar 2010 20:32:51 +0000 (20:32 +0000)]
reduce indentation, minor cleanups.

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

14 years agoReduce string trashing.
Benjamin Kramer [Wed, 31 Mar 2010 20:15:45 +0000 (20:15 +0000)]
Reduce string trashing.

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

14 years agoUse spaces, not tabs
Jakob Stoklund Olesen [Wed, 31 Mar 2010 20:05:12 +0000 (20:05 +0000)]
Use spaces, not tabs

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

14 years agoDwarfDebug: Allocate DIEValues with a BumpPtrAllocator. Most of them are
Benjamin Kramer [Wed, 31 Mar 2010 19:34:01 +0000 (19:34 +0000)]
DwarfDebug: Allocate DIEValues with a BumpPtrAllocator. Most of them are
POD-like anyway, so we don't even care about calling their d'tors (DIEBlock
being the exception).

~6% less mallocs and ~1% compile time improvement on clang -O0 -g oggenc.c

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

14 years agoAdd a FIXME.
Daniel Dunbar [Wed, 31 Mar 2010 19:14:05 +0000 (19:14 +0000)]
Add a FIXME.

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

14 years agoComment the changes for r98218 and friends inside the source code.
Bill Wendling [Wed, 31 Mar 2010 18:48:58 +0000 (18:48 +0000)]
Comment the changes for r98218 and friends inside the source code.

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

14 years agolit: Make sure to close any files we open as part of redirection.
Daniel Dunbar [Wed, 31 Mar 2010 18:48:43 +0000 (18:48 +0000)]
lit: Make sure to close any files we open as part of redirection.

PR6753.

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

14 years agoComment the changes for r98218 and friends inside the source code.
Bill Wendling [Wed, 31 Mar 2010 18:47:10 +0000 (18:47 +0000)]
Comment the changes for r98218 and friends inside the source code.

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

14 years agoFix PR6750. Don't try to merge a DomainValue with itself.
Jakob Stoklund Olesen [Wed, 31 Mar 2010 17:13:16 +0000 (17:13 +0000)]
Fix PR6750. Don't try to merge a DomainValue with itself.

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

14 years agos/getNameStr/getName/
Benjamin Kramer [Wed, 31 Mar 2010 16:06:22 +0000 (16:06 +0000)]
s/getNameStr/getName/

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

14 years agoBump SmallString size a bit to avoid malloc trashing.
Benjamin Kramer [Wed, 31 Mar 2010 16:04:26 +0000 (16:04 +0000)]
Bump SmallString size a bit to avoid malloc trashing.

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

14 years agoAddSignalHandler was not releasing the critical section on win32.
Torok Edwin [Wed, 31 Mar 2010 12:07:16 +0000 (12:07 +0000)]
AddSignalHandler was not releasing the critical section on win32.
Patch from Gianluigi Tiesi!

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

14 years agoSmall fixes to this documentation. Remove mention of uint/int type, fix typo
Nick Lewycky [Wed, 31 Mar 2010 07:50:17 +0000 (07:50 +0000)]
Small fixes to this documentation. Remove mention of uint/int type, fix typo
in 'number'.

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

14 years agoreduce indentation
Chris Lattner [Wed, 31 Mar 2010 06:09:04 +0000 (06:09 +0000)]
reduce indentation

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

14 years agotidy up
Chris Lattner [Wed, 31 Mar 2010 06:06:37 +0000 (06:06 +0000)]
tidy up

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

14 years agomicrooptimize this hot method, also making it more
Chris Lattner [Wed, 31 Mar 2010 05:53:47 +0000 (05:53 +0000)]
microoptimize this hot method, also making it more
consistent with other similar ones.

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

14 years agoMI != 0 is checked in the assert right above this.
Chris Lattner [Wed, 31 Mar 2010 05:42:48 +0000 (05:42 +0000)]
MI != 0 is checked in the assert right above this.

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

14 years agouse the isDebugValue() predicate and pop_back_val()
Chris Lattner [Wed, 31 Mar 2010 05:39:57 +0000 (05:39 +0000)]
use the isDebugValue() predicate and pop_back_val()

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

14 years agoassert is a function-like macro, not a control flow operator.
Chris Lattner [Wed, 31 Mar 2010 05:36:29 +0000 (05:36 +0000)]
assert is a function-like macro, not a control flow operator.

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

14 years agoCorrect comment.
Duncan Sands [Wed, 31 Mar 2010 05:27:33 +0000 (05:27 +0000)]
Correct comment.

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

14 years agoreduce indentation, fit in 80 cols and various other cosmetic cleanups.
Chris Lattner [Wed, 31 Mar 2010 05:15:22 +0000 (05:15 +0000)]
reduce indentation, fit in 80 cols and various other cosmetic cleanups.

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

14 years agofix file header.
Chris Lattner [Wed, 31 Mar 2010 04:26:23 +0000 (04:26 +0000)]
fix file header.

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

14 years agouse the optimized debug info apis in sdisel.
Chris Lattner [Wed, 31 Mar 2010 04:24:50 +0000 (04:24 +0000)]
use the optimized debug info apis in sdisel.

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

14 years agomake irbuilder use the new optimized debug info accessors.
Chris Lattner [Wed, 31 Mar 2010 04:09:11 +0000 (04:09 +0000)]
make irbuilder use the new optimized debug info accessors.

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

14 years agoadd new apis for getting/setting !dbg metadata on
Chris Lattner [Wed, 31 Mar 2010 03:34:40 +0000 (03:34 +0000)]
add new apis for getting/setting !dbg metadata on
instructions.  In addition to being a convenience,
they are faster than the old apis, particularly when
not going from an MDKindID like people should be
doing.

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

14 years agoReplace V_SET0 with variants for each SSE execution domain.
Jakob Stoklund Olesen [Wed, 31 Mar 2010 00:40:13 +0000 (00:40 +0000)]
Replace V_SET0 with variants for each SSE execution domain.

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

14 years agoFix typo. Thank you, valgrind.
Jakob Stoklund Olesen [Wed, 31 Mar 2010 00:40:08 +0000 (00:40 +0000)]
Fix typo. Thank you, valgrind.

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

14 years agoNot all platforms start symbols with _
Jakob Stoklund Olesen [Tue, 30 Mar 2010 23:12:48 +0000 (23:12 +0000)]
Not all platforms start symbols with _

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

14 years agoFix a major source of compile-time slowness at -O0 -g by optimizing
Chris Lattner [Tue, 30 Mar 2010 23:03:27 +0000 (23:03 +0000)]
Fix a major source of compile-time slowness at -O0 -g by optimizing
the storage of !dbg metadata kinds in the instruction themselves.
The on-the-side hash table works great for metadata that not-all
instructions get, or for metadata that only exists when optimizing.
But when compile-time is everything, it isn't great.

I'm not super thrilled with the fact that this plops a TrackingVH in
Instruction, because it grows it by 3 words.  I'm investigating
alternatives, but this should be a step in the right direction in any
case.

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

14 years agoEnable -sse-domain-fix by default. Now with tests!
Jakob Stoklund Olesen [Tue, 30 Mar 2010 22:47:00 +0000 (22:47 +0000)]
Enable -sse-domain-fix by default. Now with tests!

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

14 years agoV_SETALLONES is an integer instruction.
Jakob Stoklund Olesen [Tue, 30 Mar 2010 22:46:55 +0000 (22:46 +0000)]
V_SETALLONES is an integer instruction.

Since it is just a pxor in disguise, we should probably expand it to a full
polymorphic triple.

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

14 years agoRenumber SSE execution domains for better code size.
Jakob Stoklund Olesen [Tue, 30 Mar 2010 22:46:53 +0000 (22:46 +0000)]
Renumber SSE execution domains for better code size.

SSEDomainFix will collapse to the domain with the lower number when it has a
choice. The SSEPackedSingle domain often has smaller instructions, so prefer
that.

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

14 years agoRevert Mon Ping's change 99928, since it broke all the llvm-gcc buildbots.
Bob Wilson [Tue, 30 Mar 2010 22:27:04 +0000 (22:27 +0000)]
Revert Mon Ping's change 99928, since it broke all the llvm-gcc buildbots.

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

14 years agoIgnore invalid metadata.
Devang Patel [Tue, 30 Mar 2010 22:09:52 +0000 (22:09 +0000)]
Ignore invalid metadata.

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

14 years agoRevert "Enable -sse-domain-fix by default. What could possibly go wrong?"
Jakob Stoklund Olesen [Tue, 30 Mar 2010 21:36:32 +0000 (21:36 +0000)]
Revert "Enable -sse-domain-fix by default. What could possibly go wrong?"

Not running 'make check-all' before committing is a bad idea.

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

14 years agoEnable -sse-domain-fix by default. What could possibly go wrong?
Jakob Stoklund Olesen [Tue, 30 Mar 2010 21:09:31 +0000 (21:09 +0000)]
Enable -sse-domain-fix by default. What could possibly go wrong?

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

14 years agoAdded support for address spaces and added a isVolatile field to memcpy, memmove...
Mon P Wang [Tue, 30 Mar 2010 20:55:56 +0000 (20:55 +0000)]
Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset,
e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)
A update of langref will occur in a subsequent checkin.

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

14 years agomove some method definitions to files that make sense.
Chris Lattner [Tue, 30 Mar 2010 20:48:48 +0000 (20:48 +0000)]
move some method definitions to files that make sense.

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

14 years agoIntroduce SpecificBumpPtrAllocator, a wrapper for BumpPtrAllocator which allows
Benjamin Kramer [Tue, 30 Mar 2010 20:16:45 +0000 (20:16 +0000)]
Introduce SpecificBumpPtrAllocator, a wrapper for BumpPtrAllocator which allows
only a single type of object to be allocated. Use it to make VNInfo destruction
typesafe.

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

14 years agoTypo noticed by Duncan.
Torok Edwin [Tue, 30 Mar 2010 20:15:13 +0000 (20:15 +0000)]
Typo noticed by Duncan.

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

14 years agoFix a grammaro.
Dan Gohman [Tue, 30 Mar 2010 20:04:57 +0000 (20:04 +0000)]
Fix a grammaro.

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

14 years agoAdd cross-block inference to SSEDomainFix.
Jakob Stoklund Olesen [Tue, 30 Mar 2010 20:04:01 +0000 (20:04 +0000)]
Add cross-block inference to SSEDomainFix.

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

14 years agoFix llvm-ld to clean up its output files in case of an error.
Dan Gohman [Tue, 30 Mar 2010 19:56:41 +0000 (19:56 +0000)]
Fix llvm-ld to clean up its output files in case of an error.

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

14 years agofix two cases where the arguments were extracted from the wrong range out of the...
Gabor Greif [Tue, 30 Mar 2010 19:20:53 +0000 (19:20 +0000)]
fix two cases where the arguments were extracted from the wrong range out of the InvokeInst
spotted by baldrick -- thanks\!

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

14 years agoRemove the pmulld intrinsic and autoupdate it as a vector multiply.
Eric Christopher [Tue, 30 Mar 2010 18:49:01 +0000 (18:49 +0000)]
Remove the pmulld intrinsic and autoupdate it as a vector multiply.

Rewrite the pmulld patterns, and make sure that they fold in loads of
arguments into the instruction.

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

14 years agoRip out the 'is temporary' nonsense from the MCContext interface to
Chris Lattner [Tue, 30 Mar 2010 18:10:53 +0000 (18:10 +0000)]
Rip out the 'is temporary' nonsense from the MCContext interface to
create symbols.  It is extremely error prone and a source of a lot
of the remaining integrated assembler bugs on x86-64.

This fixes rdar://7807601.

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

14 years agoFunky indentation.
Evan Cheng [Tue, 30 Mar 2010 18:08:53 +0000 (18:08 +0000)]
Funky indentation.

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

14 years agoThere is no need to fall through after processing DBG_VALUE machine instruction.
Devang Patel [Tue, 30 Mar 2010 18:07:00 +0000 (18:07 +0000)]
There is no need to fall through after processing DBG_VALUE machine instruction.

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

14 years agoSwitch isa_impl from a function template to a class template with a
Douglas Gregor [Tue, 30 Mar 2010 18:05:52 +0000 (18:05 +0000)]
Switch isa_impl from a function template to a class template with a
static inline member function doit(). This enables the use of partial
specialization to override the last stage of the "isa" check.

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

14 years agoFix -Asserts warning.
Daniel Dunbar [Tue, 30 Mar 2010 17:57:42 +0000 (17:57 +0000)]
Fix -Asserts warning.

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

14 years agoIntroduce namespace-scope functions to enable LLVM statistics without
Douglas Gregor [Tue, 30 Mar 2010 17:32:08 +0000 (17:32 +0000)]
Introduce namespace-scope functions to enable LLVM statistics without
passing the command-line parameter "-stats" and to print the resulting
statistics without calling llvm_shutdown().

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

14 years agoChange PointerUnionX::getFromOpaqueValue() to be declared 'static inline' instead...
Ted Kremenek [Tue, 30 Mar 2010 16:20:03 +0000 (16:20 +0000)]
Change PointerUnionX::getFromOpaqueValue() to be declared 'static inline' instead of 'static'.

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

14 years agoXFAIL some PIC16 tests when running under valgrind-leaks. I don't expect these
Benjamin Kramer [Tue, 30 Mar 2010 14:34:13 +0000 (14:34 +0000)]
XFAIL some PIC16 tests when running under valgrind-leaks. I don't expect these
to be fixed any time soon.

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

14 years agoPIC16: Plug a leak in PIC16Section by allocating name & address strings in the
Benjamin Kramer [Tue, 30 Mar 2010 13:28:42 +0000 (13:28 +0000)]
PIC16: Plug a leak in PIC16Section by allocating name & address strings in the
MCContext. There is still one leak left in PIC16Section (the Items vector).

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

14 years agoDon't overwrite previous value, if it succeeded.
Torok Edwin [Tue, 30 Mar 2010 12:52:03 +0000 (12:52 +0000)]
Don't overwrite previous value, if it succeeded.

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

14 years agoHonour addGlobalMapping() in the interpreter, if it was used to add mappings for
Torok Edwin [Tue, 30 Mar 2010 12:31:58 +0000 (12:31 +0000)]
Honour addGlobalMapping() in the interpreter, if it was used to add mappings for
external Functions (the JIT does honour this).

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

14 years agoReapply r99881 with some fixes: only call destructor in releaseMemory!
Torok Edwin [Tue, 30 Mar 2010 11:17:48 +0000 (11:17 +0000)]
Reapply r99881 with some fixes: only call destructor in releaseMemory!

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

14 years agoRevert 99881, it brooke smooshlab's llvm-gcc-i386-darwin9.
Torok Edwin [Tue, 30 Mar 2010 10:25:08 +0000 (10:25 +0000)]
Revert 99881, it brooke smooshlab's llvm-gcc-i386-darwin9.

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

14 years agoIntroduce another Reset() method in BumpPtrAllocator that calls a destructor
Torok Edwin [Tue, 30 Mar 2010 10:08:26 +0000 (10:08 +0000)]
Introduce another Reset() method in BumpPtrAllocator that calls a destructor
on all objects it has allocated, if they are all of the same size and alignment.
Use this to destruct all VNInfos allocated in LiveIntervalAnalysis (PR6653).

valnos is not reliable for this purpose, as seen in r99400
(which still leaked, and sometimes caused double frees).

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

14 years agoAvoid being influenced by the presence of dbg_value instructions.
Evan Cheng [Tue, 30 Mar 2010 05:49:07 +0000 (05:49 +0000)]
Avoid being influenced by the presence of dbg_value instructions.

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

14 years agostringref'ize Timer apis
Chris Lattner [Tue, 30 Mar 2010 05:34:02 +0000 (05:34 +0000)]
stringref'ize Timer apis

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

14 years agofinally, maintain a global list of timer groups, allowing us to
Chris Lattner [Tue, 30 Mar 2010 05:27:58 +0000 (05:27 +0000)]
finally, maintain a global list of timer groups, allowing us to
implement TimerGroup::printAll, which prints and resets all active
timers.

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

14 years agoadd a new TimerGroup::print method, and refactor away the bogus
Chris Lattner [Tue, 30 Mar 2010 05:20:02 +0000 (05:20 +0000)]
add a new TimerGroup::print method, and refactor away the bogus
TimerGroup copy ctor and assignment operator.

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

14 years agorename GetLibSupportInfoOutputFile -> CreateInfoOutputFile and
Chris Lattner [Tue, 30 Mar 2010 05:01:08 +0000 (05:01 +0000)]
rename GetLibSupportInfoOutputFile -> CreateInfoOutputFile and
have it always return a new stream to simplify clients.

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

14 years agoif a timergroup is destroyed before its timers, print times.
Chris Lattner [Tue, 30 Mar 2010 04:58:26 +0000 (04:58 +0000)]
if a timergroup is destroyed before its timers, print times.

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

14 years agochange TimerGroup to keep a linked list of active timers
Chris Lattner [Tue, 30 Mar 2010 04:40:01 +0000 (04:40 +0000)]
change TimerGroup to keep a linked list of active timers
instead of just a count of them, and refactor the guts of
report printing out of removeTimer into its own method.
Refactor addTimerToPrint away.

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

14 years agoreapply my timer rewrite with a change for PassManager to store
Chris Lattner [Tue, 30 Mar 2010 04:03:22 +0000 (04:03 +0000)]
reapply my timer rewrite with a change for PassManager to store
timers by pointer instead of by-value.

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

14 years agorevert r99862 which is causing FNT failures.
Chris Lattner [Tue, 30 Mar 2010 03:57:00 +0000 (03:57 +0000)]
revert r99862 which is causing FNT failures.

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

14 years agofairly major rewrite of various timing related stuff.
Chris Lattner [Tue, 30 Mar 2010 02:38:19 +0000 (02:38 +0000)]
fairly major rewrite of various timing related stuff.

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

14 years agoAdd FIXME for operand promotion.
Eric Christopher [Tue, 30 Mar 2010 01:04:59 +0000 (01:04 +0000)]
Add FIXME for operand promotion.

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

14 years agoBe gentle to MSVC. C++ is hard, after all.
Jakob Stoklund Olesen [Tue, 30 Mar 2010 00:09:32 +0000 (00:09 +0000)]
Be gentle to MSVC. C++ is hard, after all.

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

14 years agoMC/Mach-O/x86_64: Support @GOTPCREL on symbols, even for non-PCrel relocations!
Daniel Dunbar [Mon, 29 Mar 2010 23:56:40 +0000 (23:56 +0000)]
MC/Mach-O/x86_64: Support @GOTPCREL on symbols, even for non-PCrel relocations!

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

14 years agoRe-add back in the slow way of determining of a clean-up should become a
Bill Wendling [Mon, 29 Mar 2010 23:37:07 +0000 (23:37 +0000)]
Re-add back in the slow way of determining of a clean-up should become a
catch-all. The "dominates" way won't catch all of the selectors which must be
changed.

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

14 years agoBasic implementation of SSEDomainFix pass.
Jakob Stoklund Olesen [Mon, 29 Mar 2010 23:24:21 +0000 (23:24 +0000)]
Basic implementation of SSEDomainFix pass.

Cross-block inference is primitive and wrong, but the pass is working otherwise.

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

14 years agoA more general (and simpler!) implementation of r99671. It performs a similar
Bill Wendling [Mon, 29 Mar 2010 23:02:46 +0000 (23:02 +0000)]
A more general (and simpler!) implementation of r99671. It performs a similar
transform. I.e., if a clean-up eh.selector call dominates the invoke of an
_Unwind_Resume_or_Rethrow, then we convert the eh.selector into a
catch-all. This patch, however, uses the DominatorTree information, and doesn't
go through the whole rigmarole of starting at the eh.exception call, finding the
corresponding URoR and eh.selector calls, and trying to trace through any number
of instruction types to get to them.

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

14 years agoEncode start location of debug value, communicated through DBG_VALUE machine instruct...
Devang Patel [Mon, 29 Mar 2010 22:59:58 +0000 (22:59 +0000)]
Encode start location of debug value, communicated through DBG_VALUE machine instruction, in a variable's DIE.

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

14 years agomove a function into a more logical place in the file
Chris Lattner [Mon, 29 Mar 2010 21:34:06 +0000 (21:34 +0000)]
move a function into a more logical place in the file

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

14 years agoremove support for per-time peak memory tracking, this
Chris Lattner [Mon, 29 Mar 2010 21:28:41 +0000 (21:28 +0000)]
remove support for per-time peak memory tracking, this
isn't used by anyone and is better exposed as a non-per-timer
thing.  Also, stop including System/Mutex.h in Timer.h

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

14 years agoFix PR4975. Avoid referencing empty vector.
Evan Cheng [Mon, 29 Mar 2010 21:27:30 +0000 (21:27 +0000)]
Fix PR4975. Avoid referencing empty vector.

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

14 years agovarious timer fixes: move operator= out of line,
Chris Lattner [Mon, 29 Mar 2010 21:24:52 +0000 (21:24 +0000)]
various timer fixes: move operator= out of line,
eliminate the per-timer lock (timers should be
externally locked if needed), the info-output-stream
can never be dbgs(), so drop the check.  Make some
stuff private.

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

14 years agoMake isInt?? and isUint?? template specializations of the generic versions. This
Benjamin Kramer [Mon, 29 Mar 2010 21:13:41 +0000 (21:13 +0000)]
Make isInt?? and isUint?? template specializations of the generic versions. This
makes calls a little bit more consistent and allows easy removal of the
specializations in the future. Convert all callers to the templated functions.

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

14 years agoPool allocate SDDbgValue nodes.
Evan Cheng [Mon, 29 Mar 2010 20:48:30 +0000 (20:48 +0000)]
Pool allocate SDDbgValue nodes.

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

14 years agoWe'll never match these as instructions, just as intrinsics so remove
Eric Christopher [Mon, 29 Mar 2010 20:41:51 +0000 (20:41 +0000)]
We'll never match these as instructions, just as intrinsics so remove
the SDNodes.

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

14 years agos/.../.
Chris Lattner [Mon, 29 Mar 2010 20:40:19 +0000 (20:40 +0000)]
s/.../.

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

14 years agouse RAII for ExceptionTimer too
Chris Lattner [Mon, 29 Mar 2010 20:39:38 +0000 (20:39 +0000)]
use RAII for ExceptionTimer too

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

14 years agofix a variety of issues were we'd start DebugTimer but
Chris Lattner [Mon, 29 Mar 2010 20:38:20 +0000 (20:38 +0000)]
fix a variety of issues were we'd start DebugTimer but
not stop it by using RAII.

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

14 years agomove code around and improve indentation, no functionality change.
Chris Lattner [Mon, 29 Mar 2010 20:35:01 +0000 (20:35 +0000)]
move code around and improve indentation, no functionality change.

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

14 years agoRemove a bunch of integer width predicate functions in favor of MathExtras.
Benjamin Kramer [Mon, 29 Mar 2010 19:07:58 +0000 (19:07 +0000)]
Remove a bunch of integer width predicate functions in favor of MathExtras.
Most of these were unused, some of them were wrong and unused (isS16Constant<short>,
isS10Constant<short>).

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

14 years agosome other notes.
Chris Lattner [Mon, 29 Mar 2010 18:42:42 +0000 (18:42 +0000)]
some other notes.

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

14 years agoapparently llvm 2.7 now has great armv4 support, from
Chris Lattner [Mon, 29 Mar 2010 18:39:28 +0000 (18:39 +0000)]
apparently llvm 2.7 now has great armv4 support, from
John Tytgat

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

14 years agoupdate the vmkit blurb
Chris Lattner [Mon, 29 Mar 2010 18:34:13 +0000 (18:34 +0000)]
update the vmkit blurb

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

14 years agoadd tce
Chris Lattner [Mon, 29 Mar 2010 17:50:39 +0000 (17:50 +0000)]
add tce

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

14 years agoFrom Kalle Raiskila:
Chris Lattner [Mon, 29 Mar 2010 17:38:47 +0000 (17:38 +0000)]
From Kalle Raiskila:

"the bigstack patch for SPU, with testcase. It is essentially the patch committed as 97091, and reverted as 97099, but with the following additions:
-in vararg handling, registers are marked to be live, to not confuse the register scavenger
-function prologue and epilogue are not emitted, if the stack size is 16. 16 means it is empty - there is only the register scavenger emergency spill slot, which is not used as there is no stack."

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