1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Commit Graph

52691 Commits

Author SHA1 Message Date
Nick Lewycky
f8600d16d3 Split part of EvaluateFunction into a new EvaluateBlock method. No functionality
change.

llvm-svn: 149861
2012-02-06 08:24:44 +00:00
Craig Topper
9de7cec5b8 Move some llvm_unreachable's from r149849 out of switch statements to satisfy -Wcovered-switch-default
llvm-svn: 149860
2012-02-06 08:17:43 +00:00
Craig Topper
74416bcd0e Add shuffle decoding support for 256-bit pshufd. Merge vpermilp* and pshufd decoding.
llvm-svn: 149859
2012-02-06 07:17:51 +00:00
Sebastian Pop
35b54121b3 fix indentation
llvm-svn: 149857
2012-02-06 05:29:32 +00:00
Sebastian Pop
6110622adf fix typo
llvm-svn: 149856
2012-02-06 05:29:29 +00:00
Craig Topper
e18a06be4d Convert assert(0) to llvm_unreachable
llvm-svn: 149849
2012-02-05 22:14:15 +00:00
Talin
176069f81d Efficient Constant Uniquing.
llvm-svn: 149848
2012-02-05 20:54:10 +00:00
Nick Lewycky
bad48a142a Teach GlobalOpt to handle atomic accesses to globals.
* Most of the transforms come through intact by having each transformed load or
store copy the ordering and synchronization scope of the original.
 * The transform that turns a global only accessed in main() into an alloca
(since main is non-recursive) with a store of the initial value uses an
unordered store, since it's guaranteed to be the first thing to happen in main.
(Threads may have started before main (!) but they can't have the address of a
function local before the point in the entry block we insert our code.)
 * The heap-SRoA transforms are disabled in the face of atomic operations. This
can probably be improved; it seems odd to have atomic accesses to an alloca
that doesn't have its address taken.

AnalyzeGlobal keeps track of the strongest ordering found in any use of the
global. This is more information than we need right now, but it's cheap to
compute and likely to be useful.

llvm-svn: 149847
2012-02-05 19:56:38 +00:00
Evan Cheng
f5efaef65b DefinesPredicate should only look for def operands. Patch by Ludwig Meier.
llvm-svn: 149846
2012-02-05 19:55:04 +00:00
Nick Lewycky
1c353dec9c Clean up some whitespace and comments. No functionality change.
llvm-svn: 149845
2012-02-05 19:48:37 +00:00
Duncan Sands
57f5ba6365 Neaten up this method. Check that if there is only one
predecessor then it's Src.

llvm-svn: 149843
2012-02-05 19:43:37 +00:00
Duncan Sands
13ce9d000a Remove dead test: this was already checked and handled a few lines
above.

llvm-svn: 149841
2012-02-05 19:30:06 +00:00
Duncan Sands
e5ea721ea5 Fix a thinko pointed out by Eli and the buildbots.
llvm-svn: 149839
2012-02-05 18:56:50 +00:00
Duncan Sands
eb56d51cfb Reduce the number of dom queries made by GVN's conditional propagation
logic by half: isOnlyReachableViaThisEdge was trying to be clever and
handle the case of a branch to a basic block which is contained in a
loop.  This costs a domtree lookup and is completely useless due to
GVN's position in the pass pipeline: all loops have preheaders at this
point, which means it is enough for isOnlyReachableViaThisEdge to check
that Dst has only one predecessor.  (I checked this theoretical argument
by running over the entire nightly testsuite, and indeed it is so!).

llvm-svn: 149838
2012-02-05 18:25:50 +00:00
Duncan Sands
9a5e527fde Reduce the number of non-trivial domtree queries by about 1% when
compiling sqlite3, by only doing dom queries after the cheap check
rather than interleaved with it.

