platform/upstream/llvm.git
11 years agoFix PR16547.
Rafael Espindola [Fri, 5 Jul 2013 15:05:40 +0000 (15:05 +0000)]
Fix PR16547.

We should not be asking unique_file to prepend the system temporary directory
when creating the html report. Unfortunately I don't think we can test this
with the current infrastructure since unique_file ignores MakeAbsolute if the
directory is already absolute and the paths provided by lit are.

I will take a quick look at making this api a bit less error prone.

llvm-svn: 185707

11 years ago[sanitizer] Fix mac build.
Evgeniy Stepanov [Fri, 5 Jul 2013 15:04:56 +0000 (15:04 +0000)]
[sanitizer] Fix mac build.

llvm-svn: 185706

11 years ago[SystemZ] Remove no-op MVCs
Richard Sandiford [Fri, 5 Jul 2013 14:38:48 +0000 (14:38 +0000)]
[SystemZ] Remove no-op MVCs

The stack coloring pass has code to delete stores and loads that become
trivially dead after coloring.  Extend it to cope with single instructions
that copy from one frame index to another.

The testcase happens to show an example of this kicking in at the moment.
It did occur in Real Code too though.

llvm-svn: 185705

11 years ago[SystemZ] Remove redundant frame MMOs
Richard Sandiford [Fri, 5 Jul 2013 14:31:24 +0000 (14:31 +0000)]
[SystemZ] Remove redundant frame MMOs

This fixes foldMemoryOperandImpl() so that it doesn't create duplicated
frame MMOs.  I hadn't realized when writing r185434 that it was the caller's
responsibility to add these.

No behavioural change intended.

llvm-svn: 185704

11 years agoFix double renaming bug in stack coloring pass
Richard Sandiford [Fri, 5 Jul 2013 14:24:47 +0000 (14:24 +0000)]
Fix double renaming bug in stack coloring pass

The stack coloring pass renumbered frame indexes with a loop of the form:

  for each frame index FI
    for each instruction I that uses FI
      for each use of FI in I
        rename FI to FI'

This caused problems if an instruction used two frame indexes F0 and F1
and if F0 was renamed to F1 and F1 to F2.  The first time we visited the
instruction we changed F0 to F1, then we changed both F1s to F2.

In other words, the problem was that SSRefs recorded which instructions
used an FI, but not which MachineOperands and MachineMemOperands within
that instruction used it.

This is easily fixed for MachineOperands by walking the instructions
once and processing each operand in turn.  There's already a loop to
do that for dead store elimination, so it seemed more efficient to
fuse the two at the block level.

MachineMemOperands are more tricky because they can be shared between
instructions.  The patch handles them by making SSRefs an array of
MachineMemOperands rather than an array of MachineInstrs.  We might end
up processing the same MachineMemOperand twice, but that's OK because
we always know from the SSRefs index what the original frame index was.

llvm-svn: 185703

11 years agoWe don't need to check for windows' error codes in here.
Rafael Espindola [Fri, 5 Jul 2013 14:15:24 +0000 (14:15 +0000)]
We don't need to check for windows' error codes in here.

The operator== calls equivalent which calls default_error_condition which
handles windows to posix conversion.

llvm-svn: 185702

11 years ago[SystemZ] Enable the use of MVC for frame-to-frame spills
Richard Sandiford [Fri, 5 Jul 2013 14:02:01 +0000 (14:02 +0000)]
[SystemZ] Enable the use of MVC for frame-to-frame spills

...now that the problem that prompted the restriction has been fixed.

The original spill-02.py was a compromise because at the time I couldn't
find an example that actually failed without the two scavenging slots.
The version included here did.

llvm-svn: 185701

11 years ago[PowerPC] Add some special @got@tprel fixup cases
Ulrich Weigand [Fri, 5 Jul 2013 13:49:46 +0000 (13:49 +0000)]
[PowerPC] Add some special @got@tprel fixup cases

When a target@got@tprel or target@got@tprel@l symbol variant is used in
a fixup_ppc_half16 (*not* fixup_ppc_half16ds) context, we currently fail,
since the corresponding R_PPC64_GOT_TPREL16 / R_PPC64_GOT_TPREL16_LO
relocation types do not exist.

However, since such symbol variants resolve to GOT offsets which are
always 4-aligned, we can simply instead use the _DS variants of the
relocation types, which *do* exist.

The same applies for the @got@dtprel variants.

llvm-svn: 185700

11 years agoFix formatting for allocation of new pointer variables.
Daniel Jasper [Fri, 5 Jul 2013 13:30:40 +0000 (13:30 +0000)]
Fix formatting for allocation of new pointer variables.

Before:
T **t = new T * ;
T **q = new T * ();

After:
T **t = new T *;
T **q = new T *();

