platform/upstream/llvm.git
8 years agoAdd an optional ToolName argument to runToolOnCodeWithArgs/buildASTFromCodeWithArgs.
Benjamin Kramer [Fri, 29 Jan 2016 11:29:02 +0000 (11:29 +0000)]
Add an optional ToolName argument to runToolOnCodeWithArgs/buildASTFromCodeWithArgs.

This can be used as a way to modify argv[0] for a clang tool.

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

llvm-svn: 259187

8 years agoReplace StringRef with std::string in LinkerDriver::addLibrary(StringRef Name) becaus...
George Rimar [Fri, 29 Jan 2016 10:52:52 +0000 (10:52 +0000)]
Replace StringRef with std::string in LinkerDriver::addLibrary(StringRef Name) because std::string is destroyed after assigning what fills the buffer with garbage and StringRef is no more valid.
That fixes few failing tests under windows+msvs2015(debug).

llvm-svn: 259186

8 years agoIgnore breakpoints by default in SBFrame::EvaluateExpression
Eugene Leviant [Fri, 29 Jan 2016 10:48:11 +0000 (10:48 +0000)]
Ignore breakpoints by default in SBFrame::EvaluateExpression

llvm-svn: 259185

8 years agoAdd target triple to CodeGenOpenCL/pipe_types.cl test case
Ulrich Weigand [Fri, 29 Jan 2016 10:45:23 +0000 (10:45 +0000)]
Add target triple to CodeGenOpenCL/pipe_types.cl test case

The test is failing on SystemZ since different IR is being
generated due to platform ABI differences.  Add a target triple.

Fix suggested by Anastasia Stulova.

llvm-svn: 259183

8 years ago[ARM] Emit trap instruction using .inst directive
Alexandros Lamprineas [Fri, 29 Jan 2016 10:23:32 +0000 (10:23 +0000)]
[ARM] Emit trap instruction using .inst directive

The trap instruction is emitted as a data-in-text rather
than an instruction. This patch uses the .inst directive
for emitting trap.

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

llvm-svn: 259182

8 years ago[RenderScript] Remove unused RS command
Ewan Crawford [Fri, 29 Jan 2016 10:11:03 +0000 (10:11 +0000)]
[RenderScript] Remove unused RS command

Patch deletes the 'language renderscript module probe' command.
This command was present in the initial commit to help debug the plugin.
However we haven't used it recently and it's functionality is unclear, so can be removed entirely.

Also add back 'kernel coordinate' command, removed by accident in clang format patch r259056.

llvm-svn: 259181

8 years agoAMDGPU: Remove 24-bit intrinsics
Matt Arsenault [Fri, 29 Jan 2016 10:05:16 +0000 (10:05 +0000)]
AMDGPU: Remove 24-bit intrinsics

The known bit matching code seems to work reasonably well,
so these shouldn't really be needed.

llvm-svn: 259180

8 years agoMinor bugfix in AAResults::getModRefInfo.
George Burgess IV [Fri, 29 Jan 2016 07:51:15 +0000 (07:51 +0000)]
Minor bugfix in AAResults::getModRefInfo.

Also removed a few redundant `else`s.

