platform/upstream/llvm.git
9 years agoUpdate TODO list.
Johannes Doerfert [Wed, 11 Feb 2015 18:18:19 +0000 (18:18 +0000)]
Update TODO list.

llvm-svn: 228858

9 years ago[X86][SSE] Added dual vector truncation tests.
Simon Pilgrim [Wed, 11 Feb 2015 18:14:35 +0000 (18:14 +0000)]
[X86][SSE] Added dual vector truncation tests.

llvm-svn: 228857

9 years agoAdd missing check for LLDB_DISABLE_PYTHON in FormatManager
Tamas Berghammer [Wed, 11 Feb 2015 17:51:49 +0000 (17:51 +0000)]
Add missing check for LLDB_DISABLE_PYTHON in FormatManager

llvm-svn: 228856

9 years agoFix PR19351. While building up a composite type it is important to use
Adrian Prantl [Wed, 11 Feb 2015 17:45:15 +0000 (17:45 +0000)]
Fix PR19351. While building up a composite type it is important to use
a non-uniqueable temporary node that is only turned into a permanent
unique or distinct node after it is finished.
Otherwise an intermediate node may get accidentally uniqued with another
node as illustrated by the testcase.

Paired commit with LLVM.

llvm-svn: 228855

9 years agoAllow DIBuilder::replaceVTableHolder() to work with temporary nodes,
Adrian Prantl [Wed, 11 Feb 2015 17:45:10 +0000 (17:45 +0000)]
Allow DIBuilder::replaceVTableHolder() to work with temporary nodes,
tested via the clang test CodeGenCXX/vtable-holder-self-reference.cpp .

llvm-svn: 228854

9 years agoAdd a trackIfUnresolved to DIBuilder::createInheritance(),
Adrian Prantl [Wed, 11 Feb 2015 17:45:08 +0000 (17:45 +0000)]
Add a trackIfUnresolved to DIBuilder::createInheritance(),
tested via the clang test CodeGenCXX/vtable-holder-self-reference.cpp .

llvm-svn: 228853

9 years agoGeneralize DIBuilder's createReplaceableForwardDecl() to a more flexible
Adrian Prantl [Wed, 11 Feb 2015 17:45:05 +0000 (17:45 +0000)]
Generalize DIBuilder's createReplaceableForwardDecl() to a more flexible
createReplaceableCompositeType() that allows to create non-forward-declared
temporary nodes.

Paired commit with CFE.

llvm-svn: 228852

9 years agoAdd early exits for SCoPs we did not optimize
Johannes Doerfert [Wed, 11 Feb 2015 17:25:09 +0000 (17:25 +0000)]
Add early exits for SCoPs we did not optimize

  This allows us to skip ast and code generation if we did not optimize
  a SCoP and will not generate parallel or alias annotations. The
  initial heuristic to exit is simple but allows improvements later on.

  All failing test cases have been modified to disable early exit, thus
  to keep their coverage.

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

llvm-svn: 228851

9 years agoR600: Split AMDGPUPassConfig into R600PassConfig and GCNPassConfig
Tom Stellard [Wed, 11 Feb 2015 17:11:51 +0000 (17:11 +0000)]
R600: Split AMDGPUPassConfig into R600PassConfig and GCNPassConfig

llvm-svn: 228850

9 years agoR600: Create an R600TargetMachine for pre-gcn GPUs
Tom Stellard [Wed, 11 Feb 2015 17:11:50 +0000 (17:11 +0000)]
R600: Create an R600TargetMachine for pre-gcn GPUs

No functinality change. R600TargetMachine inherits from
AMDGPUTargetMachine.

llvm-svn: 228849

9 years agoR600/SI: Fix -march in test
Tom Stellard [Wed, 11 Feb 2015 17:11:48 +0000 (17:11 +0000)]
R600/SI: Fix -march in test

llvm-svn: 228848

9 years agoModel scalar writes with uses outside the SCoP
Johannes Doerfert [Wed, 11 Feb 2015 17:02:52 +0000 (17:02 +0000)]
Model scalar writes with uses outside the SCoP

  These write are important as they will force the scheduling and code
  generation of an otherwise trivial statement and also impose an order of
  execution needed to guarantee the correct final value for a scalar in a loop.

  Added test case modeled after ClamAV/clamscan.

llvm-svn: 228847

9 years agoAdded -block-check-header-list-only option. This is a work-around for private includ...
John Thompson [Wed, 11 Feb 2015 16:58:36 +0000 (16:58 +0000)]
Added -block-check-header-list-only option.  This is a work-around for private includes that purposefully get included inside blocks.

llvm-svn: 228846

9 years agoCentralize canonical path conversion.
John Thompson [Wed, 11 Feb 2015 16:45:50 +0000 (16:45 +0000)]
Centralize canonical path conversion.

llvm-svn: 228845

