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

87968 Commits

Author SHA1 Message Date
Nadav Rotem
cb3562a88e LoopVectorizer:
1. Add code to estimate register pressure.
2. Add code to select the unroll factor based on register pressure.
3. Add bits to TargetTransformInfo to provide the number of registers.

llvm-svn: 171469
2013-01-04 17:48:25 +00:00
Nadav Rotem
08d6ff1eaf Revert revision: 171467. This transformation is incorrect and makes some tests fail. Original message:
Simplified TRUNCATE operation that comes after SETCC. It is possible since SETCC result is 0 or -1.
Added a test.

llvm-svn: 171468
2013-01-04 17:35:21 +00:00
Elena Demikhovsky
d675e085b0 Simplified TRUNCATE operation that comes after SETCC. It is possible since SETCC result is 0 or -1.
Added a test.

llvm-svn: 171467
2013-01-03 08:48:33 +00:00
Michael Gottesman
5f81e1c2d0 Revert "Mark DIV/IDIV instructions hasSideEffects=1 because they can trap when dividing by 0. This is needed to keep early if conversion from moving them across basic blocks."
This reverts commit r171461 since it breaks the following tests:

Clang :: Analysis/outofbound-notwork.c
Clang :: Analysis/string-fail.c
Clang :: CXX/basic/basic.lookup/basic.lookup.qual/p6-0x.cpp
Clang :: CXX/basic/basic.lookup/basic.lookup.unqual/p15.cpp
Clang :: CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p4.cpp
Clang :: CXX/dcl.dcl/dcl.spec/dcl.stc/p10.cpp
Clang :: CXX/temp/temp.param/p14.cpp
Clang :: CXX/temp/temp.res/temp.dep.res/temp.point/p1.cpp
Clang :: CodeGen/2009-02-13-zerosize-union-field-ppc.c
Clang :: CodeGen/blocks-2.c
Clang :: CodeGen/libcalls-d.c
Clang :: CodeGen/libcalls-ld.c
Clang :: CodeGenCXX/conversion-function.cpp
Clang :: CodeGenCXX/debug-info-limit-type.cpp
Clang :: CodeGenCXX/inheriting-constructor.cpp
Clang :: FixIt/fixit-errors.c
Clang :: FixIt/fixit-pmem.cpp
Clang :: Modules/namespaces.cpp
Clang :: PCH/changed-files.c
Clang :: PCH/pr4489.c
Clang :: PCH/source-manager-stack.c
Clang :: Parser/cxx-ambig-decl-expr-xfail.cpp
Clang :: SemaCXX/switch-implicit-fallthrough-cxx98.cpp
Clang :: SemaTemplate/instantiate-function-1.mm

llvm-svn: 171466
2013-01-03 08:18:30 +00:00
Michael Gottesman
a67b835abe Changed two debug statements that state that a queue had finished being processed when said queue was really a list to state a list had finished being processed.
llvm-svn: 171465
2013-01-03 08:09:27 +00:00
Michael Gottesman
27dfca0765 Added DEBUG message for ObjCARC when we zap a push/pop pair in ObjCARCAPElim::OptimizeBB.
llvm-svn: 171464
2013-01-03 08:09:17 +00:00
Michael Gottesman
5c76a62ee6 Added DEBUG message to ObjCARC when we transform objc_initWeak(p, null) => *p = null.
llvm-svn: 171463
2013-01-03 07:32:53 +00:00
Michael Gottesman
fcffa87a15 Added DEBUG message for ObjCARC when an inline asm marker is inserted for architectures where this is required to perform a retainAutoreleasedReturnValue optimization.
llvm-svn: 171462
2013-01-03 07:32:41 +00:00
Craig Topper
e040f2bdfd Mark DIV/IDIV instructions hasSideEffects=1 because they can trap when dividing by 0. This is needed to keep early if conversion from moving them across basic blocks.
llvm-svn: 171461
2013-01-03 06:40:20 +00:00
Hal Finkel
ff21253111 Better comment on VTTI::getShuffleCost
llvm-svn: 171459
2013-01-03 05:02:41 +00:00
NAKAMURA Takumi
eaed684039 Compiler.h: Leave LLVM_BUILTIN_UNREACHABLE undefined if it is unavailable in host compiler.
Users of LLVM_BUILTIN_UNREACHABLE should be responsible in the case when LLVM_BUILTIN_UNREACHABLE is undefined.

