1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

113179 Commits

Author SHA1 Message Date
Duncan P. N. Exon Smith
4428ff1087 AsmWriter/Bitcode: MDFile
llvm-svn: 229007
2015-02-13 01:19:14 +00:00
Duncan P. N. Exon Smith
ab0350e2c0 AsmWriter: MDBasicType: Recognize DW_ATE in 'encoding'
llvm-svn: 229006
2015-02-13 01:17:35 +00:00
Duncan P. N. Exon Smith
38e2854cc3 AsmWriter/Bitcode: MDBasicType
llvm-svn: 229005
2015-02-13 01:14:58 +00:00
Duncan P. N. Exon Smith
8b689964a4 AsmWriter/Bitcode: MDEnumerator
llvm-svn: 229004
2015-02-13 01:14:11 +00:00
Duncan P. N. Exon Smith
9879c4ea87 AsmWriter/Bitcode: MDSubrange
llvm-svn: 229003
2015-02-13 01:10:38 +00:00
Duncan P. N. Exon Smith
94f67658e0 IR: Add MDExpression::ExprOperand
Port `DIExpression::Operand` over to `MDExpression::ExprOperand`.  The
logic is needed directly in `MDExpression` to support printing in
assembly.

llvm-svn: 229002
2015-02-13 01:07:46 +00:00
Duncan P. N. Exon Smith
661eb5dea8 Support: Add dwarf::getOperationEncoding()
llvm-svn: 229001
2015-02-13 01:05:00 +00:00
Duncan P. N. Exon Smith
980b9ef6c3 Support: Rewrite LocationAtom and OperationEncodingString(), NFC
Use `Dwarf.def` more.

llvm-svn: 229000
2015-02-13 01:04:08 +00:00
Akira Hatanaka
53f74bf662 [LinkModules] Change the way ModuleLinker merges triples.
This commit makes the following changes:

- Stop issuing a warning when the triples' string representations do not match
  exactly if the Triple objects generated from the strings compare equal.
 
- On Apple platforms, choose the triple that has the larger minimum version
  number. 

rdar://problem/16743513

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

llvm-svn: 228999
2015-02-13 00:40:41 +00:00
Eric Christopher
4c8531bf47 PPCFrameLowering's FramePointerOffset can be computed at initialization
time. Do so.

llvm-svn: 228998
2015-02-13 00:39:38 +00:00
Eric Christopher
1729d70882 The TOC save offset can be computed at compile time, do so and
propagate changes.

llvm-svn: 228997
2015-02-13 00:39:36 +00:00
Eric Christopher
cb10575e4a The return save offset can be computed at initialization time - do
so and save the value.

llvm-svn: 228996
2015-02-13 00:39:27 +00:00
Michael Zolotukhin
4701b74ea8 Testcase for r228988.
llvm-svn: 228995
2015-02-13 00:35:45 +00:00
Chandler Carruth
dc2a7e767f [unroll] Don't use a map from pointer to bool. Use a set.
This is much more efficient. In particular, the query with the user
instruction has to insert a false for every missing instruction into the
set. This is just a cleanup a long the way to fixing the underlying
algorithm problems here.

llvm-svn: 228994
2015-02-13 00:29:39 +00:00
NAKAMURA Takumi
b02669f0d4 llvm/test/Transforms/LoopVectorize/PowerPC/small-loop-rdx.ll REQUIRES +Asserts due to -debug.
llvm-svn: 228989
2015-02-13 00:21:34 +00:00
Michael Zolotukhin
c6b3be0511 Prevent division by 0.
When we try to estimate number of potentially removed instructions in
loop unroller, we analyze first N iterations and then scale the
computed number by TripCount/N. We should bail out early if N is 0.

llvm-svn: 228988
2015-02-13 00:17:03 +00:00
Chandler Carruth
43545494aa [unroll] Update the new analysis logic from r228265 to use modern coding
conventions for function names consistently. Some were already using
this but not all.

llvm-svn: 228987
2015-02-13 00:00:24 +00:00
Rafael Espindola
4467ec2e41 Add support for having multiple sections with the same name and comdat.
Using this in combination with -ffunction-sections allows LLVM to output a .o
file with mulitple sections named .text. This saves space by avoiding long
unique names of the form .text.<C++ mangled name>.

llvm-svn: 228980
2015-02-12 23:29:51 +00:00
David Majnemer
765dd6df7e X86: Don't crash if we can't decode the pshufb mask
Constant pool entries are uniqued by their contents regardless of their
type.  This means that a pshufb can have a shuffle mask which isn't a
simple array of bytes.

The code path which attempts to decode the mask didn't check for
failure, causing PR22559.

llvm-svn: 228979
2015-02-12 23:26:26 +00:00
Rafael Espindola
04b12eb01f Learn that __DATA,__objc_classrefs is not atomized via symbols.
This should hopefully fix objc on AArch64.