9 years agoLock mutex in the same order.
Hafiz Abid Qadeer [Wed, 11 Feb 2015 16:37:17 +0000 (16:37 +0000)]
Lock mutex in the same order.
SBProcess uses 2 mutexex; RunLock and APILock. Apart from 2 places, RunLock
is locked before API lock. I have fixed the 2 places where order was different.
I observed a deadlock due to this different order in lldb-mi once. Although
lldb-mi command and event thread dont run at the same time now. So it can not deadlock
there but can still be problem for some other clients.

Pre-approved by Greg in http://lists.cs.uiuc.edu/pipermail/lldb-dev/2015-February/006509.html

llvm-svn: 228844

9 years agoChange some template parameter names from _C and _N to _Cont and _Sz. No functionalit...
Marshall Clow [Wed, 11 Feb 2015 16:14:01 +0000 (16:14 +0000)]
Change some template parameter names from _C and _N to _Cont and _Sz. No functionality change.

llvm-svn: 228843

9 years agoGold-plugin: Broaden scope of get/release_input_file to scope of Module.
Jan Wen Voung [Wed, 11 Feb 2015 16:12:50 +0000 (16:12 +0000)]
Gold-plugin: Broaden scope of get/release_input_file to scope of Module.

Summary:
Move calls to get_input_file and release_input_file out of
getModuleForFile(). Otherwise release_input_file may end up
unmapping a view of the file while the view is still being
used by the Module (on 32-bit hosts).

Fix for PR22482.

Test Plan: Add test using --no-map-whole-files.

Reviewers: rafael, nlewycky

Subscribers: llvm-commits

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

llvm-svn: 228842

9 years agoFix SelectionDAG compile time issue with alias analysis.
Jonas Paulsson [Wed, 11 Feb 2015 16:10:31 +0000 (16:10 +0000)]
Fix SelectionDAG compile time issue with alias analysis.

Add new token factor node and its users to worklist if alias analysis is
turned on, in DAGCombiner::visitTokenFactor(). Alias analysis may cause
a lot of new token factors to be inserted into the DAG, and they need to
be optimized to avoid significant slow-downs.

Reviewed by Hal Finkel.

llvm-svn: 228841

9 years agoNeed to wrap a bit in an ifdef, since there are no initializer_lists in C++03
Marshall Clow [Wed, 11 Feb 2015 15:48:21 +0000 (15:48 +0000)]
Need to wrap a bit in an ifdef, since there are no initializer_lists in C++03

llvm-svn: 228840

9 years agoFix PR 22541: When values are equal, minmax should return the rightmost one in the...
Marshall Clow [Wed, 11 Feb 2015 15:41:34 +0000 (15:41 +0000)]
Fix PR 22541: When values are equal, minmax should return the rightmost one in the initializer_list

llvm-svn: 228839

9 years ago[ASan] Print out a diagnostic when a global is unregistered
Timur Iskhodzhanov [Wed, 11 Feb 2015 15:21:09 +0000 (15:21 +0000)]
[ASan] Print out a diagnostic when a global is unregistered

llvm-svn: 228838

9 years ago[ELF][ARM] Fix veneer symbol names in Release build
Denis Protivensky [Wed, 11 Feb 2015 15:02:43 +0000 (15:02 +0000)]
[ELF][ARM] Fix veneer symbol names in Release build

The fix is for r228680.
This makes tests also work.

llvm-svn: 228837

9 years agofixed to test features, not CPUs
Sanjay Patel [Wed, 11 Feb 2015 15:00:41 +0000 (15:00 +0000)]
fixed to test features, not CPUs

llvm-svn: 228836

9 years agofixed to test features, not CPUs
Sanjay Patel [Wed, 11 Feb 2015 15:00:19 +0000 (15:00 +0000)]
fixed to test features, not CPUs

llvm-svn: 228835

9 years agofixed to test features, not CPUs
Sanjay Patel [Wed, 11 Feb 2015 14:58:25 +0000 (14:58 +0000)]
fixed to test features, not CPUs

llvm-svn: 228834

9 years agoAllow signed devision in access functions
Johannes Doerfert [Wed, 11 Feb 2015 14:54:50 +0000 (14:54 +0000)]
Allow signed devision in access functions

llvm-svn: 228833

9 years ago[FIX] Special case for branch users of scalar values
Johannes Doerfert [Wed, 11 Feb 2015 14:52:52 +0000 (14:52 +0000)]
[FIX] Special case for branch users of scalar values

llvm-svn: 228832

9 years agoDon't repeat name in comment and clang-format a function.
Rafael Espindola [Wed, 11 Feb 2015 14:44:17 +0000 (14:44 +0000)]
Don't repeat name in comment and clang-format a function.

llvm-svn: 228831

9 years agoR600/SI: Enable a lot of existing tests for VI (squashed commits)
Marek Olsak [Wed, 11 Feb 2015 14:26:46 +0000 (14:26 +0000)]
R600/SI: Enable a lot of existing tests for VI (squashed commits)

This is a union of these commits:

* R600/SI: Enable more tests for VI which need no changes

* R600/SI: Enable V_BCNT tests for VI
    Differences:
    - v_bcnt_..._e32 -> _e64
    - s_load_dword* inline offset is in bytes instead of dwords