llvm-svn: 185699

11 years ago[SystemZ] Allocate a second register scavenging slot
Richard Sandiford [Fri, 5 Jul 2013 13:11:52 +0000 (13:11 +0000)]
[SystemZ] Allocate a second register scavenging slot

This is another prerequisite for frame-to-frame MVC copies.
I'll commit the patch that makes use of the slot separately.

The downside of trying to test many corner cases with each of the
available addressing modes is that a fair few tests need to account
for the new frame layout.  I do still think it's useful to have all
these tests though, since it's something that wouldn't get much coverage
otherwise.

llvm-svn: 185698

11 years agoDon't create an archive if, for example, we are asked to print the index.
Rafael Espindola [Fri, 5 Jul 2013 13:03:07 +0000 (13:03 +0000)]
Don't create an archive if, for example, we are asked to print the index.

llvm-svn: 185697

11 years ago[SystemZ] Clean up register scavenging code
Richard Sandiford [Fri, 5 Jul 2013 12:55:00 +0000 (12:55 +0000)]
[SystemZ] Clean up register scavenging code

SystemZ wants normal register scavenging slots, as close to the stack or
frame pointer as possible.  The only reason it was using custom code was
because PrologEpilogInserter assumed an x86-like layout, where the frame
pointer is at the opposite end of the frame from the stack pointer.
This meant that when frame pointer elimination was disabled,
the slots ended up being as close as possible to the incoming
stack pointer, which is the opposite of what we want on SystemZ.

This patch adds a new knob to say which layout is used and converts
SystemZ to use target-independent scavenging slots.  It's one of the pieces
needed to support frame-to-frame MVCs, where two slots might be required.

The ABI requires us to allocate 160 bytes for calls, so one approach
would be to use that area as temporary spill space instead.  It would need
some surgery to make sure that the slot isn't live across a call though.

I stuck to the "isFPCloseToIncomingSP - ..." style comment on the
"do what the surrounding code does" principle.  The FP case is already
covered by several Systemz/frame-* tests, which fail without the
PrologueEpilogueInserter change, so no new ones are needed.

No behavioural change intended.

llvm-svn: 185696

11 years agoUse simpler version of exists.
Rafael Espindola [Fri, 5 Jul 2013 12:44:49 +0000 (12:44 +0000)]
Use simpler version of exists.

llvm-svn: 185695

11 years ago[PowerPC] Make test case buildable with GNU as
Ulrich Weigand [Fri, 5 Jul 2013 12:33:03 +0000 (12:33 +0000)]
[PowerPC] Make test case buildable with GNU as

The ppc64-fixups.s test currently fails to build with GNU as, since it
does not support plain symbols as arguments to li/lis.  Rewrite the test
for R_PPC64_ADDR16 and R_PPC64_REL16 to use lwz instead.

Allowing the test case to be built with both LLVM and GNU as makes it
easier to spot unwanted difference in the output.

llvm-svn: 185694

11 years ago[msan] Intercept pthread_key_create.
Evgeniy Stepanov [Fri, 5 Jul 2013 12:31:07 +0000 (12:31 +0000)]
[msan] Intercept pthread_key_create.

llvm-svn: 185693

11 years ago[PowerPC] Support @tls in the asm parser
Ulrich Weigand [Fri, 5 Jul 2013 12:22:36 +0000 (12:22 +0000)]
[PowerPC] Support @tls in the asm parser

This adds support for the last missing construct to parse TLS-related
assembler code:
   add 3, 4, symbol@tls

The ADD8TLS currently hard-codes the @tls into the assembler string.
This cannot be handled by the asm parser, since @tls is parsed as
a symbol variant.  This patch changes ADD8TLS to have the @tls suffix
printed as symbol variant on output too, which allows us to remove
the isCodeGenOnly marker from ADD8TLS.  This in turn means that we
can add a AsmOperand to accept @tls marked symbols on input.

As a side effect, this means that the fixup_ppc_tlsreg fixup type
is no longer necessary and can be merged into fixup_ppc_nofixup.

llvm-svn: 185692

11 years agoRemove NoOperation.
Rafael Espindola [Fri, 5 Jul 2013 12:12:43 +0000 (12:12 +0000)]
Remove NoOperation.

parseCommandLine prints and error and exists if no operation is specified, so
it never returns NoOperation.

llvm-svn: 185691

11 years ago[PECOFF] Use yaml2obj to avoid checking in binary files.
Rui Ueyama [Fri, 5 Jul 2013 10:41:44 +0000 (10:41 +0000)]
[PECOFF] Use yaml2obj to avoid checking in binary files.

llvm-svn: 185690

11 years agoSimplify code. No functionality change.
Benjamin Kramer [Fri, 5 Jul 2013 10:20:57 +0000 (10:20 +0000)]
Simplify code. No functionality change.

