1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
Commit Graph

112619 Commits

Author SHA1 Message Date
Eric Christopher
3ce7338e3c Cache and use the subtarget that owns the target lowering.
llvm-svn: 227871
2015-02-02 22:11:36 +00:00
Bruno Cardoso Lopes
b2e29f9645 [X86][MMX] Add tests for MMX extract element
LLVM ToT produces poor MMX code compared to 3.5. However, part of the previous
functionality can be achieved by using -x86-experimental-vector-widening-legalization.
Add tests to be sure we don't regress again.

llvm-svn: 227869
2015-02-02 22:00:48 +00:00
Bruno Cardoso Lopes
21e97803f6 [X86][MMX] Cleanup shuffle, bitcast and insert element tests
- Merge MMX arg passing test files
- Merge MMX bitcast, insert elt and shuffle tests

llvm-svn: 227867
2015-02-02 21:56:11 +00:00
Alexei Starovoitov
d7a5a8cce0 bpf: Use the getSubtarget call off of the MachineFunction rather than the TargetMachine
Summary:
Hi Eric,

this patch cleans up the layering violation that you're fixing across backends.
Anything else I need to fix on bpf backend side?

Thanks

Reviewers: echristo

Reviewed By: echristo

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

llvm-svn: 227865
2015-02-02 21:24:27 +00:00
Jingyue Wu
34a8e5e1ea Resurrect the assertion removed by r227717
Summary: MSVC can compile "LoopID->getOperand(0) == LoopID" when LoopID is MDNode*.

Test Plan: no regression

Reviewers: mkuper

Subscribers: jholewinski, llvm-commits

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

llvm-svn: 227853
2015-02-02 20:41:11 +00:00
Duncan P. N. Exon Smith
988f088222 Fix the -Werror build, NFC
llvm-svn: 227849
2015-02-02 20:20:56 +00:00
Duncan P. N. Exon Smith
267f14474d IR: Allow GenericDebugNode construction from MDString
Allow `GenericDebugNode` construction directly from `MDString`, rather
than requiring `StringRef`s.  I've refactored the `StringRef`
constructors to use these.  There's no real functionality change here,
except for exposing the lower-level API.

The purpose of this is to simplify construction of string operands when
reading bitcode.  It's unnecessarily indirect to parse an `MDString` ID,
lookup the `MDString` in the bitcode reader list, get the `StringRef`
out of that, and then have `GenericDebugNode::getImpl()` use
`MDString::get()` to acquire the original `MDString`.  Instead, this
allows the bitcode reader to directly pass in the `MDString`.

llvm-svn: 227848
2015-02-02 20:01:03 +00:00
Duncan P. N. Exon Smith
4505bfa490 IR: Extract DEFINE_MDNODE_GET(), NFC
llvm-svn: 227847
2015-02-02 19:55:21 +00:00
Duncan P. N. Exon Smith
25ffa9ed9c IR: Separate helpers for string operands, NFC
llvm-svn: 227846
2015-02-02 19:54:05 +00:00
Lang Hames
25a7e6c730 [Orc] Make OrcMCJITReplacement::addObject calls transfer buffer ownership to the
ObjectLinkingLayer.

There are a two of overloads for addObject, one of which transfers ownership of
the underlying buffer to OrcMCJITReplacement. This commit makes the ownership
transfering version pass ownership down to the ObjectLinkingLayer in order to
prevent the issue described in r227778.

I think this commit will fix the sanitizer bot failures that necessitated the
removal of the load-object-a.ll regression test in r227785, so I'm reinstating
that test.

llvm-svn: 227845
2015-02-02 19:51:18 +00:00
Rafael Espindola
df5a1a4681 Move simple case earlier and use a continue.
llvm-svn: 227841
2015-02-02 19:22:51 +00:00
Eric Christopher
5cb620ce06 Migrate HexagonISelDAGToDAG to setting a subtarget pointer during
runOnMachineFunction. Update all uses of the Subtarget accordingly.

llvm-svn: 227840
2015-02-02 19:22:03 +00:00
Eric Christopher
eabd2452d1 Use the getSubtarget call off of the MachineFunction rather than
the TargetMachine.

llvm-svn: 227839
2015-02-02 19:22:01 +00:00
Eric Christopher
fa6d0be9d4 Remove unused class variables and update calls to get the subtarget
off of the machine function.

llvm-svn: 227837
2015-02-02 19:05:28 +00:00
Eric Christopher
1a48904da5 Sink queries into asserts since the variable is unused otherwise.
llvm-svn: 227836
2015-02-02 18:58:24 +00:00
Duncan P. N. Exon Smith
439bf9404e IR: Split out DebugInfoMetadata.h, NFC
Move debug-info-centred `Metadata` subclasses into their own
header/source file.  A couple of private template functions are needed
from both `Metadata.cpp` and `DebugInfoMetadata.cpp`, so I've moved them
to `lib/IR/MetadataImpl.h`.