Actually, (0, (p)) in LLVM_ASSUME_ALIGNED(p, a) caused thousands of warnings on g++-4.4. It was a motivation in this commit.

llvm-svn: 171455
2013-01-03 03:30:22 +00:00
Hal Finkel
121335da15 Add a subtype parameter to VTTI::getShuffleCost
In order to cost subvector insertion and extraction, we need to know
the type of the subvector being extracted.

No functionality change.

llvm-svn: 171453
2013-01-03 02:34:09 +00:00
Bill Wendling
bc7a24c036 Revert everything to r171366 to try to fix the build.
llvm-svn: 171450
2013-01-03 02:01:50 +00:00
Nadav Rotem
324a3ca6c4 Reformat the rst text.
llvm-svn: 171449
2013-01-03 01:56:33 +00:00
Bill Wendling
e0967fda18 Try again to revert the bad patch. The tree was reverted for some unknown reason
before the last time.

--- Reverse-merging r171442 into '.':
U    include/llvm/IR/Attributes.h
U    lib/IR/Attributes.cpp
U    lib/IR/AttributeImpl.h

llvm-svn: 171448
2013-01-03 01:54:39 +00:00
Hal Finkel
0d20c75b66 Add a default Index for VTTI::getShuffleCost
When Kind == (Broadcast or Reverse) then Index is not used; make it an optional parameter.

No functionality change.

llvm-svn: 171447
2013-01-03 01:50:51 +00:00
Nadav Rotem
ea6706d777 LoopVectorizer: Test the unrolling flag.
llvm-svn: 171446
2013-01-03 01:47:31 +00:00
Nadav Rotem
cbe45babb2 LoopVectorizer: Document the unrolling feature.
llvm-svn: 171445
2013-01-03 01:47:02 +00:00
Bill Wendling
bc6183b1fb Revert patch. Something snuck in there that shouldn't be.
--- Reverse-merging r171441 into '.':
U    include/llvm/IR/Attributes.h
U    lib/IR/Attributes.cpp

llvm-svn: 171444
2013-01-03 01:46:27 +00:00
Bill Wendling
aa9022eef7 Remove the 'contains' methods in favor of the 'operator==' method.
The 'operator==' method is a bit clearer and much less verbose for somethings
that should have only one value. Remove from the AttrBuilder for consistency.

llvm-svn: 171442
2013-01-03 01:43:05 +00:00
NAKAMURA Takumi
ecc0c04042 Revert r171427, "An intermediate step in the Attributes rewrite."
llvm-svn: 171441
2013-01-03 01:42:06 +00:00
Michael J. Spencer
8246b2fd6b [Object] Temporarily disable these tests.
They are failing because archives create unaligned ELF files. The recent
Endian change added a __builtin_unreachable() when this happens. I will be
committing a fix for this soon.

llvm-svn: 171438
2013-01-03 01:24:32 +00:00
Michael J. Spencer
41fcaf48a2 [MC][COFF] Switch the COFF streamer over to using the MCObjectStreamer version of EmitInstruction.
llvm-svn: 171437
2013-01-03 01:09:22 +00:00
Nadav Rotem
29dd0667aa LoopVectorizer: Add support for loop-unrolling during vectorization for increasing the ILP. At the moment this feature is disabled by default and this commit should not cause any functional changes.
llvm-svn: 171436
2013-01-03 00:52:27 +00:00
Jakob Stoklund Olesen
d8e706d6b0 Fix PR14732 by handling all kinds of IMPLICIT_DEF live ranges.
Most IMPLICIT_DEF instructions are removed by the ProcessImplicitDefs
pass, and a few are reinserted by PHIElimination when a PHI argument is
<undef>.