llvm-svn: 185689

11 years agoPR16490: fix a crash in ARMDAGToDAGISel::SelectInlineAsm.
Joey Gouly [Fri, 5 Jul 2013 10:19:40 +0000 (10:19 +0000)]
PR16490: fix a crash in ARMDAGToDAGISel::SelectInlineAsm.

In the SelectionDAG immediate operands to inline asm are constructed as
two separate operands. The first is a constant of value InlineAsm::Kind_Imm
and the second is a constant with the value of the immediate.

In ARMDAGToDAGISel::SelectInlineAsm, if we reach an operand of Kind_Imm we
should skip over the next operand too.

llvm-svn: 185688

11 years agoImprove detection for preventing certain kind of formatting patterns.
Daniel Jasper [Fri, 5 Jul 2013 09:14:35 +0000 (09:14 +0000)]
Improve detection for preventing certain kind of formatting patterns.

This is a better implementation of r183097. The main purpose is to
prevent certain constructs to be formatted "like a block of text".

Before:
aaaaaaaaaaaaa<
    aaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>* aaaa = new aaaaaaaaaaaaa<
    aaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>(bbbbbbbbbbbbbbbbbbbbbbbb);
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa[
    bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb] = (*cccccccccccccccc)[
    dddddddddddddddddddddddddddddddddddddddddddddddddddddddd];

After:
aaaaaaaaaaaaa<aaaaaaaaaaaaaaaaaaaaa,
              aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
              aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>* aaaa =
    new aaaaaaaaaaaaa<aaaaaaaaaaaaaaaaaaaaa,
                      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
                      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>(
        bbbbbbbbbbbbbbbbbbbbbbbb);
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa[
    bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb] =
    (*cccccccccccccccc)[
        dddddddddddddddddddddddddddddddddddddddddddddddddddddddd];

llvm-svn: 185687

11 years ago[sanitizer] Disable ptrace interception on non-x86(_64).
Evgeniy Stepanov [Fri, 5 Jul 2013 08:57:47 +0000 (08:57 +0000)]
[sanitizer] Disable ptrace interception on non-x86(_64).

Patch by Hal Finkel.

llvm-svn: 185686

11 years agoDon't break after a "(" following a binary operator.
Daniel Jasper [Fri, 5 Jul 2013 07:58:34 +0000 (07:58 +0000)]
Don't break after a "(" following a binary operator.

Additionally, allow breaking after c-style casts, but with a high
penalty.

Before:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa *foo = (
    aaaaaaaaaaaaaaaaa *)bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;
After:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa *foo = (aaaaaaaaaaaaaaaaa *)
    bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;

This fixes llvm.org/PR16049.

llvm-svn: 185685

11 years agoSema: Call IgnoreParens fewer times in CheckAddressOfOperand
David Majnemer [Fri, 5 Jul 2013 06:23:33 +0000 (06:23 +0000)]
Sema: Call IgnoreParens fewer times in CheckAddressOfOperand

llvm-svn: 185684

11 years agoUse typedef for Densemap contraining SmallVector passed to a function to avoid repeat...
Craig Topper [Fri, 5 Jul 2013 04:43:31 +0000 (04:43 +0000)]
Use typedef for Densemap contraining SmallVector passed to a function to avoid repeating SmallVector size.

llvm-svn: 185683

11 years agoAdd typedefs for Densemaps containing SmallVectors to avoid repeating the SmallVector...
Craig Topper [Fri, 5 Jul 2013 04:33:53 +0000 (04:33 +0000)]
Add typedefs for Densemaps containing SmallVectors to avoid repeating the SmallVector size when creating iterators for the DenseMap.

llvm-svn: 185682

11 years agoDon't treat bitcode files specially in llvm-ar.
Rafael Espindola [Fri, 5 Jul 2013 04:19:32 +0000 (04:19 +0000)]
Don't treat bitcode files specially in llvm-ar.

We really want bitcode files to behave as regular object files in archives, so
we don't need to track that a member is bitcode.

llvm-svn: 185681

11 years agoUse the raw member names in Archive::Archive.
Rafael Espindola [Fri, 5 Jul 2013 03:35:15 +0000 (03:35 +0000)]
Use the raw member names in Archive::Archive.

This a bit more efficient and avoids having a function that uses the string
table being called by a function that searches for it.

llvm-svn: 185680

11 years agoUse the new --crash option in commands that are expected to crash.
Rafael Espindola [Fri, 5 Jul 2013 02:53:30 +0000 (02:53 +0000)]
Use the new --crash option in commands that are expected to crash.

llvm-svn: 185679

11 years agoAdd a --crash option to not.
Rafael Espindola [Fri, 5 Jul 2013 02:50:03 +0000 (02:50 +0000)]
Add a --crash option to not.

