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

86878 Commits

Author SHA1 Message Date
Justin Holewinski
c9fa05b437 Allow targets to prefer TypeSplitVector over TypePromoteInteger when computing the legalization method for vectors
For some targets, it is desirable to prefer scalarizing <N x i1> instead of promoting to a larger legal type, such as <N x i32>.

llvm-svn: 168882
2012-11-29 14:26:24 +00:00
Evgeniy Stepanov
fafa2ae4b6 [msan] Propagate shadow through (x<0) and (x>=0) comparisons.
This is a special case of signed relational comparison where result
only depends on the sign of x.

llvm-svn: 168881
2012-11-29 14:25:47 +00:00
Evgeniy Stepanov
fc6164c985 [msan] Fix shadow & origin store & load alignment.
This change ensures that shadow memory accesses have the same alignment
as corresponding app memory accesses.

llvm-svn: 168880
2012-11-29 14:05:53 +00:00
Evgeniy Stepanov
f8914133d8 [msan] Optimize getOriginPtr.
Rewrite getOriginPtr in a way that lets subsequent optimizations factor out
the common part of Shadow and Origin address calculation. Improves perf by
up to 5%.

llvm-svn: 168879
2012-11-29 13:43:05 +00:00
Evgeniy Stepanov
61a9349bab [msan] Fix a few compilation warnings.
llvm-svn: 168878
2012-11-29 13:12:03 +00:00
Evgeniy Stepanov
a193a72b44 [msan] Add a test for r168873.
llvm-svn: 168877
2012-11-29 13:11:09 +00:00
Evgeniy Stepanov
9a72b355fa [msan] Transform memcpy and memset to library calls.
This was already done for memmove, where it is required for correctness.
This change improves performance by avoiding copyingthe same memory twice.
Also, the library functions are given __msan_ prefix to prevent instcombine
pass from converting them back to intrinsics.

llvm-svn: 168876
2012-11-29 12:49:04 +00:00
Elena Demikhovsky
98c09d42c5 I changed hasAVX() to hasFp256() and hasAVX2() to hasInt256() in X86IselLowering.cpp.
The logic was not changed, only names.

llvm-svn: 168875
2012-11-29 12:44:59 +00:00
Evgeniy Stepanov
ad930ee08f [msan] Update tests (broken in r168873).
llvm-svn: 168874
2012-11-29 12:43:56 +00:00
Evgeniy Stepanov
a59f1bfbc8 [msan] Make sure that report callbacks do not get merged.
llvm-svn: 168873
2012-11-29 12:30:18 +00:00
Dmitri Gribenko
ee7b6022d6 Documentation: use correct highlighter
llvm-svn: 168871
2012-11-29 12:00:32 +00:00
Evgeniy Stepanov
6d7e99f2ac Initial commit of MemorySanitizer.
Compiler pass only.

llvm-svn: 168866
2012-11-29 09:57:20 +00:00
Kostya Serebryany
c034f162cc [asan/tsan] initialize the asan/tsan callbacks in runOnFunction as opposed to doInitialization. This is required to allow the upcoming changes in PassManager behavior
llvm-svn: 168864
2012-11-29 09:54:21 +00:00
Kostya Serebryany
5858a1aa4c [asan] when checking the noreturn attribute on the call, also check it on the callee
llvm-svn: 168861
2012-11-29 08:57:20 +00:00
Preston Briggs
c8bfeb9114 Cleaned up a couple of comments.
llvm-svn: 168854
2012-11-29 04:30:52 +00:00
Jakob Stoklund Olesen
9bbaa29b20 Use MCPhysReg for RegisterClassInfo allocation orders.
This saves a bit of memory.

llvm-svn: 168852
2012-11-29 03:34:17 +00:00
Jakob Stoklund Olesen
7cbcf348ea Add an MCPhysReg typedef to replace naked uint16_t.
Use this type for arrays of physical registers.

llvm-svn: 168850
2012-11-29 02:39:28 +00:00
Shuxin Yang
106133b571 Instruction::isAssociative() returns true for fmul/fadd if they are tagged "unsafe" mode.
Approved by: Eli and Michael.

llvm-svn: 168848
2012-11-29 01:47:31 +00:00
Jakob Stoklund Olesen
9dbb7d3582 Avoid rewriting instructions twice.
This could cause miscompilations in targets where sub-register
composition is not always idempotent (ARM).

<rdar://problem/12758887>

