lldb.git
10 years agoAdd the capability of supplying the pre/post-flight functions to the test suite such...
Johnny Chen [Mon, 16 Apr 2012 18:55:15 +0000 (18:55 +0000)]
Add the capability of supplying the pre/post-flight functions to the test suite such that
the pre-flight code gets executed during setUp() after the debugger instance is available
and the post-flight code gets executed during tearDown() after the debugger instance has
done killing the inferior and deleting all the target programs.

Example:

[11:32:48] johnny:/Volumes/data/lldb/svn/ToT/test $ ./dotest.py -A x86_64 -v -c ../examples/test/.lldb-pre-post-flight  functionalities/watchpoint/hello_watchpoint
config: {'pre_flight': <function pre_flight at 0x1098541b8>, 'post_flight': <function post_flight at 0x109854230>}
LLDB build dir: /Volumes/data/lldb/svn/ToT/build/Debug
LLDB-139
Path: /Volumes/data/lldb/svn/ToT
URL: https://johnny@llvm.org/svn/llvm-project/lldb/trunk
Repository Root: https://johnny@llvm.org/svn/llvm-project
Repository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8
Revision: 154753
Node Kind: directory
Schedule: normal
Last Changed Author: gclayton
Last Changed Rev: 154730
Last Changed Date: 2012-04-13 18:42:46 -0700 (Fri, 13 Apr 2012)

lldb.pre_flight: def pre_flight(test):
    __import__("lldb")
    __import__("lldbtest")
    print "\nRunning pre-flight function:"
    print "for test case:", test

lldb.post_flight: def post_flight(test):
    __import__("lldb")
    __import__("lldbtest")
    print "\nRunning post-flight function:"
    print "for test case:", test

Session logs for test failures/errors/unexpected successes will go into directory '2012-04-16-11_34_08'
Command invoked: python ./dotest.py -A x86_64 -v -c ../examples/test/.lldb-pre-post-flight functionalities/watchpoint/hello_watchpoint
compilers=['clang']

Configuration: arch=x86_64 compiler=clang
----------------------------------------------------------------------
Collected 2 tests

1: test_hello_watchpoint_with_dsym_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase)
   Test a simple sequence of watchpoint creation and watchpoint hit. ...
Running pre-flight function:
for test case: test_hello_watchpoint_with_dsym_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase)

Running post-flight function:
for test case: test_hello_watchpoint_with_dsym_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase)
ok
2: test_hello_watchpoint_with_dwarf_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase)
   Test a simple sequence of watchpoint creation and watchpoint hit. ...
Running pre-flight function:
for test case: test_hello_watchpoint_with_dwarf_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase)

Running post-flight function:
for test case: test_hello_watchpoint_with_dwarf_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase)
ok

----------------------------------------------------------------------
Ran 2 tests in 1.584s

OK

llvm-svn: 154847

10 years agoRevert r154749 for now at John McCall's request.
Rafael Espindola [Mon, 16 Apr 2012 18:46:26 +0000 (18:46 +0000)]
Revert r154749 for now at John McCall's request.

llvm-svn: 154846

10 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.

llvm-svn: 154845

10 years agoImplement the last part of C++ [class.mem]p2, delaying the parsing of
Douglas Gregor [Mon, 16 Apr 2012 18:27:27 +0000 (18:27 +0000)]
Implement the last part of C++ [class.mem]p2, delaying the parsing of
exception specifications on member functions until after the closing
'}' for the containing class. This allows, for example, a member
function to throw an instance of its own class. Fixes PR12564 and a
fairly embarassing oversight in our C++98/03 support.

llvm-svn: 154844

10 years agoUse ordering and the explicit visibility bit instead of modifying
Rafael Espindola [Mon, 16 Apr 2012 18:25:01 +0000 (18:25 +0000)]
Use ordering and the explicit visibility bit instead of modifying
ConsiderGlobalVisibility. No functionality change.