Now the two possible uses of not are
* not cmd
  Will return true if cmd doesn't crash and returns false.
* not --crash cmd
  Will return true if cmd crashes.

It will be used/tested in a followup commit for the clang crash recovery
testing.

llvm-svn: 185678

11 years agoInstCombine: (icmp eq B, 0) | (icmp ult A, B) -> (icmp ule A, B-1)
David Majnemer [Fri, 5 Jul 2013 00:31:17 +0000 (00:31 +0000)]
InstCombine: (icmp eq B, 0) | (icmp ult A, B) -> (icmp ule A, B-1)

This transform allows us to turn IR that looks like:
  %1 = icmp eq i64 %b, 0
  %2 = icmp ult i64 %a, %b
  %3 = or i1 %1, %2
  ret i1 %3

into:
  %0 = add i64 %b, -1
  %1 = icmp uge i64 %0, %a
  ret i1 %1

which means we go from lowering:
        cmpq    %rsi, %rdi
        setb    %cl
        testq   %rsi, %rsi
        sete    %al
        orb     %cl, %al
        ret

to lowering:
        decq    %rsi
        cmpq    %rdi, %rsi
        setae   %al
        ret

llvm-svn: 185677

11 years agoRemove use of asymmetric std::lower_bound comparator.
Ahmed Bougacha [Thu, 4 Jul 2013 23:20:12 +0000 (23:20 +0000)]
Remove use of asymmetric std::lower_bound comparator.

VS 2008 doesn't like it when in debug mode.

llvm-svn: 185676

11 years agoDebugInfo: Consider global variables without locations to be valid
David Blaikie [Thu, 4 Jul 2013 23:15:18 +0000 (23:15 +0000)]
DebugInfo: Consider global variables without locations to be valid

We were being a bit too aggresive here in classifying global variables
with no global reference or constant value to be invalid - this would
cause LLVM to not emit the DWARF description of the global variable if
it had been optimized away, which isn't helpful for users who might
benefit from the global variable's description even if there's no
location information.

This also fixes a crasher issue here that I was unable to reduce a test
case for - involving a using decl (& subsequent
DW_TAG_imported_declaration ) of such a global variable that, once
optimized away, would crash when an attempt to emit the imported
declaration was made.

llvm-svn: 185675

11 years agoAdd some more documentation on how to navigate from a LambdaExpr::Capture
James Dennett [Thu, 4 Jul 2013 22:15:44 +0000 (22:15 +0000)]
Add some more documentation on how to navigate from a LambdaExpr::Capture
to the associated FieldDecl.

llvm-svn: 185674

11 years agoUse a OwningPtr instead of a manual delete.
Rafael Espindola [Thu, 4 Jul 2013 22:15:33 +0000 (22:15 +0000)]
Use a OwningPtr instead of a manual delete.

llvm-svn: 185673

11 years agoMinor documentation cleanup
James Dennett [Thu, 4 Jul 2013 22:14:20 +0000 (22:14 +0000)]
Minor documentation cleanup

llvm-svn: 185672

11 years agoPass tid through to ptrace operations
Ed Maste [Thu, 4 Jul 2013 21:47:32 +0000 (21:47 +0000)]
Pass tid through to ptrace operations

This change is equivalent to the Linux threading support.

llvm-svn: 185671

11 years agoInitialize object file info before output streamer
Nico Rieck [Thu, 4 Jul 2013 21:37:26 +0000 (21:37 +0000)]
Initialize object file info before output streamer

r179494 switched to using the object file info to retrieve the default text
section for some MC streamers. It is possible that initializing an MC
streamer can request sections before the object file info is initialized
when the AutoInitSections flag is set on the streamer.

llvm-svn: 185670

11 years agoMC: Add .section directive to COFF
Nico Rieck [Thu, 4 Jul 2013 21:32:07 +0000 (21:32 +0000)]
MC: Add .section directive to COFF

Supports GAS flags "abdnrswxy". No support for alignment or subsections.

Fixes PR16366.

llvm-svn: 185669

11 years agoAdd test for r185584.
Roman Divacky [Thu, 4 Jul 2013 21:29:24 +0000 (21:29 +0000)]
Add test for r185584.

llvm-svn: 185668

11 years agoInstCombine: Reimplementation of visitUDivOperand
David Majnemer [Thu, 4 Jul 2013 21:17:49 +0000 (21:17 +0000)]
InstCombine: Reimplementation of visitUDivOperand

This transform was originally added in r185257 but later removed in
r185415.  The original transform would create instructions speculatively
and then discard them if the speculation was proved incorrect.  This has
been replaced with a scheme that splits the transform into two parts:
preflight and fold.  While we preflight, we build up fold actions that
inform the folding stage on how to act.

