Bill Wendling [Tue, 24 Feb 2009 00:37:28 +0000 (00:37 +0000)]
Un-XFAIL this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65355
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 24 Feb 2009 00:05:16 +0000 (00:05 +0000)]
While folding unconditional return move DbgRegionEndInst into the predecessor, instead of removing it. This fixes following tests from llvmgcc42 testsuite.
gcc.c-torture/execute/
20000605-3.c
gcc.c-torture/execute/
20020619-1.c
gcc.c-torture/execute/
20030920-1.c
gcc.c-torture/execute/loop-ivopts-1.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65353
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 24 Feb 2009 00:02:15 +0000 (00:02 +0000)]
If there is not any debug info available for any global variables and any subprograms then there is not any debug info to emit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65352
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 23 Feb 2009 23:20:35 +0000 (23:20 +0000)]
Back out the change in 64918 that used sign-extensions when promoting
trip counts that use signed comparisons. It's not obviously the best
approach for preserving trip count information, and at any rate there
isn't anything in the tree right now that makes use of that, so for
now always using zero-extensions is preferable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65347
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 23 Feb 2009 22:03:08 +0000 (22:03 +0000)]
Fast-isel can't do TLS yet, so it should fall back to SDISel
if it sees TLS addresses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65341
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 23 Feb 2009 17:28:16 +0000 (17:28 +0000)]
Correctly implement ImmutableMap::getMaxElement() by getting the actual <key, value> pair.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65327
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 23 Feb 2009 17:27:18 +0000 (17:27 +0000)]
Add ImmutableMap::getMaxElement(), a method that returns the <key,value> pair in a ImmutableMap that has the highest ranked key.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65326
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 23 Feb 2009 17:10:29 +0000 (17:10 +0000)]
LoopDeletion needs to inform ScalarEvolution when a loop is deleted,
so that ScalarEvolution doesn't hang onto a dangling Loop*, which
could be a problem if another Loop happens to get allocated at the
same address.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65323
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 23 Feb 2009 16:34:46 +0000 (16:34 +0000)]
Use the -stack-alignment option instead of using a target triple
for avoiding dynamic stack realignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65319
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 23 Feb 2009 16:29:41 +0000 (16:29 +0000)]
IndVarSimplify preserves ScalarEvolution. In the
-std-compile-opts sequence, this avoids the need for ScalarEvolution to
be rerun before LoopDeletion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65318
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhou Sheng [Mon, 23 Feb 2009 10:15:04 +0000 (10:15 +0000)]
Add test case for checkin @r65314.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65315
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhou Sheng [Mon, 23 Feb 2009 10:14:11 +0000 (10:14 +0000)]
Should reset DBI_Prev if DBI_Next == 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65314
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 23 Feb 2009 09:03:22 +0000 (09:03 +0000)]
Only v1i16 (i.e. _m64) is returned via RAX / RDX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65313
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Mon, 23 Feb 2009 09:03:06 +0000 (09:03 +0000)]
Make this test use darwin targe triple, to avoid stack traffic on linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65312
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Mon, 23 Feb 2009 08:49:38 +0000 (08:49 +0000)]
Generate better code for v8i16 shuffles on SSE2
Generate better code for v16i8 shuffles on SSE2 (avoids stack)
Generate pshufb for v8i16 and v16i8 shuffles on SSSE3 where it is fewer uops.
Document the shuffle matching logic and add some FIXMEs for later further
cleanups.
New tests that test the above.
Examples:
New:
_shuf2:
pextrw $7, %xmm0, %eax
punpcklqdq %xmm1, %xmm0
pshuflw $128, %xmm0, %xmm0
pinsrw $2, %eax, %xmm0
Old:
_shuf2:
pextrw $2, %xmm0, %eax
pextrw $7, %xmm0, %ecx
pinsrw $2, %ecx, %xmm0
pinsrw $3, %eax, %xmm0
movd %xmm1, %eax
pinsrw $4, %eax, %xmm0
ret
=========
New:
_shuf4:
punpcklqdq %xmm1, %xmm0
pshufb LCPI1_0, %xmm0
Old:
_shuf4:
pextrw $3, %xmm0, %eax
movsd %xmm1, %xmm0
pextrw $3, %xmm1, %ecx
pinsrw $4, %ecx, %xmm0
pinsrw $5, %eax, %xmm0
========
New:
_shuf1:
pushl %ebx
pushl %edi
pushl %esi
pextrw $1, %xmm0, %eax
rolw $8, %ax
movd %xmm0, %ecx
rolw $8, %cx
pextrw $5, %xmm0, %edx
pextrw $4, %xmm0, %esi
pextrw $3, %xmm0, %edi
pextrw $2, %xmm0, %ebx
movaps %xmm0, %xmm1
pinsrw $0, %ecx, %xmm1
pinsrw $1, %eax, %xmm1
rolw $8, %bx
pinsrw $2, %ebx, %xmm1
rolw $8, %di
pinsrw $3, %edi, %xmm1
rolw $8, %si
pinsrw $4, %esi, %xmm1
rolw $8, %dx
pinsrw $5, %edx, %xmm1
pextrw $7, %xmm0, %eax
rolw $8, %ax
movaps %xmm1, %xmm0
pinsrw $7, %eax, %xmm0
popl %esi
popl %edi
popl %ebx
ret
Old:
_shuf1:
subl $252, %esp
movaps %xmm0, (%esp)
movaps %xmm0, 16(%esp)
movaps %xmm0, 32(%esp)
movaps %xmm0, 48(%esp)
movaps %xmm0, 64(%esp)
movaps %xmm0, 80(%esp)
movaps %xmm0, 96(%esp)
movaps %xmm0, 224(%esp)
movaps %xmm0, 208(%esp)
movaps %xmm0, 192(%esp)
movaps %xmm0, 176(%esp)
movaps %xmm0, 160(%esp)
movaps %xmm0, 144(%esp)
movaps %xmm0, 128(%esp)
movaps %xmm0, 112(%esp)
movzbl 14(%esp), %eax
movd %eax, %xmm1
movzbl 22(%esp), %eax
movd %eax, %xmm2
punpcklbw %xmm1, %xmm2
movzbl 42(%esp), %eax
movd %eax, %xmm1
movzbl 50(%esp), %eax
movd %eax, %xmm3
punpcklbw %xmm1, %xmm3
punpcklbw %xmm2, %xmm3
movzbl 77(%esp), %eax
movd %eax, %xmm1
movzbl 84(%esp), %eax
movd %eax, %xmm2
punpcklbw %xmm1, %xmm2
movzbl 104(%esp), %eax
movd %eax, %xmm1
punpcklbw %xmm1, %xmm0
punpcklbw %xmm2, %xmm0
movaps %xmm0, %xmm1
punpcklbw %xmm3, %xmm1
movzbl 127(%esp), %eax
movd %eax, %xmm0
movzbl 135(%esp), %eax
movd %eax, %xmm2
punpcklbw %xmm0, %xmm2
movzbl 155(%esp), %eax
movd %eax, %xmm0
movzbl 163(%esp), %eax
movd %eax, %xmm3
punpcklbw %xmm0, %xmm3
punpcklbw %xmm2, %xmm3
movzbl 188(%esp), %eax
movd %eax, %xmm0
movzbl 197(%esp), %eax
movd %eax, %xmm2
punpcklbw %xmm0, %xmm2
movzbl 217(%esp), %eax
movd %eax, %xmm4
movzbl 225(%esp), %eax
movd %eax, %xmm0
punpcklbw %xmm4, %xmm0
punpcklbw %xmm2, %xmm0
punpcklbw %xmm3, %xmm0
punpcklbw %xmm1, %xmm0
addl $252, %esp
ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65311
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 23 Feb 2009 07:41:55 +0000 (07:41 +0000)]
If nobody minds, I'm using LTO to produce faster binaries. Switch fast codegen
off in libLTO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65310
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Mon, 23 Feb 2009 07:07:56 +0000 (07:07 +0000)]
Changed option name from inline-threshold to basic-inline-threshold because
inline-threshold option is used by the inliner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65309
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 23 Feb 2009 05:56:17 +0000 (05:56 +0000)]
fix some typos that Duncan noticed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65306
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 23 Feb 2009 00:42:30 +0000 (00:42 +0000)]
Propagate debug loc info through prologue/epilogue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65298
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Michel [Sun, 22 Feb 2009 23:36:09 +0000 (23:36 +0000)]
Introduce the BuildVectorSDNode class that encapsulates the ISD::BUILD_VECTOR
instruction. The class also consolidates the code for detecting constant
splats that's shared across PowerPC and the CellSPU backends (and might be
useful for other backends.) Also introduces SelectionDAG::getBUID_VECTOR() for
generating new BUILD_VECTOR nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65296
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 22 Feb 2009 22:15:44 +0000 (22:15 +0000)]
Add an option to the gold plugin to make it emit a file with the public api
list that can in turn be passed to -internalize pass through
-internalize-public-api-file.
Pass gold -plugin-opt=generate-api-file to produce "apifile.txt" in the current
directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65295
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 22 Feb 2009 18:06:32 +0000 (18:06 +0000)]
Revert the part of 64623 that attempted to align the source in a
memcpy to match the alignment of the destination. It isn't necessary
for making loads and stores handled like the SSE loadu/storeu
intrinsics, and it was causing a performance regression in
MultiSource/Applications/JM/lencod.
The problem appears to have been a memcpy that copies from some
highly aligned array into an alloca; the alloca was then being
assigned a large alignment, which required codegen to perform
dynamic stack-pointer re-alignment, which forced the enclosing
function to have a frame pointer, which led to increased spilling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65289
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 22 Feb 2009 16:40:52 +0000 (16:40 +0000)]
Properly parenthesize this expression, fixing a real bug in the new
-full-lsr code, as well as a GCC warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65288
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Pennington [Sun, 22 Feb 2009 15:54:44 +0000 (15:54 +0000)]
bug 3610: Test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65287
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 22 Feb 2009 08:35:56 +0000 (08:35 +0000)]
If a use operand is marked isKill, don't forget to add kill to its live interval as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65279
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 22 Feb 2009 08:13:45 +0000 (08:13 +0000)]
Add a note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65275
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 22 Feb 2009 08:05:12 +0000 (08:05 +0000)]
Be bug compatible with gcc by returning MMX values in RAX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65274
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 22 Feb 2009 08:04:23 +0000 (08:04 +0000)]
Do not consider MMX_MOVD64rr a move instructions. The source register is in GR32, the destination is VR64. They are not compatible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65273
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 22 Feb 2009 07:31:19 +0000 (07:31 +0000)]
Only try to sink immediate when TLI is not null. It needs to check if immediate would fit in target addressing field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65268
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 21 Feb 2009 22:38:49 +0000 (22:38 +0000)]
Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65250
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 21 Feb 2009 22:36:26 +0000 (22:36 +0000)]
Remove tests for flex/bison which are no longer needed by LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65249
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 21 Feb 2009 20:50:42 +0000 (20:50 +0000)]
Don't sign extend the char when expanding char -> int during
load(bitcast(char[4] to i32*)) evaluation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65246
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 21 Feb 2009 20:42:39 +0000 (20:42 +0000)]
Add makefile debugging target; use "make print-FOO" to print the
value/definition/origin of FOO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65245
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Pennington [Sat, 21 Feb 2009 19:11:18 +0000 (19:11 +0000)]
bug 3610: Floating point vaarg not softened.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65239
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 21 Feb 2009 18:25:30 +0000 (18:25 +0000)]
Add version of StringsEqualNoCase that takes two null-terminated C-strings and compares up to 'len' characters. I tend to screw up string comparison functions, so anyone who is interested please review this\!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65236
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sat, 21 Feb 2009 11:53:32 +0000 (11:53 +0000)]
Drop bunch of half-working stuff in the ext_weak linkage support.
Now we're using one gross, but quite robust hack :) (previous ones
did not work, for example, when ext_weak symbol was used deep inside
constant expression in the initializer).
The proper fix of this problem will require some quite huge asmprinter
changes and that's why was postponed. This fixes PR3629 by the way :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65230
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 21 Feb 2009 08:41:09 +0000 (08:41 +0000)]
Pass different flags on different platforms when building PIC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65229
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 21 Feb 2009 07:05:11 +0000 (07:05 +0000)]
Add AddrModeMatcher.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65228
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 21 Feb 2009 03:14:25 +0000 (03:14 +0000)]
If two-address def is dead and the instruction does not define other registers, and it doesn't produce side effects, just delete the instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65218
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 21 Feb 2009 02:06:47 +0000 (02:06 +0000)]
Teach LSR sink to sink the immediate portion of the common expression back into uses if they fit in address modes of all the uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65215
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 21 Feb 2009 01:11:36 +0000 (01:11 +0000)]
Make sure this doesn't access .end() too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65213
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Sat, 21 Feb 2009 01:09:07 +0000 (01:09 +0000)]
fix and clean up a comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65212
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 21 Feb 2009 01:07:26 +0000 (01:07 +0000)]
Make sure we don't dereference the .end() of the container.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65211
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Feb 2009 00:46:50 +0000 (00:46 +0000)]
rename a function to indicate that it checks for profitability as well
as legality. Make load sinking and gep sinking more careful: we only
do it when it won't pessimize loads from the stack. This has the added
benefit of not producing code that is unanalyzable to SROA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65209
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 21 Feb 2009 00:43:56 +0000 (00:43 +0000)]
Propagate more debug loc infos. This also includes some code cleaning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65207
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 21 Feb 2009 00:32:08 +0000 (00:32 +0000)]
We need to propagate the debug location information even when dealing with the
prologue/epilogue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65206
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 20 Feb 2009 23:44:54 +0000 (23:44 +0000)]
* Fixed spelling
* Linters now return their information instead of printing it, to
enable easier unittesting
* Added support for finding tabs in files, added to C++ linter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65202
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 20 Feb 2009 23:29:13 +0000 (23:29 +0000)]
Fix a bug that David Greene found in the DAGCombiner's logic
that checks whether it's safe to transform a store of a bitcast
value into a store of the original value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65201
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 20 Feb 2009 23:04:06 +0000 (23:04 +0000)]
Removed trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65199
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 20 Feb 2009 22:54:36 +0000 (22:54 +0000)]
Removed trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65197
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 20 Feb 2009 22:51:36 +0000 (22:51 +0000)]
Removed trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65196
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 20 Feb 2009 22:30:46 +0000 (22:30 +0000)]
Keep the newline character at the end of the lines whose trailing whitespace we
are deleting; otherwise, everything ends up on a single line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65185
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 20 Feb 2009 22:28:45 +0000 (22:28 +0000)]
Only strip the newline character at the end of the lines that we're considering
for length and for trailing whitespace; otherwise, the whitespace themselves
will also be removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65182
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 20 Feb 2009 22:20:18 +0000 (22:20 +0000)]
Fixed lint errors:
* Alphabetized #includes
* Removed trailing whitespace
* Wrapped or shortened lines over 80 chars
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65181
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 20 Feb 2009 22:19:20 +0000 (22:19 +0000)]
We have logic in there to emit a default debugging label at the beginning of a
function. Emitting another label after the prologue messes up the debugging. We
are doing that because the first DebugLoc object it sees is different from the
previous, which was nothing. Check for this situation, and don't emit one if
it's the first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65180
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 20 Feb 2009 22:16:49 +0000 (22:16 +0000)]
Fix strange logic in CollectIVUsers used to determine whether all uses are
addresses, part 1. This fixes an obvious logic bug. Previously if the only
in-loop use is a PHI, it would return AllUsesAreAddresses as true.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65178
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 20 Feb 2009 21:27:23 +0000 (21:27 +0000)]
Simplify code and reduce indentation. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65167
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 20 Feb 2009 21:06:57 +0000 (21:06 +0000)]
Fix 80-column violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65159
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 20 Feb 2009 21:05:23 +0000 (21:05 +0000)]
It's not necessary to check if Base is null here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65157
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 20 Feb 2009 20:43:02 +0000 (20:43 +0000)]
Support return of MMX values in 64-bit mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65152
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 20 Feb 2009 20:40:28 +0000 (20:40 +0000)]
- Early exit a nested block.
- Correct comment.
- Whitespace changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65149
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 20 Feb 2009 20:29:04 +0000 (20:29 +0000)]
Add a comment about how Imm can be used for loop-variant values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65147
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Fri, 20 Feb 2009 18:42:06 +0000 (18:42 +0000)]
add note about sin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65137
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 20 Feb 2009 18:24:38 +0000 (18:24 +0000)]
Factor address mode matcher out of codegen prepare to make it available to other passes, e.g. loop strength reduction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65134
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhou Sheng [Fri, 20 Feb 2009 17:49:33 +0000 (17:49 +0000)]
Just roll back the previous change to -mem2reg.
Will re-think about this according to Chris's comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65126
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhou Sheng [Fri, 20 Feb 2009 16:31:35 +0000 (16:31 +0000)]
patch to update the line number information in pass -mem2reg.
Currently this pass will delete the variable declaration info,
and keep the line number info. But the kept line number info is not updated,
and some is redundant or not correct, this patch just updates those info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65123
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 20 Feb 2009 10:02:23 +0000 (10:02 +0000)]
Fix a crash in the pre-alloc splitter exposed by recent codegen changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65121
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 20 Feb 2009 09:11:36 +0000 (09:11 +0000)]
Add a quick pass to the stack slot colorer to eliminate some trivially redundant spills after coloring.
Ideally these would never get created in the first place, but until we enhance the spiller to have a more
global picture of what's happening, this is necessary for code quality in some circumstances.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65120
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 20 Feb 2009 07:10:11 +0000 (07:10 +0000)]
make these tests pass when run on a G5.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65117
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 20 Feb 2009 04:17:46 +0000 (04:17 +0000)]
Implement "superhero" strength reduction, or full strength
reduction of address calculations down to basic pointer arithmetic.
This is currently off by default, as it needs a few other features
before it becomes generally useful. And even when enabled, full
strength reduction is only performed when it doesn't increase
register pressure, and when several other conditions are true.
This also factors out a bunch of exisiting LSR code out of
StrengthReduceStridedIVUsers into separate functions, and tidies
up IV insertion. This actually decreases register pressure even
in non-superhero mode. The change in iv-users-in-other-loops.ll
is an example of this; there are two more adds because there are
two fewer leas, and there is less spilling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65108
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 20 Feb 2009 00:44:43 +0000 (00:44 +0000)]
Add an accessor method to DwarfWriter to tell of debugging info should be emitted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65092
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 20 Feb 2009 00:42:52 +0000 (00:42 +0000)]
Add a default debug location object to the Machine Function. It's used to emit a default debugging label at the beginning of a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65091
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 19 Feb 2009 21:57:07 +0000 (21:57 +0000)]
Temporarily revert r65065. It was causing test failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65068
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 19 Feb 2009 21:44:55 +0000 (21:44 +0000)]
Print out debug info when printing the machine instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65067
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 19 Feb 2009 21:23:54 +0000 (21:23 +0000)]
Check for -fast here too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65065
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 19 Feb 2009 21:12:54 +0000 (21:12 +0000)]
Generate these labels when we're in "fast" mode, not simply when we're no in
"optimize-for-size" mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65064
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 19 Feb 2009 19:40:21 +0000 (19:40 +0000)]
Describe tail merging's use of InsertBranch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65062
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 19 Feb 2009 19:32:06 +0000 (19:32 +0000)]
Use DEBUG() instead of passing *DOUT to WriteAsOperand,
since the latter just passes a null reference when
debugging is not enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65060
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 19 Feb 2009 19:23:27 +0000 (19:23 +0000)]
Make the debug output of LSR less cryptic and more informative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65057
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 19 Feb 2009 09:16:38 +0000 (09:16 +0000)]
Print out a new label only if the debug location *tuple* is different. The debug
locations may change, but the tuples may be the same.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65039
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 19 Feb 2009 08:06:12 +0000 (08:06 +0000)]
Forgot to check that debug information is supported.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65034
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 19 Feb 2009 06:18:56 +0000 (06:18 +0000)]
Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65020
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 19 Feb 2009 06:18:24 +0000 (06:18 +0000)]
Default to building with position independent code. This may increase LLVM's
run time but will make LLVM easier to use as a library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65019
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 19 Feb 2009 05:34:35 +0000 (05:34 +0000)]
If an executable is run through a symlink, dladdr will return the
symlink. We really want the ultimate executable being run, not
the symlink. This lets clang find its headers when invoked through
a symlink. rdar://
6602012
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65017
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 19 Feb 2009 02:55:18 +0000 (02:55 +0000)]
Fix the logic in this assertion to properly validate the number
of arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64999
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 19 Feb 2009 02:40:15 +0000 (02:40 +0000)]
Reapply r57340. VMKit does not presently rely on materializeFunction
being called with the lock released, and this fixes a race condition
in the JIT as used by lli.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64997
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 19 Feb 2009 00:13:55 +0000 (00:13 +0000)]
Temporarily XFAIL this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64987
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 18 Feb 2009 23:12:06 +0000 (23:12 +0000)]
Put code that generates debug labels into TableGen so that it can be used by
everyone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64978
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Feb 2009 21:48:13 +0000 (21:48 +0000)]
add proper asmwriter and asmparser support for anonymous functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64953
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 18 Feb 2009 17:55:38 +0000 (17:55 +0000)]
In theory the aliasee may have dead constant users
here. Since we only do the transform if there is
one use, strip off any such users in the hope of
making the transform fire more often.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64926
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 18 Feb 2009 17:49:06 +0000 (17:49 +0000)]
really fix style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64923
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 18 Feb 2009 17:29:38 +0000 (17:29 +0000)]
The subprogram die may not exist while creating "default" scope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64920
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 18 Feb 2009 17:22:41 +0000 (17:22 +0000)]
Use a sign-extend instead of a zero-extend when promoting a
trip count value when the original loop iteration condition is
signed and the canonical induction variable won't undergo signed
overflow. This isn't required for correctness; it just preserves
more information about original loop iteration values.
Add a getTruncateOrSignExtend method to ScalarEvolution,
following getTruncateOrZeroExtend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64918
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 18 Feb 2009 16:54:33 +0000 (16:54 +0000)]
Simplify by using dyn_cast instead of isa and cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64917
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 18 Feb 2009 16:43:19 +0000 (16:43 +0000)]
Clarify the definition of "latch block" in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64916
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 18 Feb 2009 16:37:45 +0000 (16:37 +0000)]
Add explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64915
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 18 Feb 2009 08:31:02 +0000 (08:31 +0000)]
Add support to the JIT for true non-lazy operation. When a call to a function
that has not been JIT'd yet, the callee is put on a list of pending functions
to JIT. The call is directed through a stub, which is updated with the address
of the function after it has been JIT'd. A new interface for allocating and
updating empty stubs is provided.
Add support for removing the ModuleProvider the JIT was created with, which
would otherwise invalidate the JIT's PassManager, which is initialized with the
ModuleProvider's Module.
Add support under a new ExecutionEngine flag for emitting the infomration
necessary to update Function and GlobalVariable stubs after JITing them, by
recording the address of the stub and the name of the GlobalValue. This allows
code to be copied from one address space to another, where libraries may live
at different virtual addresses, and have the stubs updated with their new
correct target addresses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64906
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 18 Feb 2009 08:30:15 +0000 (08:30 +0000)]
fix style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64905
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 18 Feb 2009 07:50:22 +0000 (07:50 +0000)]
Add a test for r61358, which I forgot to add way back when.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64904
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 18 Feb 2009 05:45:50 +0000 (05:45 +0000)]
Factor out the code to add a MachineOperand to a MachineInstrBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64891
91177308-0d34-0410-b5e6-
96231b3b80d8