llvm-svn: 228976
2015-02-12 23:11:59 +00:00
David Blaikie
52492e048a Add missing override.
llvm-svn: 228974
2015-02-12 22:58:53 +00:00
Olivier Sallenave
7043291b9c Change max interleave factor to 12 for POWER7 and POWER8.
llvm-svn: 228973
2015-02-12 22:57:58 +00:00
Simon Pilgrim
cb9c704608 Ensure integer domain on general shuffle stack folding tests
llvm-svn: 228972
2015-02-12 22:47:45 +00:00
David Blaikie
d8d7f18259 Remove typedef of a pointer type used in a gep to simplify migration of geps to a typeless-pointer future.
I'd modify my migration tool to account for this, but this is the only
instance of a typedef'd pointer type to a gep I found in the whole test
suite, so it didn't seem worthwhile.

llvm-svn: 228970
2015-02-12 22:45:25 +00:00
Hal Finkel
76da9b7997 [SDAG] Don't try to use FP_EXTEND/FP_ROUND for int<->fp promotions
The PowerPC backend has long promoted some floating-point vector operations
(such as select) to integer vector operations. Unfortunately, this behavior was
broken by r216555. When using FP_EXTEND/FP_ROUND for promotions, we must check
that both the old and new types are floating-point types. Otherwise, we must
use BITCAST as we did prior to r216555 for everything.

llvm-svn: 228969
2015-02-12 22:43:52 +00:00
Duncan P. N. Exon Smith
c32b45aa80 IR: Stop abusing DW_TAG_base_type for compile unit arrays
The sub-arrays for compile units have for a long time been initialized
to distinct temporary nodes with the `DW_TAG_base_type` tag, with no
other operands.  These invalid `DIBasicType`s are later replaced with
appropriate arrays.

This seems like a poor man's assertion that the arrays do eventually get
replaced.  These days, temporaries in the graph will cause assertions
when writing bitcode or assembly, so this isn't necessary.  Use
temporary empty tuples instead.

Note that the whole idea of using temporaries and then replacing them
later is wasteful here.  We never actually want to merge compile units
by uniquing based on content.  Compile units should use `getDistinct()`
instead of `get()`, and then their operands can be freely replaced later
on.

llvm-svn: 228967
2015-02-12 21:52:11 +00:00
Zachary Turner
8f5e13b9c7 Attempt to fix the build again.
llvm-svn: 228964
2015-02-12 21:25:58 +00:00
Zachary Turner
5a969b378c Attempt to fix Linux builds after r228960.
llvm-svn: 228962
2015-02-12 21:17:07 +00:00
Rafael Espindola
83518ea75f Remove mostly unused setters.
Most of the code was setting the TargetOptions directly.

llvm-svn: 228961
2015-02-12 21:16:34 +00:00
Zachary Turner
6cde1e9388 Add concrete type overloads to PDBSymbol::findChildren().
Frequently you only want to iterate over children of a specific
type (e.g. functions).  Previously you would get back a generic
interface that allowed iteration over the base symbol type,
which you would have to dyn_cast<> each one of.  With this patch,
we allow the user to specify the concrete type as a template
parameter, and it will return an iterator which returns instances
of the concrete type directly.

llvm-svn: 228960
2015-02-12 21:09:24 +00:00
Reed Kotler
aff15b863c Add bulk of returning of values to Mips fast-isel
Summary:
Implement the bulk of returning values in Mips fast-isel



Test Plan:
reatabi.ll

Passes test-suite at -O0,-O2 and with mips32r2 and mips32r1.





Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits, aemerson, rfuhler

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

llvm-svn: 228958
2015-02-12 21:05:12 +00:00
Bjorn Steinbrink
5647f7ac6b Fix a crash in the assumption cache when inlining indirect function calls
Summary:
Instances of the AssumptionCache are per function, so we can't re-use
the same AssumptionCache instance when recursing in the CallAnalyzer to
analyze a different function. Instead we have to pass the
AssumptionCacheTracker to the CallAnalyzer so it can get the right
AssumptionCache on demand.

Reviewers: hfinkel

Subscribers: llvm-commits, hans

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

llvm-svn: 228957
2015-02-12 21:04:22 +00:00
Benjamin Kramer
f3253754cf Update test case.
llvm-svn: 228956
2015-02-12 20:40:19 +00:00
Benjamin Kramer
3b1b5b8725 InstCombine: Allow folding of xor into icmp by changing the predicate for vectors
The loop vectorizer can create this pattern.

llvm-svn: 228954
2015-02-12 20:26:46 +00:00
Simon Pilgrim
e464edb2e9 Relaxed over-zealous alignment requirement for VEX-encoded AES instructions
llvm-svn: 228953
2015-02-12 20:01:03 +00:00
Michael Zolotukhin
edeaac9321 Add a testcase for r228432.
llvm-svn: 228951
2015-02-12 19:57:24 +00:00
Benjamin Kramer
cf4253c913 Try to fix the MSVC build.
0xFFFFFFFFFFFFFFFFLL doesn't fit in a long long so it should have
type 'unsigned long long'. MSVC thinks it's a (signed) __int64.

