Commit Graph

218561 Commits

Author SHA1 Message Date
Akira Hatanaka a61deb249b Provide a way to specify inliner's attribute compatibility and merging.
This reapplies r252990 and r252949. I've added member function getKind
to the Attr classes which returns the enum or string of the attribute.

Original commit message for r252949:

Provide a way to specify inliner's attribute compatibility and merging
rules using table-gen. NFC.

This commit adds new classes CompatRule and MergeRule to Attributes.td,
which are used to generate code to check attribute compatibility and
merge attributes of the caller and callee.

rdar://problem/19836465

llvm-svn: 256277
2015-12-22 20:00:05 +00:00
Rafael Espindola 5349d87a69 Delete dead GlobalAliases.
llvm-svn: 256276
2015-12-22 19:50:22 +00:00
Rafael Espindola 4b0d24c00a Revert "AMDGPU/SI: Use flat for global load/store when targeting HSA"
This reverts commit r256273.

It broke CodeGen/AMDGPU/llvm.dbg.value.ll

llvm-svn: 256275
2015-12-22 19:46:44 +00:00
Rafael Espindola 2cc46b3701 Merge duplicated code.
The code for deleting dead global variables and functions was
duplicated.

This is in preparation for also deleting dead global aliases.

llvm-svn: 256274
2015-12-22 19:38:07 +00:00
Changpeng Fang 9b8a9be058 AMDGPU/SI: Use flat for global load/store when targeting HSA
Summary:
  For some reason doing executing an MUBUF instruction with the addr64
  bit set and a zero base pointer in the resource descriptor causes
  the memory operation to be dropped when the shader is executed using
  the HSA runtime.

  This kind of MUBUF instruction is commonly used when the pointer is
  stored in VGPRs.  The base pointer field in the resource descriptor
  is set to zero and and the pointer is stored in the vaddr field.

  This patch resolves the issue by only using flat instructions for
  global memory operations when targeting HSA. This is an overly
  conservative fix as all other configurations of MUBUF instructions
  appear to work.

Reviewers: tstellarAMD

Subscribers: arsenm, llvm-commits

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

llvm-svn: 256273
2015-12-22 19:32:28 +00:00
Rafael Espindola 9f0bebc3da Use early continue to reduce indentation.
llvm-svn: 256272
2015-12-22 19:26:18 +00:00
Rafael Espindola e4ed0e56ce Simplify iterator management. NFC.
Not passing an iterator to processGlobal will allow it to work with
other GlobalValues.

llvm-svn: 256271
2015-12-22 19:16:50 +00:00
Ed Maste 5784ae2d67 XFAIL TestCppNsImport on FreeBSD
It has an existing XFAIL annotation for GCC >= 4.9 but it also fails on
FreeBSD 10.x with Clang 3.4.1.

llvm.org/pr25925

llvm-svn: 256270
2015-12-22 19:10:09 +00:00
Johannes Doerfert 5dced2693e Refactor canSynthesize in the BlockGenerators [NFC]
llvm-svn: 256269
2015-12-22 19:08:49 +00:00
Ed Maste 7637905318 Add expectedFailureFreeBSD to an additional thread state test failing on FreeBSD
This new failure has been noted in the existing PR, llvm.org/pr15824

llvm-svn: 256268
2015-12-22 19:08:46 +00:00
Johannes Doerfert 28f8ac1db2 Treat inline assembly as a constant in the code generation.
llvm-svn: 256267
2015-12-22 19:08:24 +00:00
Johannes Doerfert 42df8d1db6 Reduce indention in BlockGenerator::trySynthesizeNewValue [NFC]
llvm-svn: 256266
2015-12-22 19:08:01 +00:00
Paul Robinson 0ee3f25521 Add advice on choosing reviewers
llvm-svn: 256265
2015-12-22 18:59:02 +00:00
Xinliang David Li baf55d8266 [PGO] Move buffer write callback to a common file
This is a NFC refactoring enabling code sharing by file writer.

llvm-svn: 256264
2015-12-22 18:57:15 +00:00
Cong Hou e93b8e1539 [BPI] Replace weights by probabilities in BPI.
This patch removes all weight-related interfaces from BPI and replace
them by probability versions. With this patch, we won't use edge weight
anymore in either IR or MC passes. Edge probabilitiy is a better
representation in terms of CFG update and validation.


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

llvm-svn: 256263
2015-12-22 18:56:14 +00:00
Manuel Jacob 4e4f60ded0 Remove deprecated llvm.experimental.gc.result.{int,float,ptr} intrinsics.
Summary:
These were deprecated 11 months ago when a generic
llvm.experimental.gc.result intrinsic, which works for all types, was added.

Reviewers: sanjoy, reames

Subscribers: sanjoy, chenli, llvm-commits

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