llvm-svn: 168837
2012-11-29 00:26:11 +00:00
Nick Lewycky
e0c05a9a92 Issue a fatal error if the line doesn't have a regular expression.
Also a couple not-user-visible changes; using empty() instead of size(), and
make inSection() not insert NULL Regex*'s into StringMap when doing a lookup.

llvm-svn: 168833
2012-11-29 00:01:38 +00:00
Nadav Rotem
3f31f2a3aa When combining consecutive stores allow loads in between the stores, if the loads do not alias.
llvm-svn: 168832
2012-11-29 00:00:08 +00:00
Bill Wendling
176de1b36b When we delete a dead basic block, see if any of its successors are dead and
delete those as well.

llvm-svn: 168829
2012-11-28 23:23:48 +00:00
Dmitri Gribenko
94185797ca Documentation: improve formatting and remove unneeded empty lines.
llvm-svn: 168817
2012-11-28 21:40:54 +00:00
Michael Ilseman
19c9ae38cf Whoops, fixed bad merge
llvm-svn: 168816
2012-11-28 21:21:18 +00:00
Michael Ilseman
8ff81910ee Fixed bad test case
llvm-svn: 168815
2012-11-28 21:19:52 +00:00
Michael Ilseman
1349abeb09 Fast-math: IRBuilder test for creating instructions with fast-math flags
llvm-svn: 168814
2012-11-28 21:17:34 +00:00
Michael Ilseman
e32ac01e3d Fast-math: Extend IRBuilder to have settable FastMathFlags to create instructions with
Also extended IRBuilder's documentation to mention the convenience state for DefaultFPMathTag and FastMathFlags that can be set.

llvm-svn: 168812
2012-11-28 21:16:19 +00:00
Michael Ilseman
fd4115d56f Fast-math comments and convenience method
llvm-svn: 168811
2012-11-28 21:11:25 +00:00
Jyotsna Verma
f5ca442d79 Define signed const-ext immediate operands and their predicates.
llvm-svn: 168810
2012-11-28 20:58:14 +00:00
Benjamin Kramer
bd65c85dc1 ARM: Implement CanLowerReturn so large vectors get expanded into sret.
Fixes 14337.

llvm-svn: 168809
2012-11-28 20:55:10 +00:00
Jakob Stoklund Olesen
5367ea889f Make the LiveRegMatrix analysis available to targets.
No functional change, just moved header files.

Targets can inject custom passes between register allocation and
rewriting. This makes it possible to tweak the register allocation
before rewriting, using the full global interference checking available
from LiveRegMatrix.

llvm-svn: 168806
2012-11-28 19:13:06 +00:00
Eli Bendersky
09ca9737c2 Add backreference matching capabilities to Support/Regex, with
appropriate unit tests. This change in itself is not expected to
affect any functionality at this point, but it will serve as a
stepping stone to improve FileCheck's variable matching capabilities.

Luckily, our regex implementation already supports backreferences,
although a bit of hacking is required to enable it. It supports both
Basic Regular Expressions (BREs) and Extended Regular Expressions
(EREs), without supporting backrefs for EREs, following POSIX strictly
in this respect. And EREs is what we actually use (rightly). This is
contrary to many implementations (including the default on Linux) of
POSIX regexes, that do allow backrefs in EREs.

Adding backref support to our EREs is a very simple change in the
regcomp parsing code. I fail to think of significant cases where it
would clash with existing things, and can bring more versatility to
the regexes we write. There's always the danger of a backref in a
specially crafted regex causing exponential matching times, but since
we mainly use them for testing purposes I don't think it's a big
problem. [it can also be placed behind a flag specific to FileCheck,
if needed].

For more details, see:

* http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-November/055840.html
* http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121126/156878.html

llvm-svn: 168802
2012-11-28 19:00:02 +00:00
Benjamin Kramer
25395b3e72 MCJIT depends on JIT.
Unbreaks the CMake shared library build. This is nasty and should be fixed
eventually.

llvm-svn: 168800
2012-11-28 18:35:35 +00:00
Ulrich Weigand
3ab1bb1fd8 Fix initial frame state on powerpc64.
The createPPCMCAsmInfo routine used PPC::R1 as the initial frame
pointer register, but on PPC64 the 32-bit R1 register does not
have a corresponding DWARF number, causing invalid CIE initial
frame state to be emitted.  Fix by using PPC::X1 instead.

