platform/upstream/llvm.git
8 years ago[Tests] Add explicit -std=lang option to a number of tests.
Yunzhong Gao [Sat, 1 Aug 2015 02:55:59 +0000 (02:55 +0000)]
[Tests] Add explicit -std=lang option to a number of tests.

This patch should not change the test results, but it is useful if clang's
default C++ language is ever changed from gnu++98.

Patch by: Charles Li

http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20150727/134667.html

llvm-svn: 243819

8 years ago[libFuzzer] more refactoring of the Mutator and adding tests to it
Kostya Serebryany [Sat, 1 Aug 2015 02:23:06 +0000 (02:23 +0000)]
[libFuzzer] more refactoring of the Mutator and adding tests to it

llvm-svn: 243818

8 years ago[libFuzzer] start refactoring the Mutator and adding tests to it
Kostya Serebryany [Sat, 1 Aug 2015 01:42:51 +0000 (01:42 +0000)]
[libFuzzer] start refactoring the Mutator and adding tests to it

llvm-svn: 243817

8 years ago-Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated...
David Blaikie [Sat, 1 Aug 2015 01:08:30 +0000 (01:08 +0000)]
-Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated in C++11

llvm-svn: 243816

8 years ago[asan] Link tests with ld.gold on Android.
Evgeniy Stepanov [Sat, 1 Aug 2015 00:01:23 +0000 (00:01 +0000)]
[asan] Link tests with ld.gold on Android.

ld.bfd fails to find dependencies of asan runtime library w/o an
extra -rpath-link pointing to usr/lib under the sysroot. Gold does
not have this problem.

llvm-svn: 243802

8 years agoFix polly tests after LLVM IR change in r243774
Duncan P. N. Exon Smith [Fri, 31 Jul 2015 23:58:50 +0000 (23:58 +0000)]
Fix polly tests after LLVM IR change in r243774

llvm-svn: 243801

8 years ago[ASan] Fix two tests on FreeBSD: alloca.h is missing there.
Alexey Samsonov [Fri, 31 Jul 2015 23:57:06 +0000 (23:57 +0000)]
[ASan] Fix two tests on FreeBSD: alloca.h is missing there.

llvm-svn: 243800

8 years agoAMDGPU/SI: Add implicit register operands in the correct order.
Alex Lorenz [Fri, 31 Jul 2015 23:30:09 +0000 (23:30 +0000)]
AMDGPU/SI: Add implicit register operands in the correct order.

This commit fixes a bug in the class 'SIInstrInfo' where the implicit register
machine operands were added to a machine instruction in an incorrect order -
the implicit uses were added before the implicit defs.

I found this bug while working on moving the implicit register operand
verification code from the MIR parser to the machine verifier.

This commit also makes the method 'addImplicitDefUseOperands' in the machine
instruction class public so that it can be reused in the 'SIInstrInfo' class.

Reviewers: Matt Arsenault

Differential Revision: http://reviews.llvm.org/D11689

llvm-svn: 243799

8 years agoMIR Parser: Report an error when a jump table entry is redefined.
Alex Lorenz [Fri, 31 Jul 2015 23:13:23 +0000 (23:13 +0000)]
MIR Parser: Report an error when a jump table entry is redefined.

llvm-svn: 243798

8 years ago[Sanitizer] Try to fix sanitizer_libc_test on FreeBSD.
Alexey Samsonov [Fri, 31 Jul 2015 23:02:51 +0000 (23:02 +0000)]
[Sanitizer] Try to fix sanitizer_libc_test on FreeBSD.

llvm-svn: 243797

8 years agoMIR Parser: Remove unused variable.
Alex Lorenz [Fri, 31 Jul 2015 22:59:20 +0000 (22:59 +0000)]
MIR Parser: Remove unused variable.

This variable is unused as of r243572.

llvm-svn: 243796

8 years ago[libFuzzer] limit the size of the inputs printed to stderr
Kostya Serebryany [Fri, 31 Jul 2015 22:07:17 +0000 (22:07 +0000)]
[libFuzzer] limit the size of the inputs printed to stderr

llvm-svn: 243795

8 years agoCOFF: Fix error message. Space was missing.
Rui Ueyama [Fri, 31 Jul 2015 21:51:25 +0000 (21:51 +0000)]
COFF: Fix error message. Space was missing.

llvm-svn: 243794

8 years ago[libFuzzer] minimal documentation on data-flow-guided fuzzing
Kostya Serebryany [Fri, 31 Jul 2015 21:48:10 +0000 (21:48 +0000)]
[libFuzzer] minimal documentation on data-flow-guided fuzzing

llvm-svn: 243793

8 years agoFix an MSVC build break since it can't synthesize move ctors.
David Blaikie [Fri, 31 Jul 2015 21:47:07 +0000 (21:47 +0000)]
Fix an MSVC build break since it can't synthesize move ctors.

llvm-svn: 243792

8 years agoFix a GCC buildbot that seemed to be having trouble producing the implicit move ctor
David Blaikie [Fri, 31 Jul 2015 21:47:04 +0000 (21:47 +0000)]
Fix a GCC buildbot that seemed to be having trouble producing the implicit move ctor

llvm-svn: 243791

