Commit Graph

281167 Commits

Author SHA1 Message Date
Simon Pilgrim bf3c39877e Regenerate select test. NFCI.
llvm-svn: 323265
2018-01-23 21:50:46 +00:00
Simon Pilgrim a075ce04d8 Regenerate shuffle sink test. NFCI.
llvm-svn: 323264
2018-01-23 21:50:11 +00:00
Craig Topper 1e42a4a735 [X86] Merge some regular expressions in Zen scheduler model and remove 2 unused classes.
I don't know if the unused classes were intended to be used and that the VEX version is really different than the legacy SSE version. Agner's tables don't show any differences. I'm just cleaning up assuming the current behavior is correct.

llvm-svn: 323263
2018-01-23 21:37:56 +00:00
Craig Topper 3067f4ddca [X86] Remove 'Int_' from instregexs in Zen scheduler model.
No instructions have Int_ at the beginning. It's always at the end now. So it should be picked up as a prefix match

llvm-svn: 323262
2018-01-23 21:37:54 +00:00
Craig Topper 002657731b [X86] Move 'Int_' to the end of the name of the VCOMISS/VUCOMISS and instructions to get them picked up by the scheduler model regexs.
All other intrinsic instructions put the _Int on the end. This make these instructions consistent and gets the prefix instregexs in the scheduler models to pick them up.

llvm-svn: 323261
2018-01-23 21:37:51 +00:00
Simon Pilgrim 2cc74ed2be [X86][AVX] LowerBUILD_VECTORAsVariablePermute - add support for VPERMILPV to v2i64/v2f64
Minor refactor to make it possible for LowerBUILD_VECTORAsVariablePermute to be used with a wider variety of shuffles op and types.

I'd have liked to add v4i32/v4f32 support as well but we don't see v4i32 index extractions at the moment (which is why I created D42308)

After this I intend to begin adding scaling support for PSHUFB (v8i16, v4i32, v2i64)) and VPERMPS (v4f64, v4i64).

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

llvm-svn: 323260
2018-01-23 21:33:24 +00:00
Evgeniy Stepanov d5a6fdbe95 [safestack] Inline safestack pointer access when possible.
Summary:
This adds an -mllvm flag that forces the use of a runtime function call to
get the unsafe stack pointer, the same that is currently used on non-x86, non-aarch64 android.
The call may be inlined.

Reviewers: pcc

Subscribers: aemerson, kristof.beyls, hiraditya, llvm-commits

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

llvm-svn: 323259
2018-01-23 21:27:07 +00:00
Simon Pilgrim c1e2290d37 Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI.
llvm-svn: 323258
2018-01-23 21:22:16 +00:00
Saleem Abdulrasool 93a8b19d8c AST: correct mangling for SEL on MS ABI
We would previously treat `SEL` as a pointer-only type.  This is not the
case.  It should be treated similarly to `id` and `Class`.  Add some
test cases to ensure that it will be properly handled as well.

llvm-svn: 323257
2018-01-23 20:56:52 +00:00
Vedant Kumar 92f7a6200c [Debugify] Add a mode to opt to enable faster testing
Opt's "-enable-debugify" mode adds an instance of Debugify at the
beginning of the pass pipeline, and an instance of CheckDebugify at the
end.

You can enable this mode with lit using: -Dopt="opt -enable-debugify".
Note that running test suites in this mode will result in many failures
due to strict FileCheck commands, etc.

It can be more useful to look for assertion failures which arise only
when Debugify is enabled, e.g to prove that we have (or do not have)
test coverage for some code path with debug info present.

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

llvm-svn: 323256
2018-01-23 20:43:50 +00:00
Aaron Smith ec40f818c6 [SymbolFilePDB] Fix null array access when parsing the type of a function without any arguments, i.e. 'int main()' and add support to test it
Summary:
- Fix a null array access bug. This happens when creating the lldb type for a function that has no argument.
- Implement SymbolFilePDB::ParseTypes method. Using `lldb-test symbols` will show all supported types in the target.
- Create lldb types for variadic function, PDBSymbolTypePointer, PDBSymbolTypeBuiltin
- The underlying builtin type for PDBSymbolTypeEnum is always `Int`, correct it with the very first enumerator's encoding if any. This is more accurate when the underlying type is not signed or another integer type.
- Fix a bug when the compiler type is not created based on PDB_BuiltinType. For example, basic type `long` is of same width as `int` in a 32-bit target, and the compiler type of former one will be represented by the one generated for latter if using the default method. Introduce a static function GetBuiltinTypeForPDBEncodingAndBitSize to correct this issue.
- Basic type `long double` and `double` have the same bit size in MSVC and there is no information in a PDB to distinguish them. The compiler type of the former one is represented by the latter's.
- There is no line information about typedef, enum etc in a PDB and the source and line information for them are not shown.
- There is no information about scoped enumeration. The compiler type is represented as an unscoped one.

