platform/upstream/llvm.git
6 years agoThis reverts commit r345357, It is wrong to create a new directory and put the test...
Li Jia He [Fri, 26 Oct 2018 04:54:56 +0000 (04:54 +0000)]
This reverts commit  r345357, It is wrong to create a new directory and put the test file into it. I am sorry for this.

llvm-svn: 345364

6 years ago[NFC] Fix the regular expression for BE PPC in update_llc_test_checks.py
Nemanja Ivanovic [Fri, 26 Oct 2018 03:30:28 +0000 (03:30 +0000)]
[NFC] Fix the regular expression for BE PPC in update_llc_test_checks.py

Currently, the regular expression that matches the lines of assembly for PPC LE
(ELFv2) does not work for the assembly for BE (ELFv1). This patch fixes it.

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

llvm-svn: 345363

6 years agoPR31978: Don't crash if CodeGen sees a top-level BindingDecl.
Richard Smith [Fri, 26 Oct 2018 03:21:20 +0000 (03:21 +0000)]
PR31978: Don't crash if CodeGen sees a top-level BindingDecl.

llvm-svn: 345362

6 years ago[PowerPC] Keep vector int to fp conversions in vector domain
Nemanja Ivanovic [Fri, 26 Oct 2018 03:19:13 +0000 (03:19 +0000)]
[PowerPC] Keep vector int to fp conversions in vector domain

At present a v2i16 -> v2f64 convert is implemented by extracts to scalar,
scalar converts, and merge back into a vector. Use vector converts instead,
with the int data permuted into the proper position and extended if necessary.

Patch by RolandF.

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

llvm-svn: 345361

6 years agoCodeGen: correct the case for swift 4.2, 5.0
Saleem Abdulrasool [Fri, 26 Oct 2018 03:16:16 +0000 (03:16 +0000)]
CodeGen: correct the case for swift 4.2, 5.0

This corrects the leader for the swift names.  The encoding for 4.2 and
5.0 differ by a single bit on the second character and were swapped.

llvm-svn: 345360

6 years ago[Pipeliner] Mark swp-art-deps-rec.ll as REQUIRES: asserts after rL345319
Fangrui Song [Fri, 26 Oct 2018 03:15:56 +0000 (03:15 +0000)]
[Pipeliner] Mark swp-art-deps-rec.ll as REQUIRES: asserts after rL345319

llvm-svn: 345359

6 years agoAdd dependency from SystemZAsmParser to SystemZAsmPrinter after rL345349
Fangrui Song [Fri, 26 Oct 2018 03:04:54 +0000 (03:04 +0000)]
Add dependency from SystemZAsmParser to SystemZAsmPrinter after rL345349

This fixes -DBUILD_SHARED_LIBS=on build. The dependency is similar to that of X86's.

llvm-svn: 345358

6 years ago[PowerPC][NFC] Add tests for some missed optimization opportunities in combineSetCC
Li Jia He [Fri, 26 Oct 2018 02:34:57 +0000 (02:34 +0000)]
[PowerPC][NFC] Add tests for some missed optimization opportunities in combineSetCC

For both operands are bool, short, int, long, long long, add the following optimization test case.
1. 0-x == y --> x+y ==0
2. 0-x != y --> x+y != 0

Review: nemanjai
Differential Revision: https://reviews.llvm.org/D53358

llvm-svn: 345357

6 years agoRevert "[AArch64] Create proper memoperand for multi-vector stores"
Vlad Tsyrklevich [Fri, 26 Oct 2018 02:00:14 +0000 (02:00 +0000)]
Revert "[AArch64] Create proper memoperand for multi-vector stores"

This reverts commit r345315, it was causing test failures on
sanitizer-x86_64-linux-fast.

llvm-svn: 345356

6 years agoadd myself to the CREDITS.TXT
Li Jia He [Fri, 26 Oct 2018 01:58:23 +0000 (01:58 +0000)]
add myself to the CREDITS.TXT

llvm-svn: 345355

6 years ago[AArch64] Support Windows stack probe command-line arguments.
Eli Friedman [Fri, 26 Oct 2018 01:31:57 +0000 (01:31 +0000)]
[AArch64] Support Windows stack probe command-line arguments.

Adds support for -mno-stack-arg-probe and -mstack-probe-size.

(Not really happy copy-pasting code, but that's what we do for all the
other Windows targets.)

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

llvm-svn: 345354

6 years agoTeach the DominatorTree fallback to recalculation when applying updates to speedup...
Chijun Sima [Fri, 26 Oct 2018 01:28:36 +0000 (01:28 +0000)]
Teach the DominatorTree fallback to recalculation when applying updates to speedup JT (PR37929)

Summary:
This patch makes the dominatortree recalculate when applying updates with the size of the update vector larger than a threshold. Directly applying updates is usually slower than recalculating the whole domtree in this case. This patch fixes an issue which causes JT running slowly on some inputs.

In bug 37929, the dominator tree is trying to apply 19,000+ updates several times, which takes several minutes.

After this patch, the time used by DT.applyUpdates:

| Input | Before (s) | After (s) | Speedup |
| the 2nd Reproducer in 37929 | 297 | 0.15 | 1980x |
| clang-5.0.0.0.bc | 9.7 | 4.3 | 2.26x |
| clang-5.0.0.4.bc | 11.6 | 2.6 | 4.46x |

Reviewers: kuhar, brzycki, trentxintong, davide, dmgreen, grosser

Reviewed By: kuhar, brzycki

Subscribers: kristina, llvm-commits

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

llvm-svn: 345353

6 years agoRun the min/max tests agaist the header <charconv>. Fix that header so it passes...
Marshall Clow [Fri, 26 Oct 2018 01:00:56 +0000 (01:00 +0000)]
Run the min/max tests agaist the header <charconv>. Fix that header so it passes. NFC.

llvm-svn: 345352

6 years agoUpdate test that checks auto-completion for settings set.
Jonas Devlieghere [Fri, 26 Oct 2018 00:50:54 +0000 (00:50 +0000)]
Update test that checks auto-completion for settings set.

This reverts r345350 and updates the test rather than removing it. Now
we check that `--g` auto-completes to `--global`.

llvm-svn: 345351

6 years agoRemove test that checks auto-completion for settings set.
Jonas Devlieghere [Fri, 26 Oct 2018 00:39:27 +0000 (00:39 +0000)]
Remove test that checks auto-completion for settings set.