llvm-svn: 154843

10 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.

llvm-svn: 154842

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

llvm-svn: 154841

10 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

llvm-svn: 154840

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

llvm-svn: 154839

10 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.

llvm-svn: 154838

10 years agoReadd lost "undef BUILTIN" to fix the build.
David Blaikie [Mon, 16 Apr 2012 17:57:39 +0000 (17:57 +0000)]
Readd lost "undef BUILTIN" to fix the build.

llvm-svn: 154837

10 years agoGenerate fpmath metadata when -ffast-math. Note that no optimizations are hooked
Duncan Sands [Mon, 16 Apr 2012 17:24:31 +0000 (17:24 +0000)]
Generate fpmath metadata when -ffast-math. Note that no optimizations are hooked
up to this yet.

llvm-svn: 154835

10 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'

llvm-svn: 154834

10 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

llvm-svn: 154833

10 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

llvm-svn: 154832

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

llvm-svn: 154831

10 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.

llvm-svn: 154830

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

llvm-svn: 154829

10 years agoHexagon V5(Floating Point) support.
Sirish Pande [Mon, 16 Apr 2012 17:04:05 +0000 (17:04 +0000)]
Hexagon V5(Floating Point) support.

llvm-svn: 154828

10 years agoRemove unused method.
Rafael Espindola [Mon, 16 Apr 2012 16:41:02 +0000 (16:41 +0000)]
Remove unused method.

llvm-svn: 154827

10 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.

llvm-svn: 154825

10 years agoAdjust for LLVM name tweaks requested by Chandler.
Duncan Sands [Mon, 16 Apr 2012 16:29:47 +0000 (16:29 +0000)]
Adjust for LLVM name tweaks requested by Chandler.

llvm-svn: 154824

10 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.

llvm-svn: 154822

10 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.

llvm-svn: 154816

10 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.

llvm-svn: 154815

10 years agoAdd another constructor to LVFlags and use it to simplify the code a bit.
Rafael Espindola [Mon, 16 Apr 2012 13:44:41 +0000 (13:44 +0000)]
Add another constructor to LVFlags and use it to simplify the code a bit.

llvm-svn: 154814

10 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.

llvm-svn: 154813

10 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.

llvm-svn: 154812

10 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'.

llvm-svn: 154811

10 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)

llvm-svn: 154810

10 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.

llvm-svn: 154809

10 years agoScheduleOpt: Fix crash with -enable-polly-vector
Tobias Grosser [Mon, 16 Apr 2012 11:06:06 +0000 (11:06 +0000)]
ScheduleOpt: Fix crash with -enable-polly-vector

llvm-svn: 154808

10 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.

llvm-svn: 154807

10 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.

llvm-svn: 154806

10 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.

llvm-svn: 154805

10 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]

llvm-svn: 154804

