Commit Graph

112470 Commits

Author SHA1 Message Date
Keno Fischer
811b152d85 [ExecutionEngine] Add weak symbol support to RuntimeDyld
Support weak symbols by first looking up if there is an externally visible symbol we can find,
and only if that fails using the one in the object file we're loading.

Reviewed By: lhames
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6950

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227228 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 20:02:31 +00:00
Keno Fischer
99b52293c7 [ExecutionEngine] FindFunctionNamed: Skip declarations
Summary:
Basically all other methods that look up functions by name skip them if they are mere declarations.
Do the same in FindFunctionNamed.

Reviewers: lhames

Reviewed By: lhames

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227227 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 19:29:00 +00:00
Kai Nacke
47b633d4a5 [mips] Add range checks and transformation to octeon instructions in AsmParser.
This patch adds range checks to the immediate operands of octeon
instructions in the AsmParser. Like gas, it applies the following
transformations if the immediate is to large:

bbit0 $8, 42, foo => bbit032 $8, 10, foo
bbit1 $8, 46, foo => bbit132 $8, 14, foo
cins $8, $31, 32, 31 => cins32 $8, $31, 0, 31
exts $7, $4, 54, 9 => exts32 $7, $4, 22, 9

Reviewed By: dsanders

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227225 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 19:11:28 +00:00
Kostya Serebryany
ed9cdced00 Add cmake flag LLVM_USE_SANITIZE_COVERAGE
Summary:
When LLVM_USE_SANITIZE_COVERAGE=YES
and one of the sanitizers is used -fsanitize-coverage=3 will be added
to build flag. This will be used to run a coverage-guided fuzzer on various
llvm libraries.

Test Plan: n/a

Reviewers: rnk

Reviewed By: rnk

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227216 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 17:59:28 +00:00
Marek Olsak
fd55bcd060 R600/SI: Enable all tests that pass on VI without changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227214 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 17:27:15 +00:00
Marek Olsak
d922eb0be9 R600/SI: Fix MIN3/MAX3 on VI, define MED3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227213 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 17:25:15 +00:00
Marek Olsak
2ba0c13c26 R600/SI: Don't set patterns for chip-specific instructions while having pseudos
Only pseudos have patterns on them.

Also don't set the asm string for VINTRP_Pseudo. All pseudos should have empty
asm.

This matches what all other multiclasses do.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227212 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 17:25:11 +00:00
Marek Olsak
9f824da16d R600/SI: Add VI versions of LDS atomics
Each class is split into two: one adds let statements around non-pseudos,
and the other one specifies the parameters.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227211 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 17:25:07 +00:00
Marek Olsak
37788ca85a R600/SI: Add VI versions of MUBUF atomics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227210 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 17:25:02 +00:00
Marek Olsak
058ab6001b R600/SI: Add VI versions of MUBUF loads and stores
This enables a lot of existing patterns for VI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227209 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 17:24:58 +00:00
Marek Olsak
3111d0ae12 R600/SI: Add pseudos for MUBUF loads and stores
This defines the SI versions only, so it shouldn't change anything.

There are no changes other than using the new multiclasses, adding missing
mayLoad/mayStore, and formatting fixes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227208 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 17:24:54 +00:00
Andrea Di Biagio
944d86558e [InstCombine] Teach how to fold a select into a cttz/ctlz with the 'is_zero_undef' flag.
This patch teaches the Instruction Combiner how to fold a cttz/ctlz followed by
a icmp plus select into a single cttz/ctlz with flag 'is_zero_undef' cleared.

