oota-llvm.git
12 years agoUnbreak the MSVC build, that next() thing again.
Francois Pichet [Tue, 17 Apr 2012 09:37:32 +0000 (09:37 +0000)]
Unbreak the MSVC build, that next() thing again.

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

12 years agoFix bad EXTRACT_SUBREG in instruction selection for extending-loads on NEON.
James Molloy [Tue, 17 Apr 2012 08:18:00 +0000 (08:18 +0000)]
Fix bad EXTRACT_SUBREG in instruction selection for extending-loads on NEON.

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

12 years agoRevert "SCEV: When expanding a GEP the final addition to the base pointer has NUW...
Benjamin Kramer [Tue, 17 Apr 2012 06:33:57 +0000 (06:33 +0000)]
Revert "SCEV: When expanding a GEP the final addition to the base pointer has NUW but not NSW."

This isn't right either, reverting for now.

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

12 years agoTest cases that assume layout should use -disable-code-place.
Andrew Trick [Tue, 17 Apr 2012 06:20:42 +0000 (06:20 +0000)]
Test cases that assume layout should use -disable-code-place.

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

12 years agoDon't decode vperm2i128 or vperm2f128 into a shuffle if bit 3 or 7 of the immediate...
Craig Topper [Tue, 17 Apr 2012 05:54:54 +0000 (05:54 +0000)]
Don't decode vperm2i128 or vperm2f128 into a shuffle if bit 3 or 7 of the immediate is set.

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

12 years agoDownload and build the compiler-rt project.
Bill Wendling [Tue, 17 Apr 2012 05:11:51 +0000 (05:11 +0000)]
Download and build the compiler-rt project.

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

12 years agoSlotIndexes used to store the index list in a crufty custom linked-list. I can't
Lang Hames [Tue, 17 Apr 2012 04:15:51 +0000 (04:15 +0000)]
SlotIndexes used to store the index list in a crufty custom linked-list. I can't
for the life of me remember why I wrote it this way, but I can't see any good
reason for it now. This patch replaces the custom linked list with an ilist.

This change should preserve the existing numberings exactly, so no generated code
should change (if it does, file a bug!).

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

12 years agoTypo in an unused field.
Andrew Trick [Tue, 17 Apr 2012 01:22:58 +0000 (01:22 +0000)]
Typo in an unused field.

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

12 years agoUpdate woefully stale credits entry. Everything listed there had been
Chandler Carruth [Tue, 17 Apr 2012 01:19:37 +0000 (01:19 +0000)]
Update woefully stale credits entry. Everything listed there had been
re-done by wiser souls.

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

12 years agoAdd a stub about the inline cost rewrite.
Chandler Carruth [Tue, 17 Apr 2012 01:13:53 +0000 (01:13 +0000)]
Add a stub about the inline cost rewrite.

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

12 years agoAdd a stub for block placement pass. This needs fleshing out w/ details
Chandler Carruth [Tue, 17 Apr 2012 01:10:35 +0000 (01:10 +0000)]
Add a stub for block placement pass. This needs fleshing out w/ details
about what folks should expect w.r.t. the new algorithm.

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

12 years agoDon't tag libcxx and libcxxabi since we don't release them just yet.
Bill Wendling [Tue, 17 Apr 2012 01:01:55 +0000 (01:01 +0000)]
Don't tag libcxx and libcxxabi since we don't release them just yet.

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

12 years agoFix ARM disassembly of VLD2 (single 2-element structure to all lanes)
Kevin Enderby [Tue, 17 Apr 2012 00:49:27 +0000 (00:49 +0000)]
Fix ARM disassembly of VLD2 (single 2-element structure to all lanes)
instructions with writebacks. And add test a case for all opcodes handed by
DecodeVLD2DupInstruction() in ARMDisassembler.cpp .

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

12 years agotemporarily XFAIL this test until post RA
Preston Gurd [Tue, 17 Apr 2012 00:21:35 +0000 (00:21 +0000)]
temporarily XFAIL this test until post RA
live-ins is properly enabled.

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

12 years agoTidy up. 80 columns.
Jim Grosbach [Tue, 17 Apr 2012 00:01:04 +0000 (00:01 +0000)]
Tidy up. 80 columns.

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