With the new `-f` option for `settings set`, `-` (dash) no longer
auto-complete to `-g`.

llvm-svn: 345350

6 years ago[SystemZ] Implement SystemZOperand::print()
Jonas Paulsson [Fri, 26 Oct 2018 00:36:00 +0000 (00:36 +0000)]
[SystemZ] Implement SystemZOperand::print()

SystemZAsmParser can now handle -debug by printing the operands neatly to the
output stream. Before this patch this lead to an llvm_unreachable().

It seems that now '-mllvm -debug' does not cause any crashes anywhere (at
least not on SPEC).

Review: Ulrich Weigand
https://reviews.llvm.org/D53328

llvm-svn: 345349

6 years agoDump public symbol records in pdb2yaml mode
Zachary Turner [Fri, 26 Oct 2018 00:17:31 +0000 (00:17 +0000)]
Dump public symbol records in pdb2yaml mode

llvm-svn: 345348

6 years ago[SystemZ] Pass the DAG pointer from SystemZAddressingMode::dump().
Jonas Paulsson [Fri, 26 Oct 2018 00:02:33 +0000 (00:02 +0000)]
[SystemZ]  Pass the DAG pointer from SystemZAddressingMode::dump().

In order to print the IR slot number for the memory operand, the DAG pointer
must be passed to SDNode::dump().

The isel-debug.ll test updated to also check for the IR Value reference being
printed correctly.

Review: Ulrich Weigand
https://reviews.llvm.org/D53333

llvm-svn: 345347

6 years agoAdd functionality to export settings
Jonas Devlieghere [Fri, 26 Oct 2018 00:00:17 +0000 (00:00 +0000)]
Add functionality to export settings

For the reproducer feature I need to be able to export and import the
current LLDB configuration. To realize this I've extended the existing
functionality to print settings. With the help of a new formatting
option, we can now write the settings and their values to a file
structured as regular commands.

Concretely the functionality works as follows:

  (lldb) settings export -f /path/to/file

This file contains a bunch of settings set commands, followed by the
setting's name and value.

  ...
  settings set use-external-editor false
  settings set use-color true
  settings set auto-one-line-summaries true
  settings set auto-indent true
  ...

You can import the settings again by either sourcing the file or using
the settings read command.

  (lldb) settings read -f /path/to/file

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

llvm-svn: 345346

6 years agoReland "[WebAssembly] LSDA info generation"
Heejin Ahn [Thu, 25 Oct 2018 23:55:10 +0000 (23:55 +0000)]
Reland "[WebAssembly] LSDA info generation"

Summary:
This adds support for LSDA (exception table) generation for wasm EH.
Wasm EH mostly follows the structure of Itanium-style exception tables,
with one exception: a call site table entry in wasm EH corresponds to
not a call site but a landing pad.

In wasm EH, the VM is responsible for stack unwinding. After an
exception occurs and the stack is unwound, the control flow is
transferred to wasm 'catch' instruction by the VM, after which the
personality function is called from the compiler-generated code. (Refer
to WasmEHPrepare pass for more information on this part.)

This patch:
- Changes wasm.landingpad.index intrinsic to take a token argument, to
make this 1:1 match with a catchpad instruction
- Stores landingpad index info and catch type info MachineFunction in
before instruction selection
- Lowers wasm.lsda intrinsic to an MCSymbol pointing to the start of an
exception table
- Adds WasmException class with overridden methods for table generation
- Adds support for LSDA section in Wasm object writer

Reviewers: dschuff, sbc100, rnk

Subscribers: mgorny, jgravelle-google, sunfish, llvm-commits

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

llvm-svn: 345345

6 years ago[AArch64] Implement FP16FML intrinsics
Bryan Chan [Thu, 25 Oct 2018 23:47:00 +0000 (23:47 +0000)]
[AArch64] Implement FP16FML intrinsics

Generate the FP16FML intrinsics into arm_neon.h (AArch64 only for now).
Add two new type modifiers to NeonEmitter to handle the new prototypes.
Define __ARM_FEATURE_FP16FML when +fp16fml is enabled and guard the
intrinsics with the macro in arm_neon.h.

Based on a patch by Gao Yiling.

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

llvm-svn: 345344

6 years ago[WebAssembly] Support EH instructions in InstPrinter
Heejin Ahn [Thu, 25 Oct 2018 23:45:48 +0000 (23:45 +0000)]
[WebAssembly] Support EH instructions in InstPrinter

Summary: This adds support for exception handling instructions to InstPrinter.

Reviewers: dschuff, aardappel

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

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

llvm-svn: 345343

6 years agoFix in MachineOperand::printIRValueReference().
Jonas Paulsson [Thu, 25 Oct 2018 23:39:07 +0000 (23:39 +0000)]
Fix in MachineOperand::printIRValueReference().

Handle the case where getCurrentFunction() returns nullptr by passing -1 to
printIRSlotNumber(). This will result in <badref> being printed instead of an
assertion failure.

Review: Francis Visoiu Mistrih
https://reviews.llvm.org/D53333

llvm-svn: 345342

6 years ago[analyzer] Fix a bug in "collapsed" graph viewer
George Karpenkov [Thu, 25 Oct 2018 23:38:58 +0000 (23:38 +0000)]
[analyzer] Fix a bug in "collapsed" graph viewer

Nodes which have only one predecessor and only one successor can not
always be hidden, even if all states are the same.
An additional condition is needed: the predecessor may have only one successor.
This can be seen on this example:

```
  A
 / \
B   C
 \ /
  D
```

Nodes B and C can not be hidden even if all nodes in the graph have the
same state.

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

llvm-svn: 345341

6 years ago[analyzer] [RetainCountChecker] Do not invalidate references passed to constructors...
George Karpenkov [Thu, 25 Oct 2018 23:38:41 +0000 (23:38 +0000)]
[analyzer] [RetainCountChecker] Do not invalidate references passed to constructors and operators

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

llvm-svn: 345340

6 years ago[analyzer] Remove custom rule for OSIterator in RetainCountChecker
George Karpenkov [Thu, 25 Oct 2018 23:38:24 +0000 (23:38 +0000)]
[analyzer] Remove custom rule for OSIterator in RetainCountChecker

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

llvm-svn: 345339

