Commit Graph

35455 Commits

Author SHA1 Message Date
Chris Lattner
a56b22d7f7 Dan points out that mem2reg also promotes vectors: be more precise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43715 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 17:45:54 +00:00
Evan Cheng
a461c4d75b Move SimpleRegisterCoalescing.h to lib/CodeGen since there is now a common
register coalescer interface: RegisterCoalescing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43714 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 17:41:38 +00:00
Chris Lattner
fc60ab0487 clarify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43712 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 17:39:26 +00:00
Chris Lattner
01fcc04570 fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43711 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 17:38:34 +00:00
Duncan Sands
72261ff1ee Fix some typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43709 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 16:04:58 +00:00
Duncan Sands
e0a34353ee Trivial fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43707 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 15:15:50 +00:00
Evan Cheng
db807edd66 Use movups to spill / restore SSE registers on targets where stacks alignment is
less than 16. This is a temporary solution until dynamic stack alignment is
implemented.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43703 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 07:30:01 +00:00
Chris Lattner
b0f0deb069 add a link.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43702 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 07:02:49 +00:00
Chris Lattner
a3f07ef525 finish the tutorial, yaay.
comments and feedback welcome.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43701 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 07:00:54 +00:00
Evan Cheng
5031fd2d32 Skip over deleted val#'s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43700 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 06:46:45 +00:00
Evan Cheng
5942efb0e5 Handle cases where a register and one of its super-register are both marked as
defined on the same instruction. This fixes PR1767.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43699 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 03:11:55 +00:00
Evan Cheng
801e5a98bf Fix test case. Chris didn't do make check. :-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43698 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 03:04:26 +00:00
Bruno Cardoso Lopes
c7db5618f9 Added support for PIC code with "explicit relocations" *only*.
Removed all macro code for PIC (goodbye "la").
Support tested with shootout bench.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43697 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 03:02:32 +00:00
Gordon Henriksen
90a52145ab Bringing Passes.html up-to-date with the deletion of the
-emitbitcode option and the addition of -preverify.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43696 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 02:05:35 +00:00
Chris Lattner
b8fc650b48 Add the first section of chapter 8.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43695 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 01:58:13 +00:00
Gordon Henriksen
4e1be6d5ea Deleting redundant copy of block extractor pass. See also PR1775.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43694 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 01:54:05 +00:00
Evan Cheng
8dec727c1f Doh. PR1187 -> PR1766.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43693 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 01:00:44 +00:00
Evan Cheng
5f5f3b6333 Fix PR1187.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43692 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 00:59:10 +00:00
Duncan Sands
18b0ca854f If a long double is in a packed struct, it may be
that there is no padding.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43691 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 00:35:07 +00:00
Chris Lattner
62a709d74b finish the chapter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43689 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 00:23:57 +00:00
Duncan Sands
ca0ed74485 Eliminate the remaining uses of getTypeSize. This
should only effect x86 when using long double.  Now
12/16 bytes are output for long double globals (the
exact amount depends on the alignment).  This brings
globals in line with the rest of LLVM: the space
reserved for an object is now always the ABI size.
One tricky point is that only 10 bytes should be
output for long double if it is a field in a packed
struct, which is the reason for the additional
argument to EmitGlobalConstant.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43688 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 00:04:43 +00:00
Owen Anderson
83430bce1d Another step of stronger PHI elimination down.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43684 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-04 22:33:26 +00:00
Gordon Henriksen
bd76d66194 Deleting -emitbitcode option which did nothing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43683 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-04 20:28:31 +00:00
Chris Lattner
2e5d07e3ea fix typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43682 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-04 19:42:13 +00:00
Chris Lattner
fe6575c2bf Fix PR1761 by not printing (rip) suffix when in -static mode.
Evan, please review this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43680 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-04 19:23:28 +00:00
Gordon Henriksen
873390ee57 Validation fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43679 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-04 18:17:58 +00:00
Gordon Henriksen
23a8ce5b95 Typo fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43678 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-04 18:14:08 +00:00
Gordon Henriksen
75ff18ed2b Completing Passes.html with the exception of -emitbitcode, which should be
removed. This document could still stand for significant improvement:

  * Editing the pass descriptions; most were lifted with minimal editing from
    comments. Although implementation details were elided, many of the were not
    written for the audience that would be interested in this document.
  * More "before and after" examples.
  * More implicit dependency details. (Perhaps listing transforms in
    -std-compile-opts order would help alleviate this.)
  * Adding documentation for how to invoke passes programmatically.
  * Rearranging the document into a more logical taxonomy. For instance, putting
    profiling passes together.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43677 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-04 18:10:18 +00:00
