platform/upstream/llvm.git
9 years agoDrop function that are deprecated since 2010.
Rafael Espindola [Thu, 17 Dec 2015 21:16:12 +0000 (21:16 +0000)]
Drop function that are deprecated since 2010.

These functions were deprecated in r97608.

llvm-svn: 255927

9 years agoTest commit
Dave Bartolomeo [Thu, 17 Dec 2015 20:54:16 +0000 (20:54 +0000)]
Test commit

llvm-svn: 255926

9 years ago[WebAssembly] Switch WebAssemblyMCAsmInfo.h from MCAsmInfo to MCAsmInfoELF.
Dan Gohman [Thu, 17 Dec 2015 20:50:45 +0000 (20:50 +0000)]
[WebAssembly] Switch WebAssemblyMCAsmInfo.h from MCAsmInfo to MCAsmInfoELF.

llvm-svn: 255925

9 years ago[docs] Motivate ninja in GettingStarted.rst
Vedant Kumar [Thu, 17 Dec 2015 20:49:48 +0000 (20:49 +0000)]
[docs] Motivate ninja in GettingStarted.rst

llvm-svn: 255924

9 years agoFix of a comment.
Roman Gareev [Thu, 17 Dec 2015 20:47:10 +0000 (20:47 +0000)]
Fix of a comment.

llvm-svn: 255923

9 years agoFix delinearization of fortran arrays
Roman Gareev [Thu, 17 Dec 2015 20:37:17 +0000 (20:37 +0000)]
Fix delinearization of fortran arrays

The patch fixes Bug 25759 produced by inappropriate handling of unsigned
maximum SCEV expressions by SCEVRemoveMax. Without a fix, we get an infinite
loop and a segmentation fault, if we try to process, for example,
'((-1 + (-1 * %b1)) umax {(-1 + (-1 * %yStart)),+,-1}<%.preheader>)'.
It also fixes a potential issue related to signed maximum SCEV expressions.

Tested-by: Roman Gareev <gareevroman@gmail.com>
Fixed-by: Tobias Grosser <tobias@grosser.es>
Differential Revision: http://reviews.llvm.org/D15563

llvm-svn: 255922

9 years ago[SCEV] Add and use SCEVConstant::getAPInt; NFCI
Sanjoy Das [Thu, 17 Dec 2015 20:28:46 +0000 (20:28 +0000)]
[SCEV] Add and use SCEVConstant::getAPInt; NFCI

llvm-svn: 255921

9 years ago[InstCombine] Adding "\n" to debug output. NFC.
Weiming Zhao [Thu, 17 Dec 2015 19:53:41 +0000 (19:53 +0000)]
[InstCombine] Adding "\n" to debug output. NFC.

Summary:
[InstCombine] Adding '\n' to debug output. NFC.

Patch by Zhaoshi Zheng <zhaoshiz@codeaurora.org>

Reviewers: apazos, majnemer, weimingz

Subscribers: arsenm, llvm-commits

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

llvm-svn: 255920

9 years agoHardcode the target in this testcase — it depends on the ABI.
Adrian Prantl [Thu, 17 Dec 2015 19:33:56 +0000 (19:33 +0000)]
Hardcode the target in this testcase — it depends on the ABI.
This fixes a failure on Windows buildbots.

llvm-svn: 255919

9 years agoAttach maximum function count to Module when using PGO mode.
Easwaran Raman [Thu, 17 Dec 2015 19:14:27 +0000 (19:14 +0000)]
Attach maximum function count to Module when using PGO mode.

This sets the maximum entry count among all functions in the program to the module using module flags. This allows the optimizer to use this information.

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

llvm-svn: 255918

9 years agoResultsFormatter: always lock on handle_event()
Todd Fiala [Thu, 17 Dec 2015 19:13:58 +0000 (19:13 +0000)]
ResultsFormatter: always lock on handle_event()

Some of the newer structures were not protected.  Now that we have
a recursive lock, we just lock the whole handle_event() call.

llvm-svn: 255917

9 years ago[x86] Filecheck is case sensitive. Capitalize directives.
Chad Rosier [Thu, 17 Dec 2015 19:01:55 +0000 (19:01 +0000)]
[x86] Filecheck is case sensitive.  Capitalize directives.

llvm-svn: 255916

9 years ago[x86] Filecheck is case sensitive. Capitalize directives.
Chad Rosier [Thu, 17 Dec 2015 18:54:42 +0000 (18:54 +0000)]
[x86] Filecheck is case sensitive.  Capitalize directives.

llvm-svn: 255915

9 years ago[EarlyCSE] DSE of atomic unordered stores
Philip Reames [Thu, 17 Dec 2015 18:50:50 +0000 (18:50 +0000)]
[EarlyCSE] DSE of atomic unordered stores