llvm-svn: 256262
2015-12-22 18:44:45 +00:00
Alexander Kornienko ef064f8ace [clang-tidy] Added documentation for modernize-redundant-void-arg
llvm-svn: 256261
2015-12-22 18:13:00 +00:00
Tobias Grosser c6424ae46c ScopDetection: Simplify std::distance(....) to BB->size()
Suggested by: Johannes Doerfert <doerfert@cs.uni-saarland.de>

llvm-svn: 256260
2015-12-22 17:38:59 +00:00
Alexander Kornienko 785e5223d3 [clang-tidy] Updates to documentation: formatting, titles, etc.
llvm-svn: 256259
2015-12-22 17:36:49 +00:00
Vedant Kumar d167586a28 [Support] Allow multiple paired calls to {start,stop}Timer()
Differential Revision: http://reviews.llvm.org/D15619

Reviewed-by: rafael
llvm-svn: 256258
2015-12-22 17:36:17 +00:00
Todd Fiala e4beddce55 skip TestEvents.py on Darwin
This is generating a SIGSEGV somewhere around 1 in 10 runs on OS X.

Skip the whole test to avoid testbot noise until we can get the
SIGSEGV addressed.

Tracking with:
https://llvm.org/bugs/show_bug.cgi?id=25924

llvm-svn: 256257
2015-12-22 17:24:31 +00:00
Nico Weber 6341a79387 fix a gcc warning
llvm-svn: 256256
2015-12-22 17:22:25 +00:00
Todd Fiala 5bdbef649b test infra: fix lldbinline tests to work with rerun
Fixes:
https://llvm.org/bugs/show_bug.cgi?id=25922

llvm-svn: 256255
2015-12-22 17:14:47 +00:00
Alexander Kornienko 677f3fb215 Updated year (2014-2015).
llvm-svn: 256254
2015-12-22 17:10:34 +00:00
Alexander Kornienko b60d291d79 [clang-tools-extra] Text formatting
llvm-svn: 256253
2015-12-22 17:08:57 +00:00
Manuel Jacob 990dfa6fe5 [RS4GC] Fix crash in the case that a live variable has a constant base.
Summary:
Previously, RS4GC crashed in CreateGCRelocates() because it assumed
that every base is also in the array of live variables, which isn't true if a
live variable has a constant base.

This change fixes the crash by making sure CreateGCRelocates() won't try to
relocate a live variable with a constant base.  This would be unnecessary
anyway because anything with a constant base won't move.

Reviewers: reames

Subscribers: llvm-commits, sanjoy

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

llvm-svn: 256252
2015-12-22 16:50:44 +00:00
Adrian McCarthy c2961ab889 Improve error handling for `frame select` command when there are too many arguments.
Bug:  https://llvm.org/bugs/show_bug.cgi?id=25847

It now gives a more specific error message and then returns instead of trying to select the wrong frame.

llvm-svn: 256251
2015-12-22 16:50:28 +00:00
Ed Maste 1ca9cda583 Add expectedFailureFreeBSD to tests failing in the same way as on Linux
llvm.org/pr25819

llvm-svn: 256250
2015-12-22 16:47:04 +00:00
Jun Bum Lim 6755c3bc5f [AArch64] Promote loads from stored
This is a recommit of r256004 which was reverted in r256160. The issue was the
incorrect promotion for half and byte loads transformed into mov instructions.
This fix will replace half and byte type loads only with bit field extracts.

Original commit message:

This change promotes load instructions which directly read from stored by
replacing them with mov instructions. If the store is wider than the load,
the load will be replaced with a bitfield extract.
For example :
  STRWui %W1, %X0, 1
  %W0 = LDRHHui %X0, 3
becomes
  STRWui %W1, %X0, 1
  %W0 = UBFMWri %W1, 16, 31

llvm-svn: 256249
2015-12-22 16:36:16 +00:00
Ed Maste 4d156ae0c8 Remove PC -1 offset from FreeBSD arm64 UpdateAfterBreakpoint
It was a copy-and-paste leftover.

llvm-svn: 256248
2015-12-22 15:57:21 +00:00
Daniel Jasper b542f9f144 clang-format: [JS] Support arrays of object-type literals.
Before:
  interface I {
    o: {}
    [];
  }

After:
  interface I {
    o: {}[];
  }

llvm-svn: 256247
2015-12-22 15:48:35 +00:00
Daniel Jasper e2deb59fa3 clang-format: [JS] Conservatively introduce column layout for JS array
initializers. For now, only use it for 20 items or more. Otherwise,
clang-format formats these one-per-line and thus increases the vertical
code size a lot.

llvm-svn: 256246
2015-12-22 15:48:15 +00:00
Daniel Jasper 72a1b6a5f2 clang-format: [JS] "operator" is not a keyword in Java/JavaScript.
llvm-svn: 256245
2015-12-22 15:47:56 +00:00
Tamas Berghammer cfcdbde3ce Don't pack the structs of the jit debug interface
None of the documentation mentions that the entries are packed structs
and also none of the other implementation I found pack them.

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

