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

114422 Commits

Author SHA1 Message Date
Rafael Espindola
2e7290e23d Remember to move a type to the correct set when setting the body.
We would set the body of a struct type (therefore making it non-opaque)
but were forgetting to move it to the non-opaque set.

Fixes pr22807.

llvm-svn: 231442
2015-03-06 00:50:21 +00:00
Michael Gottesman
7fd3df0bda [objc-arc] Move the checking of whether or not we can match onto PtrStates and out of the main dataflow.
These refactored computations check whether or not we are at a stage
of the sequence where we can perform a match. This patch moves the
computation out of the main dataflow and into
{BottomUp,TopDown}PtrState.

llvm-svn: 231439
2015-03-06 00:34:42 +00:00
Michael Gottesman
44a01af1ff [objc-arc] Refactor (Re-)initialization of PtrState from dataflow -> {TopDown,BottomUp}PtrState Class.
This initialization occurs when we see a new retain or release. Before
we performed the actual initialization inline in the dataflow. That is
just messy.

llvm-svn: 231438
2015-03-06 00:34:39 +00:00
Michael Gottesman
e8f633ef7e [objc-arc] Create two subclasses of PtrState in preparation for moving per ptr state change behavior onto a PtrState class.
This will enable the main ObjCARCOpts dataflow to work with higher
level concepts such as "can this ptr state be modified by this ref
count" and not need to understand the nitty gritty details of how that
is determined. This makes the dataflow cleaner.

llvm-svn: 231437
2015-03-06 00:34:36 +00:00
Michael Gottesman
9eb7d50d22 [objc-arc] Extract out MDNodes into a cache structure so the information can be passed around.
llvm-svn: 231436
2015-03-06 00:34:33 +00:00
Michael Gottesman
18520dd445 [objc-arc] Remove annotations code.
It will always be in the history if it is needed again. Now it is just dead
code.

llvm-svn: 231435
2015-03-06 00:34:29 +00:00
Nadav Rotem
f095e52b93 Teach ComputeNumSignBits about signed reminder.
This optimization a continuation of r231140 that reasoned about signed div.

llvm-svn: 231433
2015-03-06 00:23:58 +00:00
Michael Gottesman
8db6488873 Fix build error.
llvm-svn: 231430
2015-03-05 23:57:07 +00:00
Michael Gottesman
c0588d3476 [objc-arc] Change some casts and loop iterators to use auto.
llvm-svn: 231427
2015-03-05 23:29:06 +00:00
Michael Gottesman
2c056fffac [objc-arc] Extract out state specific to a ref count from the main objc arc sequence dataflow. This will allow me to separate the actual ARC queries from the meat of the dataflow algorithm.
llvm-svn: 231426
2015-03-05 23:29:03 +00:00
Michael Gottesman
43db8da6a6 [objc-arc] Extract blot map vector into its own file. NFC.
llvm-svn: 231425
2015-03-05 23:28:58 +00:00
Ahmed Bougacha
a07940a0f3 [X86] Remove stale comment. NFC.
It turns out 256bit V[SZ]EXT nodes are still
generated by the new shuffle lowering, so this
is here to stay!

llvm-svn: 231422
2015-03-05 23:18:41 +00:00
Paul Robinson
1fde157419 All FileCheck directives allow patterns.
llvm-svn: 231418
2015-03-05 23:04:26 +00:00
Peter Collingbourne
4f5a1f3321 Go bindings: use MDNode::replaceAllUsesWith instead of MDTuple::replaceAllUsesWith.
Fixes llgo following Duncan's changes to debug info in r231082. llgo needs
to replace composite types, which are no longer represented using MDTuple.

llvm-svn: 231416
2015-03-05 22:55:38 +00:00
Philip Reames
442f27a805 [RewriteStatepointsForGC] Yet more test cases for relocation
At this point, we should have decent coverage of the involved code.  I've got a few more test cases to cleanup and submit, but what's here is already reasonable.