Added test InstCombine/select-cmp-cttz-ctlz.ll.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227197 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 15:58:14 +00:00
Evgeniy Stepanov
0b2455c374 [sancov] Fix unspecified constructor order between sancov and asan.
Sanitizer coverage constructor must run after asan constructor (for each DSO).
Bump constructor priority to guarantee that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227195 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 15:01:22 +00:00
Manuel Jacob
145de00800 Add a FIXME in SelectionDAGBuilder before an assert that is valid only on X86.
When lowering memcpy, memset or memmove, this assert checks whether the pointer
operands are in an address space < 256 which means "user defined address space"
on X86.  However, this notion of "user defined address space" does not exist
for other targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227191 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 13:14:35 +00:00
Eric Christopher
ad5a857bc5 Replace some uses of getSubtargetImpl with the cached version
off of the MachineFunction or with the version that takes a
Function reference as an argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227185 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 08:48:42 +00:00
Chandler Carruth
df01caffa4 [PM] Clean up file banner comments prior to refactoring this code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227182 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 08:28:33 +00:00
Eric Christopher
05935e2d04 Have the PBQP register allocator use the subtarget on the MachineFunction.
(and remove an extraneous private).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227181 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 08:27:06 +00:00
Eric Christopher
556614bf09 Remove some extraneous includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227180 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 08:27:03 +00:00
Eric Christopher
9a322a1250 Fix build failure with pointer vs reference.
NB: Saving files after editing helps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227178 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 08:00:42 +00:00
Eric Christopher
fd0f7927e0 Update a few calls to getSubtarget<> to either be getSubtargetImpl
when we didn't need the cast to the base class or the cached version
off of the subtarget.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227176 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 07:54:39 +00:00
Eric Christopher
f57b52c8ba Clean up the AArch64 store pair suppression pass initialization
and remove and unnecessary class variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227175 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 07:54:36 +00:00
Eric Christopher
72e7586339 The subtarget is cached on the MachineFunction. Access it directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227173 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 07:31:29 +00:00
Eric Christopher
c2601d2f12 Migrate SeparateConstOffsetFromGEP to use a Function with
getSubtarget.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227172 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 07:16:37 +00:00
David Majnemer
90c42ddc62 LoopRotate: Don't walk the uses of a Constant
LoopRotate wanted to avoid live range interference by looking at the
uses of a Value in the loop latch and seeing if any lied outside of the
loop.  We would wrongly perform this operation on Constants.

This fixes PR22337.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227171 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 06:21:43 +00:00
Eric Christopher
d70090ce24 Remove unused include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227170 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 05:58:44 +00:00
Richard Trieu
510cadb1c2 Revert r227148 & r227154 which added a test which infinitely loops.
r227148 added test CommandLineTest.HideUnrelatedOptionsMulti which repeatedly
outputs two following lines:

-tool: CommandLine Error: Option 'test-option-1' registered more than once!
-tool: CommandLine Error: Option 'test-option-2' registered more than once!

r227154 depends on changes from r227148


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227167 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 03:03:47 +00:00
Chandler Carruth
95647955f9 [PM] Run clang-format over this header to clean up the very few)
divergent formatting issues. This should prevent any format-only diffs
from sneaking into subsequent changes to port TTI to the new pass
manager.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227165 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 02:20:43 +00:00
Chandler Carruth
7e085b823d [PM] Switch a doxygen comment to the standard format. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227164 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 02:20:41 +00:00
Chandler Carruth
b63fed3b97 [PM] Refactor the core logic to run EarlyCSE over a function into an
object that manages a single run of this pass.

This was already essentially how it worked. Within the run function, it
would point members at *stack local* allocations that were only live for
a single run. Instead, it seems much cleaner to have a utility object
whose lifetime is clearly bounded by the run of the pass over the
function and can use member variables in a more direct way.

This also makes it easy to plumb the analyses used into it from the pass
and will make it re-usable with the new pass manager.

