Commit Graph

78507 Commits

Author SHA1 Message Date
Chandler Carruth
790552c20f Revert r145180 as it is causing test failures on all the bots.
Original commit message:
Fixed ObjectFile functions:
- getSymbolOffset() renamed as getSymbolFileOffset()
- getSymbolFileOffset(), getSymbolAddress(), getRelocationAddress() returns same result for ELFObjectFile, MachOObjectFile and COFFObjectFile.
- added getRelocationOffset()
- fixed MachOObjectFile::getSymbolSize()
- fixed MachOObjectFile::getSymbolSection()
- fixed MachOObjectFile::getSymbolOffset() for symbols without section data.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145182 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-27 10:37:47 +00:00
Chandler Carruth
7096692fd9 Fix an impressive type-o / spell-o Duncan noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145181 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-27 10:32:16 +00:00
Danil Malyshev
9b24738bd1 Fixed ObjectFile functions:
- getSymbolOffset() renamed as getSymbolFileOffset()
- getSymbolFileOffset(), getSymbolAddress(), getRelocationAddress() returns same result for ELFObjectFile, MachOObjectFile and COFFObjectFile.
- added getRelocationOffset()
- fixed MachOObjectFile::getSymbolSize()
- fixed MachOObjectFile::getSymbolSection()
- fixed MachOObjectFile::getSymbolOffset() for symbols without section data.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145180 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-27 10:12:52 +00:00
Chandler Carruth
2eb5a744b1 Rework a bit of the implementation of loop block rotation to not rely so
heavily on AnalyzeBranch. That routine doesn't behave as we want given
that rotation occurs mid-way through re-ordering the function. Instead
merely check that there are not unanalyzable branching constructs
present, and then reason about the CFG via successor lists. This
actually simplifies my mental model for all of this as well.

The concrete result is that we now will rotate more loop chains. I've
added a test case from Olden highlighting the effect. There is still
a bit more to do here though in order to regain all of the performance
in Olden.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145179 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-27 09:22:53 +00:00
Chris Lattner
b5dd9de724 Eli managed to kill off llvm.membarrier in llvm 3.0 also, this means
that mainline needs no autoupgrade logic for intrinsics yet, woohoo!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145178 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-27 08:42:07 +00:00
Chris Lattner
5a1731daa7 add some final random notes, I've completed my pass over all the commits.
I'll work on turning this into something intelligible tomorrow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145177 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-27 08:32:32 +00:00
Chris Lattner
875882a184 The llvm.atomic intrinsics *were* removed in LLVM 3.0 (in r141333), remove the
autoupgrade logic for 2.9 and before.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145176 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-27 08:18:55 +00:00
Chris Lattner
3211c6e31b remove autoupgrade support for old forms of llvm.prefetch and the old
trampoline forms.  Both of these were correct in LLVM 3.0, and we don't
need to support LLVM 2.9 and earlier in mainline.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145174 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-27 07:42:04 +00:00
Chris Lattner
f51572aaf9 add some notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145173 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-27 07:37:53 +00:00
Chris Lattner
fbe910e7f4 remove asmparsing and documentation support for "volatile load", which was only produced by LLVM 2.9 and earlier. LLVM 3.0 and later prefers "load volatile".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145172 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-27 06:56:53 +00:00
Chris Lattner
d2bf432b2b Upgrade syntax of tests using volatile instructions to use 'load volatile' instead of 'volatile load', which is archaic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145171 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-27 06:54:59 +00:00
Chris Lattner
8ddff91282 some notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145170 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-27 06:24:49 +00:00
Chris Lattner
a7e6f74631 remove autoupgrade support for really old-style debug info intrinsics.
I think this is the last of autoupgrade that can be removed in 3.1.
Can the atomic upgrade stuff also go?


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145169 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-27 06:18:33 +00:00
Chris Lattner
663aebf8d6 remove some old autoupgrade logic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145167 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-27 06:10:54 +00:00
Chris Lattner
9d5f6ccd26 remove autoupgrade support for LLVM 2.9 exception stuff. Mainline supports
LLVM 3.0 and later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145165 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-27 05:56:16 +00:00
Chris Lattner
dbc88494ee remove support for reading llvm 2.9 .bc files. LLVM 3.1 is only compatible back to 3.0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145164 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-27 05:48:27 +00:00
Chris Lattner
5130d4eab6 add some notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145163 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-27 05:47:57 +00:00
Wesley Peck
4c729f1152 Add several new instructions supported by the latest MicroBlaze.
These instructions are not generated by the backend yet, this will come in a later commit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145161 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-27 05:16:58 +00:00
Bob Wilson
fed700da60 Partially revert r145157 to quiet an unhappy buildbot.
Removing that buildbot would be a better solution, but this is at least
a temporary workaround.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145160 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-27 01:48:54 +00:00
Wesley Peck
a0aa45c759 Optimize comparison against 0 in conditional instructions.
Fix a couple of 80-column violations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145159 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-27 01:36:20 +00:00
Chandler Carruth
2e38cf961d Introduce a loop block rotation optimization to the new block placement
pass. This is designed to achieve one of the important optimizations
that the old code placement pass did, but more simply.

