1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

69856 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen
70f48f08c1 Move more fragments of spill weight calculation into CalcSpillWeights.h
Simplify the spill weight calculation a bit by bypassing
getApproximateInstructionCount() and using LiveInterval::getSize() directly.
This changes the computed spill weights, but only by a constant factor in each
function. It should not affect how spill weights compare against each other, and
so it shouldn't affect code generation.

llvm-svn: 125530
2011-02-14 23:15:38 +00:00
Devang Patel
4b1ea1ef94 Do not hoist @llvm.dbg.value. Here, @llvm.dbg.value is "referring" a value that is modified inside loop.
llvm-svn: 125529
2011-02-14 23:03:23 +00:00
Rafael Espindola
3c32af5834 Switch llvm to using comdats. For now always use groups with a single
section.

llvm-svn: 125526
2011-02-14 22:23:49 +00:00
Bob Wilson
e53a0cef51 PR9139: Specify ARM/Darwin triple for vector-DAGCombine.ll test.
The i64_buildvector test in this file relies on the alignment of i64 and
f64 types being the same, which is true for Darwin but not AAPCS.

llvm-svn: 125525
2011-02-14 22:12:50 +00:00
Evan Cheng
3685f86688 Fix PR8854. Track inserted copies to avoid read before write. Sorry, it's hard to reduce a sensible small test case.
llvm-svn: 125523
2011-02-14 21:50:37 +00:00
Bruno Cardoso Lopes
5eb7668012 A fail to match coprocessor number and register number must fail instead of assert.
llvm-svn: 125521
2011-02-14 21:10:33 +00:00
Oscar Fuentes
96b319a7d0 Add current binary and source directories to the header search list
for all compiler invocations.

llvm-svn: 125513
2011-02-14 20:13:58 +00:00
Chris Lattner
ee7f7c2494 revert my ConstantVector patch, it seems to have made the llvm-gcc
builders unhappy.

llvm-svn: 125504
2011-02-14 18:15:46 +00:00
Argyrios Kyrtzidis
c5c3ca71c0 Add the ClangSACheckersEmitter tablegen backend which will be used for the clang static analyzer.
llvm-svn: 125493
2011-02-14 17:58:52 +00:00
Rafael Espindola
a667a598aa Move broken HasCommonSymbols to ELFWriter.cpp.
llvm-svn: 125490
2011-02-14 16:51:08 +00:00
Bruno Cardoso Lopes
e65a98b127 Fix encoding and add parsing support for the arm/thumb CPS instruction:
- Add custom operand matching for imod and iflags.
- Rename SplitMnemonicAndCC to SplitMnemonic since it splits more than CC
  from mnemonic.
- While adding ".w" as an operand, don't change "Head" to avoid passing the
  wrong mnemonic to ParseOperand.
- Add asm parser tests.
- Add disassembler tests just to make sure it can catch all cps versions.

llvm-svn: 125489
2011-02-14 13:09:44 +00:00
Chris Lattner
34f32cb4c2 Switch ConstantVector::get to use ArrayRef instead of a pointer+size
idiom.  Change various clients to simplify their code.

llvm-svn: 125487
2011-02-14 07:55:32 +00:00
Chris Lattner
cf712db15a add a new ArrayRef class. This is intended to replace the idiom we
use in many places where we pass a pointer and size to abstract APIs
that can take C arrays, std::vector, SmallVector, etc.  It is to arrays
what StringRef is to strings.

llvm-svn: 125486
2011-02-14 07:35:09 +00:00
Chris Lattner
68d9fae34e fix PR9210 by implementing some type legalization logic for
vector fp conversions.