12 years agoTypo.
Eric Christopher [Mon, 16 Apr 2012 23:54:31 +0000 (23:54 +0000)]
Typo.

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

12 years agoMake comment here more clear.
Eric Christopher [Mon, 16 Apr 2012 23:54:23 +0000 (23:54 +0000)]
Make comment here more clear.

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

12 years agoDisable the atom scheduling test after r154874 broke it.
Chandler Carruth [Mon, 16 Apr 2012 23:11:39 +0000 (23:11 +0000)]
Disable the atom scheduling test after r154874 broke it.

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

12 years agoARM two-operand forms for vhadd and vhsub instructions.
Jim Grosbach [Mon, 16 Apr 2012 23:00:25 +0000 (23:00 +0000)]
ARM two-operand forms for vhadd and vhsub instructions.

rdar://11252521

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

12 years agoTemporarily turn off anti-dependency checking
Preston Gurd [Mon, 16 Apr 2012 22:52:28 +0000 (22:52 +0000)]
Temporarily turn off anti-dependency checking
during Post RA scheduling in X86,
until the X86 target is changed to properly set up
post RA liveness.

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

12 years agoAdd files which were not included by commit 154868.
Preston Gurd [Mon, 16 Apr 2012 22:26:48 +0000 (22:26 +0000)]
Add files which were not included by commit 154868.

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

12 years agoRelax this test a touch to cope with different assembly variants.
Chandler Carruth [Mon, 16 Apr 2012 22:20:48 +0000 (22:20 +0000)]
Relax this test a touch to cope with different assembly variants.

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

12 years agoImplement GDB integration for source level debugging of code JITed using
Preston Gurd [Mon, 16 Apr 2012 22:12:58 +0000 (22:12 +0000)]
Implement GDB integration for source level debugging of code JITed using
the MCJIT execution engine.

The GDB JIT debugging integration support works by registering a loaded
object image with a pre-defined function that GDB will monitor if GDB
is attached. GDB integration support is implemented for ELF only at this
time. This integration requires GDB version 7.0 or newer.

Patch by Andy Kaylor!

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

12 years agoFix updateTerminator to be resiliant to degenerate terminators where
Chandler Carruth [Mon, 16 Apr 2012 22:03:00 +0000 (22:03 +0000)]
Fix updateTerminator to be resiliant to degenerate terminators where
both fallthrough and a conditional branch target the same successor.
Gracefully delete the conditional branch and introduce any unconditional
branch needed to reach the actual successor. This fixes memory
corruption in 2009-06-15-RegScavengerAssert.ll and possibly other tests.

Also, while I'm here fix a latent bug I spotted by inspection. I never
applied the same fundamental fix to this fallthrough successor finding
logic that I did to the logic used when there are no conditional
branches. As a consequence it would have selected landing pads had they
be aligned in just the right way here. I don't have a test case as
I spotted this by inspection, and the previous time I found this
required have of TableGen's source code to produce it. =/ I hate backend
bugs. ;]

Thanks to Jim Grosbach for helping me reason through this and reviewing
the fix.

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

12 years agoMC assembly parser handling for trailing comma in macro instantiation.
Jim Grosbach [Mon, 16 Apr 2012 21:18:49 +0000 (21:18 +0000)]
MC assembly parser handling for trailing comma in macro instantiation.

A trailing comma means no argument at all (i.e., as if the comma were not
present), not an empty argument to the invokee.

rdar://11252521

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

12 years agoARM handle :lower16: and :upper16: after a '#' prefix.
Jim Grosbach [Mon, 16 Apr 2012 21:18:46 +0000 (21:18 +0000)]
ARM handle :lower16: and :upper16: after a '#' prefix.

rdar://11252521

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

12 years agoFileCheckize these tests.
Jakob Stoklund Olesen [Mon, 16 Apr 2012 20:56:42 +0000 (20:56 +0000)]
FileCheckize these tests.

Add an extra test to ldr_post with an immediate increment.

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

12 years agoForgot to remove fast math metadata from the release notes.
Duncan Sands [Mon, 16 Apr 2012 20:51:39 +0000 (20:51 +0000)]
Forgot to remove fast math metadata from the release notes.

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