8 years ago[NVPTX] convert pointers in byval kernel arguments to global
Jingyue Wu [Fri, 31 Jul 2015 21:44:14 +0000 (21:44 +0000)]
[NVPTX] convert pointers in byval kernel arguments to global

Summary:
For example, in

  struct S {
    int *x;
    int *y;
  };
  __global__ void foo(S s) {
    int *b = s.y;
    // use b
  }

"b" is guaranteed to point to global. NVPTX should emit ld.global/st.global for
accessing "b".

Reviewers: jholewinski

Subscribers: llvm-commits, jholewinski

Differential Revision: http://reviews.llvm.org/D11505

llvm-svn: 243790

8 years agoFix some formatting from a recent commit.
David Blaikie [Fri, 31 Jul 2015 21:37:58 +0000 (21:37 +0000)]
Fix some formatting from a recent commit.

llvm-svn: 243789

8 years ago-Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated...
David Blaikie [Fri, 31 Jul 2015 21:37:09 +0000 (21:37 +0000)]
-Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated in C++11

llvm-svn: 243788

8 years ago[asan] Fix wrong __ANDROID_API__ preprocessor condition.
Evgeniy Stepanov [Fri, 31 Jul 2015 21:35:15 +0000 (21:35 +0000)]
[asan] Fix wrong __ANDROID_API__ preprocessor condition.

This fixes report symbolization on L devices when building for API
level 21 or 22.

llvm-svn: 243787

8 years ago-Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated...
David Blaikie [Fri, 31 Jul 2015 21:26:16 +0000 (21:26 +0000)]
-Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated in C++11

llvm-svn: 243786

8 years ago[CMake] Don't build libc++ with MSan-with-calls instrumentation.
Alexey Samsonov [Fri, 31 Jul 2015 21:15:34 +0000 (21:15 +0000)]
[CMake] Don't build libc++ with MSan-with-calls instrumentation.

Instead, refactor the build rules so that we build libc++ with MSan for
each supported architecture.

llvm-svn: 243785

8 years agoRemove -Werror when using check_cxx_compiler_flag because it was causing compiler...
Eric Fiselier [Fri, 31 Jul 2015 21:09:38 +0000 (21:09 +0000)]
Remove -Werror when using check_cxx_compiler_flag because it was causing compiler-rt breakages.

llvm-svn: 243784

8 years agoWebAssembly: handle `ret void`.
JF Bastien [Fri, 31 Jul 2015 21:04:18 +0000 (21:04 +0000)]
WebAssembly: handle `ret void`.

Summary:
Use -1 as numoperands for the return SDTypeProfile, denoting that return is variadic. Note that the patterns in InstrControl.td still need to match the inputs, so this ins't an "anything goes" variadic on ret!

The next step will be to handle other local types (not just int32).

Reviewers: sunfish

Subscribers: llvm-commits, jfb

Differential Revision: http://reviews.llvm.org/D11692

llvm-svn: 243783

8 years ago[lldb-mi] Fix evaluation for children of created variable object.
Dawn Perchik [Fri, 31 Jul 2015 21:00:00 +0000 (21:00 +0000)]
[lldb-mi] Fix evaluation for children of created variable object.

Move code in CMICmdCmdVarListChildren::Execute() up so that the child
object will always be added when the MI command -var-list-children is
entered (instead of only when the print-value was all or simple).  This
patch fixes evaluation of expressions like varobj.member for a created
varobj with children.

Reviewed by: abidh
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11659

llvm-svn: 243782

8 years ago[libFuzzer] make sure that 2-byte arguments of switch() are handled properly
Kostya Serebryany [Fri, 31 Jul 2015 20:58:55 +0000 (20:58 +0000)]
[libFuzzer] make sure that 2-byte arguments of switch() are handled properly

llvm-svn: 243781

8 years agoMIR Serialization: Serialize the floating point immediate machine operands.
Alex Lorenz [Fri, 31 Jul 2015 20:49:21 +0000 (20:49 +0000)]
MIR Serialization: Serialize the floating point immediate machine operands.

Reviewers: Duncan P. N. Exon Smith
llvm-svn: 243780

8 years agoIR: Add a broad bitcode compatibility test
Duncan P. N. Exon Smith [Fri, 31 Jul 2015 20:44:32 +0000 (20:44 +0000)]
IR: Add a broad bitcode compatibility test

Successive versions of LLVM should retain the ability to parse bitcode
generated by old releases of the compiler.  This adds a bitcode format
compatibility test, which is intended to provide good (albeit not
entirely exhaustive) coverage of the current LangRef.

This also includes compatibility tests for LLVM 3.6.  After every 3.X.0
release, the compatibility.ll file from the 3.X branch should be copied
to compatibility-3.X.ll on trunk, and the 3.X.0 release used to generate
a corresponding bitcode file.

Patch by Vedant Kumar!

llvm-svn: 243779

8 years ago[dwarfdump] Ignore scattered relocations for mach-o.
Frederic Riss [Fri, 31 Jul 2015 20:22:50 +0000 (20:22 +0000)]
[dwarfdump] Ignore scattered relocations for mach-o.