Bug was found by a test I wrote for MemorySSA (in review at
http://reviews.llvm.org/D7864; shiny update coming soon). So, assuming
that lands at some point, this should be covered by that. If anyone
feels this deserves its own explicit test case, please let me know.
I'll write one.

llvm-svn: 259179

8 years agoRefactor common code for PPC fast isel load immediate selection.
Eric Christopher [Fri, 29 Jan 2016 07:20:30 +0000 (07:20 +0000)]
Refactor common code for PPC fast isel load immediate selection.

llvm-svn: 259178

8 years agoSince LI/LIS sign extend the constant passed into the instruction we should
Eric Christopher [Fri, 29 Jan 2016 07:20:01 +0000 (07:20 +0000)]
Since LI/LIS sign extend the constant passed into the instruction we should
check that the sign extended constant fits into 16-bits if we want a
zero extended value, otherwise go ahead and put it together piecemeal.

Fixes PR26356.

llvm-svn: 259177

8 years agoFix up conditional formatting.
Eric Christopher [Fri, 29 Jan 2016 07:19:49 +0000 (07:19 +0000)]
Fix up conditional formatting.

llvm-svn: 259176

8 years ago[llvm-bcanalyzer] Dump bitcode wrapper header
Akira Hatanaka [Fri, 29 Jan 2016 05:55:09 +0000 (05:55 +0000)]
[llvm-bcanalyzer] Dump bitcode wrapper header

This patch enables llvm-bcanalyzer to print the bitcode wrapper header
if the file has one, which is needed to test the changes made in
r258627 (bitcode-wrapper-header-armv7m.ll is the test case for r258627).

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

llvm-svn: 259162

8 years ago[WinEH] Don't perform state stores in cleanups
David Majnemer [Fri, 29 Jan 2016 05:33:15 +0000 (05:33 +0000)]
[WinEH] Don't perform state stores in cleanups

Our cleanups do not support true lexical nesting of funclets which
obviates the need to perform state stores.

This fixes PR26361.

llvm-svn: 259161

8 years ago[Concepts] Implement a portion of Concepts TS[dcl.spec.concept]p5 and p6:
Nathan Wilson [Fri, 29 Jan 2016 04:43:59 +0000 (04:43 +0000)]
[Concepts] Implement a portion of Concepts TS[dcl.spec.concept]p5 and p6:
Diagnose if the return type of a function concept or declaration type of a
variable concept is not bool.

Reviewers: hubert.reinterpretcast

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

llvm-svn: 259159

8 years agoRemove a parameter from Target::writePlt.
Rui Ueyama [Fri, 29 Jan 2016 04:15:02 +0000 (04:15 +0000)]
Remove a parameter from Target::writePlt.

llvm-svn: 259158

8 years agoELF: Provide default implemenatations for simple functions.
Rui Ueyama [Fri, 29 Jan 2016 04:05:09 +0000 (04:05 +0000)]
ELF: Provide default implemenatations for simple functions.

llvm-svn: 259157

8 years agoRemove unnecessary forward declaration. NFC
Craig Topper [Fri, 29 Jan 2016 04:01:09 +0000 (04:01 +0000)]
Remove unnecessary forward declaration. NFC

llvm-svn: 259156

8 years agoDefine stub functions instead of pure virtual functions.
Rui Ueyama [Fri, 29 Jan 2016 03:51:51 +0000 (03:51 +0000)]
Define stub functions instead of pure virtual functions.

To remove empty functions.

llvm-svn: 259155

8 years agoELF: Do not pass addresses that can be obtained using Out.
Rui Ueyama [Fri, 29 Jan 2016 03:51:49 +0000 (03:51 +0000)]
ELF: Do not pass addresses that can be obtained using Out.

llvm-svn: 259154

8 years agoFix TestDataFormatterScript for Linux.
Chaoren Lin [Fri, 29 Jan 2016 03:48:08 +0000 (03:48 +0000)]
Fix TestDataFormatterScript for Linux.

Summary:
m_function_name will contain a dummy name for the auto-generated function from
the python script on Linux. Check for script name first.

Reviewers: granata.enrico

Subscribers: lldb-commits

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

llvm-svn: 259153

8 years agoSmallPtrSetTest: More checks for the swap() testing
Matthias Braun [Fri, 29 Jan 2016 03:34:36 +0000 (03:34 +0000)]
SmallPtrSetTest: More checks for the swap() testing

llvm-svn: 259152

8 years agoSmallPtrSetTest: Check that iterators are still valid after erase()
Matthias Braun [Fri, 29 Jan 2016 03:34:34 +0000 (03:34 +0000)]
SmallPtrSetTest: Check that iterators are still valid after erase()

llvm-svn: 259151

8 years agoRename PltZeroEntrySize -> PltZeroSize.
Rui Ueyama [Fri, 29 Jan 2016 03:00:32 +0000 (03:00 +0000)]
Rename PltZeroEntrySize -> PltZeroSize.

This patch also fixes parameter name. They points to the beginning
of PLT or GOT tables, so GotAddr or PltAddr are better.)

llvm-svn: 259150

8 years agoAdd a comment.
Rui Ueyama [Fri, 29 Jan 2016 03:00:30 +0000 (03:00 +0000)]
Add a comment.

llvm-svn: 259149

8 years agoRevert "Reapply commit r258404 with fix"
David Majnemer [Fri, 29 Jan 2016 02:43:22 +0000 (02:43 +0000)]
Revert "Reapply commit r258404 with fix"

This reverts commit r258929, it caused PR26364.

llvm-svn: 259148

8 years agoELF: Make Target's member function names shorter.
Rui Ueyama [Fri, 29 Jan 2016 02:33:45 +0000 (02:33 +0000)]
ELF: Make Target's member function names shorter.

llvm-svn: 259147

8 years agoFix some -Wstring-conversion warnings
David Blaikie [Fri, 29 Jan 2016 02:23:13 +0000 (02:23 +0000)]
Fix some -Wstring-conversion warnings

I don't seem to see these locally, maybe just need to update my
compiler, or we haven't turned them on for LLVM's build and we should...

llvm-svn: 259146

8 years ago[GVN] Add clarifying assert [NFCI]
Philip Reames [Fri, 29 Jan 2016 02:23:10 +0000 (02:23 +0000)]
[GVN] Add clarifying assert [NFCI]

