platform/upstream/llvm.git
4 years ago[InstCombine] conditional sign-extend of high-bit-extract: 'or' pattern.
Roman Lebedev [Sun, 20 Oct 2019 20:52:06 +0000 (20:52 +0000)]
[InstCombine] conditional sign-extend of high-bit-extract: 'or' pattern.

In this pattern, all the "magic" bits that we'd `add` are all
high sign bits, and in the value we'd be adding to they are all unset,
not unexpectedly, so we can have an `or` there:
https://rise4fun.com/Alive/ups

It is possible that `haveNoCommonBitsSet()` should be taught about this
pattern so that we never have an `add` variant, but the reasoning would
need to be recursive (because of that `select`), so i'm not really sure
that would be worth it just yet.

llvm-svn: 375378

4 years ago[NFC][InstCombine] conditional sign-extend of high-bit-extract: 'and' pat. can be...
Roman Lebedev [Sun, 20 Oct 2019 20:51:37 +0000 (20:51 +0000)]
[NFC][InstCombine] conditional sign-extend of high-bit-extract: 'and' pat. can be 'or' pattern.

In this pattern, all the "magic" bits that we'd add are all
high sign bits, and in the value we'd be adding to they are all unset,
not unexpectedly, so we can have an `or` there:
https://rise4fun.com/Alive/ups

llvm-svn: 375377

4 years agogn build: Merge r375375
GN Sync Bot [Sun, 20 Oct 2019 20:44:56 +0000 (20:44 +0000)]
gn build: Merge r375375

llvm-svn: 375376

4 years agoReverted r375254 as it has broken some build bots for a long time.
Vladimir Vereschaka [Sun, 20 Oct 2019 20:39:33 +0000 (20:39 +0000)]
Reverted r375254 as it has broken some build bots for a long time.

llvm-svn: 375375

4 years ago[InstCombine] Fold uadd.sat(a, b) == 0 and usub.sat(a, b) == 0
Nikita Popov [Sun, 20 Oct 2019 20:19:42 +0000 (20:19 +0000)]
[InstCombine] Fold uadd.sat(a, b) == 0 and usub.sat(a, b) == 0

This adds folds for comparing uadd.sat/usub.sat with zero:

 * uadd.sat(a, b) == 0 => a == 0 && b == 0 => (a | b) == 0
 * usub.sat(a, b) == 0 => a <= b

And inverted forms for !=.

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

llvm-svn: 375374

4 years agoFix buildbot error in SIRegisterInfo.cpp.
Zinovy Nis [Sun, 20 Oct 2019 20:01:16 +0000 (20:01 +0000)]
Fix buildbot error in SIRegisterInfo.cpp.

llvm-svn: 375373

4 years ago[InstCombine] Add tests for uadd/sub.sat(a, b) == 0; NFC
Nikita Popov [Sun, 20 Oct 2019 19:50:31 +0000 (19:50 +0000)]
[InstCombine] Add tests for uadd/sub.sat(a, b) == 0; NFC

llvm-svn: 375372

4 years ago[InstCombine] Shift amount reassociation in shifty sign bit test (PR43595)
Roman Lebedev [Sun, 20 Oct 2019 19:38:50 +0000 (19:38 +0000)]
[InstCombine] Shift amount reassociation in shifty sign bit test (PR43595)

Summary:
This problem consists of several parts:
* Basic sign bit extraction - `trunc? (?shr %x, (bitwidth(x)-1))`.
  This is trivial, and easy to do, we have a fold for it.
* Shift amount reassociation - if we have two identical shifts,
  and we can simplify-add their shift amounts together,
  then we likely can just perform them as a single shift.
  But this is finicky, has one-use restrictions,
  and shift opcodes must be identical.

But there is a super-pattern where both of these work together.
to produce sign bit test from two shifts + comparison.
We do indeed already handle this in most cases.
But since we get that fold transitively, it has one-use restrictions.
And what's worse, in this case the right-shifts aren't required to be
identical, and we can't handle that transitively:

If the total shift amount is bitwidth-1, only a sign bit will remain
in the output value. But if we look at this from the perspective of
two shifts, we can't fold - we can't possibly know what bit pattern
we'd produce via two shifts, it will be *some* kind of a mask
produced from original sign bit, but we just can't tell it's shape:
https://rise4fun.com/Alive/cM0 https://rise4fun.com/Alive/9IN

But it will *only* contain sign bit and zeros.
So from the perspective of sign bit test, we're good:
https://rise4fun.com/Alive/FRz https://rise4fun.com/Alive/qBU
Superb!

So the simplest solution is to extend `reassociateShiftAmtsOfTwoSameDirectionShifts()` to also have a
sudo-analysis mode that will ignore extra-uses, and will only check
whether a) those are two right shifts and b) they end up with bitwidth(x)-1
shift amount and return either the original value that we sign-checking,
or null.

This does not have any functionality change for
the existing `reassociateShiftAmtsOfTwoSameDirectionShifts()`.

All that being said, as disscussed in the review, this yet again
increases usage of instsimplify in instcombine as utility.
Some day that may need to be reevaluated.

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

Reviewers: spatel, efriedma, vsk

Reviewed By: spatel

Subscribers: xbolva00, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 375371

4 years ago[ConstantRange] makeGuaranteedNoWrapRegion(): `shl` support
Roman Lebedev [Sun, 20 Oct 2019 19:36:55 +0000 (19:36 +0000)]
[ConstantRange] makeGuaranteedNoWrapRegion(): `shl` support

Summary:
If all the shifts amount are already poison-producing,
then we can add more poison-producing flags ontop:
https://rise4fun.com/Alive/Ocwi

Otherwise, we should only consider the possible range of shift amts that don't result in poison.

For unsigned range not not overflow, we must not shift out any set bits,
and the actual limit for `x` can be computed by backtransforming
the maximal value we could ever get out of the `shl` - `-1` through
`lshr`. If the `x` is any larger than that then it will overflow.

Likewise for signed range, but just in signed domain..

This is based on the general idea outlined by @nikic in https://reviews.llvm.org/D68672#1714990

Reviewers: nikic, sanjoy

Reviewed By: nikic

Subscribers: hiraditya, llvm-commits, nikic

Tags: #llvm

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

llvm-svn: 375370