llvm-svn: 185667

11 years agoRemoved extension in [unordered_][multi]map which allowed one to emplace using just...
Howard Hinnant [Thu, 4 Jul 2013 20:59:16 +0000 (20:59 +0000)]
Removed extension in [unordered_][multi]map which allowed one to emplace using just an argument for the key, as opposed to using piecewise_construct.  However a bug report exposed that this created an unfortunate ambiguity.  People who are currently using the extension will be notified the next time they compile, and will have to change to using piecewise_construct.  There are no ABI issues with the removal of this extension.  This fixes llvm.org/bugs/show_bug.cgi?id=16542

llvm-svn: 185666

11 years agoSimplify comparators of [unordered_][multi]map. This fixes http://llvm.org/bugs...
Howard Hinnant [Thu, 4 Jul 2013 19:46:35 +0000 (19:46 +0000)]
Simplify comparators of [unordered_][multi]map.  This fixes llvm.org/bugs/show_bug.cgi?id=16538

llvm-svn: 185665

11 years agoAdd support for archives with no symbol table or string table.
Rafael Espindola [Thu, 4 Jul 2013 19:40:23 +0000 (19:40 +0000)]
Add support for archives with no symbol table or string table.

llvm-svn: 185664

11 years agoFix leak. Should bring back the valgrind bot.
Rafael Espindola [Thu, 4 Jul 2013 19:20:00 +0000 (19:20 +0000)]
Fix leak. Should bring back the valgrind bot.

llvm-svn: 185663

11 years ago[PowerPC] Implement writeNopData
Ulrich Weigand [Thu, 4 Jul 2013 18:28:46 +0000 (18:28 +0000)]
[PowerPC] Implement writeNopData

This implements a proper PPCAsmBackend::writeNopData routine
that actually writes PowerPC nop instructions.

This fixes the last remaining difference in object file output
(text section) between the integrated assembler and GNU as
that I've seen anywhere.

llvm-svn: 185662

11 years agoAvoid crash if we fail to resolve process in attach
Ed Maste [Thu, 4 Jul 2013 18:25:34 +0000 (18:25 +0000)]
Avoid crash if we fail to resolve process in attach

llvm-svn: 185661

11 years agocpp11-migrate: Minor command-line fixes and improvements
Edwin Vane [Thu, 4 Jul 2013 17:49:59 +0000 (17:49 +0000)]
cpp11-migrate: Minor command-line fixes and improvements

* all transforms are in the same category
* all transforms' options are in the same category
* display the CommonOptionParser extra-help (which describe in more details the
  compilation database stuff)
* add EXAMPLES section

Author: Guillaume Papin <guillaume.papin@epitech.eu>
llvm-svn: 185660

11 years agoAdd 'not' in front of a command that is expected to fail.
Rafael Espindola [Thu, 4 Jul 2013 17:21:01 +0000 (17:21 +0000)]
Add 'not' in front of a command that is expected to fail.

llvm-svn: 185659

11 years agoAdd 'not' to command lines that are expected to fail.
Rafael Espindola [Thu, 4 Jul 2013 17:08:11 +0000 (17:08 +0000)]
Add 'not' to command lines that are expected to fail.

llvm-svn: 185658

11 years agoDon't pass llvm::errs() all over the place. Diagnostics always go to stderr.
Rafael Espindola [Thu, 4 Jul 2013 17:06:04 +0000 (17:06 +0000)]
Don't pass llvm::errs() all over the place. Diagnostics always go to stderr.

llvm-svn: 185657

11 years agoChanging long to int for consistency.
Aaron Ballman [Thu, 4 Jul 2013 17:05:21 +0000 (17:05 +0000)]
Changing long to int for consistency.

llvm-svn: 185656

11 years agoReturn 0 when processing --help. This matches gnu ld and gold.
Rafael Espindola [Thu, 4 Jul 2013 16:50:47 +0000 (16:50 +0000)]
Return 0 when processing --help. This matches gnu ld and gold.

llvm-svn: 185655

11 years agoAdd 'not' to commands that are expected to fail.
Rafael Espindola [Thu, 4 Jul 2013 16:28:28 +0000 (16:28 +0000)]
Add 'not' to commands that are expected to fail.

llvm-svn: 185654

11 years agoRequire a shell for this test.
Rafael Espindola [Thu, 4 Jul 2013 16:23:44 +0000 (16:23 +0000)]
Require a shell for this test.

Some versions of python will expand the glob used in the test, others wont,
causing the test to fail when run with LIT_USE_INTERNAL_SHELL=1.

llvm-svn: 185653

11 years agoAdd 'not' to commands that are expected to fail.
Rafael Espindola [Thu, 4 Jul 2013 16:16:58 +0000 (16:16 +0000)]
Add 'not' to commands that are expected to fail.

