Commit Graph

199571 Commits

Author SHA1 Message Date
Marshall Clow 903a5dd112 Removed 'complete' from 2408; updated status
llvm-svn: 236025
2015-04-28 19:35:36 +00:00
Siva Chandra e6303cc3a1 [TestMiVar] Enable one of the tests for GCC.
Summary:
The "internal" name of vars is different between clang and GCC. All this
change does is to use a regex instead of the hardcoded internal name.

Test Plan: dotest.py -C <clang|gcc> -p TestMiVar

Reviewers: ki.stfu

Reviewed By: ki.stfu

Subscribers: lldb-commits

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

llvm-svn: 236024
2015-04-28 19:21:57 +00:00
Daniel Berlin ec1de3fb19 Make getModRefInfo(Instruction *) not crash on certain types of instructions
llvm-svn: 236023
2015-04-28 19:19:14 +00:00
Rafael Espindola 163f672cd5 Use a range loop. NFC.
llvm-svn: 236015
2015-04-28 19:07:16 +00:00
Evgeniy Stepanov f483a8a9d0 [asan] Use dl_iterate_phdr on Android.
It's available on Android/ARM starting with API 21 (L).

llvm-svn: 236014
2015-04-28 18:50:32 +00:00
Sanjay Patel f75ee4dc07 [x86] remove RCPPS and RSQRTPS intrinsic instruction definitions
We don't need codegen-only intrinsic instructions for the vector forms of these instructions.

This makes the reciprocal estimate instruction lowering identical to how we handle normal
square roots: (V)SQRTPS / (V)SQRTPD.

No existing regression tests fail with this patch.

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

llvm-svn: 236013
2015-04-28 18:48:45 +00:00
Sean Callanan 59721b3d3f Implemented ASTImporter support for Stmts and fixed
some bugs in the ASTImporter that this exposed:

- When importing functions, the body (if any) was
  previously ignored.  This patch ensures that the
  body is imported also.

- When a function-local Decl is imported, the first
  thing the ASTImporter does is import its context
  (via ImportDeclParts()).  This can trigger 
  importing the Decl again as part of the body of
  the function (but only once, since the function's
  Decl has been added to ImportedDecls).  This patch
  fixes that problem by extending ImportDeclParts()
  to return the imported Decl if it was imported as
  part of importing its context, and the patch adds
  ASTImporter::GetAlreadyImportedOrNull() to support
  this query.  All callers of ImportDeclParts return
  the imported version of the Decl if ImportDeclParts()
  returns it.

- When creating functions, InnerLocStart of the source
  function was re-used without importing.  This is a
  straight up bug, and this patch makes ASTImporter
  import the InnerLocStart and use the imported version.

- When importing FileIDs, the ASTImporter previously
  always tried to re-load the file for the corresponding
  CacheEntry from disk.  This doesn't work if the 
  CacheEntry corresponds to a named memory buffer.  This
  patch changes the code so that if the UniqueID for the
  cache entry is invalid (i.e., it is not a disk file)
  the whole entry is treated as if it were invalid, which
  forces an in-memory copy of the buffer.

Also added test cases, using the new support committed in
236011.

llvm-svn: 236012
2015-04-28 18:41:46 +00:00
Sean Callanan 61ea0571ac Implemented support for testing the ASTImporter's
ability to generate code that CodeGen likes.  Test
cases can use this functionality by calling

// RUN: %clang_cc1 -emit-obj -o /dev/null -ast-merge %t.1.ast -ast-merge %t.2.ast %s

llvm-svn: 236011
2015-04-28 18:24:12 +00:00
Nico Weber 20b0ce3abd Fix typo in comment.
llvm-svn: 236010
2015-04-28 18:19:18 +00:00
Eric Christopher 35a8a62125 Add a fixme to resetTargetOptions to explain why it needs to go
away.

llvm-svn: 236009
2015-04-28 18:09:05 +00:00
Dmitry Vyukov 25c94eb152 tsan: fix a bug memory access handling
We incorrectly replaced shadow slots
when the new value is not stronger than the old one.
The bug can lead to false negatives.
The bug was detected by Go race test suite:
https://github.com/golang/go/issues/10589

llvm-svn: 236008
2015-04-28 18:08:42 +00:00
Eric Christopher f4bf3779d8 Fix a [-Werror,-Winconsistent-missing-override] problem in the
NVPTX overrides.

llvm-svn: 236007
2015-04-28 18:06:27 +00:00
Jonathan Roelofs 7441136d2a Fix PR22047: ObjC: Method unavailability attribute doesn't work with overloaded methods
http://reviews.llvm.org/D9261