llvm-svn: 125482
2011-02-14 06:30:45 +00:00
Chris Lattner
2552afcae6 fix two comment thinkos
llvm-svn: 125481
2011-02-14 06:14:42 +00:00
Nick Lewycky
e980f95634 Fix typo in comment.
llvm-svn: 125480
2011-02-14 06:14:20 +00:00
Cameron Zwarich
781aa81cd7 Add some statistics to StrongPHIElimination.
llvm-svn: 125477
2011-02-14 02:09:18 +00:00
Cameron Zwarich
9e4c747e53 Add a statistic to PHIElimination tracking the number of critical edges split.
llvm-svn: 125476
2011-02-14 02:09:11 +00:00
Chris Lattner
f427f729cd missed a header
llvm-svn: 125471
2011-02-13 22:30:09 +00:00
Chris Lattner
bcf2d46d8a Enhance ComputeMaskedBits to know that aligned frameindexes
have their low bits set to zero.  This allows us to optimize
out explicit stack alignment code like in stack-align.ll:test4 when
it is redundant.

Doing this causes the code generator to start turning FI+cst into
FI|cst all over the place, which is general goodness (that is the
canonical form) except that various pieces of the code generator
don't handle OR aggressively.  Fix this by introducing a new
SelectionDAG::isBaseWithConstantOffset predicate, and using it
in places that are looking for ADD(X,CST).  The ARM backend in
particular was missing a lot of addressing mode folding opportunities
around OR.

llvm-svn: 125470
2011-02-13 22:25:43 +00:00
Tobias Grosser
971b2df868 Adapt docs to '-loopsimplify -> -loop-simplify' change
llvm-svn: 125469
2011-02-13 20:57:25 +00:00
Chris Lattner
4286019ee4 fix thinko :)
llvm-svn: 125466
2011-02-13 19:53:36 +00:00
Chris Lattner
c9c0de6faf Revisit my fix for PR9028: the issue is that DAGCombine was
generating i8 shift amounts for things like i1024 types.  Add
an assert in getNode to prevent this from occuring in the future,
fix the buggy transformation, revert my previous patch, and
document this gotcha in ISDOpcodes.h

llvm-svn: 125465
2011-02-13 19:09:16 +00:00
Chris Lattner
dff71eae10 remove a now-unneccesary cast.
llvm-svn: 125464
2011-02-13 18:30:09 +00:00
Duncan Sands
7c17535a11 Remove pointless blank line.
llvm-svn: 125463
2011-02-13 18:11:05 +00:00
Duncan Sands
c5e791fdd9 Teach instsimplify that X+Y>=X+Z is the same as Y>=Z if neither side overflows,
plus some variations of this.  According to my auto-simplifier this occurs a lot
but usually in combination with max/min idioms.  Because max/min aren't handled
yet this unfortunately doesn't have much effect in the testsuite.

llvm-svn: 125462
2011-02-13 17:15:40 +00:00
Nadav Rotem
98c5af8517 Fix test
llvm-svn: 125460
2011-02-13 16:13:16 +00:00
Nadav Rotem
3ce2bfbb55 Fix a regression from r125393;
It caused a crash in MultiSource/Benchmarks/Bullet.
Opt hit an assertion with "opt -std-compile-opts" because
Constant::getAllOnesValue doesn't know how to handle floats.

This patch added a test to reproduce the problem and a check that the
destination vector is of integer type.

Thank you Benjamin!

llvm-svn: 125459
2011-02-13 15:45:34 +00:00
Chris Lattner
378faeecc8 when legalizing extremely wide shifts, make sure that
the shift amounts are in a suitably wide type so that
we don't generate out of range constant shift amounts.

This fixes PR9028.

llvm-svn: 125458
2011-02-13 09:10:56 +00:00
Chris Lattner
47e8019142 fix visitShift to properly zero extend the shift amount if the provided operand
is narrower than the shift register.  Doing an anyext provides undefined bits in
the top part of the register.

llvm-svn: 125457
2011-02-13 09:02:52 +00:00
Chris Lattner
9a0f0331f2 improve solaris support, from PR9109, patch by Yuri!
llvm-svn: 125456
2011-02-13 08:38:44 +00:00
Chris Lattner
4362c74d13 add PR#
llvm-svn: 125455
2011-02-13 08:27:31 +00:00
Chris Lattner
72b78e11ba implement instcombine folding for things like (x >> c) < 42.
We were previously simplifying divisions, but not right shifts!