Reviewers: zturner, lldb-commits

Reviewed By: zturner

Subscribers: majnemer, llvm-commits

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

llvm-svn: 323255
2018-01-23 20:35:19 +00:00
Vedant Kumar a9ae2fe782 docs: Remove reference to a deprecated flag
llvm-svn: 323254
2018-01-23 20:22:37 +00:00
Dan Gohman 59f16991b0 [WebAssembly] Factor out settings common to wasm32 and wasm64. NFC.
MaxAtomicPromoteWidth and MaxAtomicInlineWidth are 64 on both
wasm32 and wasm64, so they can be set in shared code.

llvm-svn: 323253
2018-01-23 20:22:12 +00:00
Alexey Bataev 4f74a31c0e Revert "[SLP] Fix for PR32086: Count InsertElementInstr of the same elements as shuffle."
This reverts commit r323246 because of the broken buildbots.

llvm-svn: 323252
2018-01-23 20:11:27 +00:00
George Karpenkov 6d0dd763af [analyzer] Mark lines as relevant even if they weren't executed but have a label attached
Differential Revision: https://reviews.llvm.org/D42320

llvm-svn: 323251
2018-01-23 20:01:31 +00:00
Krzysztof Parzyszek d5e8a260bb [Hexagon] Add patterns for sext_inreg of HVX vector types
llvm-svn: 323250
2018-01-23 19:56:16 +00:00
Francis Ricci 564f845b74 [ubsan] Add preinit initializer for ubsan
Summary:
Now that ubsan does function interception (for signals), we
need to ensure that ubsan is initialized before any library
constructors are called. Otherwise, if a constructor calls
sigaction, ubsan will intercept in an unitialized state, which
will cause a crash.

This patch is a partial revert of r317757, which removed
preinit arrays for ubsan.

Reviewers: vitalybuka, eugenis, pcc

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

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

llvm-svn: 323249
2018-01-23 19:54:02 +00:00
Volkan Keles 1b55f1f804 Add a utility to reduce GlobalISel tests
Summary: This patch adds a script to reduce GlobalISel failures using bugpoint.

Reviewers: bogner

Reviewed By: bogner

Subscribers: MatzeB, qcolombet, rovka, kristof.beyls, llvm-commits

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

llvm-svn: 323248
2018-01-23 19:47:10 +00:00
Saleem Abdulrasool be2b5cbf5e CodeGen: use `llvm.used` for ObjC protocols
These symbols are supposed to be preserved even by the linker.  Use the
`llvm.used` to ensure that the symbols are not removed by DCE in the
linker.  This should be a no-op change on MachO since the symbols are
annotated as `no_dead_strip`.

llvm-svn: 323247
2018-01-23 19:35:51 +00:00
Alexey Bataev 6719e2418c [SLP] Fix for PR32086: Count InsertElementInstr of the same elements as shuffle.
Summary:
If the same value is going to be vectorized several times in the same
tree entry, this entry is considered to be a gather entry and cost of
this gather is counter as cost of InsertElementInstrs for each gathered
value. But we can consider these elements as ShuffleInstr with
SK_PermuteSingle shuffle kind.

Reviewers: spatel, RKSimon, mkuper, hfinkel

Subscribers: llvm-commits

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

llvm-svn: 323246
2018-01-23 19:30:26 +00:00
George Karpenkov 4a190fe62f [analyzer] Show full analyzer invocation for reproducibility in HTML reports
Analyzing problems which appear in scan-build results can be very
difficult, as after the launch no exact invocation is stored, and it's
super-hard to launch the debugger.
With this patch, the exact analyzer invocation appears in the footer,
and can be copied to debug/check reproducibility/etc.

rdar://35980230