4 years ago[ConstantRange] Optimize nowrap region test, remove redundant tests; NFC
Nikita Popov [Sun, 20 Oct 2019 18:59:14 +0000 (18:59 +0000)]
[ConstantRange] Optimize nowrap region test, remove redundant tests; NFC

Enumerate one less constant range in TestNoWrapRegionExhaustive,
which was unnecessary. This allows us to bump the bit count from
3 to 5 while keeping reasonable timing.

Drop four tests for multiply nowrap regions, as these cover subsets
of the exhaustive test. They do use a wider bitwidth, but I don't
think it's worthwhile to have them additionally now.

llvm-svn: 375369

4 years agoAMDGPU: Increase vcc liveness scan threshold
Matt Arsenault [Sun, 20 Oct 2019 17:44:17 +0000 (17:44 +0000)]
AMDGPU: Increase vcc liveness scan threshold

Avoids a test regression in a future patch. Also add debug printing on
this case, so I waste less time debugging folds in the future.

llvm-svn: 375367

4 years agoAMDGPU: Split flat offsets that don't fit in DAG
Matt Arsenault [Sun, 20 Oct 2019 17:34:44 +0000 (17:34 +0000)]
AMDGPU: Split flat offsets that don't fit in DAG

We handle it this way for some other address spaces.

Since r349196, SILoadStoreOptimizer has been trying to do this. This
is after SIFoldOperands runs, which can change the addressing
patterns. It's simpler to just split this earlier.

llvm-svn: 375366

4 years agoAMDGPU: Fix missing OPERAND_IMMEDIATE
Matt Arsenault [Sun, 20 Oct 2019 16:56:10 +0000 (16:56 +0000)]
AMDGPU: Fix missing OPERAND_IMMEDIATE

llvm-svn: 375365

4 years agoAMDGPU: Add baseline tests for flat offset splitting
Matt Arsenault [Sun, 20 Oct 2019 16:33:21 +0000 (16:33 +0000)]
AMDGPU: Add baseline tests for flat offset splitting

llvm-svn: 375364

4 years agoAMDGPU: Don't re-get the subtarget
Matt Arsenault [Sun, 20 Oct 2019 16:26:26 +0000 (16:26 +0000)]
AMDGPU: Don't re-get the subtarget

It's already available in the class.

llvm-svn: 375363

4 years ago[AMDGPU] Fix assertion due to initializer list
Yaxun Liu [Sun, 20 Oct 2019 15:02:22 +0000 (15:02 +0000)]
[AMDGPU] Fix assertion due to initializer list

Sometimes a global var is replaced by a different llvm value. clang use GetAddrOfGlobalVar to get the original llvm global variable.
For most targets, GetAddrOfGlobalVar returns either the llvm global variable or a bitcast of the llvm global variable.
However, for AMDGPU target, GetAddrOfGlobalVar returns the addrspace cast or addrspace cast plus bitcast of the llvm global variable.
To get the llvm global variable, these casts need to be stripped, otherwise there is assertion.

This patch fixes that.

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

llvm-svn: 375362

4 years ago[yaml2obj][obj2yaml] - Do not create a symbol table by default.
George Rimar [Sun, 20 Oct 2019 14:47:17 +0000 (14:47 +0000)]
[yaml2obj][obj2yaml] - Do not create a symbol table by default.

This patch tries to resolve problems faced in D68943
and uses some of the code written by Konrad Wilhelm Kleine
in that patch.

Previously, yaml2obj tool always created a .symtab section.
This patch changes that. With it we only create it when
have a "Symbols:" tag in the YAML document or when
we need to create it because it is used by another section(s).

obj2yaml follows the new behavior and does not print "Symbols:"
anymore when there is no symbol table.

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

llvm-svn: 375361

4 years ago[LLD][ELF] - Update tests after yaml2obj tool update.
George Rimar [Sun, 20 Oct 2019 14:47:09 +0000 (14:47 +0000)]
[LLD][ELF] - Update tests after yaml2obj tool update.

yaml2obj doesn't create .symtab by default anymore.

llvm-svn: 375360

4 years agoFix minor warning in DWARFVerifier.
Zinovy Nis [Sun, 20 Oct 2019 07:55:50 +0000 (07:55 +0000)]
Fix minor warning in DWARFVerifier.

llvm-svn: 375357

4 years agoAMDGPU: Don't error on calls to null or undef
Matt Arsenault [Sun, 20 Oct 2019 07:46:04 +0000 (07:46 +0000)]
AMDGPU: Don't error on calls to null or undef

Calls to constants should probably be generally handled.

llvm-svn: 375356

4 years agoeliminate nontrivial Reset(...) from TypedPythonObject
Lawrence D'Anna [Sat, 19 Oct 2019 18:43:49 +0000 (18:43 +0000)]
eliminate nontrivial Reset(...) from TypedPythonObject

Summary:
This deletes `Reset(...)`, except for the no-argument form `Reset()`
from `TypedPythonObject`, and therefore from `PythonString`, `PythonList`,
etc.

It updates the various callers to use assignment, `As<>`, `Take<>`,
and `Retain<>`, as appropriate.

followon to https://reviews.llvm.org/D69080

Reviewers: JDevlieghere, clayborg, labath, jingham

Reviewed By: labath

Subscribers: lldb-commits

Tags: #lldb

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

llvm-svn: 375350

4 years ago[SCEV] Simplify umin/max of zext and sext of the same value
Philip Reames [Sat, 19 Oct 2019 17:23:02 +0000 (17:23 +0000)]
[SCEV] Simplify umin/max of zext and sext of the same value

This is a common idiom which arises after induction variables are widened, and we have two or more exit conditions.  Interestingly, we don't have instcombine or instsimplify support for this either.

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

llvm-svn: 375349

4 years ago[X86] Pulled out helper to decode target shuffle element sentinel values to 'Zeroable...
Simon Pilgrim [Sat, 19 Oct 2019 16:58:24 +0000 (16:58 +0000)]
[X86] Pulled out helper to decode target shuffle element sentinel values to 'Zeroable' known undef/zero bits. NFCI.

Renamed 'resolveTargetShuffleAndZeroables' to 'resolveTargetShuffleFromZeroables' to match.

llvm-svn: 375348

4 years ago[TargetLowering][DAGCombine][MSP430] add/use hook for Shift Amount Threshold (1/2)
Sanjay Patel [Sat, 19 Oct 2019 16:57:02 +0000 (16:57 +0000)]
[TargetLowering][DAGCombine][MSP430] add/use hook for Shift Amount Threshold (1/2)