llvm-svn: 125454
2011-02-13 08:07:21 +00:00
Chris Lattner
307c1d4847 add a helper method.
llvm-svn: 125453
2011-02-13 08:04:16 +00:00
Argyrios Kyrtzidis
aded28619c Wrap the struct in an anonymous namespace.
llvm-svn: 125452
2011-02-13 07:51:19 +00:00
Chris Lattner
dd3cc1b409 refactor some code out into a helper method.
llvm-svn: 125451
2011-02-13 07:43:07 +00:00
Chris Lattner
2596ac19b9 teach SCEV that the scale and addition of an inbounds gep don't NSW.
This fixes a FIXME in scev-aa.ll (allowing a new no-alias result) and
generally makes things more precise.

llvm-svn: 125449
2011-02-13 03:14:49 +00:00
Reid Kleckner
0e68b2ed88 Add encodings and mnemonics for FXSAVE64 and FXRSTOR64.
These are just FXSAVE and FXRSTOR with REX.W prefixes.  These versions use
64-bit pointer values instead of 32-bit pointer values in the memory map they
dump and restore.

llvm-svn: 125446
2011-02-12 23:24:13 +00:00
Venkatraman Govindaraju
3cc16c2b89 Prevent IMPLICIT_DEF/KILL to become a delay filler instruction in SPARC backend.
llvm-svn: 125444
2011-02-12 19:02:33 +00:00
Daniel Dunbar
74c3b94237 SimplifyLibCalls: Add missing legalize check on various printf to puts and
putchar transforms, their return values are not compatible.

llvm-svn: 125442
2011-02-12 18:19:57 +00:00
Daniel Dunbar
33aae18345 tests: FileCheckize
llvm-svn: 125441
2011-02-12 18:19:53 +00:00
Rafael Espindola
d3124f22fd Preserve aliases if needed.
llvm-svn: 125439
2011-02-12 18:03:13 +00:00
Benjamin Kramer
19bcaa5d51 Add a note about SSE4.1 roundss/roundsd.
llvm-svn: 125438
2011-02-12 17:58:16 +00:00
Nadav Rotem
367d73ccb6 A fix for 9165.
The DAGCombiner created illegal BUILD_VECTOR operations.
The patch added a check that either illegal operations are
allowed or that the created operation is legal.

llvm-svn: 125435
2011-02-12 14:40:33 +00:00
Jim Grosbach
c359122d78 AsmMatcher custom operand parser failure enhancements.
Teach the AsmMatcher handling to distinguish between an error custom-parsing
an operand and a failure to match. The former should propogate the error
upwards, while the latter should continue attempting to parse with
alternative matchers.

Update the ARM asm parser accordingly.

llvm-svn: 125426
2011-02-12 01:34:40 +00:00
Rafael Espindola
1f29f4f844 Fix a silly bug I introduced when dropping std::string.
llvm-svn: 125420
2011-02-12 00:19:56 +00:00
Chris Lattner
6db1d329ce attempt to capture recent discussion about overflow and inbounds geps.
llvm-svn: 125412
2011-02-11 21:50:52 +00:00
Benjamin Kramer
793cd269de Also fold (A+B) == A -> B == 0 when the add is commuted.
llvm-svn: 125411
2011-02-11 21:46:48 +00:00
Chris Lattner
fec8b6bd6d Per discussion with Dan G, inbounds geps *certainly* can have
unsigned overflow (e.g. "gep P, -1"), and while they can have
signed wrap in theoretical situations, modelling an AddRec as
not having signed wrap is going enough for any case we can 
think of today.  In the future if this isn't enough, we can
revisit this.  Modeling them as having NUW isn't causing any
known problems either FWIW.

llvm-svn: 125410
2011-02-11 21:43:33 +00:00
Chris Lattner
6c0014cd4a When lowering an inbounds gep, the intermediate adds can have
unsigned overflow (e.g. due to a negative array index), but
the scales on array size multiplications are known to not
sign wrap.

llvm-svn: 125409
2011-02-11 21:37:43 +00:00