This is at least good documentation, but also opens the possibility of
using pipefail.

llvm-svn: 185652

11 years agoRemove an unneeded call to 'UpdateThumbVFPPredicate', spotted by Amaury.
Joey Gouly [Thu, 4 Jul 2013 15:58:38 +0000 (15:58 +0000)]
Remove an unneeded call to 'UpdateThumbVFPPredicate', spotted by Amaury.

llvm-svn: 185651

11 years agoLooks like {{.*}} doesn't match the empty string. Fix test.
Rafael Espindola [Thu, 4 Jul 2013 15:29:20 +0000 (15:29 +0000)]
Looks like {{.*}} doesn't match the empty string. Fix test.

llvm-svn: 185650

11 years agoRelax pattern to accept a signext on ppc64.
Rafael Espindola [Thu, 4 Jul 2013 15:25:05 +0000 (15:25 +0000)]
Relax pattern to accept a signext on ppc64.

llvm-svn: 185649

11 years agoReplace 'grep foo | count 0' with 'not grep foo'.
Rafael Espindola [Thu, 4 Jul 2013 15:22:16 +0000 (15:22 +0000)]
Replace 'grep foo | count 0' with 'not grep foo'.

This avoids depending on pipefail not being used.

llvm-svn: 185648

11 years agoRemove test for the old debug format which was XFAILed since 2009.
Rafael Espindola [Thu, 4 Jul 2013 15:14:31 +0000 (15:14 +0000)]
Remove test for the old debug format which was XFAILed since 2009.

llvm-svn: 185647

11 years agoFix bashism.
Joerg Sonnenberger [Thu, 4 Jul 2013 15:11:10 +0000 (15:11 +0000)]
Fix bashism.

llvm-svn: 185646

11 years agoConvert test to FileCheck.
Rafael Espindola [Thu, 4 Jul 2013 15:08:20 +0000 (15:08 +0000)]
Convert test to FileCheck.

llvm-svn: 185645

11 years agoAdd missing expected-warning.
Rafael Espindola [Thu, 4 Jul 2013 15:04:25 +0000 (15:04 +0000)]
Add missing expected-warning.

llvm-svn: 185644

11 years agoRemove more unused uses of -verify.
Rafael Espindola [Thu, 4 Jul 2013 14:58:42 +0000 (14:58 +0000)]
Remove more unused uses of -verify.

llvm-svn: 185643

11 years agoAdd support for MC assembling and disassembling of vsel{ge, gt, eq, vs} instructions.
Joey Gouly [Thu, 4 Jul 2013 14:57:20 +0000 (14:57 +0000)]
Add support for MC assembling and disassembling of vsel{ge, gt, eq, vs} instructions.

This adds a new decoder table/namespace 'VFPV8', as these instructions have their
top 4 bits as 0b1111, while other Thumb instructions have 0b1110.

llvm-svn: 185642

11 years agoRemove unused -verify.
Rafael Espindola [Thu, 4 Jul 2013 14:51:11 +0000 (14:51 +0000)]
Remove unused -verify.

llvm-svn: 185641

11 years agoFixed typo: NoneComment -> NonComment, no other changes.
Alexander Kornienko [Thu, 4 Jul 2013 14:47:51 +0000 (14:47 +0000)]
Fixed typo: NoneComment -> NonComment, no other changes.

llvm-svn: 185640

11 years agoclang -cc1 has no -fno-unit-at-a-time or -funit-at-a-time. Fix test.
Rafael Espindola [Thu, 4 Jul 2013 14:42:44 +0000 (14:42 +0000)]
clang -cc1 has no -fno-unit-at-a-time or -funit-at-a-time. Fix test.

llvm-svn: 185639

11 years ago[PowerPC] Add all trap mnemonics
Ulrich Weigand [Thu, 4 Jul 2013 14:40:12 +0000 (14:40 +0000)]
[PowerPC] Add all trap mnemonics

This adds support for all basic and extended variants
of the trap instructions to the asm parser.

llvm-svn: 185638

11 years agoUse a clang -cc1 option instead of -m32 and remove tcl quotes.
Rafael Espindola [Thu, 4 Jul 2013 14:36:22 +0000 (14:36 +0000)]
Use a clang -cc1 option instead of -m32 and remove tcl quotes.

llvm-svn: 185637

11 years agoRemove tcl quotes.
Rafael Espindola [Thu, 4 Jul 2013 14:30:41 +0000 (14:30 +0000)]
Remove tcl quotes.

llvm-svn: 185636

11 years agoConvert test to FileCheck.
Rafael Espindola [Thu, 4 Jul 2013 14:28:33 +0000 (14:28 +0000)]
Convert test to FileCheck.

llvm-svn: 185635

