Commit Graph

299610 Commits

Author SHA1 Message Date
Sanjay Patel 09e02fbf51 [InstCombine][x86] try even harder to convert blendv intrinsic to generic IR (PR38814)
Follow-up to rL342324 (D52059):

Missing optimizations with blendv are shown in:
https://bugs.llvm.org/show_bug.cgi?id=38814

This is an easier and more powerful solution than adding pattern matching for a few 
special cases in the backend. The potential danger with this transform in IR is that 
the condition value can get separated from the select, and the backend might not be 
able to make a blendv out of it again.

llvm-svn: 342806
2018-09-22 14:43:55 +00:00
Dimitry Andric f3b94728c7 Similar to the handling of darwin target triples, strip the version
numbers off of freebsd target triples, when generating the name of the
ABI list file for check-cxx-abilist target.

Also remove unnecessary parentheses in the regex for darwin, and
slightly reword the comment.

llvm-svn: 342805
2018-09-22 14:37:49 +00:00
Raphael Isemann bfc5ef6c5b Change type of m_user_expression_start_pos to size_t
AbsPosToLineColumnPos is the only reader of m_user_expression_start_pos
and actually treats it like a size_t. Also the value we store in
m_user_expression_start_pos is originally a size_t, so it makes sense
to change the type of this variable to size_t.

llvm-svn: 342804
2018-09-22 13:33:08 +00:00
Dimitry Andric 7df93310f4 Remove a bunch of empty subdirectories. NFCI.
llvm-svn: 342803
2018-09-22 13:32:37 +00:00
Sylvestre Ledru 9ea1f3554d use the current url for bugzilla
llvm-svn: 342802
2018-09-22 07:41:09 +00:00
Sylvestre Ledru b06fe489aa update the links to use https
llvm-svn: 342801
2018-09-22 07:39:44 +00:00
George Rimar ce95ac6490 [lib/MC] - Set SHF_EXCLUDE flag for .dwo sections.
DWARF5 spec says about single file split case:

"The sections that do not require relocation, however, can be written
to the relocatable object (.o) file but ignored by the
the linker or they can be written to a separate DWARF object (.dwo) file
that need not be accessed by the linker."

Nice way to make linker to ignore them is to set SHF_EXCLUDE flag.
It seems to be not harmful to always set it for .dwo sections.
That is what this patch does.

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

llvm-svn: 342800
2018-09-22 07:36:20 +00:00
Simon Atanasyan 7c9648ff89 [mips] Provide more detailed description for MIPS targets. NFC
llvm-svn: 342799
2018-09-22 06:04:32 +00:00
Simon Atanasyan 1ba42ab73a [mips] Remove obsoleted "experimental" tag from MIPS 64-bit targets. NFC
llvm-svn: 342798
2018-09-22 06:04:26 +00:00
Craig Topper 2b3f5df73a [InstCombine] Fold (min/max ~X, Y) -> ~(max/min X, ~Y) when Y is freely invertible
Summary: This restores the combine that was reverted in r341883. The infinite loop from the failing test no longer occurs due to changes from r342163.

Reviewers: spatel, dmgreen

Reviewed By: spatel

Subscribers: llvm-commits

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

llvm-svn: 342797
2018-09-22 05:53:27 +00:00
Craig Topper 082e04c61d [X86] Fix inline expansion for memset in x32
Summary: Similar to D51893 which was for memcpy

Reviewers: efriedma

Reviewed By: efriedma

Subscribers: llvm-commits

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

llvm-svn: 342796
2018-09-22 05:16:35 +00:00
Craig Topper 9995760df4 [X86] Fold (movmsk (setne (and X, (1 << C)), 0)) -> (movmsk (X << C)) for vXi8 vectors.
We don't have a vXi8 shift left so we need to bitcast to a vXi16 vector to perform the shift. If we let lowering legalize the vXi8 shift we get an extra and that we don't need and fail to remove.

llvm-svn: 342795
2018-09-22 05:08:38 +00:00
Richard Trieu 8d3fa39a0d Update smart pointer detection for thread safety analysis.
Objects are determined to be smart pointers if they have both a star and arrow
operator.  Some implementations of smart pointers have these overloaded
operators in a base class, while the check only searched the derived class.
This fix will also look for the operators in the base class.