Just adding an assert which makes invariants between AnalyzeLoadsFromClobberingLoads and GetLoadValueForLoad slightly more clear.

llvm-svn: 259145

8 years agoRename includeInDynamicSymtab -> includeInDynsym.
Rui Ueyama [Fri, 29 Jan 2016 02:17:01 +0000 (02:17 +0000)]
Rename includeInDynamicSymtab -> includeInDynsym.

llvm-svn: 259144

8 years agoELF: Report multiple errors from the driver.
Rui Ueyama [Fri, 29 Jan 2016 01:54:52 +0000 (01:54 +0000)]
ELF: Report multiple errors from the driver.

This patch let the driver keep going until it parses all
command line options.

http://reviews.llvm.org/D16645

llvm-svn: 259143

8 years agoRename DynamicSymbolTableIndex -> DynsymIndex.
Rui Ueyama [Fri, 29 Jan 2016 01:49:33 +0000 (01:49 +0000)]
Rename DynamicSymbolTableIndex -> DynsymIndex.

This is the index in .dynsym, so the new name should make sense.

llvm-svn: 259142

8 years agoELF: Remove accessors from Target.
Rui Ueyama [Fri, 29 Jan 2016 01:49:32 +0000 (01:49 +0000)]
ELF: Remove accessors from Target.

These accessors do not provide values. We can simply make the variables public.

llvm-svn: 259141

8 years agoRemove unused variable.
Rui Ueyama [Fri, 29 Jan 2016 01:49:29 +0000 (01:49 +0000)]
Remove unused variable.

llvm-svn: 259140

8 years agoMinor code cleanup. NFC.
Junmo Park [Fri, 29 Jan 2016 01:39:39 +0000 (01:39 +0000)]
Minor code cleanup. NFC.

llvm-svn: 259139

8 years agoAdd the clang debug info test directory to .gitignore as it's managed separately.
Eric Christopher [Fri, 29 Jan 2016 01:35:55 +0000 (01:35 +0000)]
Add the clang debug info test directory to .gitignore as it's managed separately.

llvm-svn: 259138

8 years agoUse a consistent spelling for vtables.
Eric Christopher [Fri, 29 Jan 2016 01:35:53 +0000 (01:35 +0000)]
Use a consistent spelling for vtables.

llvm-svn: 259137

8 years agoMerge identical strings.
Rafael Espindola [Fri, 29 Jan 2016 01:24:25 +0000 (01:24 +0000)]
Merge identical strings.

This avoids the need to have reserve and addString in sync.

We avoid hashing the global symbols again. This means that we don't
merge a global symbol that has the same name as some other string, but
that doesn't seem very common. The string table size is the same in
clang an scylladb with or without hashing global symbols again.

llvm-svn: 259136

8 years agoFix a bug where type <formatter> list would ignore the -w argument
Enrico Granata [Fri, 29 Jan 2016 01:12:13 +0000 (01:12 +0000)]
Fix a bug where type <formatter> list would ignore the -w argument

rdar://24379879

llvm-svn: 259135

8 years ago[AArch64] Fix i64 nontemporal high-half extraction.
Ahmed Bougacha [Fri, 29 Jan 2016 01:08:41 +0000 (01:08 +0000)]
[AArch64] Fix i64 nontemporal high-half extraction.

Since we only have pair - not single - nontemporal store instructions,
we have to extract the high part into a separate register to be able
to use them.