6 years ago[analyzer] Correct modelling of OSDynamicCast: eagerly state split
George Karpenkov [Thu, 25 Oct 2018 23:38:07 +0000 (23:38 +0000)]
[analyzer] Correct modelling of OSDynamicCast: eagerly state split

Previously, OSDynamicCast was modeled as an identity.

This is not correct: the output of OSDynamicCast may be zero even if the
input was not zero (if the class is not of desired type), and thus the
modeling led to false positives.

Instead, we are doing eager state split:
in one branch, the returned value is identical to the input parameter,
and in the other branch, the returned value is zero.

This patch required a substantial refactoring of canEval infrastructure,
as now it can return different function summaries, and not just true/false.

rdar://45497400

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

llvm-svn: 345338

6 years ago[AArch64] Implement FP16FML intrinsics
Bryan Chan [Thu, 25 Oct 2018 23:36:41 +0000 (23:36 +0000)]
[AArch64] Implement FP16FML intrinsics

Add LLVM intrinsics for the ARMv8.2-A FP16FML vector-form instructions. Add a
DAG pattern to define the indexed-form intrinsics in terms of the vector-form
ones, similarly to how the Dot Product intrinsics were implemented.

Based on a patch by Gao Yiling.

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

llvm-svn: 345337

6 years agoDelete test case. Assertions can't be tested.
Heejin Ahn [Thu, 25 Oct 2018 23:35:15 +0000 (23:35 +0000)]
Delete test case. Assertions can't be tested.

llvm-svn: 345336

6 years agoTidy up test case
Heejin Ahn [Thu, 25 Oct 2018 23:35:15 +0000 (23:35 +0000)]
Tidy up test case

llvm-svn: 345335

6 years agoAddress comments
Heejin Ahn [Thu, 25 Oct 2018 23:35:14 +0000 (23:35 +0000)]
Address comments

- Add llvm-mc test case (and delete the old one)
- Change report_fatal_error to assertions

llvm-svn: 345334

6 years ago[WebAssembly] Error out when block/loop markers mismatch
Heejin Ahn [Thu, 25 Oct 2018 23:35:13 +0000 (23:35 +0000)]
[WebAssembly] Error out when block/loop markers mismatch

Summary:
Currently InstPrinter ignores if there are mismatches between block/loop
and end markers by skipping the case if ControlFlowStack is empty. I
guess it is better to explicitly error out in this case, because this
signals invalid input.

Reviewers: aardappel

Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits

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

llvm-svn: 345333

6 years ago[ELF] Add --{,no-}call-graph-profile-sort (enabled by default)
Fangrui Song [Thu, 25 Oct 2018 23:15:23 +0000 (23:15 +0000)]
[ELF] Add --{,no-}call-graph-profile-sort (enabled by default)

Summary: Add an option to disable sorting sections with call graph profile

Reviewers: ruiu, Bigcheese, espindola

Reviewed By: Bigcheese

Subscribers: grimar, emaste, arichardson, llvm-commits

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

llvm-svn: 345332

6 years ago[SystemZ] NFC reformatting in SystemZTargetTransformInfo.cpp
Jonas Paulsson [Thu, 25 Oct 2018 22:53:27 +0000 (22:53 +0000)]
[SystemZ]  NFC reformatting in SystemZTargetTransformInfo.cpp

Some lines more than 80 characters long reformatted.

llvm-svn: 345331

6 years agoAdd MS ABI mangling for operator<=>.
Richard Smith [Thu, 25 Oct 2018 22:51:16 +0000 (22:51 +0000)]
Add MS ABI mangling for operator<=>.

Thanks to Cameron DaCamara at Microsoft for letting us know what their
chosen mangling is here!

llvm-svn: 345330

6 years agoAvoid std::map&vector in hexagon builtin code to save code size
Reid Kleckner [Thu, 25 Oct 2018 22:37:30 +0000 (22:37 +0000)]
Avoid std::map&vector in hexagon builtin code to save code size

Constructing a global std::map requires clang to generate a linear
amount of code to construct the initializer list if the elements are not
constexpr-constructible. std::vector is not constexpr-constructible, so
this code pattern was generating large amounts of code.

Also, because of PR38829, LLVM is pathologically slow on large basic
blocks, and this causes slow compilation. This works around the bug and
reduces code size.

SemaChecking.cpp -debug-info-kind=limited:
        time      objsize
before: 1m45.023s 9.8M
after:  0m25.205s 6.9M

So, a 42% obj size reduction and 3.2x speedup.

llvm-svn: 345329

6 years agoAvoid STMT_ and DECL_ bitcodes overlapping.
Richard Smith [Thu, 25 Oct 2018 22:35:16 +0000 (22:35 +0000)]
Avoid STMT_ and DECL_ bitcodes overlapping.

This doesn't appear to matter for deserialization purposes, because we
always know what kind of entity (declaration or statement/expression)
we're trying to load, but it makes the llvm-bcanalyzer output a lot less
mysterious.

llvm-svn: 345328

6 years ago[SystemZ] Improve getMemoryOpCost() to find foldable loads that are converted.
Jonas Paulsson [Thu, 25 Oct 2018 22:28:25 +0000 (22:28 +0000)]
[SystemZ] Improve getMemoryOpCost() to find foldable loads that are converted.

The SystemZ backend can do arithmetic of memory by loading and then extending
one of the operands. Similarly, a load + truncate can be folded into an
operand.

This patch improves the SystemZ TTI cost function to recognize this.

Review: Ulrich Weigand
https://reviews.llvm.org/D52692

llvm-svn: 345327

6 years agoDebugInfo: Explain why DW_LLE_(GNU_)startx_length is used
David Blaikie [Thu, 25 Oct 2018 22:26:25 +0000 (22:26 +0000)]
DebugInfo: Explain why DW_LLE_(GNU_)startx_length is used

This isn't the most object-size efficient encoding, but it's the only
one GDB supports for the pre-standard fission format. I've written fixes
for this twice now... - so perhaps this comment will help me remember
why neither of these have been committed and why I shouldn't try to
write a third fix another year from now...

llvm-svn: 345326

6 years ago[x86] add tests for missed load folding; NFC
Sanjay Patel [Thu, 25 Oct 2018 22:23:27 +0000 (22:23 +0000)]
[x86] add tests for missed load folding; NFC