llvm-svn: 236006
2015-04-28 18:04:44 +00:00
Serge Pavlov 907233fd99 Combine instantiation context of field initializer with context of class.
Inclass initializer is instantiated in its own LocalInstantiationScope. It
causes problems when instantiating local classes - when instantiation scope
is searched for DeclContext of the field, the search fails. As a solution,
the instantiation scope of field initializer is combined with its outer
scope.

This patch fixes PR23194.

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

llvm-svn: 236005
2015-04-28 17:58:47 +00:00
Tom Stellard 96301d2455 R600: Fix up for AsmPrinter's OutStreamer being a unique_ptr
Fixes a crash with basically any OpenGL application using the radeonsi
driver.

Patch by: Michel Dänzer

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90176
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 236004
2015-04-28 17:37:03 +00:00
Tom Stellard 0a0fa03d5a R600/SI: Add a lower case alias for subtarget feature: +DumpCode
llc converts all feature strings to lower case, while the LLVM C API
does not, so we need a lower case alias in order to test this with llc.

llvm-svn: 236003
2015-04-28 17:37:00 +00:00
Aaron Ballman e918faadd2 Silencing a -Wuninitialized warning in a different way. This replaces r235981, but is still NFC.
llvm-svn: 236002
2015-04-28 17:34:38 +00:00
NAKAMURA Takumi 6eb00faf9d Disable clang-tools-extra/test/pp-trace/pp-trace-modules.cpp on win32 for now. Investigating.
llvm-svn: 236001
2015-04-28 17:31:36 +00:00
Justin Holewinski 3d2a976197 [NVPTX] Handle addrspacecast constant expressions in aggregate initializers
We need to track if an AddrSpaceCast expression was seen when
generating an MCExpr for a ConstantExpr.  This change introduces a
custom lowerConstant method to the NVPTX asm printer that will create
NVPTXGenericMCSymbolRefExpr nodes at the appropriate places to encode
the information that a given symbol needs to be casted to a generic
address.

llvm-svn: 236000
2015-04-28 17:18:30 +00:00
Marshall Clow 5e1441bce4 Fix some preprocessor directives that were generating warnings in the test suite.
llvm-svn: 235999
2015-04-28 16:52:30 +00:00
David Blaikie bdb4910202 [opaque pointer type] Encode the allocated type of an alloca rather than its pointer result type.
llvm-svn: 235998
2015-04-28 16:51:01 +00:00
Sanjay Patel ba55804ea3 move IR-level optimization flags into their own struct
This is a preliminary step to using the IR-level floating-point fast-math-flags in the SDAG (D8900).

In this patch, we introduce the optimization flags as their own struct. As noted in the TODO comment, 
we should eventually share this data between the IR passes and the backend.

We also switch the existing nsw / nuw / exact bit functionality of the BinaryWithFlagsSDNode class to
use the new struct.

The tradeoff is that instead of using the free but limited space of SDNode's SubclassData, we add a
data member to the subclass. This means we don't have to repeat all of the get/set methods per flag,
but we're potentially adding size to all nodes of this subclassi type.

In practice on 64-bit systems (measured on Linux and MacOS X), there is no size difference between an
SDNode and BinaryWithFlagsSDNode after this change: they're both 80 bytes. This means that we had at
least one free byte to play with due to struct alignment.

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

llvm-svn: 235997
2015-04-28 16:39:12 +00:00
Rafael Espindola a820169711 Use a std::vector to record the offsets of the sections. NFC.
llvm-svn: 235995
2015-04-28 15:26:21 +00:00
Rafael Espindola b64175076f Avoid an extra loop for computing the section size. NFC.
llvm-svn: 235994
2015-04-28 15:04:09 +00:00
Elena Demikhovsky 1f7b3644d3 Fixed crash of variable shift inst on AVX2
https://llvm.org/bugs/show_bug.cgi?id=22955

llvm-svn: 235993
2015-04-28 14:46:35 +00:00
Marshall Clow 0846f54b0e Update C++17 status; mark issues 2170, 2377, and 2408 as complete. We already do these; no code changes necessary.
llvm-svn: 235992
2015-04-28 14:26:29 +00:00
Hafiz Abid Qadeer 7f2f0ccb0a Replace sprintf with snprintf to avoid a crash.
During testing -data-list-register-values, I saw a crash here due to buffer overflow.
This commit should fix the crash. There is still problem with printing 1-byte register
in some cases that I will fix separately.

No regression on MI test cases.