llvm-svn: 342794
2018-09-22 01:50:52 +00:00
Leonard Chan b32d40417e [Lexer] Add udefined_behavior_sanitizer feature
This can be used to detect whether the code is being built with UBSan using
the __has_feature(undefined_behavior_sanitizer) predicate.

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

llvm-svn: 342793
2018-09-22 01:03:16 +00:00
Vyacheslav Zakharin 6ce2a2b48e Test commit.
llvm-svn: 342792
2018-09-22 01:01:03 +00:00
Jordan Rupprecht 8d60f9b6d2 [llvm-size] Berkeley formatting: use tabs instead of spaces as field delimeters.
This matches GNU behavior for size and allows use of cut to parse the output of llvm-size.

llvm-svn: 342791
2018-09-21 23:48:12 +00:00
Aaron Puchert 4e6afcfc11 Thread safety analysis: Make printSCFG compile again [NFC]
Not used productively, so no observable functional change.

Note that printSCFG doesn't yet work reliably, it seems to crash
sometimes.

llvm-svn: 342790
2018-09-21 23:46:35 +00:00
Caroline Tice 7fc64a69b6 Fix codemodels.c test case (only test mcmodel-kernel on x86)
A recent commit I made broke aarch64 testing, because "kernel"
apparently is not a valid code-model on aarch64, and one of my tests
tested that. This fixes the problem (hopefully) by adding "-triple
x86_64-unknown-linux-gnu" to the test build with "-mcodel-model
kernel".

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

llvm-svn: 342789
2018-09-21 23:19:49 +00:00
Craig Topper ecdab03d10 [X86] Teach fast isel to use MOV32ri64 for loading an unsigned 32 immediate into a 64-bit register.
Previously we used SUBREG_TO_REG+MOV32ri. But regular isel was changed recently to use the MOV32ri64 pseudo. Fast isel now does the same.

llvm-svn: 342788
2018-09-21 23:14:05 +00:00
Aaron Puchert 969f32d515 Thread safety analysis: Make sure FactEntrys stored in FactManager are immutable [NFC]
Since FactEntrys are stored in the FactManager, we can't manipulate them
anymore when they are stored there.

llvm-svn: 342787
2018-09-21 23:08:30 +00:00
Warren Ristow 4f27730eaf [Loop Vectorizer] Abandon vectorization when no integer IV found
Support for vectorizing loops with secondary floating-point induction
variables was added in r276554.  A primary integer IV is still required
for vectorization to be done.  If an FP IV was found, but no integer IV
was found at all (primary or secondary), the attempt to vectorize still
went forward, causing a compiler-crash.  This change abandons that
attempt when no integer IV is found.  (Vectorizing FP-only cases like
this, rather than bailing out, is discussed as possible future work
in D52327.)

See PR38800 for more information.

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

llvm-svn: 342786
2018-09-21 23:03:50 +00:00
Aaron Ballman d7e83e7362 Move individual benchmark targets into the Utils folder in IDEs.
llvm-svn: 342785
2018-09-21 23:01:32 +00:00
Zachary Turner dc39f4d834 Try moving this function to another file.
I can't reproduce this compilation failure so I can't really
test this fix.

llvm-svn: 342784
2018-09-21 23:00:37 +00:00
Lang Hames 47fc3a4550 [ORC] In RTDyldObjectLinkingLayer, only call NotifyFreed if the object file
has been finalized.

This prevents crashes on unfinalized objects for clients using
JITEventListeners.

Patch by Geoff Levner. Thanks Geoff!

llvm-svn: 342783
2018-09-21 22:59:48 +00:00
Aaron Ballman 34893e6c0f Add benchmark and benchmark_main to the Utils folder in IDEs.
llvm-svn: 342782
2018-09-21 22:55:57 +00:00
Zachary Turner a9defc348b Add missing include.
llvm-svn: 342781
2018-09-21 22:44:31 +00:00
Zachary Turner 6345e84dde [NativePDB] Add support for reading function signatures.
This adds support for parsing function signature records and returning
them through the native DIA interface.