llvm-svn: 345325

6 years ago[sanitizer] Fix mallopt interceptor.
Evgeniy Stepanov [Thu, 25 Oct 2018 22:15:44 +0000 (22:15 +0000)]
[sanitizer] Fix mallopt interceptor.

On error, mallopt is supposed to return 0, not -1.

llvm-svn: 345323

6 years ago[ELF] Don't check if symbols in .llvm.call-graph-profile are unorderable
Fangrui Song [Thu, 25 Oct 2018 22:15:42 +0000 (22:15 +0000)]
[ELF] Don't check if symbols in .llvm.call-graph-profile are unorderable

Summary: There are too many reasonable cases that would be considered unorderable.

Reviewers: ruiu, espindola, Bigcheese

Reviewed By: ruiu

Subscribers: grimar, emaste, arichardson, llvm-commits

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

llvm-svn: 345322

6 years ago[SystemZ] Improve handling and cost estimates of vector integer div/rem
Jonas Paulsson [Thu, 25 Oct 2018 21:47:22 +0000 (21:47 +0000)]
[SystemZ]  Improve handling and cost estimates of vector integer div/rem

Enable the DAG optimization that converts vector div/rem with constants into
multiply+shifts sequences by expanding them early. This is needed since
ISD::SMUL_LOHI is 'Custom' lowered on SystemZ, and will therefore not be
available to BuildSDIV after legalization.

Better cost values for these instructions based on how they will be
implemented (a constant divisor is cheaper).

Review: Ulrich Weigand
https://reviews.llvm.org/D53196

llvm-svn: 345321

6 years agollvm-dwarfdump: loclists: Don't expect an (albeit empty) expression for LLE_base_address
David Blaikie [Thu, 25 Oct 2018 21:35:59 +0000 (21:35 +0000)]
llvm-dwarfdump: loclists: Don't expect an (albeit empty) expression for LLE_base_address

llvm-svn: 345320

6 years ago[Pipeliner] Ignore Artificial dependences while computing recurrences.
Sumanth Gundapaneni [Thu, 25 Oct 2018 21:27:08 +0000 (21:27 +0000)]
[Pipeliner] Ignore Artificial dependences while computing recurrences.

The artificial dependencies are not real dependencies. In some cases, they
form circuits with bigger MII. However, they are used to schedule instructions
better.

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

llvm-svn: 345319

6 years ago[Pipeliner] Remove the unneeded include header(NFC).
Sumanth Gundapaneni [Thu, 25 Oct 2018 21:25:30 +0000 (21:25 +0000)]
[Pipeliner] Remove the unneeded include header(NFC).

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

llvm-svn: 345318

6 years ago[X86] Change X86 backend to look for 'min-legal-vector-width' attribute instead of...
Craig Topper [Thu, 25 Oct 2018 21:16:06 +0000 (21:16 +0000)]
[X86] Change X86 backend to look for 'min-legal-vector-width' attribute instead of 'required-vector-width' when determining whether 512-bit vectors should be legal.

The required-vector-width attribute was only used for backend testing and has never been generated by clang.

I believe clang is now generating min-legal-vector-width for vector uses in user code.

With this I believe passing -mprefer-vector-width=256 to clang should prevent use of zmm registers in the generated assembly unless the user used a 512-bit intrinsic in their source code.

llvm-svn: 345317

6 years ago[CodeGen] Remove operands from FENTRY_CALL
Francis Visoiu Mistrih [Thu, 25 Oct 2018 21:12:15 +0000 (21:12 +0000)]
[CodeGen] Remove operands from FENTRY_CALL

FENTRY_CALL is actually not taking any input / output operands. The
machine verifier complains now because the target description says that:

* It needs 1 unknown output
* It needs 1 or more variable inputs

llvm-svn: 345316

6 years ago[AArch64] Create proper memoperand for multi-vector stores
David Greene [Thu, 25 Oct 2018 21:10:39 +0000 (21:10 +0000)]
[AArch64] Create proper memoperand for multi-vector stores

Include all of the store's source vector operands when creating the
MachineMemOperand. Previously, we were missing the first operand,
making the store size seem smaller than it really is.

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

llvm-svn: 345315

6 years agoDon't type-erase the FunctionNameType or TypeClass enums.
Zachary Turner [Thu, 25 Oct 2018 20:45:40 +0000 (20:45 +0000)]
Don't type-erase the FunctionNameType or TypeClass enums.

This is similar to D53597, but following up with 2 more enums.
After this, all flag enums should be strongly typed all the way
through to the symbol files plugins.

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

llvm-svn: 345314

6 years agoDon't type-erase the SymbolContextItem enumeration.
Zachary Turner [Thu, 25 Oct 2018 20:45:19 +0000 (20:45 +0000)]
Don't type-erase the SymbolContextItem enumeration.

When we get the `resolve_scope` parameter from the SB API, it's a
`uint32_t`.  We then pass it through all of LLDB this way, as a uint32.
This is unfortunate, because it means the user of an API never actually
knows what they're dealing with.  We can call it something like
`resolve_scope` and have comments saying "this is a value from the
`SymbolContextItem` enumeration, but it makes more sense to just have it
actually *be* the correct type in the actual C++ type system to begin
with.  This way the person reading the code just knows what it is.

The reason to use integers instead of enumerations for flags is because
when you do bitwise operations on enumerations they get promoted to
integers, so it makes it tedious to constantly be casting them back
to the enumeration types, so I've introduced a macro to make this
happen magically.  By writing LLDB_MARK_AS_BITMASK_ENUM after defining
an enumeration, it will define overloaded operators so that the
returned type will be the original enum.  This should address all
the mechanical issues surrounding using rich enum types directly.

This way, we get a better debugger experience, and new users to
the codebase can get more easily acquainted with the codebase because
their IDE features can help them understand what the types mean.

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

llvm-svn: 345313

6 years ago[NFC] Refactor SetBaseClasses and DeleteBaseClasses.
Zachary Turner [Thu, 25 Oct 2018 20:44:56 +0000 (20:44 +0000)]
[NFC] Refactor SetBaseClasses and DeleteBaseClasses.

We currently had a 2-step process where we had to call
SetBaseClassesForType and DeleteBaseClasses.  Every single caller
followed this exact 2-step process, and there was manual memory
management going on with raw pointers.  We can do better than this
by storing a vector of unique_ptrs and passing this around.
This makes for a cleaner API, and we only need to call one method
so there is no possibility of a user forgetting to call
DeleteBaseClassSpecifiers.