Provides a TLI hook to allow targets to relax the emission of shifts, thus enabling
codegen improvements on targets with no multiple shift instructions and cheap selects
or branches.

Contributes to a Fix for PR43559:
https://bugs.llvm.org/show_bug.cgi?id=43559

Patch by: @joanlluch (Joan LLuch)

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

llvm-svn: 375347

4 years ago[ARM] Add dependency on GlobalISel for unit tests to fix shared libs build
Nemanja Ivanovic [Sat, 19 Oct 2019 16:40:26 +0000 (16:40 +0000)]
[ARM] Add dependency on GlobalISel for unit tests to fix shared libs build

The unit test uses GlobalISel but the dependency is not listed in the
CMakeLists.txt file which causes failures in shared libs build with GCC.

This just adds the dependency.

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

llvm-svn: 375346

4 years ago[MSP430] Shift Amount Threshold in DAGCombine (Baseline Tests); NFC
Sanjay Patel [Sat, 19 Oct 2019 16:29:32 +0000 (16:29 +0000)]
[MSP430] Shift Amount Threshold in DAGCombine (Baseline Tests); NFC

Patch by: @joanlluch (Joan LLuch)

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

llvm-svn: 375345

4 years ago[X86][SSE] lowerV16I8Shuffle - tryToWidenViaDuplication - undef unpack args
Simon Pilgrim [Sat, 19 Oct 2019 13:18:02 +0000 (13:18 +0000)]
[X86][SSE] lowerV16I8Shuffle - tryToWidenViaDuplication - undef unpack args

tryToWidenViaDuplication lowers using the shuffle_v8i16(unpack_v16i8(shuffle_v8i16(x),shuffle_v8i16(x))) pattern, but the unpack only needs the even/odd 16i8 args if the original v16i8 shuffle mask references the even/odd elements - which isn't true for many extension style shuffles.

llvm-svn: 375342

4 years ago[X86][SSE] LowerUINT_TO_FP_i64 - only use HADDPD for size/fast-hops
Simon Pilgrim [Sat, 19 Oct 2019 11:53:48 +0000 (11:53 +0000)]
[X86][SSE] LowerUINT_TO_FP_i64 - only use HADDPD for size/fast-hops

We were always generating a single source HADDPD, but really we should only do this if shouldUseHorizontalOp says its a good idea.

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

llvm-svn: 375341

4 years agoRefine check for `_LIBCPP_C_HAS_NO_GETS` on FreeBSD
Dimitry Andric [Sat, 19 Oct 2019 10:59:23 +0000 (10:59 +0000)]
Refine check for `_LIBCPP_C_HAS_NO_GETS` on FreeBSD

Summary:
In D67316 we added `_LIBCPP_C_HAS_NO_GETS` to signal that the C library
does not provide `gets()`, and added a test for FreeBSD 13 or higher,
using the compiler-defined `__FreeBSD__` macro.

Unfortunately this did not work that well for FreeBSD's own CI process,
since the gcc compilers used for some architectures define `__FreeBSD__`
to match the build host, not the target.

Instead, we should use the `__FreeBSD_version` macro from the userland
header `<osreldate.h>`, which is more fine-grained.  See also
<https://reviews.freebsd.org/D22034>.

Reviewers: EricWF, mclow.lists, emaste, ldionne

Reviewed By: emaste, ldionne

Subscribers: dexonsmith, bsdjhb, krytarowski, christof, ldionne, libcxx-commits

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

llvm-svn: 375340

4 years agoExplicit in the doc the current list of projects (with easy copy and paste)
Sylvestre Ledru [Sat, 19 Oct 2019 09:55:24 +0000 (09:55 +0000)]
Explicit in the doc the current list of projects (with easy copy and paste)

llvm-svn: 375339

4 years agoRevert "[Implicit Modules] Add -cc1 option -fmodules-strict-context-hash which includ...
Michael J. Spencer [Sat, 19 Oct 2019 09:45:28 +0000 (09:45 +0000)]
Revert "[Implicit Modules] Add -cc1 option -fmodules-strict-context-hash which includes search paths and diagnostics." and "[Docs] Fix header level."

The test doesn't work on Windows. I'll fix it and recommit later.

llvm-svn: 375338

4 years agoMake it clear in the doc that 'all' in LLVM_ENABLE_PROJECTS does install ALL projects
Sylvestre Ledru [Sat, 19 Oct 2019 09:27:14 +0000 (09:27 +0000)]
Make it clear in the doc that 'all' in LLVM_ENABLE_PROJECTS does install ALL projects

llvm-svn: 375337

4 years agoconvert LLDBSwigPythonCallTypeScript to ArgInfo::max_positional_args
Lawrence D'Anna [Sat, 19 Oct 2019 07:05:39 +0000 (07:05 +0000)]
convert LLDBSwigPythonCallTypeScript to ArgInfo::max_positional_args

Summary:
This patch converts another user of ArgInfo::count over to
use ArgInfo::max_positional_args instead.   I also add a test
to make sure both documented signatures for python type formatters
work.

Reviewers: JDevlieghere, clayborg, labath, jingham

Reviewed By: labath

Subscribers: lldb-commits

Tags: #lldb

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

llvm-svn: 375334

4 years ago[LLDB] bugfix: command script add -f doesn't work for some callables
Lawrence D'Anna [Sat, 19 Oct 2019 07:05:33 +0000 (07:05 +0000)]
[LLDB] bugfix: command script add -f doesn't work for some callables

Summary:
When users define a debugger command from python, they provide a callable
object.   Because the signature of the function has been extended, LLDB
needs to inspect the number of parameters the callable can take.

The rule it was using to decide was weird, apparently not tested, and
giving wrong results for some kinds of python callables.

This patch replaces the weird rule with a simple one: if the callable can
take 5 arguments, it gets the 5 argument version of the signature.
Otherwise it gets the old 4 argument version.

It also adds tests with a bunch of different kinds of python callables
with both 4 and 5 arguments.

Reviewers: JDevlieghere, clayborg, labath, jingham

Reviewed By: labath

Subscribers: lldb-commits

Tags: #lldb

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

llvm-svn: 375333

4 years ago[analyzer] PR43551: Do not dereferce void* in UndefOrNullArgVisitor.
Artem Dergachev [Sat, 19 Oct 2019 01:50:46 +0000 (01:50 +0000)]
[analyzer] PR43551: Do not dereferce void* in UndefOrNullArgVisitor.

