platform/upstream/llvm.git
6 years ago[X86] Add a DAG combines to turn vXi64 muls into VPMULDQ/VPMULUDQ if the upper bits...
Craig Topper [Mon, 25 Dec 2017 06:47:10 +0000 (06:47 +0000)]
[X86] Add a DAG combines to turn vXi64 muls into VPMULDQ/VPMULUDQ if the upper bits are all sign bits or zeros.

Normally we catch this during lowering, but vXi64 mul is considered legal when we have AVX512DQ.

This DAG combine allows us to avoid PMULLQ with AVX512DQ if we can prove its unnecessary. PMULLQ is 3 uops that take 4 cycles each. While pmuldq/pmuludq is only one 4 cycle uop.

llvm-svn: 321437

6 years ago[X86] Add avx512vl and avx512dq command lines to combine-pmuldq.ll to demonstrate...
Craig Topper [Mon, 25 Dec 2017 06:47:08 +0000 (06:47 +0000)]
[X86] Add avx512vl and avx512dq command lines to combine-pmuldq.ll to demonstrate where we fail to use pmuldq/pmuludq and use to pmullq instead.

It's nice that pmullq exists, but it has higher latency and probably lower throughput than pmuldq/pmuludq. We should prefer those if we can.

llvm-svn: 321436

6 years ago[libcxx] Suppress unused warning on apple.
Don Hinton [Mon, 25 Dec 2017 05:33:42 +0000 (05:33 +0000)]
[libcxx] Suppress unused warning on apple.

Summary:
This warning is already suppressed on non-apple platforms, so
this change just suppresses it on apple as well.

Reviewers: EricWF, lichray

Reviewed By: lichray

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D41248

llvm-svn: 321435

6 years ago[cmake] Always respect existing CMAKE_REQUIRED_FLAGS when adding additional ones.
Don Hinton [Mon, 25 Dec 2017 01:23:09 +0000 (01:23 +0000)]
[cmake] Always respect existing CMAKE_REQUIRED_FLAGS when adding additional ones.

Summary:
Always respect existing CMAKE_REQUIRED_FLAGS when adding
additional ones.  This is important when cross compiling where
--sysroot and -target were already added.

In particular, this is needed when cross compiling from Darwin to
Linux, since --sysroot is required to find headers and libraries.

Cmake has a similar bug in check_include_file[_cxx] where
CMAKE_REQUIRED_LIBRARIES isn't passed, which causes
try_compile to fail.
(please see https://gitlab.kitware.com/cmake/cmake/merge_requests/1620)

Reviewers: compnerd, silvas, beanz, brad.king

Reviewed By: compnerd

Subscribers: mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D41568

llvm-svn: 321434

6 years ago[X86] Make some helper methods static functions instead. NFC
Craig Topper [Mon, 25 Dec 2017 00:54:53 +0000 (00:54 +0000)]
[X86] Make some helper methods static functions instead. NFC

llvm-svn: 321433

6 years ago[X86] Use SelectionDAG::getFPExtendOrRound to simplify some code.
Craig Topper [Mon, 25 Dec 2017 00:54:51 +0000 (00:54 +0000)]
[X86] Use SelectionDAG::getFPExtendOrRound to simplify some code.

llvm-svn: 321432

6 years agoFix PR35739: chkstk and chkst2 should only be built for Windows
Dimitry Andric [Sun, 24 Dec 2017 21:11:32 +0000 (21:11 +0000)]
Fix PR35739: chkstk and chkst2 should only be built for Windows

As reported in PR35739, rL252927 added the Windows specific chkstk and
chkstk2 sources unconditionally, and since these are assembly without a
NO_EXEC_STACK_DIRECTIVE at the end, automated vulnerability scanners
warned about the objects having an executable stack.

Avoid the problem by only including these files when Windows is
targeted.

Reviewers: compnerd, rnk, martell

Reviewed By: martell

Subscribers: mstorsjo, mgorny, martell, javed.absar, #sanitizers, llvm-commits

Differential Revision: https://reviews.llvm.org/D41567

llvm-svn: 321431

6 years agoAllow relocations in rw sections to create plt entries.
Rafael Espindola [Sun, 24 Dec 2017 19:02:10 +0000 (19:02 +0000)]
Allow relocations in rw sections to create plt entries.

If a relocation cannot be implemented by the dynamic linker and the
section is rw, allow creating a plt entry to use as the function
address as if the section was ro.

This matches bfd and gold. It also matches our behavior with -z
notext.

llvm-svn: 321430

6 years ago[AST] Inline CompoundStmt contents into the parent allocation.
Benjamin Kramer [Sun, 24 Dec 2017 16:24:20 +0000 (16:24 +0000)]
[AST] Inline CompoundStmt contents into the parent allocation.

Saves a pointer on every CompoundStmt.

llvm-svn: 321429

6 years ago[AST] Convert AttributedStmt to llvm::TrailingObjects.
Benjamin Kramer [Sun, 24 Dec 2017 16:24:11 +0000 (16:24 +0000)]
[AST] Convert AttributedStmt to llvm::TrailingObjects.

No functionality change intended.

llvm-svn: 321428

6 years ago[OPENMP] Fix the tests for 32bits targets, NFC.
Alexey Bataev [Sun, 24 Dec 2017 14:18:33 +0000 (14:18 +0000)]
[OPENMP] Fix the tests for 32bits targets, NFC.

llvm-svn: 321427

6 years ago[X86][AVX] Add AVX1/AVX2 vmul tests
Simon Pilgrim [Sun, 24 Dec 2017 12:51:54 +0000 (12:51 +0000)]
[X86][AVX] Add AVX1/AVX2 vmul tests

llvm-svn: 321426

6 years agoMake helpers static. No functionality change.
Benjamin Kramer [Sun, 24 Dec 2017 12:46:22 +0000 (12:46 +0000)]
Make helpers static. No functionality change.

llvm-svn: 321425

6 years ago[X86][X87] Mark pseudo memory fold instructions as load/sideeffects (PR21160, PR34080...
Simon Pilgrim [Sun, 24 Dec 2017 12:20:21 +0000 (12:20 +0000)]
[X86][X87] Mark pseudo memory fold instructions as load/sideeffects (PR21160, PR34080, PR34454).

Match regular x87 memory fold instructions with load/sideeffects tags, to prevent the schedulers from re-ordering them across the fnstcw/fldcw sequences for truncating stores while they are still pseudo during the stack conversion pass.

llvm-svn: 321424

6 years ago[X86][X87] Renamed CHECK prefix, its not actually broken anymore just scheduled diffe...
Simon Pilgrim [Sun, 24 Dec 2017 10:25:01 +0000 (10:25 +0000)]
[X86][X87] Renamed CHECK prefix, its not actually broken anymore just scheduled differently

llvm-svn: 321423

6 years ago[X86][X87] Add another test case mentioned on PR34080
Simon Pilgrim [Sun, 24 Dec 2017 10:22:55 +0000 (10:22 +0000)]
[X86][X87] Add another test case mentioned on PR34080

Did my best to reduce this, but the X87 scheduling bug is hard to hit at the best of times...

llvm-svn: 321422

6 years ago[OMPT] Set and reset frame address when creating a task with dependences
Joachim Protze [Sun, 24 Dec 2017 07:30:23 +0000 (07:30 +0000)]
[OMPT] Set and reset frame address when creating a task with dependences

As for normal task creation, the task frame addresses need to be stored
for the encountering task.

Differential Revision: https://reviews.llvm.org/D41165

llvm-svn: 321421

6 years ago[X86] Fix (v2f64 (s/uint_to_fp (v2i1))) to avoid scalarization without AVX512DQ.
Craig Topper [Sun, 24 Dec 2017 06:51:36 +0000 (06:51 +0000)]
[X86] Fix (v2f64 (s/uint_to_fp (v2i1))) to avoid scalarization without AVX512DQ.

Previously we extended v2i1 to v2f64 and then tried to use cvtuqq2pd/cvtqq2pd, but that only works with avx512dq. So we ended up scalarizing it. Now we widen to v4i1 first and extend to v4i32.

llvm-svn: 321420

6 years ago[MC] - Teach llvm-mc to handle comdats whose names are numbers.
George Rimar [Sun, 24 Dec 2017 06:13:36 +0000 (06:13 +0000)]
[MC] - Teach llvm-mc to handle comdats whose names are numbers.

Currently llvm-mc ignores COMDATs whose names are numbers,
for example following code:

.section .foo,"G",@progbits,123,comdat

would produce no COMDATs at all.

Patch fixes the issue.

Differential revision: https://reviews.llvm.org/D41552

llvm-svn: 321419

6 years agoFix output section offset and contents when linker script uses memory region and...
Rafael Espindola [Sun, 24 Dec 2017 03:46:35 +0000 (03:46 +0000)]
Fix output section offset and contents when linker script uses memory region and data commands.

Advance the memory region offset when handling a linker script data
command such as BYTE or LONG.  Failure to advance the offset results
in corrupted output with overlapping sections.

Update tests to check for this combination of both a) memory regions
and b) data commands.