llvm-svn: 235991
2015-04-28 14:16:00 +00:00
Toma Tabacu 7dea2e3982 [mips] [IAS] Do not generate redundant ORi in createLShiftOri.
Summary: If the immediate is 0, the ORi is pointless.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

llvm-svn: 235990
2015-04-28 14:06:35 +00:00
Sergey Dmitrouk 842a51bad8 Reapply r235977 "[DebugInfo] Add debug locations to constant SD nodes"
[DebugInfo] Add debug locations to constant SD nodes

This adds debug location to constant nodes of Selection DAG and updates
all places that create constants to pass debug locations
(see PR13269).

Can't guarantee that all locations are correct, but in a lot of cases choice
is obvious, so most of them should be. At least all tests pass.

Tests for these changes do not cover everything, instead just check it for
SDNodes, ARM and AArch64 where it's easy to get incorrect locations on
constants.

This is not complete fix as FastISel contains workaround for wrong debug
locations, which drops locations from instructions on processing constants,
but there isn't currently a way to use debug locations from constants there
as llvm::Constant doesn't cache it (yet). Although this is a bit different
issue, not directly related to these changes.

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

llvm-svn: 235989
2015-04-28 14:05:47 +00:00
Rafael Espindola effdc7e981 Use CIE version 4 for dwarf4.
According to http://www.dwarfstd.org/doc/DWARF4.pdf appendix F the CIE
version for dwarf 4 is 4.

llvm-svn: 235988
2015-04-28 13:55:31 +00:00
Daniel Jasper 48e93f7181 Revert "[DebugInfo] Add debug locations to constant SD nodes"
This breaks a test:
http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/23870

llvm-svn: 235987
2015-04-28 13:38:35 +00:00
Elena Demikhovsky 35dc8c0944 AVX-512: added intrinsics for KNL and SKX
by Asaf Badouh (asaf.badouh@intel.com)

llvm-svn: 235986
2015-04-28 13:28:01 +00:00
Alexey Bataev 6111469a4a [OPENMP] Fix crash on loop control vars explicitly marked as private.
It is allowed to mark loop control vars as private in 'private' or 'lastprivate' clause, so no need to assert here.

llvm-svn: 235985
2015-04-28 13:20:05 +00:00
Toma Tabacu 6114565269 [mips] [IAS] Rename the createShiftOr function to createLShiftOri. NFC.
Summary: The new name is more accurate with regard to the functionality.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

llvm-svn: 235984
2015-04-28 13:16:06 +00:00
Ilia K 7f83624222 Add language option in -gdb-show command (MI)
Summary:
Add language option in -gdb-show command + test:
```
$ bin/lldb-mi ~/p/hello
[...]
b main
[...]
r
[...]
(gdb)
-gdb-show language
^done,value="c++"
(gdb)
quit
```

Test Plan: ./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi/

Reviewers: abidh, granata.enrico, jingham, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits, jingham, granata.enrico, clayborg, abidh

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

llvm-svn: 235983
2015-04-28 12:51:16 +00:00
Ilia K 6e46512ec3 Don't print a type of variable in Address::Dump if it's unknown (i.e. nullptr)
Summary: This patch fixes dereferencing of nullptr in case when GetType() returns that.

Reviewers: jingham, granata.enrico, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits, granata.enrico, clayborg, jingham

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

llvm-svn: 235982
2015-04-28 12:45:57 +00:00
Aaron Ballman d1c6916327 Silencing a spurious -Wuninitialized warning with this local; NFC.
llvm-svn: 235981
2015-04-28 12:36:54 +00:00
Ewan Crawford 26607f799a test commit
llvm-svn: 235980
2015-04-28 12:34:19 +00:00
Pavel Labath bbaba96860 Skip TestProcessAttach.py on Linux
The test was already XFAILed. Changing this to skip, because the test timeouts and gets flagged
as an error anyway.

llvm-svn: 235979
2015-04-28 12:28:08 +00:00
Toma Tabacu 137d90ab88 [mips] [IAS] Store the expandLoadImm destination register in a variable. NFC.
Summary: This removes multiple calls to getReg() and saves us column space in the source file.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

llvm-svn: 235978
2015-04-28 12:04:53 +00:00
Sergey Dmitrouk adb4c69d5c [DebugInfo] Add debug locations to constant SD nodes
This adds debug location to constant nodes of Selection DAG and updates
all places that create constants to pass debug locations
(see PR13269).

Can't guarantee that all locations are correct, but in a lot of cases choice
is obvious, so most of them should be. At least all tests pass.