Patch by Kristóf Umann!

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

llvm-svn: 375329

4 years ago[analyzer] Fix a crash on tracking Objective-C 'self' as a control dependency.
Artem Dergachev [Sat, 19 Oct 2019 01:50:43 +0000 (01:50 +0000)]
[analyzer] Fix a crash on tracking Objective-C 'self' as a control dependency.

'self' was previously never tracked, but now it can be tracked
because it may be part of a condition.

llvm-svn: 375328

4 years ago[Docs] Fix header level.
Michael J. Spencer [Sat, 19 Oct 2019 01:48:57 +0000 (01:48 +0000)]
[Docs] Fix header level.

llvm-svn: 375327

4 years agoAdd -Wbitwise-conditional-parentheses to warn on mixing '|' and '&' with "?:"
Richard Trieu [Sat, 19 Oct 2019 01:47:49 +0000 (01:47 +0000)]
Add -Wbitwise-conditional-parentheses to warn on mixing '|' and '&' with "?:"

Extend -Wparentheses to cover mixing bitwise-and and bitwise-or with the
conditional operator. There's two main cases seen with this:

unsigned bits1 = 0xf0 | cond ? 0x4 : 0x1;
unsigned bits2 = cond1 ? 0xf0 : 0x10 | cond2 ? 0x5 : 0x2;

// Intended order of evaluation:
unsigned bits1 = 0xf0 | (cond ? 0x4 : 0x1);
unsigned bits2 = (cond1 ? 0xf0 : 0x10) | (cond2 ? 0x5 : 0x2);

// Actual order of evaluation:
unsigned bits1 = (0xf0 | cond) ? 0x4 : 0x1;
unsigned bits2 = cond1 ? 0xf0 : ((0x10 | cond2) ? 0x5 : 0x2);

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

llvm-svn: 375326

4 years agoAvoid including CodeView/SymbolRecord.h from MCStreamer.h
Reid Kleckner [Sat, 19 Oct 2019 01:44:09 +0000 (01:44 +0000)]
Avoid including CodeView/SymbolRecord.h from MCStreamer.h

Move the types needed out so they can be forward declared instead.

llvm-svn: 375325

4 years ago[Implicit Modules] Add -cc1 option -fmodules-strict-context-hash which includes searc...
Michael J. Spencer [Sat, 19 Oct 2019 01:36:37 +0000 (01:36 +0000)]
[Implicit Modules] Add -cc1 option -fmodules-strict-context-hash which includes search paths and diagnostics.

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

llvm-svn: 375322

4 years agoAMDGPU: Remove optnone from a test
Matt Arsenault [Sat, 19 Oct 2019 01:34:59 +0000 (01:34 +0000)]
AMDGPU: Remove optnone from a test

It's not clear why the test had this. I'm unable to break the original
case with the original patch reverted with or without optnone.

This avoids a failure in a future commit.

llvm-svn: 375321

4 years agoPrune a LegacyDivergenceAnalysis and MachineLoopInfo include each
Reid Kleckner [Sat, 19 Oct 2019 01:31:09 +0000 (01:31 +0000)]
Prune a LegacyDivergenceAnalysis and MachineLoopInfo include each

Now X86ISelLowering doesn't depend on many IR analyses.

llvm-svn: 375320

4 years agoPrune Analysis includes from SelectionDAG.h
Reid Kleckner [Sat, 19 Oct 2019 01:07:48 +0000 (01:07 +0000)]
Prune Analysis includes from SelectionDAG.h

Only forward declarations are needed here. Follow-on to r375311.

llvm-svn: 375319

4 years agoNew tautological warning for bitwise-or with non-zero constant always true.
Richard Trieu [Sat, 19 Oct 2019 00:57:23 +0000 (00:57 +0000)]
New tautological warning for bitwise-or with non-zero constant always true.

Taking a value and the bitwise-or it with a non-zero constant will always
result in a non-zero value. In a boolean context, this is always true.

if (x | 0x4) {}  // always true, intended '&'

This patch creates a new warning group -Wtautological-bitwise-compare for this
warning. It also moves in the existing tautological bitwise comparisons into
this group. A few other changes were needed to the CFGBuilder so that all bool
contexts would be checked. The warnings in -Wtautological-bitwise-compare will
be off by default due to using the CFG.

Fixes: https://bugs.llvm.org/show_bug.cgi?id=42666
Differential Revision: https://reviews.llvm.org/D66046

llvm-svn: 375318

4 years ago[profile] Use -fPIC -shared in a test instead of -dynamiclib
Vedant Kumar [Sat, 19 Oct 2019 00:51:27 +0000 (00:51 +0000)]
[profile] Use -fPIC -shared in a test instead of -dynamiclib

This is more portable than -dynamiclib. Also, fix the path to an input
file that broke when the test was moved in r375315.

llvm-svn: 375317

4 years agoMove endian constant from Host.h to SwapByteOrder.h, prune include
Reid Kleckner [Sat, 19 Oct 2019 00:48:11 +0000 (00:48 +0000)]
Move endian constant from Host.h to SwapByteOrder.h, prune include

Works on this dependency chain:
  ArrayRef.h ->
  Hashing.h -> --CUT--
  Host.h ->
  StringMap.h / StringRef.h

ArrayRef is very popular, but Host.h is rarely needed. Move the
IsBigEndianHost constant to SwapByteOrder.h. Clients of that header are
more likely to need it.

llvm-svn: 375316

4 years ago[profile] Disable instrprof-get-filename-merge-mode.c on Windows
Vedant Kumar [Sat, 19 Oct 2019 00:46:53 +0000 (00:46 +0000)]
[profile] Disable instrprof-get-filename-merge-mode.c on Windows

The Windows bots are failing with:

clang: warning: argument unused during compilation: '-dynamiclib' [-Wunused-command-line-argument]
llvm-svn: 375315

4 years agoSema: Create a no-op implicit cast for lvalue function conversions.
Peter Collingbourne [Sat, 19 Oct 2019 00:34:54 +0000 (00:34 +0000)]
Sema: Create a no-op implicit cast for lvalue function conversions.

This fixes an assertion failure in the case where an implicit conversion for a
function call involves an lvalue function conversion, and makes the AST for
initializations involving implicit lvalue function conversions more accurate.

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