I've got a collection of liveness tests which will be posted for review along with a decent liveness algorithm in the next few days.  Once those are in, the code in this file should be well tested and I can start renaming things without risk of serious breakage.  

llvm-svn: 231414
2015-03-05 22:28:06 +00:00
Quentin Colombet
13bf507c39 [CODE_OWNERS] Change the ownership of register allocators.
llvm-svn: 231412
2015-03-05 22:15:17 +00:00
Benjamin Kramer
fc8295a8f7 Instructions: Use delegated constructors to reduce duplication
NFC.

llvm-svn: 231411
2015-03-05 22:05:26 +00:00
Sanjay Patel
e7dd0e711b [AVX] Lower / fast-isel scalar FP selects into VBLENDV instructions (PR22483)
This patch reduces code size for all AVX targets and increases speed for some chips.

SSE 4.1 introduced the useless (see code comments) 2-register form of BLENDV and
only in the packed float/double flavors.

AVX subsequently made the instruction useful by adding a 4-register operand form.

So we just need to paper over the lack of scalar forms of this instruction, complicate
the code to choose float or double forms, and use blendv on scalars since all FP is in
xmm registers anyway.

This gives us an approximately 50% speed up for a blendv microbenchmark sequence
on SandyBridge and Haswell:
blendv : 29.73 cycles/iter
logic : 43.15 cycles/iter

No new test cases with this patch because:

1. fast-isel-select-sse.ll tests the positive side for regular X86 lowering and fast-isel
2. sse-minmax.ll and fp-select-cmp-and.ll confirm that we're not firing for scalar selects without AVX
3. fp-select-cmp-and.ll and logical-load-fold.ll confirm that we're not firing for scalar selects with constants.

http://llvm.org/bugs/show_bug.cgi?id=22483

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

llvm-svn: 231408
2015-03-05 21:46:54 +00:00
Benjamin Kramer
cfe741989e SelectionDAGBuilder: Merge 3 copies of the limited precision exp2 emission code.
NFC intended.

llvm-svn: 231406
2015-03-05 21:13:08 +00:00
Andrew Kaylor
4692180b1d Fix uninitialized memory references in WinEHPrepare
llvm-svn: 231405
2015-03-05 21:06:42 +00:00
Benjamin Kramer
288ff9cec2 SDAG: Merge the meat of two ExpandAtomic implementations.
The copies already diverged, don't let them become any worse. Reduce
redundancy in code with a little macro metaprogramming.

llvm-svn: 231401
2015-03-05 20:04:29 +00:00
Ahmed Bougacha
c9b6f0f6b4 [AArch64] Teach AsmPrinter about GlobalAddress operands.
Fixes PR22761, rdar://20024866.
Differential Revision: http://reviews.llvm.org/D8042

llvm-svn: 231400
2015-03-05 20:04:21 +00:00
Philip Reames
bfe478d542 [RewriteStatepointsForGC] Add additional tests around relocation
These are focused around the actual relocation rewriting itself, not the rest of the infrastructure.

llvm-svn: 231399
2015-03-05 19:52:13 +00:00
Rafael Espindola
0acd6bd828 Use the correct func begin symbol in all places in ppc.
I missed an occurrence of the old symbol in my previous patch.

llvm-svn: 231398
2015-03-05 19:47:50 +00:00
Tom Stellard
c4e27ccc28 TableGen: Initialize ErrorInfo to ~0ULL in the MatchInstructionImpl
This is what all the targets check for and is consistent with the
initialized value of MissingFeatures, which is sometimes assinged
to ErrorInfo.

llvm-svn: 231397
2015-03-05 19:46:55 +00:00
Ahmed Bougacha
b54a536d6f [ARM] Enable vector extload combine for legal types.
This commit enables forming vector extloads for ARM.
It only does so for legal types, and when we can't fold the extension
in a wide/long form of the user instruction.

Enabling it for larger types isn't as good an idea on ARM as it is on
X86, because: 
- we pretend that extloads are legal, but end up generating vld+vmov
- we have instructions like vld {dN, dM}, which can't be generated
  when we "manually expand" extloads to vld+vmov.