* R600/SI: Enable all tests for VI which use S_LOAD_DWORD
    The inline offset is changed from dwords to bytes.

* R600/SI: Enable LDS tests for VI
    Differences:
    - the s_load_dword inline offset changed from dwords to bytes
    - the tests checked very little on CI, so they have been fixed to check all
      instructions that "SI" checked

* R600/SI: Enable lshr tests for VI

* R600/SI: Fix divrem64 tests
    - "v_lshl_64" was missing "b" before "64"
    - added VI-NOT checks

* R600/SI: Enable the SI.tid test for VI

* R600/SI: Enable the frem test for VI
    Also, the frem_f64 checking is added for CI-VI.

* R600/SI: Add VI tests for rsq.clamped

llvm-svn: 228830

9 years ago[TTI] Improved cost heuristic for cttz/ctlz calls.
Andrea Di Biagio [Wed, 11 Feb 2015 14:22:18 +0000 (14:22 +0000)]
[TTI] Improved cost heuristic for cttz/ctlz calls.

This patch is a follow-up of r228826 (see code-review: D7506).

Now that SimplifyCFG uses TargetTransformInfo for cost analysis, we
have to fix the cost heuristic for intrinsic calls to cttz/ctlz.

This patch defines method 'getIntrinsicCost' in BasicTTIImpl: now, BasicTTIImpl
queries TLI to check if a call to cttz/ctlz is cheap for the target.

Added test cases in Transforms/SimplifyCFG/X86 to verify that on x86,
SimplifyCFG only speculates a call to cttz/ctlz if it is cheap.

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

llvm-svn: 228829

9 years agoFix windows build (broken by r228823)
Tamas Berghammer [Wed, 11 Feb 2015 12:52:55 +0000 (12:52 +0000)]
Fix windows build (broken by r228823)

llvm-svn: 228828

9 years agoMake buildbots better.
James Molloy [Wed, 11 Feb 2015 12:24:09 +0000 (12:24 +0000)]
Make buildbots better.

This testcase change was associated incorrectly to a followup commit in my git tree, not the base commit. Sorry!

llvm-svn: 228827

9 years ago[SimplifyCFG] Swap to using TargetTransformInfo for cost
James Molloy [Wed, 11 Feb 2015 12:15:41 +0000 (12:15 +0000)]
[SimplifyCFG] Swap to using TargetTransformInfo for cost
 analysis.

We're already using TTI in SimplifyCFG, so remove the hard-baked "cheapness"
heuristic and use TTI directly. Generally NFC intended, but we're using a slightly
different heuristic now so there is a slight test churn.

Test changes:
  * combine-comparisons-by-cse.ll: Removed unneeded branch check.
  * 2014-08-04-muls-it.ll: Test now doesn't branch but emits muleq.
  * coalesce-subregs.ll: Superfluous block check.
  * 2008-01-02-hoist-fp-add.ll: fadd is safe to speculate. Change to udiv.
  * PhiBlockMerge.ll: Superfluous CFG checking code. Main checks still present.
  * select-gep.ll: A variable GEP is not expensive, just TCC_Basic, according to the TTI.

llvm-svn: 228826

9 years ago[mips] Merge disassemblers into a single implementation.
Daniel Sanders [Wed, 11 Feb 2015 11:28:56 +0000 (11:28 +0000)]
[mips] Merge disassemblers into a single implementation.

Summary:
Currently we have Mips32 and Mips64 disassemblers and this causes the target
triple to affect the disassembly despite all the relevant information being in
the ELF header. These implementations do not need to be separate.

This patch merges them together such that the appropriate tables are checked
for the subtarget (e.g. Mips64 is checked when GP64 is enabled).

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

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

llvm-svn: 228825

9 years agoAdd extra check that target was stopped before the *stopped is sent.
Ilia K [Wed, 11 Feb 2015 11:24:20 +0000 (11:24 +0000)]
Add extra check that target was stopped before the *stopped is sent.

This patch fixes r228417. It's required because eStateCrushed case wasn't investigated.

llvm-svn: 228824

9 years agoSeparate monolithic GDBRemoteCommunicationServer class into 4 part
Tamas Berghammer [Wed, 11 Feb 2015 10:29:30 +0000 (10:29 +0000)]
Separate monolithic GDBRemoteCommunicationServer class into 4 part

GDBRemoteCommunicationServer: Basic packet handling, handler registration
LLDBCommonPacketHandler: Common packet handling for lldb-platform and lldb-gdbserver
LLDBPlatformPacketHandler: lldb-platform specific packet handling
LLGSPacketHandler: lldb-gdbserver specific packet handling

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

llvm-svn: 228823

9 years agoFix Mingw build.
Hafiz Abid Qadeer [Wed, 11 Feb 2015 10:14:13 +0000 (10:14 +0000)]
Fix Mingw build.

Following changes are done.

Add missing headers.
Replace _snprintf with snprintf. It is already changed to _snprintf for MSVC.
Add a file in the build for autoconf.
Call DynamicLoaderWindows::Terminate and DynamicLoaderWindows::Initialize only for MSVC build.

