platform/upstream/llvm.git
5 years ago[clang-tidy] use CHECK-NOTES in tests for bugprone-forward-declaration-namespace
Jonas Toth [Thu, 27 Sep 2018 12:17:59 +0000 (12:17 +0000)]
[clang-tidy] use CHECK-NOTES in tests for bugprone-forward-declaration-namespace

Reviewers: aaron.ballman, alexfh, hokein

Subscribers: xazax.hun, cfe-commits

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

llvm-svn: 343198

5 years agoImprove diagnostics range reporting.
Kadir Cetinkaya [Thu, 27 Sep 2018 12:12:42 +0000 (12:12 +0000)]
Improve diagnostics range reporting.

Summary:
If we have some range information coming from clang diagnostic, promote
that one even if it doesn't contain diagnostic location inside.

Reviewers: sammccall, ioeric

Reviewed By: ioeric

Subscribers: ilya-biryukov, jkorous, arphaman, cfe-commits

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

llvm-svn: 343197

5 years ago[COFF] Add missing Requires x86 to fix buildbot
Peter Smith [Thu, 27 Sep 2018 12:07:47 +0000 (12:07 +0000)]
[COFF] Add missing Requires x86 to fix buildbot

Add REQUIRES: x86 to pdb-debug-f.s as this is causing the Arm and
AArch64 buildbots to fail as they do not have the x86 backend.

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

llvm-svn: 343196

5 years ago[PowerPC] [NFC] Refactor code for printing register operands
Nemanja Ivanovic [Thu, 27 Sep 2018 11:49:47 +0000 (11:49 +0000)]
[PowerPC] [NFC] Refactor code for printing register operands

We have an unfortunate situation in our back end where we have to keep pairs of
functions synchronized. Needless to say that this is not an ideal situation as
it is very difficult to enforce. Even without bugs, it's annoying to have to do
the same thing in two places.

This patch just refactors the code so that the two pairs of those functions that
pertain to printing register operands are unified:
  - stripRegisterPrefix() - this just removes the letter prefixes from registers
    for the InstrPrinter and AsmPrinter. This patch provides this as a static
    member of PPCRegisterInfo
  - Handling of PPCII::UseVSXReg - there are 3 places where we do something
    special for instructions with that flag set. Each of those places does its
    own checking of this flag and implements code customization. Any changes to
    how we print/encode VSX/VMX registers require modifying all 3 places. This
    patch unifies this into a static function in PPCInstrInfo that returns the
    register number adjusted as needed.

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

llvm-svn: 343195

5 years ago[X86][Btver2] Add uops counter for exegesis reports
Simon Pilgrim [Thu, 27 Sep 2018 11:40:26 +0000 (11:40 +0000)]
[X86][Btver2] Add uops counter for exegesis reports

llvm-svn: 343194

5 years agoUpdate CallFrameString API to account for r343114
Luke Cheeseman [Thu, 27 Sep 2018 10:42:14 +0000 (10:42 +0000)]
Update CallFrameString API to account for r343114

- CallFrameString now takes an Arch parameter to account for multiplexing
  overlapping CFI directives

llvm-svn: 343193

5 years agoReapply changes reverted in r343114, lldb patch to follow shortly
Luke Cheeseman [Thu, 27 Sep 2018 10:39:20 +0000 (10:39 +0000)]
Reapply changes reverted in r343114, lldb patch to follow shortly

llvm-svn: 343192

5 years agoRefactor ClangUserExpression::GetLanguageForExpr
Raphael Isemann [Thu, 27 Sep 2018 10:12:54 +0000 (10:12 +0000)]
Refactor ClangUserExpression::GetLanguageForExpr

Summary:
The `ClangUserExpression::GetLanguageForExpr` method is currently a big
source of sadness, as it's name implies that it's an accessor method, but it actually
is also initializing some variables that we need for parsing. This caused that we
currently call this getter just for it's side effects while ignoring it's return value,
which is confusing for the reader.

This patch renames it to `UpdateLanguageForExpr` and merges all calls to the
method into a single call in `ClangUserExpression::PrepareForParsing` (as calling
this method is anyway mandatory for parsing to succeed)

While looking at the code, I also found that we actually have two language
variables in this class hierarchy. The normal `Language` from the UserExpression
class and the `LanguageForExpr` that we implemented in this subclass. Both
don't seem to actually contain the same value, so we probably should look at this
next.

Reviewers: xbolva00

Reviewed By: xbolva00

Subscribers: lldb-commits

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

llvm-svn: 343191