llvm-svn: 375313

4 years agoSkip (more) PExpect tests under ASAN, I can't get them to work reliably.
Adrian Prantl [Sat, 19 Oct 2019 00:30:30 +0000 (00:30 +0000)]
Skip (more) PExpect tests under ASAN, I can't get them to work reliably.

llvm-svn: 375312

4 years agoPrune two MachineInstr.h includes, fix up deps
Reid Kleckner [Sat, 19 Oct 2019 00:22:07 +0000 (00:22 +0000)]
Prune two MachineInstr.h includes, fix up deps

MachineInstr.h included AliasAnalysis.h, which includes a world of IR
constructs mostly unneeded in CodeGen. Prune it. Same for
DebugInfoMetadata.h.

Noticed with -ftime-trace.

llvm-svn: 375311

4 years ago[clang][driver] Print compilation phases with indentation.
Michael Liao [Sat, 19 Oct 2019 00:17:00 +0000 (00:17 +0000)]
[clang][driver] Print compilation phases with indentation.

Reviewers: tra, sfantao, echristo

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 375310

4 years ago[hip][cuda] Fix the extended lambda name mangling issue.
Michael Liao [Sat, 19 Oct 2019 00:15:19 +0000 (00:15 +0000)]
[hip][cuda] Fix the extended lambda name mangling issue.

Summary:
- HIP/CUDA host side needs to use device kernel symbol name to match the
  device side binaries. Without a consistent naming between host- and
  device-side compilations, it's risky that wrong device binaries are
  executed. Consistent naming is usually not an issue until unnamed
  types are used, especially the lambda. In this patch, the consistent
  name mangling is addressed for the extended lambdas, i.e. the lambdas
  annotated with `__device__`.
- In [Itanium C++ ABI][1], the mangling of the lambda is generally
  unspecified unless, in certain cases, ODR rule is required to ensure
  consisent naming cross TUs. The extended lambda is such a case as its
  name may be part of a device kernel function, e.g., the extended
  lambda is used as a template argument and etc. Thus, we need to force
  ODR for extended lambdas as they are referenced in both device- and
  host-side TUs. Furthermore, if a extended lambda is nested in other
  (extended or not) lambdas, those lambdas are required to follow ODR
  naming as well. This patch revises the current lambda mangle numbering
  to force ODR from an extended lambda to all its parent lambdas.
- On the other side, the aforementioned ODR naming should not change
  those lambdas' original linkages, i.e., we cannot replace the original
  `internal` with `linkonce_odr`; otherwise, we may violate ODR in
  general. This patch introduces a new field `HasKnownInternalLinkage`
  in lambda data to decouple the current linkage calculation based on
  mangling number assigned.

[1]: https://itanium-cxx-abi.github.io/cxx-abi/abi.html

Reviewers: tra, rsmith, yaxunl, martong, shafik

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 375309

4 years ago[analyzer] Specify the C++ standard in more tests.
Artem Dergachev [Sat, 19 Oct 2019 00:08:17 +0000 (00:08 +0000)]
[analyzer] Specify the C++ standard in more tests.

Makes life easier for downstream developers with different default standard.

llvm-svn: 375308

4 years agoP1152R4: Fix deprecation warnings in libc++ testsuite and in uses of is_invocable...
Richard Smith [Sat, 19 Oct 2019 00:06:00 +0000 (00:06 +0000)]
P1152R4: Fix deprecation warnings in libc++ testsuite and in uses of is_invocable that would internally conjure up a deprecated function type.

Summary: The implementation of P1152R4 in Clang has resulted in some deprecation warnings appearing in the libc++ and libc++abi test suite. Fix or suppress these warnings.

Reviewers: mclow.lists, EricWF

Subscribers: christof, ldionne, libcxx-commits

Tags: #libc

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

llvm-svn: 375307

4 years ago[c++20] Add rewriting from comparison operators to <=> / ==.
Richard Smith [Sat, 19 Oct 2019 00:04:43 +0000 (00:04 +0000)]
[c++20] Add rewriting from comparison operators to <=> / ==.

This adds support for rewriting <, >, <=, and >= to a normal or reversed
call to operator<=>, for rewriting != to a normal or reversed call to
operator==, and for rewriting <=> and == to reversed forms of those same
operators.

Note that this is a breaking change for various C++17 code patterns,
including some in use in LLVM. The most common patterns (where an
operator== becomes ambiguous with a reversed form of itself) are still
accepted under this patch, as an extension (with a warning). I'm hopeful
that we can get the language rules fixed before C++20 ships, and the
extension warning is aimed primarily at providing data to inform that
decision.

llvm-svn: 375306

4 years ago[c++20] Add CXXRewrittenBinaryOperator to represent a comparison
Richard Smith [Sat, 19 Oct 2019 00:04:38 +0000 (00:04 +0000)]
[c++20] Add CXXRewrittenBinaryOperator to represent a comparison
operator that is rewritten as a call to multiple other operators.

No functionality change yet: nothing creates these expressions.

llvm-svn: 375305

4 years agoDebugInfo: Render the canonical name of a class template specialization, even when...
David Blaikie [Fri, 18 Oct 2019 23:58:34 +0000 (23:58 +0000)]
DebugInfo: Render the canonical name of a class template specialization, even when nested in another class template specialization

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

llvm-svn: 375304

4 years ago[profile] Do not cache __llvm_profile_get_filename result
Vedant Kumar [Fri, 18 Oct 2019 23:33:40 +0000 (23:33 +0000)]
[profile] Do not cache __llvm_profile_get_filename result

When the %m filename pattern is used, the filename is unique to each
image, so the cached value is wrong.

It struck me that the full filename isn't something that's recomputed
often, so perhaps it doesn't need to be cached at all. David Li pointed
out we can go further and just hide lprofCurFilename. This may regress
workflows that depend on using the set-filename API to change filenames
across all loaded DSOs, but this is expected to be very rare.

rdar://55137071

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

llvm-svn: 375301

4 years agoLiveIntervals: Fix handleMoveUp with subreg def moving across a def
Matt Arsenault [Fri, 18 Oct 2019 23:24:25 +0000 (23:24 +0000)]
LiveIntervals: Fix handleMoveUp with subreg def moving across a def

If a subregister def was moved across another subregister def and
another use, the main range was not correctly updated. The end point
of the moved interval ended too early and missed the use from theh
other lanes in the subreg def.

