Commit Graph

303419 Commits

Author SHA1 Message Date
Craig Topper 22bfa99448 [X86] Remove ANY_EXTEND special case from canReduceVMulWidth
Removing this code doesn't affect any lit tests so it doesn't appear to be tested anymore. I assume it was when it was added, but I guess something else changed? Code coverage report also says its unused.

I mostly didn't like that it seemed to count the sign bits as if it was a sign_extend, but then set isPositive as if it was a zero_extend. It feels like we should have picked one interpretation?

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

llvm-svn: 346995
2018-11-15 21:19:32 +00:00
Nathan Lanza 04f9d0a0c3 Implement basic DidAttach and DidLaunch for DynamicLoaderWindowsDYLD
Summary:
This commit implements basic DidAttach and DidLaunch for the windows
DynamicLoader plugin which allow us to load shared libraries from the
inferior.

Reviewers: sas, zturner

Reviewed By: zturner

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

llvm-svn: 346994
2018-11-15 20:58:09 +00:00
Nathan Lanza 5cc7de09ef Force SHELL to be cmd.exe on Windows for the test suite
Summary:
Windows make will search for other shells and choose those over cmd
if available (e.g. C:\cygdrive\bin\sh.exe). This shell has numerous
issues with path handling (/ vs \\ vs \ and C:). So default to using
cmd.exe which is known to work.

Reviewers: zturner, sas, xiaobai

Reviewed By: zturner

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

llvm-svn: 346993
2018-11-15 20:56:44 +00:00
Scott Linder 8d5a36a839 [AMDGPU] Update code object metadata format documentation
* Add amdhsa prefix to names to allow other tools to use the metadata
  without collision.
* Make names consistent.
* Simplify structure.
* Change note record ID.
* Switch from YAML to MsgPack format.
* Document metadata assembler directive.

Patch By: t-tye (Tony Tye)
Differential Revision: https://reviews.llvm.org/D53445

llvm-svn: 346992
2018-11-15 20:46:55 +00:00
Jason Molenda 976f876032 A unit test file moved.
llvm-svn: 346991
2018-11-15 20:28:55 +00:00
Tom Stellard 67666d7629 Revert "[ADT] Drop llvm::Optional clang-specific optmization for trivially copyable types"
This reverts commit r346985.

It looks like one of the unittests also needs to be updated, reverting while I investigate.

llvm-svn: 346990
2018-11-15 20:27:11 +00:00
Eric Fiselier aacebba5e6 Disable filesystem benchmark when libstdc++ doesn't support it
llvm-svn: 346989
2018-11-15 19:53:43 +00:00
Nathan Lanza a0d52cbdc9 Add a check whether or not a str is utf8 prior to emplacing
Summary:
Highlighing junk data on VSCode can send a query for evaluate which
fails. In particular cases on Windows, this the error message can end
up as a c-string of [-35,-35,-35,-35,...]. Attempting to emplace this
as the error message causes an assert failure.

Prior to emplacing the error message, confirm that it is valid UTF8 to
eliminate errors such as mentione above.

Reviewers: xiaobai, clayborg

Reviewed By: clayborg

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

llvm-svn: 346988
2018-11-15 19:49:57 +00:00
Tom Stellard cc14a32411 [ADT] Drop llvm::Optional clang-specific optmization for trivially copyable types
Summary:
This fixes libLLVM.so ABI mismatches between llvm compiled with clang
and llvm compiled with gcc (PR39427).

Reviewers: bkramer, sylvestre.ledru, mgorny, hans

Reviewed By: bkramer, hans

Subscribers: dexonsmith, kristina, llvm-commits

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

llvm-svn: 346985
2018-11-15 19:32:24 +00:00
Eric Fiselier 782a15a0d1 Upgrade Google Benchmark library to ToT
llvm-svn: 346984
2018-11-15 19:22:53 +00:00
Craig Topper b144c7a6fb [X86] Minor cleanup to getExtendInVec. NFCI
Use unsigned to calculate the subvector index to avoid a cast.

Remove an unnecessary condition and replace it with a stronger assert.

Use the InVT variable we updated when we extracted instead of grabbing it from the In SDValue.

llvm-svn: 346983
2018-11-15 19:20:22 +00:00
Sanjay Patel c92aa7618f [InstCombine] adjust rotate direction in tests; NFC
Copy/paste errors - all of the changed tests rotated left before.

llvm-svn: 346982
2018-11-15 19:15:41 +00:00
Adrian Prantl d987a8cf38 Port the Darwin universal binary testcase to x86_64.
Xcode 10 doesn't ship with an i386 SDK any more. This patch ports the
testcase from an i386/x86_64 -> x86_64/x86_64h universal binary.