llvm-svn: 228950
2015-02-12 19:53:49 +00:00
Michael Kuperstein
8f320b0aec gold-plugin: delete the output file for OT_DISABLE
bfd creates the output file early, so calling exit(0) is not enough, the file needs to be explicitly deleted.

Patch by: H.J. Lu <hjl.tools@gmail.com>

llvm-svn: 228946
2015-02-12 18:21:50 +00:00
Rafael Espindola
5feecddc53 On ELF, put PIC jump tables in a non executable section.
Fixes PR22558.

llvm-svn: 228939
2015-02-12 17:46:49 +00:00
Rafael Espindola
fb65819e24 Put each jump table in an independent section if the function is too.
This allows the linker to GC both, fixing pr22557.

llvm-svn: 228937
2015-02-12 17:16:46 +00:00
Benjamin Kramer
6b4b45fd19 Fix accidental bit flip.
llvm-svn: 228936
2015-02-12 16:30:00 +00:00
Benjamin Kramer
9758ef8680 CoverageMapping: Bitvectorize code. No functionality change.
llvm-svn: 228934
2015-02-12 16:18:07 +00:00
James Molloy
a6fbcd3b92 [LoopRerolling] Be more forgiving with instruction order.
We can't solve the full subgraph isomorphism problem. But we can
allow obvious cases, where for example two instructions of different
types are out of order. Due to them having different types/opcodes,
there is no ambiguity.

llvm-svn: 228931
2015-02-12 15:54:14 +00:00
Benjamin Kramer
4b76aa3d46 MathExtras: Bring Count(Trailing|Leading)Ones and CountPopulation in line with countTrailingZeros
Update all callers.

llvm-svn: 228930
2015-02-12 15:35:40 +00:00
Tim Northover
764ad6f42f Triple: refactor redundant code.
Should be no functional change, since most of the logic removed was
completely pointless (after some previous refactoring) and the rest
duplicated elsewhere.

Patch by Kamil Rytarowski.

llvm-svn: 228926
2015-02-12 15:12:13 +00:00
Michael Kuperstein
cd8c495c25 [X86] Call frame optimization - allow stack-relative movs to be folded into a push
Since we track esp precisely, there's no reason not to allow this.

llvm-svn: 228924
2015-02-12 14:17:35 +00:00
Andrea Di Biagio
7ca0db442c [TTI] Teach the cost heuristic how to query TLI to check if a zext/trunc is 'free' for the target.
Now that SimplifyCFG uses TTI for the cost heuristic, we can teach BasicTTIImpl
how to query TLI in order to get a more accurate cost for truncates and
zero-extends.

Before this patch, the basic cost heuristic in TargetTransformInfoImplCRTPBase
would have conservatively returned a 'default' TCC_Basic for all zero-extends,
and TCC_Free for truncates on native types.

This patch improves the heuristic so that we query TLI (if available) to get
more accurate answers. If TLI is available, then methods 'isZExtFree' and
'isTruncateFree' can be used to check if a zext/trunc is free for the target.

Added more test cases to SimplifyCFG/X86/speculate-cttz-ctlz.ll.
With this change, SimplifyCFG is now able to speculate a 'cheap' cttz/ctlz
immediately followed by a free zext/trunc.

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

llvm-svn: 228923
2015-02-12 14:17:24 +00:00
Benjamin Kramer
c7a7636094 BitVector: Remove manual bit width dispatch, this is handled by templates
NFC.

llvm-svn: 228922
2015-02-12 14:02:58 +00:00
Benjamin Kramer
d08a40831d MathExtras: Parametrize count(Trailing|Leading)Zeros on the type size.
Otherwise we will always select the generic version for e.g. unsigned
long if uint64_t is typedef'd to 'unsigned long long'. Also remove
enable_if hacks in favor of static_assert.

llvm-svn: 228921
2015-02-12 13:47:29 +00:00
Asiri Rathnayake
fae9e6a869 ARM: Fix another regression introduced in r223113
The changes in r223113 (ARM modified-immediate syntax) have broken
instructions like:
  mov r0, #~0xffffff00
The problem is that I've added a spurious range check on the immediate
operand to ensure that it lies between INT32_MIN and UINT32_MAX. While
this range check is correct in theory, it causes problems because the
operand is stored in an int64_t (by MC). So valid 32-bit constants like
\#~0xffffff00 become out of range. The solution is to simply remove this
range check. It is not possible to validate the range of the immediate
operand with the current setup because: 1) The operand is stored in an
int64_t by MC, 2) The immediate can be of the forms #imm, #-imm, #~imm
or even #((~imm)) etc. So we just chop the value to 32 bits and use it.

Also noted that the original range check was note tested by any of the
unit tests. I've added a new test to cover #~imm kind of operands.

Change-Id: I411e90d84312a2eff01b732bb238af536c4a7599
llvm-svn: 228920
2015-02-12 13:37:28 +00:00