Commit Graph

218685 Commits

Author SHA1 Message Date
Dan Gohman 08d58bcf6a [WebAssembly] Add a TODO comment for a possible future optimization.
llvm-svn: 256306
2015-12-23 00:22:04 +00:00
Manuel Jacob a4efd8ac2e [RS4GC] Fix base pair printing for constants.
Previously, "%" + name of the value was printed for each derived and base
pointer.  This is correct for instructions, but wrong for e.g. globals.

llvm-svn: 256305
2015-12-23 00:19:45 +00:00
Akira Hatanaka 1cb242eb13 Provide a way to specify inliner's attribute compatibility and merging.
This reapplies r256277 with two changes:

- In emitFnAttrCompatCheck, change FuncName's type to std::string to fix
  a use-after-free bug.
- Remove an unnecessary install-local target in lib/IR/Makefile. 

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: 256304
2015-12-22 23:57:37 +00:00
Cong Hou 6a2c71af0b [BPI] Fix two potential divide-by-zero operations that are introduced in r256263.
llvm-svn: 256303
2015-12-22 23:45:55 +00:00
Rafael Espindola 240529892b Disable use list order on the gold plugin.
It turns out that his is *really* slow. With this change the link of
clang with plugin-opt=emit-llvm goes from 41 to 26 seconds.

We can add an option to enable it again if needed.

llvm-svn: 256302
2015-12-22 23:45:49 +00:00
Dan Gohman a2b2cdc813 [WebAssembly] Trim unneeded #includes. NFC.
llvm-svn: 256301
2015-12-22 23:45:21 +00:00
Dan Gohman cc38ba1954 [WebAssembly] Minor code simplification. NFC.
llvm-svn: 256300
2015-12-22 23:39:16 +00:00
Dan Gohman db70d015ad Add an OperandNamespace field to Target.td's Operand.
For targets to add their own operand types as needed, as advertised in
Operand's comment, they need to be able to specify an alternate namespace
for OperandType names too. This matches the RegisterOperand class.

llvm-svn: 256299
2015-12-22 23:37:37 +00:00
Michael Kruse 58fa3bb63a Do not store scalar accesses in InstructionToAccess
At code generation, scalar reads are generated before the other
statement's instructions, respectively scalar writes after them, in
contrast to array accesses which are "executed" with the instructions
they are linked to. Therefore it makes sense to not map the scalar
accesses to a place of execution. Follow-up patches will also remove
some of the directs links from a scalar access to a single instruction,
such that only having array accesses in InstructionToAccess ensures
consistency.

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

llvm-svn: 256298
2015-12-22 23:25:11 +00:00
Vedant Kumar cc8f47ebc2 [unittest] Use Support/thread.h instead of <thread> (second try)
llvm-svn: 256292
2015-12-22 23:12:41 +00:00
Nico Weber 134b103fc0 lit: Limit number of processes on Windows to 32.
llvm-svn: 256291
2015-12-22 23:12:00 +00:00
Vedant Kumar e3219b5e7b [unittest] Use Support/Thread.h instead of <thread> to fix the Windows build
llvm-svn: 256290
2015-12-22 23:09:08 +00:00
Rafael Espindola 5d7593bc59 Split Undefined and UndefinedElf.
I am working on adding LTO support to the new ELF lld.

In order to do that, it will be necessary to represent defined and
undefined symbols that are not from ELF files. One way to do it is to
change the symbol hierarchy to look like

Defined : SymbolBody
Undefined : SymbolBody

DefinedElf<ELFT> : Defined
UndefinedElf<ELFT> : Undefined

Another option would be to use bogus Elf_Sym, but I think that is
getting a bit too hackish.

This patch does the Undefined/UndefinedElf. Split. The next one
will do the Defined/DefinedElf split.

llvm-svn: 256289
2015-12-22 23:00:50 +00:00
Nico Weber b10423ad49 Disable include sorting by default for Chromium style.
Include sorting generally can break .cc files, especially on Windows.  Make
this opt-in for Chromium style to give us some more time to roll this out.

(Given that the Google style guide is used by many companies, some of them
probably writing code on Windows, one could argue this should be opt-in in
general...)

llvm-svn: 256288
2015-12-22 22:42:56 +00:00
Adrian Prantl a7f56ab893 Document that we recommend to turn off -gmodules when building a static
library for distribution to other machines on the clang man page.

llvm-svn: 256287
2015-12-22 22:37:22 +00:00
Nico Weber 54bfae8f52 Make wasm-toolchain.c test pass on Windows.
llvm-svn: 256286
2015-12-22 22:30:14 +00:00
Evgeniy Stepanov f02b782aa7 [cfi] Fix handling of uninstrumented libraries.
CFI shadow for non-CFI libraries should be "unchecked", not "invalid".

llvm-svn: 256285
2015-12-22 21:40:09 +00:00
Samuel Benzaquen 30747f72eb [ASTMatchers] Fix typo in booleanType() doc.
Fix typo in booleanType() doc and recreate the
LibASTMatchersReference.html reference document.

llvm-svn: 256284
2015-12-22 21:06:36 +00:00
Adrian McCarthy 46155dd7a9 Allow test decorators to use lists (and not_in(list)) for arches
Differential Revision: https://mail.google.com/mail/u/0/?zx=w4areffgjbgg#inbox/151cb6afe6169bb0

llvm-svn: 256283
2015-12-22 21:01:21 +00:00
Changpeng Fang b41574a961 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.

  NOTE: re-commit by fixing a failure in Codegen/AMDGPU/llvm.dbg.value.ll

Reviewers: tstellarAMD

Subscribers: arsenm, llvm-commits

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

llvm-svn: 256282
2015-12-22 20:55:23 +00:00
Rafael Espindola 10d9a033db Also add unnamed_addr to functions.
llvm-svn: 256281
2015-12-22 20:43:30 +00:00
Akira Hatanaka 9c05cc5670 Revert r256277 and r256279.
Some of the bots failed again.

llvm-svn: 256280
2015-12-22 20:29:09 +00:00
Akira Hatanaka 3f1bf25db1 Add a .td file I forgot to add in r256277.
llvm-svn: 256279
2015-12-22 20:06:50 +00:00
Samuel Benzaquen bd3232af03 [ASTMatchers] Add booleanType() matcher.
llvm-svn: 256278
2015-12-22 20:06:40 +00:00
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