Evan Cheng
ca2d65467b
The last commit was overly conservative. It's ok to reuse value that's already marked livein.
...
llvm-svn: 65498
2009-02-26 03:02:21 +00:00
Evan Cheng
ee5fd035e2
If an available register falls through to a succ block, unset the last kill. Sorry, it's impossible to reduce a sensible test case. It basically requires the moon and stars to align in order to cause a failure.
...
llvm-svn: 65497
2009-02-26 02:30:42 +00:00
Bob Wilson
e50308e362
Fix a duplicated word in a comment.
...
llvm-svn: 65496
2009-02-26 00:58:09 +00:00
Julien Lerouge
8b08bf9eca
Fix a typo that prevents hello.mm from running (and runs hello.m twice).
...
llvm-svn: 65493
2009-02-26 00:16:33 +00:00
Evan Cheng
a49de9de2e
Revert BuildVectorSDNode related patches: 65426, 65427, and 65296.
...
llvm-svn: 65482
2009-02-25 22:49:59 +00:00
Dale Johannesen
7d12ea0f62
Fix big-endian codegen bug. We're splitting up
...
overly long ints, e.g. i96, into pieces at PHIs
and the nodes that feed into them; however big-endian
reverses the order of the pieces (for some reason), and
wasn't doing it the same way on both sides, so
the pieces didn't match and runtime failures ensued.
Fixes 188.ammp and sqlite3 on ppc32.
llvm-svn: 65481
2009-02-25 22:39:13 +00:00
Devang Patel
7e7fa83f6e
Print variable's display name in dwarf DIE.
...
llvm-svn: 65468
2009-02-25 19:41:35 +00:00
Chris Lattner
af618171f4
Fix PR3667
...
llvm-svn: 65464
2009-02-25 18:20:01 +00:00
Duncan Sands
c642e53b8c
Check that records with a known constant size are not
...
copied field by LLVM field if the record has a variable
sized field in it. The problem is that the LLVM field
will not completely cover the variable sized gcc field.
llvm-svn: 65463
2009-02-25 18:10:49 +00:00
Zhou Sheng
5d9cc1763b
Don't block basic block with only SwitchInst to fold into predecessors.
...
llvm-svn: 65456
2009-02-25 15:34:27 +00:00
Duncan Sands
d34bf76bd1
Flesh out the Ada section a little.
...
llvm-svn: 65448
2009-02-25 11:59:06 +00:00
Duncan Sands
3aa3673f5b
The C backend does not support arbitrary precision integers.
...
llvm-svn: 65447
2009-02-25 11:51:54 +00:00
Duncan Sands
966fd26c83
Note on new type legalizer.
...
llvm-svn: 65446
2009-02-25 11:50:08 +00:00
Duncan Sands
d9c3557fcc
Add note on support for arbitrary precision integers.
...
llvm-svn: 65445
2009-02-25 11:37:39 +00:00
Chris Lattner
3ab27b75a7
more notes.
...
llvm-svn: 65439
2009-02-25 07:32:53 +00:00
Evan Cheng
86673f2806
Clean up dwarf writer, part 1. This eliminated the horrible recursive getGlobalVariablesUsing and replaced it something readable. It eliminated use of slow UniqueVector and replaced it with StringMap, SmallVector, and DenseMap, etc. It also fixed some non-deterministic behavior.
...
This is a very minor compile time win.
llvm-svn: 65438
2009-02-25 07:04:34 +00:00
Nick Lewycky
5c10a3aa7f
Add a totally synthetic situation I came up with while looking at a bug in
...
related code.
llvm-svn: 65437
2009-02-25 06:52:48 +00:00
Chris Lattner
d02da04564
random notes
...
llvm-svn: 65436
2009-02-25 06:34:50 +00:00
Nick Lewycky
2db07614e7
Recommend against using Gold to build LLVM.
...
llvm-svn: 65435
2009-02-25 06:29:47 +00:00
Chris Lattner
b39faaa57e
don't know if there is a vmkit release to match 2.5
...
llvm-svn: 65434
2009-02-25 05:45:05 +00:00
Chris Lattner
f70a024c43
update clang section
...
llvm-svn: 65430
2009-02-25 05:09:54 +00:00
Chris Lattner
7fad44b004
rip out llvm 2.4 details to make room for 2.5
...
llvm-svn: 65429
2009-02-25 04:41:31 +00:00
Scott Michel
e2fdc31759
Expand tabs to spaces (overlooked in previous commit)
...
llvm-svn: 65427
2009-02-25 03:57:49 +00:00
Scott Michel
bb878288cb
Remove all "cached" data from BuildVectorSDNode, preferring to retrieve
...
results via reference parameters.
This patch also appears to fix Evan's reported problem supplied as a
reduced bugpoint test case.
llvm-svn: 65426
2009-02-25 03:12:50 +00:00
Mon P Wang
b402493161
Added support to have TableGen provide information if an intrinsic (core
...
or target) can be overloaded or not.
llvm-svn: 65404
2009-02-24 23:17:49 +00:00
Devang Patel
0c83e84f40
If compile unit's language is not set then don't crash while dump'ing compile unit.
...
llvm-svn: 65402
2009-02-24 23:15:09 +00:00
Daniel Dunbar
5bf00893b6
Extension of GEP in constant folder was broken (apparently this code
...
has never been run!).
- Sorry, don't know how to make an LLVM test case for this.
llvm-svn: 65383
2009-02-24 19:10:46 +00:00
Dan Gohman
0bddac16a8
Rename ScalarEvolution's getIterationCount to getBackedgeTakenCount,
...
to more accurately describe what it does. Expand its doxygen comment
to describe what the backedge-taken count is and how it differs
from the actual iteration count of the loop. Adjust names and
comments in associated code accordingly.
llvm-svn: 65382
2009-02-24 18:55:53 +00:00
Bill Wendling
c5437ea429
Overhaul my earlier submission due to feedback. It's a large patch, but most of
...
them are generic changes.
- Use the "fast" flag that's already being passed into the asm printers instead
of shoving it into the DwarfWriter.
- Instead of calling "MI->getParent()->getParent()" for every MI, set the
machine function when calling "runOnMachineFunction" in the asm printers.
llvm-svn: 65379
2009-02-24 08:30:20 +00:00
Owen Anderson
0fb12efbc1
Add a debugging option for SSC DCE.
...
llvm-svn: 65375
2009-02-24 05:44:18 +00:00
Bill Wendling
786c5973f7
- Use the "Fast" flag instead of "OptimizeForSize" to determine whether to emit
...
a DBG_LABEL or not. We want to fall back to the original way of emitting debug
info when we're in -O0/-fast mode.
- Add plumbing in to pass the "Fast" flag to places that need it.
- XFAIL DebugInfo/deaddebuglabel.ll. This is finding 11 labels instead of 8. I
need to investigate still.
llvm-svn: 65367
2009-02-24 02:35:30 +00:00
Dan Gohman
3204dac652
Add a testcase for the problem fixed in r65289.
...
llvm-svn: 65365
2009-02-24 02:17:42 +00:00
Dan Gohman
4f356bb9b0
Fix a ValueTracking rule: RHS means operand 1, not 0. Add a simple
...
ashr instcombine to help expose this code. And apply the fix to
SelectionDAG's copy of this code too.
llvm-svn: 65364
2009-02-24 02:00:40 +00:00
Dan Gohman
5d1f458f0f
Generalize the ChangeCompareStride code, in preparation for
...
handling non-constant strides. No functionality change.
llvm-svn: 65363
2009-02-24 01:58:00 +00:00
Dan Gohman
e669884749
Preserve the DominanceFrontier analysis in the LoopDeletion pass.
...
llvm-svn: 65359
2009-02-24 01:21:53 +00:00
Devang Patel
50c6324119
gdb uses DW_AT_prototyped to identify K&R style in C based languages.
...
This fixes objc.dg/dwarf-prototypes.m scan-assembler DW_AT_prototyped from llvmgcc42 test suite.
llvm-svn: 65357
2009-02-24 00:52:19 +00:00
Bill Wendling
98bac99265
Un-XFAIL this test.
...
llvm-svn: 65355
2009-02-24 00:37:28 +00:00
Devang Patel
e288082644
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
llvm-svn: 65353
2009-02-24 00:05:16 +00:00
Devang Patel
6ced076e4c
If there is not any debug info available for any global variables and any subprograms then there is not any debug info to emit.
...
llvm-svn: 65352
2009-02-24 00:02:15 +00:00
Dan Gohman
f6e8c77e1c
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.
llvm-svn: 65347
2009-02-23 23:20:35 +00:00
Dan Gohman
318d7376ba
Fast-isel can't do TLS yet, so it should fall back to SDISel
...
if it sees TLS addresses.
llvm-svn: 65341
2009-02-23 22:03:08 +00:00
Ted Kremenek
7df3a5aec3
Correctly implement ImmutableMap::getMaxElement() by getting the actual <key, value> pair.
...
llvm-svn: 65327
2009-02-23 17:28:16 +00:00
Ted Kremenek
e60504d210
Add ImmutableMap::getMaxElement(), a method that returns the <key,value> pair in a ImmutableMap that has the highest ranked key.
...
llvm-svn: 65326
2009-02-23 17:27:18 +00:00
Dan Gohman
e591411fd6
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.
llvm-svn: 65323
2009-02-23 17:10:29 +00:00
Dan Gohman
0fd45016c2
Use the -stack-alignment option instead of using a target triple
...
for avoiding dynamic stack realignment.
llvm-svn: 65319
2009-02-23 16:34:46 +00:00
Dan Gohman
42987f528a
IndVarSimplify preserves ScalarEvolution. In the
...
-std-compile-opts sequence, this avoids the need for ScalarEvolution to
be rerun before LoopDeletion.
llvm-svn: 65318
2009-02-23 16:29:41 +00:00
Zhou Sheng
7c528e95af
Add test case for checkin @r65314.
...
llvm-svn: 65315
2009-02-23 10:15:04 +00:00
Zhou Sheng
3a86bcf134
Should reset DBI_Prev if DBI_Next == 0.
...
llvm-svn: 65314
2009-02-23 10:14:11 +00:00
Evan Cheng
9f8fddeed8
Only v1i16 (i.e. _m64) is returned via RAX / RDX.
...
llvm-svn: 65313
2009-02-23 09:03:22 +00:00
Nate Begeman
9af0d0c97e
Make this test use darwin targe triple, to avoid stack traffic on linux.
...
llvm-svn: 65312
2009-02-23 09:03:06 +00:00
Nate Begeman
e684da3e5d
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
llvm-svn: 65311
2009-02-23 08:49:38 +00:00
Nick Lewycky
fc684c0c83
If nobody minds, I'm using LTO to produce faster binaries. Switch fast codegen
...
off in libLTO.
llvm-svn: 65310
2009-02-23 07:41:55 +00:00
Mon P Wang
dccfa0b26c
Changed option name from inline-threshold to basic-inline-threshold because
...
inline-threshold option is used by the inliner.
llvm-svn: 65309
2009-02-23 07:07:56 +00:00
Chris Lattner
d5420f0957
fix some typos that Duncan noticed
...
llvm-svn: 65306
2009-02-23 05:56:17 +00:00
Bill Wendling
9ee052bcdc
Propagate debug loc info through prologue/epilogue.
...
llvm-svn: 65298
2009-02-23 00:42:30 +00:00
Scott Michel
9d31aca679
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.
llvm-svn: 65296
2009-02-22 23:36:09 +00:00
Nick Lewycky
338d07e94e
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.
llvm-svn: 65295
2009-02-22 22:15:44 +00:00
Dan Gohman
648c5e9c99
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.
llvm-svn: 65289
2009-02-22 18:06:32 +00:00
Dan Gohman
f394e58af5
Properly parenthesize this expression, fixing a real bug in the new
...
-full-lsr code, as well as a GCC warning.
llvm-svn: 65288
2009-02-22 16:40:52 +00:00
Richard Pennington
d853864705
bug 3610: Test case.
...
llvm-svn: 65287
2009-02-22 15:54:44 +00:00
Evan Cheng
e779595af0
If a use operand is marked isKill, don't forget to add kill to its live interval as well.
...
llvm-svn: 65279
2009-02-22 08:35:56 +00:00
Evan Cheng
2448aa1d8d
Add a note.
...
llvm-svn: 65275
2009-02-22 08:13:45 +00:00
Evan Cheng
e4ffc030e2
Be bug compatible with gcc by returning MMX values in RAX.
...
llvm-svn: 65274
2009-02-22 08:05:12 +00:00
Evan Cheng
91193c0094
Do not consider MMX_MOVD64rr a move instructions. The source register is in GR32, the destination is VR64. They are not compatible.
...
llvm-svn: 65273
2009-02-22 08:04:23 +00:00
Evan Cheng
69decbf0b2
Only try to sink immediate when TLI is not null. It needs to check if immediate would fit in target addressing field.
...
llvm-svn: 65268
2009-02-22 07:31:19 +00:00
Nick Lewycky
ed98a50358
Regenerate.
...
llvm-svn: 65250
2009-02-21 22:38:49 +00:00
Nick Lewycky
ff8e6dd009
Remove tests for flex/bison which are no longer needed by LLVM.
...
llvm-svn: 65249
2009-02-21 22:36:26 +00:00
Nick Lewycky
d44e80d7fc
Don't sign extend the char when expanding char -> int during
...
load(bitcast(char[4] to i32*)) evaluation.
llvm-svn: 65246
2009-02-21 20:50:42 +00:00
Daniel Dunbar
0094e341d0
Add makefile debugging target; use "make print-FOO" to print the
...
value/definition/origin of FOO.
llvm-svn: 65245
2009-02-21 20:42:39 +00:00
Richard Pennington
99f6d7c9fc
bug 3610: Floating point vaarg not softened.
...
llvm-svn: 65239
2009-02-21 19:11:18 +00:00
Ted Kremenek
c9c50bfc31
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\!
...
llvm-svn: 65236
2009-02-21 18:25:30 +00:00
Anton Korobeynikov
42aae86590
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 :)
llvm-svn: 65230
2009-02-21 11:53:32 +00:00
Nick Lewycky
9e5ed6d329
Pass different flags on different platforms when building PIC.
...
llvm-svn: 65229
2009-02-21 08:41:09 +00:00
Evan Cheng
1173ec7a2e
Add AddrModeMatcher.cpp
...
llvm-svn: 65228
2009-02-21 07:05:11 +00:00
Evan Cheng
34806b1fa4
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.
...
llvm-svn: 65218
2009-02-21 03:14:25 +00:00
Evan Cheng
107b06c4b9
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.
...
llvm-svn: 65215
2009-02-21 02:06:47 +00:00
Bill Wendling
82aa14fae8
Make sure this doesn't access .end() too.
...
llvm-svn: 65213
2009-02-21 01:11:36 +00:00
Gabor Greif
6f26131316
fix and clean up a comment
...
llvm-svn: 65212
2009-02-21 01:09:07 +00:00
Bill Wendling
81ebf9a578
Make sure we don't dereference the .end() of the container.
...
llvm-svn: 65211
2009-02-21 01:07:26 +00:00
Chris Lattner
bef6b2098e
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.
llvm-svn: 65209
2009-02-21 00:46:50 +00:00
Bill Wendling
56759ee658
Propagate more debug loc infos. This also includes some code cleaning.
...
llvm-svn: 65207
2009-02-21 00:43:56 +00:00
Bill Wendling
5191934371
We need to propagate the debug location information even when dealing with the
...
prologue/epilogue.
llvm-svn: 65206
2009-02-21 00:32:08 +00:00
Misha Brukman
0f35659b9a
* 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
llvm-svn: 65202
2009-02-20 23:44:54 +00:00
Dan Gohman
e7fe80fcf9
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.
llvm-svn: 65201
2009-02-20 23:29:13 +00:00
Misha Brukman
9e6fb74027
Removed trailing whitespace.
...
llvm-svn: 65199
2009-02-20 23:04:06 +00:00
Misha Brukman
e739d19156
Removed trailing whitespace.
...
llvm-svn: 65197
2009-02-20 22:54:36 +00:00
Misha Brukman
fb658aa870
Removed trailing whitespace.
...
llvm-svn: 65196
2009-02-20 22:51:36 +00:00
Misha Brukman
5e5503f5da
Keep the newline character at the end of the lines whose trailing whitespace we
...
are deleting; otherwise, everything ends up on a single line.
llvm-svn: 65185
2009-02-20 22:30:46 +00:00
Misha Brukman
f2e5bd8d22
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.
llvm-svn: 65182
2009-02-20 22:28:45 +00:00
Misha Brukman
42afb619c6
Fixed lint errors:
...
* Alphabetized #includes
* Removed trailing whitespace
* Wrapped or shortened lines over 80 chars
llvm-svn: 65181
2009-02-20 22:20:18 +00:00
Bill Wendling
4d38d7272e
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.
llvm-svn: 65180
2009-02-20 22:19:20 +00:00
Evan Cheng
8a9481d50d
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.
llvm-svn: 65178
2009-02-20 22:16:49 +00:00
Dan Gohman
5e309a5bbb
Simplify code and reduce indentation. No functionality change.
...
llvm-svn: 65167
2009-02-20 21:27:23 +00:00
Dan Gohman
2c8cb5b4ec
Fix 80-column violations.
...
llvm-svn: 65159
2009-02-20 21:06:57 +00:00
Dan Gohman
addc50b4ee
It's not necessary to check if Base is null here.
...
llvm-svn: 65157
2009-02-20 21:05:23 +00:00
Evan Cheng
2a9bad5ac1
Support return of MMX values in 64-bit mode.
...
llvm-svn: 65152
2009-02-20 20:43:02 +00:00
Bill Wendling
2343339644
- Early exit a nested block.
...
- Correct comment.
- Whitespace changes.
llvm-svn: 65149
2009-02-20 20:40:28 +00:00
Dan Gohman
1608df5319
Add a comment about how Imm can be used for loop-variant values.
...
llvm-svn: 65147
2009-02-20 20:29:04 +00:00
Torok Edwin
87d5ca083b
add note about sin
...
llvm-svn: 65137
2009-02-20 18:42:06 +00:00
Evan Cheng
c380864d2c
Factor address mode matcher out of codegen prepare to make it available to other passes, e.g. loop strength reduction.
...
llvm-svn: 65134
2009-02-20 18:24:38 +00:00
Zhou Sheng
053737e1ae
Just roll back the previous change to -mem2reg.
...
Will re-think about this according to Chris's comments.
llvm-svn: 65126
2009-02-20 17:49:33 +00:00
Zhou Sheng
6a0634d423
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.
llvm-svn: 65123
2009-02-20 16:31:35 +00:00
Owen Anderson
f13820148b
Fix a crash in the pre-alloc splitter exposed by recent codegen changes.
...
llvm-svn: 65121
2009-02-20 10:02:23 +00:00
Owen Anderson
81db491b7f
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.
llvm-svn: 65120
2009-02-20 09:11:36 +00:00
Chris Lattner
52e8d4cc5d
make these tests pass when run on a G5.
...
llvm-svn: 65117
2009-02-20 07:10:11 +00:00
Dan Gohman
2a12ae7d1f
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.
llvm-svn: 65108
2009-02-20 04:17:46 +00:00
Bill Wendling
0a0987d198
Add an accessor method to DwarfWriter to tell of debugging info should be emitted.
...
llvm-svn: 65092
2009-02-20 00:44:43 +00:00
Bill Wendling
fc1042f9bb
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.
...
llvm-svn: 65091
2009-02-20 00:42:52 +00:00
Bill Wendling
7b9f38ad37
Temporarily revert r65065. It was causing test failures.
...
llvm-svn: 65068
2009-02-19 21:57:07 +00:00
Bill Wendling
1a0a3d0ff5
Print out debug info when printing the machine instruction.
...
llvm-svn: 65067
2009-02-19 21:44:55 +00:00
Bill Wendling
df78dcc0b2
Check for -fast here too.
...
llvm-svn: 65065
2009-02-19 21:23:54 +00:00
Bill Wendling
19e0a5b3c3
Generate these labels when we're in "fast" mode, not simply when we're no in
...
"optimize-for-size" mode.
llvm-svn: 65064
2009-02-19 21:12:54 +00:00
Dale Johannesen
f6a71b39b7
Describe tail merging's use of InsertBranch.
...
llvm-svn: 65062
2009-02-19 19:40:21 +00:00
Dan Gohman
a34d7adefb
Use DEBUG() instead of passing *DOUT to WriteAsOperand,
...
since the latter just passes a null reference when
debugging is not enabled.
llvm-svn: 65060
2009-02-19 19:32:06 +00:00
Dan Gohman
30a2959367
Make the debug output of LSR less cryptic and more informative.
...
llvm-svn: 65057
2009-02-19 19:23:27 +00:00
Bill Wendling
82d8f120ec
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.
llvm-svn: 65039
2009-02-19 09:16:38 +00:00
Bill Wendling
13aada6fc4
Forgot to check that debug information is supported.
...
llvm-svn: 65034
2009-02-19 08:06:12 +00:00
Nick Lewycky
3852519eca
Regenerate.
...
llvm-svn: 65020
2009-02-19 06:18:56 +00:00
Nick Lewycky
7db7eb6e40
Default to building with position independent code. This may increase LLVM's
...
run time but will make LLVM easier to use as a library.
llvm-svn: 65019
2009-02-19 06:18:24 +00:00
Chris Lattner
3c50fdf4ca
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
llvm-svn: 65017
2009-02-19 05:34:35 +00:00
Dan Gohman
c0ae249b22
Fix the logic in this assertion to properly validate the number
...
of arguments.
llvm-svn: 64999
2009-02-19 02:55:18 +00:00
Dan Gohman
6c109b4979
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.
llvm-svn: 64997
2009-02-19 02:40:15 +00:00
Bill Wendling
dce6011eb5
Temporarily XFAIL this test.
...
llvm-svn: 64987
2009-02-19 00:13:55 +00:00
Bill Wendling
0f4c581c4a
Put code that generates debug labels into TableGen so that it can be used by
...
everyone.
llvm-svn: 64978
2009-02-18 23:12:06 +00:00
Chris Lattner
778c62ccb5
add proper asmwriter and asmparser support for anonymous functions.
...
llvm-svn: 64953
2009-02-18 21:48:13 +00:00
Duncan Sands
7a1db33e77
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.
llvm-svn: 64926
2009-02-18 17:55:38 +00:00
Rafael Espindola
6add6181c8
really fix style
...
llvm-svn: 64923
2009-02-18 17:49:06 +00:00
Devang Patel
66c5a1dd50
The subprogram die may not exist while creating "default" scope.
...
llvm-svn: 64920
2009-02-18 17:29:38 +00:00
Dan Gohman
8078b8bddc
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.
llvm-svn: 64918
2009-02-18 17:22:41 +00:00
Dan Gohman
aa0f01929b
Simplify by using dyn_cast instead of isa and cast.
...
llvm-svn: 64917
2009-02-18 16:54:33 +00:00
Dan Gohman
7f1c0afc19
Clarify the definition of "latch block" in a comment.
...
llvm-svn: 64916
2009-02-18 16:43:19 +00:00
Dan Gohman
8cab4c44bb
Add explicit keywords.
...
llvm-svn: 64915
2009-02-18 16:37:45 +00:00
Nate Begeman
18d85e7403
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.
llvm-svn: 64906
2009-02-18 08:31:02 +00:00
Rafael Espindola
e08484daf2
fix style
...
llvm-svn: 64905
2009-02-18 08:30:15 +00:00
Owen Anderson
ad4254935f
Add a test for r61358, which I forgot to add way back when.
...
llvm-svn: 64904
2009-02-18 07:50:22 +00:00
Dan Gohman
2af1f85f1f
Factor out the code to add a MachineOperand to a MachineInstrBuilder.
...
llvm-svn: 64891
2009-02-18 05:45:50 +00:00
Dan Gohman
38a9631d5f
Eliminate several more unnecessary intptr_t casts.
...
llvm-svn: 64888
2009-02-18 05:09:16 +00:00
Dan Gohman
b694533a54
Change the argument type in this test to something less convoluted,
...
since it isn't actually used.
llvm-svn: 64883
2009-02-18 04:25:04 +00:00
Evan Cheng
a40d5e14ab
GV with null value initializer shouldn't go to BSS if it's meant for a mergeable strings section. Currently it only checks for Darwin. Someone else please check if it should apply to other targets as well.
...
llvm-svn: 64877
2009-02-18 02:19:52 +00:00
Chris Lattner
198d1f4496
allow TimeRegion to take a potentially-null pointer to a
...
timer for clang.
llvm-svn: 64874
2009-02-18 01:48:17 +00:00
Dan Gohman
8212ebb5cf
Fix a corner case in the new indvars promotion logic: if there
...
are multiple IV's in a loop, some of them may under go signed
or unsigned wrapping even if the IV that's used in the loop
exit condition doesn't. Restrict sign-extension-elimination
and zero-extension-elimination to only those that operate on
the original loop-controlling IV.
llvm-svn: 64866
2009-02-18 00:52:00 +00:00
Dan Gohman
d0b1fbd983
Fix a typo in a comment.
...
llvm-svn: 64859
2009-02-18 00:08:39 +00:00
Duncan Sands
bf3ba5a1e9
If an alias is dead and so is its aliasee, then globaldce would
...
crash because the alias would still be using the aliasee when the
aliasee was deleted.
llvm-svn: 64844
2009-02-17 23:05:26 +00:00
Devang Patel
f4dad74621
And now, not so elegant, test case...
...
llvm-svn: 64838
2009-02-17 22:48:18 +00:00
Devang Patel
d57a720d57
Remove changes that were accidently included in previous commit.
...
llvm-svn: 64835
2009-02-17 22:45:18 +00:00
Devang Patel
4d20395a5f
The debugger sometimes lookup dynamically in the runtime to find ivar info of any Objective-C classes. It would be very helpful to debugger if the compiler encodes runtime version number in DWARF.
...
Add support for two additional DWARF attributes to encode Objective-C runtime version number.
llvm-svn: 64834
2009-02-17 22:43:44 +00:00
Scott Michel
cf0da6c597
Remove trailing whitespace to reduce later commit patch noise.
...
(Note: Eventually, commits like this will be handled via a pre-commit hook that
does this automagically, as well as expand tabs to spaces and look for 80-col
violations.)
llvm-svn: 64827
2009-02-17 22:15:04 +00:00
Devang Patel
528987a1e8
Emit debug info for bitfields.
...
llvm-svn: 64815
2009-02-17 21:23:59 +00:00
Rafael Espindola
fabd0534fd
tools like nm and ar only need register_claim_file and add_symbols. Don't abort
...
if other hooks are missing.
llvm-svn: 64812
2009-02-17 21:08:21 +00:00
Dan Gohman
d90415555e
LoopIndexSplit doesn't actually use ScalarEvolution.
...
llvm-svn: 64811
2009-02-17 20:50:11 +00:00
Dan Gohman
4330034160
Add a method to ScalarEvolution for telling it when a loop has been
...
modified in a way that may effect the trip count calculation. Change
IndVars to use this method when it rewrites pointer or floating-point
induction variables instead of using a doInitialization method to
sneak these changes in before ScalarEvolution has a chance to see
the loop. This eliminates the need for LoopPass to depend on
ScalarEvolution.
llvm-svn: 64810
2009-02-17 20:49:49 +00:00
Chris Lattner
24f31a0e59
commit a tweaked version of Daniel's patch for PR3599. We now
...
eliminate all the extensions and all but the one required truncate
from the testcase, but the or/and/shift stuff still isn't zapped.
llvm-svn: 64809
2009-02-17 20:47:23 +00:00
Dan Gohman
143206d07b
Move dumpPassStructure out of line.
...
llvm-svn: 64796
2009-02-17 19:41:26 +00:00
Dan Gohman
15bf1a76b9
Tidy whitespace.
...
llvm-svn: 64791
2009-02-17 19:34:54 +00:00
Dan Gohman
f84d42f282
Delete trailing whitespace.
...
llvm-svn: 64784
2009-02-17 19:13:57 +00:00
Duncan Sands
f974c5703c
This transform also applies to private linkage.
...
llvm-svn: 64773
2009-02-17 17:50:04 +00:00
Dan Gohman
efe65e547b
Fix 80-column violation.
...
llvm-svn: 64766
2009-02-17 15:57:39 +00:00
Evan Cheng
f505cd5ebb
A couple of places where reused use operands should be marked kill. This is exposed by recent availability fallthrough changes.
...
llvm-svn: 64745
2009-02-17 06:41:03 +00:00
Chris Lattner
cba4b6f83d
add a horrible note
...
llvm-svn: 64719
2009-02-17 01:16:14 +00:00
Bill Wendling
3c50922ea0
--- Merging (from foreign repository) r64714 into '.':
...
U include/llvm/CodeGen/DebugLoc.h
U lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
U lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
U lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
Enable debug location generation at -Os. This goes with the reapplication of the
r63639 patch.
llvm-svn: 64715
2009-02-17 01:04:54 +00:00
Devang Patel
19b9ed7a30
Testcase for rev. 64704
...
llvm-svn: 64705
2009-02-17 00:15:08 +00:00
Evan Cheng
161861deb0
Strengthen the "non-constant stride must dominate loop preheader" check.
...
llvm-svn: 64703
2009-02-17 00:13:06 +00:00
Dan Gohman
2cd8982002
Simplify; fix some 80-column violations.
...
llvm-svn: 64702
2009-02-17 00:10:53 +00:00
Dan Gohman
2a4553ba5f
Delete trailing whitespace.
...
llvm-svn: 64694
2009-02-16 23:14:14 +00:00
Dan Gohman
f68d29edd5
Fix EnforceKnownAlignment so that it doesn't ever reduce the alignment
...
of an alloca or global variable.
llvm-svn: 64693
2009-02-16 23:02:21 +00:00
Daniel Dunbar
eaebae55db
Add llvm::RoundUpToAlignment.
...
- No functionality change.
llvm-svn: 64691
2009-02-16 22:57:04 +00:00
Ted Kremenek
772e6f3c93
Fix bug where APSInt::operator-- incremented instead of decremented.
...
llvm-svn: 64687
2009-02-16 22:39:08 +00:00
Devang Patel
ab0c5ecc54
Test case for llvm-gcc rev. 64648.
...
llvm-svn: 64649
2009-02-16 19:24:29 +00:00
Nick Lewycky
0f269cfdee
Fix typo caused by too much surfing, dudes...
...
llvm-svn: 64626
2009-02-16 04:26:53 +00:00
Dan Gohman
136aa1fb96
Delete this long-commented-out code. The situation it seems to have
...
been written for is no longer relevant with the elimination of
signed and unsigned types.
llvm-svn: 64625
2009-02-16 02:57:42 +00:00
Dan Gohman
73f794af6a
Rename IndVarsSimplify to IndVarSimplify, to be consistent with
...
the name used in the code that these tests are for.
llvm-svn: 64624
2009-02-16 00:56:15 +00:00
Dan Gohman
9cdfd44521
Change these tests to use regular loads instead of llvm.x86.sse2.loadu.dq.
...
Enhance instcombine to use the preferred field of
GetOrEnforceKnownAlignment in more cases, so that regular IR operations are
optimized in the same way that the intrinsics currently are.
llvm-svn: 64623
2009-02-16 00:44:23 +00:00
Dan Gohman
aaee6c9523
Don't assume that a left-shift of a value with one bit set will have
...
one bit set, because the bit may be shifted off the end. Instead,
just check for a constant 1 being shifted. This is still sufficient
to handle all the cases in test/CodeGen/X86/bt.ll. This fixes PR3583.
llvm-svn: 64622
2009-02-15 23:59:32 +00:00
Dan Gohman
f6ccacba36
MachineLICM now handles these cases.
...
llvm-svn: 64620
2009-02-15 23:24:52 +00:00
Nick Lewycky
dac78d87cb
Demonstrate the act of including multiple space-separated parameter attributes,
...
by request on IRC.
llvm-svn: 64619
2009-02-15 23:06:14 +00:00
Nick Lewycky
9178155206
Shoot! Remove this debugging line again!
...
llvm-svn: 64617
2009-02-15 22:50:17 +00:00
Nick Lewycky
b020e0d14c
Don't discard definitions of common symbols. Not sure if this is the right fix.
...
Before this change, the program:
int var;
int main(void) { return 0; }
when run under 'nm -g' would show 'U var' with the gold plugin and
'B var' with gcc.
llvm-svn: 64616
2009-02-15 22:49:17 +00:00
Nick Lewycky
8f4a097f15
Update the list of function annotations for nocapture. All of these came up
...
when I was looking at functions used by python.
Highlights include, better largefile support (64-bit file sizes on 32-bit
systems), fputs string is nocapture, popen/pclose added (popen being noalias
return), modf and frexp and friends. Also added some missing 'break' statements
and combined identical sections.
llvm-svn: 64615
2009-02-15 22:47:25 +00:00
Nicolas Geoffray
7f543ba9fa
On 64bit we may have a personality function which requires 64 bits to
...
be encoded.
llvm-svn: 64600
2009-02-15 20:49:23 +00:00
Duncan Sands
46196aef82
Make this more useful for cleaning up after the
...
one-definition-rule llvm-gcc changes (coming soon
to a tree near you!).
llvm-svn: 64588
2009-02-15 11:54:49 +00:00
Mikhail Glushenkov
e68b888550
80-column violation.
...
llvm-svn: 64586
2009-02-15 11:32:31 +00:00
Duncan Sands
b3f27881a9
If the target of an alias has internal linkage, then the
...
alias can be morphed into the target. Implement this
transform, and fix a crash in the existing transform at
the same time.
llvm-svn: 64583
2009-02-15 09:56:08 +00:00
Evan Cheng
2510436e20
Fix PR3522. It's not safe to sink into landing pad BB's.
...
llvm-svn: 64582
2009-02-15 08:36:12 +00:00
Evan Cheng
e79841adbb
Fix pr3571: If stride is a value defined by an instruction, make sure it dominates the loop preheader. When IV users are strength reduced, the stride is inserted into the preheader. It could create a use before def situation.
...
llvm-svn: 64579
2009-02-15 06:06:15 +00:00
Evan Cheng
fe151ba135
ifdef out unneeded if statement.
...
llvm-svn: 64575
2009-02-15 03:20:37 +00:00
Mikhail Glushenkov
58a1a8e546
Fix warning on gcc 4.3.
...
"system() declared with attribute warn_unused_result."
llvm-svn: 64574
2009-02-15 03:20:32 +00:00
Mikhail Glushenkov
a539836b95
Whitespace fixes.
...
llvm-svn: 64573
2009-02-15 03:20:03 +00:00
Cedric Venet
b8aa2ea72a
Add mode_t to the config.h generated by cmake on win32. Used by clang.
...
llvm-svn: 64555
2009-02-14 16:13:26 +00:00
Cedric Venet
d1e179d992
Unbreak the build on win32.
...
Cleanup some warning.
Remark: when struct/class are declared differently than they are defined, this make problem for VC++ since it seems to mangle class differently that struct. These error are very hard to understand and find. So please, try to keep your definition/declaration in sync.
Only tested with VS2008. hope it does not break anything. feel free to revert.
llvm-svn: 64554
2009-02-14 16:06:42 +00:00
Duncan Sands
73247d2edc
Generalize some alias analysis logic from atomic
...
intrinsics to any IntrWriteArgMem intrinsics.
llvm-svn: 64551
2009-02-14 10:56:35 +00:00
Mikhail Glushenkov
0575bfdeaa
80-column violation.
...
llvm-svn: 64550
2009-02-14 08:41:25 +00:00
Duncan Sands
1ba13931b6
The trampoline intrinsic can be marked IntrWriteArgMem,
...
now that this no longer implies nocapture.
llvm-svn: 64540
2009-02-14 05:33:26 +00:00
Duncan Sands
809d9167da
IntrWriteArgMem implies nocapture, but this wasn't
...
taken advantage of anywhere. Change the definition
of IntrWriteArgMem to no longer imply nocapture, and
explicitly add nocapture attributes everywhere (well,
not quite everywhere, because some of these intrinsics
did capture their arguments!). Also, make clear that
the lack of other side-effects does not exclude doing
volatile loads or stores - the atomic intrinsics do
these, yet they are all marked IntrWriteArgMem (this
change is safe because nothing exploited it).
llvm-svn: 64539
2009-02-14 05:16:25 +00:00
Dan Gohman
29705333e5
The x86-64 red zone is now being used.
...
llvm-svn: 64535
2009-02-14 03:30:05 +00:00
Dan Gohman
671f2c085f
Extend the IndVarSimplify support for promoting induction variables:
...
- Test for signed and unsigned wrapping conditions, instead of just
testing for non-negative induction ranges.
- Handle loops with GT comparisons, in addition to LT comparisons.
- Support more cases of induction variables that don't start at 0.
llvm-svn: 64532
2009-02-14 02:31:09 +00:00
Dan Gohman
47ff6aad23
Clarify debug output.
...
llvm-svn: 64531
2009-02-14 02:26:50 +00:00
Dan Gohman
4bfa1d4c63
Simplify some code. hasComputableLoopEvolution is overkill in this case.
...
No functionality change.
llvm-svn: 64530
2009-02-14 02:25:19 +00:00
Dale Johannesen
6e1b2e36a5
Testcase for llvm-gcc 64510.
...
llvm-svn: 64511
2009-02-14 00:19:28 +00:00
Evan Cheng
c2fde91703
Teach x86 target -soft-float.
...
llvm-svn: 64496
2009-02-13 22:36:38 +00:00
Dan Gohman
55ea72179c
In CodeGenPrepare's debug output, use WriteAsOperand instead of
...
printing getName(), so that unnamed values are printed correctly.
llvm-svn: 64468
2009-02-13 17:45:12 +00:00
Dan Gohman
a2730abaaa
Complete the sentance in this comment. I have reservations
...
about the code it describes, but at least now the comment
is right.
llvm-svn: 64465
2009-02-13 17:36:42 +00:00
Duncan Sands
a738e8b854
Correct a comment: since AccessArguments is now
...
being used for atomic intrinsics, it seems the
access may be volatile. No code was exploiting
the original non-volatile definition, so only
the comment needs changing.
llvm-svn: 64464
2009-02-13 17:36:13 +00:00
Duncan Sands
566ed10244
If a function only reads memory, then we know that...
...
it only reads memory! The other change has no
functional effect, it just seems more logical to
go in order of decreasing knowledge.
llvm-svn: 64463
2009-02-13 17:32:26 +00:00
Nick Lewycky
d234a845f9
Mark strto* as readonly when the endptr is null.
...
llvm-svn: 64460
2009-02-13 17:08:33 +00:00
Nick Lewycky
a0e83a0952
On strtod and friends, mark 'endptr' nocapture in the function prototype, and
...
mark the first argument nocapture if endptr=NULL for each particular call.
llvm-svn: 64453
2009-02-13 15:31:46 +00:00
Duncan Sands
51495609df
Reapply r64301. These uses of "inline" can cause strange
...
link-time failures when building with optimization. Just
get rid of them.
llvm-svn: 64449
2009-02-13 09:42:34 +00:00
Evan Cheng
cf4bd2319c
Switch from new[] + delete[] to malloc + free since llvm does not catch C++ exceptions.
...
llvm-svn: 64448
2009-02-13 08:24:55 +00:00
Evan Cheng
333db7abbd
If new[] fails, return 0 rather then trying to dereference a null pointer.
...
llvm-svn: 64444
2009-02-13 07:54:34 +00:00
Nick Lewycky
cdccffe731
Reapply r64300:
...
Make sure the SCC pass manager initializes any contained
function pass managers. Without this, simplify-libcalls
would add nocapture attributes when run on its own, but
not when run as part of -std-compile-opts or similar.
llvm-svn: 64443
2009-02-13 07:15:53 +00:00
Nick Lewycky
c60bd012bc
BasicAA was making the assumption that a local allocation which hadn't escaped
...
couldn't ever be the return of call instruction. However, it's quite possible
that said local allocation is itself the return of a function call. That's
what malloc and calloc are for, actually.
llvm-svn: 64442
2009-02-13 07:06:27 +00:00
Dan Gohman
f71a473720
Fix the code that checked if a SCEVAddRecExpr Start contains an
...
addrec in a different loop to check the value being added to
the accumulated Start value, not the Start value before it has
the new value added to it. This prevents LSR from going crazy
on the included testcase. Dale, please review.
llvm-svn: 64440
2009-02-13 03:58:31 +00:00
Dale Johannesen
026b56a9bc
Remove non-DebugLoc versions of BuildMI.
...
"I got blisters on my fingers."
llvm-svn: 64439
2009-02-13 02:35:20 +00:00
Dale Johannesen
3a8bd17fdb
Remove non-DebugLoc versions of BuildMI from IA64, Mips.
...
llvm-svn: 64438
2009-02-13 02:34:39 +00:00
Dale Johannesen
9bba902c83
Remove non-DebugLoc versions of BuildMI from X86.
...
There were some that might even matter in X86FastISel.
llvm-svn: 64437
2009-02-13 02:33:27 +00:00
Dale Johannesen
57097d2a26
missed file
...
llvm-svn: 64436
2009-02-13 02:32:04 +00:00
Dale Johannesen
215a925766
Remove non-DebugLoc versions of buildMI from Sparc.
...
llvm-svn: 64435
2009-02-13 02:31:35 +00:00
Dale Johannesen
635f2a69d9
Remove non-DebugLoc versions of BuildMI from Alpha and Cell.
...
llvm-svn: 64433
2009-02-13 02:30:42 +00:00
Dale Johannesen
460bfeba8c
Remove refs to non-DebugLoc version of BuildMI from XCore, PIC16.
...
llvm-svn: 64432
2009-02-13 02:29:03 +00:00
Dale Johannesen
e9f623e27c
Remove refs to non-DebugLoc version of BuildMI from PowerPC.
...
llvm-svn: 64431
2009-02-13 02:27:39 +00:00
Dale Johannesen
b851a7853a
and one more file
...
llvm-svn: 64430
2009-02-13 02:26:21 +00:00
Dale Johannesen
7647da67ea
Remove refs to non-DebugLoc versions of BuildMI from ARM.
...
llvm-svn: 64429
2009-02-13 02:25:56 +00:00
Bill Wendling
65c0fd4c44
Revert this. It was breaking stuff.
...
llvm-svn: 64428
2009-02-13 02:16:35 +00:00
Bill Wendling
1c21ac3066
Turn off the old way of handling debug information in the code generator. Use
...
the new way, where all of the information is passed on SDNodes and machine
instructions.
llvm-svn: 64427
2009-02-13 02:01:04 +00:00
Dan Gohman
ba83228cdb
Fix LSR's IV sorting function to explicitly sort by bitwidth
...
after sorting by stride value. This prevents it from missing
IV reuse opportunities in a host-sensitive manner.
llvm-svn: 64415
2009-02-13 00:26:43 +00:00
Mike Stump
35f423e09e
Avoid order files for now, as they aren't supported in 3.79.
...
llvm-svn: 64412
2009-02-12 23:45:11 +00:00
Dale Johannesen
baca6ed65e
Check in missing file.
...
llvm-svn: 64410
2009-02-12 23:24:44 +00:00
Dale Johannesen
6b8c76a910
Eliminate a couple of non-DebugLoc BuildMI variants.
...
Modify callers.
llvm-svn: 64409
2009-02-12 23:08:38 +00:00
Dan Gohman
eb6be650ce
Teach IndVarSimplify to optimize code using the C "int" type for
...
loop induction on LP64 targets. When the induction variable is
used in addressing, IndVars now is usually able to inserst a
64-bit induction variable and eliminates the sign-extending cast.
This is also useful for code using C "short" types for
induction variables on targets with 32-bit addressing.
Inserting a wider induction variable is easy; the tricky part is
determining when trunc(sext(i)) expressions are no-ops. This
requires range analysis of the loop trip count. A common case is
when the original loop iteration starts at 0 and exits when the
induction variable is signed-less-than a fixed value; this case
is now handled.
This replaces IndVarSimplify's OptimizeCanonicalIVType. It was
doing the same optimization, but it was limited to loops with
constant trip counts, because it was running after the loop
rewrite, and the information about the original induction
variable is lost by that point.
Rename ScalarEvolution's executesAtLeastOnce to
isLoopGuardedByCond, generalize it to be able to test for
ICMP_NE conditions, and move it to be a public function so that
IndVars can use it.
llvm-svn: 64407
2009-02-12 22:19:27 +00:00
Nate Begeman
94aa38d568
Add suppport for ConstantExprs of shufflevectors whose result type is not equal to the
...
type of the vectors being shuffled.
llvm-svn: 64401
2009-02-12 21:28:33 +00:00
Dale Johannesen
655775293f
Arrange to print constants that match "n" and "i" constraints
...
in inline asm as signed (what gcc does). Add partial support
for x86-specific "e" and "Z" constraints, with appropriate
signedness for printing.
llvm-svn: 64400
2009-02-12 20:58:09 +00:00
Dan Gohman
af2037fbfd
Rename bugpoint's error message file so that if it somehow
...
gets left behind, it's less cryptic.
llvm-svn: 64399
2009-02-12 20:53:27 +00:00
Dan Gohman
656b097b8a
Add a utility function to LoopInfo to return the exit block
...
when the loop has exactly one exit, and make use of it in
LoopIndexSplit.
llvm-svn: 64388
2009-02-12 18:08:24 +00:00
Chris Lattner
844deb73f4
fix PR3538 for ARM.
...
llvm-svn: 64384
2009-02-12 17:38:23 +00:00
Chris Lattner
4d4c702d5f
fix PR3538 for PPC
...
llvm-svn: 64383
2009-02-12 17:37:15 +00:00
Chris Lattner
aed3a4215b
fix the X86 backend to just drop llvm.declare nodes for VLAs instead of
...
leaving them in the DAG and then getting selection errors. This is a
fix for PR3538.
llvm-svn: 64382
2009-02-12 17:33:11 +00:00
Dan Gohman
e366c29fa0
Adjust the sizes for a few SmallVectors to reflect their usage.
...
llvm-svn: 64381
2009-02-12 17:29:01 +00:00
Chris Lattner
90880e2598
make fast isel fall back to selectiondags for VLA llvm.declare intrinsics.
...
llvm-svn: 64379
2009-02-12 17:23:20 +00:00
Chris Lattner
24ca124fc4
Add operator->, patch by Ben Laurie!
...
llvm-svn: 64378
2009-02-12 17:14:49 +00:00
Chris Lattner
cede94ddc9
add PR
...
llvm-svn: 64377
2009-02-12 17:04:57 +00:00
Dan Gohman
e0d32c490a
This code doesn't actually use the ExitingBlocks list.
...
llvm-svn: 64376
2009-02-12 16:36:26 +00:00
Evan Cheng
cf5cd6ecfe
It's (currently) not safe to keep certain physical registers live across basic blocks, e.g. x86 fp stack registers.
...
llvm-svn: 64374
2009-02-12 10:32:17 +00:00
Evan Cheng
b570499c25
Oops. Last second clean up messed things up.
...
llvm-svn: 64373
2009-02-12 09:52:13 +00:00
Evan Cheng
8b39b545a9
If availability info is kept when fallthrough into a bb, add the available registers to live-in set.
...
llvm-svn: 64372
2009-02-12 09:43:23 +00:00
Evan Cheng
3a14efacb6
Replace one of burr scheduling heuristic with something more sensible. Now calcMaxScratches simply compute the number of true data dependencies. This actually improve a couple of tests in dejagnu suite as many tests in llvm nightly test suite.
...
llvm-svn: 64369
2009-02-12 08:59:45 +00:00
Julien Lerouge
cbc2491deb
Fix MingW build: define GTEST_OS_WINDOWS if OS is MingW, but disable
...
exceptions.
llvm-svn: 64367
2009-02-12 08:02:35 +00:00
Julien Lerouge
7682ffdeb9
Fix MingW build, patch by Kenneth Boyd!
...
llvm-svn: 64366
2009-02-12 07:39:10 +00:00
Chris Lattner
feb129e813
Fix a nasty bug (PR3550) where the inline pass could incorrectly mark
...
calls with the tail marker when inlining them through an invoke. Patch,
testcase, and perfect analysis by Jay Foad!
llvm-svn: 64364
2009-02-12 07:06:42 +00:00
Chris Lattner
096f44de61
improve naming of values in GVN, patch by Jay Foad!
...
llvm-svn: 64363
2009-02-12 07:00:35 +00:00
Chris Lattner
5297c63565
fix PR3537: if resetting bbi back to the start of a block, we need to
...
forget about already inserted expressions.
llvm-svn: 64362
2009-02-12 06:56:08 +00:00
Chris Lattner
1331d53c27
rename test to avoid messing with tab completion of dates.
...
llvm-svn: 64361
2009-02-12 06:54:55 +00:00