llvm-svn: 149836
2012-02-05 15:50:43 +00:00
Duncan Sands
cc472eec96 Persuade GCC that there is nothing worth warning about here (there isn't).
llvm-svn: 149834
2012-02-05 14:20:11 +00:00
Duncan Sands
c1b9cbec06 Don't initialize CV in terms of itself! Spotted by GCC.
llvm-svn: 149833
2012-02-05 14:16:09 +00:00
Duncan Sands
cbb2815522 Explain to the compiler why TargetAddr is not used uninitialized later.
llvm-svn: 149832
2012-02-05 14:14:35 +00:00
Nadav Rotem
738ed9b0a5 Add additional documentation to the extract-and-trunc dagcombine optimization.
llvm-svn: 149823
2012-02-05 11:39:23 +00:00
Craig Topper
d218e7cb60 Convert assert(0) to llvm_unreachable
llvm-svn: 149816
2012-02-05 08:31:47 +00:00
Chandler Carruth
9db1b1bb0a Begin fleshing out more convenience predicates in llvm::Triple and
convert at least one client over to use them. Subsequent patches both to
LLVM and Clang will try to convert more people over to a common set of
predicates.

This round of predicates is focused on OS-categorization predicates.

llvm-svn: 149815
2012-02-05 08:26:40 +00:00
Craig Topper
dfa8617ab9 Convert assert(0) to llvm_unreachable
llvm-svn: 149814
2012-02-05 07:21:30 +00:00
David Blaikie
c067cc5305 Simplify contains tests using 'count'.
llvm-svn: 149813
2012-02-05 06:35:36 +00:00
NAKAMURA Takumi
7e1d4995af BBVectorize.cpp: Get rid of comparision to bool to fix a warning.
llvm-svn: 149810
2012-02-05 05:47:51 +00:00
Craig Topper
fe4a950689 Convert assert(0) to llvm_unreachable in X86 Target directory.
llvm-svn: 149809
2012-02-05 05:38:58 +00:00
Craig Topper
7b7867bbaa Convert some assert(0) in default of switch statements to llvm_unreachable.
llvm-svn: 149808
2012-02-05 03:43:23 +00:00
Craig Topper
07b9d056fa Add target specific node for PMULUDQ. Change patterns to use it and custom lower intrinsics to it. Use it instead of intrinsic to handle 64-bit vector multiplies.
llvm-svn: 149807
2012-02-05 03:14:49 +00:00
Chris Lattner
b14e44cf44 Improve the bitcode reader's handling of constant strings to use
ConstantDataArray::getString direction, instead of "boxing" each
byte into a ConstantInt and using ConstantArray::get.

llvm-svn: 149805
2012-02-05 02:41:35 +00:00
Chris Lattner
9782adedd7 reapply the patches reverted in r149470 that reenable ConstantDataArray,
but with a critical fix to the SelectionDAG code that optimizes copies
from strings into immediate stores: the previous code was stopping reading
string data at the first nul.  Address this by adding a new argument to
llvm::getConstantStringInfo, preserving the behavior before the patch.

llvm-svn: 149800
2012-02-05 02:29:43 +00:00
Craig Topper
c289726019 Remove most of the intrinsics for XOP VPCMOV instruction. They all aliased to the same instruction with different types. This would be better accomplished with casts in the not yet created xopintrin.h header file.
llvm-svn: 149795
2012-02-05 00:55:56 +00:00
Sean Callanan
122fc49297 Modified the Enhanced Disassembler to create and
cache disassemblers according to the string value
of the target triple, not according to the enum
of the triple CPU.  The reason for this is that
certain attributes of the instruction set are not
reflected in the enum, but only in the string.

llvm-svn: 149773
2012-02-04 07:45:35 +00:00
Jakob Stoklund Olesen
af71c23a28 Drop the REDEF_BY_EC VNInfo flag.
A live range that has an early clobber tied redef now looks like a
normal tied redef, except the early clobber def uses the early clobber
slot.

This is enough to handle any strange interference problems.

llvm-svn: 149769
2012-02-04 05:51:25 +00:00
Jakob Stoklund Olesen
8492adf8ed Correctly terminate a physreg redefined by an early clobber.
I don't have a test that fails because of this, but a test case like
CodeGen/X86/2009-12-01-EarlyClobberBug.ll exposes the problem.  EAX is
redefined by a tied early clobber operand on inline asm, and the live
range should look like this:

  %EAX,inf = [48r,64e:0)[64e,80r:1)  0@48r 1@64e

Previously, the two values got merged:

  %EAX,inf = [48r,80r:0)  0@48r

With this bug fixed, the REDEF_BY_EC VNInfo flag is no longer needed.

llvm-svn: 149768
2012-02-04 05:41:20 +00:00
Nick Lewycky
b617c97995 Fix a leak!
Andy, in a previous commit you made this into an ImmutablePass so that you could
add it to the PassManager, then in the next commit you left it a Pass but
removed the code that added it to the PM. If you do add it to the PM then the PM
should take care of deleting it, but it's also true that nothing in codegen
needs this object to exist after it's done its work here. It's not clear to me
which design you want; this should likely either cease to be a Pass or be added
to the PM where other parts of CodeGen will request it.

llvm-svn: 149765
2012-02-04 05:26:17 +00:00
Jakob Stoklund Olesen
44c5cece20 Don't store COPY pointers in VNInfo.
If a value is defined by a COPY, that instuction can easily and cheaply
be found by getInstructionFromIndex(VNI->def).

This reduces the size of VNInfo from 24 to 16 bytes, and improves
llc compile time by 3%.

llvm-svn: 149763
2012-02-04 05:20:49 +00:00
Hal Finkel
34ae699943 Boost the effective chain depth of loads and stores.
By default, boost the chain depth contribution of loads and stores. This will allow a load/store pair to vectorize even when it would not otherwise be long enough to satisfy the chain depth requirement.

llvm-svn: 149761
2012-02-04 04:14:04 +00:00
Qirun Zhang
78cd86ecbf remove the blank line from previous ci.
llvm-svn: 149758
2012-02-04 03:18:47 +00:00
Qirun Zhang
ea06b61d0c test commit.
add a blank line.

llvm-svn: 149757
2012-02-04 03:15:26 +00:00
Andrew Trick
fb574d1c19 TargetPassConfig: confine the MC configuration to TargetMachine.
Passes prior to instructon selection are now split into separate configurable stages.
Header dependencies are simplified.
The bulk of this diff is simply removal of the silly DisableVerify flags.

Sorry for the target header churn. Attempting to stabilize them.

llvm-svn: 149754
2012-02-04 02:56:59 +00:00
Andrew Trick
4af2e787de Move TargetPassConfig implementation into Passes.cpp
llvm-svn: 149753
2012-02-04 02:56:48 +00:00
Andrew Trick
7bc6010af2 Make TargetPassConfig an ImmutablePass so CodeGenPasses can query options
llvm-svn: 149752
2012-02-04 02:56:45 +00:00
Dylan Noblesmith
2692a852bb Object: avoid undefined behavior when bounds-checking
Don't form an out of bounds pointer just to test if it
would be out of bounds.

Also perform the same bounds checking for all the previous
mapped structures.

llvm-svn: 149750
2012-02-04 02:41:39 +00:00
Devang Patel
d8b253ddcd Emit new property tag.
llvm-svn: 149737
2012-02-04 01:30:32 +00:00
Devang Patel
9146918282 Update llvm debug version to support new structure and tag for Objective-C property's debug info.
llvm-svn: 149736
2012-02-04 01:30:01 +00:00
Devang Patel
7280b69925 Introduce DIObjCProperty. This will be used to encode objective-c property.
llvm-svn: 149732
2012-02-04 00:59:25 +00:00
Chad Rosier
ec3053c33c [fast-isel] HandlePHINodesInSuccessorBlocks() can promite i8 and i16 types too.
llvm-svn: 149730
2012-02-04 00:39:19 +00:00
Devang Patel
1de069d34a Add new tag and an attribute to support debug info for objective-c property.
llvm-svn: 149724
2012-02-03 23:57:08 +00:00
Jakob Stoklund Olesen
6fa2bf030b Trim headers.
llvm-svn: 149722
2012-02-03 23:51:15 +00:00
Jakob Stoklund Olesen
d29f6d792b Delete some dead code.
llvm-svn: 149717
2012-02-03 21:32:06 +00:00
Chad Rosier
a6e543e80b [fast-isel] Add support for URem.
llvm-svn: 149716
2012-02-03 21:23:45 +00:00