When encountering a scattered relocation, the code would assert trying to
access an unexisting section. I couldn't find a way to expose the result
of the processing of a scattered reloc, and I'm really unsure what the
right thing to do is. This patch just skips them during the processing in
DwarfContext and adds a mach-o file to the tests that exposed the asserting
behavior.
(This is a new failure that is being exposed by Rafael's recent work on
the libObject interfaces. I think the wrong behavior has always happened,
but now it's asserting)

llvm-svn: 243778

8 years ago[dsymutil] Support multiple input files on the command line
Frederic Riss [Fri, 31 Jul 2015 20:22:20 +0000 (20:22 +0000)]
[dsymutil] Support multiple input files on the command line

llvm-svn: 243777

8 years agotest commit; wrap ellipses in comment with brackets
Nathan Wilson [Fri, 31 Jul 2015 20:00:02 +0000 (20:00 +0000)]
test commit; wrap ellipses in comment with brackets

llvm-svn: 243776

8 years agoDI: Update testcases for LLVM assembly change
Duncan P. N. Exon Smith [Fri, 31 Jul 2015 18:59:37 +0000 (18:59 +0000)]
DI: Update testcases for LLVM assembly change

Update testcases after LLVM change r243774.

Most of these had no need to check `tag:` field, but did so as a way of
getting to the `name:` field.  In a few cases I've converted the `tag:`
checks to `arg:` or `CHECK-NOT: arg:`.

llvm-svn: 243775

8 years agoDI: Remove DW_TAG_arg_variable and DW_TAG_auto_variable
Duncan P. N. Exon Smith [Fri, 31 Jul 2015 18:58:39 +0000 (18:58 +0000)]
DI: Remove DW_TAG_arg_variable and DW_TAG_auto_variable

Remove the fake `DW_TAG_auto_variable` and `DW_TAG_arg_variable` tags,
using `DW_TAG_variable` in their place Stop exposing the `tag:` field at
all in the assembly format for `DILocalVariable`.

Most of the testcase updates were generated by the following sed script:

    find test/ -name "*.ll" -o -name "*.mir" |
    xargs grep -l 'DILocalVariable' |
    xargs sed -i '' \
      -e 's/tag: DW_TAG_arg_variable, //' \
      -e 's/tag: DW_TAG_auto_variable, //'

There were only a handful of tests in `test/Assembly` that I needed to
update by hand.

(Note: a follow-up could change `DILocalVariable::DILocalVariable()` to
set the tag to `DW_TAG_formal_parameter` instead of `DW_TAG_variable`
(as appropriate), instead of having that logic magically in the backend
in `DbgVariable`.  I've added a FIXME to that effect.)

llvm-svn: 243774

8 years agoAdd missing 'override'.
Daniel Jasper [Fri, 31 Jul 2015 18:32:38 +0000 (18:32 +0000)]
Add missing 'override'.

llvm-svn: 243773

8 years agox86: check hasOpaqueSPAdjustment in canRealignStack
JF Bastien [Fri, 31 Jul 2015 18:28:09 +0000 (18:28 +0000)]
x86: check hasOpaqueSPAdjustment in canRealignStack

Summary:
@rnk pointed out in [1] that x86's canRealignStack logic should match that in CantUseSP from hasBasePointer.

  [1]: http://reviews.llvm.org/D11160?id=29713#inline-89350

Reviewers: rnk

Subscribers: rnk, llvm-commits

Differential Revision: http://reviews.llvm.org/D11377

llvm-svn: 243772

8 years ago[UBSan] Test: Move coverage-levels.cc out of Linux directory
Filipe Cabecinhas [Fri, 31 Jul 2015 18:18:07 +0000 (18:18 +0000)]
[UBSan] Test: Move coverage-levels.cc out of Linux directory

Summary:
This test is working on other platforms.

Reviewers: samsonov, emaste

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D10415

llvm-svn: 243771

8 years agoWebAssembly: handle unused function arguments.
JF Bastien [Fri, 31 Jul 2015 18:13:27 +0000 (18:13 +0000)]
WebAssembly: handle unused function arguments.

Subscribers: llvm-commits, sunfish, jfb

Differential Revision: http://reviews.llvm.org/D11684

llvm-svn: 243770

8 years agoAttempt to appease the MSVC build bots
David Majnemer [Fri, 31 Jul 2015 18:13:25 +0000 (18:13 +0000)]
Attempt to appease the MSVC build bots

They don't seem to care for initializing an ArrayRef with a
std::initializer_list.

llvm-svn: 243769

8 years ago[libFuzzer] record traces from the switch statements only when told to do so
Kostya Serebryany [Fri, 31 Jul 2015 18:09:08 +0000 (18:09 +0000)]
[libFuzzer] record traces from the switch statements only when told to do so

llvm-svn: 243768

8 years ago[MS ABI] Hook clang up to the new EH instructions
David Majnemer [Fri, 31 Jul 2015 17:58:45 +0000 (17:58 +0000)]
[MS ABI] Hook clang up to the new EH instructions

The new EH instructions make it possible for LLVM to generate .xdata
tables that the MSVC personality routines will be happy about.  Because
this is experimental, hide it behind a -cc1 flag (-fnew-ms-eh).

Differential Revision: http://reviews.llvm.org/D11405

llvm-svn: 243767

8 years agoNew EH representation for MSVC compatibility
David Majnemer [Fri, 31 Jul 2015 17:58:14 +0000 (17:58 +0000)]
New EH representation for MSVC compatibility

This introduces new instructions neccessary to implement MSVC-compatible
exception handling support.  Most of the middle-end and none of the
back-end haven't been audited or updated to take them into account.

Differential Revision: http://reviews.llvm.org/D11097

llvm-svn: 243766

8 years agoDI: Update for LLVM API change for local variables
Duncan P. N. Exon Smith [Fri, 31 Jul 2015 17:56:14 +0000 (17:56 +0000)]
DI: Update for LLVM API change for local variables

Adjust to LLVM DIBuilder API changes in r243764, using
`createAutoVariable()` and `createParameterVariable()` in place of
`createLocalVariable()`.  No real functionality change here.

llvm-svn: 243765

8 years agoDI: Rewrite the DIBuilder local variable API
Duncan P. N. Exon Smith [Fri, 31 Jul 2015 17:55:53 +0000 (17:55 +0000)]
DI: Rewrite the DIBuilder local variable API

Replace the general `createLocalVariable()` with two more specific
functions: `createParameterVariable()` and `createAutoVariable()`, and
rewrite the documentation.

Besides cleaning up the API, this avoids exposing the fake DWARF tags
`DW_TAG_arg_variable` and `DW_TAG_auto_variable` to frontends, and is
preparation for removing them completely.

llvm-svn: 243764

8 years agoWebAssembly: print basic integer assembly.
JF Bastien [Fri, 31 Jul 2015 17:53:38 +0000 (17:53 +0000)]
WebAssembly: print basic integer assembly.

Summary:
This prints assembly for int32 integer operations defined in WebAssemblyInstrInteger.td only, with major caveats:

  - The operation names are currently incorrect.
  - Other integer and floating-point types will be added later.
  - The printer isn't factored out to handle recursive AST code yet, since it can't even handle control flow anyways.
  - The assembly format isn't full s-expressions yet either, this will be added later.
  - This currently disables PrologEpilogCodeInserter as well as MachineCopyPropagation becasue they don't like virtual registers, which WebAssembly likes quite a bit. This will be fixed by factoring out NVPTX's change (currently a fork of PrologEpilogCodeInserter).

Reviewers: sunfish

Subscribers: llvm-commits, jfb

Differential Revision: http://reviews.llvm.org/D11671

llvm-svn: 243763

8 years agoCOFF: Reenable the lld test disabled in r243758.
David Majnemer [Fri, 31 Jul 2015 17:41:11 +0000 (17:41 +0000)]
COFF: Reenable the lld test disabled in r243758.

llvm-svn: 243762

8 years ago[COFF] Consider the ImageBase when reporting section addresses
David Majnemer [Fri, 31 Jul 2015 17:40:24 +0000 (17:40 +0000)]
[COFF] Consider the ImageBase when reporting section addresses

This lets us reenable the lld test disabled in r243758.

llvm-svn: 243761

8 years ago[libFuzzer] support switch interception in dfsan mode
Kostya Serebryany [Fri, 31 Jul 2015 17:05:05 +0000 (17:05 +0000)]
[libFuzzer] support switch interception in dfsan mode

llvm-svn: 243760

8 years ago[CodeGenPrepare] Compress a pair. No functional change.
Benjamin Kramer [Fri, 31 Jul 2015 17:00:39 +0000 (17:00 +0000)]
[CodeGenPrepare] Compress a pair. No functional change.

llvm-svn: 243759

8 years agoDisable objdump disassembly test after r243755
Reid Kleckner [Fri, 31 Jul 2015 16:41:23 +0000 (16:41 +0000)]
Disable objdump disassembly test after r243755

Right now PE image section addresses are RVAs and symbol addresses are
VAs.  We should probably fix this by changing section addresses to match
symbol addresses. Fixing this might take a few hours, so temporarily
disable the objdump part of this test.

llvm-svn: 243758

8 years agoAdd some help strings for /dll and /debug so they show up in /?
Reid Kleckner [Fri, 31 Jul 2015 16:40:38 +0000 (16:40 +0000)]
Add some help strings for /dll and /debug so they show up in /?

llvm-svn: 243757

8 years ago[x86] reassociate integer multiplies using machine combiner pass
Sanjay Patel [Fri, 31 Jul 2015 16:21:55 +0000 (16:21 +0000)]
[x86] reassociate integer multiplies using machine combiner pass

Add i16, i32, i64 imul machine instructions to the list of reassociation
candidates.

A new bit of logic is needed to handle integer instructions: they have an
implicit EFLAGS operand, so we have to make sure it's dead in order to do
any reassociation with integer ops.

Differential Revision: http://reviews.llvm.org/D11660

llvm-svn: 243756

8 years ago[COFF] Return symbol VAs instead of RVAs for PE files
Reid Kleckner [Fri, 31 Jul 2015 16:14:22 +0000 (16:14 +0000)]
[COFF] Return symbol VAs instead of RVAs for PE files

This makes llvm-nm consistent with binutils nm on executables and DLLs.
For a vanilla hello world executable, the address of main should include
the default image base of 0x400000.

llvm-svn: 243755

8 years agoAdd misc-unused-alias-decls check that currently finds unused namespace
Daniel Jasper [Fri, 31 Jul 2015 16:08:10 +0000 (16:08 +0000)]
Add misc-unused-alias-decls check that currently finds unused namespace
alias declarations. In the future, we might want to reuse it to also
fine unsed using declarations and such.

llvm-svn: 243754

8 years ago[AArch64] Favor extended reg patterns for sub
Geoff Berry [Fri, 31 Jul 2015 15:55:54 +0000 (15:55 +0000)]
[AArch64] Favor extended reg patterns for sub

Summary:
Favor the extended reg patterns over the shifted reg patterns that match
only the operand shift and not the full sign/zero extend and shift.

Reviewers: jmolloy, t.p.northover

Subscribers: mcrosier, aemerson, llvm-commits, rengolin

Differential Revision: http://reviews.llvm.org/D11569

llvm-svn: 243753

8 years ago[libc++abi] Allow use just compiled clang++ for tests
Renato Golin [Fri, 31 Jul 2015 15:25:11 +0000 (15:25 +0000)]
[libc++abi] Allow use just compiled clang++ for tests

Currently, the tests assume the system compiler is the one we want
to test, but if we build libcxxabi together with LLVM+Clang, it'll
get the wrong compiler.

This patch allows us to test if we have clang++ in our /bin directory,
and if so, use it.

llvm-svn: 243752

8 years agodon't repeat function names in comments; NFC
Sanjay Patel [Fri, 31 Jul 2015 15:10:44 +0000 (15:10 +0000)]
don't repeat function names in comments; NFC

llvm-svn: 243751

8 years ago[CaptureTracker] Provide an ordered basic block to PointerMayBeCapturedBefore
Bruno Cardoso Lopes [Fri, 31 Jul 2015 14:31:35 +0000 (14:31 +0000)]
[CaptureTracker] Provide an ordered basic block to PointerMayBeCapturedBefore

This patch is a follow up from r240560 and is a step further into
mitigating the compile time performance issues in CaptureTracker.

By providing the CaptureTracker with a "cached ordered basic block"
instead of computing it every time, MemDepAnalysis can use this cache
throughout its calls to AA->callCapturesBefore, avoiding to recompute it
for every scanned instruction. In the same testcase used in r240560,
compile time is reduced from 2min to 30s.

This also fixes PR22348.

rdar://problem/19230319
Differential Revision: http://reviews.llvm.org/D11364

llvm-svn: 243750

8 years agoImprove man page markup
Ed Maste [Fri, 31 Jul 2015 14:26:15 +0000 (14:26 +0000)]
Improve man page markup

Patch by Baptiste Daroussin

Differential Revision: http://reviews.llvm.org/D11561

llvm-svn: 243749

8 years agoReport original thread ID for FreeBSD core files
Ed Maste [Fri, 31 Jul 2015 14:24:32 +0000 (14:24 +0000)]
Report original thread ID for FreeBSD core files

On FreeBSD the tid is (somewhat unintuitively) found in the pr_pid
field of the NT_PRSTATUS note. Collect it when parsing the note and
store it in the thread data.

For Linux I've left the original behaviour of using sequential TIDs
(0, 1, 2...) as I don't yet have code to obtain it.

Differential Revision: http://reviews.llvm.org/D11652

llvm-svn: 243748

8 years ago[clang-tidy] Support replacements in macro arguments in misc-inefficient-algorithm
Alexander Kornienko [Fri, 31 Jul 2015 13:34:58 +0000 (13:34 +0000)]
[clang-tidy] Support replacements in macro arguments in misc-inefficient-algorithm

Summary:
Support replacements in macro arguments in the
misc-inefficient-algorithm check.

Reviewers: klimek

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D11677

llvm-svn: 243747

8 years agoFix __floatsitf() for negative input
Sergey Dmitrouk [Fri, 31 Jul 2015 13:32:09 +0000 (13:32 +0000)]
Fix __floatsitf() for negative input

Negative numbers were handled properly initially, but got broken
during addressing review, so none of them did actually work.  Issues:
 * Wrong negation.
 * Wrong exponent calculation.

llvm-svn: 243746

8 years ago[regalloc] Make RegMask clobbers prevent merging vreg's into PhysRegs when hoisting...
Daniel Sanders [Fri, 31 Jul 2015 12:58:55 +0000 (12:58 +0000)]
[regalloc] Make RegMask clobbers prevent merging vreg's into PhysRegs when hoisting def's upwards.

Summary:
This prevents vreg260 and D7 from being merged in:
  %vreg260<def> = LDC1 ...
  JAL <ga:@sin>, <regmask ... list not containing D7 ...>
  %D7<def> = COPY %vreg260; ...
Doing so is not valid because the JAL clobbers the D7.

This fixes the almabench regression in the LLVM 3.7.0 release branch.

Reviewers: MatzeB

Subscribers: MatzeB, qcolombet, hans, llvm-commits

Differential Revision: http://reviews.llvm.org/D11649

llvm-svn: 243745

8 years agoRe-commit r243686 - [Sanitizers] [Bug 24151] Generalize type of offset in internal_mmap
Daniel Sanders [Fri, 31 Jul 2015 11:29:25 +0000 (11:29 +0000)]
Re-commit r243686 - [Sanitizers] [Bug 24151] Generalize type of offset in internal_mmap

The builder remains broken in the same way without this patch so this patch is
innocent.

llvm-svn: 243744

8 years ago[AArch64|DFSAN] XPASS custom.cc, as it got fixed by r243686
Renato Golin [Fri, 31 Jul 2015 10:50:29 +0000 (10:50 +0000)]
[AArch64|DFSAN] XPASS custom.cc, as it got fixed by r243686

llvm-svn: 243743

8 years agoEscape new line and tabs in the result of variable evaluation.
Hafiz Abid Qadeer [Fri, 31 Jul 2015 09:24:39 +0000 (09:24 +0000)]
Escape new line and tabs in the result of variable evaluation.

Expression evaluation error messages may have embedded new lines
and tabs. These should be escaped in the result string.

Patch by paulmaybee. Reviewed in http://reviews.llvm.org/D11570.

llvm-svn: 243741

8 years agoRevert r243686 - [Sanitizers] [Bug 24151] Generalize type of offset in internal_mmap
Daniel Sanders [Fri, 31 Jul 2015 09:04:37 +0000 (09:04 +0000)]
Revert r243686 - [Sanitizers] [Bug 24151] Generalize type of offset in internal_mmap

It's implicated in a buildbot failure and while the failure looks unrelated,
this commit is the only probably candidate in the blamelist.

llvm-svn: 243740

8 years agoOutline function Parser::ParseCXXClassMemberDeclarationWithPragmas(), NFC.
Alexey Bataev [Fri, 31 Jul 2015 08:42:25 +0000 (08:42 +0000)]
Outline function Parser::ParseCXXClassMemberDeclarationWithPragmas(), NFC.

Parsing of pragmas followed by a class member declaration is outlined into a separate function Parser::ParseCXXClassMemberDeclarationWithPragmas().

llvm-svn: 243739

8 years agoFix Clang-tidy misc-use-override warnings in some files in include/lldb/Core, unify...
Pavel Labath [Fri, 31 Jul 2015 08:17:10 +0000 (08:17 +0000)]
Fix Clang-tidy misc-use-override warnings in some files in include/lldb/Core, unify closing inclusion guards

Patch by Eugene Zelenko

Differential Revision: http://reviews.llvm.org/D11669

llvm-svn: 243738

8 years agoPrint message when configuring for standalone build.
Eric Fiselier [Fri, 31 Jul 2015 06:08:32 +0000 (06:08 +0000)]
Print message when configuring for standalone build.

llvm-svn: 243737

8 years agoMove the computation of whether a DWARF compile unit
Jason Molenda [Fri, 31 Jul 2015 05:47:00 +0000 (05:47 +0000)]
Move the computation of whether a DWARF compile unit
is optimized into DWARFCompileUnit, where it should have
been.  Next I'll need to call this from another section
of code for DWARF-in-.o-file behavior correctness.

llvm-svn: 243736

8 years agoCOFF: When resolving _load_config_used, add it as a GC root.
Peter Collingbourne [Fri, 31 Jul 2015 05:33:34 +0000 (05:33 +0000)]
COFF: When resolving _load_config_used, add it as a GC root.

This fixes the cases where the symbol is defined in a comdat or by bitcode.

Differential Revision: http://reviews.llvm.org/D11673

llvm-svn: 243735

8 years agoRefactor: Simplify boolean conditional return statements in lib/Target/NVPTX
Jingyue Wu [Fri, 31 Jul 2015 05:09:47 +0000 (05:09 +0000)]
Refactor: Simplify boolean conditional return statements in lib/Target/NVPTX

Summary: Use clang-tidy to simplify boolean conditional return statements

Reviewers: rafael, echristo, chandlerc, bkramer, craig.topper, dexonsmith, chapuni, eliben, jingyue, jholewinski

Subscribers: llvm-commits, jholewinski

Differential Revision: http://reviews.llvm.org/D9983

llvm-svn: 243734

8 years agoFix failing unique_ptr tests.
Eric Fiselier [Fri, 31 Jul 2015 04:34:25 +0000 (04:34 +0000)]
Fix failing unique_ptr tests.

When I was refactoring the unique_ptr.single.ctor tests I added a test
deleter, 'NCDeleter', to deleter.h. Other tests that include deleter.h
redefine the NCDeleter type causing test failures.

llvm-svn: 243733

8 years agoAdd another log to the Host channel for logging
Jason Molenda [Fri, 31 Jul 2015 04:21:25 +0000 (04:21 +0000)]
Add another log to the Host channel for logging
the actions taken when trying to locate binaries.

llvm-svn: 243732

8 years agoAMDGPU: Fix v16i32 to v16i8 truncstore
Matt Arsenault [Fri, 31 Jul 2015 04:12:04 +0000 (04:12 +0000)]
AMDGPU: Fix v16i32 to v16i8 truncstore

llvm-svn: 243731

8 years agoStart cleanup of unique_ptr tests.
Eric Fiselier [Fri, 31 Jul 2015 02:43:52 +0000 (02:43 +0000)]
Start cleanup of unique_ptr tests.

One of the last sections of tests that still fail in C++03 are the unique_ptr
tests. This patch begins cleaning up the tests and fixing C++03 failures.

The main changes of this patch:
  - The "Deleter" type in "deleter.h" tried to be "move-only" in C++03. However
    the move simulation no longer works (see "__rv"). "Deleter" is now copy
    constructible in C++03. However copying "Deleter" will "move" the test value
    instead of copying it.

  - Reduce the unique.ptr.single.ctor tests files from ~25 to 4. There is no
    reason the tests were split through so many files.

llvm-svn: 243730

8 years agoMark any as done and comment out extra methods until speaking to Marshall
Eric Fiselier [Fri, 31 Jul 2015 02:29:11 +0000 (02:29 +0000)]
Mark any as done and comment out extra methods until speaking to Marshall

llvm-svn: 243729

8 years ago[libcxx] Add <experimental/any> v2.
Eric Fiselier [Fri, 31 Jul 2015 02:24:58 +0000 (02:24 +0000)]
[libcxx] Add <experimental/any> v2.

Summary:
This patch adds the second revision of <experimental/any>.
I've been working from the LFTS draft found at this link. https://rawgit.com/cplusplus/fundamentals-ts/v1/fundamentals-ts.html#any

Reviewers: danalbert, jroelofs, K-ballo, mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D6762

llvm-svn: 243728

8 years agoMake sure the 2 method calls are sequenced.
Argyrios Kyrtzidis [Fri, 31 Jul 2015 01:39:23 +0000 (01:39 +0000)]
Make sure the 2 method calls are sequenced.

llvm-svn: 243727

8 years ago[libFuzzer] trace switch statements and apply mutations based on the expected case...
Kostya Serebryany [Fri, 31 Jul 2015 01:33:06 +0000 (01:33 +0000)]
[libFuzzer] trace switch statements and apply mutations based on the expected case values

llvm-svn: 243726

8 years agoAdd -Wno-error by default to work around failing compiler-rt builds
Eric Fiselier [Fri, 31 Jul 2015 01:25:01 +0000 (01:25 +0000)]
Add -Wno-error by default to work around failing compiler-rt builds

llvm-svn: 243725

8 years agoELFYAML: Enable parsing of EM_AMDGPU
Tom Stellard [Fri, 31 Jul 2015 01:15:15 +0000 (01:15 +0000)]
ELFYAML: Enable parsing of EM_AMDGPU

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D11263

llvm-svn: 243724

8 years agoAMDGPU/SI: Set DwarfRegNum
Matt Arsenault [Fri, 31 Jul 2015 01:12:10 +0000 (01:12 +0000)]
AMDGPU/SI: Set DwarfRegNum

This requires a fix in tablegen for the cast<int> from bits<16>
to work in the list initializer.

llvm-svn: 243723

8 years agoTableGen: Support folding casts from bits to int
Matt Arsenault [Fri, 31 Jul 2015 01:12:06 +0000 (01:12 +0000)]
TableGen: Support folding casts from bits to int

This is to fix an incorrect error when trying to initialize
DwarfNumbers with a !cast<int> of a bits initializer.
getValuesAsListOfInts("DwarfNumbers") would not see an IntInit
and instead the cast, so would give up.

It seems likely that this could be generalized to attempt
the convertInitializerTo for any type. I'm not really sure
why the existing code seems to special case the string cast cases
when convertInitializerTo seems like it should generally handle this
sort of thing.

llvm-svn: 243722

8 years ago[libFuzzer] prepare for __sanitizer_cov_trace_switch in libFuzzer and sanitizer cover...
Kostya Serebryany [Fri, 31 Jul 2015 01:07:12 +0000 (01:07 +0000)]
[libFuzzer] prepare for __sanitizer_cov_trace_switch in libFuzzer and sanitizer coverage. Also fix pedantic warnings

llvm-svn: 243721

8 years agodocs: Add information about helper scripts to HowToReleaseLLVM page
Tom Stellard [Fri, 31 Jul 2015 01:02:35 +0000 (01:02 +0000)]
docs: Add information about helper scripts to HowToReleaseLLVM page

Differential Revision: http://reviews.llvm.org/D10081

llvm-svn: 243720

8 years agoAMDGPU/SI: Remove unused pattern for f32 constant loads
Tom Stellard [Fri, 31 Jul 2015 01:02:32 +0000 (01:02 +0000)]
AMDGPU/SI: Remove unused pattern for f32 constant loads

Reviewers: arsenm

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D11603

llvm-svn: 243719

8 years ago[modules] Fix issue where building a module from a relative path when -working-direct...
Argyrios Kyrtzidis [Fri, 31 Jul 2015 00:58:32 +0000 (00:58 +0000)]
[modules] Fix issue where building a module from a relative path when -working-directory option is set, results in error.

The error was "module '<name>' was built in directory '<path>' but now resides in directory '<path>'
rdar://21330027

llvm-svn: 243718

8 years ago[ARM] Lower modulo operation to generate __aeabi_divmod on Android
Sumanth Gundapaneni [Fri, 31 Jul 2015 00:45:12 +0000 (00:45 +0000)]
[ARM] Lower modulo operation to generate __aeabi_divmod on Android

For a modulo (reminder) operation,
clang -target armv7-none-linux-gnueabi generates "__modsi3"
clang -target armv7-none-eabi generates "__aeabi_idivmod"
clang -target armv7-linux-androideabi generates "__modsi3"
Android bionic libc doesn't provide a __modsi3, instead it provides a
"__aeabi_idivmod". This patch fixes the LLVM ARMISelLowering to generate
the correct call when ever there is a modulo operation.

Differential Revision: http://reviews.llvm.org/D11661

llvm-svn: 243717

8 years agoAllow ValueObject::Dereference to dereference references.
Chaoren Lin [Fri, 31 Jul 2015 00:35:40 +0000 (00:35 +0000)]
Allow ValueObject::Dereference to dereference references.

Reviewers: clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D11667

llvm-svn: 243716

8 years agoFix build of lldb on Mavericks after svn rev.243511.
Dawn Perchik [Fri, 31 Jul 2015 00:26:46 +0000 (00:26 +0000)]
Fix build of lldb on Mavericks after svn rev.243511.

This patch adds a test for ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED
around the code which requires 10.10 support to link. Without this, lldb
gets unresolved references to _csr_check and _rootless_allows_task_for_pid.

Reviewed by: jasonmolenda
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11668

llvm-svn: 243715

8 years ago[asan] Fix signal() interception on 64-bit Android.
Evgeniy Stepanov [Fri, 31 Jul 2015 00:00:03 +0000 (00:00 +0000)]
[asan] Fix signal() interception on 64-bit Android.

The bsd_signal() special case only applies to 32-bit Android targets.
Fixes AddressSanitizer.SignalTest on aarch64/android.

llvm-svn: 243714

8 years agoCOFF: Move code for Identical COMDAT Folding to ICF.cpp.
Rui Ueyama [Thu, 30 Jul 2015 22:57:21 +0000 (22:57 +0000)]
COFF: Move code for Identical COMDAT Folding to ICF.cpp.

llvm-svn: 243701

8 years agoCOFF: Handle all COMDAT sections as non-GC root.
Rui Ueyama [Thu, 30 Jul 2015 22:48:45 +0000 (22:48 +0000)]
COFF: Handle all COMDAT sections as non-GC root.

I don't remember why I thought that only functions are subject
of garbage collection, but the comment here said so, which is
not correct. Moreover, the code just below the comment does not
do what the comment says -- it handles non-COMDAT, non-function
sections as GC root. As a result, it just handles non-COMDAT
sections as GC root.

This patch cleans that up by removing SectionChunk::isRoot and
use isCOMDAT instead.

llvm-svn: 243700

8 years agoReapply working parts of CMake cleanup.
Eric Fiselier [Thu, 30 Jul 2015 22:30:34 +0000 (22:30 +0000)]
Reapply working parts of CMake cleanup.

This patch adds the working parts of r243503. The difference with this patch
is that it doesn't include the HandleLLVMOptions.cmake file.

llvm-svn: 243698

8 years agoFix help message for target.language setting.
Dawn Perchik [Thu, 30 Jul 2015 22:10:08 +0000 (22:10 +0000)]
Fix help message for target.language setting.

llvm-svn: 243697

8 years agoMIR Parser: Report an error when a constant pool item is redefined.
Alex Lorenz [Thu, 30 Jul 2015 22:00:17 +0000 (22:00 +0000)]
MIR Parser: Report an error when a constant pool item is redefined.

llvm-svn: 243696

8 years agoMIR Parser: Report an error when a virtual register is redefined.
Alex Lorenz [Thu, 30 Jul 2015 21:54:10 +0000 (21:54 +0000)]
MIR Parser: Report an error when a virtual register is redefined.

llvm-svn: 243695

8 years agoSplit DWARF: Allow -gmlt/-gsplit-dwarf to override rather than complement each other
David Blaikie [Thu, 30 Jul 2015 21:42:22 +0000 (21:42 +0000)]
Split DWARF: Allow -gmlt/-gsplit-dwarf to override rather than complement each other

It doesn't make any sense to enable -gmlt with -gsplit-dwarf, since
-gmlt is designed for on-line symbolication (and -gsplit-dwarf normally
emits all the -gmlt data into the .o anyway - so there's nothing to
split out except redundant/duplicate info).

With this change they override each other, -gmlt -gsplit-dwarf is the
same as -gsplit-dwarf and -gsplit-dwarf -gmlt is the same as -gmlt.

llvm-svn: 243694

8 years agofix memcpy/memset/memmove lowering when optimizing for size
Sanjay Patel [Thu, 30 Jul 2015 21:41:50 +0000 (21:41 +0000)]
fix memcpy/memset/memmove lowering when optimizing for size

Fixing MinSize attribute handling was discussed in D11363.
This is a prerequisite patch to doing that.

The handling of OptSize when lowering mem* functions was broken
on Darwin because it wants to ignore -Os for these cases, but the
existing logic also made it ignore -Oz (MinSize).

The Linux change demonstrates a widespread problem. The backend
doesn't usually recognize the MinSize attribute by itself; it
assumes that if the MinSize attribute exists, then the OptSize
attribute must also exist.

Fixing this more generally will be a follow-on patch or two.

Differential Revision: http://reviews.llvm.org/D11568

llvm-svn: 243693