llvm-svn: 375300

4 years agogn build: Build compiler-rt code with -fvisibility=hidden.
Peter Collingbourne [Fri, 18 Oct 2019 22:52:17 +0000 (22:52 +0000)]
gn build: Build compiler-rt code with -fvisibility=hidden.

This matches the CMake build.

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

llvm-svn: 375299

4 years agohwasan: Add missing SANITIZER_INTERFACE_ATTRIBUTE on __hwasan_personality_wrapper.
Peter Collingbourne [Fri, 18 Oct 2019 22:51:38 +0000 (22:51 +0000)]
hwasan: Add missing SANITIZER_INTERFACE_ATTRIBUTE on __hwasan_personality_wrapper.

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

llvm-svn: 375298

4 years ago[AMDGPU] move PHI nodes to AGPR class
Stanislav Mekhanoshin [Fri, 18 Oct 2019 22:48:45 +0000 (22:48 +0000)]
[AMDGPU] move PHI nodes to AGPR class

If all uses of a PHI are in AGPR register class we should
avoid unneeded copies via VGPRs.

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

llvm-svn: 375297

4 years ago[hwasan] Remove system allocator fallback.
Evgeniy Stepanov [Fri, 18 Oct 2019 22:36:25 +0000 (22:36 +0000)]
[hwasan] Remove system allocator fallback.

Summary:
This has been an experiment with late malloc interposition, made
possible by a non-standard feature of the Android dynamic loader.

Reviewers: pcc, mmalcomson

Subscribers: srhines, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

llvm-svn: 375296

4 years ago[SampleFDO] Add profile remapping support for profile on-demand loading used
Wei Mi [Fri, 18 Oct 2019 22:35:20 +0000 (22:35 +0000)]
[SampleFDO] Add profile remapping support for profile on-demand loading used
by ExtBinary format profile

Profile on-demand loading was added for ExtBinary format profile in rL374233,
but currently profile on-demand loading doesn't work well with profile
remapping. The patch adds the support.

Suppose a function in the current module has outline instance in the profile.
The function name in the module is different from the name of the outline
instance, but remapper knows the two names are equal. When loading profile
on-demand, the outline instance has to be loaded with remapper's help.

At the same time SampleProfileReaderItaniumRemapper is changed from a proxy
of SampleProfileReader to a helper member in SampleProfileReader.

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

llvm-svn: 375295

4 years ago[Reproducer] XFAIL TestWorkingDir on Windows
Jonas Devlieghere [Fri, 18 Oct 2019 22:16:15 +0000 (22:16 +0000)]
[Reproducer] XFAIL TestWorkingDir on Windows

I'm having a hard time reproducing this and it's failing on the Windows
bot. Temporarily X-failing this test while I continue to try building
LLDB on Windows.

llvm-svn: 375294

4 years ago[AMDGPU] Remove -amdgpu-spill-sgpr-to-smem.
Jay Foad [Fri, 18 Oct 2019 21:48:22 +0000 (21:48 +0000)]
[AMDGPU] Remove -amdgpu-spill-sgpr-to-smem.

Summary: The implementation was never completed and never used except in tests.

Reviewers: arsenm, mareko

Subscribers: qcolombet, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 375293

4 years ago[Reproducer] Improve reproducer help (NFC)
Jonas Devlieghere [Fri, 18 Oct 2019 21:47:31 +0000 (21:47 +0000)]
[Reproducer] Improve reproducer help (NFC)

Provide a little more detail for the reproducer command.

llvm-svn: 375292

4 years ago[CVP] setDeducedOverflowingFlags(): actually inc per-opcode stats
Roman Lebedev [Fri, 18 Oct 2019 21:19:26 +0000 (21:19 +0000)]
[CVP] setDeducedOverflowingFlags(): actually inc per-opcode stats

This is really embarrassing. Those are pointers, so that offsets the
pointers, not the statistics pointed-by the pointer...

llvm-svn: 375290

4 years agogn build: Merge r375288
GN Sync Bot [Fri, 18 Oct 2019 21:11:20 +0000 (21:11 +0000)]
gn build: Merge r375288

llvm-svn: 375289

4 years agoDisable exit-on-SIGPIPE in lldb
Vedant Kumar [Fri, 18 Oct 2019 21:05:30 +0000 (21:05 +0000)]
Disable exit-on-SIGPIPE in lldb

Occasionally, during test teardown, LLDB writes to a closed pipe.
Sometimes the communication is inherently unreliable, so LLDB tries to
avoid being killed due to SIGPIPE (it calls `signal(SIGPIPE, SIG_IGN)`).
However, LLVM's default SIGPIPE behavior overrides LLDB's, causing it to
exit with IO_ERR.

Opt LLDB out of the default SIGPIPE behavior. I expect that this will
resolve some LLDB test suite flakiness (tests randomly failing with
IO_ERR) that we've seen since r344372.

rdar://55750240

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

llvm-svn: 375288

4 years ago[X86] Fix register parsing in .seh_* in Intel syntax
Reid Kleckner [Fri, 18 Oct 2019 21:01:41 +0000 (21:01 +0000)]
[X86] Fix register parsing in .seh_* in Intel syntax

Previously, the parser checked for a '%' prefix to indicate a register.
In Intel syntax mode, LLVM does not print a '%' prefix on registers, so
LLVM could not parse its own assembly output. Instead, require that
register numbers be integer literals, or at least start with an integer
literal, which is consistent with .cfi_* directive register parsing.

llvm-svn: 375287

4 years ago[analyzer] exploded-graph-rewriter: Unforget to censor stmt_ids in the test.
Artem Dergachev [Fri, 18 Oct 2019 20:48:21 +0000 (20:48 +0000)]
[analyzer] exploded-graph-rewriter: Unforget to censor stmt_ids in the test.

They're not stable across machines.

Fixes buildbots after r375278.

llvm-svn: 375286

4 years ago[NFC][CVP] Some tests for `mul` no-wrap deduction
Roman Lebedev [Fri, 18 Oct 2019 20:36:19 +0000 (20:36 +0000)]
[NFC][CVP] Some tests for `mul` no-wrap deduction

llvm-svn: 375285

4 years agoUpdate global_symbols.txt.
Peter Collingbourne [Fri, 18 Oct 2019 20:35:29 +0000 (20:35 +0000)]
Update global_symbols.txt.