RegisterCoalescer was assuming that all IMPLICIT_DEF live ranges look
like those created by PHIElimination, and that their live range never
leaves the basic block.

The PR14732 test case does tricks with PHI nodes that causes a longer
IMPLICIT_DEF live range to appear. This happens very rarely, but
RegisterCoalescer should be able to handle it.

llvm-svn: 171435
2013-01-03 00:47:51 +00:00
Bill Wendling
afd76a7e67 Make the type signature more strict.
llvm-svn: 171434
2013-01-03 00:46:43 +00:00
Michael J. Spencer
23019c6d44 [CMake] MSVC is incorrectly emitting C4239 in some cases. Disable it.
llvm-svn: 171430
2013-01-03 00:00:40 +00:00
Nadav Rotem
a7cac72b7d Avoid vectorization when the function has the "noimplicitflot" attribute.
llvm-svn: 171429
2013-01-02 23:54:43 +00:00
Eric Christopher
03fdb543d9 Extend the dumping infrastructure to deal with additional
sections for debug info. These are some of the dwo sections from the
DWARF5 split debug info proposal. Update the fission-cu.ll testcase
to show what we should be able to dump more of now.

Work in progress: Ultimately the relocations will be gone for the
dwo section and the strings will be a different form (as well as
the rest of the sections will be included).

llvm-svn: 171428
2013-01-02 23:52:13 +00:00
Bill Wendling
4713ca594a An intermediate step in the Attributes rewrite.
Modify the AttrBuilder class to store the attributes as a set instead of as a
bit mask. The Attribute class will represent only one attribute instead of a
collection of attributes.

This is the wave of the future!

llvm-svn: 171427
2013-01-02 23:45:09 +00:00
Tom Stellard
ccd192dbc4 DAGCombiner: Avoid generating illegal vector INT_TO_FP nodes
DAGCombiner::reduceBuildVecConvertToConvertBuildVec() was making two
mistakes:

1. It was checking the legality of scalar INT_TO_FP nodes and then generating
vector nodes.

2. It was passing the result value type to
TargetLoweringInfo::getOperationAction() when it should have been
passing the value type of the first operand.

llvm-svn: 171420
2013-01-02 22:13:01 +00:00
Kevin Enderby
255beae3d9 Adds missing aliases for fcom and fcomp instructions without arguments.
Patch by Michael M Kuperstein!

llvm-svn: 171414
2013-01-02 21:20:15 +00:00
Argyrios Kyrtzidis
f2a855cbd7 Use a bool instead of a bitfield in llvm/ADT/Optional.
Fixes Valgrind failures and removes bitwise operations that don't provide any benefit.
Valgrind failures reported by NAKAMURA Takumi.

llvm-svn: 171413
2013-01-02 21:19:08 +00:00
Michael J. Spencer
49cbcf460d Restrict __builtin_assume_aligned to gcc 4.7+
llvm-svn: 171408
2013-01-02 20:23:49 +00:00
Michael J. Spencer
8e9968e6f2 [Support][Endian] Add support for specifying the alignment and native unaligned types.
* Add support for specifying the alignment to use.
* Add the concept of native endianness. Used for unaligned native types.

The native alignment and read/write simplification is based on a patch by Richard Smith.

llvm-svn: 171406
2013-01-02 20:14:11 +00:00
Argyrios Kyrtzidis
d33aff0073 Don't #include stuff outside the include guards.
This defeats the include-guard optimization when parsing.

llvm-svn: 171405
2013-01-02 19:42:53 +00:00
Shuxin Yang
c985c304e2 - Add comment to two functions which might be considered as dead code.
- Fix a typo