Reviewed in http://reviews.llvm.org/D7536.

llvm-svn: 228822

9 years ago[LoopReroll] Introduce the concept of DAGRootSets.
James Molloy [Wed, 11 Feb 2015 09:19:47 +0000 (09:19 +0000)]
[LoopReroll] Introduce the concept of DAGRootSets.

A DAGRootSet models an induction variable being used in a rerollable
loop. For example:

   x[i*3+0] = y1
   x[i*3+1] = y2
   x[i*3+2] = y3

   Base instruction -> i*3
                    +---+----+
                   /    |     \
               ST[y1]  +1     +2  <-- Roots
                        |      |
                      ST[y2] ST[y3]

There may be multiple DAGRootSets, for example:

   x[i*2+0] = ...   (1)
   x[i*2+1] = ...   (1)
   x[i*2+4] = ...   (2)
   x[i*2+5] = ...   (2)
   x[(i+1234)*2+5678] = ... (3)
   x[(i+1234)*2+5679] = ... (3)

This concept is similar to the "Scale" member used previously, but allows
multiple independent sets of roots based off the same induction variable.

llvm-svn: 228821

9 years agoAsmParser: Validate alloca's type
David Majnemer [Wed, 11 Feb 2015 09:13:11 +0000 (09:13 +0000)]
AsmParser: Validate alloca's type

An alloca's type should be weird things like metadata.

llvm-svn: 228820

9 years agoDataLayout: Report when the preferred alignment is less than the ABI
David Majnemer [Wed, 11 Feb 2015 09:13:09 +0000 (09:13 +0000)]
DataLayout: Report when the preferred alignment is less than the ABI

llvm-svn: 228819

9 years agoVerifier: Check for null operands in !llvm.module.flags
David Majnemer [Wed, 11 Feb 2015 09:13:06 +0000 (09:13 +0000)]
Verifier: Check for null operands in !llvm.module.flags

llvm-svn: 228818

9 years ago[X86] Split information collection from actual transformation in call frame optimization
Michael Kuperstein [Wed, 11 Feb 2015 08:53:55 +0000 (08:53 +0000)]
[X86] Split information collection from actual transformation in call frame optimization

This splits collecting information from actually performing the transformation, so that we can add a heuristic in between the two.
NFC.

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

llvm-svn: 228817

9 years ago[PBQP] Cautiously update edge costs in the solver
Arnaud A. de Grandmaison [Wed, 11 Feb 2015 08:25:36 +0000 (08:25 +0000)]
[PBQP] Cautiously update edge costs in the solver

The NodeMetadata are maintained in an incremental way. When an edge between
2 nodes has its cost updated, in the course of graph reduction for example,
the NodeMetadata need first to have the old edge cost removed, then the new
edge cost added. Only once the NodeMetadata have been fully updated, it
becomes safe to consider promoting the nodes to the
ConservativelyAllocatable or OptimallyReducible sets. Previously, this
promotion was occuring right after the removing the old cost, and this was
breaking the assumption that a ConservativelyAllocatable should not be
spilled.

This patch also adds asserts to:
 - enforces the invariant that a node's reduction can not be downgraded,
 - only not provably allocatable or optimally reducible nodes can be spilled.

llvm-svn: 228816

9 years agoVerifier: Make sure !llvm.ident's operand isn't null
David Majnemer [Wed, 11 Feb 2015 08:23:20 +0000 (08:23 +0000)]
Verifier: Make sure !llvm.ident's operand isn't null

llvm-svn: 228815

9 years agoFix amount of diagnostic classes
Alex Denisov [Wed, 11 Feb 2015 07:56:16 +0000 (07:56 +0000)]
Fix amount of diagnostic classes

llvm-svn: 228814

9 years agoAsmParser: Don't crash when insertvalue has bad operands
David Majnemer [Wed, 11 Feb 2015 07:43:58 +0000 (07:43 +0000)]
AsmParser: Don't crash when insertvalue has bad operands

llvm-svn: 228813

9 years agoAsmParser: Switch some vectors to maps
David Majnemer [Wed, 11 Feb 2015 07:43:56 +0000 (07:43 +0000)]
AsmParser: Switch some vectors to maps

This speeds up parsing .ll files with metadata nodes with large IDs.

llvm-svn: 228812

9 years agoFix build for CMake < 2.8.12.
Peter Collingbourne [Wed, 11 Feb 2015 05:58:57 +0000 (05:58 +0000)]
Fix build for CMake < 2.8.12.

llvm-svn: 228810

9 years agounwind: tweak inclusion ordering to work around GCC
Saleem Abdulrasool [Wed, 11 Feb 2015 05:20:53 +0000 (05:20 +0000)]
unwind: tweak inclusion ordering to work around GCC

This is a slightly convoluted workaround.  GCC does not support the
__has_feature extension of clang, and this results in some issues with
static_asserts.  config.h defines static_assert as a macro with a C-specific
trickery.  This then propagates into the C++ headers included after config.h,
which are used with C++11 mode, enabling constexpr constructors.  The macro'ed
static_assert does not get treated as the static_assert builtin, and will cause
an error due to a non-empty constexpr constructor.  Tweaking the include order
permits the use of libc++ headers to build libunwind with GCC on Linux.