The rules for removing trivially dead stores are a lot less complicated than loads. Since we know the later store post dominates the former and the former dominates the later, unless the former has side effects other than the actual store, we can remove it. One slightly surprising thing is that we can freely remove atomic stores, even if the later one isn't atomic. There's no guarantee the atomic one was every visible.

For the moment, we don't handle DSE of ordered atomic stores. We could extend the same chain of reasoning to them, but the catch is we'd then have to model the ordering effect without a store instruction. Since our fences are a stronger than our operation orderings, simple using a fence isn't an obvious win. This arguable calls for a refinement in our fence specification, but that's (much) later work.

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

llvm-svn: 255914

9 years agomake this test less whitespace-sensitive.
Adrian Prantl [Thu, 17 Dec 2015 18:34:37 +0000 (18:34 +0000)]
make this test less whitespace-sensitive.

llvm-svn: 255913

9 years agoRewrite test to use llvm-dwarfdump instead of checking for asm comments.
Adrian Prantl [Thu, 17 Dec 2015 18:25:51 +0000 (18:25 +0000)]
Rewrite test to use llvm-dwarfdump instead of checking for asm comments.

llvm-svn: 255912

9 years ago[CUDA] Make vtable construction aware of host/device side of CUDA compilation.
Artem Belevich [Thu, 17 Dec 2015 18:12:36 +0000 (18:12 +0000)]
[CUDA] Make vtable construction aware of host/device side of CUDA compilation.

C++ emits vtables for classes that have key function present in the
current TU. While we compile CUDA the fact that key function was found
in this TU does not mean that we are going to generate code for it. E.g.
vtable for a class with host-only methods should not (and can not) be
generated on device side, because we'll never generate code for them
during device-side compilation.

This patch adds an extra CUDA-specific check during key method computation
and filters out potential key methods that are not suitable for this side
of CUDA compilation.

When we codegen vtable, entries for unsuitable methods are set to null.

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

llvm-svn: 255911

9 years ago[STATS] Properly guard the tick_time() function and its uses
Jonathan Peyton [Thu, 17 Dec 2015 17:27:51 +0000 (17:27 +0000)]
[STATS] Properly guard the tick_time() function and its uses

llvm-svn: 255910

9 years ago[ThinLTO] Metadata linking for imported functions
Teresa Johnson [Thu, 17 Dec 2015 17:14:09 +0000 (17:14 +0000)]
[ThinLTO] Metadata linking for imported functions

Summary:
Second patch split out from http://reviews.llvm.org/D14752.

Maps metadata as a post-pass from each module when importing complete,
suturing up final metadata to the temporary metadata left on the
imported instructions.

This entails saving the mapping from bitcode value id to temporary
metadata in the importing pass, and from bitcode value id to final
metadata during the metadata linking postpass.

Depends on D14825.

Reviewers: dexonsmith, joker.eph

Subscribers: davidxl, llvm-commits, joker.eph

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

llvm-svn: 255909

9 years agoAMDGPU/SI: Reserve appropriate number of sgprs for flat scratch init.
Tom Stellard [Thu, 17 Dec 2015 17:05:09 +0000 (17:05 +0000)]
AMDGPU/SI: Reserve appropriate number of  sgprs for flat scratch init.

Reviewers: tstellarAMD

Subscribers: arsenm, llvm-commits

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

Patch by: Changpeng Fang

llvm-svn: 255908

9 years ago[STATS] replace __cpuid() intrinsic with already existing __kmp_x86_cpuid() function
Jonathan Peyton [Thu, 17 Dec 2015 16:58:26 +0000 (16:58 +0000)]
[STATS] replace __cpuid() intrinsic with already existing __kmp_x86_cpuid() function

llvm-svn: 255907

9 years agoAMDGPU: Fix off-by-one in SIRegisterInfo::eliminateFrameIndex
Nicolai Haehnle [Thu, 17 Dec 2015 16:46:42 +0000 (16:46 +0000)]
AMDGPU: Fix off-by-one in SIRegisterInfo::eliminateFrameIndex

Summary:
The method insertNOPs expected the number of wait states to be passed as
parameter, while eliminateFrameIndex passed the immediate argument for the
S_NOP, leading to an off-by-one error. Rename the method to make the
meaning of its parameter clearer. The number of 4 / 5 wait states (which
is what the method has always _tried_ to do according to the comment) is
correct according to the hardware docs.

I stumbled upon this while trying to track down the cause of
https://bugs.freedesktop.org/show_bug.cgi?id=93264. While clearly needed,
this patch unfortunately does not fix that bug...

Reviewers: arsenm, tstellarAMD

Subscribers: arsenm, llvm-commits

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

llvm-svn: 255906

9 years agoRevert r254592 (virtual dtor in SCEVPredicate).
Andy Gibbs [Thu, 17 Dec 2015 16:43:53 +0000 (16:43 +0000)]
Revert r254592 (virtual dtor in SCEVPredicate).

