oota-llvm.git
15 years agoAdd -relocation-model=pic so that the test works
Rafael Espindola [Wed, 18 Mar 2009 09:38:28 +0000 (09:38 +0000)]
Add -relocation-model=pic so that the test works
both in Linux and Darwin.

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

15 years agoFix a bug.
Zhou Sheng [Wed, 18 Mar 2009 07:56:13 +0000 (07:56 +0000)]
Fix a bug.
If I->use_empty(), this method should return false.

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

15 years agoAdded missing support for widening when splitting an unary op (PR3683)
Mon P Wang [Wed, 18 Mar 2009 06:24:04 +0000 (06:24 +0000)]
Added missing support for widening when splitting an unary op (PR3683)
and expanding a bit convert (PR3711).  In both cases, we extract the
valid part of the widen vector and then do the conversion.

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

15 years agoAdd another test case for r64440.
Evan Cheng [Wed, 18 Mar 2009 02:43:01 +0000 (02:43 +0000)]
Add another test case for r64440.

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

15 years agoxfail these tests for now.
Evan Cheng [Wed, 18 Mar 2009 00:44:45 +0000 (00:44 +0000)]
xfail these tests for now.

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

15 years agoDisable the "call to immediate" optimization on x86-64. It is
Chris Lattner [Wed, 18 Mar 2009 00:43:52 +0000 (00:43 +0000)]
Disable the "call to immediate" optimization on x86-64.  It is
not safe in general because the immediate could be an arbitrary
value that does not fit in a 32-bit pcrel displacement.
Conservatively fall back to loading the value into a register
and calling through it.

We still do the optzn on X86-32.

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

15 years agoFix PR3807 by inserting 'insertelement' instructions in the normal dest of
Chris Lattner [Wed, 18 Mar 2009 00:31:45 +0000 (00:31 +0000)]
Fix PR3807 by inserting 'insertelement' instructions in the normal dest of
an invoke instead of after the invoke (in its block), which is invalid.

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

15 years agoA more proper -mtriple.
Bill Wendling [Wed, 18 Mar 2009 00:19:44 +0000 (00:19 +0000)]
A more proper -mtriple.

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

15 years agoTemporary fix. I think Rafael wanted this to be Linux-only.
Bill Wendling [Wed, 18 Mar 2009 00:16:36 +0000 (00:16 +0000)]
Temporary fix. I think Rafael wanted this to be Linux-only.

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

15 years agoLSR shouldn't ever try to hack on integer IV's larger than 64-bits. Right now
Chris Lattner [Tue, 17 Mar 2009 23:58:30 +0000 (23:58 +0000)]
LSR shouldn't ever try to hack on integer IV's larger than 64-bits.  Right now
it is not APInt clean, but even when it is it needs to be evaluated carefully
to determine whether it is actually profitable.

This fixes a crash on PR3806

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

15 years agoDon't force promotion of return arguments on the callee.
Rafael Espindola [Tue, 17 Mar 2009 23:43:59 +0000 (23:43 +0000)]
Don't force promotion of return arguments on the callee.
Some architectures (like x86) don't require it.
This fixes bug 3779.

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

15 years agoAdd BUILTIN_EXPECT Support/Compiler macro.
Daniel Dunbar [Tue, 17 Mar 2009 21:15:18 +0000 (21:15 +0000)]
Add BUILTIN_EXPECT Support/Compiler macro.
 - Use for exceptional buffer conditions in raw_ostream:write to shave
   off a cycle or two.

 - Please rename if you have a better one.

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

15 years agothis is apparently passing now. Evan/Dan, please check
Chris Lattner [Tue, 17 Mar 2009 20:23:43 +0000 (20:23 +0000)]
this is apparently passing now.  Evan/Dan, please check
to see if this is producing the expected code or not, I'm
not sure what the test was intended to check.

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

15 years agotest case for rev. 67095.
Devang Patel [Tue, 17 Mar 2009 19:47:21 +0000 (19:47 +0000)]
test case for rev. 67095.

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

15 years agoFix codegen to compute the size of an allocation by multiplying the
Chris Lattner [Tue, 17 Mar 2009 19:36:00 +0000 (19:36 +0000)]
Fix codegen to compute the size of an allocation by multiplying the
size by the array amount as an i32 value instead of promoting from
i32 to i64 then doing the multiply.  Not doing this broke wrap-around
assumptions that the optimizers (validly) made.  The ultimate real
fix for this is to introduce i64 version of alloca and remove mallocinst.