11 years agoReplace void with int to make this a valid C++ file.
Rafael Espindola [Thu, 4 Jul 2013 14:25:25 +0000 (14:25 +0000)]
Replace void with int to make this a valid C++ file.

The test was passing because clang would still print the ast before exiting
with an error. Since that didn't seem to be the intent of the test, I change
the test instead of adding 'not' to the command line.

llvm-svn: 185634

11 years ago[PowerPC] Add asm parser support for CR expressions
Ulrich Weigand [Thu, 4 Jul 2013 14:24:00 +0000 (14:24 +0000)]
[PowerPC] Add asm parser support for CR expressions

This adds support for specifying condition registers and
condition register fields via expressions using the symbols
defined by the PowerISA, like "4*cr2+eq".

llvm-svn: 185633

11 years agoSimplifyCFG: Teach switch generation some patterns that instcombine forms.
Benjamin Kramer [Thu, 4 Jul 2013 14:22:02 +0000 (14:22 +0000)]
SimplifyCFG: Teach switch generation some patterns that instcombine forms.

This allows us to create switches even if instcombine has munged two of the
incombing compares into one and some bit twiddling. This was motivated by enum
compares that are common in clang.

llvm-svn: 185632

11 years ago[ASan] Close stderr before launching atos in asan_symbolize.py
Alexander Potapenko [Thu, 4 Jul 2013 14:21:49 +0000 (14:21 +0000)]
[ASan] Close stderr before launching atos in asan_symbolize.py

llvm-svn: 185631

11 years agoRemove old test.
Rafael Espindola [Thu, 4 Jul 2013 14:20:52 +0000 (14:20 +0000)]
Remove old test.

It was trivially passing because of the tcl quotes and we have better datalayout
tests.

llvm-svn: 185630

11 years agoRemove old test.
Rafael Espindola [Thu, 4 Jul 2013 14:18:32 +0000 (14:18 +0000)]
Remove old test.

It was not clear what was being tested and the test was trivially passing
by getting grep confused with tcl quotes.

llvm-svn: 185629

11 years agoClang has no nested function support. Delete this test.
Rafael Espindola [Thu, 4 Jul 2013 14:13:53 +0000 (14:13 +0000)]
Clang has no nested function support. Delete this test.

llvm-svn: 185628

11 years agoSupporting ssize_t on WIN64 with its proper size. Patch thanks to David Cournapeau!
Aaron Ballman [Thu, 4 Jul 2013 14:12:25 +0000 (14:12 +0000)]
Supporting ssize_t on WIN64 with its proper size.  Patch thanks to David Cournapeau!

llvm-svn: 185627

11 years ago[sanitizer] Intercept tcgetattr.
Evgeniy Stepanov [Thu, 4 Jul 2013 14:03:31 +0000 (14:03 +0000)]
[sanitizer] Intercept tcgetattr.

llvm-svn: 185626

11 years agoRemove the EXCEPTIONADDR, EHSELECTION, and LSDAADDR ISD opcodes.
Jakob Stoklund Olesen [Thu, 4 Jul 2013 13:54:20 +0000 (13:54 +0000)]
Remove the EXCEPTIONADDR, EHSELECTION, and LSDAADDR ISD opcodes.

These exception-related opcodes are not used any longer.

llvm-svn: 185625

11 years ago[sanitizer] More interceptors.
Evgeniy Stepanov [Thu, 4 Jul 2013 13:19:41 +0000 (13:19 +0000)]
[sanitizer] More interceptors.

bcopy
strtoimax, strtoumax
mbstowcs, mbsrtowcs, mbsnrtowcs
wcstombs, wcsrtombs, wcsnrtombs

llvm-svn: 185624

11 years agoUse SmallVectorImpl::const_iterator instead of SmallVector to avoid specifying the...
Craig Topper [Thu, 4 Jul 2013 13:11:33 +0000 (13:11 +0000)]
Use SmallVectorImpl::const_iterator instead of SmallVector to avoid specifying the vector size.

llvm-svn: 185623

11 years agoAdded AlwaysBreakBeforeMultilineStrings option.
Alexander Kornienko [Thu, 4 Jul 2013 12:02:44 +0000 (12:02 +0000)]
Added AlwaysBreakBeforeMultilineStrings option.

Summary:
Always breaking before multiline strings can help format complex
expressions containing multiline strings more consistently, and avoid consuming
too much horizontal space.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D1097

llvm-svn: 185622

11 years ago[ASan] Do not protect the malloc zone created by malloc_zone_create() on Snow Leopard...
Alexander Potapenko [Thu, 4 Jul 2013 10:16:12 +0000 (10:16 +0000)]
[ASan] Do not protect the malloc zone created by malloc_zone_create() on Snow Leopard and earlier systems.
Fixes https://code.google.com/p/address-sanitizer/issues/detail?id=208

