Commit Graph

9595 Commits

Author SHA1 Message Date
Dan Gohman
701a4aef7f When expanding expressions which are using post-inc mode for multiple loops,
ensure that the expansion is dominated by the increments of those loops.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100748 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 05:57:57 +00:00
Chris Lattner
d2075586c8 add newlines at the end of files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100705 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 22:53:17 +00:00
Dan Gohman
448db1cdef Generalize IVUsers to track arbitrary expressions rather than expressions
explicitly split into stride-and-offset pairs. Also, add the
ability to track multiple post-increment loops on the same expression.

This refines the concept of "normalizing" SCEV expressions used for
to post-increment uses, and introduces a dedicated utility routine for
normalizing and denormalizing expressions.

This fixes the expansion of expressions which are post-increment users
of more than one loop at a time. More broadly, this takes LSR another
step closer to being able to reason about more than one loop at a time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100699 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 22:27:08 +00:00
Benjamin Kramer
447b19543b unXFAIL, arm disassembler was reenabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100692 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 21:19:41 +00:00
Dale Johannesen
b39b7e5ebf Split big test into multiple directories to cater to
those who don't build all targets.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100688 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 20:43:35 +00:00
Dale Johannesen
809948a998 Test that DEBUG_VALUE comments come out on a variety of targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100682 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 20:01:24 +00:00
Chris Lattner
b1ceecefac this has a pr!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100637 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 18:04:56 +00:00
Chris Lattner
24ad3ed71f fix a latent bug my inline asm stuff exposed:
MachineOperand::isIdenticalTo wasn't handling metadata operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100636 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 18:03:19 +00:00
Sanjiv Gupta
06fd8fadc8 Remove XFAIL for vg_leak as the leaks are fixed by 100601.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100612 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 07:06:48 +00:00
Devang Patel
5f0940002a Do not emit specification DIE with DW_AT_specification attribute for member functions of a funcation local class. This trips gdb's partial scan of DIEs at load time. Fixes Radar 7833483.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100586 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 23:53:48 +00:00
Jakob Stoklund Olesen
e7b744fe64 Let that which does not matter truly slide.
This test only cares about alignment, so don't test for other cruft.
An upcoming llvm-gcc patch needs this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100584 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 23:44:44 +00:00
Stuart Hastings
639336e0bd Reverting 100530 & 100531 due to regressions in the GDB test suite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100563 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 21:38:29 +00:00
Jakob Stoklund Olesen
8ba1c6ab87 Don't try to collapse DomainValues onto an incompatible SSE domain.
This fixes the Bullet regression on i386/nocona.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100553 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 19:48:56 +00:00
Stuart Hastings
983327b351 Revise debug info machinery to digest nested functions and classes.
A certain GDB testsuite case (local.cc) has a function nested inside a
class nested inside another function.  GCC presents the innermost
function to llvm-convert first.  Heretofore, the debug info mistakenly
placed the inner function at module scope.  This patch walks the GCC
context links and instantiates the outer class and function so the
debug info is properly nested.  Radar 7426545.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100530 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 17:19:32 +00:00
Evan Cheng
da72249ecb Add nounwind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100482 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 22:30:05 +00:00
Dan Gohman
c4ae94dee8 Don't do code sinking on unreachable blocks. It's unprofitable and hazardous.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100455 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 19:17:22 +00:00
Evan Cheng
1b0194d646 Reverting 100265 to try to get buildbots green again. Lots of self-hosting buildbots started complaining since this commit. Also xfail ARM disassembly tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100378 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 01:04:27 +00:00
Chris Lattner
af8df26495 resolve a fixme.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100346 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 19:28:59 +00:00
Mon P Wang
20adc9dc46 Reapply address space patch after fixing an issue in MemCopyOptimizer.
Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset,
e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100304 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 03:10:48 +00:00
Chris Lattner
96fd76638b add integer overflow check for the fp induction variable
checker.  Amusingly, we already had tests that we should
have rejects because they would be miscompiled in the
testsuite.

The remaining issue with this is that we don't check that
the branch causes us to exit the loop if it fails, so we
don't actually know if we remain in bounds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100284 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 07:18:48 +00:00
Chris Lattner
43b85273ee fix PR6761, a miscompilation due to the fp->int IV conversion
stuff.  More bugs remain though.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100282 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 06:30:03 +00:00
Chris Lattner
203bceb111 convert to filecheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100281 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 06:27:56 +00:00
Chris Lattner
cf9abd210d rename feature test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100279 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 06:24:28 +00:00
Chris Lattner
6aea48b81c actually just remove this, will move the real feature test here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100278 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 06:24:03 +00:00
Chris Lattner
415d754f53 rename test since it is a feature test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100277 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 06:22:52 +00:00
Chris Lattner
07aa76ad93 first half of a pass through IndVarSimplify::HandleFloatingPointIV,
this cleans up a bunch of code and also fixes several crashes and
miscompiles.  More to come unfortunately, this optimization
is quite broken.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100270 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 05:54:59 +00:00
Bob Wilson
49c283fd3f Revert all my SSAUpdater patches. The PHI placement algorithm is not correct
(what was I thinking?) and there's also a problem with LCSSA.  I'll try again
later with fixes.