Fixes https://bugs.llvm.org/show_bug.cgi?id=35565

Patch by Owen Shaw!

llvm-svn: 321418

6 years ago[DAGCombiners] Don't turn ANDs to shuffles with zero so early. Give some other combin...
Craig Topper [Sun, 24 Dec 2017 02:05:18 +0000 (02:05 +0000)]
[DAGCombiners] Don't turn ANDs to shuffles with zero so early. Give some other combines a chance to run.

This moves the combine for turning ANDs into shuffle with zero out of SimplifyVBinOps and places it only in visitAND below the reassociate handling. This fixes the specific case I noticed where we failed to combine two ands with constants.

llvm-svn: 321417

6 years ago[X86] Add assembler predicates to BITALG/VBMI2/VNNI features to be consistent with...
Craig Topper [Sun, 24 Dec 2017 02:05:17 +0000 (02:05 +0000)]
[X86] Add assembler predicates to BITALG/VBMI2/VNNI features to be consistent with the other AVX512 ISAs.

llvm-svn: 321416

6 years ago[X86] Teach WidenMaskArithmetic to handle any constant buildvector on the RHS not...
Craig Topper [Sun, 24 Dec 2017 01:03:31 +0000 (01:03 +0000)]
[X86] Teach WidenMaskArithmetic to handle any constant buildvector on the RHS not just all zeros/ones.

llvm-svn: 321415

6 years ago[SelectionDAG] Teach SelectionDAG::getNode to constant fold zext/aext/sext of constan...
Craig Topper [Sat, 23 Dec 2017 20:21:29 +0000 (20:21 +0000)]
[SelectionDAG] Teach SelectionDAG::getNode to constant fold zext/aext/sext of constant build vectors.

llvm-svn: 321414

6 years ago[CallSiteSplitting] Remove isOrHeader restriction.
Florian Hahn [Sat, 23 Dec 2017 20:02:26 +0000 (20:02 +0000)]
[CallSiteSplitting] Remove isOrHeader restriction.

By following the single predecessors of the predecessors of the call
site, we do not need to restrict the control flow.

Reviewed By: junbuml, davide

Differential Revision: https://reviews.llvm.org/D40729

llvm-svn: 321413

6 years ago[clangd] Use Builder for symbol slabs, and use sorted-vector for storage
Sam McCall [Sat, 23 Dec 2017 19:38:03 +0000 (19:38 +0000)]
[clangd] Use Builder for symbol slabs, and use sorted-vector for storage

Summary:
This improves a few things:
 - the insert -> freeze -> read sequence is now enforced/communicated by the
   type system
 - SymbolSlab::const_iterator iterates over symbols, not over id-symbol pairs
 - we avoid permanently storing a second copy of the IDs, and the
   string map's hashtable

The slab size is now down to 21.8MB for the LLVM project.
Of this only 2.7MB is strings, the rest is #symbols * `sizeof(Symbol)`.
`sizeof(Symbol)` is currently 96, which seems too big - I think
SymbolInfo isn't efficiently packed. That's a topic for another patch!

Also added simple API to see the memory usage/#symbols of a slab, since
it seems likely we will continue to care about this.

Reviewers: ilya-biryukov

Subscribers: klimek, mgrang, cfe-commits

Differential Revision: https://reviews.llvm.org/D41506

llvm-svn: 321412

6 years ago[Index] Reduce size of SymbolInfo struct.
Sam McCall [Sat, 23 Dec 2017 19:31:24 +0000 (19:31 +0000)]
[Index] Reduce size of SymbolInfo struct.

Summary:
This is currently 16 bytes, the patch reduces it to 4.
(Building with clang on linux x84, I guess others are similar)

The only subfield that might need a bigger type is SymbolPropertySet,
I've moved it to the end of the struct so if it grows, SymbolInfo will
only be 8 bytes.