This fixes PR3829

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

15 years agoRemove a condition which is always true.
Chris Lattner [Tue, 17 Mar 2009 17:55:15 +0000 (17:55 +0000)]
Remove a condition which is always true.

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

15 years agoAdd newline at end of file.
Evan Cheng [Tue, 17 Mar 2009 17:08:25 +0000 (17:08 +0000)]
Add newline at end of file.

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

15 years agoCellSPU:
Scott Michel [Tue, 17 Mar 2009 16:45:16 +0000 (16:45 +0000)]
CellSPU:
Revert inadvertent mis-fix of fneg.

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

15 years agoMinimal raw_ostream unit tests
Daniel Dunbar [Tue, 17 Mar 2009 16:14:59 +0000 (16:14 +0000)]
Minimal raw_ostream unit tests

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

15 years agor66870 missed this out.
Sanjiv Gupta [Tue, 17 Mar 2009 15:46:15 +0000 (15:46 +0000)]
r66870 missed this out.

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

15 years agotypo
Gabor Greif [Tue, 17 Mar 2009 11:38:29 +0000 (11:38 +0000)]
typo

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

15 years agoReapply r67049, with the test adjusted for darwin
Duncan Sands [Tue, 17 Mar 2009 09:46:22 +0000 (09:46 +0000)]
Reapply r67049, with the test adjusted for darwin
(which produces "call L_f$stub" rather than "call f").

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

15 years agoFix a problem with DAGCombine where we were building an illegal build
Mon P Wang [Tue, 17 Mar 2009 06:33:10 +0000 (06:33 +0000)]
Fix a problem with DAGCombine where we were building an illegal build
vector shuffle mask. Forced the mask to be built using i32.  Note: this will
be irrelevant once vector_shuffle no longer takes a build vector for the
shuffle mask.

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

15 years agoRecognize bswapl as bswap too.
Dan Gohman [Tue, 17 Mar 2009 02:45:40 +0000 (02:45 +0000)]
Recognize bswapl as bswap too.

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

15 years agoRecognize "bswapq" as an alternate spelling for the bswap instruction.
Dan Gohman [Tue, 17 Mar 2009 02:17:27 +0000 (02:17 +0000)]
Recognize "bswapq" as an alternate spelling for the bswap instruction.

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