rdar://problem/46099343

llvm-svn: 346981
2018-11-15 19:15:03 +00:00
Craig Topper 73bb04ab6f [X86] Add -x86-experimental-vector-widening support to reduceVMULWidth and combineMulToPMADDWD
In reduceVMULWidth, we no longer need to worry about extending the vector to 128 bits first. Regular widening of extends, muls and shuffles will take care of that for us.

In combineMulToPMADDWD, we can handle v2i32 multiplies and allow the VPMADDWD to be widened to v4i32 during type legalization by adding custom widening like we do have for AVG/ADDUS/SUBUS. I had to modify that code a little to allow different and output VTs.

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

llvm-svn: 346980
2018-11-15 18:59:31 +00:00
Thomas Lively fc3163b67a [WebAssembly] Fix return type of nextByte
Summary:
The old return type did not allow for correct error reporting and was
causing a compiler warning.

Reviewers: aheejin

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

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

llvm-svn: 346979
2018-11-15 18:56:49 +00:00
Scott Linder 919fbbbcca [BinaryFormat] Add MsgPackTypes
Add data structure to represent MessagePack "documents" and convert
to/from both MessagePack and YAML encodings.

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

llvm-svn: 346978
2018-11-15 18:50:01 +00:00
Sanjay Patel 6cda87463f [InstCombine] add tests for funnel shift (rotate) canonicalization; NFC
llvm-svn: 346975
2018-11-15 18:19:56 +00:00
Sam Clegg 2dad4e2c6d [WebAssembly] Import the stack pointer when building shared libraries
Differential Revision: https://reviews.llvm.org/D54558

llvm-svn: 346974
2018-11-15 18:15:54 +00:00
Craig Topper aa3f2494b3 [X86] Guess that a CPU is Icelake it if reports support for AVX512VBMI2.
llvm-svn: 346973
2018-11-15 18:11:52 +00:00
Sam Clegg d5f650631c [WebAssembly] Refactor config setting and checking. NFC.
This matches the way the ELF backend does it.

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

llvm-svn: 346972
2018-11-15 18:09:41 +00:00
Xin Tong 642c8d3575 [LTO] Load sample profile in LTO link step.
Summary:
Load sample profile in LTO link step.
ThinLTO calls populateModulePassManager to load the profile

Reviewers: tejohnson, davidxl, danielcdh

Subscribers: mehdi_amini, inglorion, steven_wu, dexonsmith, llvm-commits

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

llvm-svn: 346971
2018-11-15 18:06:42 +00:00
Simon Pilgrim 924f193419 [TTI] Reduction costs only need to include a single extract element cost
We were adding the entire scalarization extraction cost for reductions, which returns the total cost of extracting every element of a vector type.

For reductions we don't need to do this - we just need to extract the 0'th element after the reduction pattern has completed.

Fixes PR37731

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

llvm-svn: 346970
2018-11-15 17:42:53 +00:00
Bruno Ricci b94ad1e1d3 [AST] Store the string data in StringLiteral in a trailing array of chars
Use the newly available space in the bit-fields of Stmt and store the
string data in a trailing array of chars after the trailing array
of SourceLocation. This cuts the size of StringLiteral by 2 pointers.

Also refactor slightly StringLiteral::Create and StringLiteral::CreateEmpty
so that StringLiteral::Create is just responsible for the allocation, and the
constructor is responsible for doing all the initialization. This match what
is done for the other classes in general.

This patch should have no other functional changes apart from this.

A concern was raised during review about the interaction between
this patch and serialization abbreviations. I believe however that
there is currently no abbreviation defined for StringLiteral.
The only statements/expressions which have abbreviations are currently
DeclRefExpr, IntegerLiteral, CharacterLiteral and ImplicitCastExpr.

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

Reviewed By: dblaikie, rjmccall

llvm-svn: 346969
2018-11-15 17:31:16 +00:00
Sanjay Patel bc56b2432d [InstCombine] fix rotate narrowing bug for non-pow-2 types
llvm-svn: 346968
2018-11-15 17:19:14 +00:00
Bruno Ricci af214885cd [AST][NFC] Various NFCs in StringLiteral
Factored out of D54166
([AST] Store the string data in StringLiteral in a trailing array of chars):

* For-range loops in containsNonAscii and containsNonAsciiOrNull.
* Comments and style fixes.
* int -> unsigned in mapCharByteWidth since TargetInfo::getCharWidth
  and friends return an unsigned, and StringLiteral manipulates and
  stores CharByteWidth as an unsigned.