Nick Lewycky
f4c164c2b5 Fix crash before main on ppc/linux with static constructors. PR1771
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43676 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-04 17:32:10 +00:00
Gordon Henriksen
e626bbe4b5 Fix a validation error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43675 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-04 16:17:00 +00:00
Gordon Henriksen
c86b67742a Finishing initial docs for all transformations in Passes.html.
Also cleaned up some comments in source files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43674 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-04 16:15:04 +00:00
Gordon Henriksen
5544e64765 Removing a dead reference from LLVM.xcodeproj.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43673 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-04 16:12:17 +00:00
Duncan Sands
3cb3650a27 Change uses of getTypeSize to getABITypeSize, getTypeStoreSize
or getTypeSizeInBits as appropriate in ScalarReplAggregates.
The right change to make was not always obvious, so it would
be good to have an sroa guru review this.  While there I noticed
some bugs, and fixed them: (1) arrays of x86 long double have
holes due to alignment padding, but this wasn't being spotted
by HasStructPadding (renamed to HasPadding).  The same goes
for arrays of oddly sized ints.  Vectors also suffer from this,
in fact the problem for vectors is much worse because basic
vector assumptions seem to be broken by vectors of type with
alignment padding.   I didn't try to fix any of these vector
problems.  (2) The code for extracting smaller integers from
larger ones (in the "int union" case) was wrong on big-endian
machines for integers with size not a multiple of 8, like i1.
Probably this is impossible to hit via llvm-gcc, but I fixed
it anyway while there and added a testcase.  I also got rid of
some trailing whitespace and changed a function name which
had an obvious typo in it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43672 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-04 14:43:57 +00:00
Evan Cheng
9aeaf7593b If an interval is being undone clear its preference as well since the source interval may have been undone as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43670 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-04 08:32:21 +00:00
Chris Lattner
03e6c7091e Fix PR1763 by allowing the 'q' constraint to work with 64-bit
regs on x86-64.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43669 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-04 06:51:12 +00:00
Chris Lattner
0647ebf1dc Disable tail duplication of call instructions. The cost
metric is way off for these in general, and this works around
buggy code like that in PR1764.  we'll see if there is a big
performance impact of this.  If so, I'll revert it tomorrow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43668 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-04 06:37:55 +00:00
Chris Lattner
e719831b1c finish the 'Memory in LLVM' section
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43667 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-03 22:22:30 +00:00
Chris Lattner
00c992dde0 hack and slash the first 20% of chapter seven.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43663 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-03 08:55:29 +00:00
Evan Cheng
c92da3882e There are times when the coalescer would not coalesce away a copy but the copy
can be eliminated by the allocator is the destination and source targets the
same register. The most common case is when the source and destination registers
are in different class. For example, on x86 mov32to32_ targets GR32_ which
contains a subset of the registers in GR32.

The allocator can do 2 things:
1. Set the preferred allocation for the destination of a copy to that of its source.
2. After allocation is done, change the allocation of a copy destination (if
   legal) so the copy can be eliminated.

This eliminates 443 extra moves from 403.gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43662 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-03 07:20:12 +00:00
Dan Gohman
111c4f897e Add std:: to sort calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43652 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-02 22:24:01 +00:00
Dan Gohman
b61f2f061f Change illegal uses of ++ to uses of STLExtra.h's next function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43651 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-02 22:22:02 +00:00
Ted Kremenek
24384d1d1e Added overloaded version of Deserializer::ReadOwnedPtr which allows
the target pointer to be passed by reference.  This can result in less
typing, as the object to be deserialized can be inferred from the
argument.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43647 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-02 18:04:20 +00:00
Evan Cheng
a9d641e574 Unbreak tailcall opt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43646 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-02 17:45:40 +00:00
Evan Cheng
deb36bd9d4 Add run line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43645 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-02 17:36:58 +00:00
Evan Cheng
7277a7d031 One more extract_subreg coalescing bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43644 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-02 17:35:08 +00:00
Chris Lattner
253945899b add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43642 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-02 17:04:20 +00:00
Duncan Sands
e414cdacb4 Fix a thinko.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43639 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-02 15:18:06 +00:00
Neil Booth
e3d936ac9c Remove some unnecessary C-style statics.
Restore an assertion that arithmetic can be performed on this format.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43638 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-02 15:10:05 +00:00
Chris Lattner
b5d81b3e66 fix typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43637 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-02 05:54:25 +00:00
Chris Lattner
58f2c874d3 Finish chapter 6, and add a spiffy demo that shows off the language.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43636 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-02 05:42:52 +00:00