llvm-svn: 228809

9 years agounwind: clean up some -Werror=return-type warnings
Saleem Abdulrasool [Wed, 11 Feb 2015 05:20:50 +0000 (05:20 +0000)]
unwind: clean up some -Werror=return-type warnings

Mark that the functions always return or abort if the register class is
unhandled.  Avoid placing the abort in the switch to permit -Wswitch-cover to
catch missing values.

llvm-svn: 228808

9 years agounwind: clean up more -Wformat warnings
Saleem Abdulrasool [Wed, 11 Feb 2015 05:20:47 +0000 (05:20 +0000)]
unwind: clean up more -Wformat warnings

This makes compilation on ARM -Wformat clean with GCC.  NFC.

llvm-svn: 228807

9 years agounwind: clean up straggling -Wundef warning
Saleem Abdulrasool [Wed, 11 Feb 2015 05:20:44 +0000 (05:20 +0000)]
unwind: clean up straggling -Wundef warning

Conservatively define __ARM_ARCH to 4 in the case that it is undefined (e.g.
with GCC).

llvm-svn: 228806

9 years agounwind: silence -Wconversion warnings
Saleem Abdulrasool [Wed, 11 Feb 2015 05:20:42 +0000 (05:20 +0000)]
unwind: silence -Wconversion warnings

Clean up implicit uint8_t to uint32_t conversion warnings identified by GCC.

llvm-svn: 228805

9 years agoClean up test/tools/lldb-mi/TestMiNotification.py (MI)
Ilia K [Wed, 11 Feb 2015 05:02:44 +0000 (05:02 +0000)]
Clean up test/tools/lldb-mi/TestMiNotification.py (MI)

llvm-svn: 228804

9 years agoFix segfault notification in lldb-mi
Ilia K [Wed, 11 Feb 2015 04:58:41 +0000 (04:58 +0000)]
Fix segfault notification in lldb-mi

Summary:
This patch adds system exception handling in lldb-mi + tests.

All tests pass on OS X.

Reviewers: zturner, abidh, clayborg

Reviewed By: clayborg

Subscribers: emaste, lldb-commits, zturner, clayborg, abidh

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

llvm-svn: 228803

9 years agoFix CMIUtilString::SplitConsiderQuotes (MI)
Ilia K [Wed, 11 Feb 2015 04:52:54 +0000 (04:52 +0000)]
Fix CMIUtilString::SplitConsiderQuotes (MI)

Summary:
This method doesn't work properly. Here is an example:
```
CMIUtilString test("\"hello\" \"\\\" world \\\" !\"");
CMIUtilString::VecString_t res;
test.SplitConsiderQuotes(" ", res);
```

Before this patch the result was as following:
```
(lldb) print res
(CMIUtilString::VecString_t) $1 = size=4 {
  [0] = (std::__1::string = "\"hello\"")
  [1] = (std::__1::string = "\"\\\"")
  [2] = (std::__1::string = "world")
  [3] = (std::__1::string = "\\\" !\"")
}
```

This patch fixes that error and now it looks like following:
```
(lldb) print res
(CMIUtilString::VecString_t) $1 = size=2 {
  [0] = (std::__1::string = "\"hello\"")
  [1] = (std::__1::string = "\"\\\" world \\\" !\"")
}
```

Reviewers: abidh, emaste, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits, emaste, clayborg, abidh

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

llvm-svn: 228802

9 years agoClose terminal after LaunchInTerminalTestCase test
Ilia K [Wed, 11 Feb 2015 04:51:41 +0000 (04:51 +0000)]
Close terminal after LaunchInTerminalTestCase test

Summary:
The test_launch_in_terminal test leaves a running terminal.
This patch adds "exit" after debugging with eLaunchFlagLaunchInTTY flag.

Reviewers: jingham, zturner, clayborg

Reviewed By: clayborg

Subscribers: emaste, vharron, lldb-commits, clayborg, jingham, zturner

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

llvm-svn: 228801

9 years agoUse ADDITIONAL_HEADER_DIRS in all LLVM CMake projects.
Zachary Turner [Wed, 11 Feb 2015 03:28:02 +0000 (03:28 +0000)]
Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects.

This allows IDEs to recognize the entire set of header files for
each of the core LLVM projects.

Differential Revision: http://reviews.llvm.org/D7526
Reviewed By: Chris Bieneman

llvm-svn: 228798

9 years agoRevert "[UBSan] Enable -Wglobal-constructors."
Justin Bogner [Wed, 11 Feb 2015 03:05:02 +0000 (03:05 +0000)]
Revert "[UBSan] Enable -Wglobal-constructors."

We're still using global constructors when not on linux, so this was
causing warnings on Darwin. Reverting for now.

This reverts r228384.

llvm-svn: 228795