When the initial nontemporal codegen support was added, I wrote the
extract using the nonsensical UBFX [0,32[.
Use the correct LSR form instead.

llvm-svn: 259134

8 years ago[RS4GC] Minor cleanups enabled by the previous change; NFC
Sanjoy Das [Fri, 29 Jan 2016 01:03:20 +0000 (01:03 +0000)]
[RS4GC] Minor cleanups enabled by the previous change; NFC

llvm-svn: 259133

8 years ago[RS4GC] Delete code that is dead due to r259129; NFC
Sanjoy Das [Fri, 29 Jan 2016 01:03:17 +0000 (01:03 +0000)]
[RS4GC] Delete code that is dead due to r259129; NFC

llvm-svn: 259132

8 years agoFix a bug where LLDB would not print the name of the function that a scripted summary...
Enrico Granata [Fri, 29 Jan 2016 00:56:52 +0000 (00:56 +0000)]
Fix a bug where LLDB would not print the name of the function that a scripted summary is bound to

rdar://24380076

llvm-svn: 259131

8 years agoReland "[CodeView] Use assembler directives for line tables"
Reid Kleckner [Fri, 29 Jan 2016 00:49:42 +0000 (00:49 +0000)]
Reland "[CodeView] Use assembler directives for line tables"

This reverts commit r259126 and relands r259117.

This time with updated library dependencies.

llvm-svn: 259130

8 years ago[RS4GC] Clamp UseDeoptBundles to true and update tests
Sanjoy Das [Fri, 29 Jan 2016 00:28:57 +0000 (00:28 +0000)]
[RS4GC] Clamp UseDeoptBundles to true and update tests

The full diff for the test directory may be hard to read because of the
filename clash; so here's all that happened as far as the tests are
concerned:

```
cd test/Transforms/RewriteStatepointsForGC
git rm *ll
git mv deopt-bundles/* ./
rmdir deopt-bundles
find . -name '*.ll' | xargs gsed -i 's/-rs4gc-use-deopt-bundles //g'
```

llvm-svn: 259129

8 years agoRename isTlsOptimized -> canRelaxTls.
Rui Ueyama [Fri, 29 Jan 2016 00:20:12 +0000 (00:20 +0000)]
Rename isTlsOptimized -> canRelaxTls.

This function is a predicate that a given relocation can be relaxed.
The previous name implied that it returns true if a given relocation
has already been optimized away.

llvm-svn: 259128

8 years agoUpdate comments.
Rui Ueyama [Fri, 29 Jan 2016 00:20:09 +0000 (00:20 +0000)]
Update comments.

llvm-svn: 259127

8 years agoRevert "[CodeView] Use assembler directives for line tables"
Reid Kleckner [Fri, 29 Jan 2016 00:13:28 +0000 (00:13 +0000)]
Revert "[CodeView] Use assembler directives for line tables"

This reverts commit r259117.

The LineInfo constructor is defined in the codeview library and we have
to link against it now. Doing that isn't trivial, so reverting for now.

llvm-svn: 259126

8 years ago[RS4GC] Port three tests to the deopt bundles directory
Sanjoy Das [Fri, 29 Jan 2016 00:13:26 +0000 (00:13 +0000)]
[RS4GC] Port three tests to the deopt bundles directory

two-invokes-one-landingpad.ll was only moved (and not "ported"), but
having everything in the `deopt-bundles` directory will make later
changes more obvious.

llvm-svn: 259125

8 years agoAdd missing raw_ostream include
Reid Kleckner [Fri, 29 Jan 2016 00:03:34 +0000 (00:03 +0000)]
Add missing raw_ostream include

Prior to r259115 this was coming via LTOModule.h and MCContext.h.

Apparently this target is not built by 'check'. =(

llvm-svn: 259124

8 years agoSilence gcc warning about ternary and enumerations
Reid Kleckner [Thu, 28 Jan 2016 23:59:35 +0000 (23:59 +0000)]
Silence gcc warning about ternary and enumerations

llvm-svn: 259123

8 years ago[CUDA] Generate CUDA's printf alloca in its function's entry block.
Justin Lebar [Thu, 28 Jan 2016 23:58:28 +0000 (23:58 +0000)]
[CUDA] Generate CUDA's printf alloca in its function's entry block.

Summary:
This is necessary to prevent llvm from generating stacksave intrinsics
around this alloca.  NVVM doesn't have a stack, and we don't handle said
intrinsics.

Reviewers: rnk, echristo

Subscribers: cfe-commits, jhen, tra

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

llvm-svn: 259122

8 years ago[PlaceSafepoints] Use DEBUG() instead of TraceLSP
Sanjoy Das [Thu, 28 Jan 2016 23:49:27 +0000 (23:49 +0000)]
[PlaceSafepoints] Use DEBUG() instead of TraceLSP

DEBUG() is the more idiomatic LLVM style.

llvm-svn: 259121

8 years agoLower inlining threshold when the caller has minsize attribute.
Easwaran Raman [Thu, 28 Jan 2016 23:44:41 +0000 (23:44 +0000)]
Lower inlining threshold when the caller has minsize attribute.

When the caller has optsize attribute, we reduce the inlinining threshold
to OptSizeThreshold (=75) if it is not already lower than that. We don't do
the same for minsize and I suspect it was not intentional. This also addresses
a FIXME regarding checking optsize attribute explicitly instead of using the
right wrapper.

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

llvm-svn: 259120

8 years agoClass Property: change PropertyMap to include isClassProperty.
Manman Ren [Thu, 28 Jan 2016 23:36:05 +0000 (23:36 +0000)]
Class Property: change PropertyMap to include isClassProperty.

PropertyMap used to map IdentifierInfo (name of the property) to
ObjcPropertyDecl *. Now that a class property can have the same name as
an instance property, we change PropertyMap to map a pair <IdentifierInfo *,
unsigned> to ObjcPropertyDecl *.

Also update a few places from iterating over instance_properties to
iterating over all properties.

rdar://23891898

llvm-svn: 259119

8 years ago[analyzer] NullabilityChecker: Remove unused isReturnSelf() function.
Devin Coughlin [Thu, 28 Jan 2016 23:34:13 +0000 (23:34 +0000)]
[analyzer] NullabilityChecker: Remove unused isReturnSelf() function.

Remove the now-unused isReturnSelf() function so we don't get a compiler
warning. Apologies for not doing this in r259099.

llvm-svn: 259118

8 years ago[CodeView] Use assembler directives for line tables
Reid Kleckner [Thu, 28 Jan 2016 23:31:52 +0000 (23:31 +0000)]
[CodeView] Use assembler directives for line tables

Adds a new family of .cv_* directives to LLVM's variant of GAS syntax:

- .cv_file: Similar to DWARF .file directives

- .cv_loc: Similar to the DWARF .loc directive, but starts with a
  function id. CodeView line tables are emitted by function instead of
  by compilation unit, so we needed an extra field to communicate this.
  Rather than overloading the .loc direction further, we decided it was
  better to have our own directive.

- .cv_stringtable: Emits the codeview string table at the current
  position. Currently this just contains the filenames as
  null-terminated strings.

- .cv_filechecksums: Emits the file checksum table for all files used
  with .cv_file so far. There is currently no support for emitting
  actual checksums, just filenames.

This moves the line table emission code down into the assembler.  This
is in preparation for implementing the inlined call site line table
format. The inline line table format encoding algorithm requires knowing
the absolute code offsets, so it must run after the assembler has laid
out the code.

David Majnemer collaborated on this patch.

llvm-svn: 259117

8 years agoCheck for frontend errors after releasing the Builder.
Manman Ren [Thu, 28 Jan 2016 23:29:02 +0000 (23:29 +0000)]
Check for frontend errors after releasing the Builder.

Frontend can emit errors when releaseing the Builder. If there are errors before
or when releasing the Builder, we reset the module to stop here before invoking
the backend.

Before this commit, clang will continue to invoke the backend and backend can
crash.

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

llvm-svn: 259116

8 years agoRemove unused MC includes from LTOModule.h
Reid Kleckner [Thu, 28 Jan 2016 23:21:12 +0000 (23:21 +0000)]
Remove unused MC includes from LTOModule.h

llvm-svn: 259115

8 years agofix up missing header from change r259084.
Todd Fiala [Thu, 28 Jan 2016 23:17:53 +0000 (23:17 +0000)]
fix up missing header from change r259084.

llvm-svn: 259114

8 years agoFix task dependency performance problem
Jonathan Peyton [Thu, 28 Jan 2016 23:10:44 +0000 (23:10 +0000)]
Fix task dependency performance problem

In: http://lists.llvm.org/pipermail/openmp-dev/2015-August/000858.html, a
performance issue was found with libomp's task dependencies.  The task
dependencies hash table has an issue with collisions. The current table size is
a power of two. This combined with the current hash function causes a large
number of collisions to occurr. Also, the current size (64) is too small for
larger applications so the table size is increased.

This patch creates a two level hash table approach for task dependencies. The
implicit task is considered the "master" or "top-level" task which has a large
static sized hash table (997), and nested tasks will have smaller hash
tables (97). Prime numbers were chosen to help reduce collisions.

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

llvm-svn: 259113

8 years ago[PlaceSafepoints] Misc. minor cleanups; NFC
Sanjoy Das [Thu, 28 Jan 2016 23:03:19 +0000 (23:03 +0000)]
[PlaceSafepoints] Misc. minor cleanups; NFC

These changes are aimed at bringing PlaceSafepoints up to code with the
LLVM coding guidelines:

 - Fix variable naming
 - Use DenseSet instead of std::set
 - Remove dead code
 - Minor local code simplifications

llvm-svn: 259112

8 years ago[PlaceSafepoints] Remvoe unused headers, and sort #includes; NFC
Sanjoy Das [Thu, 28 Jan 2016 23:03:17 +0000 (23:03 +0000)]
[PlaceSafepoints] Remvoe unused headers, and sort #includes; NFC

llvm-svn: 259111

8 years ago[PlaceSafepoints] Eliminate dead code; NFC
Sanjoy Das [Thu, 28 Jan 2016 23:03:14 +0000 (23:03 +0000)]
[PlaceSafepoints] Eliminate dead code; NFC

Now that NoStatepoints is a constant `true`, we can get rid of a bunch
of dead code.

llvm-svn: 259110

8 years agoUpdate for llvm change.
Rafael Espindola [Thu, 28 Jan 2016 22:56:41 +0000 (22:56 +0000)]
Update for llvm change.

llvm-svn: 259108

8 years agoELF: Report more than one undefined symbols if exist.
Rui Ueyama [Thu, 28 Jan 2016 22:56:29 +0000 (22:56 +0000)]
ELF: Report more than one undefined symbols if exist.

http://reviews.llvm.org/D16643

llvm-svn: 259107

8 years agoDon't mention a command line option in an error.
Rafael Espindola [Thu, 28 Jan 2016 22:55:45 +0000 (22:55 +0000)]
Don't mention a command line option in an error.

The program using this code may not have it.

Patch by Wilfred Hughes.

llvm-svn: 259106

8 years ago[RuntimeDyld][MachO] Fix handling of empty eh-frame sections.
Lang Hames [Thu, 28 Jan 2016 22:35:48 +0000 (22:35 +0000)]
[RuntimeDyld][MachO] Fix handling of empty eh-frame sections.

This patch switches from an unguarded to a guarded loop for eh-frame record
fixups. In the unguarded version we would always make at least one call to
processFDE, which would then crash trying to fix up a frame that didn't exist.

Fixes <rdar://problem/24301582>

llvm-svn: 259103

8 years agoadd back an Xcode-specific Makefile for header installation
Todd Fiala [Thu, 28 Jan 2016 22:34:36 +0000 (22:34 +0000)]
add back an Xcode-specific Makefile for header installation

llvm-svn: 259102

8 years ago[X86][AVX] Added more thorough 256-bit vector consecutive load tests.
Simon Pilgrim [Thu, 28 Jan 2016 22:29:51 +0000 (22:29 +0000)]
[X86][AVX] Added more thorough 256-bit vector consecutive load tests.

llvm-svn: 259100

8 years ago[analyzer] Suppress nullability warnings in copy, mutableCopy, and init families.
Devin Coughlin [Thu, 28 Jan 2016 22:23:34 +0000 (22:23 +0000)]
[analyzer] Suppress nullability warnings in copy, mutableCopy, and init families.

There are multiple, common idioms of defensive nil-checks in copy,
mutableCopy, and init methods in ObjC. The analyzer doesn't currently have the
capability to distinguish these idioms from true positives, so suppress all
warnings about returns in those families. This is a pretty blunt suppression
that we should improve later.

rdar://problem/24395811

llvm-svn: 259099

8 years agoRemove autoconf support from source directories.
Eugene Zelenko [Thu, 28 Jan 2016 22:05:24 +0000 (22:05 +0000)]
Remove autoconf support from source directories.

Differential revision: http://reviews.llvm.org/D16662

llvm-svn: 259098

8 years ago[RS4GC] Change opt %s to opt < %s; NFC
Sanjoy Das [Thu, 28 Jan 2016 21:51:21 +0000 (21:51 +0000)]
[RS4GC] Change opt %s to opt < %s; NFC

This is as per http://llvm.org/docs/TestingGuide.html#fragile-tests.  I
didn't touch the tests outside deopt-bundles/ since they'll be gone
soon.

llvm-svn: 259097

8 years ago[PlaceSafepoints] Clamp NoStatepoints to true
Sanjoy Das [Thu, 28 Jan 2016 21:51:14 +0000 (21:51 +0000)]
[PlaceSafepoints] Clamp NoStatepoints to true

This change permanently clamps -spp-no-statepoints to true (the code
deletion will come later).  Tests that specifically tested
PlaceSafepoint's ability to wrap calls in gc.statepoint have been moved
to RS4GC's test suite.

llvm-svn: 259096

8 years agoImplementation of PS4 ABI, Round 1
Sunil Srivastava [Thu, 28 Jan 2016 21:36:31 +0000 (21:36 +0000)]
Implementation of PS4 ABI, Round 1
Added a test to safeguard linux ABI.

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

llvm-svn: 259095

8 years agoBring back the test-suite export in test-release without bringing back the build...
Daniel Sanders [Thu, 28 Jan 2016 21:09:50 +0000 (21:09 +0000)]
Bring back the test-suite export in test-release without bringing back the build failures.

Summary:
r257791 disabled the test-suite export since the addition of CMakeLists.txt was
causing build failures. This patch exports the test-suite again but does so
outside the source tree so that it isn't included in the Phase[123] builds.

Reviewers: hans

Subscribers: llvm-commits

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

llvm-svn: 259094

8 years agoRemove autoconf support.
Eugene Zelenko [Thu, 28 Jan 2016 21:00:21 +0000 (21:00 +0000)]
Remove autoconf support.

Differential revision: http://reviews.llvm.org/D16651

llvm-svn: 259091

8 years agoAMDGPU: Match fmed3 patterns with legacy fmin/fmax
Matt Arsenault [Thu, 28 Jan 2016 20:53:48 +0000 (20:53 +0000)]
AMDGPU: Match fmed3 patterns with legacy fmin/fmax

llvm-svn: 259090

8 years agoAMDGPU: Match some med3 patterns
Matt Arsenault [Thu, 28 Jan 2016 20:53:42 +0000 (20:53 +0000)]
AMDGPU: Match some med3 patterns

llvm-svn: 259089

8 years agoAMDGPU: Set DX10Clamp bit
Matt Arsenault [Thu, 28 Jan 2016 20:53:35 +0000 (20:53 +0000)]
AMDGPU: Set DX10Clamp bit

llvm-svn: 259088

8 years agoFixed compilation issue.
Elena Demikhovsky [Thu, 28 Jan 2016 20:36:46 +0000 (20:36 +0000)]
Fixed compilation issue.

llvm-svn: 259087

8 years agoFix build after rL259070.
Chaoren Lin [Thu, 28 Jan 2016 20:25:46 +0000 (20:25 +0000)]
Fix build after rL259070.

llvm-svn: 259086

8 years ago[cfi] Simplify the code in CfiSlowPathCommon.
Evgeniy Stepanov [Thu, 28 Jan 2016 19:58:26 +0000 (19:58 +0000)]
[cfi] Simplify the code in CfiSlowPathCommon.

llvm-svn: 259085

8 years agoUpdate lldb for API change in clang r259070.
Manman Ren [Thu, 28 Jan 2016 19:55:50 +0000 (19:55 +0000)]
Update lldb for API change in clang r259070.

llvm-svn: 259084

8 years agoadd masked intrinsic tests to show missed opportunities
Sanjay Patel [Thu, 28 Jan 2016 19:54:20 +0000 (19:54 +0000)]
add masked intrinsic tests to show missed opportunities

llvm-svn: 259083

8 years ago[cfi] Get rid of a fixed size buffer for the library path in test.
Evgeniy Stepanov [Thu, 28 Jan 2016 19:37:03 +0000 (19:37 +0000)]
[cfi] Get rid of a fixed size buffer for the library path in test.

llvm-svn: 259082

8 years agoInclude RecordDecls from anonymous unions in the AST.
Nico Weber [Thu, 28 Jan 2016 19:25:00 +0000 (19:25 +0000)]
Include RecordDecls from anonymous unions in the AST.

For

  void f() {
    union { int i; };
  }

clang used to omit the RecordDecl from the anonymous union from the AST.
That's because the code creating it only called PushOnScopeChains(), which adds
it to the current DeclContext, which here is the function's DeclContext. But
RecursiveASTVisitor doesn't descent into all decls in a FunctionDecl.

Instead, for DeclContexts that contain statements, return the RecordDecl so
that it can be included in the DeclStmt containing the VarDecl for the union.

Interesting bits from the AST before this change:

|-FunctionDecl
| `-CompoundStmt
|   |-DeclStmt
|   | `-VarDecl 0x589cd60 <col:3> col:3 implicit used 'union (anonymous at test.cc:3:3)' callinit

After this change:

-FunctionDecl
| `-CompoundStmt
|   |-DeclStmt
|   | |-CXXRecordDecl 0x4612e48 <col:3, col:18> col:3 union definition
|   | | |-FieldDecl 0x4612f70 <col:11, col:15> col:15 referenced i 'int'
|   | `-VarDecl 0x4613010 <col:3> col:3 implicit used 'union (anonymous at test.cc:3:3)' callinit

This is now closer to how anonymous struct and unions are represented as
members of structs.  It also enabled deleting some one-off code in the
template instantiation code.

Finally, it fixes a crash with ASTMatchers, see the included test case
(this fixes http://crbug.com/580749).

llvm-svn: 259079

8 years agoFix an issue where the type <formatter> list command would not accept a valid argumen...
Enrico Granata [Thu, 28 Jan 2016 19:21:38 +0000 (19:21 +0000)]
Fix an issue where the type <formatter> list command would not accept a valid argument and instead error out complaining about a malformed regex

rdar://problem/24380025

llvm-svn: 259078

8 years agoRemove unused parameter.
Nico Weber [Thu, 28 Jan 2016 19:12:32 +0000 (19:12 +0000)]
Remove unused parameter.

llvm-svn: 259077

8 years ago[SplitModule] In split module utility we should never separate alias with its aliasee.
Sergei Larin [Thu, 28 Jan 2016 18:59:28 +0000 (18:59 +0000)]
[SplitModule] In split module utility we should never separate alias with its aliasee.

Summary: When splitting module with preserving locals, we currently do not handle case of global alias being separated with its aliasee.

Subscribers: llvm-commits

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

llvm-svn: 259075

8 years agoAddress buildbot fallout from r259065
David Majnemer [Thu, 28 Jan 2016 18:59:04 +0000 (18:59 +0000)]
Address buildbot fallout from r259065

llvm-svn: 259074

8 years agoClass Property: class property and instance property can have the same name.
Manman Ren [Thu, 28 Jan 2016 18:49:28 +0000 (18:49 +0000)]
Class Property: class property and instance property can have the same name.

Add "enum ObjCPropertyQueryKind" to a few APIs that used to only take the name
of the property: ObjCPropertyDecl::findPropertyDecl,
ObjCContainerDecl::FindPropertyDeclaration,
ObjCInterfaceDecl::FindPropertyVisibleInPrimaryClass,
ObjCImplDecl::FindPropertyImplDecl, and Sema::ActOnPropertyImplDecl.

ObjCPropertyQueryKind currently has 3 values:
OBJC_PR_query_unknown, OBJC_PR_query_instance, OBJC_PR_query_class

This extra parameter specifies that we are looking for an instance property with
the given name, or a class property with the given name, or any property with
the given name (if both exist, the instance property will be returned).

rdar://23891898

llvm-svn: 259070

8 years agoELF: Rename error -> fatal and redefine error as a non-noreturn function.
Rui Ueyama [Thu, 28 Jan 2016 18:40:06 +0000 (18:40 +0000)]
ELF: Rename error -> fatal and redefine error as a non-noreturn function.

In many situations, we don't want to exit at the first error even in the
process model. For example, it is better to report all undefined symbols
rather than reporting the first one that the linker picked up randomly.

In order to handle such errors, we don't need to wrap everything with
ErrorOr (thanks for David Blaikie for pointing this out!) Instead, we
can set a flag to record the fact that we found an error and keep it
going until it reaches a reasonable checkpoint.

This idea should be applicable to other places. For example, we can
ignore broken relocations and check for errors after visiting all relocs.

In this patch, I rename error to fatal, and introduce another version of
error which doesn't call exit. That function instead sets HasError to true.
Once HasError becomes true, it stays true, so that we know that there
was an error if it is true.

I think introducing a non-noreturn error reporting function is by itself
a good idea, and it looks to me that this also provides a gradual path
towards lld-as-a-library (or at least embed-lld-to-your-program) without
sacrificing code readability with lots of ErrorOr's.

http://reviews.llvm.org/D16641

llvm-svn: 259069

8 years agoMinor cleanup /NFC
Xinliang David Li [Thu, 28 Jan 2016 18:37:43 +0000 (18:37 +0000)]
Minor cleanup /NFC

llvm-svn: 259068

8 years ago[PGO] test case cleanups
Xinliang David Li [Thu, 28 Jan 2016 18:25:53 +0000 (18:25 +0000)]
[PGO] test case cleanups

1. Make test case more focused and robust by focusing on what to be tested (linkage, icall) -- make it easier to validate
2. Testing linkages of data and counter variables instead of names. Counters and data are more relavant to be tested.

llvm-svn: 259067

8 years ago[X86] Don't transform X << 1 to X + X during type legalization
David Majnemer [Thu, 28 Jan 2016 18:20:05 +0000 (18:20 +0000)]
[X86] Don't transform X << 1 to X + X during type legalization

While legalizing a 64-bit shift left by 1, the following occurs:

We split the shift operand in half: a high half and a low half.
We then create an ADDC with the low half and a ADDE with the high half +
the carry bit from the ADDC.

This is problematic if X is any_ext'd because the high half computation
is now undef + undef + carry bit and there is no way to ensure that the
two undef values had the same bitwise representation.  This results in
the lowest bit in the high half turning into garbage.

Instead, do not try to turn shifts into arithmetic during type
legalization.

This fixes PR26350.

llvm-svn: 259065

8 years agoFix strange indent.
Nico Weber [Thu, 28 Jan 2016 18:06:31 +0000 (18:06 +0000)]
Fix strange indent.

llvm-svn: 259063

8 years ago[PlaceSafepoints] Clean up tests; NFC
Sanjoy Das [Thu, 28 Jan 2016 18:01:03 +0000 (18:01 +0000)]
[PlaceSafepoints] Clean up tests; NFC

Use `opt < %s` instead of `opt %s` as specified in
http://llvm.org/docs/TestingGuide.html#fragile-tests.

llvm-svn: 259062

8 years ago[Coverage] Use a set to track visited FileIDs (NFC)
Vedant Kumar [Thu, 28 Jan 2016 17:52:18 +0000 (17:52 +0000)]
[Coverage] Use a set to track visited FileIDs (NFC)

llvm-svn: 259061

8 years agoMake header self-contained.
Benjamin Kramer [Thu, 28 Jan 2016 17:48:29 +0000 (17:48 +0000)]
Make header self-contained.

llvm-svn: 259060

8 years agoAMDGPU: waitcnt operand fixes
Tom Stellard [Thu, 28 Jan 2016 17:13:44 +0000 (17:13 +0000)]
AMDGPU: waitcnt operand fixes

Summary:
Allow lgkmcnt up to 0xF (hardware allows that).
Fix mask for ExpCnt in AMDGPUInstPrinter.

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm

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

Patch by: Nikolay Haustov

llvm-svn: 259059