For legal types, the combine doesn't fire that often: in the
integration tests only in a big endian testcase, where it removes a
pointless AND.

Related to rdar://19723053
Differential Revision: http://reviews.llvm.org/D7423

llvm-svn: 231396
2015-03-05 19:37:53 +00:00
Zachary Turner
45f53af20f Replace PrintStackTrace(FILE*) with PrintStackTrace(raw_ostream&)
This will be followed by a change on the clang side to update
the only user of this function with the new version.

Differential Revision: http://reviews.llvm.org/D8074
Reviewed By: Reid Kleckner

llvm-svn: 231392
2015-03-05 19:10:52 +00:00
Reid Kleckner
0cb21beeab Remove accidental errs() call in Verifier
llvm-svn: 231391
2015-03-05 19:05:25 +00:00
Rafael Espindola
22f2e68861 Use the generic Lfunc_begin label on ppc.
This removes yet another custom label to mark the start of a function.

llvm-svn: 231390
2015-03-05 18:55:50 +00:00
David Majnemer
bdce8557da X86: Optimize address mode matching for FRAME_ALLOC_RECOVER nodes
We know that the absolute symbol will be less than 2GB and thus will
always fit.

llvm-svn: 231389
2015-03-05 18:50:12 +00:00
Reid Kleckner
2ca079e10b Revert busted CallSite change from r231386
llvm-svn: 231388
2015-03-05 18:32:14 +00:00
Reid Kleckner
ac6ac7e242 Silence -Wmissing-braces warning from clang-cl
The first element of STACKFRAME64 is a struct and Clang wants us to put
braces around it's initialization. Instead, drop the zero. The result
should be the same.

llvm-svn: 231387
2015-03-05 18:26:58 +00:00
Reid Kleckner
d0e0d012a0 Replace llvm.frameallocate with llvm.frameescape
Turns out it's pretty straightforward and simplifies the implementation.

Reviewers: andrew.w.kaylor

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

llvm-svn: 231386
2015-03-05 18:26:34 +00:00
Erik Eckstein
a768d0b66c Revert r231276 (including r231277): Add a lock() function in PassRegistry to speed up multi-thread synchronization.
llvm-svn: 231385
2015-03-05 17:53:00 +00:00
Zachary Turner
207a6a5939 [Windows] Implement PrintStackTrace(FILE*)
llvm::sys::PrintBacktrace(FILE*) is supposed to print a backtrace
of the current thread given the current PC.  This function was
unimplemented on Windows, and instead the only time we could
print a backtrace was as the result of an exception through
LLVMUnhandledExceptionFilter.

This patch implements backtracing of self by using
RtlCaptureContext to get a CONTEXT for the current thread, and
moving the printing and StackWalk64 code to a common method that
printing own stack trace and printing stack trace of an exception
can use.

Differential Revision: http://reviews.llvm.org/D8068
Reviewed by: Reid Kleckner

llvm-svn: 231382
2015-03-05 17:47:52 +00:00
Simon Pilgrim
2d456bc887 [DagCombiner] Allow shuffles to merge through bitcasts
Currently shuffles may only be combined if they are of the same type, despite the fact that bitcasts are often introduced in between shuffle nodes (e.g. x86 shuffle type widening).

This patch allows a single input shuffle to peek through bitcasts and if the input is another shuffle will merge them, shuffling using the smallest sized type, and re-applying the bitcasts at the inputs and output instead.

Dropped old ShuffleToZext test - this patch removes the use of the zext and vector-zext.ll covers these anyhow.

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