This is a somewhat rough and *very* conservative version of the
transform. We could get a lot fancier here if there are profitable cases
to do so. In particular, this only looks for a single pattern, it
insists that the loop backedge being rotated away is the last backedge
in the chain, and it doesn't provide any means of doing better in-loop
placement due to the rotation. However, it appears that it will handle
the important loops I am finding in the LLVM test suite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145158 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-27 00:38:03 +00:00
Bob Wilson
9fbf6173b8 Merge the install-clang-c target into install-clang. <rdar://problem/10217046>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145157 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-27 00:26:22 +00:00
Benjamin Kramer
0861f5793a Move code into anonymous namespaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145154 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-26 23:01:57 +00:00
Craig Topper
38034c568c Merge 128-bit and 256-bit X86ISD node types for VPERMILPS and VPERMILPD. Simplify some shuffle lowering code since V1 can never be UNDEF due to canonalizing that occurs when shuffle nodes are created.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145153 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-26 22:55:48 +00:00
Wesley Peck
a18f08318a Rename a couple of options and fix some simple typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145152 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-26 21:50:38 +00:00
Craig Topper
06cb680779 Collapse X86ISD node types for PUNPCKH*, PUNPCKL*, UNPCKLP*, and UNPCKHP* to not be type specific. Now we just have integer high and low and floating point high and low. Pattern matching will choose the correct instruction based on the vector type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145148 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-26 20:47:44 +00:00
Benjamin Kramer
933a78c0d9 Move the branch probability blurb into the optimizer section. Add a minimal bullet for AVX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145145 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-26 11:14:54 +00:00
David Chisnall
553284e69a Added Objective-C and libc++ details to the 3.0 release notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145144 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-26 10:56:17 +00:00
Chandler Carruth
5761c30a8d FileCheck-ize this test and make it more precise. This is in preparation
for adding other tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145143 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-26 08:24:25 +00:00
Eli Friedman
4455142a95 Fix APFloat::convert so that it handles narrowing conversions correctly; it
was returning incorrect values in rare cases, and incorrectly marking
exact conversions as inexact in some more common cases. Fixes PR11406, and a
missed optimization in test/CodeGen/X86/fp-stack-O0.ll.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145141 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-26 03:38:02 +00:00
Benjamin Kramer
7c5025bbee shpelling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145138 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-25 21:26:00 +00:00
Benjamin Kramer
1e9ff6df14 Remove ZooLib from the projects list.
I don't see how the project is using LLVM and we really can't list every user of
the clang analyzer. Sorry.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145137 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-25 21:03:06 +00:00
Chris Lattner
cc08977d14 add a user
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145136 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-25 20:36:17 +00:00
Chris Lattner
6a007d11e3 add some notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145135 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-25 20:33:27 +00:00
Chris Lattner
adb417afa6 add faust
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145134 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-25 20:28:16 +00:00
Bruno Cardoso Lopes
1b9b377975 This patch contains support for encoding FMA4 instructions and
tablegen patterns for scalar FMA4 operations and intrinsic. Also
add tests for vfmaddsd.