llvm-svn: 375284

4 years ago[WebAssembly] Allow multivalue signatures in object files
Thomas Lively [Fri, 18 Oct 2019 20:27:30 +0000 (20:27 +0000)]
[WebAssembly] Allow multivalue signatures in object files

Summary:
Also changes the wasm YAML format to reflect the possibility of having
multiple return types and to put the returns after the params for
consistency with the binary encoding.

Reviewers: aheejin, sbc100

Subscribers: dschuff, jgravelle-google, hiraditya, sunfish, arphaman, rupprecht, llvm-commits

Tags: #llvm

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

llvm-svn: 375283

4 years ago[analyzer] exploded-graph-rewriter: Rename Environment to Expressions.
Artem Dergachev [Fri, 18 Oct 2019 20:15:41 +0000 (20:15 +0000)]
[analyzer] exploded-graph-rewriter: Rename Environment to Expressions.

It's less confusing for newcomers.

llvm-svn: 375282

4 years ago[analyzer] Fix FieldRegion dumps.
Artem Dergachev [Fri, 18 Oct 2019 20:15:39 +0000 (20:15 +0000)]
[analyzer] Fix FieldRegion dumps.

The '->' thing has always been confusing; the actual operation '->'
translates to a pointer dereference together with adding a FieldRegion,
but FieldRegion on its own doesn't imply an additional pointer
dereference.

llvm-svn: 375281

4 years ago[analyzer] Drop the logic for collapsing the state if it's same as in preds.
Artem Dergachev [Fri, 18 Oct 2019 20:15:35 +0000 (20:15 +0000)]
[analyzer] Drop the logic for collapsing the state if it's same as in preds.

One of the first attempts to reduce the size of the exploded graph dumps
was to skip the state dump as long as the state is the same as in all of
the predecessor nodes. With all the new facilities in place (node joining,
diff dumps), this feature doesn't do much, and when it does,
it's more harmful than useful. Let's remove it.

llvm-svn: 375280

4 years ago[analyzer] exploded-graph-rewriter: Fix dump for state 0.
Artem Dergachev [Fri, 18 Oct 2019 20:15:32 +0000 (20:15 +0000)]
[analyzer] exploded-graph-rewriter: Fix dump for state 0.

It shouldn't say "unspecified" when the state is specified to be empty.

llvm-svn: 375279

4 years ago[analyzer] Fix hidden node traversal in exploded graph dumps.
Artem Dergachev [Fri, 18 Oct 2019 20:15:29 +0000 (20:15 +0000)]
[analyzer] Fix hidden node traversal in exploded graph dumps.

The joined nodes now actually have the same state. That was intended
from the start but the original implementation turned out to be buggy.

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

llvm-svn: 375278

4 years ago[GISel][CallLowering] Make isIncomingArgumentHandler a pure virtual method
Quentin Colombet [Fri, 18 Oct 2019 20:13:42 +0000 (20:13 +0000)]
[GISel][CallLowering] Make isIncomingArgumentHandler a pure virtual method

The default implementation of isIncomingArgumentHandler could lead
to generating incorrect code.
Make it a pure virtual method, so that targets know they have to
override it to produce correct code.

NFC

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

llvm-svn: 375277

4 years agoscudo: Update TLS_SLOT_SANITIZER value.
Peter Collingbourne [Fri, 18 Oct 2019 20:00:32 +0000 (20:00 +0000)]
scudo: Update TLS_SLOT_SANITIZER value.

Android now allocates only 8 fixed TLS slots. Somehow we were getting away
with using a non-existent slot until now, but in some cases the TLS slots
were being placed at the end of a page, which led to a segfault at startup.

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

llvm-svn: 375276

4 years ago[libunwind][Android] Fix findUnwindSections for ARM EHABI Bionic
Ryan Prichard [Fri, 18 Oct 2019 19:59:22 +0000 (19:59 +0000)]
[libunwind][Android] Fix findUnwindSections for ARM EHABI Bionic

Summary:
Fix the arm_section_length count. The meaning of the arm_section_length
field changed from num-of-elements to num-of-bytes when the
dl_unwind_find_exidx special case was removed (D30306 and D30681). The
special case was restored in D39468, but that patch didn't account for the
change in arm_section_length's meaning.

That patch worked when it was applied to the NDK's fork of libunwind,
because it never removed the special case in the first place, and the
special case is probably disabled in the Android platform's copy of
libunwind, because __ANDROID_API__ is greater than 21.

Turn the dl_unwind_find_exidx special case on unconditionally for Bionic.
Bionic's dl_unwind_find_exidx is much faster than using dl_iterate_phdr.
(e.g. Bionic stores exidx info on an internal soinfo object.)

Reviewers: thomasanderson, srhines, danalbert, ed, keith.walker.arm, mclow.lists, compnerd

Reviewed By: srhines, danalbert

Subscribers: srhines, kristof.beyls, christof, libcxx-commits

Tags: #libc

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

llvm-svn: 375275

4 years ago[CVP] After proving that @llvm.with.overflow()/@llvm.sat() don't overflow, also try...
Roman Lebedev [Fri, 18 Oct 2019 19:32:47 +0000 (19:32 +0000)]
[CVP] After proving that @llvm.with.overflow()/@llvm.sat() don't overflow, also try to prove other no-wrap

Summary:
CVP, unlike InstCombine, does not run till exaustion.
It only does a single pass.

When dealing with those special binops, if we prove that they can
safely be demoted into their usual binop form,
we do set the no-wrap we deduced. But when dealing with usual binops,
we try to deduce both no-wraps.

So if we convert e.g. @llvm.uadd.with.overflow() to `add nuw`,
we won't attempt to check whether it can be `add nuw nsw`.

This patch proposes to call `processBinOp()` on newly-created binop,
which is identical to what we do for div/rem already.

Reviewers: nikic, spatel, reames

Reviewed By: nikic

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 375273

4 years ago[lldb][NFC] Remove wrong tests in TestCallOverriddenMethod
Raphael Isemann [Fri, 18 Oct 2019 19:18:41 +0000 (19:18 +0000)]
[lldb][NFC] Remove wrong tests in TestCallOverriddenMethod

We call these tests in the second test function where they are
x-failed on Windows. I forgot to remove the tests from the first
test function (which is not x-failed on Windows) when extracting these
calls into their own test function, so the test is still failing on Windows.

llvm-svn: 375271