llvm-svn: 231380
2015-03-05 17:14:04 +00:00
Duncan P. N. Exon Smith
89cacfd677 FileCheck: Document CHECK-SAME, follow-up to r230612
llvm-svn: 231379
2015-03-05 17:00:05 +00:00
Kit Barton
524562d9b6 While reviewing the changes to Clang to add builtin support for the vsld, vsrd, and vsrad instructions, it was pointed out that the builtins are generating the LLVM opcodes (shl, lshr, and ashr) not calls to the intrinsics. This patch changes the implementation of the vsld, vsrd, and vsrad instructions from from intrinsics to VXForm_1 instructions and makes them legal with P8 Altivec. It also removes the definition of the int_ppc_altivec_vsld, int_ppc_altivec_vsrd, and int_ppc_altivec_vsrad intrinsics.
llvm-svn: 231378
2015-03-05 16:24:38 +00:00
Igor Laevsky
26ad396d2f Revert change r231366 as it broke clang-native-arm-cortex-a9 Analysis/properties.m test.
llvm-svn: 231374
2015-03-05 15:41:14 +00:00
Elena Demikhovsky
a71b2e475e AVX-512, SKX: Enabled masked_load/store operations for this target.
Added lowering for ISD::CONCAT_VECTORS and ISD::INSERT_SUBVECTOR for i1 vectors,
it is needed to pass all masked_memop.ll tests for SKX.

llvm-svn: 231371
2015-03-05 15:11:35 +00:00
Frederic Riss
d26a047d24 Fix -Woverflow warning in unittest.
llvm-svn: 231368
2015-03-05 14:43:15 +00:00
Igor Laevsky
eb9f695bc2 Teach lowering to correctly handle invoke statepoint and gc results tied to them. Note that we still can not lower gc.relocates for invoke statepoints.
Also it extracts getCopyFromRegs helper function in SelectionDAGBuilder as we need to be able to customize type of the register exported from basic block during lowering of the gc.result.

llvm-svn: 231366
2015-03-05 14:11:21 +00:00
Arnaud A. de Grandmaison
2068314641 [PBQP] Use a local bit-matrix to speedup searching an edge in the graph.
Build time (user time) for building llvm+clang+lldb in release mode:
 - default allocator: 9086 seconds
 - with PBQP: 9126 seconds
 - with PBQP + local bit matrix cache: 9097 seconds

llvm-svn: 231360
2015-03-05 09:12:59 +00:00
Michael Kuperstein
92d61decb9 [InstCombine] Fix an assertion when fmul has a ConstantExpr operand
isNormalFp and isFiniteNonZeroFp should not assume vector operands can not be constant expressions.

Patch by Pawel Jurek <pawel.jurek@intel.com>
Differential Revision: http://reviews.llvm.org/D8053

llvm-svn: 231359
2015-03-05 08:38:57 +00:00
Craig Topper
1725891e03 Revert "[TableGen] Implement at least some support for multiple explicit results in an instruction pattern. No functional change to existing patterns."
This is failing on several build bots.

llvm-svn: 231358
2015-03-05 07:17:52 +00:00
Craig Topper
16dcd763b6 [TableGen] Implement at least some support for multiple explicit results in an instruction pattern. No functional change to existing patterns.
This should help with the AVX512 masked gather changes Elena is working on. This patch is derived from some of the changes Elena made to tablegen, but modified by me to support arbitrary number of results.

llvm-svn: 231357
2015-03-05 07:11:36 +00:00
Craig Topper
486d07b3d8 [TableGen] Add support constraining a vector type in a pattern to have a specific element type and for constraining a vector type to have the same number of elements as another vector type. This is useful for AVX512 mask operations so we relate the mask type to the type of the other arguments.
llvm-svn: 231356
2015-03-05 07:11:34 +00:00
Craig Topper
558157f7a7 [X86] Use vmovss to handle inserting an element into index 0 of a v8f32 vector of zeros.
llvm-svn: 231354
2015-03-05 06:38:42 +00:00
Frederic Riss
04bc89f177 Remove useless break after return.
Pointed out by Paul Robinson.

llvm-svn: 231353
2015-03-05 06:13:39 +00:00
Philip Reames
7b15cce9dd Add a few more performance tips
These came from my own experience and may not apply equally to all use cases.  Any alternate perspective anyone has should be used to refine these.  

As always, grammar and spelling adjustments are more than welcome.  Please just directly commit a fix if you see something problematic.

llvm-svn: 231352
2015-03-05 05:55:55 +00:00