llvm-svn: 185621

11 years agoAdd a V8FP instruction 'vcvt{b,t}' to convert between half and double precision.
Joey Gouly [Thu, 4 Jul 2013 10:04:08 +0000 (10:04 +0000)]
Add a V8FP instruction 'vcvt{b,t}' to convert between half and double precision.

llvm-svn: 185620

11 years agoTry to guard a test that requires DEBUG().
Rui Ueyama [Thu, 4 Jul 2013 09:29:47 +0000 (09:29 +0000)]
Try to guard a test that requires DEBUG().

This is a follow-up patch for r185524. Being assert enabled does not mean
that DEBUG() is enabled, so we need to check the existence of DEBUG() itself.

llvm-svn: 185619

11 years agoTypo.
Jakob Stoklund Olesen [Thu, 4 Jul 2013 04:53:49 +0000 (04:53 +0000)]
Typo.

llvm-svn: 185618

11 years agoSimplify landing pad lowering.
Jakob Stoklund Olesen [Thu, 4 Jul 2013 04:53:45 +0000 (04:53 +0000)]
Simplify landing pad lowering.

Stop using the ISD::EXCEPTIONADDR and ISD::EHSELECTION when lowering
landing pad arguments. These nodes were previously legalized into
CopyFromReg nodes, but that never worked properly because the
CopyFromReg node weren't guaranteed to be  scheduled at the top of the
basic block.

This meant the exception pointer and selector registers could be
clobbered before being copied to a virtual register.

This patch copies the two physical registers to virtual registers at
the beginning of the basic block, and lowers the landingpad instruction
directly to two CopyFromReg nodes reading the *virtual* registers. This
is safe because virtual registers don't get clobbered.

A future patch will remove the ISD::EXCEPTIONADDR and ISD::EHSELECTION
nodes.

llvm-svn: 185617

11 years agoFastISel can only apend to basic blocks.
Jakob Stoklund Olesen [Thu, 4 Jul 2013 04:32:39 +0000 (04:32 +0000)]
FastISel can only apend to basic blocks.

Compute the insertion point from the end of the basic block instead of
skipping labels from the front.

This caused failures in landing pads when live-in copies where inserted
before instruction selection.

llvm-svn: 185616

11 years agoLive-in copies go *after* EH_LABELs.
Jakob Stoklund Olesen [Thu, 4 Jul 2013 04:32:35 +0000 (04:32 +0000)]
Live-in copies go *after* EH_LABELs.

This will soon be tested by exception handling working at all.

llvm-svn: 185615

11 years agoAdd test for PR4997. This has been fixed for a while.
Richard Smith [Thu, 4 Jul 2013 04:10:46 +0000 (04:10 +0000)]
Add test for PR4997. This has been fixed for a while.

llvm-svn: 185614

11 years agoTestcase for PR14130, which was probably fixed by r183859.
Richard Smith [Thu, 4 Jul 2013 04:04:20 +0000 (04:04 +0000)]
Testcase for PR14130, which was probably fixed by r183859.

llvm-svn: 185613

11 years agoTabs to spaces. No functionality change.
Nick Lewycky [Thu, 4 Jul 2013 03:51:53 +0000 (03:51 +0000)]
Tabs to spaces. No functionality change.

llvm-svn: 185612

11 years agoAdd a space between closing template '>' to unbreak build.
Craig Topper [Thu, 4 Jul 2013 03:15:42 +0000 (03:15 +0000)]
Add a space between closing template '>' to unbreak build.

llvm-svn: 185611

11 years agoUse SmallVectorImpl instead of SmallVector for iterators and references to avoid...
Craig Topper [Thu, 4 Jul 2013 03:08:24 +0000 (03:08 +0000)]
Use SmallVectorImpl instead of SmallVector for iterators and references to avoid specifying the vector size unnecessarily.

llvm-svn: 185610

11 years ago[analyzer] Suppress reports reported in std::list
Anna Zaks [Thu, 4 Jul 2013 02:38:10 +0000 (02:38 +0000)]
[analyzer] Suppress reports reported in std::list

The motivation is to suppresses false use-after-free reports that occur when calling
std::list::pop_front() or std::list::pop_back() twice. The analyzer does not
reason about the internal invariants of the list implementation, so just do not report
any of warnings in std::list.

Fixes radar://14317928.

llvm-svn: 185609

11 years ago[analyzer] Make sure that inlined defensive checks work on div by zero.
Anna Zaks [Thu, 4 Jul 2013 02:38:06 +0000 (02:38 +0000)]
[analyzer] Make sure that inlined defensive checks work on div by zero.

This suppresses a false positive in std::hash_map.
Fixes  radar://14255587.

llvm-svn: 185608