Clang has better diagnostics in this case.  It is not necessary therefore
to change the destructor to avoid what is effectively an invalid warning
in gcc.  Instead, better handle the warning flags given to the compiler.

llvm-svn: 255905

9 years ago[RenderScript] Support all RS allocation types
Ewan Crawford [Thu, 17 Dec 2015 16:40:05 +0000 (16:40 +0000)]
[RenderScript] Support all RS allocation types

Currently we can just inspect the details of the most common allocation types.
This patch allows us to support all the types defined by the RS runtime in its `RsDataType` enum.
Including handlers, matrices and packed graphical data.

llvm-svn: 255904

9 years agoMark a couple ModuleLinker member functions as const (NFC)
Teresa Johnson [Thu, 17 Dec 2015 16:34:53 +0000 (16:34 +0000)]
Mark a couple ModuleLinker member functions as const (NFC)

llvm-svn: 255903

9 years agoAvoid explicit relocation sorting most of the time.
Rafael Espindola [Thu, 17 Dec 2015 16:22:06 +0000 (16:22 +0000)]
Avoid explicit relocation sorting most of the time.

These days relocations are created and stored in a deterministic way.
The order they are created is also suitable for the .o file, so we don't
need an explicit sort.

The last remaining exception is MIPS.

llvm-svn: 255902

9 years ago[STATS] Fix stats lock problem to be compatible with new hinted lock code
Jonathan Peyton [Thu, 17 Dec 2015 16:19:05 +0000 (16:19 +0000)]
[STATS] Fix stats lock problem to be compatible with new hinted lock code

llvm-svn: 255901

9 years ago[STATS] Add libm.so to lib dependencies for stats library
Jonathan Peyton [Thu, 17 Dec 2015 16:15:39 +0000 (16:15 +0000)]
[STATS] Add libm.so to lib dependencies for stats library

llvm-svn: 255900

9 years agoRevert "[AArch64] Enable PostRAScheduler for AArch64 generic build"
Rafael Espindola [Thu, 17 Dec 2015 15:12:26 +0000 (15:12 +0000)]
Revert "[AArch64] Enable PostRAScheduler for AArch64 generic build"

This reverts commit r255896. It broke the tests.

llvm-svn: 255899

9 years agoAlways sort by offset first. NFC.
Rafael Espindola [Thu, 17 Dec 2015 15:08:24 +0000 (15:08 +0000)]
Always sort by offset first. NFC.

Every target changing sortRelocs was first calling the parent
implementation. Just run that first.

llvm-svn: 255898

9 years agoFix unused variable warning in release builds. NFC.
Diego Novillo [Thu, 17 Dec 2015 14:58:34 +0000 (14:58 +0000)]
Fix unused variable warning in release builds. NFC.

llvm-svn: 255897

9 years ago[AArch64] Enable PostRAScheduler for AArch64 generic build
MinSeong Kim [Thu, 17 Dec 2015 14:51:22 +0000 (14:51 +0000)]
[AArch64] Enable PostRAScheduler for AArch64 generic build

This patch enables PostRAScheduler specifically for AArch64 generic build,
which is beneficial from the performance perspective.
Speedups up to 2 to 7% for some benchmarks on A57 and A53 are observed.
Also benchmarks from LLVM test-suite did not regress.

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

llvm-svn: 255896

9 years ago[AArch64] Add DAG combine for extract extend pattern
Matthew Simpson [Thu, 17 Dec 2015 14:30:55 +0000 (14:30 +0000)]
[AArch64] Add DAG combine for extract extend pattern

This patch adds a DAG combine for (any_extend (extract_vector_elt v, i)) ->
(extract_vector_elt v, i). The combine enables us to better match some SMOV
patterns.

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

llvm-svn: 255895

9 years agoSimplify. NFC.
Rafael Espindola [Thu, 17 Dec 2015 14:19:52 +0000 (14:19 +0000)]
Simplify. NFC.

llvm-svn: 255894

9 years agoPatch cmake to allow detection of python 2.7.9+
Aidan Dodds [Thu, 17 Dec 2015 14:13:39 +0000 (14:13 +0000)]
Patch cmake to allow detection of python 2.7.9+

Some distributions of python have their version defined as follows in patchlevel.h (note the '+'):
#define PY_VERSION "2.7.9+"
The '+' char needs to be stripped by the cmake regex so that LLDBs python lib detection is successful.

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

llvm-svn: 255893

9 years agoFix formatting
Tobias Grosser [Thu, 17 Dec 2015 13:04:30 +0000 (13:04 +0000)]
Fix formatting

llvm-svn: 255892

9 years agoScopGraphPrinter: Only show functions that contain at least one scop
Tobias Grosser [Thu, 17 Dec 2015 12:55:26 +0000 (12:55 +0000)]
ScopGraphPrinter: Only show functions that contain at least one scop