9 years agoInstrProf: Add a test for PR22531
Justin Bogner [Wed, 11 Feb 2015 02:53:03 +0000 (02:53 +0000)]
InstrProf: Add a test for PR22531

This is a test for the llvm change in r228793. We need to make sure
that names referred to by coverage end up in the right section, or the
coverage tools won't work.

llvm-svn: 228794

9 years agoInstrProf: Lower coverage mappings by setting their sections appropriately
Justin Bogner [Wed, 11 Feb 2015 02:52:44 +0000 (02:52 +0000)]
InstrProf: Lower coverage mappings by setting their sections appropriately

Add handling for __llvm_coverage_mapping to the InstrProfiling
pass. We need to make sure the constant and any profile names it
refers to are in the correct sections, which is easier and cleaner to
do here where we have to know about profiling sections anyway.

This is really tricky to test without a frontend, so I'm committing
the test for the fix in clang. If anyone knows a good way to test this
within LLVM, please let me know.

Fixes PR22531.

llvm-svn: 228793

9 years agoAdd a warning for direct-list-initialization of a variable with a deduced type
Richard Smith [Wed, 11 Feb 2015 02:41:33 +0000 (02:41 +0000)]
Add a warning for direct-list-initialization of a variable with a deduced type
(or of a lambda init-capture, which is sort-of such a variable). The semantics
of such constructs will change when we implement N3922, so we intend to warn on
this in Clang 3.6 then change the semantics in Clang 3.7.

llvm-svn: 228792

9 years agoIntroduce the notion of "runtime support values"
Enrico Granata [Wed, 11 Feb 2015 02:35:39 +0000 (02:35 +0000)]
Introduce the notion of "runtime support values"

A runtime support value is a ValueObject whose only purpose is to support some language runtime's operation, but it does not directly provide any user-visible benefit
As such, unless the user is working on the runtime support, it is mostly safe for them not to see such a value when debugging

It is a language runtime's job to check whether a ValueObject is a support value, and that - in conjunction with a target setting - is used by frame variable and target variable
SBFrame::GetVariables gets a new overload with yet another flag to dictate whether to return those support values to the caller - that which defaults to the setting's value

rdar://problem/15539930

llvm-svn: 228791

9 years agoTemporary workaround to fix MSVC 2012 build problems
Andrew Kaylor [Wed, 11 Feb 2015 02:16:34 +0000 (02:16 +0000)]
Temporary workaround to fix MSVC 2012 build problems

llvm-svn: 228788

9 years agoFix invalid LLVM IR in PruneEH tests
Reid Kleckner [Wed, 11 Feb 2015 02:06:47 +0000 (02:06 +0000)]
Fix invalid LLVM IR in PruneEH tests

llvm-svn: 228786

9 years agoPR21857: weaken an incorrect assertion.
Richard Smith [Wed, 11 Feb 2015 01:48:47 +0000 (01:48 +0000)]
PR21857: weaken an incorrect assertion.

llvm-svn: 228785

9 years agoUpdate double_include.sh.cpp for new headers.
Eric Fiselier [Wed, 11 Feb 2015 01:31:02 +0000 (01:31 +0000)]
Update double_include.sh.cpp for new headers.

llvm-svn: 228784

9 years agolibc++ tests: wait_until.pass test sporadically fails (bug 21998)
Eric Fiselier [Wed, 11 Feb 2015 01:25:57 +0000 (01:25 +0000)]
libc++ tests: wait_until.pass test sporadically fails (bug 21998)

Summary:
Hello Howard,

While running the libc++ tests on our ARM boards, we encounter sporadic failures of the two tests:
test/std/thread/futures/futures.shared_future/wait_until.pass.cpp
test/std/thread/futures/futures.unique_future/wait_until.pass.cpp

The worker thread might not finish yet when the main thread checks its result.
I filed the bug 21998 for this case: http://llvm.org/bugs/show_bug.cgi?id=21998

Would you be able to review this please?
Thank you.
Oleg

Reviewers: howard.hinnant, mclow.lists, danalbert, jroelofs, EricWF

Reviewed By: jroelofs, EricWF

Subscribers: EricWF, mclow.lists, aemerson, llvm-commits

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

llvm-svn: 228783

9 years agoDon't promote asynch EH invokes of nounwind functions to calls
Reid Kleckner [Wed, 11 Feb 2015 01:23:16 +0000 (01:23 +0000)]
Don't promote asynch EH invokes of nounwind functions to calls

If the landingpad of the invoke is using a personality function that
catches asynch exceptions, then it can catch a trap.

Also add some landingpads to invalid LLVM IR test cases that lack them.

Over-the-shoulder reviewed by David Majnemer.

llvm-svn: 228782

9 years agoMake convert_to_integral.pass.cpp more platform generic.
Eric Fiselier [Wed, 11 Feb 2015 01:18:05 +0000 (01:18 +0000)]
Make convert_to_integral.pass.cpp more platform generic.

Don't depend on the underlying types of enums and wchar_t.

llvm-svn: 228781

