Commit Graph

175343 Commits

Author SHA1 Message Date
Peter Collingbourne efe09b4c65 Permit the "if" literal suffix with Microsoft extensions enabled.
Differential Revision: http://reviews.llvm.org/D3963

llvm-svn: 209859
2014-05-29 23:10:15 +00:00
Nick Kledzik b367c25f28 [mach-o] Add support for parsing __eh_frame section. Generalize support for whether symbols in a section are ignored or illegal
llvm-svn: 209858
2014-05-29 23:07:20 +00:00
Chandler Carruth 3012a1b4cd Fix one bug in the latest incarnation of r209843 -- combining GEPs
across PHI nodes. The code was computing the Idxs from the 'GEP'
variable's indices when what it wanted was Op1's indices. This caused an
ASan heap-overflow for me that pin pointed the issue when Op1 had more
indices than GEP did. =] I'll let Louis add a specific test case for
this if he wants.

llvm-svn: 209857
2014-05-29 23:05:52 +00:00
Greg Fitzgerald 11b49c3818 light up sanitizers for ARM, take 2
Differential Revision: http://reviews.llvm.org/D3794

llvm-svn: 209856
2014-05-29 22:38:13 +00:00
Jeroen Ketema 09f054fe37 Sync list of targets with configure's reality
llvm-svn: 209855
2014-05-29 22:23:22 +00:00
Arnold Schwaighofer e2067680a6 LoopVectorizer: Add a check that the backedge taken count + 1 does not overflow
The loop vectorizer instantiates be-taken-count + 1 as the loop iteration count.
If this expression overflows the generated code was invalid.

In case of overflow the code now jumps to the scalar loop.

Fixes PR17288.

llvm-svn: 209854
2014-05-29 22:10:01 +00:00
Filipe Cabecinhas 229dc17610 Added tests for shufflevector lowering to blend instrs.
These tests ensure that a change I will propose in clang works as
expected.

Summary:
Added tests for the generation of blend+immediate instructions from a
shufflevector.
These tests were proposed along with a patch that was dropped. I'm
committing the tests anyway to protect against possible regressions in
codegen.

Reviewers: nadav, bkramer

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D3600

llvm-svn: 209853
2014-05-29 22:04:42 +00:00
Greg Clayton 7ab7f89ae0 iOS simulator cleanup to make sure we use "*-apple-ios" for iOS simulator apps and binaries.
Changes include:
- ObjectFileMachO can now determine if a binary is "*-apple-ios" or "*-apple-macosx" by checking the min OS and SDK load commands
- ArchSpec now says "<arch>-apple-macosx" is equivalent to "<arch>-apple-ios" since the simulator mixes and matches binaries (some from the system and most from the iOS SDK).
- Getting process inforamtion on MacOSX now correctly classifies iOS simulator processes so they have "*-apple-ios" architectures in the ProcessInstanceInfo
- PlatformiOSSimulator can now list iOS simulator processes correctly instead of showing nothing by using:
    (lldb) platform select ios-simulator
    (lldb) platform process list
- debugserver can now properly return "*-apple-ios" for the triple in the process info packets for iOS simulator executables
- GDBRemoteCommunicationClient now correctly passes along the triples it gets for process info by setting the OS in the llvm::Triple correctly

<rdar://problem/17060217>

llvm-svn: 209852
2014-05-29 21:33:45 +00:00
Greg Fitzgerald c1146ec5ba Revert "light up sanitizers for ARM"
This commit broke the Windows build, where CMAKE_C_COMPILER can
compile and link with -march=armv7-a but the just-built-clang
cannot.

llvm-svn: 209851
2014-05-29 21:33:36 +00:00
Jeroen Ketema 75c1a0c6e2 Add more log related float constants
llvm-svn: 209850
2014-05-29 21:30:28 +00:00
Jeroen Ketema d1bb82a722 Fix _F definitions
The 'f' was missing and, hence, the values were
considered to be doubles instead of floats.

Reviewed by: Tom Stellard

llvm-svn: 209849
2014-05-29 21:29:34 +00:00
Jeroen Ketema a16fdbfac2 Add definition for M_PI
Reviewed by: Tom Stellard