llvm-svn: 227835
2015-02-02 18:53:21 +00:00
Eric Christopher
5120f67861 Update CMake build for removed files.
llvm-svn: 227834
2015-02-02 18:52:49 +00:00
Eric Christopher
815e721ecd Get TargetRegisterInfo and TargetInstrInfo off of the MachineFunction
and remove unnecessary class variables.

llvm-svn: 227832
2015-02-02 18:46:31 +00:00
Eric Christopher
5e75c7a7c4 Use the function template getSubtarget to remove an explicit cast.
llvm-svn: 227831
2015-02-02 18:46:29 +00:00
Eric Christopher
201e4d3e21 Grab TargetInstrInfo off of the MachineFunction and remove
unnecessary class variables.

llvm-svn: 227830
2015-02-02 18:46:27 +00:00
Eric Christopher
ef475ed72a Remove unused files.
llvm-svn: 227829
2015-02-02 18:46:23 +00:00
David Blaikie
87c973c9d7 STLExtras: Provide less/equal functors with templated function call operators, plus a deref'ing functor template utility
Similar to the C++14 void specializations of these templates, useful as
a stop-gap until LLVM switches to '14.

Example use-cases in tblgen because I saw some functors that looked like
they could be simplified/refactored.

Reviewers: dexonsmith

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

llvm-svn: 227828
2015-02-02 18:35:10 +00:00
Adrian Prantl
d214bdeaff Debug Info: Relax assertion in isUnsignedDIType() to allow floats to be
described by integer constants. This is a bit ugly, but if the source
language allows arbitrary type casting, the debug info must follow suit.

For example:
  void foo() {
    float a;
    *(int *)&a = 0;
  }
For the curious: SROA replaces the float alloca with an i32 alloca, which
is then optimized away and described via dbg.value(i32 0, ...).

llvm-svn: 227827
2015-02-02 18:31:58 +00:00
Duncan P. N. Exon Smith
1f7b5ff9bc Fix some file headers, NFC
llvm-svn: 227826
2015-02-02 18:20:15 +00:00
Duncan P. N. Exon Smith
c9d18bd005 Support: Add missing header to BlockFrequencyTest.cpp, NFC
llvm-svn: 227825
2015-02-02 18:18:07 +00:00
Tom Stellard
5e1403ebec R600/SI: 64-bit and larger memory access must be at least 4-byte aligned
This is true for SI only. CI+ supports unaligned memory accesses,
but this requires driver support, so for now we disallow unaligned
accesses for all GCN targets.

llvm-svn: 227822
2015-02-02 18:02:28 +00:00
Tom Stellard
79712c884f R600/SI: Merge two test files
llvm-svn: 227821
2015-02-02 18:02:23 +00:00
Ahmed Bougacha
53ed9373bc [AArch64] Prefer DUP/MOV ("CPY") to INS for vector_extract.
This avoids a partial false dependency on the previous content of
the upper lanes of the destination vector register.

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

llvm-svn: 227820
2015-02-02 17:55:57 +00:00
Eric Christopher
e7361de869 Since TargetLowering is already subtarget dependent just pass
in the subtarget and stash it in the class so that lookups are
easier and safer.

llvm-svn: 227819
2015-02-02 17:52:27 +00:00
Eric Christopher
6ad9db4ce3 Use the function template getSubtarget on the MachineFunction
rather than a larger explicit cast.

llvm-svn: 227818
2015-02-02 17:52:25 +00:00
Eric Christopher
f136200ef8 Remove unused class variable.
llvm-svn: 227817
2015-02-02 17:52:23 +00:00
Eric Christopher
2d72ffac12 Remove unused class variable.
llvm-svn: 227816
2015-02-02 17:52:20 +00:00
Sanjay Patel
963e49f948 fix typo
llvm-svn: 227815
2015-02-02 17:47:30 +00:00
Eric Christopher
b584389296 Reuse a bunch of cached subtargets and remove getSubtarget calls
without a Function argument.

llvm-svn: 227814
2015-02-02 17:38:43 +00:00
Eric Christopher
2aab2ce529 Remove unnecessary forward declaration.
llvm-svn: 227813
2015-02-02 17:38:40 +00:00
Eric Christopher
8eda3c8e33 Remove some unused forward declarations.
llvm-svn: 227812
2015-02-02 17:38:37 +00:00
Jan Wen Voung
9bc6ef1872 Fix ARM peephole optimizeCompare to avoid optimizing unsigned cmp to 0.
Summary:
Previously it only avoided optimizing signed comparisons to 0.
Sometimes the DAGCombiner will optimize the unsigned comparisons
to 0 before it gets to the peephole pass, but sometimes it doesn't.