llvm-svn: 323245
2018-01-23 19:28:52 +00:00
George Karpenkov 7c540debf2 [html] [NFC] Use raw strings to dump the style table.
llvm-svn: 323244
2018-01-23 19:28:43 +00:00
Peter Smith 5bb90135e6 [ELF] Make --fix-cortex-a53-843419 work on big endian hosts
The reinterpret cast to uint32_t to read the little-endian instructions 
will only work on a little endian system. Use ulittle32_t to always read
little-endian (AArch64 instructions are always little endian).

Fixes PR36056

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

llvm-svn: 323243
2018-01-23 19:26:52 +00:00
Zvi Rackover 87937e8ed2 X86 Tests: Add AVX512BW config to CodeGenPrepare test. NFC
Case points out that we don't consider shifts supported by AVX512BW
in isVectorShiftByScalarCheap()

llvm-svn: 323242
2018-01-23 19:20:39 +00:00
Saleem Abdulrasool 6794236ad4 AST: adjust ObjC MS mangling to work with typedefs
Rather than hardcode the pointerness of the `id` and `class` types,
handle them generically.  This allows for the template type
specialization of `remove_pointer<id>` which would look through the `id`
type and deal with the `objc_object` structure without the pointer.

llvm-svn: 323241
2018-01-23 19:17:25 +00:00
Krzysztof Parzyszek 275ffa4679 [Hexagon] Implement hasLoadFromStackSlot and hasStoreToStackSlot
If the instruction is a bundle, check the instructions inside of it.

Patch by Suyog Sarda.

llvm-svn: 323240
2018-01-23 19:08:40 +00:00
Artem Belevich 5ecdb94487 [CUDA] CUDA has no device-side library builtins.
We should (almost) never consider a device-side declaration to match a
library builtin functio.  Otherwise clang may ignore the implementation
provided by the CUDA headers and emit clang's idea of the builtin.

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

llvm-svn: 323239
2018-01-23 19:08:18 +00:00
Nico Weber 1c7c45688c Introduce errorToBool() helper and use it.
errorToBool() converts an Error to a bool and puts the Error in a checked
state.  No behavior change.

https://reviews.llvm.org/D42422

llvm-svn: 323238
2018-01-23 19:03:13 +00:00
Peter Collingbourne 2f97aab6ea libcxx: Rename vasprintf function to __libcpp_vasprintf.
The language standard does not define a function with this name,
so it is part of the user's namespace. This change fixes a duplicate
symbol error that occurs when a user attempts to define a function
with this name.

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

llvm-svn: 323237
2018-01-23 18:53:33 +00:00
Alexey Bataev 1e49137d34 [OPENMP] Replace call of EmitLoadOfLValue() by EmitLoadOfScalar(), NFC.
Replace calls of EmitLoadOfLValue() by EmitLoadOfScalar() functions if
it is known that the value is scalar.

llvm-svn: 323236
2018-01-23 18:44:14 +00:00
Craig Topper 596527bca6 [Docs] Re-generate command line documentation.
llvm-svn: 323235
2018-01-23 18:40:15 +00:00
Sam Clegg 68b425f0bf [WebAssembly] Remove "name" section of object wasm object files
LLD is unaffected, no changes needed there. LLD continues to
write out a name section, using the symbol names.

Fixes: https://github.com/WebAssembly/tool-conventions/issues/37

Patch by Nicholas Wilson!

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

llvm-svn: 323234
2018-01-23 18:30:04 +00:00
Krzysztof Parzyszek ae3e934bd6 [Hexagon] Fix unused variable warning in release build
llvm-svn: 323233
2018-01-23 18:16:52 +00:00
Alexey Bataev a9b9cc0d79 [OPENMP] Remove more empty SourceLocations() from the code.
Removed more empty SourceLocations() from the OpenMP code and replaced
with the correct locations for better debug info emission.

llvm-svn: 323232
2018-01-23 18:12:38 +00:00
Jonas Hahnfeld 7143302a7e test/Driver: Add some --stdlib=platform, NFC.
This fixes the failing test when building with CLANG_DEFAULT_CXX_STDLIB.

llvm-svn: 323231
2018-01-23 18:12:12 +00:00
Saleem Abdulrasool 50cb5efa80 test: simplify the matching logic a bit (NFC)
Use CHECK-SAME directives to simplify the test conditions a bit.  This
makes it easier to see what is being checked.  NFC.

llvm-svn: 323230
2018-01-23 17:57:04 +00:00
Krzysztof Parzyszek 3780a0e1fa [Hexagon] Implement basic vector operations on vectors vNi1
In addition to that, make sure that there are no boolean vector types that
are associated with multiple register classes. Specifically, remove v32i1
and v64i1 from integer register classes. These types will correspond to
results of vector comparisons, and as such should belong to the vector
predicate class. Having them in scalar registers as well makes legalization
ambiguous.