llvm-svn: 209848
2014-05-29 21:24:57 +00:00
DeLesley Hutchins b603192124 Thread Safety Analysis: implement review suggestions from Aaron Ballman.
llvm-svn: 209847
2014-05-29 21:24:16 +00:00
Adam Nemet 286ae08e7d Implement AVX1 vbroadcast intrinsics with vector initializers
These intrinsics are special because they directly take a memory operand (AVX2
adds the register counterparts).  Typically, other non-memop intrinsics take
registers and then it's left to isel to fold memory operands.

In order to LICM intrinsics directly reading memory, we require that no stores
are in the loop (LICM) or that the folded load accesses constant memory
(MachineLICM).  When neither is the case we fail to hoist a loop-invariant
broadcast.

We can work around this limitation if we expose the load as a regular load and
then just implement the broadcast using the vector initializer syntax.  This
exposes the load to LICM and other optimizations.

At the IR level this is translated into a series of insertelements.  The
sequence is already recognized as a broadcast so there is no impact on the
quality of codegen.

_mm256_broadcast_pd and _mm256_broadcast_ps are not updated by this patch
because right now we lack the DAG-combiner smartness to recover the broadcast
instructions.  This will be tackled in a follow-on.

There will be completing changes on the LLVM side to remove the LLVM
intrinsics and to auto-upgrade bitcode files.

Fixes <rdar://problem/16494520>

llvm-svn: 209846
2014-05-29 20:47:29 +00:00
Todd Fiala 0428c97837 gdb-remote testing: new test, cleaned up socket reading.
Added new SocketPacketPump class to decouple gdb remote packet
reading from packet expectations code.  This allowed for cleaner
implementation of the separate $O output streams (non-deterministic
packaging of inferior stdout/stderr) from all the rest of the packets.

Added a packet expectation matcher that can match expected accumulated
output with a timeout.  Use a dictionary with "type":"output_match".
See lldbgdbserverutils.MatchRemoteOutputEntry for details.

Added a gdb remote test to verify that $Hc (continue thread selection)
plus signal delivery ($C{signo}) works.  Having trouble getting this
to pass with debugserver on MacOSX 10.9.  Tried different variants,
including $vCont;C{signo}:{thread-id};c.  In some cases, I get the
test exe's signal handler to run ($vCont variant first time), in others I don't
($vCont second and further times).  $C{signo} doesn't hit the signal
handler code at all in the test exe but delivers a stop.  Further
$Hc and $C{signo} deliver the stop marking the wrong thread.  For now I'm
marking the test as XFAIL on dsym/debugserver.  Will revisit this on
lldb-dev.

Updated the text exe for these tests to support thread:print-ids (each
thread announces its thread id) and provide a SIGUSR1 thread handler
that prints out the thread id on which it was signaled.

llvm-svn: 209845
2014-05-29 20:44:45 +00:00
Nick Kledzik 9ede702bc4 [mach-o] Add support for parsing CFString sections
llvm-svn: 209844
2014-05-29 20:44:21 +00:00
Louis Gerbarg c6b506a0ae Add support for combining GEPs across PHI nodes
Currently LLVM will generally merge GEPs. This allows backends to use more
complex addressing modes. In some cases this is not happening because there
is PHI inbetween the two GEPs:

  GEP1--\
        |-->PHI1-->GEP3
  GEP2--/

This patch checks to see if GEP1 and GEP2 are similiar enough that they can be
cloned (GEP12) in GEP3's BB, allowing GEP->GEP merging (GEP123):

  GEP1--\                     --\                           --\
        |-->PHI1-->GEP3  ==>    |-->PHI2->GEP12->GEP3 == >    |-->PHI2->GEP123
  GEP2--/                     --/                           --/

This also breaks certain use chains that are preventing GEP->GEP merges that the
the existing instcombine would merge otherwise.

Tests included.

llvm-svn: 209843
2014-05-29 20:29:47 +00:00
DeLesley Hutchins 9c6ae36861 Thread Safety Analysis: minor changes to TIL pretty-printing.
llvm-svn: 209842
2014-05-29 20:28:53 +00:00
Diego Novillo 263ce21e05 Add documentation for -Rpass*
Summary:
This adds documentation for -Rpass, -Rpass-missed and -Rpass-analysis.
It also adds release notes for 3.5.

Reviewers: rsmith

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D3730