5 years ago[InstCombine] Add new tests in preparation for a combine of icmp (mul nsw/nuw X,...
Nicola Zaghen [Thu, 27 Sep 2018 10:08:38 +0000 (10:08 +0000)]
[InstCombine] Add new tests in preparation for a combine of icmp (mul nsw/nuw X, C2), C

Proof for the future optimisations are here:
- eq/neq: https://rise4fun.com/Alive/9PBA
- sgt/ugt: https://rise4fun.com/Alive/58yr
- slt/ult: https://rise4fun.com/Alive/VCQ

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

llvm-svn: 343190

5 years agoRevert r342942 "[MachineCopyPropagation] Reimplement CopyTracker in terms of register...
Hans Wennborg [Thu, 27 Sep 2018 09:59:27 +0000 (09:59 +0000)]
Revert r342942 "[MachineCopyPropagation] Reimplement CopyTracker in terms of register units"

It seems to have broken several targets, see comments on the llvm-commits thread.

> Change the copy tracker to keep a single map of register units instead
> of 3 maps of registers. This gives a very significant compile time
> performance improvement to the pass. I measured a 30-40% decrease in
> time spent in MCP on x86 and AArch64 and much more significant
> improvements on out of tree targets with more registers.
>
> Differential Revision: https://reviews.llvm.org/D52374

llvm-svn: 343189

5 years ago[llvm-exegesis][NFC] moving code around.
Guillaume Chatelet [Thu, 27 Sep 2018 09:23:04 +0000 (09:23 +0000)]
[llvm-exegesis][NFC] moving code around.

Summary: Renaming InstructionBuilder into InstructionTemplate and moving code generation tools from MCInstrDescView to CodeTemplate.

Reviewers: courbet

Subscribers: tschuett, llvm-commits

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

llvm-svn: 343188

5 years ago[AArch64][v8.5A] Add PSTATE manipulation instructions XAFlag and AXFlag
Oliver Stannard [Thu, 27 Sep 2018 09:11:27 +0000 (09:11 +0000)]
[AArch64][v8.5A] Add PSTATE manipulation instructions XAFlag and AXFlag

These new instructions manipluate the NZCV bits, to convert between the
regular Arm floating-point comare format and an alternative format.

Patch by Pablo Barrio!

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

llvm-svn: 343187

5 years ago[mips] Add support MIPS r6 Debian triples
Simon Atanasyan [Thu, 27 Sep 2018 08:51:18 +0000 (08:51 +0000)]
[mips] Add support MIPS r6 Debian triples

Debian uses different triples for MIPS r6 and paths. Here we use SubArch
to determine whether it is r6, if we found `r6' in CPU section of triple.

These new triples include:
  mipsisa32r6-linux-gnu
  mipsisa32r6el-linux-gnu
  mipsisa64r6-linux-gnuabi64
  mipsisa64r6el-linux-gnuabi64
  mipsisa64r6-linux-gnuabin32
  mipsisa64r6el-linux-gnuabin32

Patch by YunQiang Su.

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

llvm-svn: 343185

5 years ago[Sema] Handle __va_start for Windows/ARM64 in the same way as for ARM
Martin Storsjo [Thu, 27 Sep 2018 08:24:15 +0000 (08:24 +0000)]
[Sema] Handle __va_start for Windows/ARM64 in the same way as for ARM

This fixes PR39090.

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

llvm-svn: 343184

5 years agoRevert "[DebugInfo] Generate debug information for labels."
Vitaly Buka [Thu, 27 Sep 2018 08:15:24 +0000 (08:15 +0000)]
Revert "[DebugInfo] Generate debug information for labels."

This reverts commit r343148.

It crashes on sanitizer-x86_64-linux-autoconf.

llvm-svn: 343183

5 years ago[compiler-rt][cmake][mips] Use -mabi option to select target architecture
Simon Atanasyan [Thu, 27 Sep 2018 07:17:00 +0000 (07:17 +0000)]
[compiler-rt][cmake][mips] Use -mabi option to select target architecture

The `--target` option is rejected by GCC starting from version 7.0.
It's shorter and more portable to use `mabi` option to select MIPS ABI
for testing target architecture. Clang supports that starting from r343169.

llvm-svn: 343182

5 years agoReplace pointer to C-array of PropertyDefinition with llvm::ArrayRef
Tatyana Krasnukha [Thu, 27 Sep 2018 07:11:58 +0000 (07:11 +0000)]
Replace pointer to C-array of PropertyDefinition with llvm::ArrayRef

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

llvm-svn: 343181

5 years ago[target] Fix typo and give bool a default value
Jonas Devlieghere [Thu, 27 Sep 2018 06:59:15 +0000 (06:59 +0000)]
[target] Fix typo and give bool a default value

This addresses Stella's review feedback in D51859.

llvm-svn: 343180

5 years agoclang-format: [JS] conditional types.
Martin Probst [Thu, 27 Sep 2018 06:48:13 +0000 (06:48 +0000)]
clang-format: [JS] conditional types.

Summary:
This change adds some rudimentary support for conditional types.
Specifically it avoids breaking before `extends` and `infer` keywords,
which are subject to Automatic Semicolon Insertion, so breaking before
them creates incorrect syntax.

The actual formatting of the type expression is odd, but there is as of
yet no clear idea on how to format these.

See https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#conditional-types.

Reviewers: krasimir

Subscribers: cfe-commits

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

llvm-svn: 343179

5 years ago[Coverage] Disable Linux/coverage-missing.cc in AddressSanitizer-i386-linux testsuite
Fangrui Song [Thu, 27 Sep 2018 06:37:15 +0000 (06:37 +0000)]
[Coverage] Disable Linux/coverage-missing.cc in AddressSanitizer-i386-linux testsuite

sancov.py relies on objdump -d to obtain the number of instrumented PCs.
The i386 %dynamiclib will now include .plt entries that are not recognized by objdump,

"sancov.py: found 0 instrumented PCs in *.so",

causing AddressSanitizer-i386-linux to fail.

Change it back to x86-target-arch after %sancov switches to a more robust approach.

llvm-svn: 343178

5 years ago[llvm-exegesis] Remove unused headers and fix naming issues
Fangrui Song [Thu, 27 Sep 2018 06:10:15 +0000 (06:10 +0000)]
[llvm-exegesis] Remove unused headers and fix naming issues

Reviewers: courbet

Reviewed By: courbet

Subscribers: tschuett, llvm-commits

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

llvm-svn: 343177

5 years ago[driver][mips] Adjust target triple accordingly to provided ABI name
Simon Atanasyan [Thu, 27 Sep 2018 05:04:50 +0000 (05:04 +0000)]
[driver][mips] Adjust target triple accordingly to provided ABI name

Explicitly selected MIPS ABI using the `-mabi` option implies
corresponding target triple. For 'O32' ABI it's a 32-bit target triple
like `mips-linux-gnu`. For 'N32' and 'N64' ABIs it's a 64-bit target
triple like `mips64-linux-gnu`. This patch adjusts target triple
accordingly these rules like we do for pseudo-target flags '-m64',
'-m32' etc already.

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

llvm-svn: 343169

5 years ago[clang-tidy] Add dependency to clangAnalysis after rC343160
Fangrui Song [Thu, 27 Sep 2018 04:23:24 +0000 (04:23 +0000)]
[clang-tidy] Add dependency to clangAnalysis after rC343160

llvm-svn: 343168

5 years ago[ORC] Use ExecutionSession's pre-constructed main JITDylib in LLJIT.
Lang Hames [Thu, 27 Sep 2018 04:19:32 +0000 (04:19 +0000)]
[ORC] Use ExecutionSession's pre-constructed main JITDylib in LLJIT.

As of r342086 ExecutionSession automatically creates a 'main' JITDylib, so
there is no need for LLJIT to create its own.

llvm-svn: 343167

5 years agollvm::sort(C.begin(), C.end()) -> llvm::sort(C)
Fangrui Song [Thu, 27 Sep 2018 04:19:29 +0000 (04:19 +0000)]
llvm::sort(C.begin(), C.end()) -> llvm::sort(C)

The convenience wrapper in STLExtras is available since rL342102.

llvm-svn: 343166

5 years ago[docs] Remove reference to makellvm which was removed in rL329041
Fangrui Song [Thu, 27 Sep 2018 03:48:04 +0000 (03:48 +0000)]
[docs] Remove reference to makellvm which was removed in rL329041

llvm-svn: 343165

5 years agollvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)
Fangrui Song [Thu, 27 Sep 2018 03:35:05 +0000 (03:35 +0000)]
llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)

The convenience wrapper in STLExtras is available since rL342102.

llvm-svn: 343164

5 years agollvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)
Fangrui Song [Thu, 27 Sep 2018 02:13:45 +0000 (02:13 +0000)]
llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)

Summary: The convenience wrapper in STLExtras is available since rL342102.

Reviewers: dblaikie, javed.absar, JDevlieghere, andreadb

Subscribers: MatzeB, sanjoy, arsenm, dschuff, mehdi_amini, sdardis, nemanjai, jvesely, nhaehnle, sbc100, jgravelle-google, eraman, aheejin, kbarton, JDevlieghere, javed.absar, gbedwell, jrtc27, mgrang, atanasyan, steven_wu, george.burgess.iv, dexonsmith, kristina, jsji, llvm-commits

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

llvm-svn: 343163

5 years agoRe-reapply r343129 with more fixes.
Lang Hames [Thu, 27 Sep 2018 02:09:37 +0000 (02:09 +0000)]
Re-reapply r343129 with more fixes.

Fixes order-of-operand-evaluation bugs in the ThreadSafeModule unit tests.

llvm-svn: 343162

5 years agoRevert "Re-revert r343129."
Lang Hames [Thu, 27 Sep 2018 02:09:36 +0000 (02:09 +0000)]
Revert "Re-revert r343129."

This reverts commit 4e2557dbc76704beb8c4cf1191cb786e719db5d3.

llvm-svn: 343161

5 years ago[analyzer] [NFC] Move the code for dumping the program point to ProgramPoint
George Karpenkov [Thu, 27 Sep 2018 01:46:18 +0000 (01:46 +0000)]
[analyzer] [NFC] Move the code for dumping the program point to ProgramPoint

So we can dump them outside of viewing the exploded grpah.

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

llvm-svn: 343160

5 years ago[analyzer] [NFC] Heavy refactoring of trackNullOrUndefValue
George Karpenkov [Thu, 27 Sep 2018 01:45:57 +0000 (01:45 +0000)]
[analyzer] [NFC] Heavy refactoring of trackNullOrUndefValue

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

llvm-svn: 343159

5 years ago[analyzer] [testing] Pass through an extra argument for specifying extra analyzer...
George Karpenkov [Thu, 27 Sep 2018 01:10:59 +0000 (01:10 +0000)]
[analyzer] [testing] Pass through an extra argument for specifying extra analyzer options

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

llvm-svn: 343158

5 years ago[WebAssembly] Update Config member to match command line option
Sam Clegg [Thu, 27 Sep 2018 00:46:54 +0000 (00:46 +0000)]
[WebAssembly] Update Config member to match command line option

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

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

llvm-svn: 343157

5 years agoRevert "[WebAssembly] Update docs"
Sam Clegg [Thu, 27 Sep 2018 00:42:49 +0000 (00:42 +0000)]
Revert "[WebAssembly] Update docs"

This change reverts rL343155.  It broke the builtbot, even though
it works for me locally:
http://lab.llvm.org:8011/builders/lld-sphinx-docs/builds/26336

Must be a sphinx version issue I guess.

llvm-svn: 343156

5 years ago[WebAssembly] Update docs
Sam Clegg [Thu, 27 Sep 2018 00:22:24 +0000 (00:22 +0000)]
[WebAssembly] Update docs

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

llvm-svn: 343155

5 years ago[WebAssembly] Fix MRI.hasOneNonDBGUse assert in WebAssemblyRegStackify pass
Yury Delendik [Wed, 26 Sep 2018 23:49:21 +0000 (23:49 +0000)]
[WebAssembly] Fix MRI.hasOneNonDBGUse assert in WebAssemblyRegStackify pass

Summary:
The OneUseDominatesOtherUses in the WebAssemblyRegStackify not properly validates register use using hasOneUse. Since we added/modified DBG_VALUE the assert started catching valid cases.

See also https://reviews.llvm.org/D49034#1247200

Fix verified by running the wasm waterfall.

Reviewed By: dschuff

Tags: #debug-info

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

llvm-svn: 343154

5 years ago[sanitizer] AndroidGetApiLevel for static executables.
Evgeniy Stepanov [Wed, 26 Sep 2018 23:48:13 +0000 (23:48 +0000)]
[sanitizer] AndroidGetApiLevel for static executables.

A version of AndroidGetApiLevel for static executables that is
completely compile-time.

The generic version uses dl_iterate_phdr which, even though it works
in static executables, crashes if called before libc is initialized.

llvm-svn: 343153

5 years agoRemove trailing space in rC343150
Fangrui Song [Wed, 26 Sep 2018 23:47:00 +0000 (23:47 +0000)]
Remove trailing space in rC343150

llvm-svn: 343152

5 years agoRe-revert r343129.
Lang Hames [Wed, 26 Sep 2018 23:32:53 +0000 (23:32 +0000)]
Re-revert r343129.

Apparently the fixes in r343149 did not cover all the issues. Re-reverting
while I investigate.

llvm-svn: 343151

5 years agoInit LookupResult::AmbiguityKind
Vitaly Buka [Wed, 26 Sep 2018 22:58:53 +0000 (22:58 +0000)]
Init LookupResult::AmbiguityKind

We don't expect useful value there unless it's "ambiguous".
However we use read it for copying and moving, so we need either init the field
add login to avoid reading invalid values. Such reads trigger ubsan errors.

llvm-svn: 343150

5 years agoReapply r343129 with fix.
Lang Hames [Wed, 26 Sep 2018 22:34:33 +0000 (22:34 +0000)]
Reapply r343129 with fix.

Explicitly defines ThreadSafeModule's move-assignment operator to move fields in
reverse order. This is required to ensure that the context field outlives the
module field.

llvm-svn: 343149

5 years ago[DebugInfo] Generate debug information for labels.
Hsiangkai Wang [Wed, 26 Sep 2018 22:18:45 +0000 (22:18 +0000)]
[DebugInfo] Generate debug information for labels.

Generate DILabel metadata and call llvm.dbg.label after label
statement to associate the metadata with the label.

After fixing PR37395.
After fixing problems in LiveDebugVariables.
After fixing NULL symbol problems in AddressPool when enabling
split-dwarf-file.

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

llvm-svn: 343148

5 years agollvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)
Fangrui Song [Wed, 26 Sep 2018 22:16:28 +0000 (22:16 +0000)]
llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)

Summary: The convenience wrapper in STLExtras is available since rL342102.

Reviewers: rsmith, #clang, dblaikie

Reviewed By: rsmith, #clang

Subscribers: mgrang, arphaman, kadircet, cfe-commits

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

llvm-svn: 343147

5 years ago[ELF] llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)
Fangrui Song [Wed, 26 Sep 2018 20:54:42 +0000 (20:54 +0000)]
[ELF] llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)

Summary: The convenience wrapper in STLExtras is available since rL342102.

Reviewers: ruiu, espindola

Subscribers: emaste, arichardson, mgrang, llvm-commits

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

llvm-svn: 343146

5 years agoAllow later -z name=<int> args to override earlier args
Ryan Prichard [Wed, 26 Sep 2018 20:50:39 +0000 (20:50 +0000)]
Allow later -z name=<int> args to override earlier args

Summary:
lld already gives later -z options precedence in getZFlag().

This matches the behavior of ld.bfd and ld.gold, where later options
override earlier ones. (I tested with -z max-page-size and -z stack-size.)

Reviewers: ruiu, espindola, grimar

Reviewed By: ruiu, grimar

Subscribers: grimar, emaste, arichardson, llvm-commits

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

llvm-svn: 343145

5 years ago[AArch64] Fix range check of R_AARCH64_TLSLE_ADD_TPREL_HI12
Ryan Prichard [Wed, 26 Sep 2018 20:50:38 +0000 (20:50 +0000)]
[AArch64] Fix range check of R_AARCH64_TLSLE_ADD_TPREL_HI12

Summary:
An AArch64 LE relocation is a positive ("variant 1") offset. This
relocation is used to write the upper 12 bits of a 24-bit offset into an
add instruction:

    add x0, x0, :tprel_hi12:v1

The comment in the ARM docs for R_AARCH64_TLSLE_ADD_TPREL_HI12 is:

"Set an ADD immediate field to bits [23:12] of X; check 0 <= X < 2^24."

Reviewers: javed.absar, espindola, ruiu, peter.smith, zatrazz

Reviewed By: ruiu

Subscribers: emaste, arichardson, kristof.beyls, llvm-commits

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

llvm-svn: 343144

5 years ago[OpenMP] Add missing __kmpc_critical_with_hint to dllexports
Jonathan Peyton [Wed, 26 Sep 2018 20:47:25 +0000 (20:47 +0000)]
[OpenMP] Add missing __kmpc_critical_with_hint to dllexports

This patch puts the __kmpc_critical_with_hint function in dllexports
and also replaces some OMP_45_ENABLED to OMP_50_ENABLED

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

llvm-svn: 343143

5 years ago[OpenMP] Fix balanced affinity so thread's private affinity mask is updated
Jonathan Peyton [Wed, 26 Sep 2018 20:43:23 +0000 (20:43 +0000)]
[OpenMP] Fix balanced affinity so thread's private affinity mask is updated

Balanced affinity only updated the thread's affinity with the operating system.
This change also has the thread's private mask reflect that change as well so
that any API that probes the thread's affinity mask will report the correct
mask value.

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

llvm-svn: 343142

5 years agoFix ProcessKDP after r343130
Tatyana Krasnukha [Wed, 26 Sep 2018 20:31:39 +0000 (20:31 +0000)]
Fix ProcessKDP after r343130

llvm-svn: 343141

5 years ago[InstCombine] add tests that show undef propagation failures from D52548; NFC
Sanjay Patel [Wed, 26 Sep 2018 20:30:47 +0000 (20:30 +0000)]
[InstCombine] add tests that show undef propagation failures from D52548; NFC

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

llvm-svn: 343140

5 years ago[OpenMP] Update ittnotify sources
Jonathan Peyton [Wed, 26 Sep 2018 20:30:00 +0000 (20:30 +0000)]
[OpenMP] Update ittnotify sources

This patch updates the ittnotify sources to the latest
corresponding with Intel(R) VTune(TM) Amplifier 2018

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

llvm-svn: 343139

5 years ago[OpenMP] Fix performance issue from 376.kdtree
Jonathan Peyton [Wed, 26 Sep 2018 20:24:39 +0000 (20:24 +0000)]
[OpenMP] Fix performance issue from 376.kdtree

This change improves the performance of 376.kdtree by giving the compiler an
opportunity to do inlining and other optimizations for the call path,
__kmpc_omp_task_complete_if0()->__kmp_task_finish(), which is one of the hot
paths in the program; some functions in kmp_taskdeps.cpp were moved to the new
header file, kmp_taskdeps.h to achieve this.

Patch by Hansang Bae

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

llvm-svn: 343138

5 years ago[OpenMP][OMPT] A few improvements
Jonathan Peyton [Wed, 26 Sep 2018 20:19:44 +0000 (20:19 +0000)]
[OpenMP][OMPT] A few improvements

This change includes miscellaneous improvements as follows:
1) Added ompt_get_proc_id() implementation for Windows
2) Added parser and print tool for omp-tool-var, just in case it needs
   to be printed (OMP_DISPLAY_ENV)
3) omp_control_tool is exported on Windows

Patch by Hansang Bae

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

llvm-svn: 343137

5 years ago[asan] [windows] Don't use CheckFailed in dynamic runtime thunk mode
Martin Storsjo [Wed, 26 Sep 2018 19:49:35 +0000 (19:49 +0000)]
[asan] [windows] Don't use CheckFailed in dynamic runtime thunk mode

Since SVN r342651, CheckFailed isn't exported from asan-dynamic. See
comments in https://reviews.llvm.org/D52279#1246222 for a longer
discussion on this issue.

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

llvm-svn: 343136

5 years ago[ELF][test] Use llvm-readelf's short option -r instead of -relocations and remove...
Fangrui Song [Wed, 26 Sep 2018 19:48:07 +0000 (19:48 +0000)]
[ELF][test] Use llvm-readelf's short option -r instead of -relocations and remove ignored --wide

Reviewers: ruiu, sfertile, espindola

Reviewed By: ruiu

Subscribers: jsji, emaste, nemanjai, arichardson, kbarton, llvm-commits

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

llvm-svn: 343135

5 years agoFix OSX build after r343130
Tatyana Krasnukha [Wed, 26 Sep 2018 19:41:57 +0000 (19:41 +0000)]
Fix OSX build after r343130

llvm-svn: 343134

5 years agoRevert r343129 "[ORC] Change the field order of ThreadSafeModule to ensure the "
Lang Hames [Wed, 26 Sep 2018 19:36:30 +0000 (19:36 +0000)]
Revert r343129 "[ORC] Change the field order of ThreadSafeModule to ensure the "

It broke several bots.

llvm-svn: 343133

5 years ago[LoopInterchange] Preserve LCSSA.
Florian Hahn [Wed, 26 Sep 2018 19:34:25 +0000 (19:34 +0000)]
[LoopInterchange] Preserve LCSSA.

This patch extends LoopInterchange to move LCSSA to the right place
after interchanging. This is required for LoopInterchange to become a
function pass.

An alternative to the manual moving of the PHIs, we could also re-form
the LCSSA phis for a set of interchanged loops, but that's more
expensive.

Reviewers: efriedma, mcrosier, davide

Reviewed By: efriedma

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

llvm-svn: 343132

5 years agoP1008R1 Classes with user-declared constructors are never aggregates in
Richard Smith [Wed, 26 Sep 2018 19:00:16 +0000 (19:00 +0000)]
P1008R1 Classes with user-declared constructors are never aggregates in
C++20.

llvm-svn: 343131

5 years agoReplace "nullptr-terminated" C-arrays of OptionValueEnumeration with safer llvm:...
Tatyana Krasnukha [Wed, 26 Sep 2018 18:50:19 +0000 (18:50 +0000)]
Replace "nullptr-terminated" C-arrays of OptionValueEnumeration with safer llvm::ArrayRef

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

llvm-svn: 343130

5 years ago[ORC] Change the field order of ThreadSafeModule to ensure the Module is
Lang Hames [Wed, 26 Sep 2018 18:50:01 +0000 (18:50 +0000)]
[ORC] Change the field order of ThreadSafeModule to ensure the Module is
destroyed before its ThreadSharedContext.

Destroying the context first is an error if this ThreadSafeModule is the only
owner of its underlying context.

Add a unit test for ThreadSafeModule/ThreadSafeContext to catch this and other
basic usage issues.

llvm-svn: 343129

5 years ago[InstCombine] add tests for vector insert/extract; NFC
Sanjay Patel [Wed, 26 Sep 2018 17:57:38 +0000 (17:57 +0000)]
[InstCombine] add tests for vector insert/extract; NFC

Preliminary step for D52439.

llvm-svn: 343128

5 years ago[X86] Update tzcnt fast-isel tests to match clang r343126.
Craig Topper [Wed, 26 Sep 2018 17:19:28 +0000 (17:19 +0000)]
[X86] Update tzcnt fast-isel tests to match clang r343126.

We now generate cttz with the zero_undef flag set to false. This allows -O0 to avoid the zero check.

llvm-svn: 343127

5 years ago[X86] For lzcnt/tzcnt intrinsics use cttz/ctlz intrinsics with zero_undef flag set...
Craig Topper [Wed, 26 Sep 2018 17:01:44 +0000 (17:01 +0000)]
[X86] For lzcnt/tzcnt intrinsics use cttz/ctlz intrinsics with zero_undef flag set to false.

Previously we used a select and the zero_undef=true intrinsic. In -O2 this pattern will get optimized to zero_undef=false. But in -O0 this optimization won't happen. This results in a compare and cmov being wrapped around a tzcnt/lzcnt instruction.

By using the zero_undef=false intrinsic directly without the select, we can improve the -O0 codegen to just an lzcnt/tzcnt instruction.

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

llvm-svn: 343126

5 years agoAMDGPU/SI: Change predicate to isCIOnly for 32-bit imm s_buffer_load* patterns
Tom Stellard [Wed, 26 Sep 2018 16:53:36 +0000 (16:53 +0000)]
AMDGPU/SI: Change predicate to isCIOnly for 32-bit imm s_buffer_load* patterns

Summary:
This is essentially NFC, because the complex pattern used for these patterns
will fail on non-CI, but this makes the pattern consistent with other CI
smrd patterns.  It is also a performance improvement, because the pattern
will now fail earlier on non-CI.

Reviewers: arsenm, nhaehnle

Reviewed By: arsenm

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

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

llvm-svn: 343125

5 years ago[libLTO] Expose LLVMCreateDisasmCPUFeatures from libLTO
Steven Wu [Wed, 26 Sep 2018 16:47:35 +0000 (16:47 +0000)]
[libLTO] Expose LLVMCreateDisasmCPUFeatures from libLTO

The export file of libLTO should has all the interfaces declared in
llvm-c/lto.h and llvm-c/Disassembler.h but LLVMCreateDisasmCPUFeatures
is missing from the list. Export the C API to be consistant.

llvm-svn: 343124

5 years ago[winasan] Pin the ASan DLL to prevent unloading
David Major [Wed, 26 Sep 2018 16:28:39 +0000 (16:28 +0000)]
[winasan] Pin the ASan DLL to prevent unloading

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

llvm-svn: 343123

5 years agoReapply r343058 with a fix for -DLLVM_ENABLE_THREADS=OFF.
Lang Hames [Wed, 26 Sep 2018 16:26:59 +0000 (16:26 +0000)]
Reapply r343058 with a fix for -DLLVM_ENABLE_THREADS=OFF.

Modifies lit to add a 'thread_support' feature that can be used in lit test
REQUIRES clauses. The thread_support flag is set if -DLLVM_ENABLE_THREADS=ON
and unset if -DLLVM_ENABLE_THREADS=OFF. The lit flag is used to disable the
multiple-compile-threads-basic.ll testcase when threading is disabled.

llvm-svn: 343122

5 years ago[DAG] SelectionDAGLegalize::ExpandLegalINT_TO_FP - use getFPExtendOrRound helper...
Simon Pilgrim [Wed, 26 Sep 2018 16:24:07 +0000 (16:24 +0000)]
[DAG] SelectionDAGLegalize::ExpandLegalINT_TO_FP - use getFPExtendOrRound helper. NFCI.

Handles SrcVT == DstVT as well.

llvm-svn: 343121

5 years ago[AArch64] Extend single-operand FP insns to match Arm ARM (NFCI)
Oliver Stannard [Wed, 26 Sep 2018 15:42:47 +0000 (15:42 +0000)]
[AArch64] Extend single-operand FP insns to match Arm ARM (NFCI)

The Armv8.3-A reference manual defines floating-point data-processing
instructions with one source operand to have an opcode of 6 bits
[20:15]. The current class in tablegen, BaseSingleOperandFPData, only
allows [18:15]. This was ok because [20:19] could only be '00', with
other encodings unallocated. Armv8.5-A brings in the FRINT group of
instructions which use other values for these bits.

This patch refactors the existing class a bit to allow using the full 6
bits of the opcode, as defined in the Arm ARM.

Patch by Pablo Barrio!

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

llvm-svn: 343120

5 years ago[doc] Fix HowToManuallyUseTheIndividualPiecesOfPolly
Michael Kruse [Wed, 26 Sep 2018 15:22:39 +0000 (15:22 +0000)]
[doc] Fix HowToManuallyUseTheIndividualPiecesOfPolly

Also remove compiled binaries.

llvm-svn: 343119

5 years agoMove www/experiments to docs/experiments
Michael Kruse [Wed, 26 Sep 2018 15:21:43 +0000 (15:21 +0000)]
Move www/experiments to docs/experiments

llvm-svn: 343118

5 years ago[clangd] Fix bugs with incorrect memory estimate report
Kirill Bobyrev [Wed, 26 Sep 2018 15:06:23 +0000 (15:06 +0000)]
[clangd] Fix bugs with incorrect memory estimate report

* With the current implementation, `sizeof(std::vector<Chunk>)` is added
twice to the `Dex` memory estimate which is incorrect
* `Dex` logs memory usage estimation before `BackingDataSize` is set and
hence the log report excludes size of the external `SymbolSlab` which is
coupled with `Dex` instance

Reviewed By: ioeric

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

llvm-svn: 343117

5 years ago[docs] Update PostingList string representation format
Kirill Bobyrev [Wed, 26 Sep 2018 14:59:49 +0000 (14:59 +0000)]
[docs] Update PostingList string representation format

Because `PostingList` objects are compressed, it is now impossible to
see elements other than the current one and the documentation doesn't
match implementation anymore.

Reviewed By: ioeric

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

llvm-svn: 343116

5 years agolit: Make sure the builtin_commands directory is packaged by setup.py
Tom Stellard [Wed, 26 Sep 2018 14:56:11 +0000 (14:56 +0000)]
lit: Make sure the builtin_commands directory is packaged by setup.py

Summary: This directory was missing from the lit package on pypi.org.

Reviewers: ddunbar

Subscribers: delcypher, llvm-commits

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

llvm-svn: 343115

5 years agoRevert r343112 as CallFrameString API change has broken lldb builds
Luke Cheeseman [Wed, 26 Sep 2018 14:48:03 +0000 (14:48 +0000)]
Revert r343112 as CallFrameString API change has broken lldb builds

llvm-svn: 343114

5 years ago[AArch64] Refactor instructions that write PSTATE (NFCI)
Oliver Stannard [Wed, 26 Sep 2018 14:42:59 +0000 (14:42 +0000)]
[AArch64] Refactor instructions that write PSTATE (NFCI)

Reuse some code in preparation for the v8.5A XAFlag/AXFlag instructions,
which shares part of the encoding of the MSR-immediate.

Patch by Pablo Barrio!

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

llvm-svn: 343113

5 years ago[AArch64] - Return address signing dwarf support
Luke Cheeseman [Wed, 26 Sep 2018 14:30:29 +0000 (14:30 +0000)]
[AArch64] - Return address signing dwarf support

- Reapply r343089 with a fix for DebugInfo/Sparc/gnu-window-save.ll

llvm-svn: 343112

5 years ago[ARM/AArch64][v8.5A] Add Armv8.5-A target
Oliver Stannard [Wed, 26 Sep 2018 14:20:29 +0000 (14:20 +0000)]
[ARM/AArch64][v8.5A] Add Armv8.5-A target

This patch allows targetting Armv8.5-A from Clang. Most of the
implementation is in TargetParser, so this is mostly just adding tests.

Patch by Pablo Barrio!

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

llvm-svn: 343111

5 years ago[llvm-exgesis][NFC] Do not pollute buildbots with messages when
Clement Courbet [Wed, 26 Sep 2018 13:58:26 +0000 (13:58 +0000)]
[llvm-exgesis][NFC] Do not pollute buildbots with messages when
the exegesis lit tests cannot run.

llvm-svn: 343110

5 years ago[AArch64][AsmParser] Show name of missing feature for system instructions
Oliver Stannard [Wed, 26 Sep 2018 13:52:27 +0000 (13:52 +0000)]
[AArch64][AsmParser] Show name of missing feature for system instructions

Parsing of the system instructions (IC, DC, AT and TLBI) uses this
function to show the required architecture when the operand is valid,
but the architecture is not enabled. Armv8.5A adds a few different
system instructions as part of optional features, so we need to extend
it to show individual features, not just base architectures.

This is NFC for now, but will be used by three different features added
in v8.5A, and will be tested by them.

Patch by David Spickett!

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

llvm-svn: 343109

5 years ago[llvm-exegesis] Get rid of debug_string.
Clement Courbet [Wed, 26 Sep 2018 13:35:10 +0000 (13:35 +0000)]
[llvm-exegesis] Get rid of debug_string.

Summary:
THis is a backwards-compatible change (existing files will work as
expected).

See PR39082.

Reviewers: gchatelet

Subscribers: tschuett, llvm-commits

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

llvm-svn: 343108

5 years ago[CodeGen] Always print register ties in MI::dump()
Francis Visoiu Mistrih [Wed, 26 Sep 2018 13:33:09 +0000 (13:33 +0000)]
[CodeGen] Always print register ties in MI::dump()

It was the case when calling MO::dump(), but MI::dump() was still
depending on hasComplexRegisterTies().

The MIR output is not affected.

llvm-svn: 343107

5 years ago[ARM/AArch64] Add target parser unit tests for Armv8.4-A
Oliver Stannard [Wed, 26 Sep 2018 13:09:15 +0000 (13:09 +0000)]
[ARM/AArch64] Add target parser unit tests for Armv8.4-A

These were missed when adding Armv8.4-A support.

Patch by Pablo Barrio!

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

llvm-svn: 343106

5 years ago[analyzer] scan-build: if --status-bugs is passed, don't forget about the exit status...
Roman Lebedev [Wed, 26 Sep 2018 13:08:44 +0000 (13:08 +0000)]
[analyzer] scan-build: if --status-bugs is passed, don't forget about the exit status of the actual build

Summary:
This has been bothering me for a while, but only now i have actually looked into this.
I'm using one CI job for static analysis - clang static analyzers as compilers + clang-tidy via cmake.
And i'd like for the build to fail if at least one of those finds issues.
If clang-tidy finds issues, it will fail the build since the warnings-as-errors is set.
If static analyzer finds anything, since --status-bugs is set, it will fail the build.
But if clang-tidy find anything, but static analyzer does not, the build succeeds :/

Reviewers: sylvestre.ledru, alexfh, jroelofs, ygribov, george.karpenkov, krememek

Reviewed By: jroelofs

Subscribers: xazax.hun, szepet, a.sidorin, mikhail.ramalho, Szelethus, cfe-commits

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

llvm-svn: 343105

5 years ago[PassTiming] cleaning up legacy PassTimingInfo interface. NFCI.
Fedor Sergeev [Wed, 26 Sep 2018 13:01:43 +0000 (13:01 +0000)]
[PassTiming] cleaning up legacy PassTimingInfo interface. NFCI.

During D51276 discussion it was decided that legacy PassTimingInfo
interface can not be reused for new pass manager's implementation
of -time-passes.

This is a cleanup in preparation for D51276 to make legacy interface
as concise as possible, moving the PassTimingInfo from the header
into the anonymous legacy namespace in .cpp.

It is rather close to a revert of rL340872 in a sense that it hides
the interface and gets rid of templates. However as compared to
a complete revert it resides in a different translation unit and has
an additional pass-instance counting funcitonality (PassIDCountMap).

Reviewers: philip.pfaffe
Differential Revision: https://reviews.llvm.org/D52356

llvm-svn: 343104

5 years agoRevert r343089 "[AArch64] - Return address signing dwarf support"
Hans Wennborg [Wed, 26 Sep 2018 12:57:45 +0000 (12:57 +0000)]
Revert r343089 "[AArch64] - Return address signing dwarf support"

This caused the DebugInfo/Sparc/gnu-window-save.ll test to fail.

> Functions that have signed return addresses need additional dwarf support:
> - After signing the LR, and before authenticating it, the LR register is in a
>   state the is unusable by a debugger or unwinder
> - To account for this a new directive, .cfi_negate_ra_state, is added
> - This directive says the signed state of the LR register has now changed,
>   i.e. unsigned -> signed or signed -> unsigned
> - This directive has the same CFA code as the SPARC directive GNU_window_save
>   (0x2d), adding a macro to account for multiply defined codes
> - This patch matches the gcc implementation of this support:
>   https://patchwork.ozlabs.org/patch/800271/
>
> Differential Revision: https://reviews.llvm.org/D50136

llvm-svn: 343103

5 years ago[ARM/AArch64][v8.5A] Add Armv8.5-A target
Oliver Stannard [Wed, 26 Sep 2018 12:48:21 +0000 (12:48 +0000)]
[ARM/AArch64][v8.5A] Add Armv8.5-A target

This patch allows targeting Armv8.5-A, adding the architecture to
tablegen and setting the options to be identical to Armv8.4-A for the
time being. Subsequent patches will add support for the different
features included in the Armv8.5-A Reference Manual.

Patch by Pablo Barrio!

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

llvm-svn: 343102

5 years ago[DAG] ExpandLegalINT_TO_FP - pull out repeated getValueType() call. NFCI.
Simon Pilgrim [Wed, 26 Sep 2018 12:42:19 +0000 (12:42 +0000)]
[DAG] ExpandLegalINT_TO_FP - pull out repeated getValueType() call. NFCI.

llvm-svn: 343101

5 years ago[PowerPC] optimize conditional branch on CRSET/CRUNSET
Hiroshi Inoue [Wed, 26 Sep 2018 12:32:45 +0000 (12:32 +0000)]
[PowerPC] optimize conditional branch on CRSET/CRUNSET

This patch adds a check to optimize conditional branch (BC and BCn) based on a constant set by CRSET or CRUNSET.
Other optimizers, such as block placement, may generate such code and hence
I do this at the very end of the optimization in pre-emit peephole pass.

A conditional branch based on a constant is eliminated or converted into unconditional branch.
Also CRSET/CRUNSET is eliminated if the condition code register is not used
by instruction other than the branch to be optimized.

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

llvm-svn: 343100

5 years agoRevert r343058 "[ORC] Add support for multithreaded compiles to LLJIT and LLLazyJIT."
Hans Wennborg [Wed, 26 Sep 2018 12:15:23 +0000 (12:15 +0000)]
Revert r343058 "[ORC] Add support for multithreaded compiles to LLJIT and LLLazyJIT."

This doesn't work well in builds configured with LLVM_ENABLE_THREADS=OFF,
causing the following assert when running
ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll:

  lib/ExecutionEngine/Orc/Core.cpp:1748: Expected<llvm::JITEvaluatedSymbol>
  llvm::orc::lookup(const llvm::orc::JITDylibList &, llvm::orc::SymbolStringPtr):
  Assertion `ResultMap->size() == 1 && "Unexpected number of results"' failed.

> LLJIT and LLLazyJIT can now be constructed with an optional NumCompileThreads
> arguments. If this is non-zero then a thread-pool will be created with the
> given number of threads, and compile tasks will be dispatched to the thread
> pool.
>
> To enable testing of this feature, two new flags are added to lli:
>
> (1) -compile-threads=N (N = 0 by default) controls the number of compile threads
> to use.
>
> (2) -thread-entry can be used to execute code on additional threads. For each
> -thread-entry argument supplied (multiple are allowed) a new thread will be
> created and the given symbol called. These additional thread entry points are
> called after static constructors are run, but before main.

llvm-svn: 343099

5 years ago[llvm-exegesis][NFC] Move CodeTemplate to it's own file.
Guillaume Chatelet [Wed, 26 Sep 2018 11:57:24 +0000 (11:57 +0000)]
[llvm-exegesis][NFC] Move CodeTemplate to it's own file.

Summary: This is is preparation of exploring value ranges.

Reviewers: courbet

Reviewed By: courbet

Subscribers: mgorny, tschuett, llvm-commits

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

llvm-svn: 343098

5 years ago[X86][SSE] Refresh PR34947 test code to handle D52504
Simon Pilgrim [Wed, 26 Sep 2018 11:53:51 +0000 (11:53 +0000)]
[X86][SSE] Refresh PR34947 test code to handle D52504

The previously reduced version used urem <9 x i32> zeroinitializer, %tmp which D52504 will simplify.

llvm-svn: 343097

5 years ago[X86][SSE] canReduceVMulWidth - use ComputeNumSignBits/SignBitIsZero directly
Simon Pilgrim [Wed, 26 Sep 2018 11:48:52 +0000 (11:48 +0000)]
[X86][SSE] canReduceVMulWidth - use ComputeNumSignBits/SignBitIsZero directly

Don't reinvent the wheel for BUILD_VECTOR/ZERO_EXTEND - its only the ANY_EXTEND special case that needs handling.

llvm-svn: 343096

5 years agoDisable tests from r342917 on Windows; -lm won't work there
Hans Wennborg [Wed, 26 Sep 2018 11:23:00 +0000 (11:23 +0000)]
Disable tests from r342917 on Windows; -lm won't work there

llvm-svn: 343095

5 years ago[llvm-exegesis] Add support for measuring NumMicroOps.
Clement Courbet [Wed, 26 Sep 2018 11:22:56 +0000 (11:22 +0000)]
[llvm-exegesis] Add support for measuring NumMicroOps.

Summary:
Example output for vzeroall:

---
mode:            uops
key:
  instructions:
    - 'VZEROALL'
  config:          ''
  register_initial_values:
cpu_name:        haswell
llvm_triple:     x86_64-unknown-linux-gnu
num_repetitions: 10000
measurements:
  - { debug_string: HWPort0, value: 0.0006, per_snippet_value: 0.0006,
      key: '3' }
  - { debug_string: HWPort1, value: 0.0011, per_snippet_value: 0.0011,
      key: '4' }
  - { debug_string: HWPort2, value: 0.0004, per_snippet_value: 0.0004,
      key: '5' }
  - { debug_string: HWPort3, value: 0.0018, per_snippet_value: 0.0018,
      key: '6' }
  - { debug_string: HWPort4, value: 0.0002, per_snippet_value: 0.0002,
      key: '7' }
  - { debug_string: HWPort5, value: 1.0019, per_snippet_value: 1.0019,
      key: '8' }
  - { debug_string: HWPort6, value: 1.0033, per_snippet_value: 1.0033,
      key: '9' }
  - { debug_string: HWPort7, value: 0.0001, per_snippet_value: 0.0001,
      key: '10' }
  - { debug_string: NumMicroOps, value: 20.0069, per_snippet_value: 20.0069,
      key: NumMicroOps }
error:           ''
info:            ''
assembled_snippet: C5FC77C5FC77C5FC77C5FC77C5FC77C5FC77C5FC77C5FC77C5FC77C5FC77C5FC77C5FC77C5FC77C5FC77C5FC77C5FC77C3
...

Reviewers: gchatelet

Subscribers: tschuett, RKSimon, andreadb, llvm-commits

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

llvm-svn: 343094

5 years ago[X86][SSE] Use ISD::MULHS for constant vXi16 ISD::SRA lowering (PR38151)
Simon Pilgrim [Wed, 26 Sep 2018 10:57:05 +0000 (10:57 +0000)]
[X86][SSE] Use ISD::MULHS for constant vXi16 ISD::SRA lowering (PR38151)

Similar to the existing ISD::SRL constant vector shifts from D49562, this patch adds ISD::SRA support with ISD::MULHS.

As we're dealing with signed values, we have to handle shift by zero and shift by one special cases, so XOP+AVX2/AVX512 splitting/extension is still a better solution - really we should still use ISD::MULHS if one of the special cases are used but for now I've just left a TODO and filtered by isKnownNeverZero.

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

llvm-svn: 343093

5 years ago[ARM] Fix for PR39060
Sam Parker [Wed, 26 Sep 2018 10:56:00 +0000 (10:56 +0000)]
[ARM] Fix for PR39060

When calculating whether a value can safely overflow for use by an
icmp, we weren't checking that the value couldn't wrap around. To do
this we need the icmp to be using a constant, as well as the incoming
add or sub.

bugzilla report: https://bugs.llvm.org/show_bug.cgi?id=39060

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

llvm-svn: 343092

5 years ago[CodeGen] Enable tail calls for functions with NonNull attributes.
David Green [Wed, 26 Sep 2018 10:46:18 +0000 (10:46 +0000)]
[CodeGen] Enable tail calls for functions with NonNull attributes.

Adding NonNull as attributes to returned pointers has the unfortunate side
effect of disabling tail calls. This patch ignores the NonNull attribute when
we decide whether to tail merge, in the same way that we ignore the NoAlias
attribute, as it has no affect on the call sequence.

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

llvm-svn: 343091