llvm-svn: 323229
2018-01-23 17:53:59 +00:00
Nico Weber 47867e34e0 Name two bool parameters. No behavior change.
llvm-svn: 323228
2018-01-23 17:29:41 +00:00
Malcolm Parsons 6e4d53bc2b [clang-tidy] Handle bitfields in cppcoreguidelines-pro-type-member-init if using C++2a
Summary:
C++2a allows bitfields to have default member initializers.
Add support for this to clang-tidy's cppcoreguidelines-pro-type-member-init check.

Reviewers: aaron.ballman, alexfh

Reviewed By: aaron.ballman

Subscribers: klimek, nemanjai, xazax.hun, kbarton, cfe-commits

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

llvm-svn: 323227
2018-01-23 17:13:57 +00:00
Nico Weber c068ff72c5 clang-format: Support macros in front of @interface / @protocol for ObjC code.
llvm-svn: 323226
2018-01-23 17:10:25 +00:00
Saleem Abdulrasool f1d814d40c test: adjust the target for some Windows tests
The tests are targeting Windows but do not specify an environment.  When
executed on Linux, they would use an ELF output rather than the COFF
output.  Explicitly provide an environment.

llvm-svn: 323225
2018-01-23 17:05:57 +00:00
Dan Gohman 4f637e0ccc [WebAssembly] Add mem.* builtin functions.
This corresponds to r323222 in LLVM. The new names are not yet
finalized, so use them at your own risk.

llvm-svn: 323224
2018-01-23 17:04:04 +00:00
Simon Pilgrim 6ff241fc99 [X86][SSE] LowerBUILD_VECTORAsVariablePermute - extract subvector from oversized index vectors
llvm-svn: 323223
2018-01-23 17:02:15 +00:00
Dan Gohman 5464941a6a [WebAssembly] Add mem.* intrinsics.
The grow_memory and current_memory instructions are expected to be
officially renamed to mem.grow and mem.size. Introduce new intrinsics
with the new names. These new names aren't yet official, so for now,
use them at your own risk.

Also, take this opportunity to add arguments for the currently unused
immediate field in those instructions.

llvm-svn: 323222
2018-01-23 17:02:02 +00:00
Rafael Espindola 8e2fc4f3f8 Don't mark a shared library as needed because of a lazy symbol.
Fixes PR36029.

llvm-svn: 323221
2018-01-23 16:59:20 +00:00
Dan Gohman f2c1cae5cb [WebAssembly] Switch to *-wasm as the default target triple.
This makes wasm32-unknown-unknown-wasm the default, which supports
the .o file writer and the new linking ABI. To enable s2wasm-compatible
output, use the wasm32-unknown-unknown-elf triple.

llvm-svn: 323220
2018-01-23 16:55:44 +00:00
Adrian Prantl eac1c02d2a Move getBuildArtifact() from TestBase to Base and derive MiTestCaseBase from it
Thanks to Pavel Labath for pointing this out!

llvm-svn: 323219
2018-01-23 16:43:01 +00:00
Nico Weber c29f83b79e clang-format: Support formatting Java 8 interface default methods.
llvm-svn: 323218
2018-01-23 16:30:56 +00:00
Bill Seurer e76f2171f9 [PowerPC][asan] Fix asan tests to handle changed memory layouts
In more recent Linux kernels with 47 bit VMAs the layout of virtual memory
for powerpc64 changed causing the address sanitizer to not work properly. This
patch fixes up a test case that was found to fail on some newer Fedora
releases that use different address ranges.

ref: https://reviews.llvm.org/D40907
llvm-svn: 323217
2018-01-23 16:28:17 +00:00
Yaxun Liu d0820433b1 Verifier: fix bug treating debug info issue as non-debug info issue
Normally when llvm-as sees only debug info errors in LLVM assembly, it simply
drops the debug info and outputs a valid LLVM bitcode and returns 0.

There is a bug in LLVM verifier which incorrectly treats a debug info error
as non-debug info error, which causes llvm-as returns 1 even though llvm-as
can drop the invalid debug info and outputs a valid LLVM bitcode.

This patch fixes that.

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

llvm-svn: 323216
2018-01-23 16:11:15 +00:00