llvm-svn: 209841
2014-05-29 20:13:27 +00:00
Chad Rosier e9665095cb Update Credits.
llvm-svn: 209840
2014-05-29 19:59:58 +00:00
Diego Novillo d23ec94393 Add flags -Rpass-missed and -Rpass-analysis.
Summary:
These two flags are in the same family as -Rpass, but are used in
different situations.

-Rpass-missed is used by optimizers to inform the user when they tried
to apply an optimization but couldn't (or wouldn't).

-Rpass-analysis is used by optimizers to report analysis results back
to the user (e.g., why the transformation could not be applied).

Depends on D3682.

Reviewers: rsmith

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D3683

llvm-svn: 209839
2014-05-29 19:55:06 +00:00
Sebastian Pop 20daf3276d implement missing SCEVDivision case
without this case we would end on an infinite recursion: the remainder is zero,
so Numerator - Remainder is equal to Numerator and so we would recursively ask
for the division of Numerator by Denominator.

llvm-svn: 209838
2014-05-29 19:44:09 +00:00
Sebastian Pop 5352408169 fail to find dimensions when ElementSize is nullptr
when ScalarEvolution::getElementSize returns nullptr it is safe to early return
in ScalarEvolution::findArrayDimensions such that we avoid later problems when
we try to divide the terms by ElementSize.

llvm-svn: 209837
2014-05-29 19:44:05 +00:00
Bob Wilson bdd2b3c7c5 Make the -mno-global-merge option work for arm64/aarch64. rdar://17024719
llvm-svn: 209836
2014-05-29 19:43:02 +00:00
Greg Fitzgerald 32685ec5fd light up sanitizers for ARM
You can expect the sanitizers to be built under any of the following conditions:

1) CMAKE_C_COMPILER is GCC built to cross-compile to ARM
2) CMAKE_C_COMPILER is Clang built to cross-compile to ARM (ARM is default target)
3) CMAKE_C_COMPILER is Clang and CMAKE_C_FLAGS contains -target and --sysroot

Differential Revision: http://reviews.llvm.org/D3794

llvm-svn: 209835
2014-05-29 19:01:32 +00:00
Alexey Samsonov a02e66499b Use range-based for loops in ASan, TSan and MSan
llvm-svn: 209834
2014-05-29 18:40:48 +00:00
Greg Clayton 36d7c89497 Fixed the Module::Module(ModuleSpec) constructor to properly copy the file offset and object file mod time from the actual module specifications so we will always be able to directly load the image we care about when calling Module::GetObjectFile().
llvm-svn: 209833
2014-05-29 17:52:46 +00:00
Reid Kleckner 07630933bc [ADT] Delete the Twine assignment operator
This makes it slightly harder to misuse Twines.  It is still possible to
refer to destroyed temporaries with the regular constructors, though.

Patch by Marco Alesiani!

llvm-svn: 209832
2014-05-29 17:12:05 +00:00
Nico Rieck 816607b8bc Make runlines consistent with other dll attribute tests
llvm-svn: 209831
2014-05-29 16:57:34 +00:00
Nico Rieck 968bd69768 Fix some minor typos in tests
llvm-svn: 209830
2014-05-29 16:57:18 +00:00
Adrian Prantl fef140df96 Debug Info: Remove unused code. The MInsn of an _abstract_ variable is
never used again and updating the abstract variable for each inlined
instance of it was questionable in the first place.

llvm-svn: 209829
2014-05-29 16:56:48 +00:00
Diego Novillo 30531eff57 Add missing -S to avoid invoking assembler unnecessarily.
llvm-svn: 209828
2014-05-29 16:52:06 +00:00
Nico Rieck 9de0a57687 Sema: Functions with dll attributes cannot be deleted
llvm-svn: 209827
2014-05-29 16:51:19 +00:00
Nico Rieck b4662c3e5a MS ABI: Emit static data members with proper linkage
llvm-svn: 209826
2014-05-29 16:50:46 +00:00
Nico Rieck 078d2f89cd Sema: Check dll attributes on static data members
Redeclarations cannot add a dll attribute and static data members cannot
be defined.