llvm-svn: 256244
2015-12-22 15:23:33 +00:00
Anastasia Stulova 76fd1052fd [OpenCL] Fix atomic Builtins check for address spaces of non-atomic pointer
If there are two pointers passed to an atomic Builtin, 
Clang doesn't allow the second (non-atomic) one to be qualified
with an address space.

Remove this restriction by recording the address space of passed pointers
in atomics type diagnostics.

llvm-svn: 256243
2015-12-22 15:14:54 +00:00
Chad Rosier a108010385 Typo. NFC.
llvm-svn: 256242
2015-12-22 15:06:47 +00:00
Logan Chien 338d6de5fa Fix ARM __cxa_end_cleanup() and gc-sections.
This commit adds SHF_ALLOC and SHF_EXECINSTR section flags to
`.text.__cxa_end_cleanup` section.  This fixes a link error when we are
using integrated-as and `ld.gold` (with `-Wl,--gc-sections` and
`-Wl,--fatal-warnings`.)

Detailed Explanation:

1. There might be some problem with LLVM integrated-as.  It is not
   emitting any section flags for text sections.  (This will be fixed in
   an independent commit.)

2. `ld.gold` will skip the external symbols in the section without
   SHF_ALLOC.  This is the reason why `.text.__cxa_end_cleanup_impl`
   section is discarded even though it is referenced by
   `__cxa_end_cleanup()`.

This commit workaround the problem by specifying the section flags
explicitly.

Fix http://llvm.org/PR21292

llvm-svn: 256241
2015-12-22 14:38:30 +00:00
Daniel Sanders 5176f7ea6b [mips] Add _GCC_HAVE_SYNC_COMPARE_AND_SWAP macros.
This fixes the 'pure virtual function called' failure with ThreadPool in a
clang-built clang. This fixes the llvm-mips-linux builder.

llvm-svn: 256240
2015-12-22 12:59:30 +00:00
Alexey Bataev 29c9209357 [OPENMP] Revert r256238 to fix the problem with tests on Linux.
llvm-svn: 256239
2015-12-22 12:44:46 +00:00
Alexey Bataev ef4c5584d5 [OPENMP 4.5] Parsing/sema for 'depend(sink:vec)' clause in 'ordered' directive.
OpenMP 4.5 adds 'depend(sink:vec)' in 'ordered' directive for doacross loop synchronization. Patch adds parsing and semantic analysis for this clause.

llvm-svn: 256238
2015-12-22 12:21:47 +00:00
Asaf Badouh 13ffa4bf7c [X86][AVX512] Add rcp14 and rsqrt14 intrinsics
Differential Revision: http://reviews.llvm.org/D15414

llvm-svn: 256237
2015-12-22 11:40:04 +00:00
Keno Fischer 4eccf11373 [ASMPrinter] Fix missing handling of DW_OP_bit_piece
In r256077, I added printing for DIExpressions in DEBUG_VALUE comments,
but neglected to handle DW_OP_bit_piece operands. Thanks to
Mikael Holmen and Joerg Sonnenberger for spotting this.

llvm-svn: 256236
2015-12-22 07:14:50 +00:00
Eric Christopher 49062a51b4 Pull out a bunch of duplicated option handling code into its own
function and use for the targets that can easily support it.

llvm-svn: 256230
2015-12-22 03:12:34 +00:00
Kostya Serebryany b0fb6e8508 [libFuzzer] add AFL-style dictionary for C++, remove the old file with tokens
llvm-svn: 256229
2015-12-22 01:50:51 +00:00
Eric Christopher 0746adeb86 Use -no-canonical-prefixes to make sure binaries names are easier to match.
llvm-svn: 256228
2015-12-22 01:45:45 +00:00
Tobias Grosser fcabb155c1 BlockGenerators: Remove unnecessary const_cast
llvm-svn: 256227
2015-12-22 01:41:25 +00:00
David Majnemer ff1d084aa2 [MC] Don't use the architecture to govern which object file format to use
InitMCObjectFileInfo was trying to override the triple in awkward ways.
For example, a triple specifying COFF but not Windows was forced as ELF.
This makes it easy for internal invariants to get violated, such as
those which triggered PR25912.

This fixes PR25912.

llvm-svn: 256226
2015-12-22 01:39:04 +00:00
Kostya Serebryany a9f3bc6d86 Partial fix for PR25912, see comment 13. Should fix the sanitizer bootstrap bot
llvm-svn: 256225
2015-12-22 01:18:49 +00:00
Teresa Johnson d213aa469e Handle empty Subprogram list when linking metadata.
Use an iterator that handles an empty subprogram list.

Fixes PR25915.

llvm-svn: 256224
2015-12-22 01:17:19 +00:00
Enrico Granata c3281bd05c No need for a custom function here; just use what C provides
llvm-svn: 256223
2015-12-22 00:47:36 +00:00