12 years agoDisable code placement for this test.
Jakob Stoklund Olesen [Mon, 16 Apr 2012 20:49:06 +0000 (20:49 +0000)]
Disable code placement for this test.

It makes it less sensitive to small changes in heuristics.

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

12 years agoRemove support for the special 'fast' value for fpmath accuracy for the moment.
Duncan Sands [Mon, 16 Apr 2012 19:39:33 +0000 (19:39 +0000)]
Remove support for the special 'fast' value for fpmath accuracy for the moment.

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

12 years agoFix incorrect atomics codegen introduced in r154705, and extend test to catch it.
Richard Smith [Mon, 16 Apr 2012 18:43:53 +0000 (18:43 +0000)]
Fix incorrect atomics codegen introduced in r154705, and extend test to catch it.

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

12 years agoThis patch fixes 3 problems:
Akira Hatanaka [Mon, 16 Apr 2012 18:20:26 +0000 (18:20 +0000)]
This patch fixes 3 problems:

1. CHECKNEXT was used instead of CHECK-NEXT which caused the line to be
   ignored which in turn hid the next 2 problems:
2. ('sh_offset', 0x{{{[0-9,a-f]+}}) had one too many leading curly braces and
   failed to do it's job of accepting all hex digits and:
3. The check for the hex values for the code instructions didn't account for
   blank separators.

Patch by Jack Carter.

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

12 years agoRemove unused variable
David Blaikie [Mon, 16 Apr 2012 18:10:13 +0000 (18:10 +0000)]
Remove unused variable

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

12 years agoARM assembly two-operand forms for VRSHL.
Jim Grosbach [Mon, 16 Apr 2012 18:03:16 +0000 (18:03 +0000)]
ARM assembly two-operand forms for VRSHL.

rdar://11252521

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

12 years agoTidy up. Test formatting.
Jim Grosbach [Mon, 16 Apr 2012 18:03:14 +0000 (18:03 +0000)]
Tidy up. Test formatting.

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

12 years agoDo not add offset in applyFixup. This has already been accounted for in Value.
Akira Hatanaka [Mon, 16 Apr 2012 18:00:19 +0000 (18:00 +0000)]
Do not add offset in applyFixup. This has already been accounted for in Value.

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

12 years agoDescribe Polly as a 'Polyhedral Optimizer'
Tobias Grosser [Mon, 16 Apr 2012 17:18:49 +0000 (17:18 +0000)]
Describe Polly as a 'Polyhedral Optimizer'

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

12 years agoAdd Polly news to the release notes
Tobias Grosser [Mon, 16 Apr 2012 17:17:00 +0000 (17:17 +0000)]
Add Polly news to the release notes

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

12 years agoARM two-operand aliases for VRHADD instructions.
Jim Grosbach [Mon, 16 Apr 2012 17:14:11 +0000 (17:14 +0000)]
ARM two-operand aliases for VRHADD instructions.

rdar://11252521

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

12 years agoTidy up. Testcase formatting.
Jim Grosbach [Mon, 16 Apr 2012 17:14:07 +0000 (17:14 +0000)]
Tidy up. Testcase formatting.

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

12 years agoLink to the autovectorization EuroLLVM slides in the release notes.
Hal Finkel [Mon, 16 Apr 2012 17:06:49 +0000 (17:06 +0000)]
Link to the autovectorization EuroLLVM slides in the release notes.

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

12 years agoHexagon V5 (Floating Point) Support.
Sirish Pande [Mon, 16 Apr 2012 17:05:06 +0000 (17:05 +0000)]
Hexagon V5 (Floating Point) Support.

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

12 years agoMove to X86 directory because this fails on non-X86 platforms.
Bill Wendling [Mon, 16 Apr 2012 16:38:48 +0000 (16:38 +0000)]
Move to X86 directory because this fails on non-X86 platforms.

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

12 years agoMake it possible to indicate relaxed floating point requirements at the IR level
Duncan Sands [Mon, 16 Apr 2012 16:28:59 +0000 (16:28 +0000)]
Make it possible to indicate relaxed floating point requirements at the IR level
through the use of 'fpmath' metadata.  Currently this only provides a 'fpaccuracy'
value, which may be a number in ULPs or the keyword 'fast', however the intent is
that this will be extended with additional information about NaN's, infinities
etc later.  No optimizations have been hooked up to this so far.

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

12 years agoFlip the new block-placement pass to be on by default.
Chandler Carruth [Mon, 16 Apr 2012 13:49:17 +0000 (13:49 +0000)]
Flip the new block-placement pass to be on by default.

This is mostly to test the waters. I'd like to get results from FNT
build bots and other bots running on non-x86 platforms.

This feature has been pretty heavily tested over the last few months by
me, and it fixes several of the execution time regressions caused by the
inlining work by preventing inlining decisions from radically impacting
block layout.

I've seen very large improvements in yacr2 and ackermann benchmarks,
along with the expected noise across all of the benchmark suite whenever
code layout changes. I've analyzed all of the regressions and fixed
them, or found them to be impossible to fix. See my email to llvmdev for
more details.

I'd like for this to be in 3.1 as it complements the inliner changes,
but if any failures are showing up or anyone has concerns, it is just
a flag flip and so can be easily turned off.

I'm switching it on tonight to try and get at least one run through
various folks' performance suites in case SPEC or something else has
serious issues with it. I'll watch bots and revert if anything shows up.

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

12 years agoRemove an overly brittle test. This test will no longer be interesting
Chandler Carruth [Mon, 16 Apr 2012 13:49:09 +0000 (13:49 +0000)]
Remove an overly brittle test. This test will no longer be interesting
once we start changing the block layout, so just nuke it. If anyone has
ideas about how to craft a code layout agnostic form of the test please
let me know.

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

12 years agoRemove the methods for attaching metadata to instructions/retrieving metadata
Duncan Sands [Mon, 16 Apr 2012 13:44:35 +0000 (13:44 +0000)]
Remove the methods for attaching metadata to instructions/retrieving metadata
from instructions.  Chandler doesn't like them being here.

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

12 years agoAdd a somewhat hacky heuristic to do something different from whole-loop
Chandler Carruth [Mon, 16 Apr 2012 13:33:36 +0000 (13:33 +0000)]
Add a somewhat hacky heuristic to do something different from whole-loop
rotation. When there is a loop backedge which is an unconditional
branch, we will end up with a branch somewhere no matter what. Try
placing this backedge in a fallthrough position above the loop header as
that will definitely remove at least one branch from the loop iteration,
where whole loop rotation may not.

I haven't seen any benchmarks where this is important but loop-blocks.ll
tests for it, and so this will be covered when I flip the default.

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

12 years agoAdd convenience methods to MDBuilder for attaching metadata to instructions,
Duncan Sands [Mon, 16 Apr 2012 13:21:26 +0000 (13:21 +0000)]
Add convenience methods to MDBuilder for attaching metadata to instructions,
and retrieving it from instructions.  I don't have a use for this but is seems
logical for it to exist.  While there, remove some 'const' markings from methods
which are in fact 'const' in practice, but aren't logically 'const'.

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

12 years agoFix style violation in BBVectorize (pointed out by Bill Wendling)
Hal Finkel [Mon, 16 Apr 2012 12:39:17 +0000 (12:39 +0000)]
Fix style violation in BBVectorize (pointed out by Bill Wendling)

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

12 years agoAdd -disassemble support for -show-inst and -show-encode capability llvm-mc. Also...
Richard Barton [Mon, 16 Apr 2012 11:32:10 +0000 (11:32 +0000)]
Add -disassemble support for -show-inst and -show-encode capability llvm-mc. Also refactor so all MC paraphernalia are created once for all uses as much as possible.

The test change is to account for the fact that the default disassembler behaviour has changed with regards to specifying the assembly syntax to use.

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

12 years agoRemove lto_codegen_set_whole_program_optimization. It is a work in progress,
Rafael Espindola [Mon, 16 Apr 2012 10:58:38 +0000 (10:58 +0000)]
Remove lto_codegen_set_whole_program_optimization. It is a work in progress,
so we don't want it to show up in the stable 3.1 interface.

While at it, add a comment about why LTOCodeGenerator manually creates the
internalize pass.

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

12 years agoTweak the loop rotation logic to check whether the loop is naturally
Chandler Carruth [Mon, 16 Apr 2012 09:31:23 +0000 (09:31 +0000)]
Tweak the loop rotation logic to check whether the loop is naturally
laid out in a form with a fallthrough into the header and a fallthrough
out of the bottom. In that case, leave the loop alone because any
rotation will introduce unnecessary branches. If either side looks like
it will require an explicit branch, then the rotation won't add any, do
it to ensure the branch occurs outside of the loop (if possible) and
maximize the benefit of the fallthrough in the bottom.

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

12 years agoReapply 'Add reverseColor to raw_ostream'.
Benjamin Kramer [Mon, 16 Apr 2012 08:56:50 +0000 (08:56 +0000)]
Reapply 'Add reverseColor to raw_ostream'.

To be used in printing unprintable source in clang diagnostics.
Patch by Seth Cantrell, with a minor fix for mingw by me.

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

12 years agoDocumentation fixes to LLVMBuild.html [PR 11563]
Eli Bendersky [Mon, 16 Apr 2012 08:42:55 +0000 (08:42 +0000)]
Documentation fixes to LLVMBuild.html [PR 11563]

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

12 years agoRevert r154800 which breaks windows builders.
Argyrios Kyrtzidis [Mon, 16 Apr 2012 07:59:39 +0000 (07:59 +0000)]
Revert r154800 which breaks windows builders.

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

12 years agoReplace vpermd/vpermps intrinic patterns with custom lowering to target specific...
Craig Topper [Mon, 16 Apr 2012 07:13:00 +0000 (07:13 +0000)]
Replace vpermd/vpermps intrinic patterns with custom lowering to target specific nodes.

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

12 years agoAdd reverseColor to raw_ostream.
Argyrios Kyrtzidis [Mon, 16 Apr 2012 07:07:38 +0000 (07:07 +0000)]
Add reverseColor to raw_ostream.

To be used in printing unprintable source in clang diagnostics.
Patch by Seth Cantrell!

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

12 years agoChange type profile for vpermv back to using operand type for the mask argument to...
Craig Topper [Mon, 16 Apr 2012 06:43:40 +0000 (06:43 +0000)]
Change type profile for vpermv back to using operand type for the mask argument to match intrinsic behavior. Add a bitcast to the lowering code to convert mask from v8i32 to v8f32 for vpermps.

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

12 years agoFlip the arguments when converting vpermd/vpermps intrinsics into instructions. The...
Craig Topper [Mon, 16 Apr 2012 06:26:15 +0000 (06:26 +0000)]
Flip the arguments when converting vpermd/vpermps intrinsics into instructions. The intrinsic has the mask as the last operand, but the instruction has it as the second.

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

12 years agoAdd credit and release notes for r150307. By Kai Nacke.
Bill Wendling [Mon, 16 Apr 2012 05:24:52 +0000 (05:24 +0000)]
Add credit and release notes for r150307. By Kai Nacke.

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

12 years agoAdd a Fixme.
Bill Wendling [Mon, 16 Apr 2012 04:23:52 +0000 (04:23 +0000)]
Add a Fixme.

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

12 years agoadd configure flag --with-default-sysroot
Sebastian Pop [Mon, 16 Apr 2012 04:11:45 +0000 (04:11 +0000)]
add configure flag --with-default-sysroot

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

12 years agoSay something about -vectorize in the release notes.
Hal Finkel [Mon, 16 Apr 2012 03:49:43 +0000 (03:49 +0000)]
Say something about -vectorize in the release notes.

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

12 years agoSimplify checking for pointer types in BBVectorize (this change was suggested by...
Hal Finkel [Mon, 16 Apr 2012 03:49:42 +0000 (03:49 +0000)]
Simplify checking for pointer types in BBVectorize (this change was suggested by Duncan).

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

12 years agoRemove dead SD nodes after the combining pass. Fixes PR12201.
Hal Finkel [Mon, 16 Apr 2012 03:33:22 +0000 (03:33 +0000)]
Remove dead SD nodes after the combining pass. Fixes PR12201.

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

12 years agoRewrite how machine block placement handles loop rotation.
Chandler Carruth [Mon, 16 Apr 2012 01:12:56 +0000 (01:12 +0000)]
Rewrite how machine block placement handles loop rotation.

This is a complex change that resulted from a great deal of
experimentation with several different benchmarks. The one which proved
the most useful is included as a test case, but I don't know that it
captures all of the relevant changes, as I didn't have specific
regression tests for each, they were more the result of reasoning about
what the old algorithm would possibly do wrong. I'm also failing at the
moment to craft more targeted regression tests for these changes, if
anyone has ideas, it would be welcome.

The first big thing broken with the old algorithm is the idea that we
can take a basic block which has a loop-exiting successor and a looping
successor and use the looping successor as the layout top in order to
get that particular block to be the bottom of the loop after layout.
This happens to work in many cases, but not in all.

The second big thing broken was that we didn't try to select the exit
which fell into the nearest enclosing loop (to which we exit at all). As
a consequence, even if the rotation worked perfectly, it would result in
one of two bad layouts. Either the bottom of the loop would get
fallthrough, skipping across a nearer enclosing loop and thereby making
it discontiguous, or it would be forced to take an explicit jump over
the nearest enclosing loop to earch its successor. The point of the
rotation is to get fallthrough, so we need it to fallthrough to the
nearest loop it can.

The fix to the first issue is to actually layout the loop from the loop
header, and then rotate the loop such that the correct exiting edge can
be a fallthrough edge. This is actually much easier than I anticipated
because we can handle all the hard parts of finding a viable rotation
before we do the layout. We just store that, and then rotate after
layout is finished. No inner loops get split across the post-rotation
backedge because we check for them when selecting the rotation.

That fix exposed a latent problem with our exitting block selection --
we should allow the backedge to point into the middle of some inner-loop
chain as there is no real penalty to it, the whole point is that it
*won't* be a fallthrough edge. This may have blocked the rotation at all
in some cases, I have no idea and no test case as I've never seen it in
practice, it was just noticed by inspection.

Finally, all of these fixes, and studying the loops they produce,
highlighted another problem: in rotating loops like this, we sometimes
fail to align the destination of these backwards jumping edges. Fix this
by actually walking the backwards edges rather than relying on loopinfo.

This fixes regressions on heapsort if block placement is enabled as well
as lots of other cases where the previous logic would introduce an
abundance of unnecessary branches into the execution.

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

12 years agoMerge vpermps/vpermd and vpermpd/vpermq SD nodes.
Craig Topper [Mon, 16 Apr 2012 00:41:45 +0000 (00:41 +0000)]
Merge vpermps/vpermd and vpermpd/vpermq SD nodes.

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

12 years agoFix SDTypeProfile for vpermps. The mask operand should be v8i32.
Craig Topper [Mon, 16 Apr 2012 00:12:20 +0000 (00:12 +0000)]
Fix SDTypeProfile for vpermps. The mask operand should be v8i32.

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

12 years agoSpacing fixes and 80 column fixes. Use 0 instead of 0x80 for undef indices in vpermps...
Craig Topper [Sun, 15 Apr 2012 23:48:57 +0000 (23:48 +0000)]
Spacing fixes and 80 column fixes. Use 0 instead of 0x80 for undef indices in vpermps/vpermd. Hardware only looks at lower 3-bits.

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

12 years agoRemove AVX2 vpermq and vpermpd intrinsics. These can now be handled with normal shuff...
Craig Topper [Sun, 15 Apr 2012 22:43:31 +0000 (22:43 +0000)]
Remove AVX2 vpermq and vpermpd intrinsics. These can now be handled with normal shuffle vectors.

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

12 years agoMake member variables of AsmToken private. Remove unnecessary forward declarations...
Craig Topper [Sun, 15 Apr 2012 22:00:22 +0000 (22:00 +0000)]
Make member variables of AsmToken private. Remove unnecessary forward declarations. Remove an unnecessary include.

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

12 years agoFix class name.
Jakub Staszak [Sun, 15 Apr 2012 20:22:36 +0000 (20:22 +0000)]
Fix class name.

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

12 years agoDo not convert between fp128 <-> ppc_fp128 since there is no legal cast conversion...
Nadav Rotem [Sun, 15 Apr 2012 20:17:14 +0000 (20:17 +0000)]
Do not convert between fp128 <-> ppc_fp128 since there is no legal cast conversion between the two.

Patch by nobled <nobled@dreamwidth.org>

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

12 years agoFix filename and register numbers.
Jakub Staszak [Sun, 15 Apr 2012 20:13:47 +0000 (20:13 +0000)]
Fix filename and register numbers.

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

12 years agoFix PR12529. The Vxx family of instructions are only supported by AVX.
Nadav Rotem [Sun, 15 Apr 2012 19:36:44 +0000 (19:36 +0000)]
Fix PR12529.  The Vxx family of instructions are only supported by AVX.
Use non-vex instructions for SSE4.

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

12 years agoAdd the MDBuilder helper class for conveniently creating metadata.
Duncan Sands [Sun, 15 Apr 2012 18:03:49 +0000 (18:03 +0000)]
Add the MDBuilder helper class for conveniently creating metadata.

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

12 years agoWire up support for diagnostic ranges in the ARMAsmParser.
Benjamin Kramer [Sun, 15 Apr 2012 17:04:27 +0000 (17:04 +0000)]
Wire up support for diagnostic ranges in the ARMAsmParser.

As an example, attach range info to the "invalid instruction" message:

$ clang -arch arm -c asm.c
asm.c:2:11: error: invalid instruction
  __asm__("foo r0");
          ^
<inline asm>:1:2: note: instantiated into assembly here
        foo r0
        ^~~

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

12 years agoWhen emulating vselect using OR/AND/XOR make sure to bitcast the result back to the...
Nadav Rotem [Sun, 15 Apr 2012 15:08:09 +0000 (15:08 +0000)]
When emulating vselect using OR/AND/XOR make sure to bitcast the result back to the original type.

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

12 years agoAdded VPERM optimization for AVX2 shuffles
Elena Demikhovsky [Sun, 15 Apr 2012 11:18:59 +0000 (11:18 +0000)]
Added VPERM optimization for AVX2 shuffles

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

12 years agoHexagonCopyToCombine.cpp: Silence two warnings, -Wunused-variable, with -Asserts.
NAKAMURA Takumi [Sun, 15 Apr 2012 05:33:43 +0000 (05:33 +0000)]
HexagonCopyToCombine.cpp: Silence two warnings, -Wunused-variable, with -Asserts.

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

12 years agoTarget/Hexagon: Tweak to fix msvc build.
NAKAMURA Takumi [Sun, 15 Apr 2012 05:09:09 +0000 (05:09 +0000)]
Target/Hexagon: Tweak to fix msvc build.

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

12 years agoRemove trailing whitespace.
Anshuman Dasgupta [Sat, 14 Apr 2012 20:59:13 +0000 (20:59 +0000)]
Remove trailing whitespace.

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

12 years agoAdd VLIW packetizer to ReleaseNotes.html and CREDITS.TXT. Committing patch
Anshuman Dasgupta [Sat, 14 Apr 2012 20:57:13 +0000 (20:57 +0000)]
Add VLIW packetizer to ReleaseNotes.html and CREDITS.TXT. Committing patch
by Sundeep Kushwaha.

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

12 years agoAdd the loop unrolling info to ReleaseNotes.html and CREDITS.TXT.
Brendon Cahoon [Sat, 14 Apr 2012 16:54:12 +0000 (16:54 +0000)]
Add the loop unrolling info to ReleaseNotes.html and CREDITS.TXT.

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

12 years agoThere is no need for setIsExact to be public. Make it private.
Duncan Sands [Sat, 14 Apr 2012 15:43:22 +0000 (15:43 +0000)]
There is no need for setIsExact to be public.  Make it private.

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

12 years agoRename "fpaccuracy" metadata to the more generic "fpmath". That's because I'm
Duncan Sands [Sat, 14 Apr 2012 12:36:06 +0000 (12:36 +0000)]
Rename "fpaccuracy" metadata to the more generic "fpmath".  That's because I'm
thinking of generalizing it to be able to specify other freedoms beyond accuracy
(such as that NaN's don't have to be respected).  I'd like the 3.1 release (the
first one with this metadata) to have the more generic name already rather than
having to auto-upgrade it in 3.2.

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

12 years agoMake StringMap's copy ctor non-explicit.
Benjamin Kramer [Sat, 14 Apr 2012 09:04:57 +0000 (09:04 +0000)]
Make StringMap's copy ctor non-explicit.

Without this gcc doesn't allow us to put a StringMap into a
std::map. Works with clang though.

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

12 years agoFix an error in BBVectorize important for vectorizing pointer types.
Hal Finkel [Sat, 14 Apr 2012 07:32:50 +0000 (07:32 +0000)]
Fix an error in BBVectorize important for vectorizing pointer types.

When vectorizing pointer types it is important to realize that potential
pairs cannot be connected via the address pointer argument of a load or store.
This is because even after vectorization, the address is still a scalar because
the address of the higher half of the pair is implicit from the address of the
lower half (it need not be, and should not be, explicitly computed).

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

12 years agoEnhance BBVectorize to more-properly handle pointer values and vectorize GEPs.
Hal Finkel [Sat, 14 Apr 2012 07:32:43 +0000 (07:32 +0000)]
Enhance BBVectorize to more-properly handle pointer values and vectorize GEPs.

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

12 years agomisched: Added CanHandleTerminators.
Andrew Trick [Fri, 13 Apr 2012 23:29:54 +0000 (23:29 +0000)]
misched: Added CanHandleTerminators.

This is a special flag for targets that really want their block
terminators in the DAG. The default scheduler cannot handle this
correctly, so it becomes the specialized scheduler's responsibility to
schedule terminators.

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

12 years agoRemove old code to strip out unwanted PPC slices for Apple llvmCore.
Bob Wilson [Fri, 13 Apr 2012 22:58:53 +0000 (22:58 +0000)]
Remove old code to strip out unwanted PPC slices for Apple llvmCore.

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

12 years agoFix X86 codegen for 'atomicrmw nand' to generate *x = ~(*x & y), not *x = ~*x & y.
Richard Smith [Fri, 13 Apr 2012 22:47:00 +0000 (22:47 +0000)]
Fix X86 codegen for 'atomicrmw nand' to generate *x = ~(*x & y), not *x = ~*x & y.

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

12 years agoRemove iostream from New Value Jump.
Sirish Pande [Fri, 13 Apr 2012 21:01:35 +0000 (21:01 +0000)]
Remove iostream from New Value Jump.

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

12 years agoAdd support to BBVectorize for vectorizing selects.
Hal Finkel [Fri, 13 Apr 2012 20:45:45 +0000 (20:45 +0000)]
Add support to BBVectorize for vectorizing selects.

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

12 years agoAdd support for Hexagon Architectural feature, New Value Jump.
Sirish Pande [Fri, 13 Apr 2012 20:22:31 +0000 (20:22 +0000)]
Add support for Hexagon Architectural feature, New Value Jump.

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

12 years agoPass to replace tranfer/copy instructions into combine instruction where possible.
Sirish Pande [Fri, 13 Apr 2012 20:22:19 +0000 (20:22 +0000)]
Pass to replace tranfer/copy instructions into combine instruction where possible.

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

12 years agoReduce malloc traffic in DwarfAccelTable
Benjamin Kramer [Fri, 13 Apr 2012 20:06:17 +0000 (20:06 +0000)]
Reduce malloc traffic in DwarfAccelTable

- Don't copy offsets into HashData, the underlying vector won't change once the table is finalized.
- Allocate HashData and HashDataContents in a BumpPtrAllocator.
- Allocate string map entries in the same allocator.
- Random cleanups.

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

12 years agoSupport for Hexagon backend.
Tony Linthicum [Fri, 13 Apr 2012 19:09:44 +0000 (19:09 +0000)]
Support for Hexagon backend.

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

12 years agoSupport for Hexagon backend.
Tony Linthicum [Fri, 13 Apr 2012 19:09:18 +0000 (19:09 +0000)]
Support for Hexagon backend.

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