oota-llvm.git
12 years agofirst pass of writing complete!
Chris Lattner [Sun, 27 Nov 2011 22:36:22 +0000 (22:36 +0000)]
first pass of writing complete!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145206 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoarm and carve out a place ot mention segmented stacks.
Chris Lattner [Sun, 27 Nov 2011 22:12:32 +0000 (22:12 +0000)]
arm and carve out a place ot mention segmented stacks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145204 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd a description of the status of segmented stacks.
Rafael Espindola [Sun, 27 Nov 2011 22:05:46 +0000 (22:05 +0000)]
Add a description of the status of segmented stacks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145201 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agooptimize, mc, x86
Chris Lattner [Sun, 27 Nov 2011 22:03:34 +0000 (22:03 +0000)]
optimize, mc, x86

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145200 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMerge detecting and handling for VSHUFPSY and VSHUFPDY since a lot of the code was...
Craig Topper [Sun, 27 Nov 2011 21:41:12 +0000 (21:41 +0000)]
Merge detecting and handling for VSHUFPSY and VSHUFPDY since a lot of the code was similar for both.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145199 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agosome writing.
Chris Lattner [Sun, 27 Nov 2011 21:30:28 +0000 (21:30 +0000)]
some writing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145198 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agofix some out-of-date attribution.
Chris Lattner [Sun, 27 Nov 2011 21:02:12 +0000 (21:02 +0000)]
fix some out-of-date attribution.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145197 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agodistribute various bullets to different sections.
Chris Lattner [Sun, 27 Nov 2011 20:51:47 +0000 (20:51 +0000)]
distribute various bullets to different sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145196 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPrevent rotating the blocks of a loop (and thus getting a backedge to be
Chandler Carruth [Sun, 27 Nov 2011 20:18:00 +0000 (20:18 +0000)]
Prevent rotating the blocks of a loop (and thus getting a backedge to be
fallthrough) in cases where we might fail to rotate an exit to an outer
loop onto the end of the loop chain.

Having *some* rotation, but not performing this rotation, is the primary
fix of thep performance regression with -enable-block-placement for
Olden/em3d (a whopping 30% regression). Still working on reducing the
test case that actually exercises this and the new rotation strategy out
of this code, but I want to check if this regresses other test cases
first as that may indicate it isn't the correct fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145195 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agorewrite the known problems section. Including a short list of individual bugs per...
Chris Lattner [Sun, 27 Nov 2011 19:38:20 +0000 (19:38 +0000)]
rewrite the known problems section.  Including a short list of individual bugs per target isn't particularly useful.  Link to the target features matrix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145193 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agomove the detailed information about the EH rewrite to a comment, Bill is
Chris Lattner [Sun, 27 Nov 2011 19:26:30 +0000 (19:26 +0000)]
move the detailed information about the EH rewrite to a comment, Bill is
blog'izing it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145192 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agotweak subprojects' section
Chris Lattner [Sun, 27 Nov 2011 18:53:41 +0000 (18:53 +0000)]
tweak subprojects' section

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145191 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agosome random notes.
Chris Lattner [Sun, 27 Nov 2011 18:47:37 +0000 (18:47 +0000)]
some random notes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145190 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoremove a test that is using old-style llvm.dbg intrinsics, apparently only
Chris Lattner [Sun, 27 Nov 2011 18:13:47 +0000 (18:13 +0000)]
remove a test that is using old-style llvm.dbg intrinsics, apparently only
fails on ppc and arm hosts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145188 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTake two on rotating the block ordering of loops. My previous attempt
Chandler Carruth [Sun, 27 Nov 2011 13:34:33 +0000 (13:34 +0000)]
Take two on rotating the block ordering of loops. My previous attempt
was centered around the premise of laying out a loop in a chain, and
then rotating that chain. This is good for preserving contiguous layout,
but bad for actually making sane rotations. In order to keep it safe,
I had to essentially make it impossible to rotate deeply nested loops.
The information needed to correctly reason about a deeply nested loop is
actually available -- *before* we layout the loop. We know the inner
loops are already fused into chains, etc. We lose information the moment
we actually lay out the loop.

The solution was the other alternative for this algorithm I discussed
with Benjamin and some others: rather than rotating the loop
after-the-fact, try to pick a profitable starting block for the loop's
layout, and then use our existing layout logic. I was worried about the
complexity of this "pick" step, but it turns out such complexity is
needed to handle all the important cases I keep teasing out of benchmarks.

This is, I'm afraid, a bit of a work-in-progress. It is still
misbehaving on some likely important cases I'm investigating in Olden.
It also isn't really tested. I'm going to try to craft some interesting
nested-loop test cases, but it's likely to be extremely time consuming
and I don't want to go there until I'm sure I'm testing the correct
behavior. Sadly I can't come up with a way of getting simple, fine
grained test cases for this logic. We need complex loop structures to
even trigger much of it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145183 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRevert r145180 as it is causing test failures on all the bots.
Chandler Carruth [Sun, 27 Nov 2011 10:37:47 +0000 (10:37 +0000)]
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

12 years agoFix an impressive type-o / spell-o Duncan noticed.
Chandler Carruth [Sun, 27 Nov 2011 10:32:16 +0000 (10:32 +0000)]
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

12 years agoFixed ObjectFile functions:
Danil Malyshev [Sun, 27 Nov 2011 10:12:52 +0000 (10:12 +0000)]
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

12 years agoRework a bit of the implementation of loop block rotation to not rely so
Chandler Carruth [Sun, 27 Nov 2011 09:22:53 +0000 (09:22 +0000)]
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

12 years agoEli managed to kill off llvm.membarrier in llvm 3.0 also, this means
Chris Lattner [Sun, 27 Nov 2011 08:42:07 +0000 (08:42 +0000)]
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

12 years agoadd some final random notes, I've completed my pass over all the commits.
Chris Lattner [Sun, 27 Nov 2011 08:32:32 +0000 (08:32 +0000)]
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

12 years agoThe llvm.atomic intrinsics *were* removed in LLVM 3.0 (in r141333), remove the
Chris Lattner [Sun, 27 Nov 2011 08:18:55 +0000 (08:18 +0000)]
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

12 years agoremove autoupgrade support for old forms of llvm.prefetch and the old
Chris Lattner [Sun, 27 Nov 2011 07:42:04 +0000 (07:42 +0000)]
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

12 years agoadd some notes.
Chris Lattner [Sun, 27 Nov 2011 07:37:53 +0000 (07:37 +0000)]
add some notes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145173 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoremove asmparsing and documentation support for "volatile load", which was only produ...
Chris Lattner [Sun, 27 Nov 2011 06:56:53 +0000 (06:56 +0000)]
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

12 years agoUpgrade syntax of tests using volatile instructions to use 'load volatile' instead...
Chris Lattner [Sun, 27 Nov 2011 06:54:59 +0000 (06:54 +0000)]
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

12 years agosome notes.
Chris Lattner [Sun, 27 Nov 2011 06:24:49 +0000 (06:24 +0000)]
some notes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145170 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoremove autoupgrade support for really old-style debug info intrinsics.
Chris Lattner [Sun, 27 Nov 2011 06:18:33 +0000 (06:18 +0000)]
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

12 years agoremove some old autoupgrade logic
Chris Lattner [Sun, 27 Nov 2011 06:10:54 +0000 (06:10 +0000)]
remove some old autoupgrade logic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145167 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoremove autoupgrade support for LLVM 2.9 exception stuff. Mainline supports
Chris Lattner [Sun, 27 Nov 2011 05:56:16 +0000 (05:56 +0000)]
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

12 years agoremove support for reading llvm 2.9 .bc files. LLVM 3.1 is only compatible back...
Chris Lattner [Sun, 27 Nov 2011 05:48:27 +0000 (05:48 +0000)]
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

12 years agoadd some notes
Chris Lattner [Sun, 27 Nov 2011 05:47:57 +0000 (05:47 +0000)]
add some notes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145163 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd several new instructions supported by the latest MicroBlaze.
Wesley Peck [Sun, 27 Nov 2011 05:16:58 +0000 (05:16 +0000)]
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

12 years agoPartially revert r145157 to quiet an unhappy buildbot.
Bob Wilson [Sun, 27 Nov 2011 01:48:54 +0000 (01:48 +0000)]
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

12 years agoOptimize comparison against 0 in conditional instructions.
Wesley Peck [Sun, 27 Nov 2011 01:36:20 +0000 (01:36 +0000)]
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

12 years agoIntroduce a loop block rotation optimization to the new block placement
Chandler Carruth [Sun, 27 Nov 2011 00:38:03 +0000 (00:38 +0000)]
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

12 years agoMerge the install-clang-c target into install-clang. <rdar://problem/10217046>
Bob Wilson [Sun, 27 Nov 2011 00:26:22 +0000 (00:26 +0000)]
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

12 years agoMove code into anonymous namespaces.
Benjamin Kramer [Sat, 26 Nov 2011 23:01:57 +0000 (23:01 +0000)]
Move code into anonymous namespaces.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145154 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMerge 128-bit and 256-bit X86ISD node types for VPERMILPS and VPERMILPD. Simplify...
Craig Topper [Sat, 26 Nov 2011 22:55:48 +0000 (22:55 +0000)]
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

12 years agoRename a couple of options and fix some simple typos.
Wesley Peck [Sat, 26 Nov 2011 21:50:38 +0000 (21:50 +0000)]
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

12 years agoCollapse X86ISD node types for PUNPCKH*, PUNPCKL*, UNPCKLP*, and UNPCKHP* to not...
Craig Topper [Sat, 26 Nov 2011 20:47:44 +0000 (20:47 +0000)]
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

12 years agoMove the branch probability blurb into the optimizer section. Add a minimal bullet...
Benjamin Kramer [Sat, 26 Nov 2011 11:14:54 +0000 (11:14 +0000)]
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

12 years agoAdded Objective-C and libc++ details to the 3.0 release notes.
David Chisnall [Sat, 26 Nov 2011 10:56:17 +0000 (10:56 +0000)]
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

12 years agoFileCheck-ize this test and make it more precise. This is in preparation
Chandler Carruth [Sat, 26 Nov 2011 08:24:25 +0000 (08:24 +0000)]
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

12 years agoFix APFloat::convert so that it handles narrowing conversions correctly; it
Eli Friedman [Sat, 26 Nov 2011 03:38:02 +0000 (03:38 +0000)]
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

12 years agoshpelling
Benjamin Kramer [Fri, 25 Nov 2011 21:26:00 +0000 (21:26 +0000)]
shpelling

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145138 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove ZooLib from the projects list.
Benjamin Kramer [Fri, 25 Nov 2011 21:03:06 +0000 (21:03 +0000)]
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

12 years agoadd a user
Chris Lattner [Fri, 25 Nov 2011 20:36:17 +0000 (20:36 +0000)]
add a user

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145136 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoadd some notes
Chris Lattner [Fri, 25 Nov 2011 20:33:27 +0000 (20:33 +0000)]
add some notes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145135 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoadd faust
Chris Lattner [Fri, 25 Nov 2011 20:28:16 +0000 (20:28 +0000)]
add faust

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145134 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoThis patch contains support for encoding FMA4 instructions and
Bruno Cardoso Lopes [Fri, 25 Nov 2011 19:33:42 +0000 (19:33 +0000)]
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

12 years agoARMLoadStoreOptimizer.cpp: Fix MSVC(Debug) build.
NAKAMURA Takumi [Fri, 25 Nov 2011 09:19:57 +0000 (09:19 +0000)]
ARMLoadStoreOptimizer.cpp: Fix MSVC(Debug) build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145129 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove 256-bit specific node types for UNPCKHPS/D and instead use the 128-bit version...
Craig Topper [Thu, 24 Nov 2011 22:57:10 +0000 (22:57 +0000)]
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

12 years agoRemove AVX2 specific X86ISD node types for PUNPCKH/L and instead just reuse the 128...
Craig Topper [Thu, 24 Nov 2011 22:20:08 +0000 (22:20 +0000)]
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

12 years agoDevirtualize Pass::getPassID, overriding it isn't useful and it gets called a lot.
Benjamin Kramer [Thu, 24 Nov 2011 21:14:11 +0000 (21:14 +0000)]
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

12 years agoMake ConstantRange::truncate a bit more efficient.
Benjamin Kramer [Thu, 24 Nov 2011 17:24:33 +0000 (17:24 +0000)]
Make ConstantRange::truncate a bit more efficient.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145122 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoX86: alias cqo to cqto.
Benjamin Kramer [Thu, 24 Nov 2011 12:02:46 +0000 (12:02 +0000)]
X86: alias cqo to cqto.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145121 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix a silly use-after-free issue. A much earlier version of this code
Chandler Carruth [Thu, 24 Nov 2011 11:23:15 +0000 (11:23 +0000)]
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

12 years agoWhen adding blocks to the list of those which no longer have any CFG
Chandler Carruth [Thu, 24 Nov 2011 08:46:04 +0000 (08:46 +0000)]
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

12 years agoAdd a few notes for ARM and a blurb about the MCJIT.
Jim Grosbach [Thu, 24 Nov 2011 00:49:21 +0000 (00:49 +0000)]
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

12 years agoThis patch makes the following changes necessary for MIPS' direct code emission.
Akira Hatanaka [Wed, 23 Nov 2011 22:19:28 +0000 (22:19 +0000)]
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

12 years agoThis patch addresses gp relative fixups/relocations for jump tables.
Akira Hatanaka [Wed, 23 Nov 2011 22:18:04 +0000 (22:18 +0000)]
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

12 years agoCorrectly byte-swap APInts with bit-widths greater than 64.
Richard Smith [Wed, 23 Nov 2011 21:33:37 +0000 (21:33 +0000)]
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

12 years agoValidate the return type when checking if a function is malloc.
Benjamin Kramer [Wed, 23 Nov 2011 17:58:47 +0000 (17:58 +0000)]
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

12 years agoFix a crash in which a multiplication was being reported as being both negative
Duncan Sands [Wed, 23 Nov 2011 16:26:47 +0000 (16:26 +0000)]
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

12 years agoX86: Use btq for bit tests if the immediate can't be encoded in 32 bits.
Benjamin Kramer [Wed, 23 Nov 2011 13:54:17 +0000 (13:54 +0000)]
X86: Use btq for bit tests if the immediate can't be encoded in 32 bits.

Before:
movabsq $4294967296, %rax       ## encoding: [0x48,0xb8,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00]
testq %rax, %rdi              ## encoding: [0x48,0x85,0xf8]
jne LBB0_2                  ## encoding: [0x75,A]

After:
btq $32, %rdi               ## encoding: [0x48,0x0f,0xba,0xe7,0x20]
jb LBB0_2                  ## encoding: [0x72,A]

btq is usually slower than testq because it doesn't fuse with the jump, but here we're better off
saving one register and a giant movabsq.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145103 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agotest/CodeGen/X86/block-placement.ll: Add explicit -mtriple=i686-linux. X86 Win32...
NAKAMURA Takumi [Wed, 23 Nov 2011 12:18:22 +0000 (12:18 +0000)]
test/CodeGen/X86/block-placement.ll: Add explicit -mtriple=i686-linux. X86 Win32 CodeGen does not support EH yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145101 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRelax an invariant that block placement was trying to assert a bit
Chandler Carruth [Wed, 23 Nov 2011 10:35:36 +0000 (10:35 +0000)]
Relax an invariant that block placement was trying to assert a bit
further. This invariant just wasn't going to work in the face of
unanalyzable branches; we need to be resillient to the phenomenon of
chains poking into a loop and poking out of a loop. In fact, we already
were, we just needed to not assert on it.

This was found during a bootstrap with block placement turned on.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145100 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoI added several lines in X86 code generator that allow to choose
Elena Demikhovsky [Wed, 23 Nov 2011 10:23:16 +0000 (10:23 +0000)]
I added several lines in X86 code generator that allow to choose
VSHUFPS/VSHUFPD instructions while lowering VECTOR_SHUFFLE node. I check a commuted VSHUFP mask.

The patch was reviewed by Bruno.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145099 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoHandle the case of a no-return invoke correctly. It actually still has
Chandler Carruth [Wed, 23 Nov 2011 08:23:54 +0000 (08:23 +0000)]
Handle the case of a no-return invoke correctly. It actually still has
successors, they just are all landing pad successors. We handle this the
same way as no successors. Comments attached for the next person to wade
through here and another lovely test case courtesy of Benjamin Kramer's
bugpoint reduction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145098 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoEnable stack protectors for all arrays, not just char arrays. rdar://5875909
Bob Wilson [Wed, 23 Nov 2011 07:13:56 +0000 (07:13 +0000)]
Enable stack protectors for all arrays, not just char arrays. rdar://5875909
Patch by Bill Wendling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145097 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix PR11422.
Jakob Stoklund Olesen [Wed, 23 Nov 2011 04:03:08 +0000 (04:03 +0000)]
Fix PR11422.

This was a bug in keeping track of the available domains when merging
domain values.

The wrong domain mask caused ExecutionDepsFix to try to move VANDPSYrr
to the integer domain which is only available in AVX2.

Also add an assertion to catch future attempts at emitting AVX2
instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145096 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPoint to libLTO with -L/PATH/ -lLTO so that it is found in the install
Rafael Espindola [Wed, 23 Nov 2011 03:07:25 +0000 (03:07 +0000)]
Point to libLTO with -L/PATH/ -lLTO so that it is found in the install
directory.
Patch by Markus Trippelsdorf.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145095 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix a crash in block placement due to an inner loop that happened to be
Chandler Carruth [Wed, 23 Nov 2011 03:03:21 +0000 (03:03 +0000)]
Fix a crash in block placement due to an inner loop that happened to be
reversed in the function's original ordering, and we happened to
encounter it while handling an outer unnatural CFG structure.

Thanks to the test case reduced from GCC's source by Benjamin Kramer.
This may also fix a crasher in gzip that Duncan reduced for me, but
I haven't yet gotten to testing that one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145094 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[asan] do not instrument threadlocal globals, this is buggy
Kostya Serebryany [Wed, 23 Nov 2011 02:10:54 +0000 (02:10 +0000)]
[asan] do not instrument threadlocal globals, this is buggy

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145092 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUndo test commit
Anshuman Dasgupta [Tue, 22 Nov 2011 20:05:48 +0000 (20:05 +0000)]
Undo test commit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145079 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTest commit
Anshuman Dasgupta [Tue, 22 Nov 2011 20:03:30 +0000 (20:03 +0000)]
Test commit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145078 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoadd basic PPC register-pressure feedback; adjust the vaarg test to match the new...
Hal Finkel [Tue, 22 Nov 2011 16:21:04 +0000 (16:21 +0000)]
add basic PPC register-pressure feedback; adjust the vaarg test to match the new register-allocation pattern

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145065 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMore fixes to the X86InstComments for shuffle instructions. In particular add AVX...
Craig Topper [Tue, 22 Nov 2011 14:27:57 +0000 (14:27 +0000)]
More fixes to the X86InstComments for shuffle instructions. In particular add AVX flavors of many instructions and fix the destination operand for some of the existing AVX entries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145063 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix a devilish miscompile exposed by block placement. The
Chandler Carruth [Tue, 22 Nov 2011 13:13:16 +0000 (13:13 +0000)]
Fix a devilish miscompile exposed by block placement. The
updateTerminator code didn't correctly handle EH terminators in one very
specific case. AnalyzeBranch would find no terminator instruction, and
so the fallback in updateTerminator is to assume fallthrough. This is
correct, but the destination of the fallthrough was assumed to be the
first successor.

This is *almost always* true, but in certain cases the loop
transformations will cause the landing pad to be the first successor!
Instead of this brittle logic, actually look through the successors for
a non-landing-pad accessor, and to assert if more than one is found.

This will hopefully fix some (if not all) of the self host miscompiles
with block placement. Thanks to Benjamin Kramer for reporting, Nick
Lewycky for an initial stab at a reduction, and Duncan for endless
advice on EH (which I know nothing about) as well as reviewing the
actual fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145062 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd configure checking for pread(2) and use it to save a syscall when reading files.
Benjamin Kramer [Tue, 22 Nov 2011 12:31:53 +0000 (12:31 +0000)]
Add configure checking for pread(2) and use it to save a syscall when reading files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145061 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix an obvious omission in the SelectionDAGBuilder where we were
Chandler Carruth [Tue, 22 Nov 2011 11:37:46 +0000 (11:37 +0000)]
Fix an obvious omission in the SelectionDAGBuilder where we were
dropping weights on the floor for invokes. This was impeding my writing
further test cases for invoke when interacting with probabilities and
block placement.

No test case as there doesn't appear to be a way to test this stuff. =/
Suggestions for a test case of course welcome. I hope to be able to add
test cases that indirectly cover this eventually by adding probabilities
to the exceptional edge and reordering blocks as a result.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145060 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTurn error recovery into an assert.
Benjamin Kramer [Tue, 22 Nov 2011 11:37:11 +0000 (11:37 +0000)]
Turn error recovery into an assert.

This was put in because in a certain version of DragonFlyBSD stat(2) lied about the
size of some files. This was fixed a long time ago so we can remove the workaround.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145059 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd triple to the test.
Rafael Espindola [Tue, 22 Nov 2011 06:36:25 +0000 (06:36 +0000)]
Add triple to the test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145057 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoIf a register is both an early clobber and part of a tied use, handle the use
Rafael Espindola [Tue, 22 Nov 2011 06:27:18 +0000 (06:27 +0000)]
If a register is both an early clobber and part of a tied use, handle the use
before the clobber so that we copy the value if needed.

Fixes pr11415.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145056 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix shuffle decoding logic to handle UNPCKLPS/UNPCKLPD on 256-bit vectors correctly...
Craig Topper [Tue, 22 Nov 2011 01:57:35 +0000 (01:57 +0000)]
Fix shuffle decoding logic to handle UNPCKLPS/UNPCKLPD on 256-bit vectors correctly. Add support for decoding UNPCKHPS/UNPCKHPD for AVX 128-bit and 256-bit forms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145055 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd methods for querying minimum SSE version along with AVX. Simplifies all the place...
Craig Topper [Tue, 22 Nov 2011 00:44:41 +0000 (00:44 +0000)]
Add methods for querying minimum SSE version along with AVX. Simplifies all the places that had to check a version of SSE and AVX.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145053 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agofix typo in comment
Sebastian Pop [Mon, 21 Nov 2011 20:46:55 +0000 (20:46 +0000)]
fix typo in comment

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145048 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix crasher in GVN due to my recent capture tracking changes.
Nick Lewycky [Mon, 21 Nov 2011 19:42:56 +0000 (19:42 +0000)]
Fix crasher in GVN due to my recent capture tracking changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145047 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd virtual destructor. Whoops!
Nick Lewycky [Mon, 21 Nov 2011 18:32:21 +0000 (18:32 +0000)]
Add virtual destructor. Whoops!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145044 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoLowering for v32i8 to VPUNPCKLBW/VPUNPCKHBW when AVX2 is enabled.
Craig Topper [Mon, 21 Nov 2011 08:26:50 +0000 (08:26 +0000)]
Lowering for v32i8 to VPUNPCKLBW/VPUNPCKHBW when AVX2 is enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145028 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTest case for r145026
Craig Topper [Mon, 21 Nov 2011 06:58:09 +0000 (06:58 +0000)]
Test case for r145026

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145027 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd support for lowering 256-bit shuffles to VPUNPCKL/H for i16, i32, i64 if AVX2...
Craig Topper [Mon, 21 Nov 2011 06:57:39 +0000 (06:57 +0000)]
Add support for lowering 256-bit shuffles to VPUNPCKL/H for i16, i32, i64 if AVX2 is enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145026 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFixing a comment
Joe Abbey [Mon, 21 Nov 2011 04:42:21 +0000 (04:42 +0000)]
Fixing a comment

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145025 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake LowerSIGN_EXTEND_INREG split 256-bit vectors when AVX1 is enabled and use AVX2...
Craig Topper [Mon, 21 Nov 2011 01:12:36 +0000 (01:12 +0000)]
Make LowerSIGN_EXTEND_INREG split 256-bit vectors when AVX1 is enabled and use AVX2 shifts when AVX2 is enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145022 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoLess template, more virtual! Refactoring suggested by Chris in code review.
Nick Lewycky [Sun, 20 Nov 2011 19:37:06 +0000 (19:37 +0000)]
Less template, more virtual! Refactoring suggested by Chris in code review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145014 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRefactor code to use new attribute getters on CallSite for NoCapture and ByVal.
Nick Lewycky [Sun, 20 Nov 2011 19:09:04 +0000 (19:09 +0000)]
Refactor code to use new attribute getters on CallSite for NoCapture and ByVal.
Suggested in code review by Eli.

That code in InstCombine looks kinda suspicious.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145013 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agotest/CodeGen/X86/block-placement.ll: Relax expressions for Win32.
NAKAMURA Takumi [Sun, 20 Nov 2011 12:49:45 +0000 (12:49 +0000)]
test/CodeGen/X86/block-placement.ll: Relax expressions for Win32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145011 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoThe logic for breaking the CFG in the presence of hot successors didn't
Chandler Carruth [Sun, 20 Nov 2011 11:22:06 +0000 (11:22 +0000)]
The logic for breaking the CFG in the presence of hot successors didn't
properly account for the *global* probability of the edge being taken.
This manifested as a very large number of unconditional branches to
blocks being merged against the CFG even though they weren't
particularly hot within the CFG.

The fix is to check whether the edge being merged is both locally hot
relative to other successors for the source block, and globally hot
compared to other (unmerged) predecessors of the destination block.

This introduces a new crasher on GCC single-source, but it's currently
behind a flag, and Ben has offered to work on the reduction. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145010 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake an obviously const interface actually be marked as const.
Chandler Carruth [Sun, 20 Nov 2011 11:22:03 +0000 (11:22 +0000)]
Make an obviously const interface actually be marked as const.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145009 91177308-0d34-0410-b5e6-96231b3b80d8