llvm-svn: 346967
2018-11-15 16:42:14 +00:00
Sanjay Patel 712bdb275c [InstCombine] add rotate narrowing tests with odd types; NFC
There's a potential miscompile here. It's unlikely in the real 
world because this transform is guarded with shouldChangeType(), 
but this test file doesn't include a standard data-layout for
some reason (despite including a custom 1), so we can see the bug. 

llvm-svn: 346966
2018-11-15 16:34:26 +00:00
Simon Pilgrim 5a1b7cea91 [SLPVectorizer][X86] Regenerate reduction minmax tests and cleanup check prefixes
llvm-svn: 346965
2018-11-15 16:34:15 +00:00
Simon Pilgrim 4dd692ec2a [SLPVectorizer][X86] Regenerate reduction tests and add PR37731 test
Cleanup check prefixes

llvm-svn: 346964
2018-11-15 16:08:25 +00:00
George Rimar 8329028b49 [ELF] - Renamed few more AArch64 specific relocation expressions. NFC.
They are AArch64 only, so have to have AARCH64_* prefix.

llvm-svn: 346963
2018-11-15 15:35:44 +00:00
Simon Pilgrim 0db8cb0147 [X86] Fix MCNullStreamer support for modules with a CodeView flag
This fixes -filetype=null support when compiling for a Win32 target and the module has a CodeView flag.

The only places changed are the uses of getTargetStreamer function - this patch guards both of them with null checks.

Committed on behalf of @eush (Eugene Sharygin)

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

llvm-svn: 346962
2018-11-15 15:17:15 +00:00
Sam McCall 35f3da1925 [clang-tidy] Update checks to play nicely with limited traversal scope added in r346847
Summary: (See D54204 for original review)

Reviewers: hokein

Subscribers: xazax.hun, cfe-commits

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

llvm-svn: 346961
2018-11-15 15:06:11 +00:00
Sanjay Patel e98ec77a95 [InstSimplify] delete shift-of-zero guard ops around funnel shifts
This is a problem seen in common rotate idioms as noted in:
https://bugs.llvm.org/show_bug.cgi?id=34924