10 years agoPartially revert r154390 (http://llvm.org/viewvc/llvm-project?view=rev&revision=154390)
Alexander Potapenko [Mon, 16 Apr 2012 08:33:01 +0000 (08:33 +0000)]
Partially revert r154390 (llvm.org/viewvc/llvm-project?view=rev&revision=154390)
Until we work out the solution for http://code.google.com/p/address-sanitizer/issues/detail?id=65 we'd better not allow
the clients to override AddressSanitizer's signal handler.

The second part of r154390 (removing the sighandler-related tests) is not reverted, because those tests were broken
and didn't test anything.

llvm-svn: 154803

10 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.

llvm-svn: 154802

10 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.

llvm-svn: 154801

10 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!

llvm-svn: 154800

10 years agoImplement C++11 [expr.prim.general]p3, which permits the use of 'this'
Douglas Gregor [Mon, 16 Apr 2012 07:05:22 +0000 (07:05 +0000)]
Implement C++11 [expr.prim.general]p3, which permits the use of 'this'
in the declaration of a non-static member function after the
(optional) cv-qualifier-seq, which in practice means in the exception
specification and late-specified return type.

The new scheme here used to manage 'this' outside of a member function
scope is more general than the Scope-based mechanism previously used
for non-static data member initializers and late-parsesd attributes,
because it can also handle the cv-qualifiers on the member
function. Note, however, that a separate pass is required for static
member functions to determine whether 'this' was used, because we
might not know that we have a static function until after declaration
matching.

Finally, this introduces name mangling for 'this' and for the implicit
'this', which is intended to match GCC's mangling. Independent
verification for the new mangling test case would be appreciated.

Fixes PR10036 and PR12450.

llvm-svn: 154799

10 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.

llvm-svn: 154798

10 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.

llvm-svn: 154797

10 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.

llvm-svn: 154796

10 years agoAdd note to hacking.html that running the test harness directly from the command...
Eli Friedman [Mon, 16 Apr 2012 05:04:45 +0000 (05:04 +0000)]
Add note to hacking.html that running the test harness directly from the command-line requires making sure the relevant files are generated first.  Patch by Matt Fowles, with some minor modifications.

llvm-svn: 154795

10 years agoMake constant evaluation for pointer comparisons work correctly for some uncommon...
Eli Friedman [Mon, 16 Apr 2012 04:30:08 +0000 (04:30 +0000)]
Make constant evaluation for pointer comparisons work correctly for some uncommon cases.  <rdar://problem/10962435>.

llvm-svn: 154794

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

llvm-svn: 154793

10 years agouse DEFAULT_SYSROOT
Sebastian Pop [Mon, 16 Apr 2012 04:16:43 +0000 (04:16 +0000)]
use DEFAULT_SYSROOT

llvm-svn: 154792

10 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

llvm-svn: 154791

10 years agoThe result of the Microsoft __uuidof operator must be considered a global lvalue...
Francois Pichet [Mon, 16 Apr 2012 04:08:35 +0000 (04:08 +0000)]
The result of the Microsoft __uuidof operator must be considered a global lvalue during constant expression evaluation.
Otherwise we would get this error in C++11 mode (because of a recent change):
   error: non-type template argument of type 'const _GUID *' is not a constant expression

For code like:
template <const GUID* g = &__uuidof(struct_with_uuid)>
class COM_CLASS { };

llvm-svn: 154790

10 years agoPropagate alignment on lvalues through EmitLValueForField. PR12395.
Eli Friedman [Mon, 16 Apr 2012 03:54:45 +0000 (03:54 +0000)]
Propagate alignment on lvalues through EmitLValueForField.  PR12395.

llvm-svn: 154789

10 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.

llvm-svn: 154788

10 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).

llvm-svn: 154787

10 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.

llvm-svn: 154786

10 years agoAdd 'env' in hopes of making this test pass on Windows.
Nick Lewycky [Mon, 16 Apr 2012 03:22:35 +0000 (03:22 +0000)]
Add 'env' in hopes of making this test pass on Windows.

llvm-svn: 154785

10 years agoImplement the all_lookups_iterator for PCH as a follow-up to r153970. This
Nick Lewycky [Mon, 16 Apr 2012 02:51:46 +0000 (02:51 +0000)]
Implement the all_lookups_iterator for PCH as a follow-up to r153970. This
includes a patch from Matthias Kleine with a regression testcase!

Adds a new iterator 'data_iterator' to OnDiskHashTable which doesn't try to
reconstruct the external_key from the internal_key, which is useful for traits
that don't store enough information to do that mapping in their key. Also
deletes the 'item_iterator' from OnDiskHashTable as dead code.

llvm-svn: 154784

10 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.

llvm-svn: 154783

10 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.

llvm-svn: 154782

10 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.

llvm-svn: 154781

10 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.

llvm-svn: 154780