Tests for these changes do not cover everything, instead just check it for
SDNodes, ARM and AArch64 where it's easy to get incorrect locations on
constants.

This is not complete fix as FastISel contains workaround for wrong debug
locations, which drops locations from instructions on processing constants,
but there isn't currently a way to use debug locations from constants there
as llvm::Constant doesn't cache it (yet). Although this is a bit different
issue, not directly related to these changes.

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

llvm-svn: 235977
2015-04-28 11:56:37 +00:00
Bradley Smith ba945626b0 [ARM/AArch64] Enforce alignment for bitfielded structs
When creating a global variable with a type of a struct with bitfields, we must
forcibly set the alignment of the global from the RecordDecl. We must do this so
that the proper bitfield alignment makes its way down to LLVM, since clang will
mangle the bitfields into one large type.

llvm-svn: 235976
2015-04-28 11:24:54 +00:00
Viktor Kutuzov 86e0249235 [Msan] Fix the getline.cc test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D9251

llvm-svn: 235975
2015-04-28 10:23:52 +00:00
Bruce Mitchener 41ad9c4128 LLDB-MI: -var-list-children with no children doesn't need a children value in the response.
Summary:
When using GDB with MI, if there aren't children for a variable,
it doesn't include a "children" value in the response. LLDB does
and sets it to "[]" while variables with children have an unquoted
list: children=[...].

This removes the children value entirely when there are no children
making this match GDB in behavior.

Test Plan: Ran tests on Mac OS X and they passed.

Reviewers: abidh, domipheus

Subscribers: lldb-commits

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

llvm-svn: 235974
2015-04-28 10:03:55 +00:00
Elena Demikhovsky ae51853924 AVX-512: Added "pandn" intrinsics set
by Asaf Badouh (asaf.badouh@intel.com)

llvm-svn: 235971
2015-04-28 08:12:42 +00:00
Elena Demikhovsky 584ce378ab Masked gather and scatter: Added code for SelectionDAG.
All other patches, including tests will follow.

http://reviews.llvm.org/D7665

llvm-svn: 235970
2015-04-28 07:57:37 +00:00
Pavel Labath 426bdf8861 [NativeProcessLinux] Add back synchronisation of thread create events
Summary:
Without the synchronisation between the two thread creation events the following case could
happen:
- threads A and B are running. A hits a breakpoint. We note that we want to stop B.
- before we could stop it, B creates a new thread C, we get the stop notification for B, but we
  don't record C's existence yet.
- we resume B
- before we get the C notification, B stops again (e.g. hits a breakpoint, gets our SIGSTOP,
  etc.)
- we see all known threads have stopped, and we notify LLDB
- C notification comes, we note it's existence and resume it
=> we have an inconsistent state (LLDB thinks we've stopped, but C is running)

I resolve this by doing a blocking wait for for the C notification when we get the creation
notification on the parent (B) thread. This way the two events are synchronised, but we don't
need to introduce the intermediate "launching" state which would complicate handling of thread
states as all code would need to be aware of the third possible state.

Test Plan:
This is an obscure corner case, which I had not observed in practise, so I have no
test for it. I have tested that this commit does not regress in existing tests though.

Reviewers: chaoren, vharron

Subscribers: lldb-commits

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

llvm-svn: 235969
2015-04-28 07:51:52 +00:00
Justin Bogner 097f1bf4b2 InstrProf: Match a bit less strictly - some targets may add signext
Notably, this bot didn't like it:

  http://lab.llvm.org:8011/builders/clang-cmake-mips/builds/5117

llvm-svn: 235968
2015-04-28 06:55:23 +00:00
Justin Bogner f959febf7a InstrProf: Mark code regions after throw expressions as unreachable
We weren't setting regions as being unreachable after C++ throw
expressions, leading to incorrect count propagations.

llvm-svn: 235967
2015-04-28 06:31:55 +00:00
David Blaikie 2a661cd062 [opaque pointer type] Encode the pointee type in the bitcode for 'cmpxchg'
As a space optimization, this instruction would just encode the pointer
type of the first operand and use the knowledge that the second and
third operands would be of the pointee type of the first. When typed
pointers go away, this assumption will no longer be available - so
encode the type of the second operand explicitly and rely on that for
the third.

Test case added to demonstrate the backwards compatibility concern,
which only comes up when the definition of the second operand comes
after the use (hence the weird basic block sequence) - at which point
the type needs to be explicitly encoded in the bitcode and the record
length changes to accommodate this.

llvm-svn: 235966
2015-04-28 04:30:29 +00:00