With a full index of namespace-scope symbols from the LLVM project (200k)
loaded into clangd, this saves ~2MB of RAM.

Reviewers: akyrtzi

Subscribers: ilya-biryukov, cfe-commits

Differential Revision: https://reviews.llvm.org/D41514

llvm-svn: 321411

6 years ago[NFC] Remove a cast rendered unnecessary by r321409
Faisal Vali [Sat, 23 Dec 2017 19:27:07 +0000 (19:27 +0000)]
[NFC] Remove a cast rendered unnecessary by r321409

See https://reviews.llvm.org/rC321409 for additional context.

llvm-svn: 321410

6 years ago[NFC] Update the template-parameter parsers and analyzers to return NamedDecl (vs...
Faisal Vali [Sat, 23 Dec 2017 18:56:34 +0000 (18:56 +0000)]
[NFC] Update the template-parameter parsers and analyzers to return NamedDecl (vs Decl)

This patch addresses a FIXME and has the template-parameter processing functions return a more derived common type NamedDecl (as opposed to a type needlessly higher up in the inheritance hierarchy : Decl).

llvm-svn: 321409

6 years ago[X86] Remove type restrictions from WidenMaskArithmetic.
Craig Topper [Sat, 23 Dec 2017 18:53:05 +0000 (18:53 +0000)]
[X86] Remove type restrictions from WidenMaskArithmetic.

This can help AVX-512 code where mask types are legal allowing us to remove extends and truncates to/from mask types.

llvm-svn: 321408

6 years ago[X86] In WidenMaskArithmetic, make sure we check the input type of a truncate on N1.
Craig Topper [Sat, 23 Dec 2017 18:53:03 +0000 (18:53 +0000)]
[X86] In WidenMaskArithmetic, make sure we check the input type of a truncate on N1.

Later in the code we explicitly bypass the truncate so we should be checking its type to make sure that it's safe.

llvm-svn: 321407

6 years ago[X86] Remove unneeded EVT variable. NFC
Craig Topper [Sat, 23 Dec 2017 18:53:01 +0000 (18:53 +0000)]
[X86] Remove unneeded EVT variable. NFC

Immediately after it is created we check if its equal to another EVT. Then we inconsistently use one or the other variables in the code below.

Instead do the equality check directly on the getValueType result and remove the variable. Use the origina VT variable throughout the remaining code.

llvm-svn: 321406

6 years ago[X86][X87] Wrap FpI_ pseudo to use PseudoI. NFCI.
Simon Pilgrim [Sat, 23 Dec 2017 17:25:59 +0000 (17:25 +0000)]
[X86][X87] Wrap FpI_ pseudo to use PseudoI. NFCI.

llvm-svn: 321405

6 years agoDetemplate reportDuplicate.
Rafael Espindola [Sat, 23 Dec 2017 17:21:39 +0000 (17:21 +0000)]
Detemplate reportDuplicate.

We normally avoid "switch (Config->EKind)", but in this case I think
it is worth it.

It is only executed when there is an error and it allows detemplating
a lot of code.

llvm-svn: 321404

6 years ago[ELF] - Fix mistype in comment. NFC.
George Rimar [Sat, 23 Dec 2017 16:34:58 +0000 (16:34 +0000)]
[ELF] - Fix mistype in comment. NFC.

llvm-svn: 321403

6 years ago[SCCP] Manually fold branches on undef.
Davide Italiano [Sat, 23 Dec 2017 15:06:30 +0000 (15:06 +0000)]
[SCCP] Manually fold branches on undef.

This code was originally removed and replace with an assertion
because believed unnecessary. It turns out there was simply
no test coverage for this case, and the constant folder doesn't
yet know about patterns like `br undef %label1, %label2`.
Presumably at some point the constant folder might learn about
these patterns, but it's a broader change.
A testcase will be added to make sure this doesn't regress again
in the future.

Fixes PR35723.

llvm-svn: 321402

6 years ago[X86] Add default InstrItinClass to PseudoI
Simon Pilgrim [Sat, 23 Dec 2017 10:47:21 +0000 (10:47 +0000)]
[X86] Add default InstrItinClass to PseudoI

This will be used to help tidyup existing pseudos that we've added scheduling info to.

llvm-svn: 321401

6 years ago[ELF] - Allow using PLT relocations when "-z notext" is given.
George Rimar [Sat, 23 Dec 2017 09:00:37 +0000 (09:00 +0000)]
[ELF] - Allow using PLT relocations when "-z notext" is given.

This is part of PR35720.

Currently LLD allows dynamic relocations against text when -z notext is given.
Though for non-PIC relocations like R_X86_64_PC32 that does not work,
we produce "relocation R_X86_64_PC32 cannot be used against shared object;"
error because they may overflow in runtime.

Solution implemented is to use PLT for them.

Differential revision: https://reviews.llvm.org/D41541

llvm-svn: 321400

6 years ago[X86] Pass the right VT to the getZeroExtendInReg introduced in r321398
Craig Topper [Sat, 23 Dec 2017 06:52:03 +0000 (06:52 +0000)]
[X86] Pass the right VT to the getZeroExtendInReg introduced in r321398

Apparently we don't have tests for this which I didn't realize before. I'll try to fix that but wanted to fix the obvious bug.

llvm-svn: 321399

6 years ago[X86] Use SelectionDAG::getZeroExtendInReg instead of implementing it manually.
Craig Topper [Sat, 23 Dec 2017 02:54:52 +0000 (02:54 +0000)]
[X86] Use SelectionDAG::getZeroExtendInReg instead of implementing it manually.

llvm-svn: 321398

6 years ago[SelectionDAG][X86] Don't use ->getValueType(0) after a call to getOperand to get...
Craig Topper [Sat, 23 Dec 2017 02:54:50 +0000 (02:54 +0000)]
[SelectionDAG][X86] Don't use ->getValueType(0) after a call to getOperand to get the type of the operand.

getOperand returns an SDValue that contains the node and the result number. There is no guarantee that the result number if 0. By using the -> operator we are calling SDNode::getValueType rather than SDValue::getValueType. This requires supplying a result number and we shouldn't assume it was 0.

I don't have a test case. Just noticed while cleaning up some other code and saw that it occurred in other places.

llvm-svn: 321397

6 years ago[ODRHash] Disable hashing on methods.
Richard Trieu [Sat, 23 Dec 2017 01:35:32 +0000 (01:35 +0000)]
[ODRHash] Disable hashing on methods.

Turn off hashing for class methods, but leave it on for other functions.  This
should get the buildbot to green for the time being.

llvm-svn: 321396

6 years ago[ODRHash] Support ODR violation detection in functions.
Richard Trieu [Sat, 23 Dec 2017 00:41:01 +0000 (00:41 +0000)]
[ODRHash] Support ODR violation detection in functions.

Extend the hashing to functions, which allows detection of function definition
mismatches across modules.  This is a re-commit of r320230.

llvm-svn: 321395

6 years ago[Sanitizers] Export aligned new/delete from runtimes.
Alex Shlyapnikov [Sat, 23 Dec 2017 00:30:51 +0000 (00:30 +0000)]
[Sanitizers] Export aligned new/delete from runtimes.

Summary:
Export aligned new/delete to make dynamic runtimes work again.

Remove all valid new/delete cases from ASan test, there's a test in
common for that.

Reviewers: eugenis

Subscribers: srhines, kubamracek, #sanitizers, llvm-commits

Differential Revision: https://reviews.llvm.org/D41548

llvm-svn: 321394

6 years agoDetemplate isCompatible(). NFC.
Rafael Espindola [Sat, 23 Dec 2017 00:04:34 +0000 (00:04 +0000)]
Detemplate isCompatible(). NFC.

llvm-svn: 321393

6 years agoAdd an explicit `LLVM_FALLTHROUGH` annotation to an intentional
Chandler Carruth [Fri, 22 Dec 2017 23:29:49 +0000 (23:29 +0000)]
Add an explicit `LLVM_FALLTHROUGH` annotation to an intentional
fallthrough. Fixes GCC and Clang warnings about this.

llvm-svn: 321392

6 years ago[DAG] Add missing case check from findbaseoffset merge from r321389.
Nirav Dave [Fri, 22 Dec 2017 22:06:56 +0000 (22:06 +0000)]
[DAG] Add missing case check from findbaseoffset merge from r321389.

llvm-svn: 321391

6 years agoResult of subtracting two symbols should be absolute.
Rafael Espindola [Fri, 22 Dec 2017 21:55:28 +0000 (21:55 +0000)]
Result of subtracting two symbols should be absolute.

When two linker script symbols are subtracted, the result should be absolute.

This is the behavior of binutils' ld.

Patch by Erick Reyes!

llvm-svn: 321390

6 years agoIntegrate findBaseOffset address analyses to BaseIndexOffset. NFCI.
Nirav Dave [Fri, 22 Dec 2017 21:20:55 +0000 (21:20 +0000)]
Integrate findBaseOffset address analyses to BaseIndexOffset. NFCI.

BaseIndexOffset supercedes findBaseOffset analysis save only Constant
Pool addresses. Migrate analysis to BaseIndexOffset.

Relanding after correcting base address matching check.

llvm-svn: 321389

6 years ago[git-llvm] Handle files ignored by svn correctly
Walter Lee [Fri, 22 Dec 2017 21:19:13 +0000 (21:19 +0000)]
[git-llvm] Handle files ignored by svn correctly

Summary: Correctly handle files ignored by svn (such as .o files,
which are ignored by default) by adding "--no-ignore" flag to "svn
status" and "svn add".

Differential Revision: https://reviews.llvm.org/D41404

llvm-svn: 321388

6 years agoUnbreak the build. Combining chrono with Optional is annoying.
Benjamin Kramer [Fri, 22 Dec 2017 21:18:50 +0000 (21:18 +0000)]
Unbreak the build. Combining chrono with Optional is annoying.

llvm-svn: 321387

6 years ago[OPENMP] Captured arguments of the capturable clauses by value.
Alexey Bataev [Fri, 22 Dec 2017 21:01:52 +0000 (21:01 +0000)]
[OPENMP] Captured arguments of the capturable clauses by value.

If the clause is applied to the combined construct and has captured
expression, try to capture this expression by value rather than by
reference.

llvm-svn: 321386

6 years ago[WebAssembly] Increase test coverage for weak aliases
Sam Clegg [Fri, 22 Dec 2017 20:35:19 +0000 (20:35 +0000)]
[WebAssembly] Increase test coverage for weak aliases

LLVM-side is now fixed

Differential Revision: https://reviews.llvm.org/D41511

llvm-svn: 321385

6 years ago[WebAssembly] MC: Fix for address taken aliases
Sam Clegg [Fri, 22 Dec 2017 20:31:39 +0000 (20:31 +0000)]
[WebAssembly] MC: Fix for address taken aliases

Previously, taking the address for an alias would result in:
 "Symbol not found in table index space"

Increase test coverage for weak aliases.

This code should be more efficient too as it avoids building
the `IsAddressTaken` set.

Differential Revision: https://reviews.llvm.org/D41510

llvm-svn: 321384

6 years agoReland "[mips][compiler-rt] Provide 64bit atomic add and sub"
Simon Dardis [Fri, 22 Dec 2017 20:31:07 +0000 (20:31 +0000)]
Reland "[mips][compiler-rt] Provide 64bit atomic add and sub"

r318733 introduced a build failure for native MIPS32 systems for xray due
to the lack of __sync_fetch_and_add / __syn_fetch_and_sub support. This patch
extends the existing support providing atomics so that xray can be
successfully built.

The initial patch was reverted in r321292, as I suspected it may have caused the
buildbot failure. Another patch in the updates the bot fetched caused the test
failures which was reverted.

Reviewers: atanasyan, dberris

Differential Revision: https://reviews.llvm.org/D40385

llvm-svn: 321383

6 years ago[MemorySSA] Allow reordering of loads that alias in the presence of volatile loads.
Alina Sbirlea [Fri, 22 Dec 2017 19:54:03 +0000 (19:54 +0000)]
[MemorySSA] Allow reordering of loads that alias in the presence of volatile loads.

Summary:
Make MemorySSA allow reordering of two loads that may alias, when one is volatile.
This makes MemorySSA less conservative and behaving the same as the AliasSetTracker.
For more context, see D16875.

LLVM language reference: "The optimizers must not change the number of volatile operations or change their order of execution relative to other volatile operations. The optimizers may change the order of volatile operations relative to non-volatile operations. This is not Java’s “volatile” and has no cross-thread synchronization behavior."

Reviewers: george.burgess.iv, dberlin

Subscribers: sanjoy, reames, hfinkel, llvm-commits, Prazek

Differential Revision: https://reviews.llvm.org/D41525

llvm-svn: 321382

6 years agoNote that the test .tar.xz has been updated.
Rafael Espindola [Fri, 22 Dec 2017 19:37:32 +0000 (19:37 +0000)]
Note that the test .tar.xz has been updated.

The difference is the avoidance of a few absolute paths. Thanks to
Galina Kistanova for the patch.

llvm-svn: 321381

6 years agoRevert "[DAG] Integrate findBaseOffset address analyses to BaseIndexOffset. NFCI."
Nirav Dave [Fri, 22 Dec 2017 19:33:56 +0000 (19:33 +0000)]
Revert "[DAG] Integrate findBaseOffset address analyses to BaseIndexOffset. NFCI."

which was causing miscompilations in for some test-suite components.

This reverts commit 3e9de9ff0f3162920a2a3cba51c7dc14b54b4d16.

llvm-svn: 321380

6 years ago[OMPT] Add missing initialization in nested_lwt.c test case
Paul Osmialowski [Fri, 22 Dec 2017 19:24:06 +0000 (19:24 +0000)]
[OMPT] Add missing initialization in nested_lwt.c test case

Without this initialization this test case tend to fail.

Differential Revision: https://reviews.llvm.org/D41542

llvm-svn: 321379

6 years agoReformatting Fuchsia overloaded operator test
Julie Hockett [Fri, 22 Dec 2017 19:15:05 +0000 (19:15 +0000)]
Reformatting Fuchsia overloaded operator test

Fixing parameters in clang-tidy fuchsia-overloaded-operator test case

llvm-svn: 321378

6 years ago[SimplifyCFG] Don't do if-conversion if there is a long dependence chain
Guozhi Wei [Fri, 22 Dec 2017 18:54:04 +0000 (18:54 +0000)]
[SimplifyCFG] Don't do if-conversion if there is a long dependence chain

If after if-conversion, most of the instructions in this new BB construct a long and slow dependence chain, it may be slower than cmp/branch, even if the branch has a high miss rate, because the control dependence is transformed into data dependence, and control dependence can be speculated, and thus, the second part can execute in parallel with the first part on modern OOO processor.

This patch checks for the long dependence chain, and give up if-conversion if find one.

Differential Revision: https://reviews.llvm.org/D39352

llvm-svn: 321377

6 years ago[ThinLTO][CachePruning] explicitly disable pruning
Ben Dunbobbin [Fri, 22 Dec 2017 18:32:15 +0000 (18:32 +0000)]
[ThinLTO][CachePruning] explicitly disable pruning

In https://reviews.llvm.org/rL321077 and https://reviews.llvm.org/D41231 I fixed a regression in the c-api which prevented the pruning from being *effectively* disabled.

However this approach, helpfully recommended by @labath, is cleaner.
It is also nice to remove the weasel words about effectively disabling from the api comments.

Differential Revision: https://reviews.llvm.org/D41497

llvm-svn: 321376

6 years ago(Re-landing) Expose a TargetMachine::getTargetTransformInfo function
Sanjoy Das [Fri, 22 Dec 2017 18:21:59 +0000 (18:21 +0000)]
(Re-landing) Expose a TargetMachine::getTargetTransformInfo function

Re-land r321234.  It had to be reverted because it broke the shared
library build.  The shared library build broke because there was a
missing LLVMBuild dependency from lib/Passes (which calls
TargetMachine::getTargetIRAnalysis) to lib/Target.  As far as I can
tell, this problem was always there but was somehow masked
before (perhaps because TargetMachine::getTargetIRAnalysis was a
virtual function).

Original commit message:

This makes the TargetMachine interface a bit simpler.  We still need
the std::function in TargetIRAnalysis to avoid having to add a
dependency from Analysis to Target.

See discussion:
http://lists.llvm.org/pipermail/llvm-dev/2017-December/119749.html

I avoided adding all of the backend owners to this review since the
change is simple, but let me know if you feel differently about this.

Reviewers: echristo, MatzeB, hfinkel

Reviewed By: hfinkel

Subscribers: jholewinski, jfb, arsenm, dschuff, mcrosier, sdardis, nemanjai, nhaehnle, javed.absar, sbc100, jgravelle-google, aheejin, kbarton, llvm-commits

Differential Revision: https://reviews.llvm.org/D41464

llvm-svn: 321375

6 years ago[Sanitizers] Disable new_delete_test.cc on Android until it's supported.
Alex Shlyapnikov [Fri, 22 Dec 2017 18:19:59 +0000 (18:19 +0000)]
[Sanitizers] Disable new_delete_test.cc on Android until it's supported.

llvm-svn: 321374

6 years ago[Sanitizers, CMake] Basic sanitizer Solaris support (PR 33274)
Alex Shlyapnikov [Fri, 22 Dec 2017 18:04:20 +0000 (18:04 +0000)]
[Sanitizers, CMake] Basic sanitizer Solaris support (PR 33274)

Summary:
This patch, on top of https://reviews.llvm.org/D40898, contains the build system
changes necessary to enable the Solaris/x86 sanitizer port.

The only issue of note is the libclang_rt.sancov_{begin, end} libraries: clang relies on the
linker automatically defining __start_SECNAME and __stop_SECNAME labels for
sections whose names are valid C identifiers.  This is a GNU ld extension not present
in the ELF gABI, also implemented by gold and lld, but not by Solaris ld.  To work around
this, I automatically link the sancov_{begin,end} libraries into every executable for now.
There seems to be now way to build individual startup objects like crtbegin.o/crtend.o,
so I've followed the lead of libclang_rt.asan-preinit which also contains just a single
object.

Reviewers: kcc, alekseyshl

Reviewed By: alekseyshl

Subscribers: srhines, kubamracek, mgorny, fedor.sergeev, llvm-commits, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D40899

llvm-svn: 321373

6 years ago[AMDGPU][MC] Corrected handling of negative expressions
Dmitry Preobrazhensky [Fri, 22 Dec 2017 18:03:35 +0000 (18:03 +0000)]
[AMDGPU][MC] Corrected handling of negative expressions

See bug 35716: https://bugs.llvm.org/show_bug.cgi?id=35716

Reviewers: artem.tamazov, arsenm

Differential Revision: https://reviews.llvm.org/D41488

llvm-svn: 321372

6 years ago[CodeGen] Fix noalias annotations for memcpy/memmove.
Michael Kruse [Fri, 22 Dec 2017 17:44:53 +0000 (17:44 +0000)]
[CodeGen] Fix noalias annotations for memcpy/memmove.

Memory transfer instructions take two pointers. It is not defined to
which of those a noalias annotation applies. To ensure correctness,
do not add noalias annotations to memcpy/memmove instructions anymore.

The caused a miscompile with test-suite's MultiSource/Applications/obsequi.
Since r321138, the MemCpyOpt pass would remove memcpy/memmove calls if
known to copy uninitialized memory. In that case, it was initialized
by another memcpy, but the annotation for the target pointer said
it would not alias. The annotation was actually meant for the source
pointer, which was was an alloca and could not alias with the target
pointer.

llvm-svn: 321371

6 years ago[SelectionDAG] Reverse the order of operands in the ISD::ADD created by TargetLowerin...
Craig Topper [Fri, 22 Dec 2017 17:18:13 +0000 (17:18 +0000)]
[SelectionDAG] Reverse the order of operands in the ISD::ADD created by TargetLowering::getVectorElementPointer so that the FrameIndex is on the left.

This seems to improve X86's ability to match this into an address computation. Otherwise the other operand gets assigned to the base register and the stack pointer + frame index ends up in the index register. But index registers can't encode ESP/RSP so we end up having to move it into another register to meet the constraint.

I could try to improve the address matcher in X86, but swapping the producer seemed easier. Several other places already have the operands in this order so this is at least consistent.

llvm-svn: 321370

6 years ago[X86] When lowering insert_vector_elt/extract_vector_elt of vXi1 with a non-constant...
Craig Topper [Fri, 22 Dec 2017 17:18:11 +0000 (17:18 +0000)]
[X86] When lowering insert_vector_elt/extract_vector_elt of vXi1 with a non-constant index just use either a 128-bit type or the vXi8 type with the correct number of elements.

Despite what the comment said there isn't better codegen for 512-bit vectors. The 128/256/512 bit implementation jus stores to memory and loads an element. There's no advantage to doing that with a larger size. In fact in many cases it causes a stack realignment and generates worse code.

llvm-svn: 321369

6 years ago[X86] Improve the printing of address mode during isel matching.
Craig Topper [Fri, 22 Dec 2017 17:18:10 +0000 (17:18 +0000)]
[X86] Improve the printing of address mode during isel matching.

Fix some inconsistent new line behavior and only print the FrameIndex when the address mode is a FrameIndexBase addressing mode.

llvm-svn: 321368

6 years ago[AMDGPU][MC] Corrected parsing of optional operands for ds_swizzle_b32
Dmitry Preobrazhensky [Fri, 22 Dec 2017 17:13:28 +0000 (17:13 +0000)]
[AMDGPU][MC] Corrected parsing of optional operands for ds_swizzle_b32

See bug 35645: https://bugs.llvm.org/show_bug.cgi?id=35645

Reviewers: artem.tamazov, arsenm

Differential Revision: https://reviews.llvm.org/D41186

llvm-svn: 321367

6 years ago[InlineCost] Find more free binary operations
Haicheng Wu [Fri, 22 Dec 2017 17:09:09 +0000 (17:09 +0000)]
[InlineCost] Find more free binary operations

Currently, inline cost model considers a binary operator as free only if both
its operands are constants. Some simple cases are missing such as a + 0, a - a,
etc. This patch modifies visitBinaryOperator() to call SimplifyBinOp() without
going through simplifyInstruction() to get rid of the constant restriction.
Thus, visitAnd() and visitOr() are not needed.

Differential Revision: https://reviews.llvm.org/D41494

llvm-svn: 321366

6 years ago[MSan,TSan] Add aligned new/delete interceptors.
Alex Shlyapnikov [Fri, 22 Dec 2017 17:02:17 +0000 (17:02 +0000)]
[MSan,TSan] Add aligned new/delete interceptors.

Summary:
Providing aligned new/delete implementations to match ASan.
Unlike ASan, MSan and TSan do not perform any additional checks
on overaligned memory, hence no sanitizer specific tests.

Reviewers: eugenis

Subscribers: kubamracek, #sanitizers, llvm-commits

Differential Revision: https://reviews.llvm.org/D41532

llvm-svn: 321365

6 years ago[DAG] Integrate findBaseOffset address analyses to BaseIndexOffset. NFCI.
Nirav Dave [Fri, 22 Dec 2017 16:59:09 +0000 (16:59 +0000)]
[DAG] Integrate findBaseOffset address analyses to BaseIndexOffset. NFCI.

BaseIndexOffset supercedes findBaseOffset analysis save only Constant
Pool addresses. Migrate analysis to BaseIndexOffset.

llvm-svn: 321364

6 years ago[clang-tidy] Adding Fuchsia checker for overloaded operators
Julie Hockett [Fri, 22 Dec 2017 16:52:25 +0000 (16:52 +0000)]
[clang-tidy] Adding Fuchsia checker for overloaded operators

Adds a check to the Fuchsia module to warn if an operator is overloaded,
except move and copy operators.

See https://fuchsia.googlesource.com/zircon/+/master/docs/cxx.md for
reference.

Differential Revision: https://reviews.llvm.org/D41363

llvm-svn: 321363

6 years ago[OMPT] Fix failing test cases for gcc on Ubuntu
Joachim Protze [Fri, 22 Dec 2017 16:40:32 +0000 (16:40 +0000)]
[OMPT] Fix failing test cases for gcc on Ubuntu

The compiler warns that _BSD_SOURCE is deprecated and _DEFAULT_SOURCE should
be used instead. We keep _BSD_SOURCE for older compilers, that don't know
about _DEFAULT_SOURCE.

The linker drops the tool when linking, since there is no visible need for
the library. So we need to tell the linker, that the tool should be linked
anyway.

Differential Revision: https://reviews.llvm.org/D41499

llvm-svn: 321362

6 years agoRemove unused positional argument for printf
Joachim Protze [Fri, 22 Dec 2017 16:40:26 +0000 (16:40 +0000)]
Remove unused positional argument for printf

The format string for hints only prints the second argument (string) and drops
the first argument (hint id). Depending on how you read the POSIX text for
printf, this could be valid. But for practical reason, i.e., unpacking the
va_list passed to printf based on the formating information, it makes sense
to fix the implementation and not pass the id for hint.

Failing testcases were:

misc_bugs/teams-reduction.c
ompt/parallel/not_enough_threads.c

Differential Revision: https://reviews.llvm.org/D41504

llvm-svn: 321361

6 years agoUnit tests for TBAA metadata generation.
Serge Pavlov [Fri, 22 Dec 2017 15:22:45 +0000 (15:22 +0000)]
Unit tests for TBAA metadata generation.

Now tests for metadata created by clang involve compiling code snippets
placed into c/c++ source files and matching interesting patterns in the
obtained textual representation of IR. Writting such tests is a painful
process as metadata often form complex tree-like structures but textual
representation of IR contains only a pile of metadata at the module end.

This change implements IR matchers that may be used to match required
patterns in the binary IR representation. In this case the metadata
structure is not broken and creation of match patterns is easier.

The change adds unit tests for TBAA metadata generation.

Differential Revision: https://reviews.llvm.org/D41433

llvm-svn: 321360

6 years ago[AMDGPU][MC] Added support of 256- and 512-bit tuples of ttmp registers
Dmitry Preobrazhensky [Fri, 22 Dec 2017 15:18:06 +0000 (15:18 +0000)]
[AMDGPU][MC] Added support of 256- and 512-bit tuples of ttmp registers

See bug 35561: https://bugs.llvm.org/show_bug.cgi?id=35561

This patch also affects implementation of SGPR and VGPR registers though changes are cosmetic.

Reviewers: artem.tamazov, arsenm

Differential Revision: https://reviews.llvm.org/D41437

llvm-svn: 321359

6 years ago[clangd] Add a tool to build YAML-format global symbols.
Haojian Wu [Fri, 22 Dec 2017 14:38:05 +0000 (14:38 +0000)]
[clangd] Add a tool to build YAML-format global symbols.

Summary:
The tools is used to generate global symbols for clangd (global code completion),
The format is YAML, which is only for **experiment**.

Usage:
./bin/global-symbol-builder </path/to/llvm-dir> > global-symbols.yaml

TEST:
used the tool to generate global symbols for LLVM (~72MB).

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: klimek, mgorny, ilya-biryukov, cfe-commits

Differential Revision: https://reviews.llvm.org/D41491

llvm-svn: 321358

6 years ago[mips] Add test case to check that calls to mcount follow long calls / short calls...
Simon Atanasyan [Fri, 22 Dec 2017 13:45:46 +0000 (13:45 +0000)]
[mips] Add test case to check that calls to mcount follow long calls / short calls options. NFC

llvm-svn: 321357

6 years ago[ARM GlobalISel] Support G_INTTOPTR and G_PTRTOINT for s32
Diana Picus [Fri, 22 Dec 2017 13:05:51 +0000 (13:05 +0000)]
[ARM GlobalISel] Support G_INTTOPTR and G_PTRTOINT for s32

Mark conversions between pointers and 32-bit scalars as legal, map them
to the GPR and select to a simple COPY.

llvm-svn: 321356

6 years agodebugserver: Propagate environment in launch-mode (pr35671)
Pavel Labath [Fri, 22 Dec 2017 11:09:21 +0000 (11:09 +0000)]
debugserver: Propagate environment in launch-mode (pr35671)

Summary:
Make sure we propagate environment when starting debugserver with a pre-loaded
inferior. AFAIK, RNBRunLoopLaunchInferior is only called in pre-loaded inferior
scenario, so we can just pick up the debugserver environment instead of trying
to construct an envp from the (empty) context.

This makes debugserver pass an test added for an equivalent lldb-server fix.

Reviewers: jasonmolenda, clayborg

Subscribers: JDevlieghere, lldb-commits

Differential Revision: https://reviews.llvm.org/D41352

llvm-svn: 321355

6 years ago[ARM GlobalISel] Support pointer constants
Diana Picus [Fri, 22 Dec 2017 11:09:18 +0000 (11:09 +0000)]
[ARM GlobalISel] Support pointer constants

Pointer constants are pretty rare, since we usually represent them as
integer constants and then cast to pointer. One notable exception is the
null pointer constant, which is represented directly as a G_CONSTANT 0
with pointer type. Mark it as legal and make sure it is selected like
any other integer constant.

llvm-svn: 321354

6 years agoEnable TestReadMemCString on non-darwin targets
Pavel Labath [Fri, 22 Dec 2017 10:26:59 +0000 (10:26 +0000)]
Enable TestReadMemCString on non-darwin targets

The test works fine on linux, and I believe other targets should not
have an issue with as well. If they do, we can start blacklisting
instead of whitelisting.

The idea of using "-1" as the value of the pointer on non-apple targets
backfired, as it fails the "address != LLDB_INVALID_ADDRESS" test (-1 is
the value of LLDB_INVALID_ADDRESS).  However, it should be safe to use
0x100 for other targets as well. The first page of memory is generally
kept unreadable to catch null pointer dereferences.

llvm-svn: 321353

6 years ago[CodeGen] Represent array members in new-format TBAA type descriptors
Ivan A. Kosarev [Fri, 22 Dec 2017 09:57:24 +0000 (09:57 +0000)]
[CodeGen] Represent array members in new-format TBAA type descriptors

Now that in the new TBAA format we allow access types to be of
any object types, including aggregate ones, it becomes critical
to specify types of all sub-objects such aggregates comprise as
their members. In order to meet this requirement, this patch
enables generation of field descriptors for members of array
types.

Differential Revision: https://reviews.llvm.org/D41399

llvm-svn: 321352

6 years ago[CodeGen] Support generation of TBAA info in the new format
Ivan A. Kosarev [Fri, 22 Dec 2017 09:54:23 +0000 (09:54 +0000)]
[CodeGen] Support generation of TBAA info in the new format

Now that the MDBuilder helpers generating TBAA type and access
descriptors in the new format are in place, we can teach clang to
use them when requested.

Differential Revision: https://reviews.llvm.org/D41394

llvm-svn: 321351

6 years ago[clangd] Simplify GlobalCompilationDatabase, cache missing GCDs
Sam McCall [Fri, 22 Dec 2017 09:47:34 +0000 (09:47 +0000)]
[clangd] Simplify GlobalCompilationDatabase, cache missing GCDs

llvm-svn: 321350

6 years ago[DAGCombine] Revert r321259
Sam Parker [Fri, 22 Dec 2017 08:36:25 +0000 (08:36 +0000)]
[DAGCombine] Revert r321259

Improve ReduceLoadWidth for SRL Patch is causing an issue on the
PPC64 BE santizer.

llvm-svn: 321349

6 years ago[clangd] Improve packing of Symbol struct. NFC
Sam McCall [Fri, 22 Dec 2017 08:12:39 +0000 (08:12 +0000)]
[clangd] Improve packing of Symbol struct. NFC

llvm-svn: 321348

6 years agoFix unused variable warning in SemaTemplate. NFC
Sam McCall [Fri, 22 Dec 2017 07:09:51 +0000 (07:09 +0000)]
Fix unused variable warning in SemaTemplate. NFC

llvm-svn: 321346

6 years agoRewrite the cached map used for locating the most precise DIE among
Chandler Carruth [Fri, 22 Dec 2017 06:41:23 +0000 (06:41 +0000)]
Rewrite the cached map used for locating the most precise DIE among
inlined subroutines for a given address.

This is essentially the hot path of llvm-symbolizer when extracting
inlined frames during symbolization. Previously, we would read every
subprogram and every inlined subroutine, building a std::map across the
entire PC space to the best DIE, and then do only a handful of queries
as we symbolized a backtrace. A huge fraction of the time was spent
building the map itself.

This patch changes it two a two-level system. First, we just build a map
from PC-interval to DWARF subprograms. These are required to be disjoint
and so constructing this is pretty easy. Second, we build a map *just*
for the inlined subroutines within the subprogram containing the query
address. This allows us to look at far fewer DIEs and build a *much*
smaller set of cached maps in the llvm-symbolizer case where only a few
address get symbolized during the entire run.

It also builds both interval maps in a very different way. It constructs
a single flat vector of pairs that maps from offset -> index. The
indices point into collections of DIE objects, but can also be
"tombstones" (-1) to mark gaps. In the case of subprograms, this mostly
just simplifies the data structure a bit. For inlined subroutines,
because we carefully split them as we build the map, we end up in many
cases having no holes and not having to store both start and stop
offsets.

Finally, the PC ranges for the inlined subroutines are compressed into
32-bits by making them relative to the base PC of the outer subprogram.
This means that if you have a single function body with over 2gb of
executable code in it, we will stop mapping address past the first 2gb
of that function into inlined subroutines and just give you the
subprogram. This doesn't seem like a problem. ;]

All of this combines to make llvm-symbolizer *well* over 2x faster for
symbolizing backtraces out of LLVM's unittests. Death-test heavy unit
tests are running >2x faster. I'm still going to look at completely
disabling symbolization there, but figured while I had a good benchmark
we should make symbolization a bit better.

Sadly, the logic to build the flat interval map for the inlined
subroutines is fairly complex. I'm not super happy about this and
welcome any simplifying suggestions.

Huge thanks to Dave Blaikie who helped walk me through what the various
things I needed to do in DWARF to make this work.

Differential Revision: https://reviews.llvm.org/D40987

llvm-svn: 321345

6 years ago[lldb] Stop searching for a symbol in a pdb by regex
Aaron Smith [Fri, 22 Dec 2017 05:26:50 +0000 (05:26 +0000)]
[lldb] Stop searching for a symbol in a pdb by regex

Summary:
It was possible when searching for a symbol by regex in a pdb that an invalid regex would cause an exception on Windows. This updates the code to avoid throwing an exception.

When fixing the exception it was decided there is no reason to search for a symbol in a pdb by regex. To support this, SymbolFilePDB::FindTypes() now only searches for types by name and no longer calls FindTypesByRegEx().

Reviewers: zturner, lldb-commits

Reviewed By: zturner

Subscribers: clayborg

Differential Revision: https://reviews.llvm.org/D41086

llvm-svn: 321344

6 years ago[X86] Add missing check lines for the silvermont cases in predefined-arch-macros...
Craig Topper [Fri, 22 Dec 2017 05:09:38 +0000 (05:09 +0000)]
[X86] Add missing check lines for the silvermont cases in predefined-arch-macros.c test.

llvm-svn: 321343

6 years ago[Modules] Map missing private submodules from Foo.Private to Foo_Private
Bruno Cardoso Lopes [Fri, 22 Dec 2017 05:04:43 +0000 (05:04 +0000)]
[Modules] Map missing private submodules from Foo.Private to Foo_Private

In case `@import Foo.Private` fails because the submodule doesn't exist,
look for `Foo_Private` (if available) and build/load that module
instead. In that process emit a warning and tell the user about the
assumption.

The intention here is to assist all existing private modules owners
(in ObjC and Swift) to migrate to the new `Foo_Private` syntax.

rdar://problem/36023940

llvm-svn: 321342

6 years ago[X86] Add 'prfchw' to the correct CPUs to match the backend.
Craig Topper [Fri, 22 Dec 2017 04:51:00 +0000 (04:51 +0000)]
[X86] Add 'prfchw' to the correct CPUs to match the backend.

llvm-svn: 321341

6 years ago[X86] Add missing initialization for the HasPREFETCHWT1 subtarget variable.
Craig Topper [Fri, 22 Dec 2017 03:53:14 +0000 (03:53 +0000)]
[X86] Add missing initialization for the HasPREFETCHWT1 subtarget variable.

llvm-svn: 321340

6 years agoDiagnose the various invalid decl-specifiers on nontype template parameters.
Faisal Vali [Fri, 22 Dec 2017 03:50:55 +0000 (03:50 +0000)]
Diagnose the various invalid decl-specifiers on nontype template parameters.

The standard correctly forbids various decl-specifiers that dont make sense on non-type template parameters - such as the extern in:
    template<extern int> struct X;

This patch implements those restrictions (in a fashion similar to the corresponding checks on function parameters within ActOnParamDeclarator).

Credit goes to miyuki (Mikhail Maltsev) for drawing attention to this issue,  authoring the initial versions of this patch, and supporting the effort to re-engineer it slightly.  Thank you!

For details of how this patch evolved please see: https://reviews.llvm.org/D40705

llvm-svn: 321339

6 years agoChange SBProcess::ReadCStringFromMemory() back to returning
Jason Molenda [Fri, 22 Dec 2017 03:27:02 +0000 (03:27 +0000)]
Change SBProcess::ReadCStringFromMemory() back to returning
an empty Python string object when it reads a 0-length
string out of memory (and a successful SBError object).

<rdar://problem/26186692>

llvm-svn: 321338

6 years ago[Modules] Change private modules rules and warnings
Bruno Cardoso Lopes [Fri, 22 Dec 2017 02:53:30 +0000 (02:53 +0000)]
[Modules] Change private modules rules and warnings

We used to advertise private modules to be declared as submodules
(Foo.Private). This has proven to not scale well since private headers
might carry several dependencies, introducing unwanted content into the
main module and often causing dep cycles.

Change the canonical way to name it to Foo_Private, forcing private
modules as top level ones, and provide warnings under -Wprivate-module
to suggest fixes for other private naming. Update documentation to
reflect that.

rdar://problem/31173501

llvm-svn: 321337