Note that we are not canonicalizing standard IR (shifts and logic) to the intrinsics yet. 
(Although I've written this before...) I think this is the last step before we enable 
that transform. Ie, we could regress code by doing that transform without this 
simplification in place.

In PR34924, I questioned whether this is a valid transform for target-independent IR, 
but I convinced myself this is ok. If we're speculating a funnel shift by turning cmp+br 
into select, then SimplifyCFG has already determined that the transform is justified. 
It's possible that SimplifyCFG is not taking into account profile or other metadata, 
but if that's true, then it's a bug independent of funnel shifts.

Also, we do have CGP code to restore a guard like this around an intrinsic if it can't 
be lowered cheaply. But that isn't necessary for funnel shift because the default 
expansion in SelectionDAGBuilder includes this same cmp+select.

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

llvm-svn: 346960
2018-11-15 14:53:37 +00:00
Alex Bradbury f809d89980 [RISCV] Mark C.EBREAK instruction as having side effects
C.EBREAK was defined with hasSideEffects = 0, which is incorrect and 
inconsistent with the non-compressed instruction form. This patch corrects 
this oversight.

This wouldn't cause codegen issues, as compressed instructions are only ever 
generated by converting the non-compressed form as an MCInst. But having 
correct flags is still worthwhile.

Differential Revision: https://reviews.llvm.org/D54256
Patch by Luís Marques.

llvm-svn: 346959
2018-11-15 14:52:24 +00:00
Alex Bradbury 7727240438 [RISCV] Mark FREM as Expand
Mark the FREM SelectionDAG node as Expand, which is necessary in order to 
support the frem IR instruction on RISC-V. This is expanded into a library 
call. Adds the corresponding test. Previously, this would have triggered an 
assertion at instruction selection time.

Differential Revision: https://reviews.llvm.org/D54159
Patch by Luís Marques.

llvm-svn: 346958
2018-11-15 14:46:11 +00:00
Bruno Ricci d6965174d5 [AST][NFC] Re-add comment in BinaryOperator which was removed by r346954
llvm-svn: 346957
2018-11-15 14:30:18 +00:00
Dan Liew ee6eb9b25a Start adding the supporting code to perform out-of-process allocator
enumeration.

Summary:

This patch introduces the local portion (`LocalAddressSpaceView`) of the
`AddressSpaceView` abstraction and modifies the secondary allocator
so that the `ForEachChunk()` method (and its callees) would work in the
out-of-process case when `AddressSpaceView` is `RemoteAddressSpaceView`.

The `AddressSpaceView` abstraction simply maps pointers from a target
process to a pointer in the local process (via its `Load()` method). For
the local (in-process) case this is a no-op. For the remote
(out-of-process) case this is not a no-op. The implementation of the
out-of-process `RemoteAddressSpaceView` is not included in this patch
and will be introduced later.

This patch is considerably simpler than the `ObjectView` abstraction
used in previous patches but lacks the type safety and stricter memory
management of the `ObjectView` abstraction.

This patch does not introduce any tests because with
`LocalAddressSpaceView` it should be a non functional change and unit
tests already cover the secondary allocator.  When
`RemoteAddressSpaceView` is landed tests will be added to ensure that it
functions as expected.

rdar://problem/45284065

Reviewers: kcc, kubamracek, dvyukov, vitalybuka, cryptoad,
george.karpenkov, morehouse

Subscribers: #sanitizers, llvm-commits

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

llvm-svn: 346956
2018-11-15 14:20:28 +00:00
Haojian Wu fd4d45514f [clangd] global-symbol-builder => clangd-indexer
llvm-svn: 346955
2018-11-15 14:15:19 +00:00
Bruno Ricci a167b3c3f7 [AST] Pack BinaryOperator
Use the newly available space in the bit-fields of Stmt.
This saves 8 bytes per BinaryOperator.

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

Reviewed By: dblaikie

llvm-svn: 346954
2018-11-15 14:12:51 +00:00
Bruno Ricci 4c74253a4f [AST] Pack MemberExpr
Use the newly available space in the bit-fields of Stmt
to store some data from MemberExpr. This saves
one pointer per MemberExpr.

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

Reviewed By: dblaikie

llvm-svn: 346953
2018-11-15 13:56:22 +00:00
Bruno Ricci 59a89a9ff6 [AST][NFC] Move the friend decls to the top of MemberExpr
The norm is to have them at the top, and having them
at the bottom is painful for the reader.

llvm-svn: 346952
2018-11-15 13:49:32 +00:00
Bruno Ricci 3354b6cefb [AST] Pack UnaryOperator
Use the newly available space in the bit-fields of Stmt
to store some data from UnaryOperator.
This saves 8 bytes per UnaryOperator.

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

Reviewed By: dblaikie

llvm-svn: 346951
2018-11-15 13:30:38 +00:00
Mikael Holmen ee84676a1e Fix warning about unused variable [NFC]
llvm-svn: 346950
2018-11-15 13:01:54 +00:00
Anton Korobeynikov f0001f4186 Add missed files from prev. commit
llvm-svn: 346949
2018-11-15 12:35:04 +00:00
Anton Korobeynikov 49045c6a0d [MSP430] Add MC layer
Reapply r346374 with the fixes for modules build.

Original summary:

This change implements assembler parser, code emitter, ELF object writer
and disassembler for the MSP430 ISA.  Also, more instruction forms are added
to the target description.

Patch by Michael Skvortsov!

llvm-svn: 346948
2018-11-15 12:29:43 +00:00
Haojian Wu 5e7486f518 [clangd] Fix no results returned for global symbols in dexp
Summary:
For symbols in global namespace (without any scope), we need to
add global scope "" to the fuzzy request.

Reviewers: ioeric

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

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

llvm-svn: 346947
2018-11-15 12:17:41 +00:00
Xing GUO cc0829f3cb [llvm-objdump] Use `auto` declaration in typecasting
Summary:
According to `MaskRay`, use `auto` for type inference, according to coding standards.
Delete some comments, because these comments can be easily inferred from codes.

Reviewers: jhenderson, MaskRay

Reviewed By: jhenderson

Subscribers: llvm-commits

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

llvm-svn: 346946
2018-11-15 11:51:13 +00:00
Kadir Cetinkaya 5a9b92ca75 Revert "Introduce shard storage to auto-index."
This reverts commit 6dd1f24aead10a8d375d0311001987198d26e900.

llvm-svn: 346945
2018-11-15 10:34:47 +00:00
Kadir Cetinkaya bd2441c887 Revert "clang-format"
This reverts commit 0a37e9c3d88a2e21863657df2f7735fb7e5f746e.

llvm-svn: 346944
2018-11-15 10:34:43 +00:00
Kadir Cetinkaya ed18e788f0 Revert "Address comments"
This reverts commit 19a39b14eab2b5339325e276262b177357d6b412.

llvm-svn: 346943
2018-11-15 10:34:39 +00:00
Kadir Cetinkaya 8b9fed3e8d Revert "Address comments."
This reverts commit b43c4d1c731e07172a382567f3146b3c461c5b69.

llvm-svn: 346942
2018-11-15 10:34:35 +00:00