When running 'clang -O3 -mllvm -polly -mllvm -polly-show' we now only show the
CFGs of functions with at least one detected scop. For larger files/projects
this reduces the number of graphs printed significantly and is likely what
developers want to see. The new option -polly-view-all enforces all graphs to be
printed and the exiting option -poll-view-only limites the graph printing to
functions that match a certain pattern.

This patch requires https://llvm.org/svn/llvm-project/llvm/trunk@255889 (and
vice versa) to compile correctly.

llvm-svn: 255891

9 years ago[ms-inline-asm] Add support for composite structs in MS inline asm
Marina Yatsina [Thu, 17 Dec 2015 12:51:51 +0000 (12:51 +0000)]
[ms-inline-asm] Add support for composite structs in MS inline asm

Add MS inline asm support for structs that contain fields that are also structs.

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

llvm-svn: 255890

9 years agoDOTGraphTraits: Allow the decision to show a graph to consider the analysis
Tobias Grosser [Thu, 17 Dec 2015 12:48:25 +0000 (12:48 +0000)]
DOTGraphTraits: Allow the decision to show a graph to consider the analysis

The method processFunction() is called to decide if a graph should be shown for
a certain function. To allow DOTGraphTraitViewers to take this decision based
on the analysis results for the given function, we forward a reference to the
analysis result. This will be used by Polly to only visualize functions where
interesting loop regions have been detected.

llvm-svn: 255889

9 years agoRemoved empty directory.
Alexander Kornienko [Thu, 17 Dec 2015 12:19:05 +0000 (12:19 +0000)]
Removed empty directory.

llvm-svn: 255888

9 years agoInspect DW_AT_const_value global static const variables
Ewan Crawford [Thu, 17 Dec 2015 11:59:47 +0000 (11:59 +0000)]
Inspect DW_AT_const_value global static const variables

This patch adds support for printing global static const variables which are given a DW_AT_const_value DWARF tag by clang.

Fix for bug https://llvm.org/bugs/show_bug.cgi?id=25653

Reviewers: clayborg, tberghammer
Subscribers: emaste, lldb-commits
Differential Revision: http://reviews.llvm.org/D15576

llvm-svn: 255887

9 years agoRemove clang-modernize.
Alexander Kornienko [Thu, 17 Dec 2015 11:49:19 +0000 (11:49 +0000)]
Remove clang-modernize.

Summary:
clang-modernize transforms have moved to clang-tidy. Removing
the old tool now.

Reviewers: klimek

Subscribers: cfe-commits

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

llvm-svn: 255886

9 years agoXFAIL some tests failing for Windows -> Android
Tamas Berghammer [Thu, 17 Dec 2015 10:58:35 +0000 (10:58 +0000)]
XFAIL some tests failing for Windows -> Android

llvm-svn: 255885

9 years ago[ELF] - implemented @indntpoff (x86) relocation and its optimization.
George Rimar [Thu, 17 Dec 2015 09:32:21 +0000 (09:32 +0000)]
[ELF] - implemented @indntpoff (x86) relocation and its optimization.

@indntpoff is similar to @gotntpoff, but for use in position dependent code. While @gotntpoff resolves to GOT slot address relative to the
start of the GOT in the movl or addl instructions, @indntpoff resolves to the
absolute GOT slot address. ("ELF Handling For Thread-Local Storage", Ulrich Drepper).

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

llvm-svn: 255884

9 years ago[ELF] - implement support of extended length field for CIE/FDE records of eh_frame.
George Rimar [Thu, 17 Dec 2015 09:23:40 +0000 (09:23 +0000)]
[ELF] - implement support of extended length field for CIE/FDE records of eh_frame.