Fix for PR22373.

Test Plan: test/CodeGen/ARM/sub-cmp-peephole.ll

Reviewers: jfb, manmanren

Subscribers: aemerson, llvm-commits

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

llvm-svn: 227809
2015-02-02 16:56:50 +00:00
Erik Eckstein
b53691cdaf Fix: SLPVectorizer crashes with assertion when vectorizing a cmp instruction.
The commit r225977 uncovered this bug. The problem was that the vectorizer tried to
read the second operand of an already deleted instruction.
The bug didn't show up before r225977 because the freed memory still contained a non-null pointer.
With r225977 deletion of instructions is delayed and the read operand pointer is always null.

llvm-svn: 227800
2015-02-02 12:45:34 +00:00
Lang Hames
a6e75e31d5 [Orc] Remove one of the OrcMCJITReplacement regression tests while I
investigate a sanitizer bot failure.

llvm-svn: 227785
2015-02-02 06:01:02 +00:00
NAKAMURA Takumi
e7b99ea1bf gold-plugin.cpp: Fixup r227599 corresponding to r227685 and r227731 -- Don't lose DataLayoutPass.
llvm-svn: 227783
2015-02-02 05:47:30 +00:00
Lang Hames
2fa94e1724 [Orc] Regression tests for OrcMCJITReplacement.
Duplicated from the MCJIT regression tests.

llvm-svn: 227780
2015-02-02 05:04:55 +00:00
Lang Hames
3fda2932c0 [Orc] Remove the OwnedModules list from OrcMCJITReplacement and use
ExecutionEngine's Modules list instead.

This makes the owned modules visibile to ExecutionEngine. In particular,
it is required for ExecutionEngine::runStaticConstructorsAndDestructors to
work.

Regression tests for Orc (which test this issue) will be committed shortly.

llvm-svn: 227779
2015-02-02 04:34:02 +00:00
Lang Hames
dcc8377028 [Orc] Make the ObjectLinkingLayer take ownership of object files until
finalization time.

As currently implemented, RuntimeDyldELF requires the original object
file to be avaible when relocations are being resolved. This patch
ensures that the ObjectLinkingLayer preserves it until then. In the
future RuntimeDyldELF should be rewritten to remove this requirement, at
which point this patch can be reverted.

Regression test cases for Orc (which include coverage of this bug) will
be committed shortly.
 

llvm-svn: 227778
2015-02-02 04:32:17 +00:00
Lang Hames
8275580ce1 [Orc] Add sensible defaults for the ObjectLinkingLayer constructor.
llvm-svn: 227776
2015-02-02 01:03:10 +00:00
Hal Finkel
9be22b1e21 [PowerPC] Put PPCEarlyReturn into its own source file
PPCInstrInfo.cpp has ended up containing several small MI-level passes, and
this is making the file harder to read than necessary. Split out
PPCEarlyReturn into its own source file. NFC.

Now that PPCInstrInfo.cpp does not also contain pass implementations, I hope
that it will be slightly less unwieldy.

llvm-svn: 227775
2015-02-01 22:58:46 +00:00
Hal Finkel
1ad18b8c2c [PowerPC] Remove unnecessary include
llvm-svn: 227772
2015-02-01 22:03:13 +00:00
Hal Finkel
287f0c7ac8 [PowerPC] Put PPCVSXCopy into its own source file
PPCInstrInfo.cpp has ended up containing several small MI-level passes, and
this is making the file harder to read than necessary. Split out
PPCVSXCopy into its own source file. NFC.

llvm-svn: 227771
2015-02-01 22:01:29 +00:00
Hal Finkel
a67f242e9a [PowerPC] Put PPCVSXFMAMutate into its own source file
PPCInstrInfo.cpp has ended up containing several small MI-level passes, and
this is making the file harder to read than necessary. Split out
PPCVSXFMAMutate into its own source file. NFC.

llvm-svn: 227770
2015-02-01 21:51:22 +00:00
Hal Finkel
7435b67236 [PowerPC] Remove the PPCVSXCopyCleanup pass
This MI-level pass was necessary when VSX support was first being developed,
specifically, before the ABI code had been updated to use VSX registers for
arguments (the register assignments did not change, in a physical sense, but
the VSX super-registers are now used). Unfortunately, I never went back and
removed this pass after that was done. I believe this code is now effectively
dead.

llvm-svn: 227767
2015-02-01 21:20:58 +00:00
Benjamin Kramer
74e0dba4ef LoopVectorize: Remove initializer list that blocks MSVC.
llvm-svn: 227766
2015-02-01 21:13:26 +00:00