llvm-svn: 171399
2013-01-02 18:26:31 +00:00
Nadav Rotem
a16a83faf4 AVX: Fix a bug in WidenMaskArithmetic.
llvm-svn: 171398
2013-01-02 17:41:03 +00:00
Nadav Rotem
d6fb05fad0 AVX: Fix a bug in WidenMaskArithmetic.
llvm-svn: 171397
2013-01-02 17:40:39 +00:00
Chandler Carruth
aea306bbd2 Actually update the CMake and Makefile builds correctly, and update the
code that includes Intrinsics.gen directly.

This never showed up in my testing because the old Intrinsics.gen was
still kicking around in the make build system and was correct there. =[
Thankfully, some of the bots to clean rebuilds and that caught this.

llvm-svn: 171373
2013-01-02 12:09:16 +00:00
Chandler Carruth
0b1298b398 Update the examples for the new header file locations.
Sorry for the fallout here, I forgot the examples aren't built by
default any more.

llvm-svn: 171371
2013-01-02 11:56:33 +00:00
Chandler Carruth
4c1f3c24db Move all of the header files which are involved in modelling the LLVM IR
into their new header subdirectory: include/llvm/IR. This matches the
directory structure of lib, and begins to correct a long standing point
of file layout clutter in LLVM.

There are still more header files to move here, but I wanted to handle
them in separate commits to make tracking what files make sense at each
layer easier.

The only really questionable files here are the target intrinsic
tablegen files. But that's a battle I'd rather not fight today.

I've updated both CMake and Makefile build systems (I think, and my
tests think, but I may have missed something).

I've also re-sorted the includes throughout the project. I'll be
committing updates to Clang, DragonEgg, and Polly momentarily.

llvm-svn: 171366
2013-01-02 11:36:10 +00:00
Chandler Carruth
03fda8f594 Sort a few more #include lines in tools/... unittests/... and utils/...
llvm-svn: 171363
2013-01-02 10:26:28 +00:00
Chandler Carruth
5f5c383ef1 Resort the #include lines in include/... and lib/... with the
utils/sort_includes.py script.

Most of these are updating the new R600 target and fixing up a few
regressions that have creeped in since the last time I sorted the
includes.

llvm-svn: 171362
2013-01-02 10:22:59 +00:00
Chandler Carruth
02c8db726c Update the root Makefile for VMCore -> IR. Missed by my original search
sadly, and is somewhat surprising in general.

llvm-svn: 171361
2013-01-02 09:27:25 +00:00
Chandler Carruth
ef67831227 Update the configure scripts as well as the makefiles for the move from
VMCore to IR.

llvm-svn: 171360
2013-01-02 09:22:59 +00:00
Chandler Carruth
1879729aa9 Rename VMCore directory to IR.
Aside from moving the actual files, this patch only updates the build
system and the source file comments under lib/... that are relevant.

I'll be updating other docs and other files in smaller subsequnet
commits.

While I've tried to test this, but it is entirely possible that there
will still be some build system fallout.

Also, note that I've not changed the library name itself: libLLVMCore.a
is still the library name. I'd be interested in others' opinions about
whether we should rename this as well (I think we should, just not sure
what it might break)

llvm-svn: 171359
2013-01-02 09:10:48 +00:00
Craig Topper
23d1063500 Merge SSE and AVX instruction definitions for scalar forms of SQRT, RSQRT, and RCP.
llvm-svn: 171356
2013-01-02 08:00:39 +00:00
Craig Topper
f7827c5751 Merge SSE and AVX instruction definitions for PSHUFD/PSHUFHW/PSHUFLW.
llvm-svn: 171355
2013-01-02 07:27:49 +00:00
Sean Silva
f1f2909c86 docs: update docs/README.txt and make it useful.
llvm-svn: 171353
2013-01-02 02:31:51 +00:00