In addition to this, it also makes for a *simpler* API.  Part of
why I wanted to do this is because when I was implementing the native
PDB interface I had to spend some time understanding exactly what I
was deleting and why.  ClangAST has significant mental overhead
associated with it, and reducing the API surface can go along
way to making it simpler for people to understand.

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

llvm-svn: 345312

6 years ago[C++17] Reject shadowing of capture by parameter in lambda
Nicolas Lesser [Thu, 25 Oct 2018 20:15:03 +0000 (20:15 +0000)]
[C++17] Reject shadowing of capture by parameter in lambda

Summary:
This change rejects the shadowing of a capture by a parameter in lambdas in C++17.

```
int main() {
  int a;
  auto f = [a](int a) { return a; };
}
```

results in:

```
main.cpp:3:20: error: a lambda parameter cannot shadow an explicitly captured entity
  auto f = [a](int a) { return a; };
                   ^
main.cpp:3:13: note: variable a is explicitly captured here
  auto f = [a](int a) { return a; };
            ^
```

Reviewers: rsmith

Reviewed By: rsmith

Subscribers: lebedev.ri, erik.pilkington, cfe-commits

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

llvm-svn: 345308

6 years ago[AArch64][GlobalISel] Simplify a legalizer test. NFC.
Volkan Keles [Thu, 25 Oct 2018 20:01:19 +0000 (20:01 +0000)]
[AArch64][GlobalISel] Simplify a legalizer test. NFC.

llvm-svn: 345307

6 years agoRevert "[SemaCXX] Unconfuse Clang when std::align_val_t is unscoped in C++03"
Eric Fiselier [Thu, 25 Oct 2018 19:50:43 +0000 (19:50 +0000)]
Revert "[SemaCXX] Unconfuse Clang when std::align_val_t is unscoped in C++03"

This reverts commit b5d8d0de744d2c212bdb17d5c5fd4447dd14dbd2.

llvm-svn: 345306

6 years ago[clang-tidy] Revert my readability-uppercase-literal-suffix check.
Roman Lebedev [Thu, 25 Oct 2018 19:44:51 +0000 (19:44 +0000)]
[clang-tidy] Revert my readability-uppercase-literal-suffix check.

There are some lurking issues with the handling of the SourceManager.
Somehow sometimes we end up extracting completely wrong
portions of the source buffer.

Reverts r344772, r44760, r344758, r344755.

llvm-svn: 345305

6 years agoRebase defect report list.
Nicolas Lesser [Thu, 25 Oct 2018 19:27:57 +0000 (19:27 +0000)]
Rebase defect report list.

llvm-svn: 345303

6 years agoChange keep-static-consts to work on static storage duration, not
Erich Keane [Thu, 25 Oct 2018 19:13:46 +0000 (19:13 +0000)]
Change keep-static-consts to work on static storage duration, not
storage class.

To be more in line with what GCC does, switch the condition to be based
on the Static Storage duration instead of the storage class.

Change-Id: I8e959d762433cda48855099353bf3c950b9d54b8
llvm-svn: 345302

6 years ago[WebAssembly] Bitselect and min/max builtins
Thomas Lively [Thu, 25 Oct 2018 19:11:41 +0000 (19:11 +0000)]
[WebAssembly] Bitselect and min/max builtins

Reviewers: aheejin, dschuff

Subscribers: sbc100, jgravelle-google, sunfish, cfe-commits

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

llvm-svn: 345301

6 years ago[WebAssembly] Lower to target-independent saturating add
Thomas Lively [Thu, 25 Oct 2018 19:06:15 +0000 (19:06 +0000)]
[WebAssembly] Lower to target-independent saturating add

Summary: Goes along with D53721.

Reviewers: aheejin, dschuff

Subscribers: sbc100, jgravelle-google, sunfish, cfe-commits

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

llvm-svn: 345300

6 years ago[WebAssembly] Use target-independent saturating add
Thomas Lively [Thu, 25 Oct 2018 19:06:13 +0000 (19:06 +0000)]
[WebAssembly] Use target-independent saturating add

Reviewers: aheejin, dschuff

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

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

llvm-svn: 345299

6 years agoImplement Function Multiversioning for Non-ELF Systems.
Erich Keane [Thu, 25 Oct 2018 18:57:19 +0000 (18:57 +0000)]
Implement Function Multiversioning for Non-ELF Systems.

Similar to how ICC handles CPU-Dispatch on Windows, this patch uses the
resolver function directly to forward the call to the proper function.
This is not nearly as efficient as IFuncs of course, but is still quite
useful for large functions specifically developed for certain
processors.

This is unfortunately still limited to x86, since it depends on
__builtin_cpu_supports and __builtin_cpu_is, which are x86 builtins.

The naming for the resolver/forwarding function for cpu-dispatch was
taken from ICC's implementation, which uses the unmodified name for this
(no mangling additions).  This is possible, since cpu-dispatch uses '.A'
for the 'default' version.

In 'target' multiversioning, this function keeps the '.resolver'
extension in order to keep the default function keeping the default
mangling.

Change-Id: I4731555a39be26c7ad59a2d8fda6fa1a50f73284

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

llvm-svn: 345298

6 years ago[X86] Add some non-AVX512VL command lines to the *vl-vec-test-testn.ll tests.
Craig Topper [Thu, 25 Oct 2018 18:23:48 +0000 (18:23 +0000)]
[X86] Add some non-AVX512VL command lines to the *vl-vec-test-testn.ll tests.

This will expose some regressions in the WIP and/or/xor promotion removal patch.

llvm-svn: 345297

6 years ago[SemaCXX] Unconfuse Clang when std::align_val_t is unscoped in C++03
Eric Fiselier [Thu, 25 Oct 2018 18:16:16 +0000 (18:16 +0000)]
[SemaCXX] Unconfuse Clang when std::align_val_t is unscoped in C++03