10 years agoLike for LLVM / shlib, we also provide a SONAME to libclang.so
Sylvestre Ledru [Sun, 15 Apr 2012 23:17:25 +0000 (23:17 +0000)]
Like for LLVM / shlib, we also provide a SONAME to libclang.so

llvm-svn: 154779

10 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.

llvm-svn: 154778

10 years agoChange _mm256_permute4x64_epi64 and _mm256_permute4x64_pd to use builtin_shufflevecto...
Craig Topper [Sun, 15 Apr 2012 22:18:10 +0000 (22:18 +0000)]
Change _mm256_permute4x64_epi64 and _mm256_permute4x64_pd to use builtin_shufflevector instead of specific builtins. Old builtins will be removed from llvm now that vpermq/vpermpd are supported by shuffle lowering code.

llvm-svn: 154777

10 years agoFix tests that weren't actually verifying anything.
David Blaikie [Sun, 15 Apr 2012 22:09:44 +0000 (22:09 +0000)]
Fix tests that weren't actually verifying anything.

Passing -verify to clang without -cc1 or -Xclang silently passes (with a
printed warning, but lit doesn't care about that). This change adds -cc1 or,
as is necessary in one case, -Xclang to fix this so that these tests are
actually verifying as intended.

I'd like to change the driver so this kind of mistake could not be made, but
I'm not entirely sure how. Further, since the driver only warns about unknown
flags in general, we could have similar bugs with a misspellings of arguments
that would be nice to find.

llvm-svn: 154776

10 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.

llvm-svn: 154775

10 years agoCorrect indentation
David Blaikie [Sun, 15 Apr 2012 21:22:10 +0000 (21:22 +0000)]
Correct indentation

llvm-svn: 154774

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

llvm-svn: 154773

10 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>

llvm-svn: 154772

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

llvm-svn: 154771

10 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.

llvm-svn: 154770

10 years ago[clang.py] Implement TypeKind.spelling
Gregory Szorc [Sun, 15 Apr 2012 18:51:10 +0000 (18:51 +0000)]
[clang.py] Implement TypeKind.spelling

llvm-svn: 154769

10 years agoUse MDBuilder to help with metadata creation.
Duncan Sands [Sun, 15 Apr 2012 18:04:54 +0000 (18:04 +0000)]
Use MDBuilder to help with metadata creation.

llvm-svn: 154767

10 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.

llvm-svn: 154766

10 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
        ^~~

llvm-svn: 154765

10 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.

llvm-svn: 154764

10 years agoUse forward declarations for ASTDeclContextNameLookupTable and add a missing delete.
Benjamin Kramer [Sun, 15 Apr 2012 12:36:49 +0000 (12:36 +0000)]
Use forward declarations for ASTDeclContextNameLookupTable and add a missing delete.

It would be nice to use OwningPtr here, but DeclContextInfo is stored in a DenseMap.

llvm-svn: 154763

10 years agoActually, this tree isn't necessarily binary.
Benjamin Kramer [Sun, 15 Apr 2012 11:35:18 +0000 (11:35 +0000)]
Actually, this tree isn't necessarily binary.

llvm-svn: 154762

10 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

llvm-svn: 154761

10 years agoRecursively delete rewrite rope nodes when tearing down the tree.
Benjamin Kramer [Sun, 15 Apr 2012 11:09:40 +0000 (11:09 +0000)]
Recursively delete rewrite rope nodes when tearing down the tree.

llvm-svn: 154760

10 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.

llvm-svn: 154759

10 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.

llvm-svn: 154758

10 years ago%clang -cc1 -> %clang_cc1
Seth Cantrell [Sun, 15 Apr 2012 04:41:49 +0000 (04:41 +0000)]
%clang -cc1 -> %clang_cc1

llvm-svn: 154757

10 years agoPR12226: don't generate wrong code if a braced string literal is used to
Richard Smith [Sun, 15 Apr 2012 02:50:59 +0000 (02:50 +0000)]
PR12226: don't generate wrong code if a braced string literal is used to
initialize an array of unsigned char. Outside C++11 mode, this bug was benign,
and just resulted in us emitting a constant which was double the required
length, padded with 0s. In C++11, it resulted in us generating an array whose
first element was something like  i8 ptrtoint ([n x i8]* @str to i8).

llvm-svn: 154756

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

llvm-svn: 154755

10 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.

llvm-svn: 154754

10 years agoobjective-c modern translator: Make metadata
Fariborz Jahanian [Sat, 14 Apr 2012 17:13:08 +0000 (17:13 +0000)]
objective-c modern translator: Make metadata
definition for protocols static. // rdar://11248048

llvm-svn: 154753

10 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.

llvm-svn: 154752

10 years ago[analyzer] Add .cxx and .txx as known file extensions to ccc-analyzer.
Anna Zaks [Sat, 14 Apr 2012 16:30:00 +0000 (16:30 +0000)]
[analyzer]  Add .cxx and .txx as known file extensions to ccc-analyzer.

A patch by Sean McBride.

llvm-svn: 154751

10 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.

llvm-svn: 154750

10 years agoConsider visibility attributes last, so that they take precedence.
Rafael Espindola [Sat, 14 Apr 2012 15:21:19 +0000 (15:21 +0000)]
Consider visibility attributes last, so that they take precedence.
I am working on a cleaner fix, but this gets the case in PR12552 passing.

llvm-svn: 154749

10 years agoReplace manual delete[] with OwningArrayPtr.
Benjamin Kramer [Sat, 14 Apr 2012 14:13:43 +0000 (14:13 +0000)]
Replace manual delete[] with OwningArrayPtr.

llvm-svn: 154748

10 years agoDon't leak vtable thunks.
Benjamin Kramer [Sat, 14 Apr 2012 13:21:23 +0000 (13:21 +0000)]
Don't leak vtable thunks.

llvm-svn: 154747

10 years agoDelete late parsed attributes instead of leaking them.
Benjamin Kramer [Sat, 14 Apr 2012 12:44:47 +0000 (12:44 +0000)]
Delete late parsed attributes instead of leaking them.

llvm-svn: 154746

10 years agoRename "fpaccuracy" metadata to the more generic "fpmath". That's because I'm
Duncan Sands [Sat, 14 Apr 2012 12:37:26 +0000 (12:37 +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.

llvm-svn: 154745

10 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.

llvm-svn: 154744

10 years agoParser: Don't manage TemplateAnnotationIds in a delayed cleanup pool.
Benjamin Kramer [Sat, 14 Apr 2012 12:14:03 +0000 (12:14 +0000)]
Parser: Don't manage TemplateAnnotationIds in a delayed cleanup pool.

Instead, make it the allocation function's responsibility to add them
to a list and clear it when a top-level decl is finished.

This plugs leakage of TemplateAnnotationIds. DelayedCleanupPool is
ugly and unused, remove it.

llvm-svn: 154743

10 years agoASTUnit: Don't clone the new DiagnosticConsumer, causing it to get leaked.
Benjamin Kramer [Sat, 14 Apr 2012 09:11:56 +0000 (09:11 +0000)]
ASTUnit: Don't clone the new DiagnosticConsumer, causing it to get leaked.

llvm-svn: 154739

10 years agoc-index-test: dispose spelling string after use.
Benjamin Kramer [Sat, 14 Apr 2012 09:11:51 +0000 (09:11 +0000)]
c-index-test: dispose spelling string after use.

llvm-svn: 154738

10 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.

llvm-svn: 154737

10 years agoDirectly store TypoResultsMaps in the TypoEditDistanceMap, getting rid of manual...
Benjamin Kramer [Sat, 14 Apr 2012 08:26:28 +0000 (08:26 +0000)]
Directly store TypoResultsMaps in the TypoEditDistanceMap, getting rid of manual deletion.

llvm-svn: 154736