--- Reverse-merging r100263 into '.':
U    lib/Transforms/Utils/SSAUpdater.cpp
--- Reverse-merging r100177 into '.':
G    lib/Transforms/Utils/SSAUpdater.cpp
--- Reverse-merging r100148 into '.':
G    lib/Transforms/Utils/SSAUpdater.cpp
--- Reverse-merging r100147 into '.':
U    include/llvm/Transforms/Utils/SSAUpdater.h
G    lib/Transforms/Utils/SSAUpdater.cpp
--- Reverse-merging r100131 into '.':
G    include/llvm/Transforms/Utils/SSAUpdater.h
G    lib/Transforms/Utils/SSAUpdater.cpp
--- Reverse-merging r100130 into '.':
G    lib/Transforms/Utils/SSAUpdater.cpp
--- Reverse-merging r100126 into '.':
G    include/llvm/Transforms/Utils/SSAUpdater.h
G    lib/Transforms/Utils/SSAUpdater.cpp
--- Reverse-merging r100050 into '.':
D    test/Transforms/GVN/2010-03-31-RedundantPHIs.ll
--- Reverse-merging r100047 into '.':
G    include/llvm/Transforms/Utils/SSAUpdater.h
G    lib/Transforms/Utils/SSAUpdater.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100264 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 03:50:38 +00:00
Johnny Chen
b68a3ee82a Second try of initial ARM/Thumb disassembler check-in. It consists of a tablgen
backend (ARMDecoderEmitter) which emits the decoder functions for ARM and Thumb,
and the disassembler core which invokes the decoder function and builds up the
MCInst based on the decoded Opcode.

Reviewed by Chris Latter and Bob Wilson.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100233 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 22:27:38 +00:00
Evan Cheng
f28f8bc40e Correctly lower memset / memcpy of undef. It should be a nop. PR6767.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100208 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 19:36:14 +00:00
Mon P Wang
e754d3fb85 Revert r100191 since it breaks objc in clang
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100199 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 18:43:02 +00:00
Mon P Wang
e33c848fa4 Reapply address space patch after fixing an issue in MemCopyOptimizer.
Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset,
e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100191 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 18:04:15 +00:00
Dan Gohman
d7bfd0028b Manually notify ScalarEvolution before making an operand replacement, since
it can't currently observe such changes automatically.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100186 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 14:48:31 +00:00
Dan Gohman
f860db2398 Revert the recent alignment changes. They're broken for -Os because,
in particular, they end up aligning strings at 16-byte boundaries, and
there's no way for GlobalOpt to check OptForSize.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100172 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 03:04:37 +00:00
Evan Cheng
db8771af28 After trivial coalescing, the MI being visited may have become a copy. Avoid adding it to CSE hash table since copies aren't being considered for CSE and they may be deleted.
rdar://7819990


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100170 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 02:21:24 +00:00
Dan Gohman
1e4ac4dfd9 Remove this initializer so that the optimizer doesn't convert
unaligned loads into aligned loads.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100166 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 01:26:13 +00:00
Dan Gohman
403d5a2c49 Update this test for the new preferred alignment heuristics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100165 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 01:24:08 +00:00
Dan Gohman
c9ae19e465 Make globalopt refine global variable alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100160 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 00:14:16 +00:00
Evan Cheng
3ea97550e3 In 64-bit mode, use i64 to lower memcpy / memset instead of f64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100137 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 20:27:45 +00:00
Evan Cheng
94107ba9ce - Avoid using floating point stores to implement memset unless the value is zero.
- Do not try to infer GV alignment unless its type is sized. It's not possible to infer alignment if it has opaque type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100118 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 18:19:11 +00:00
Evan Cheng
0bf77de91f Add -mcpu to memcpy / memset tests to ensure they behave the same on all hosts / targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100101 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 08:25:26 +00:00
Evan Cheng
255f20f7f7 Fix sdisel memcpy, memset, memmove lowering:
1. Makes it possible to lower with floating point loads and stores.
2. Avoid unaligned loads / stores unless it's fast.
3. Fix some memcpy lowering logic bug related to when to optimize a
   load from constant string into a constant.
4. Adjust x86 memcpy lowering threshold to make it more sane.
5. Fix x86 target hook so it uses vector and floating point memory
   ops more effectively.
rdar://7774704


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100090 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 06:04:33 +00:00
Chris Lattner
e6bb172f7e change this from using '!dbg' to using '!dbgx'. The
MD used here isn't valid for !dbg.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100085 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 05:13:10 +00:00
Bob Wilson
368454976c Add a redundant PHI testcase for SSAUpdater to go with svn r100047.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100050 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-31 21:38:43 +00:00
Gabor Greif
4e86da71b3 testcase for r99914, provided by baldrick!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100043 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-31 20:37:13 +00:00
Jakob Stoklund Olesen
d363b4ebc7 Replace V_SET0 with variants for each SSE execution domain.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99975 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-31 00:40:13 +00:00
Jakob Stoklund Olesen
b16df90b48 Fix typo. Thank you, valgrind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99974 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-31 00:40:08 +00:00
Jakob Stoklund Olesen
932df5e9f6 Not all platforms start symbols with _
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99959 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-30 23:12:48 +00:00
Jakob Stoklund Olesen
bfcd61b907 Enable -sse-domain-fix by default. Now with tests!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99954 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-30 22:47:00 +00:00
Bob Wilson
100f090add Revert Mon Ping's change 99928, since it broke all the llvm-gcc buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99948 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-30 22:27:04 +00:00
Devang Patel
722f2290b8 Ignore invalid metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99938 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-30 22:09:52 +00:00