llvm-svn: 342780
2018-09-21 22:36:28 +00:00
Zachary Turner 355ffb0032 [PDB] Add native reading support for UDT / class types.
This allows the native reader to find records of class/struct/
union type and dump them.  This behavior is tested by using the
diadump subcommand against golden output produced by actual DIA
SDK on the same PDB file, and again using pretty -native to
confirm that we actually dump the classes.  We don't find class
members or anything like that yet, for now it's just the class
itself.

llvm-svn: 342779
2018-09-21 22:36:04 +00:00
Fedor Sergeev 10febb0779 [New PM][PassInstrumentation] Adding PassInstrumentation to the AnalysisManager runs
As a prerequisite to time-passes implementation which needs to time both passes
and analyses, adding instrumentation points to the Analysis Manager.
The are two functional differences between Pass and Analysis instrumentation:
  - the latter does not increment pass execution counter
  - it does not provide ability to skip execution of the corresponding analysis

Reviewers: chandlerc, philip.pfaffe
Differential Revision: https://reviews.llvm.org/D51275

llvm-svn: 342778
2018-09-21 22:10:17 +00:00
Martin Storsjo 5f6d527f09 [COFF] Support linking to import libraries from GNU binutils
GNU binutils import libraries aren't the same kind of short import
libraries as link.exe and LLD produce, but are a plain static library
containing .idata section chunks. MSVC link.exe can successfully link
to them.

In order for imports from GNU import libraries to mix properly with the
normal import chunks, the chunks from the existing mechanism needs to
be added into named sections like .idata$2.

These GNU import libraries consist of one header object, a number of
object files, one for each imported function/variable, and one trailer.
Within the import libraries, the object files are ordered alphabetically
in this order. The chunks stemming from these libraries have to be
grouped by what library they originate from and sorted, to make sure
the section chunks for headers and trailers for the lists are ordered
as intended. This is done on all sections named .idata$*, before adding
the synthesized chunks to them.

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

llvm-svn: 342777
2018-09-21 22:01:06 +00:00
Adrian Prantl 2e102480ac llvm-dwarfdump --statistics: Unique abstract origins across multiple CUs.
Instead of indexing local variables by DIE offset, use the variable
name + the path through the lexical block tree. This makes the lookup
key consistent across duplicate abstract origins in different CUs.

llvm-svn: 342776
2018-09-21 21:59:34 +00:00
Sanjay Patel db1fb8cd20 [x86] add more tests for poetntial andnp splitting with AVX1; NFC
llvm-svn: 342775
2018-09-21 21:25:16 +00:00
Richard Trieu 5061e83295 Make compare function in r342648 have strict weak ordering.
Comparison functions used in sorting algorithms need to have strict weak
ordering.  Remove the assert and allow comparisons on all lists.

llvm-svn: 342774
2018-09-21 21:20:33 +00:00
Simon Pilgrim eabc582b62 [X86] Add AVX512 target to load scalar to vector tests
To investigate broadcast instruction codegen for D51553

llvm-svn: 342773
2018-09-21 21:08:26 +00:00
Wouter van Oortmerssen e0403f13c4 [WebAssembly] Simplified selecting asmmatcher stack instructions.
Summary:
By using the existing isCodeGenOnly bit in the tablegen defs, as
suggested by tlively in https://reviews.llvm.org/D51662

Tested: llvm-lit -v `find test -name WebAssembly`

Reviewers: tlively

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

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

llvm-svn: 342772
2018-09-21 20:53:55 +00:00
Jorge Gorbe Moya a9d9836d98 Test commit. Removed a blank line.
llvm-svn: 342771
2018-09-21 20:45:08 +00:00
George Karpenkov 04553e530f [analyzer] Process state in checkEndFunction in RetainCountChecker
Modify the RetainCountChecker to perform state "adjustments" in
checkEndFunction, as performing work in PreStmt<ReturnStmt> does not
work with destructors.
The previous version made an implicit assumption that no code runs
after the return statement is executed.

rdar://43945028

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