Patch by Jan Sjodin

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145133 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-25 19:33:42 +00:00
NAKAMURA Takumi
70aaf37c11 ARMLoadStoreOptimizer.cpp: Fix MSVC(Debug) build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145129 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-25 09:19:57 +00:00
Craig Topper
705f2431a0 Remove 256-bit specific node types for UNPCKHPS/D and instead use the 128-bit versions and let the operand type disinquish. Also fix the load form of the v8i32 patterns for these to realize that the load would be promoted to v4i64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145126 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-24 22:57:10 +00:00
Craig Topper
f475a55bd4 Remove AVX2 specific X86ISD node types for PUNPCKH/L and instead just reuse the 128-bit versions and let the vector type distinguish.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145125 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-24 22:20:08 +00:00
Benjamin Kramer
8a42633273 Devirtualize Pass::getPassID, overriding it isn't useful and it gets called a lot.
While at it pull the trivial ctor in line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145124 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-24 21:14:11 +00:00
Benjamin Kramer
b3ff49e923 Make ConstantRange::truncate a bit more efficient.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145122 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-24 17:24:33 +00:00
Benjamin Kramer
9d399b1fc2 X86: alias cqo to cqto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145121 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-24 12:02:46 +00:00
Chandler Carruth
4aae4f9007 Fix a silly use-after-free issue. A much earlier version of this code
need lots of fanciness around retaining a reference to a Chain's slot in
the BlockToChain map, but that's all gone now. We can just go directly
to allocating the new chain (which will update the mapping for us) and
using it.

Somewhat gross mechanically generated test case replicates the issue
Duncan spotted when actually testing this out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145120 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-24 11:23:15 +00:00
Chandler Carruth
a2deea1dcf When adding blocks to the list of those which no longer have any CFG
conflicts, we should only be adding the first block of the chain to the
list, lest we try to merge into the middle of that chain. Most of the
places we were doing this we already happened to be looking at the first
block, but there is no reason to assume that, and in some cases it was
clearly wrong.

I've added a couple of tests here. One already worked, but I like having
an explicit test for it. The other is reduced from a test case Duncan
reduced for me and used to crash. Now it is handled correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145119 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-24 08:46:04 +00:00
Jim Grosbach
2552de030b Add a few notes for ARM and a blurb about the MCJIT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145118 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-24 00:49:21 +00:00
Akira Hatanaka
421455f1ea This patch makes the following changes necessary for MIPS' direct code emission.
- lower unaligned loads/stores.
- encode the size operand of instructions INS and EXT.
- emit relocation information needed for JAL (jump-and-link).  


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145113 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-23 22:19:28 +00:00
Akira Hatanaka
84bfc2f090 This patch addresses gp relative fixups/relocations for jump tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145112 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-23 22:18:04 +00:00
Richard Smith
e73db4e2a7 Correctly byte-swap APInts with bit-widths greater than 64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145111 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-23 21:33:37 +00:00
Benjamin Kramer
1db1c239fe Validate the return type when checking if a function is malloc.
Fixes PR11426. Not sure if a test case with a "wrong" malloc would be useful.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145106 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-23 17:58:47 +00:00
Duncan Sands
a8f5cd3539 Fix a crash in which a multiplication was being reported as being both negative
and positive: positive, because it could be directly computed to be positive;
negative, because the nsw flags means it is either negative or undefined (the
multiplication always overflowed).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145104 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-23 16:26:47 +00:00