llvm-svn: 168799
2012-11-28 18:21:03 +00:00
Patrik Hägglund
e0719dac71 Fix warning. [-Wunused-variable]
llvm-svn: 168792
2012-11-28 14:32:52 +00:00
Patrik Hägglund
9c1279a58f Add error handling in getInt.
Accordingly, update a testcase with a broken datalayout string.

Also, we never parse negative numbers, because '-' is used as a
separator. Therefore, use unsigned as result type.

llvm-svn: 168785
2012-11-28 12:13:12 +00:00
Kostya Serebryany
133cb3c737 [asan] Split AddressSanitizer into two passes (FunctionPass, ModulePass), LLVM part. This requires a clang part which will follow.
llvm-svn: 168781
2012-11-28 10:31:36 +00:00
Bill Wendling
74a6d23aba Add back support for reading and parsing 'deplibs'.
This is for backwards compatibility for pre-3.x bc files. The code reads the
code, but does nothing with it.

llvm-svn: 168779
2012-11-28 08:41:48 +00:00
Andrew Trick
ceeb35bbb8 misched: Analysis that partitions the DAG into subtrees.
This is a simple, cheap infrastructure for analyzing the shape of a
DAG. It recognizes uniform DAGs that take the shape of bottom-up
subtrees, such as the included matrix multiplication example. This is
useful for heuristics that balance register pressure with ILP. Two
canonical expressions of the heuristic are implemented in scheduling
modes: -misched-ilpmin and -misched-ilpmax.

llvm-svn: 168773
2012-11-28 05:13:28 +00:00
Andrew Trick
98bb349721 misched: rename ScheduleDAGILP to ScheduleDFS to prepare for other heuristics.
llvm-svn: 168772
2012-11-28 05:13:24 +00:00
Andrew Trick
7ba8fe7bcd misched: better alias analysis.
This fixes a hole in the "cheap" alias analysis logic implemented within
the DAG builder itself, regardless of whether proper alias analysis is
enabled. It now handles this pattern produced by LSR+CodeGenPrepare.

%sunkaddr1 = ptrtoint * %obj to i64
%sunkaddr2 = add i64 %sunkaddr1, %lsr.iv
%sunkaddr3 = inttoptr i64 %sunkaddr2 to i32*
store i32 %v, i32* %sunkaddr3

llvm-svn: 168768
2012-11-28 03:42:49 +00:00
Andrew Trick
32a5783347 misched: Debug output fix. Use an always valid iterator.
llvm-svn: 168767
2012-11-28 03:42:47 +00:00
Hal Finkel
e25b9ebee4 BBVectorize: Correctly merge SubclassOptionalData
When two instructions are combined into a vector instruction,
the resulting instruction must have the most-conservative flags.

llvm-svn: 168765
2012-11-28 03:04:10 +00:00
Eric Christopher
620ed2e185 Add brief support for the fission .debug_info.dwo section for
ELF output.

llvm-svn: 168764
2012-11-28 02:49:38 +00:00
Eric Christopher
b69e639093 Add comments.
llvm-svn: 168763
2012-11-28 02:49:34 +00:00
Eric Christopher
8d1a225ef8 Rearrange ordering of sections.
llvm-svn: 168762
2012-11-28 02:49:32 +00:00
Eric Christopher
6d3d2f6a2b Move and comment accessor routines.
llvm-svn: 168761
2012-11-28 02:49:28 +00:00
Jakob Stoklund Olesen
79c1e7f5af Remove all references to TargetInstrInfoImpl.
This class has been merged into its super-class TargetInstrInfo.

llvm-svn: 168760
2012-11-28 02:35:17 +00:00
Jakob Stoklund Olesen
43c340f4df Move the guts of TargetInstrInfoImpl into the TargetInstrInfo class.
The *Impl class no longer serves a purpose now that the super-class
implementation is in CodeGen.

llvm-svn: 168759
2012-11-28 02:35:13 +00:00
Jakob Stoklund Olesen
6106ff2b12 Move Target{Instr,Register}Info.cpp into lib/CodeGen.
The Target library is not allowed to depend on the large CodeGen
library, but the TRI and TII classes provide abstract interfaces that
require both caller and callee to link to CodeGen.

The implementation files for these classes provide default
implementations of some of the hooks. These methods may need to
reference CodeGen, so they belong in that library.

We already have a number of methods implemented in the
TargetInstrInfoImpl sub-class because of that. I will merge that class
into the parent next.

llvm-svn: 168758
2012-11-28 02:35:09 +00:00