llvm-svn: 342770
2018-09-21 20:37:20 +00:00
George Karpenkov 200e809dbd [analyzer] Highlight sink nodes in red
Differential Revision: https://reviews.llvm.org/D52337

llvm-svn: 342769
2018-09-21 20:37:01 +00:00
George Karpenkov 33e5a15896 [analyzer] Associate diagnostics created in checkEndFunction with a return statement, if possible
If not possible, use the last line of the declaration, as before.

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

llvm-svn: 342768
2018-09-21 20:36:41 +00:00
George Karpenkov 6babf2ae16 [analyzer] [NFC] Prefer make_unique over "new"
Differential Revision: https://reviews.llvm.org/D52336

llvm-svn: 342767
2018-09-21 20:36:21 +00:00
George Karpenkov a31c224bb4 [analyzer] Fix bug in isInevitablySinking
If the non-sink report is generated at the exit node, it will be
suppressed by the current functionality in isInevitablySinking, as it
only checks the successors of the block, but not the block itself.

The bug shows up in RetainCountChecker checks.

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

llvm-svn: 342766
2018-09-21 20:36:01 +00:00
George Karpenkov 649e013241 [analyzer] [NFC] Dead code removal
Differential Revision: https://reviews.llvm.org/D52269

llvm-svn: 342765
2018-09-21 20:35:39 +00:00
Pirama Arumuga Nainar 546de61000 [libc++abi] is_strcmp parameter to is_equal is unused for WIN32
Summary: Mark it as unused to avoid -Wunused-parameter.

Reviewers: EricWF, srhines, mstorsjo

Subscribers: christof, ldionne, libcxx-commits, cfe-commits

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

llvm-svn: 342764
2018-09-21 20:01:22 +00:00
Vlad Tsyrklevich 00705a7f95 SafeStack: Fix flaky test (PR39001)
Summary:
pthread_join() can return before a thread finishes exit()ing in the
kernel and a subsequent tgkill() can report the thread still alive.
Update the pthread-cleanup.c test to sleep and retry if it hits this
possible flake.

Thanks to Jeremy Morse for reporting.

Reviewers: jmorse, eugenis, vitalybuka

Reviewed By: jmorse, vitalybuka

Subscribers: delcypher, jfb, llvm-commits, #sanitizers, kcc

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

llvm-svn: 342763
2018-09-21 19:02:32 +00:00
Tatyana Krasnukha 7aa9e7bc57 Move architecture-specific address adjustment to architecture plugins
Differential Revision: https://reviews.llvm.org/D48623

llvm-svn: 342762
2018-09-21 18:56:44 +00:00
Thomas Lively 720fbf553d [WebAssembly][NFC] Rename simd-conversions test to simd-bitcasts
Summary:
This name is more accurate and I want to reuse the simd-conversions
name for testing the actual conversion ops.

Reviewers: aheejin, dschuff

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

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

llvm-svn: 342761
2018-09-21 18:46:39 +00:00
Caroline Tice 3dea3f9e0a Pass code-model through Module IR to LTO which will use it.
Currently the code-model does not get saved in the module IR,
so if a code model is specified when compiling with LTO,
it gets lost and is not propagated properly to LTO. This patch,
along with one for the front end, fixes that.

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

llvm-svn: 342760
2018-09-21 18:41:31 +00:00
JF Bastien 8a59dbf7fd [NFC] use bit_cast in PointerSumType
The code was already using union and memcpy to do this. Remove the memcpy. We can't just change the union because a reference to its member is returned.

llvm-svn: 342759
2018-09-21 18:35:32 +00:00
Caroline Tice 62279730e2 Add necessary support for storing code-model to module IR.
Currently the code-model does not get saved in the module IR, so if a
code model is specified when compiling with LTO, it gets lost and is
not propagated properly to LTO. This patch does what is necessary in
the front end to pass the code-model to the module, so that the back
end can store it in the Module .

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

llvm-svn: 342758
2018-09-21 18:34:59 +00:00
Tatyana Krasnukha c4bc88b541 build: add libedit to include paths
Differential Revision: https://reviews.llvm.org/D51999

llvm-svn: 342757
2018-09-21 18:34:41 +00:00