Summary:
When -faligned-allocation is specified in C++03 libc++ defines std::align_val_t as an unscoped enumeration type (because Clang didn't provide scoped enumerations as an extension until 8.0).
Unfortunately Clang confuses the `align_val_t` overloads of delete with the sized deallocation overloads which aren't enabled. This caused Clang to call the aligned deallocation function as if it were the sized deallocation overload.

For example: https://godbolt.org/z/xXJELh

This patch fixes the confusion.

Reviewers: rsmith, EricWF

Reviewed By: EricWF

Subscribers: cfe-commits

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

llvm-svn: 345296

6 years ago[FPEnv] Last BinaryOperator::isFNeg(...) to m_FNeg(...) changes
Cameron McInally [Thu, 25 Oct 2018 18:09:33 +0000 (18:09 +0000)]
[FPEnv] Last BinaryOperator::isFNeg(...) to m_FNeg(...) changes

Replacing BinaryOperator::isFNeg(...) to avoid regressions when we
separate FNeg from the FSub IR instruction.

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

llvm-svn: 345295

6 years agoRemove full stops from error messages for consistency.
Rui Ueyama [Thu, 25 Oct 2018 18:07:55 +0000 (18:07 +0000)]
Remove full stops from error messages for consistency.

llvm-svn: 345294

6 years ago[X86] Add KNL command lines to movmsk-cmp.ll.
Craig Topper [Thu, 25 Oct 2018 18:06:25 +0000 (18:06 +0000)]
[X86] Add KNL command lines to movmsk-cmp.ll.

Some of this code looks pretty bad and we should probably still be using movmskb more with avx512f.

llvm-svn: 345293

6 years ago[GlobalISel] LegalizerHelper: Fix the incorrect alignment when splitting loads/stores...
Volkan Keles [Thu, 25 Oct 2018 17:52:19 +0000 (17:52 +0000)]
[GlobalISel] LegalizerHelper: Fix the incorrect alignment when splitting loads/stores in narrowScalar

Reviewers: dsanders, bogner, jpaquette, aemerson, ab, paquette

Reviewed By: dsanders

Subscribers: rovka, kristof.beyls, javed.absar, llvm-commits

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

llvm-svn: 345292

6 years agoCodeGen: alter CFConstantString class name for swift 5.0
Saleem Abdulrasool [Thu, 25 Oct 2018 17:52:13 +0000 (17:52 +0000)]
CodeGen: alter CFConstantString class name for swift 5.0

Swift 5.0 has changed the name decoration for swift symbols, using a 'S' sigil
rather than 's' as in 4.2.  Adopt the new convention.

llvm-svn: 345291

6 years ago[LegalizeDAG] Remove dead SINT_TO_FP legalization code
Simon Pilgrim [Thu, 25 Oct 2018 17:43:36 +0000 (17:43 +0000)]
[LegalizeDAG] Remove dead SINT_TO_FP legalization code

As noticed on D52965, the SINT_TO_FP i64 to f32 legalization code has been dead for years - protected by an assert.

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

llvm-svn: 345290

6 years agofix incorrect placement of _LIBCPP_ALWAYS_INLINE in valarray
Eric Fiselier [Thu, 25 Oct 2018 17:43:26 +0000 (17:43 +0000)]
fix incorrect placement of _LIBCPP_ALWAYS_INLINE in valarray

llvm-svn: 345289

6 years ago[GISel] LegalizerInfo: Rename MemDesc::Size to SizeInBits to make the value clearer
Volkan Keles [Thu, 25 Oct 2018 17:37:07 +0000 (17:37 +0000)]
[GISel] LegalizerInfo: Rename MemDesc::Size to SizeInBits to make the value clearer

Requested in D53679.

llvm-svn: 345288

6 years agoRemove accidentally committed duplicate code
Adrian Prantl [Thu, 25 Oct 2018 17:36:05 +0000 (17:36 +0000)]
Remove accidentally committed duplicate code

llvm-svn: 345287

6 years ago[X86] Remove ProcIntelKNL and replace with a SlowPMADDWD flag to use in the one place...
Craig Topper [Thu, 25 Oct 2018 17:29:00 +0000 (17:29 +0000)]
[X86] Remove ProcIntelKNL and replace with a SlowPMADDWD flag to use in the one place it was checked.

llvm-svn: 345286

6 years ago[X86] Remove some uarch tuning flags from KNL that look to have been inherited from...
Craig Topper [Thu, 25 Oct 2018 17:28:57 +0000 (17:28 +0000)]
[X86] Remove some uarch tuning flags from KNL that look to have been inherited from SNB/IVB incorrectly

KNL is based on a modified Silvermont core so I don't think these features apply. I think the LEA flag is probably also wrong, but I'm less sure as I barely understand the 3 LEA flags we have currently.

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

llvm-svn: 345285

6 years ago[analyzer] Move canReasonAbout from Z3ConstraintManager to SMTConstraintManager
Mikhail R. Gadelha [Thu, 25 Oct 2018 17:27:42 +0000 (17:27 +0000)]
[analyzer] Move canReasonAbout from Z3ConstraintManager to SMTConstraintManager

Summary:
This patch moves the last method in `Z3ConstraintManager` to `SMTConstraintManager`: `canReasonAbout()`.

The `canReasonAbout()` method checks if a given `SVal` can be encoded in SMT. I've added a new method to the SMT API to return true if a solver can encode floating-point arithmetics and it was enough to make `canReasonAbout()` solver independent.

As an annoying side-effect, `Z3ConstraintManager` is pretty empty now and only (1) creates the Z3 solver object by calling `CreateZ3Solver()` and (2) instantiates `SMTConstraintManager`. Maybe we can get rid of this class altogether in the future: a `CreateSMTConstraintManager()` method that does (1) and (2) and returns the constraint manager object?

Reviewers: george.karpenkov, NoQ

Reviewed By: george.karpenkov

Subscribers: mehdi_amini, xazax.hun, szepet, a.sidorin, dexonsmith, Szelethus, donat.nagy, dkrupp

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

llvm-svn: 345284

6 years ago[analyzer] Fixed bitvector from model always being unsigned
Mikhail R. Gadelha [Thu, 25 Oct 2018 17:27:36 +0000 (17:27 +0000)]
[analyzer] Fixed bitvector from model always being unsigned

Summary:
Getting an `APSInt` from the model always returned an unsigned integer because of the unused parameter.

This was not breaking any test case because no code relies on the actual value of the integer returned here, but rather it is only used to check if a symbol has more than one solution in `getSymVal`.

Reviewers: NoQ, george.karpenkov

Reviewed By: george.karpenkov

Subscribers: xazax.hun, szepet, a.sidorin, Szelethus, donat.nagy, dkrupp

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

llvm-svn: 345283

6 years ago[AArch64][GlobalISel] Fix the LegalityPredicate for lowerIf for G_LOAD/G_STORE
Volkan Keles [Thu, 25 Oct 2018 17:23:25 +0000 (17:23 +0000)]
[AArch64][GlobalISel] Fix the LegalityPredicate for lowerIf for G_LOAD/G_STORE

Summary:
Currently, Legalizer is trying to lower G_LOAD with a vector type
that has more than two elements due to the incorrect LegalityPredicate.

This patch fixes the issue by removing the multiplication by 8
as `MemDesc.Size` already contains the size in bits.

Reviewers: dsanders, aemerson

Reviewed By: dsanders

Subscribers: rovka, javed.absar, kristof.beyls, llvm-commits

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

llvm-svn: 345282

6 years agoImplement sized deallocation for std::allocator and friends.
Eric Fiselier [Thu, 25 Oct 2018 17:21:30 +0000 (17:21 +0000)]
Implement sized deallocation for std::allocator and friends.

Summary:
C++14 sized deallocation is disabled by default due to ABI concerns. However, when a user manually enables it then libc++ should take advantage of it since sized deallocation can provide a significant performance win depending on the underlying malloc implementation. (Note that libc++'s definitions of sized delete don't do anything special yet, but users are free to provide their own).

This patch updates __libcpp_deallocate to selectively call sized operator delete when it's available. `__libcpp_deallocate_unsized` should be used when the size of the allocation is unknown.

On Apple this patch makes no attempt to determine if the sized operator delete is unavailable, only that the language feature is enabled. This could cause a compile error when using `std::allocator`, but the same compile error would occur whenever the user calls `new`, so I don't think it's a problem.

Reviewers: ldionne, mclow.lists

Reviewed By: ldionne

Subscribers: rsmith, ckennelly, libcxx-commits, christof

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

llvm-svn: 345281

6 years ago[llvm-mca] Introduce a new base class for mca::Instruction, and change how read/write...
Andrea Di Biagio [Thu, 25 Oct 2018 17:03:51 +0000 (17:03 +0000)]
[llvm-mca] Introduce a new base class for mca::Instruction, and change how read/write information is stored.

This patch introduces a new base class for Instruction named InstructionBase.
Class InstructionBase is responsible for tracking data dependencies with the
help of ReadState and WriteState objects.  Class Instruction now derives from
InstructionBase, and adds extra information related to the `InstrStage` as well
as the `RCUTokenID`.

ReadState and WriteState objects are no longer unique pointers. This avoids
extra heap allocation and pointer checks that weren't really needed.  Now, those
objects are simply stored into SmallVectors.  We use a SmallVector instead of a
std::vector because we expect most instructions to only have a very small number
of reads and writes.  By using a simple SmallVector we also avoid extra heap
allocations most of the time.
In a debug build, this improves the performance of llvm-mca by roughly 10% (I
still have to verify the impact in performance on a release build).

llvm-svn: 345280

6 years ago[AArch64] Refactor Exynos feature sets (NFC)
Evandro Menezes [Thu, 25 Oct 2018 16:45:46 +0000 (16:45 +0000)]
[AArch64] Refactor Exynos feature sets (NFC)

llvm-svn: 345279

6 years agoGet rid of casts. (NFC)
Adrian Prantl [Thu, 25 Oct 2018 16:15:17 +0000 (16:15 +0000)]
Get rid of casts. (NFC)

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

llvm-svn: 345278

6 years ago[OPENMP]Fix PR39422: variables are not firstprivatized in task context.
Alexey Bataev [Thu, 25 Oct 2018 15:35:27 +0000 (15:35 +0000)]
[OPENMP]Fix PR39422: variables are not firstprivatized in task context.

According to the OpenMP standard, In a task generating construct, if no
default clause is present, a variable for which the data-sharing
attribute is not determined by the rules above is firstprivatized.
Compiler tries to implement this, but if the variable is not directly
used in the task context, this variable may not be firstprivatized.
Patch fixes this problem.

llvm-svn: 345277

6 years ago[ARM] Regenerate vdup tests
Simon Pilgrim [Thu, 25 Oct 2018 15:33:47 +0000 (15:33 +0000)]
[ARM] Regenerate vdup tests

llvm-svn: 345276

6 years ago[AArch64] Add EXT patterns for 64-bit EXT of a subvector of a 128-bit vector
John Brawn [Thu, 25 Oct 2018 15:31:51 +0000 (15:31 +0000)]
[AArch64] Add EXT patterns for 64-bit EXT of a subvector of a 128-bit vector

If we have a 64-bit EXT where one of the operands is a subvector of a 128-bit
vector then in some cases we can eliminate an extract_subvector by converting
to a 128-bit EXT of the 128-bit vector.

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

llvm-svn: 345275

6 years agoFix a bug PlatformDarwin::SDKSupportsModule.
Adrian Prantl [Thu, 25 Oct 2018 15:30:43 +0000 (15:30 +0000)]
Fix a bug PlatformDarwin::SDKSupportsModule.

This fixes a bug PlatformDarwin::SDKSupportsModule introduced by
https://reviews.llvm.org/D47889.  VersionTuple::tryParse() can deal
with an optional third (micro) component, but the parse will fail when
there are extra characters after the version number (e.g.: trying to
parse the substring "12.0.sdk" out of "iPhoneSimulator12.0.sdk" fails
after that patch).  Fixed here by stripping the ".sdk" suffix first.

(Part of) rdar://problem/45041492

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

llvm-svn: 345274

6 years ago[AArch64] Branch Protection and Return Address Signing B Key Support
Luke Cheeseman [Thu, 25 Oct 2018 15:23:49 +0000 (15:23 +0000)]
[AArch64] Branch Protection and Return Address Signing B Key Support

- Add support for -mbranch-protection=<type>[+<type>]* where
  - <type> ::= [standard, none, bti, pac-ret[+b-key,+leaf]*]
- The protection emits relevant function attributes
  - sign-return-address=<scope>
  - sign-return-address-key=<key>
  - branch-protection

llvm-svn: 345273

6 years ago[ARM] Use Cortex-A57 sched model for Cortex-A72
Sam Parker [Thu, 25 Oct 2018 15:08:29 +0000 (15:08 +0000)]
[ARM] Use Cortex-A57 sched model for Cortex-A72

This mirrors what we already do for AArch64 as the cores are similar.
As discussed in the review, enabling the machine scheduler causes
more variations in performance changes so it is not enabled for now.
This patch improves LNT scores by a geomean of 1.57% at -O3.

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

llvm-svn: 345272

6 years ago[AArch64] Refactor definition of EXT patterns to use a multiclass
John Brawn [Thu, 25 Oct 2018 15:00:10 +0000 (15:00 +0000)]
[AArch64] Refactor definition of EXT patterns to use a multiclass

Using a multiclass reduces duplication, and makes it easier to add new patterns
later. This refactoring does add some new patterns, but as far as I can tell
there's no IR that will end up triggering them so this is effectively NFC.

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

llvm-svn: 345271

6 years ago[AArch64] Do 64-bit vector move of 0 and -1 by extracting from the 128-bit move
John Brawn [Thu, 25 Oct 2018 14:56:48 +0000 (14:56 +0000)]
[AArch64] Do 64-bit vector move of 0 and -1 by extracting from the 128-bit move

Currently a vector move of 0 or -1 will use different instructions depending on
the size of the vector. Using a single instruction (the 128-bit one) for both
gives more opportunity for Machine CSE to eliminate instructions.

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

llvm-svn: 345270

6 years ago[DEBUG_INFO][NVPTX]Fix processing of DBG_VALUES.
Alexey Bataev [Thu, 25 Oct 2018 14:27:27 +0000 (14:27 +0000)]
[DEBUG_INFO][NVPTX]Fix processing of DBG_VALUES.

Summary:
If the instruction in the eliminateFrameIndex function is a DBG_VALUE
instruction, it requires special processing. The frame register is set
to VRFrame and the offset is based on the object offset.
The code is similar to the code used in
lib/CodeGen/PrologEpilogInserter.cpp.

Reviewers: tra

Subscribers: jholewinski, llvm-commits

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

llvm-svn: 345269

6 years ago[clangd] workspace/symbol should be async, it reads from the index.
Sam McCall [Thu, 25 Oct 2018 14:19:14 +0000 (14:19 +0000)]
[clangd] workspace/symbol should be async, it reads from the index.

Summary:
To enable this, TUScheduler has to provide a way to run async tasks without
needing a preamble or AST!

Reviewers: ilya-biryukov

Subscribers: javed.absar, ioeric, MaskRay, jkorous, arphaman, jfb, kadircet, cfe-commits

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

llvm-svn: 345268

6 years agoupdate the clang doc about contributions
Sylvestre Ledru [Thu, 25 Oct 2018 14:19:06 +0000 (14:19 +0000)]
update the clang doc about contributions

llvm-svn: 345267

6 years ago[X86] Fix llc invocation on MIR test case
Francis Visoiu Mistrih [Thu, 25 Oct 2018 14:11:07 +0000 (14:11 +0000)]
[X86] Fix llc invocation on MIR test case

The current state of the llc invocation is:

* Running all the passes from dwarfehprepare to stack coloring
(included)
* It runs it from the LLVM IR included in the file
* It *ADDS* the generated MI from ISel to the MI in the MIR file
* The machine verifier doesn't like it.

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

llvm-svn: 345266

6 years ago[GlobalISel] Use the target preferred type for G_EXTRACT_VECTOR_ELT index.
Amara Emerson [Thu, 25 Oct 2018 14:04:54 +0000 (14:04 +0000)]
[GlobalISel] Use the target preferred type for G_EXTRACT_VECTOR_ELT index.

Allows for better imported pattern re-use.

llvm-svn: 345265

6 years agoIR: Optimize StructType::get to perform one hash lookup instead of two, NFCI
Krasimir Georgiev [Thu, 25 Oct 2018 13:38:07 +0000 (13:38 +0000)]
IR: Optimize StructType::get to perform one hash lookup instead of two, NFCI

Summary:
This function was performing two hash lookups when a new struct type was requested: first checking if it exists and second to insert it. This patch updates the function to perform a single hash lookup in this case by updating the value in the hash table in-place in case the struct type was not there before.

Similar to r345151.

Reviewers: bkramer

Reviewed By: bkramer

Subscribers: llvm-commits

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

llvm-svn: 345264

6 years ago[CostModel][X86] Add realistic vXi64 uitofp vXf64 costs
Simon Pilgrim [Thu, 25 Oct 2018 13:06:20 +0000 (13:06 +0000)]
[CostModel][X86] Add realistic vXi64 uitofp vXf64 costs

Match codegen improvements from D53649/rL345256

llvm-svn: 345263

6 years ago[RISCV] Use PatFrags for variable shift patterns
Alex Bradbury [Thu, 25 Oct 2018 12:45:20 +0000 (12:45 +0000)]
[RISCV] Use PatFrags for variable shift patterns

This follows SystemZ and I think is cleaner vs the multiclass.

llvm-svn: 345262

6 years ago[CostModel][X86] Add realistic i64 uitofp f64 scalar costs
Simon Pilgrim [Thu, 25 Oct 2018 12:42:10 +0000 (12:42 +0000)]
[CostModel][X86] Add realistic i64 uitofp f64 scalar costs

llvm-svn: 345261

6 years ago[libc++] Make sure we can build libc++ with -fvisibility=hidden
Louis Dionne [Thu, 25 Oct 2018 12:13:43 +0000 (12:13 +0000)]
[libc++] Make sure we can build libc++ with -fvisibility=hidden

Summary:
When building with -fvisibility=hidden, some symbols do not get exported from
libc++.dylib. This means that some entities are not explicitly given default
visibility in the source code, and that we rely on the fact -fvisibility=default
is the default. This commit explicitly gives default visibility to those
symbols to avoid being dependent on the command line flags used.

The commit also remove symbols from the dylib -- those symbols do not
actually need to be exported from the dylib and this should not be an
ABI break.

Finally, in the future, we may want to mark the whole std:: namespace as
having hidden visibility (to switch from opt-out to opt-in), in which
case the changes done in this commit will be required.

Reviewers: EricWF

Subscribers: mgorny, christof, dexonsmith, libcxx-commits

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

llvm-svn: 345260