No functionality changed here, its just a refactoring.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227162 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 01:34:14 +00:00
Eric Christopher
ac33b1f5b3 MachineRegisterInfo can access TII off of the MachineFunction's
subtarget and so doesn't need the TargetMachine or to access via
getSubtargetImpl. Update all callers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227160 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 01:15:16 +00:00
Eric Christopher
07745031b1 Migrate AtomicExpandPass and DwarfEHPrepare to using a Function-ized getSubtargetImpl.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227159 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 01:04:42 +00:00
Eric Christopher
ec89182585 Fix unsigned/signed comparison warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227158 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 01:01:39 +00:00
Eric Christopher
24f37da028 Migrate CodeGenPrepare to use the Function based getSubtarget
code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227157 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 01:01:38 +00:00
Eric Christopher
cdafa1003b Grab the TargetLowering info from the DAG rather than querying for
a subtarget.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227156 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 01:01:36 +00:00
Eric Christopher
28f4510b4c Remove extraneous period.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227155 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 01:01:34 +00:00
Chris Bieneman
57d5adfe15 One more fix to the new API to fix const-correctness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227154 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 00:42:00 +00:00
Adrian Prantl
eb5783171c Replace this testcase with an even shorter one provided by dblaikie.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227152 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 00:22:17 +00:00
Chad Rosier
13faabb6c5 Commoning of target specific load/store intrinsics in Early CSE.
Phabricator revision: http://reviews.llvm.org/D7121
Patch by Sanjin Sijaric <ssijaric@codeaurora.org>!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227149 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-26 22:51:15 +00:00
Chris Bieneman
f96362358f Pete Cooper suggested the new API should use ArrayRef instead of SmallVectorImpl. Also adding a test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227148 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-26 22:50:47 +00:00
Philip Reames
c1beae0d42 Add test cases for PRE w/volatile loads
These tests check that the combination of 227110 (cross block query inst) and 227112 (volatile load semantics) work together properly to allow PRE in cases where a loop contains a volatile access.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227146 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-26 22:40:44 +00:00
Simon Pilgrim
44513da617 [X86][SSE] Float comparisons can sometimes be safely commuted
For ordered, unordered, equal and not-equal tests, packed float and double comparison instructions can be safely commuted without affecting the results. This patch checks the comparison mode of the (v)cmpps + (v)cmppd instructions and commutes the result if it can.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227145 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-26 22:29:24 +00:00
Zachary Turner
b9a39da95e Have the UTF conversion wrappers append a null terminator.
This is especially useful for the UTF8 -> UTF16 direction, since
there is no equivalent of llvm::SmallString<> for wide characters.
This means that anyone who wants a null terminated string is forced
to manually push and pop their own null terminator.

Reviewed by: Reid Kleckner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227143 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-26 22:05:50 +00:00
Simon Pilgrim
3ba85ab23a [X86][PCLMUL] Enable commutation for PCLMUL instructions
Patch to allow (v)pclmulqdq to be commuted - swaps the src registers and inverts the immediate (low/high) src mask.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227141 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-26 22:00:18 +00:00
Chris Bieneman
7006a12ba3 Add new HideUnrelatedOptions API that takes a SmallVectorImpl.
Need a new API for clang-modernize that allows specifying a list of option categories to remain visible. This will allow clang-modernize to move off getRegisteredOptions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227140 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-26 21:57:29 +00:00
Simon Pilgrim
38c35f3e2c Line endings fix. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227138 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-26 21:28:32 +00:00
Matt Arsenault
b33118d503 R600: Cleanup or test
Fix broken check lines, use multiple check prefixes,
add an additional test for i1 or.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227137 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-26 21:16:10 +00:00
Simon Pilgrim
1d34ec14e9 Line endings fix. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227136 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-26 21:15:42 +00:00
Alexei Starovoitov
bcd2c28872 bpf: fix build due to 'Move DataLayout back to the TargetMachine'
commit r227113 moved DataLayout

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227133 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-26 20:43:15 +00:00
Bruno Cardoso Lopes
0f3d4650f7 [x86][MMX] Rename and cleanup tests: arith, intrinsics and shuffle
- Rename mmx-builtins to mmx-intrinsics to match other intrinsic test naming.
- Remove tests that duplicate functionality from mmx-intrinsics.ll.
- Move arith related tests to mmx-arith.ll.
- MMX related shuffle goes to vector-shuffle-mmx.ll.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227130 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-26 20:06:51 +00:00
Hans Wennborg
325385a37f SimplifyCFG: Omit range checks for switch lookup tables when default is unreachable
The range check would get optimized away later, but we might as well not emit
them in the first place.

http://reviews.llvm.org/D6471

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227126 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-26 19:52:34 +00:00