Commit Graph

113355 Commits

Author SHA1 Message Date
Tom Stellard
293dfe59a5 R600/SI: Disable subreg liveness
This is temporary while we try to fix a crash in the register coalescer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228861 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 18:24:53 +00:00
Simon Pilgrim
d606d6bfe1 [X86][SSE] Added dual vector truncation tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228857 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 18:14:35 +00:00
Adrian Prantl
4058639603 Allow DIBuilder::replaceVTableHolder() to work with temporary nodes,
tested via the clang test CodeGenCXX/vtable-holder-self-reference.cpp .

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228854 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 17:45:10 +00:00
Adrian Prantl
fe98d69578 Add a trackIfUnresolved to DIBuilder::createInheritance(),
tested via the clang test CodeGenCXX/vtable-holder-self-reference.cpp .

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228853 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 17:45:08 +00:00
Adrian Prantl
71a70be163 Generalize DIBuilder's createReplaceableForwardDecl() to a more flexible
createReplaceableCompositeType() that allows to create non-forward-declared
temporary nodes.

Paired commit with CFE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228852 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 17:45:05 +00:00
Tom Stellard
28f550eed1 R600: Split AMDGPUPassConfig into R600PassConfig and GCNPassConfig
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228850 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 17:11:51 +00:00
Tom Stellard
5b98db607b R600: Create an R600TargetMachine for pre-gcn GPUs
No functinality change. R600TargetMachine inherits from
AMDGPUTargetMachine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228849 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 17:11:50 +00:00
Tom Stellard
946f5e91ef R600/SI: Fix -march in test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228848 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 17:11:48 +00:00
Jan Wen Voung
0dfec56734 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228842 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 16:12:50 +00:00
Jonas Paulsson
fc58cf7676 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228841 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 16:10:31 +00:00
Sanjay Patel
cb2ff33a8a fixed to test features, not CPUs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228836 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 15:00:41 +00:00
Sanjay Patel
00fb386b23 fixed to test features, not CPUs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228835 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 15:00:19 +00:00
Sanjay Patel
57fb1850e2 fixed to test features, not CPUs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228834 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 14:58:25 +00:00
Rafael Espindola
831855275d Don't repeat name in comment and clang-format a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228831 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 14:44:17 +00:00
Marek Olsak
c0021e43ea 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228830 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 14:26:46 +00:00
Andrea Di Biagio
f033db57e9 [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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228829 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 14:22:18 +00:00
James Molloy
1777ae7a05 Make buildbots better.
This testcase change was associated incorrectly to a followup commit in my git tree, not the base commit. Sorry!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228827 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 12:24:09 +00:00
James Molloy
4de471dd0a [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228826 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 12:15:41 +00:00
Daniel Sanders
7b91359226 [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228825 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 11:28:56 +00:00
James Molloy
caba7561ae [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228821 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 09:19:47 +00:00
David Majnemer
5b71fffa58 AsmParser: Validate alloca's type
An alloca's type should be weird things like metadata.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228820 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 09:13:11 +00:00
David Majnemer
70fe9c6346 DataLayout: Report when the preferred alignment is less than the ABI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228819 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 09:13:09 +00:00
David Majnemer
f937622ece Verifier: Check for null operands in !llvm.module.flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228818 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 09:13:06 +00:00
Michael Kuperstein
0686b8affc [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228817 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 08:53:55 +00:00
Arnaud A. de Grandmaison
8ee1b65836 [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228816 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 08:25:36 +00:00
David Majnemer
e37f2a0dc6 Verifier: Make sure !llvm.ident's operand isn't null
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228815 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 08:23:20 +00:00
David Majnemer
94d09cbb9f AsmParser: Don't crash when insertvalue has bad operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228813 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 07:43:58 +00:00
David Majnemer
4762c0b5d1 AsmParser: Switch some vectors to maps
This speeds up parsing .ll files with metadata nodes with large IDs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228812 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 07:43:56 +00:00
Peter Collingbourne
a920925fa2 Fix build for CMake < 2.8.12.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228810 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 05:58:57 +00:00
Zachary Turner
c371307e60 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228798 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 03:28:02 +00:00
Justin Bogner
167ce4489c 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228793 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 02:52:44 +00:00
Andrew Kaylor
a73810650e Temporary workaround to fix MSVC 2012 build problems
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228788 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 02:16:34 +00:00
Reid Kleckner
7c5e0c9851 Fix invalid LLVM IR in PruneEH tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228786 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 02:06:47 +00:00
Reid Kleckner
690248bf52 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228782 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 01:23:16 +00:00
Tom Stellard
9f5d593c1f 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228776 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 00:34:35 +00:00
Tom Stellard
6378a7cb0b R600/SI: Add soffset operand to mubuf addr64 instruction
We were previously hard-coding soffset to 0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228775 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 00:34:32 +00:00
Zachary Turner
a1a22af397 Fix warning due to unused private member variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228774 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 00:33:00 +00:00
Zachary Turner
c6b4bedeb6 Fix some warnings due to -Wcovered-switch-default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228773 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 00:13:39 +00:00
Zachary Turner
ab884fa603 Convert std::make_unique<> to llvm::make_unique<>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228768 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 23:46:48 +00:00
Adrian Prantl
27a610ae36 Add the missing testcase for r228764.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228766 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 23:32:56 +00:00
Petar Jovanovic
56e9c5f92b 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228765 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 23:30:14 +00:00
Adrian Prantl
7b98f2d2a6 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228764 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 23:18:28 +00:00
Adrian Prantl
1e3e40b8c2 Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228763 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 23:18:15 +00:00
David Majnemer
78d0638594 EarlyCSE: Add check lines for test added in r228760
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228761 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 23:11:02 +00:00
David Majnemer
0f8bd667a1 EarlyCSE: It isn't safe to CSE across synchronization boundaries
This fixes PR22514.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228760 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 23:09:43 +00:00
Zachary Turner
88972080a3 Add missing function and header include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228758 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 22:56:21 +00:00
Zachary Turner
b7c34eb510 Oops. Don't call Windows functions on non-windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228756 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 22:47:14 +00:00
Zachary Turner
1e70854148 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228755 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 22:43:25 +00:00
David Majnemer
f2138c2df8 X86: @llvm.frameaddress should defer to SelectionDAG for Win CFI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228754 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 22:00:34 +00:00
Zachary Turner
19332b06c3 Fix build due to mismatched function signatures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228752 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 21:40:29 +00:00