15 years agoraw_ostream: Return '*this' explicitly (instead of implicitly via
Daniel Dunbar [Tue, 17 Mar 2009 01:53:36 +0000 (01:53 +0000)]
raw_ostream: Return '*this' explicitly (instead of implicitly via
write) to expose more alias information.

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

15 years agoraw_ostream: Put all exceptional conditions in raw_ostream::write
Daniel Dunbar [Tue, 17 Mar 2009 01:36:56 +0000 (01:36 +0000)]
raw_ostream: Put all exceptional conditions in raw_ostream::write
under a single branch.

Also, add a FIXME for formatted output.

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

15 years agoSpiller may unfold load / mod / store instructions as an optimization when the would...
Evan Cheng [Tue, 17 Mar 2009 01:23:09 +0000 (01:23 +0000)]
Spiller may unfold load / mod / store instructions as an optimization when the would be loaded value is available in a register. It needs to check if it's legal to clobber the register. Also, the register can contain values of multiple spill slots, make sure to check all instead of just the one being unfolded.

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

15 years agoCellSPU:
Scott Michel [Tue, 17 Mar 2009 01:15:45 +0000 (01:15 +0000)]
CellSPU:
- Fix fabs, fneg for f32 and f64.
- Use BuildVectorSDNode.isConstantSplat, now that the functionality exists
- Continue to improve i64 constant lowering. Lower certain special constants
  to the constant pool when they correspond to SPU's shufb instruction's
  special mask values. This avoids the overhead of performing a shuffle on a
  zero-filled vector just to get the special constant when the memory load
  suffices.

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

15 years agoraw_ostream: Rework implementation of unbuffered streams so outputting
Daniel Dunbar [Tue, 17 Mar 2009 01:13:35 +0000 (01:13 +0000)]
raw_ostream: Rework implementation of unbuffered streams so outputting
a single character requires only one branch to follow slow path.
 - Never use a buffer when writing on an unbuffered stream.

 - Move default buffer size to header.

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

15 years agoFix a debug info dependency in jump threading.
Dale Johannesen [Tue, 17 Mar 2009 00:38:24 +0000 (00:38 +0000)]
Fix a debug info dependency in jump threading.

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

15 years agoraw_ostream: Replace flush_impl with write_impl, which takes data to
Daniel Dunbar [Mon, 16 Mar 2009 23:29:31 +0000 (23:29 +0000)]
raw_ostream: Replace flush_impl with write_impl, which takes data to
write as arguments.
 - Add raw_ostream::GetNumBytesInBuffer.
 - Privatize buffer pointers.
 - Get rid of slow and unnecessary code for writing out large strings.

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

15 years agoraw_ostream: Lift out flush_nonempty.
Daniel Dunbar [Mon, 16 Mar 2009 22:55:06 +0000 (22:55 +0000)]
raw_ostream: Lift out flush_nonempty.
 - Flush a known non-empty buffers; enforces the interface to
   flush_impl and kills off HandleFlush (which I saw no reason to be
   an inline method, Chris?).

 - Clarify invariant that flush_impl is only called with OutBufCur >
   OutBufStart.

 - This also cleary collects all places where we have to deal with the
   buffer possibly not existing.

 - A few more comments and fixing the unbuffered behavior remain in
   this commit sequence.

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

15 years agoCMake: Build system fixes for XCode. llvm-config still causes us some serious trouble...
Douglas Gregor [Mon, 16 Mar 2009 22:53:26 +0000 (22:53 +0000)]
CMake: Build system fixes for XCode. llvm-config still causes us some serious trouble, but it's less serious than it used to be

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

15 years agoMake raw_ostream::operator<<(const void *) fast; it doesn't matter but
Daniel Dunbar [Mon, 16 Mar 2009 22:08:44 +0000 (22:08 +0000)]
Make raw_ostream::operator<<(const void *) fast; it doesn't matter but
it is easy.

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

15 years agoAdd slow path for single character write, and use exclusively for
Daniel Dunbar [Mon, 16 Mar 2009 22:00:17 +0000 (22:00 +0000)]
Add slow path for single character write, and use exclusively for
single characters writes outside of the fast path in raw_ostream.h

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

15 years agoCMake: Make sure to build TableGen'd files in the binary directory
Douglas Gregor [Mon, 16 Mar 2009 21:35:18 +0000 (21:35 +0000)]
CMake: Make sure to build TableGen'd files in the binary directory

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

15 years ago--- Reverse-merging (from foreign repository) r67049 into '.':
Bill Wendling [Mon, 16 Mar 2009 20:27:20 +0000 (20:27 +0000)]
--- Reverse-merging (from foreign repository) r67049 into '.':
U    test/CodeGen/X86/2009-03-13-PHIElimBug.ll
D    test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll
U    lib/CodeGen/PHIElimination.cpp

r67049 was causing this failure:

Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/X86/dg.exp ...
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/X86/2009-03-13-PHIElimBug.ll for PR3784
Failed with exit(1) at line 1
while running:  llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/X86/2009-03-13-PHIElimBug.ll |  llc -march=x86 | /usr/bin/grep -A 2 {call f} | /usr/bin/grep movl
child process exited abnormally

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

15 years agoTweak the fix for PR3784: be less sensitive about just
Duncan Sands [Mon, 16 Mar 2009 19:58:38 +0000 (19:58 +0000)]
Tweak the fix for PR3784: be less sensitive about just
how invokes are set up.  The fix could be disturbed by
register copies coming after the EH_LABEL, and also didn't
behave quite right when it was the invoke result that
was used in a phi node.  Also (see new testcase) fix
another phi elimination bug while there: register copies
in the landing pad need to come after the EH_LABEL, because
that's where execution branches to when unwinding.  If they
come before the EH_LABEL then they will never be executed...
Also tweak the original testcase so it doesn't use a no-longer
existing counter.
The accumulated phi elimination changes fix two of seven Ada
testsuite failures that turned up after landing pad critical
edge splitting was turned off.  So there's probably more to come.

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

15 years agoCellSPU:
Scott Michel [Mon, 16 Mar 2009 18:47:25 +0000 (18:47 +0000)]
CellSPU:
Incorporate Tilmann's 128-bit operation patch. Evidently, it gets the
llvm-gcc bootstrap a bit further along.

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

15 years agochange this to test for an alias result more directly.
Chris Lattner [Mon, 16 Mar 2009 18:28:27 +0000 (18:28 +0000)]
change this to test for an alias result more directly.

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

15 years agoAdd TGSourceMgr.cpp to CMake build, sort lines
Douglas Gregor [Mon, 16 Mar 2009 17:04:14 +0000 (17:04 +0000)]
Add TGSourceMgr.cpp to CMake build, sort lines

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

15 years agoThis causes incorrect stack frame allocation when the last object is an array allocat...
Bruno Cardoso Lopes [Sun, 15 Mar 2009 23:28:07 +0000 (23:28 +0000)]
This causes incorrect stack frame allocation when the last object is an array allocated on the stack which would lead
the compiled program to run over its stack. Thanks to Gil Dogon

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

15 years agoSimplify. "Broken" is always true here.
Nick Lewycky [Sun, 15 Mar 2009 06:40:32 +0000 (06:40 +0000)]
Simplify. "Broken" is always true here.

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

15 years agoRemove obviously redundant call.
Nick Lewycky [Sun, 15 Mar 2009 06:39:52 +0000 (06:39 +0000)]
Remove obviously redundant call.

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

15 years agoGive the pre-alloc splitter access to the VirtRegMap. It doesn't do anything
Owen Anderson [Sat, 14 Mar 2009 21:40:05 +0000 (21:40 +0000)]
Give the pre-alloc splitter access to the VirtRegMap.  It doesn't do anything
useful with it at the moment, but it will in the future.

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

15 years agoAdd a replacement for 2009-02-12-GEPNoalias.ll that works without -debug.
Nick Lewycky [Sat, 14 Mar 2009 19:40:09 +0000 (19:40 +0000)]
Add a replacement for 2009-02-12-GEPNoalias.ll that works without -debug.

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

15 years agoApply a patch by Micah Villmow to fix AsmParser to accept vector
Dan Gohman [Sat, 14 Mar 2009 17:09:17 +0000 (17:09 +0000)]
Apply a patch by Micah Villmow to fix AsmParser to accept vector
shift constant expressions, and add support for folding vector
shift constant expressions. This fixes PR3802.

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

15 years agoFix Clang build for srcdir != objdir
Sebastian Redl [Sat, 14 Mar 2009 14:42:51 +0000 (14:42 +0000)]
Fix Clang build for srcdir != objdir

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

15 years agoAdd support for generating Clang diagnostic defs to Makefile.rules.
Sebastian Redl [Sat, 14 Mar 2009 11:59:18 +0000 (11:59 +0000)]
Add support for generating Clang diagnostic defs to Makefile.rules.

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

15 years agoAdd TableGen syntax highlighting for the jEdit editor.
Sebastian Redl [Sat, 14 Mar 2009 10:15:32 +0000 (10:15 +0000)]
Add TableGen syntax highlighting for the jEdit editor.

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

15 years agoAdd a testcase that covers a wide variety of ABI isel cases.
Dan Gohman [Sat, 14 Mar 2009 02:35:10 +0000 (02:35 +0000)]
Add a testcase that covers a wide variety of ABI isel cases.

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

15 years agoUse %rip-relative addressing on x86-64 whenever practical, as
Dan Gohman [Sat, 14 Mar 2009 02:33:41 +0000 (02:33 +0000)]
Use %rip-relative addressing on x86-64 whenever practical, as
it has a smaller encoding than absolute addressing.

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

15 years agoDon't forego folding of loads into 64-bit adds when the other
Dan Gohman [Sat, 14 Mar 2009 02:07:16 +0000 (02:07 +0000)]
Don't forego folding of loads into 64-bit adds when the other
operand is a signed 32-bit immediate. Unlike with the 8-bit
signed immediate case, it isn't actually smaller to fold a
32-bit signed immediate instead of a load. In fact, it's
larger in the case of 32-bit unsigned immediates, because
they can be materialized with movl instead of movq.

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

15 years agoAdd newlines at end of file (this can annoy gcov)
Daniel Dunbar [Sat, 14 Mar 2009 01:53:05 +0000 (01:53 +0000)]
Add newlines at end of file (this can annoy gcov)

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

15 years agoAvoid doing the transformation c ? 1.0 : 2.0 as load { 2.0, 1.0 } + c*4
Mon P Wang [Sat, 14 Mar 2009 00:25:19 +0000 (00:25 +0000)]
Avoid doing the transformation c ? 1.0 : 2.0 as load { 2.0, 1.0 } + c*4
if FPConstant is legal because if the FPConstant doesn't need to be stored
in a constant pool, the transformation is unlikely to be profitable.

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

15 years agoAdd a few more ptrtoint/inttoptr cast tests.
Dan Gohman [Fri, 13 Mar 2009 23:54:51 +0000 (23:54 +0000)]
Add a few more ptrtoint/inttoptr cast tests.

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

15 years agoImprove FastISel's handling of truncates to i1, and implement
Dan Gohman [Fri, 13 Mar 2009 23:53:06 +0000 (23:53 +0000)]
Improve FastISel's handling of truncates to i1, and implement
ptrtoint and inttoptr in X86FastISel. These casts aren't always
handled in the generic FastISel code because X86 sometimes needs
custom code to do truncation and zero-extension.

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

15 years agoFix -strip-debug-declare to work when there are
Dale Johannesen [Fri, 13 Mar 2009 22:59:47 +0000 (22:59 +0000)]
Fix -strip-debug-declare to work when there are
llvm.global.variable's but no llvm.declare's.

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

15 years agoFix PR3784: If the source of a phi comes from a bb ended with an invoke, make sure...
Evan Cheng [Fri, 13 Mar 2009 22:59:14 +0000 (22:59 +0000)]
Fix PR3784: If the source of a phi comes from a bb ended with an invoke, make sure the copy is inserted before the try range (unless it's used as an input to the invoke, then insert it after the last use), not at the end of the bb.

Also re-apply r66140 which was disabled as a workaround.

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

15 years agoAdd (hidden) TableGen command option '-clang-component' which specifies the
Ted Kremenek [Fri, 13 Mar 2009 22:53:41 +0000 (22:53 +0000)]
Add (hidden) TableGen command option '-clang-component' which specifies the
component's warnings to process for '-gen-clang-diags-defs'.

Also, when the component is specified, generate a '#if' prologue at the top of
the generated .def file (to match the current files).

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

15 years agoAdd initial implementation of a TableGen backend for converting Clang-warnings
Ted Kremenek [Fri, 13 Mar 2009 22:21:17 +0000 (22:21 +0000)]
Add initial implementation of a TableGen backend for converting Clang-warnings
tablegen files to the original .def preprocessor include files. This is my first
TableGen backend; I don't claim that it is awesome.

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

15 years agoFurther constify Record::isSubClassOf.
Ted Kremenek [Fri, 13 Mar 2009 22:20:10 +0000 (22:20 +0000)]
Further constify Record::isSubClassOf.

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

15 years agoFix test case. Now, llvm-gcc emits debug info for artificiaal variable _comp_ctor.
Devang Patel [Fri, 13 Mar 2009 21:57:16 +0000 (21:57 +0000)]
Fix test case. Now, llvm-gcc emits debug info for artificiaal variable _comp_ctor.

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

15 years agoFix a hashing bug in APInt. A certain pathological testcase (too
Stuart Hastings [Fri, 13 Mar 2009 21:51:13 +0000 (21:51 +0000)]
Fix a hashing bug in APInt.  A certain pathological testcase (too
large for the testsuite) took over six minutes to compile on my Mac.
The patched LLVM-GCC compiles that testcase in three seconds (GCC
takes less than one second).  This hash function is more complex
(about 35 instructions on x86) than what Chris wanted, but I expect it
will be well-behaved with arbitrary inputs.

Thank you to everyone who responded to my previous request for advice.

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

15 years agoFix escaping in asm string literals correctly by having tblgen unescape
Chris Lattner [Fri, 13 Mar 2009 21:33:17 +0000 (21:33 +0000)]
Fix escaping in asm string literals correctly by having tblgen unescape
them, then the asmprinter emitter reescape them.

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

15 years agoadd a horrible hack to fix the build.
Chris Lattner [Fri, 13 Mar 2009 21:23:43 +0000 (21:23 +0000)]
add a horrible hack to fix the build.

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

15 years agoRevert r66920. It was causing failures in the self-hosting buildbot (in release
Bill Wendling [Fri, 13 Mar 2009 21:15:59 +0000 (21:15 +0000)]
Revert r66920. It was causing failures in the self-hosting buildbot (in release
mode).

Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/dg.exp ...
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll
Failed with signal(SIGBUS) at line 1
while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll -bugpoint-crashcalls -silence-passes > /dev/null
0   bugpoint          0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85
1   bugpoint          0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706
2   libSystem.B.dylib 0x92f112bb _sigtramp + 43
3   libSystem.B.dylib 0xffffffff _sigtramp + 1829694831
4   bugpoint          0x00021d1c main + 92
5   bugpoint          0x00002106 start + 54
6   bugpoint          0x00000004 start + 18446744073709543220
Stack dump:
0.    Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll -bugpoint-crashcalls -silence-passes

FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll
Failed with signal(SIGBUS) at line 1
while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll -dce -bugpoint-deletecalls -simplifycfg -silence-passes
0   bugpoint          0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85
1   bugpoint          0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706
2   libSystem.B.dylib 0x92f112bb _sigtramp + 43
3   libSystem.B.dylib 0xffffffff _sigtramp + 1829694831
4   bugpoint          0x00021d1c main + 92
5   bugpoint          0x00002106 start + 54
6   bugpoint          0x00000006 start + 18446744073709543222
Stack dump:
0.    Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll -dce -bugpoint-deletecalls -simplifycfg -silence-passes

FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll
Failed with signal(SIGBUS) at line 1
while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll  -bugpoint-crashcalls -silence-passes
0   bugpoint          0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85
1   bugpoint          0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706
2   libSystem.B.dylib 0x92f112bb _sigtramp + 43
3   libSystem.B.dylib 0xffffffff _sigtramp + 1829694831
4   bugpoint          0x00021d1c main + 92
5   bugpoint          0x00002106 start + 54
Stack dump:
0.    Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll -bugpoint-crashcalls -silence-passes

--- Reverse-merging (from foreign repository) r66920 into '.':
U    include/llvm/Support/CallSite.h
U    include/llvm/Instructions.h
U    lib/Analysis/IPA/GlobalsModRef.cpp
U    lib/Analysis/IPA/Andersens.cpp
U    lib/Bitcode/Writer/BitcodeWriter.cpp
U    lib/VMCore/Instructions.cpp
U    lib/VMCore/Verifier.cpp
U    lib/VMCore/AsmWriter.cpp
U    lib/Transforms/Utils/LowerInvoke.cpp
U    lib/Transforms/Scalar/SimplifyCFGPass.cpp
U    lib/Transforms/IPO/PruneEH.cpp
U    lib/Transforms/IPO/DeadArgumentElimination.cpp

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

15 years agoadd support for a few simple escape characters in tblgen strings.
Chris Lattner [Fri, 13 Mar 2009 21:03:27 +0000 (21:03 +0000)]
add support for a few simple escape characters in tblgen strings.

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

15 years agoAdd ENABLE_COVERAGE, for building a +Coverage (gcov) configuration.
Daniel Dunbar [Fri, 13 Mar 2009 20:59:41 +0000 (20:59 +0000)]
Add ENABLE_COVERAGE, for building a +Coverage (gcov) configuration.
 - Required some extra makefile tweaks to introduce a new flag var
   which only goes to compile/link tools but not the relink step,
   otherwise we get a copy of libgcov in the relinked .o files.

 - No configure magic for this.

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

15 years agoFix FastISel's assumption that i1 values are always zero-extended
Dan Gohman [Fri, 13 Mar 2009 20:42:20 +0000 (20:42 +0000)]
Fix FastISel's assumption that i1 values are always zero-extended
by inserting explicit zero extensions where necessary. Included
is a testcase where SelectionDAG produces a virtual register
holding an i1 value which FastISel previously mistakenly assumed
to be zero-extended.

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

15 years agoremove a test that depends on -debug.
Chris Lattner [Fri, 13 Mar 2009 20:31:48 +0000 (20:31 +0000)]
remove a test that depends on -debug.

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

15 years agoremove a testcase that depends on -debug existing.
Chris Lattner [Fri, 13 Mar 2009 20:31:25 +0000 (20:31 +0000)]
remove a testcase that depends on -debug existing.

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

15 years agoadd 8 and 16 bit TLS moves.
Rafael Espindola [Fri, 13 Mar 2009 19:39:55 +0000 (19:39 +0000)]
add 8 and 16 bit TLS moves.
add a fixme note on how to remove code duplication.

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

15 years agoOne more place where debug info affects codegen.
Dale Johannesen [Fri, 13 Mar 2009 19:23:20 +0000 (19:23 +0000)]
One more place where debug info affects codegen.

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

15 years agoTest case for rev. 66925
Devang Patel [Fri, 13 Mar 2009 18:50:51 +0000 (18:50 +0000)]
Test case for rev. 66925

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

15 years agoImprove sext and zext of TLS variables.
Rafael Espindola [Fri, 13 Mar 2009 18:37:06 +0000 (18:37 +0000)]
Improve sext and zext of TLS variables.

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

15 years agoSecond installment of "BasicBlock operands to the back"
Gabor Greif [Fri, 13 Mar 2009 18:27:29 +0000 (18:27 +0000)]
Second installment of "BasicBlock operands to the back"
changes.

For InvokeInst now all arguments begin at op_begin().
The Callee, Cont and Fail are now faster to get by
access relative to op_end().

This patch introduces some temporary uglyness in CallSite.
Next I'll bring CallInst up to a similar scheme and then
the uglyness will magically vanish.

This patch also exposes all the reliance of the libraries
on InvokeInst's operand ordering. I am thinking of taking
care of that too.

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

15 years agoremove a buggy test, it is not ok to use -debug in RUN line.
Chris Lattner [Fri, 13 Mar 2009 18:19:34 +0000 (18:19 +0000)]
remove a buggy test, it is not ok to use -debug in RUN line.

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

15 years agogeneralize this code so that fast isel handles integer truncates to i1, which
Chris Lattner [Fri, 13 Mar 2009 16:36:42 +0000 (16:36 +0000)]
generalize this code so that fast isel handles integer truncates to i1, which
codegen to the same thing as integer truncates to i8 (the top bits are
just undefined).  This implements rdar://6667338

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

15 years agoadd a new TGError class and use it to propagate location info with
Chris Lattner [Fri, 13 Mar 2009 16:25:21 +0000 (16:25 +0000)]
add a new TGError class and use it to propagate location info with
errors when thrown.  This gets us nice errors like this from tblgen:

CMOVL32rr:  (set GR32:i32:$dst, (X86cmov GR32:$src1, GR32:$src2))
/Users/sabre/llvm/Debug/bin/tblgen: error:
Included from X86.td:116:
Parsing X86InstrInfo.td:922: In CMOVL32rr: X86cmov node requires exactly 4 operands!
def CMOVL32rr : I<0x4C, MRMSrcReg,       // if <s, GR32 = GR32
^

instead of just:

CMOVL32rr:  (set GR32:i32:$dst, (X86cmov GR32:$src1, GR32:$src2))
/Users/sabre/llvm/Debug/bin/tblgen: In CMOVL32rr: X86cmov node requires exactly 4 operands!

This is all I plan to do with this, but it should be easy enough to improve if anyone
cares (e.g. keeping more loc info in "dag" expr records in tblgen.

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

15 years agogive each Record a location.
Chris Lattner [Fri, 13 Mar 2009 16:09:24 +0000 (16:09 +0000)]
give each Record a location.

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

15 years agomake "locations" a class instead of a typedef.
Chris Lattner [Fri, 13 Mar 2009 16:01:53 +0000 (16:01 +0000)]
make "locations" a class instead of a typedef.

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

15 years agoUpdate these for the 2.5 release.
Duncan Sands [Fri, 13 Mar 2009 13:42:20 +0000 (13:42 +0000)]
Update these for the 2.5 release.

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

15 years agoThese instructions have special lowering that may lower them to SSE
Bill Wendling [Fri, 13 Mar 2009 08:41:47 +0000 (08:41 +0000)]
These instructions have special lowering that may lower them to SSE
instructions. Prevent that if we don't want implicit uses of SSE.

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

15 years agoUnbreak build, bring in std::string for GCC 4.3
Argyrios Kyrtzidis [Fri, 13 Mar 2009 08:12:13 +0000 (08:12 +0000)]
Unbreak build, bring in std::string for GCC 4.3

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

15 years agoFix some significant problems with constant pools that resulted in unnecessary paddin...
Evan Cheng [Fri, 13 Mar 2009 07:51:59 +0000 (07:51 +0000)]
Fix some significant problems with constant pools that resulted in unnecessary paddings between constant pool entries, larger than necessary alignments (e.g. 8 byte alignment for .literal4 sections), and potentially other issues.

1. ConstantPoolSDNode alignment field is log2 value of the alignment requirement. This is not consistent with other SDNode variants.
2. MachineConstantPool alignment field is also a log2 value.
3. However, some places are creating ConstantPoolSDNode with alignment value rather than log2 values. This creates entries with artificially large alignments, e.g. 256 for SSE vector values.
4. Constant pool entry offsets are computed when they are created. However, asm printer group them by sections. That means the offsets are no longer valid. However, asm printer uses them to determine size of padding between entries.
5. Asm printer uses expensive data structure multimap to track constant pool entries by sections.
6. Asm printer iterate over SmallPtrSet when it's emitting constant pool entries. This is non-deterministic.

Solutions:
1. ConstantPoolSDNode alignment field is changed to keep non-log2 value.
2. MachineConstantPool alignment field is also changed to keep non-log2 value.
3. Functions that create ConstantPool nodes are passing in non-log2 alignments.
4. MachineConstantPoolEntry no longer keeps an offset field. It's replaced with an alignment field. Offsets are not computed when constant pool entries are created. They are computed on the fly in asm printer and JIT.
5. Asm printer uses cheaper data structure to group constant pool entries.
6. Asm printer compute entry offsets after grouping is done.
7. Change JIT code to compute entry offsets on the fly.

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

15 years agoUnbreak build.
Evan Cheng [Fri, 13 Mar 2009 07:41:30 +0000 (07:41 +0000)]
Unbreak build.

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

15 years agosplit buffer management and diagnostic printing out of the tblgen
Chris Lattner [Fri, 13 Mar 2009 07:05:43 +0000 (07:05 +0000)]
split buffer management and diagnostic printing out of the tblgen
lexer into its own TGSourceMgr class.

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

15 years agoConvert VirtRegMap to a MachineFunctionPass.
Owen Anderson [Fri, 13 Mar 2009 05:55:11 +0000 (05:55 +0000)]
Convert VirtRegMap to a MachineFunctionPass.

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

15 years agogeneralize the previous code to use the full generality of LEA
Chris Lattner [Fri, 13 Mar 2009 05:53:31 +0000 (05:53 +0000)]
generalize the previous code to use the full generality of LEA
for i32/i64 expressions (we could also do i16 on cpus where
i16 lea is fast, but I didn't add this).  On the example, we now
generate:

_test:
movl 4(%esp), %eax
cmpl $42, (%eax)
setl %al
movzbl %al, %eax
leal 4(%eax,%eax,8), %eax
ret

instead of:

_test:
movl 4(%esp), %eax
cmpl $41, (%eax)
movl $4, %ecx
movl $13, %eax
cmovg %ecx, %eax
ret

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

15 years agooptimize the case of cond ? 42 : 41 and friends. This compiles the
Chris Lattner [Fri, 13 Mar 2009 05:22:11 +0000 (05:22 +0000)]
optimize the case of cond ? 42 : 41 and friends.  This compiles the
example to:

_test:
movl 4(%esp), %eax
cmpl $41, (%eax)
setg %al
movzbl %al, %eax
orl $4294967294, %eax
ret

instead of:

        movl    4(%esp), %eax
        cmpl    $41, (%eax)
movl $4294967294, %ecx
movl $4294967295, %eax
cmova %ecx, %eax
ret

which is smaller in code size and faster. rdar://6668608

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

15 years agoOops...I committed too much.
Bill Wendling [Fri, 13 Mar 2009 04:39:26 +0000 (04:39 +0000)]
Oops...I committed too much.

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

15 years agoTemporarily XFAIL this test.
Bill Wendling [Fri, 13 Mar 2009 04:37:11 +0000 (04:37 +0000)]
Temporarily XFAIL this test.

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

15 years agoEnhance address-mode folding of ISD::ADD to handle cases where the
Dan Gohman [Fri, 13 Mar 2009 02:25:09 +0000 (02:25 +0000)]
Enhance address-mode folding of ISD::ADD to handle cases where the
operands can't both be fully folded at the same time. For example,
in the included testcase, a global variable is being added with
an add of two values. The global variable wants RIP-relative
addressing, so it can't share the address with another base
register, but it's still possible to fold the initial add.

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

15 years agoFix one more place where debug info affected
Dale Johannesen [Fri, 13 Mar 2009 01:05:24 +0000 (01:05 +0000)]
Fix one more place where debug info affected
codegen (speculative execution).

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

15 years agojust initialize the first element, we don't need to set the rest to zeros.
Chris Lattner [Fri, 13 Mar 2009 00:24:01 +0000 (00:24 +0000)]
just initialize the first element, we don't need to set the rest to zeros.

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

15 years agoEliminate a 9640 byte static mutable initialized data item by moving it
Chris Lattner [Fri, 13 Mar 2009 00:03:51 +0000 (00:03 +0000)]
Eliminate a 9640 byte static mutable initialized data item by moving it
to the stack.  This shrinks all llvm tools by 9k, and improves reentrancy.

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

15 years agostatic functions don't need an anonymous namespace.
Chris Lattner [Thu, 12 Mar 2009 23:59:55 +0000 (23:59 +0000)]
static functions don't need an anonymous namespace.

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

15 years agoFix a typo in a comment.
Dan Gohman [Thu, 12 Mar 2009 23:55:10 +0000 (23:55 +0000)]
Fix a typo in a comment.

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