9 years agoFix libcxxabi's library and object root for tests.
Eric Fiselier [Wed, 11 Feb 2015 01:07:48 +0000 (01:07 +0000)]
Fix libcxxabi's library and object root for tests.

llvm-svn: 228779

9 years agoRemove default definition for libcxx_obj_dir because it doesn't make sense
Eric Fiselier [Wed, 11 Feb 2015 01:03:44 +0000 (01:03 +0000)]
Remove default definition for libcxx_obj_dir because it doesn't make sense

llvm-svn: 228778

9 years agoAs part of the cleanup when a process dies, tell watchpoints to forget their previous...
Enrico Granata [Wed, 11 Feb 2015 00:37:54 +0000 (00:37 +0000)]
As part of the cleanup when a process dies, tell watchpoints to forget their previously recorded values

Because types are not reliably protected against the death of their owners, having ValueObjects lurking around like that past the useful lifetime of their owner processes is a potential source of crashes
That is - in itself - worth fixing at some point, but for this case, watchpoints holding on to old values don't offer enough value to make the larger fix worth

Fixes rdar://19788756

llvm-svn: 228777

9 years agoR600/SI: Store immediate offsets > 12-bits in soffset
Tom Stellard [Wed, 11 Feb 2015 00:34:35 +0000 (00:34 +0000)]
R600/SI: Store immediate offsets > 12-bits in soffset

This will save us from having to extend these offsets to 64-bits
and storing them in a pair of vgprs.

llvm-svn: 228776

9 years agoR600/SI: Add soffset operand to mubuf addr64 instruction
Tom Stellard [Wed, 11 Feb 2015 00:34:32 +0000 (00:34 +0000)]
R600/SI: Add soffset operand to mubuf addr64 instruction

We were previously hard-coding soffset to 0.

llvm-svn: 228775

9 years agoFix warning due to unused private member variable.
Zachary Turner [Wed, 11 Feb 2015 00:33:00 +0000 (00:33 +0000)]
Fix warning due to unused private member variable.

llvm-svn: 228774

9 years agoFix some warnings due to -Wcovered-switch-default.
Zachary Turner [Wed, 11 Feb 2015 00:13:39 +0000 (00:13 +0000)]
Fix some warnings due to -Wcovered-switch-default.

llvm-svn: 228773

9 years ago[UBSan] Add report deduplication for -fsanitize=function.
Alexey Samsonov [Wed, 11 Feb 2015 00:05:31 +0000 (00:05 +0000)]
[UBSan] Add report deduplication for -fsanitize=function.

Summary:
Make sure we don't print the error report from -fsanitize=function
twice for the same source location, as we do in another UBSan handlers.

Test Plan: check-ubsan test suite

Reviewers: rsmith, pcc

Reviewed By: pcc

Subscribers: llvm-commits

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

llvm-svn: 228772

9 years agoFixed a crasher that could happen if:
Greg Clayton [Wed, 11 Feb 2015 00:04:33 +0000 (00:04 +0000)]
Fixed a crasher that could happen if:
- you have a type that contains a typedef to a VectorType or an ExtVectorType
- that type is returned from an ARM function that LLDB steps over so we try to figure out the return type
- we try to determine if the type is a homogeneous aggregate type and we crash

We get not using getAs() when we should have been and using llvm::cast caused an assertion crash when the typedef type didn't return a valid VectorType or ExtVectorType.

<rdar://problem/19646550>

llvm-svn: 228771

9 years agoAdded CoreMedia.cpp to CMakeLists.txt for egranata.
Chaoren Lin [Wed, 11 Feb 2015 00:00:39 +0000 (00:00 +0000)]
Added CoreMedia.cpp to CMakeLists.txt for egranata.

llvm-svn: 228770

9 years agoEmit landing pads for SEH even if nounwind is present
Reid Kleckner [Wed, 11 Feb 2015 00:00:21 +0000 (00:00 +0000)]
Emit landing pads for SEH even if nounwind is present

Disabling exceptions applies nounwind to lots of functions. SEH catches
asynch exceptions, so emit the landing pad anyway.

llvm-svn: 228769

9 years agoConvert std::make_unique<> to llvm::make_unique<>.
Zachary Turner [Tue, 10 Feb 2015 23:46:48 +0000 (23:46 +0000)]
Convert std::make_unique<> to llvm::make_unique<>.

llvm-svn: 228768

9 years ago[mips] Add __clear_cache() definition for non-Android systems
Petar Jovanovic [Tue, 10 Feb 2015 23:36:19 +0000 (23:36 +0000)]
[mips] Add __clear_cache() definition for non-Android systems

Make sure clear_cache() builtin has an appropriate definition for Linux.
Call syscall(NR_cacheflush, ...).

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

llvm-svn: 228767

9 years agoAdd the missing testcase for r228764.
Adrian Prantl [Tue, 10 Feb 2015 23:32:56 +0000 (23:32 +0000)]
Add the missing testcase for r228764.

llvm-svn: 228766

