Commit Graph

193191 Commits

Author SHA1 Message Date
Marshall Clow 88d21343df Change some template parameter names from _C and _N to _Cont and _Sz. No functionality change.
llvm-svn: 228843
2015-02-11 16:14:01 +00:00
Jan Wen Voung c11b45a2ea 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
2015-02-11 16:12:50 +00:00
Jonas Paulsson bf8d0cc699 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
2015-02-11 16:10:31 +00:00
Marshall Clow 5f15a8b959 Need to wrap a bit in an ifdef, since there are no initializer_lists in C++03
llvm-svn: 228840
2015-02-11 15:48:21 +00:00
Marshall Clow 002144f61d Fix PR 22541: When values are equal, minmax should return the rightmost one in the initializer_list
llvm-svn: 228839
2015-02-11 15:41:34 +00:00
Timur Iskhodzhanov 8a8b00b684 [ASan] Print out a diagnostic when a global is unregistered
llvm-svn: 228838
2015-02-11 15:21:09 +00:00
Denis Protivensky d6fe5b3005 [ELF][ARM] Fix veneer symbol names in Release build
The fix is for r228680.
This makes tests also work.

llvm-svn: 228837
2015-02-11 15:02:43 +00:00
Sanjay Patel afe251649b fixed to test features, not CPUs
llvm-svn: 228836
2015-02-11 15:00:41 +00:00
Sanjay Patel b53d82cbc5 fixed to test features, not CPUs
llvm-svn: 228835
2015-02-11 15:00:19 +00:00
Sanjay Patel 8b88bc91bd fixed to test features, not CPUs
llvm-svn: 228834
2015-02-11 14:58:25 +00:00
Johannes Doerfert b9d18887d7 Allow signed devision in access functions
llvm-svn: 228833
2015-02-11 14:54:50 +00:00
Johannes Doerfert 97235c691a [FIX] Special case for branch users of scalar values
llvm-svn: 228832
2015-02-11 14:52:52 +00:00
Rafael Espindola 25d2c20c0c Don't repeat name in comment and clang-format a function.
llvm-svn: 228831
2015-02-11 14:44:17 +00:00
Marek Olsak fa6607d0b6 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
2015-02-11 14:26:46 +00:00
Andrea Di Biagio 2a0e435db1 [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
2015-02-11 14:22:18 +00:00
Tamas Berghammer cb527a7fcd Fix windows build (broken by r228823)
llvm-svn: 228828
2015-02-11 12:52:55 +00:00
James Molloy 99f06df8ac 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
2015-02-11 12:24:09 +00:00
James Molloy 7c336576a5 [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
2015-02-11 12:15:41 +00:00
Daniel Sanders a19216c8f4 [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
2015-02-11 11:28:56 +00:00
Ilia K 333fc18ca6 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
2015-02-11 11:24:20 +00:00
Tamas Berghammer e13c2731ba 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
2015-02-11 10:29:30 +00:00
Hafiz Abid Qadeer c4d5ed06cd 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
2015-02-11 10:14:13 +00:00
James Molloy f147359376 [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
2015-02-11 09:19:47 +00:00
David Majnemer fad5a31160 AsmParser: Validate alloca's type
An alloca's type should be weird things like metadata.

llvm-svn: 228820
2015-02-11 09:13:11 +00:00
David Majnemer 04578fcfa5 DataLayout: Report when the preferred alignment is less than the ABI
llvm-svn: 228819
2015-02-11 09:13:09 +00:00
David Majnemer d7677e7a8d Verifier: Check for null operands in !llvm.module.flags
llvm-svn: 228818
2015-02-11 09:13:06 +00:00
Michael Kuperstein 1921d3d6f3 [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
2015-02-11 08:53:55 +00:00
Arnaud A. de Grandmaison de79026d5e [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
2015-02-11 08:25:36 +00:00
David Majnemer 9fd8cdc009 Verifier: Make sure !llvm.ident's operand isn't null
llvm-svn: 228815
2015-02-11 08:23:20 +00:00
Alex Denisov 793e0676f0 Fix amount of diagnostic classes
llvm-svn: 228814
2015-02-11 07:56:16 +00:00
David Majnemer 300745351f AsmParser: Don't crash when insertvalue has bad operands
llvm-svn: 228813
2015-02-11 07:43:58 +00:00
David Majnemer 19b51054af AsmParser: Switch some vectors to maps
This speeds up parsing .ll files with metadata nodes with large IDs.

llvm-svn: 228812
2015-02-11 07:43:56 +00:00
Peter Collingbourne d20eff0ea6 Fix build for CMake < 2.8.12.
llvm-svn: 228810
2015-02-11 05:58:57 +00:00
Saleem Abdulrasool a9bd96e76a 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
2015-02-11 05:20:53 +00:00
Saleem Abdulrasool b8a83fdf5c 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
2015-02-11 05:20:50 +00:00
Saleem Abdulrasool e133422fa4 unwind: clean up more -Wformat warnings
This makes compilation on ARM -Wformat clean with GCC.  NFC.

llvm-svn: 228807
2015-02-11 05:20:47 +00:00
Saleem Abdulrasool 7ebbcd968b 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
2015-02-11 05:20:44 +00:00
Saleem Abdulrasool b5c3e56b38 unwind: silence -Wconversion warnings
Clean up implicit uint8_t to uint32_t conversion warnings identified by GCC.

llvm-svn: 228805
2015-02-11 05:20:42 +00:00
Ilia K b52ec4d1d5 Clean up test/tools/lldb-mi/TestMiNotification.py (MI)
llvm-svn: 228804
2015-02-11 05:02:44 +00:00
Ilia K 83bdf32cf4 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
2015-02-11 04:58:41 +00:00
Ilia K 98bdc6418f 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
2015-02-11 04:52:54 +00:00
Ilia K 81b5c668ac 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
2015-02-11 04:51:41 +00:00
Zachary Turner 3bd47cee78 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
2015-02-11 03:28:02 +00:00
Justin Bogner 43b2cae82a 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
2015-02-11 03:05:02 +00:00
Justin Bogner 2368c82de0 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
2015-02-11 02:53:03 +00:00
Justin Bogner d24e185784 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
2015-02-11 02:52:44 +00:00
Richard Smith 215f423ff2 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
2015-02-11 02:41:33 +00:00
Enrico Granata 560558eb7c 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
2015-02-11 02:35:39 +00:00
Andrew Kaylor 7ad134a746 Temporary workaround to fix MSVC 2012 build problems
llvm-svn: 228788
2015-02-11 02:16:34 +00:00
Reid Kleckner b3775df32e Fix invalid LLVM IR in PruneEH tests
llvm-svn: 228786
2015-02-11 02:06:47 +00:00