4 years ago[examples] Fix some comments in the LLJITWithJITLink example
Lang Hames [Fri, 18 Oct 2019 18:35:02 +0000 (18:35 +0000)]
[examples] Fix some comments in the LLJITWithJITLink example

llvm-svn: 375269

4 years agoAMDGPU: Relax 32-bit SGPR register class
Matt Arsenault [Fri, 18 Oct 2019 18:26:37 +0000 (18:26 +0000)]
AMDGPU: Relax 32-bit SGPR register class

Mostly use SReg_32 instead of SReg_32_XM0 for arbitrary values. This
will allow the register coalescer to do a better job eliminating
copies to m0.

For GlobalISel, as a terrible hack, use SGPR_32 for things that should
use SCC until booleans are solved.

llvm-svn: 375267

4 years ago[examples] Add an example of how to use JITLink and small-code-model with LLJIT.
Lang Hames [Fri, 18 Oct 2019 18:25:15 +0000 (18:25 +0000)]
[examples] Add an example of how to use JITLink and small-code-model with LLJIT.

JITLink is LLVM's newer jit-linker. It is an alternative to (and hopefully
eventually a replacement for) LLVM's older jit-linker, RuntimeDyld. Unlike
RuntimeDyld which requries JIT'd code to be complied with the large code
model, JITlink can link code compiled with the small code model, which is
the native code model for a number of targets (including all supported MachO
targets).

This example shows how to:

-- Create a JITLink InProcessMemoryManager
-- Set the code model to small
-- Use a JITLink backed ObjectLinkingLayer as the linking layer for LLJIT
   (rather than the default RTDyldObjectLinkingLayer).

Note: This example will only work on platforms supported by JITLink. As of
this commit that's MachO/x86-64 and MachO/arm64.

llvm-svn: 375266

4 years agoAMDGPU: Fix SMEM WAR hazard for gfx10 readlane
Austin Kerbow [Fri, 18 Oct 2019 18:20:30 +0000 (18:20 +0000)]
AMDGPU: Fix SMEM WAR hazard for gfx10 readlane

Summary: Hazard recognizer fails to see hazard with V_READLANE_B32_gfx10.

Reviewers: rampitec

Reviewed By: rampitec

Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 375265

4 years ago[lit] Reduce value of synthesized timeouts
Julian Lettner [Fri, 18 Oct 2019 17:59:46 +0000 (17:59 +0000)]
[lit] Reduce value of synthesized timeouts

Large timeout values (one year, positive infinity) trip up Python on
Windows with "OverflowError: timeout value is too large".  One week
seems to work and is still large enough in practice.

Thanks to Simon Pilgrim for helping me test this.
https://reviews.llvm.org/rL375171

llvm-svn: 375264

4 years ago[lit] Remove unnecessary tracking of test_index
Julian Lettner [Fri, 18 Oct 2019 17:31:48 +0000 (17:31 +0000)]
[lit] Remove unnecessary tracking of test_index

llvm-svn: 375263

4 years ago[lit] Only send back test result from worker process
Julian Lettner [Fri, 18 Oct 2019 17:31:45 +0000 (17:31 +0000)]
[lit] Only send back test result from worker process

Avoid sending back the whole run.Test object (which needs to be pickled)
from the worker process when we are only interested in the test result.

llvm-svn: 375262

4 years ago[Codegen] Link MIRParser into CodeGenTests to fix MachineSizeOptsTest building
Roman Lebedev [Fri, 18 Oct 2019 17:18:21 +0000 (17:18 +0000)]
[Codegen] Link MIRParser into CodeGenTests to fix MachineSizeOptsTest building

llvm-svn: 375261

4 years ago[NFC][CVP] Add @llvm.*.sat tests where we could prove both no-overflows
Roman Lebedev [Fri, 18 Oct 2019 17:18:12 +0000 (17:18 +0000)]
[NFC][CVP] Add @llvm.*.sat tests where we could prove both no-overflows

llvm-svn: 375260

4 years ago[Reproducer] Use ::rtrim() to remove trailing control characters.
Jonas Devlieghere [Fri, 18 Oct 2019 17:11:48 +0000 (17:11 +0000)]
[Reproducer] Use ::rtrim() to remove trailing control characters.

Pavel correctly pointed out that removing all control characters from
the working directory is overkill. It should be sufficient to just strip
the last ones.

llvm-svn: 375259

4 years ago[Format] Add format check for throwing negative numbers
Brian Gesiak [Fri, 18 Oct 2019 16:59:02 +0000 (16:59 +0000)]
[Format] Add format check for throwing negative numbers

Summary:
The code `throw -1;` is currently formatted by clang-format as
`throw - 1;`. This diff adds a fix for this edge case and a test to check
for this in the future.

For context, I am looking into a related bug in the clang-formatting of
coroutine keywords: `co_yield -1;` is also reformatted in this manner
as `co_yield - 1;`. A later diff will add these changes and tests for the
`co_yield` and `co_return` keywords.

Patch by Jonathan Thomas (jonathoma)!

Reviewers: modocache, sammccall, Quuxplusone

Reviewed By: sammccall

Subscribers: cfe-commits

Tags: #clang-format, #clang

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

llvm-svn: 375258

4 years ago[DOCS]Update list of implemented constructs, NFC.
Alexey Bataev [Fri, 18 Oct 2019 16:53:54 +0000 (16:53 +0000)]
[DOCS]Update list of implemented constructs, NFC.

llvm-svn: 375257

4 years agogn build: Merge r375254
GN Sync Bot [Fri, 18 Oct 2019 16:52:12 +0000 (16:52 +0000)]
gn build: Merge r375254

llvm-svn: 375256

4 years ago[OPENMP50]Add support for master taskloop simd.
Alexey Bataev [Fri, 18 Oct 2019 16:47:35 +0000 (16:47 +0000)]
[OPENMP50]Add support for master taskloop simd.

Added  trsing/semantics/codegen for combined construct master taskloop simd.

llvm-svn: 375255

4 years ago[PGO][PGSO] SizeOpts changes.
Hiroshi Yamauchi [Fri, 18 Oct 2019 16:46:01 +0000 (16:46 +0000)]
[PGO][PGSO] SizeOpts changes.

Summary:
(Split of off D67120)

SizeOpts/MachineSizeOpts changes for profile guided size optimization.

Reviewers: davidxl

Subscribers: mgorny, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 375254