9 years agoFix makeLibCall argument (signed) in SoftenFloatRes_XINT_TO_FP function
Petar Jovanovic [Tue, 10 Feb 2015 23:30:14 +0000 (23:30 +0000)]
Fix makeLibCall argument (signed) in SoftenFloatRes_XINT_TO_FP function

The isSigned argument of makeLibCall function was hard-coded to false
(unsigned). This caused zero extension on MIPS64 soft float.
As the result SingleSource/Benchmarks/Stanford/FloatMM test and
SingleSource/UnitTests/2005-07-17-INT-To-FP test failed.
The solution was to use the proper argument.

Patch by Strahinja Petrovic.

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

llvm-svn: 228765

9 years agoDebug Info: Support variables that are described by more than one MMI
Adrian Prantl [Tue, 10 Feb 2015 23:18:28 +0000 (23:18 +0000)]
Debug Info: Support variables that are described by more than one MMI
table entry. This happens when SROA splits up an alloca and the resulting
allocas cannot be lowered to SSA values because their address is passed
to a function.

Fixes PR22502.

llvm-svn: 228764

9 years agoFix indentation.
Adrian Prantl [Tue, 10 Feb 2015 23:18:15 +0000 (23:18 +0000)]
Fix indentation.

llvm-svn: 228763

9 years agoFix a couple typos in the previous commit
Enrico Granata [Tue, 10 Feb 2015 23:17:07 +0000 (23:17 +0000)]
Fix a couple typos in the previous commit

llvm-svn: 228762

9 years agoEarlyCSE: Add check lines for test added in r228760
David Majnemer [Tue, 10 Feb 2015 23:11:02 +0000 (23:11 +0000)]
EarlyCSE: Add check lines for test added in r228760

llvm-svn: 228761

9 years agoEarlyCSE: It isn't safe to CSE across synchronization boundaries
David Majnemer [Tue, 10 Feb 2015 23:09:43 +0000 (23:09 +0000)]
EarlyCSE: It isn't safe to CSE across synchronization boundaries

This fixes PR22514.

llvm-svn: 228760

9 years agoAdd an LLDB summary for CMTime. Fixes rdar://15370376
Enrico Granata [Tue, 10 Feb 2015 23:02:25 +0000 (23:02 +0000)]
Add an LLDB summary for CMTime. Fixes rdar://15370376

llvm-svn: 228759

9 years agoAdd missing function and header include.
Zachary Turner [Tue, 10 Feb 2015 22:56:21 +0000 (22:56 +0000)]
Add missing function and header include.

llvm-svn: 228758

9 years agoExtract attach core logic from SBTarget::Attach* methods into unified SBTarget::Attac...
Oleksiy Vyalov [Tue, 10 Feb 2015 22:49:57 +0000 (22:49 +0000)]
Extract attach core logic from SBTarget::Attach* methods into unified SBTarget::AttachToProcess and make it work with platform for remote attach purposes.

http://reviews.llvm.org/D7471

llvm-svn: 228757

9 years agoOops. Don't call Windows functions on non-windows.
Zachary Turner [Tue, 10 Feb 2015 22:47:14 +0000 (22:47 +0000)]
Oops.  Don't call Windows functions on non-windows.

llvm-svn: 228756

9 years agoRewrite llvm-pdbdump in terms of LLVMDebugInfoPDB.
Zachary Turner [Tue, 10 Feb 2015 22:43:25 +0000 (22:43 +0000)]
Rewrite llvm-pdbdump in terms of LLVMDebugInfoPDB.

This makes llvm-pdbdump available on all platforms, although it
will currently fail to create a dumper if there is no PDB reader
implementation for the current platform.

It implements dumping of compilands and children, which is less
information than was previously available, but it has to be
rewritten from scratch using the new set of interfaces, so the
rest of the functionality will be added back in subsequent commits.

llvm-svn: 228755

9 years agoX86: @llvm.frameaddress should defer to SelectionDAG for Win CFI
David Majnemer [Tue, 10 Feb 2015 22:00:34 +0000 (22:00 +0000)]
X86: @llvm.frameaddress should defer to SelectionDAG for Win CFI

llvm-svn: 228754

9 years agoGNU: Rename parseZOption because it actually parses only -z max-page-size.
Rui Ueyama [Tue, 10 Feb 2015 21:40:51 +0000 (21:40 +0000)]
GNU: Rename parseZOption because it actually parses only -z max-page-size.

llvm-svn: 228753

9 years agoFix build due to mismatched function signatures.
Zachary Turner [Tue, 10 Feb 2015 21:40:29 +0000 (21:40 +0000)]
Fix build due to mismatched function signatures.

llvm-svn: 228752

9 years ago[Object] Reformat the code with clang-format
Simon Atanasyan [Tue, 10 Feb 2015 21:38:25 +0000 (21:38 +0000)]
[Object] Reformat the code with clang-format

No functional changes.

llvm-svn: 228751

9 years agoUnittest: Do s/_context/_ctx/g.
Rui Ueyama [Tue, 10 Feb 2015 21:28:52 +0000 (21:28 +0000)]
Unittest: Do s/_context/_ctx/g.

llvm-svn: 228750