llvm-svn: 209825
2014-05-29 16:50:20 +00:00
Aaron Ballman a670c20894 No longer allow the -std options to entirely override the -x language option. This allows -x cuda -std=c++11, for instance.
llvm-svn: 209824
2014-05-29 16:39:42 +00:00
Diego Novillo 9c89ff1945 Fix spurious remarks when -Weverything is used.
With -Weverything, the backend remarks are enabled. This was
causing spurious diagnostics for remarks that we don't yet
handle (cf http://reviews.llvm.org/D3683).

This will stop being a problem once http://reviews.llvm.org/D3683
is committed.

llvm-svn: 209823
2014-05-29 16:19:27 +00:00
Rafael Espindola 4d16e11922 Rename alias variables to make it easier to add new tests to the file.
llvm-svn: 209822
2014-05-29 16:16:12 +00:00
Rafael Espindola 04902862a8 [PPC] Use alias symbols in address computation.
This seems to match what gcc does for ppc and what every other llvm
backend does.

This is a fixed version of r209638. The difference is to avoid any change
in behavior for functions. The logic for using constant pools for function
addresseses is spread over a few places and we have to keep them in sync.

llvm-svn: 209821
2014-05-29 15:41:38 +00:00
Rafael Espindola 1613650e90 Add a test showing the ppc code sequence for getting a function pointer.
This would have found the miscompile in r209638.

llvm-svn: 209820
2014-05-29 15:13:23 +00:00
Nico Weber ded9de5981 fix typo
llvm-svn: 209819
2014-05-29 14:58:38 +00:00
Evgeniy Stepanov 50c1532a1a [sanitizer] Update flags test.
llvm-svn: 209818
2014-05-29 14:55:12 +00:00
Rafael Espindola a248f536b3 Revert "Revert "Revert "InstCombine: Improvement to check if signed addition overflows."""
This reverts commit r209776.

It was miscompiling llvm::SelectionDAGISel::MorphNode.

llvm-svn: 209817
2014-05-29 14:39:16 +00:00
Alexander Musman f0d76e7dc3 Parsing/Sema for OMPAlignedClause.
llvm-svn: 209816
2014-05-29 14:36:25 +00:00
Evgeniy Stepanov fa5c0750f0 [sanitizer] Add coverage_dir flag.
llvm-svn: 209815
2014-05-29 14:33:16 +00:00
Evgeniy Stepanov a0aa0f41d1 [sanitizer] Require that options end with '='.
llvm-svn: 209814
2014-05-29 14:32:32 +00:00
Dmitry Vyukov 65dce1e4f7 tsan: write memory profile in one line (which is much more readable)
e.g.:
RSS 420 MB: shadow:35 meta:231 file:2 mmap:129 trace:19 heap:0 other:0 nthr=1/31
RSS 365 MB: shadow:3 meta:231 file:2 mmap:106 trace:19 heap:0 other:0 nthr=1/31
RSS 429 MB: shadow:23 meta:234 file:2 mmap:143 trace:19 heap:6 other:0 nthr=1/31
RSS 509 MB: shadow:78 meta:241 file:2 mmap:147 trace:19 heap:19 other:0 nthr=1/31

llvm-svn: 209813
2014-05-29 14:11:38 +00:00
Nikola Smiljanic 03ff2596cb Refactoring. Remove Owned method from Sema.
llvm-svn: 209812
2014-05-29 14:05:12 +00:00
Dmitry Vyukov ef5f26bf19 tsan: allow to write memory profile to stdout/stderr
llvm-svn: 209811
2014-05-29 14:02:06 +00:00
Dmitry Vyukov bde4c9c773 tsan: refactor storage of meta information for heap blocks and sync objects
The new storage (MetaMap) is based on direct shadow (instead of a hashmap + per-block lists).
This solves a number of problems:
 - eliminates quadratic behaviour in SyncTab::GetAndLock (https://code.google.com/p/thread-sanitizer/issues/detail?id=26)
 - eliminates contention in SyncTab
 - eliminates contention in internal allocator during allocation of sync objects
 - removes a bunch of ad-hoc code in java interface
 - reduces java shadow from 2x to 1/2x
 - allows to memorize heap block meta info for Java and Go
 - allows to cleanup sync object meta info for Go
 - which in turn enabled deadlock detector for Go

llvm-svn: 209810
2014-05-29 13:50:54 +00:00