Ian Lance Taylor writes: "Read 4 bytes. If they are not 0xffffffff, they are the length of the CIE or FDE record. Otherwise the next 64 bits holds the length, and this is a 64-bit DWARF format. This is like .debug_frame." (http://www.airs.com/blog/archives/460), that also consistent with spec (https://refspecs.linuxfoundation.org/LSB_3.0.0/LSB-PDA/LSB-PDA/ehframechpt.html).

Patch implements support of described extended length field and also adds few more checks for safety.

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

llvm-svn: 255883

9 years agoAdd AccessModifierOffset to clang-format style
Pavel Labath [Thu, 17 Dec 2015 09:19:36 +0000 (09:19 +0000)]
Add AccessModifierOffset to clang-format style

Summary:
As we override the indent option of the LLVM style, we need to override the access modifier
offset as well. Otherwise, classes will be formatted like such
class A
{
  public:
    int foo;
};
which is not used anywhere in LLDB. This option makes clang-format style more similar to LLDB and
brings it closer to the original intention of LLVM style, which was to not indent access
modifiers.

Reviewers: zturner, tfiala

Subscribers: lldb-commits

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

llvm-svn: 255882

9 years ago[X86] Add option for enabling LEA optimization pass, by Andrey Turetsky
Alexey Bataev [Thu, 17 Dec 2015 07:34:39 +0000 (07:34 +0000)]
[X86] Add option for enabling LEA optimization pass, by Andrey Turetsky
Add option to enable/disable LEA optimization pass. By default the pass is disabled.
Differential Revision: http://reviews.llvm.org/D15573

llvm-svn: 255881

9 years agotest infra: force rerun to use parallel runner
Todd Fiala [Thu, 17 Dec 2015 06:55:50 +0000 (06:55 +0000)]
test infra: force rerun to use parallel runner

We've now seen the rerun test phase hang in a few
scenarios.  Eliminate the serial test runner (which
is not exercised nearly as much as the others), by
using a multi-worker test runner strategy with a single
worker.  This should rule out whether this is related
to the serial test runner strategy.

llvm-svn: 255880

9 years ago[OPENMP] Fix for http://llvm.org/PR25142: openmp: Assertion failed: DD && "queried...
Alexey Bataev [Thu, 17 Dec 2015 06:55:08 +0000 (06:55 +0000)]
[OPENMP] Fix for llvm.org/PR25142: openmp: Assertion failed: DD && "queried property of class with no definition", file AST/DeclCXX.h
Added processing for template specialization during data-sharing attributes analysis

llvm-svn: 255879

9 years ago[WebAssembly] Convert WebAssemblyTargetObjectFile to TargetLoweringObjectFileELF
Dan Gohman [Thu, 17 Dec 2015 04:55:44 +0000 (04:55 +0000)]
[WebAssembly] Convert WebAssemblyTargetObjectFile to TargetLoweringObjectFileELF

llvm-svn: 255877

9 years agoAdd QualType case to operator< for DynTypedNode.
Richard Trieu [Thu, 17 Dec 2015 04:46:48 +0000 (04:46 +0000)]
Add QualType case to operator< for DynTypedNode.

This allows sorting DynTypedNode's which are QualType's since QualType does
not have memoization.

llvm-svn: 255875

9 years agoAArch64: Simplify emitEpilogue() and related code; NFC
Matthias Braun [Thu, 17 Dec 2015 03:18:47 +0000 (03:18 +0000)]
AArch64: Simplify emitEpilogue() and related code; NFC

This is in preparation to an upcoming patch.

llvm-svn: 255872

9 years ago[llvm-objdump] Use report_fatal_error() for a more uniform error handling.
Davide Italiano [Thu, 17 Dec 2015 01:59:50 +0000 (01:59 +0000)]
[llvm-objdump] Use report_fatal_error() for a more uniform error handling.

llvm-svn: 255871

9 years agoELF: Avoid string concatenation if there's no error.
Rui Ueyama [Thu, 17 Dec 2015 01:51:23 +0000 (01:51 +0000)]
ELF: Avoid string concatenation if there's no error.

llvm-svn: 255870

9 years ago[WebAssembly] Experimental ELF writer support
Dan Gohman [Thu, 17 Dec 2015 01:39:00 +0000 (01:39 +0000)]
[WebAssembly] Experimental ELF writer support

This creates the initial infrastructure for writing ELF output files. It
doesn't yet have any implementation for encoding instructions.

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

llvm-svn: 255869

9 years agoSet the minimum stack size for private state thread to 8MB
Kate Stone [Thu, 17 Dec 2015 01:37:00 +0000 (01:37 +0000)]
Set the minimum stack size for private state thread to 8MB

Demangling complex Boost symbols can exhaust the default stack size.  In practice, any thread that calls into LLDB functionality that touches symbols runs this risk.  Guaranteeing a reasonable minimum for our own private state thread addressees some known scenarios debugging processes that make use of cpp-netlib.

llvm-svn: 255868

9 years agoFix PR25838.
Cong Hou [Thu, 17 Dec 2015 01:29:08 +0000 (01:29 +0000)]
Fix PR25838.

This is a quick fix to PR25838. The issue comes from the restriction that we
cannot normalize probabilities containing both known and unknown ones. A patch
that removes this restriction is under the review now:

http://reviews.llvm.org/D15548

llvm-svn: 255867

9 years agoELF: Rename relocNeedsCopy -> needsCopyRel
Rui Ueyama [Thu, 17 Dec 2015 01:18:40 +0000 (01:18 +0000)]
ELF: Rename relocNeedsCopy -> needsCopyRel

Just "copy" was a bit too ambiguous to say about copy relocations.

llvm-svn: 255866

9 years agoELF: Separate NeedsCopy and OffsetInBSS.
Rui Ueyama [Thu, 17 Dec 2015 01:14:23 +0000 (01:14 +0000)]
ELF: Separate NeedsCopy and OffsetInBSS.

Previously, OffsetInBSS is -1 if it has no information about copy
relocation, 0 if it needs a copy relocation, and >0 if its offset
in BSS has been assigned. These flags were too subtle. This patch
adds a new flag, NeedsCopy, to carry information about whether
a shared symbol needs a copy relocation or not.

llvm-svn: 255865

9 years agoDon't demangle a name when Mangled::GetName() is called with ePreferMangled. Only...
Greg Clayton [Thu, 17 Dec 2015 01:00:50 +0000 (01:00 +0000)]
Don't demangle a name when Mangled::GetName() is called with ePreferMangled. Only demangle if this isn't the the value for the "preference" argument indicating the user wants the demangled name. This will stop a lot of symbols from being demangled when parsing the symbol table in ObjectFileMachO.

llvm-svn: 255864

9 years agoDon't strip types of their typedefs when getting function types.
Greg Clayton [Thu, 17 Dec 2015 00:58:41 +0000 (00:58 +0000)]
Don't strip types of their typedefs when getting function types.

llvm-svn: 255863

9 years ago[PGO] InstrPGO and coverage code refactoring (NFC)
Xinliang David Li [Thu, 17 Dec 2015 00:53:37 +0000 (00:53 +0000)]
[PGO] InstrPGO and coverage code refactoring (NFC)

Introduce a new class InstrProfSymtab to abstract
the PGO symbol table for prof and coverage reader.
The symtab is is to lookup function's PGO name
using function keys. The first user of the class
is CoverageMapping Reader. More will follow.

llvm-svn: 255862

9 years agoAdd comment about DefinedSynthetic class.
Rui Ueyama [Thu, 17 Dec 2015 00:48:16 +0000 (00:48 +0000)]
Add comment about DefinedSynthetic class.

llvm-svn: 255861

9 years ago[TLS on Darwin] use CXX_FAST_TLS calling convention for access functions.
Manman Ren [Thu, 17 Dec 2015 00:42:36 +0000 (00:42 +0000)]
[TLS on Darwin] use CXX_FAST_TLS calling convention for access functions.

Also set nounwind attribute.

rdar://problem/9001553

llvm-svn: 255860

9 years ago[analyzer] Better detect when C++ object was constructed into existing region.
Devin Coughlin [Thu, 17 Dec 2015 00:28:33 +0000 (00:28 +0000)]
[analyzer] Better detect when C++ object was constructed into existing region.

When the analyzer evaluates a CXXConstructExpr, it looks ahead in the CFG for
the current block to detect what region the object should be constructed into.
If the constructor was directly constructed into a local variable or field
region then there is no need to explicitly bind the constructed value to
the local or field when analyzing the DeclStmt or CXXCtorInitializer that
called the constructor.

Unfortunately, there were situations in which the CXXConstructExpr was
constructed into a temporary region but when evaluating the corresponding
DeclStmt or CXXCtorInitializer the analyzer assumed the object was constructed
into the local or field. This led to spurious warnings about uninitialized
values (PR25777).

To avoid these false positives, this commit factors out the logic for
determining when a CXXConstructExpr will be directly constructed into existing
storage, adds the inverse logic to detect when the corresponding later bind can
be safely skipped, and adds assertions to make sure these two checks are in
sync.

rdar://problem/21947725

llvm-svn: 255859

9 years agoWebAssembly: update expected torture test failures
JF Bastien [Thu, 17 Dec 2015 00:12:06 +0000 (00:12 +0000)]
WebAssembly: update expected torture test failures

We now have 240 expected failures.

llvm-svn: 255858

9 years agoELF: Remove accessors that don't hide anything.
Rui Ueyama [Thu, 17 Dec 2015 00:12:04 +0000 (00:12 +0000)]
ELF: Remove accessors that don't hide anything.

llvm-svn: 255857

9 years agoELF: Rename IsTLS -> IsTls for consistency with other identifiers containing 'TLS'.
Rui Ueyama [Thu, 17 Dec 2015 00:12:03 +0000 (00:12 +0000)]
ELF: Rename IsTLS -> IsTls for consistency with other identifiers containing 'TLS'.

llvm-svn: 255856

9 years agoELF: Rename isTLS -> isTls for consistency.
Rui Ueyama [Thu, 17 Dec 2015 00:04:18 +0000 (00:04 +0000)]
ELF: Rename isTLS -> isTls for consistency.

llvm-svn: 255855

9 years agoELF: Remove a dumb constructor.
Rui Ueyama [Thu, 17 Dec 2015 00:01:25 +0000 (00:01 +0000)]
ELF: Remove a dumb constructor.

Symbol is a struct and can be initialized using an initializer.

llvm-svn: 255854

9 years agoTypedef uintX_t at beginning of a function just like others.
Rui Ueyama [Wed, 16 Dec 2015 23:49:19 +0000 (23:49 +0000)]
Typedef uintX_t at beginning of a function just like others.

llvm-svn: 255853

9 years agoUse std::unique_ptr. NFC.
Rafael Espindola [Wed, 16 Dec 2015 23:49:14 +0000 (23:49 +0000)]
Use std::unique_ptr. NFC.

llvm-svn: 255852

9 years agoAdd CMake option LIBCXX_CONFIGURE_IDE to allow for other IDE's.
Eric Fiselier [Wed, 16 Dec 2015 23:41:05 +0000 (23:41 +0000)]
Add CMake option LIBCXX_CONFIGURE_IDE to allow for other IDE's.

CLion needs similar configuration changes as MSVC_IDE and XCODE.

llvm-svn: 255851

9 years agoELF: Move shouldUseRela to Writer.cpp.
Rui Ueyama [Wed, 16 Dec 2015 23:33:56 +0000 (23:33 +0000)]
ELF: Move shouldUseRela to Writer.cpp.

The function was used only in Writer.cpp and did not depend on SymbolTable.
There is no reason to have that function in SymbolTable.cpp.

llvm-svn: 255850

9 years agoELF: Make checkCompatibility a non-member function.
Rui Ueyama [Wed, 16 Dec 2015 23:31:22 +0000 (23:31 +0000)]
ELF: Make checkCompatibility a non-member function.

Because the function does not use any member of SymbolTable class.

llvm-svn: 255849

9 years ago[WebAssembly] Initial linking support.
Dan Gohman [Wed, 16 Dec 2015 23:30:41 +0000 (23:30 +0000)]
[WebAssembly] Initial linking support.

This begins minimal support for invoking 'ld' from clang for WebAssembly
targets.

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

llvm-svn: 255848

9 years ago[WebAssembly] Fix legalization of shift operators on large integer types.
Dan Gohman [Wed, 16 Dec 2015 23:25:51 +0000 (23:25 +0000)]
[WebAssembly] Fix legalization of shift operators on large integer types.

llvm-svn: 255847

9 years agoSimplify. NFC.
Rui Ueyama [Wed, 16 Dec 2015 23:25:31 +0000 (23:25 +0000)]
Simplify. NFC.

llvm-svn: 255846

9 years agoELF: Remove duplicate code.
Rui Ueyama [Wed, 16 Dec 2015 23:23:14 +0000 (23:23 +0000)]
ELF: Remove duplicate code.

We had duplicate code that were called before addMemberFile.
This patch makes them to be called at beginning of addMemberFile.

llvm-svn: 255845

9 years ago[WebAssembly] Implement eliminateCallFramePseudo
Derek Schuff [Wed, 16 Dec 2015 23:21:30 +0000 (23:21 +0000)]
[WebAssembly] Implement eliminateCallFramePseudo

Summary:
Implement eliminateCallFramePsuedo to handle ADJCALLSTACKUP/DOWN
pseudo-instructions. Add a test calling a vararg function which causes non-0
adjustments. This revealed an issue with RegisterCoalescer wherein it
eliminates a COPY from SP32 to a vreg but failes to update the live ranges
of EXPR_STACK, causing a machineinstr verifier failure (so this test
is commented out).

Also add a dynamic alloca test, which causes a callseq_end dag node with
a 0 (instead of undef) second argument to be generated. We currently fail to
select that, so adjust the ADJCALLSTACKUP tablegen code to handle it.

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

llvm-svn: 255844

9 years agoUpdate for llvm api change.
Rafael Espindola [Wed, 16 Dec 2015 23:16:37 +0000 (23:16 +0000)]
Update for llvm api change.

llvm-svn: 255843

9 years agoChange linkInModule to take a std::unique_ptr.
Rafael Espindola [Wed, 16 Dec 2015 23:16:33 +0000 (23:16 +0000)]
Change linkInModule to take a std::unique_ptr.

Passing in a std::unique_ptr should help find errors when the module
is used after being linked into another module.

llvm-svn: 255842

9 years agoFix funciton->function typo.
Eric Christopher [Wed, 16 Dec 2015 23:10:53 +0000 (23:10 +0000)]
Fix funciton->function typo.

llvm-svn: 255841

9 years agoFix funciton->function typo.
Eric Christopher [Wed, 16 Dec 2015 23:10:46 +0000 (23:10 +0000)]
Fix funciton->function typo.

llvm-svn: 255840

9 years agoELF: Remove SymbolTable::addELFFile.
Rui Ueyama [Wed, 16 Dec 2015 22:59:13 +0000 (22:59 +0000)]
ELF: Remove SymbolTable::addELFFile.

addELFFile was called only from addFile, and what it did was actually
just adding a file to the symbol table. There seems to be no reason
to separate the two.

llvm-svn: 255839

9 years agoUpdate for llvm API change.
Rafael Espindola [Wed, 16 Dec 2015 22:59:09 +0000 (22:59 +0000)]
Update for llvm API change.

llvm-svn: 255838

9 years agoDrop an unnecessary use of writev.
Rafael Espindola [Wed, 16 Dec 2015 22:59:06 +0000 (22:59 +0000)]
Drop an unnecessary use of writev.

It looks like the code this patch deletes is based on a misunderstanding of
what guarantees writev provides. In particular, writev with 1 iovec is
not "more atomic" than a write.

Testing on OS X shows that both write and writev from multiple processes
can be intermixed.

llvm-svn: 255837

9 years ago[AArch64] Simplify some TRI/TII getters. NFC.
Ahmed Bougacha [Wed, 16 Dec 2015 22:54:06 +0000 (22:54 +0000)]
[AArch64] Simplify some TRI/TII getters. NFC.

We don't need static_casts when we use the right Subtarget.

llvm-svn: 255836

9 years agoFix negDelta32 relocatable fixups for arm64 in mach-o.
Pete Cooper [Wed, 16 Dec 2015 22:50:16 +0000 (22:50 +0000)]
Fix negDelta32 relocatable fixups for arm64 in mach-o.

negDelta32 is only ever implicitly generated as the FDE->CIE reference.
We therefore don't emit a relocation for it in the object file in -r mode.

The value we write in to the FDE location therefore needs to point to the
final target address of the CIE, and not the inAtomAddress as it was currently
doing.

llvm-svn: 255835

9 years agoMove llvm/test/DebugInfo/live-debug-values.ll into X86, due to target triple.
NAKAMURA Takumi [Wed, 16 Dec 2015 22:44:10 +0000 (22:44 +0000)]
Move llvm/test/DebugInfo/live-debug-values.ll into X86, due to target triple.

llvm-svn: 255834

9 years agoDo not omit * from auto.
Rui Ueyama [Wed, 16 Dec 2015 22:36:10 +0000 (22:36 +0000)]
Do not omit * from auto.

We don't do that in other places in the same file.

llvm-svn: 255833

9 years agoELF: Drop 'Sym' suffix from member function names for consistency.
Rui Ueyama [Wed, 16 Dec 2015 22:31:14 +0000 (22:31 +0000)]
ELF: Drop 'Sym' suffix from member function names for consistency.

Since the functions are members of SymbolTable class, it is obvious
that they are adding symbols.

llvm-svn: 255832

9 years agoSimplify memory management with std::unique_ptr.
Rafael Espindola [Wed, 16 Dec 2015 22:28:34 +0000 (22:28 +0000)]
Simplify memory management with std::unique_ptr.

llvm-svn: 255831

9 years agoELF: Factor out common code. NFC.
Rui Ueyama [Wed, 16 Dec 2015 22:26:48 +0000 (22:26 +0000)]
ELF: Factor out common code. NFC.

llvm-svn: 255830

9 years agoELF: Separate error message generation from call of error() or warning().
Rui Ueyama [Wed, 16 Dec 2015 22:26:45 +0000 (22:26 +0000)]
ELF: Separate error message generation from call of error() or warning().

Previously reportConflict returned only when the third argument is false.
Now it always returns a value.

llvm-svn: 255829

9 years ago[CodeGen] Make MachineInstrBuilder::copyImplicitOps const. NFC.
Ahmed Bougacha [Wed, 16 Dec 2015 22:15:30 +0000 (22:15 +0000)]
[CodeGen] Make MachineInstrBuilder::copyImplicitOps const. NFC.

This matches the other MIB methods, none of which modify the builder.
Without this, we can't chain copyImplicitOps.
Also reformat the few users, in PPCEarlyReturn.

llvm-svn: 255828

9 years agoFix CFI tests in sanitizer-ld.
Evgeniy Stepanov [Wed, 16 Dec 2015 22:03:39 +0000 (22:03 +0000)]
Fix CFI tests in sanitizer-ld.

This test is not testing what it is supposed to test because of a
mixup with the CHECK lines.

llvm-svn: 255827

9 years agoAdd more debugging output to MachO lld. NFC.
Pete Cooper [Wed, 16 Dec 2015 22:03:21 +0000 (22:03 +0000)]
Add more debugging output to MachO lld.  NFC.

In debug builds there's now a dump method on Section and improved
printing of atoms.

llvm-svn: 255826

9 years ago[PGO] Handle and report overflow during profile merge for all types of data
Nathan Slingerland [Wed, 16 Dec 2015 21:45:43 +0000 (21:45 +0000)]
[PGO] Handle and report overflow during profile merge for all types of data

Summary: Surface counter overflow when merging profile data. Merging still occurs on overflow but counts saturate to the maximum representable value. Overflow is reported to the user.

Reviewers: davidxl, dnovillo, silvas

Subscribers: llvm-commits

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

llvm-svn: 255825

9 years agoUse LLVM style variable name (NFC)
Teresa Johnson [Wed, 16 Dec 2015 21:37:48 +0000 (21:37 +0000)]
Use LLVM style variable name (NFC)

Fixes variable name from r255779.

llvm-svn: 255824