Bruno Cardoso Lopes [Fri, 6 Mar 2015 13:49:05 +0000 (13:49 +0000)]
[AsmPrinter][TLOF] 32-bit MachO support for replacing GOT equivalents
Add MachO 32-bit (i.e. arm and x86) support for replacing global GOT equivalent
symbol accesses. Unlike 64-bit targets, there's no GOTPCREL relocation, and
access through a non_lazy_symbol_pointers section is used instead.
-- before
_extgotequiv:
.long _extfoo
_delta:
.long _extgotequiv-_delta
-- after
_delta:
.long L_extfoo$non_lazy_ptr-_delta
.section __IMPORT,__pointers,non_lazy_symbol_pointers
L_extfoo$non_lazy_ptr:
.indirect_symbol _extfoo
.long 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231475
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Fri, 6 Mar 2015 13:48:45 +0000 (13:48 +0000)]
[AsmPrinter][TLOF] ARM64 MachO support for replacing GOT equivalents
Follow up r230264 and add ARM64 support for replacing global GOT
equivalent symbol accesses by references to the GOT entry for the final
symbol instead, example:
-- before
.globl _foo
_foo:
.long 42
.globl _gotequivalent
_gotequivalent:
.quad _foo
.globl _delta
_delta:
.long _gotequivalent-_delta
-- after
.globl _foo
_foo:
.long 42
.globl _delta
Ltmp3:
.long _foo@GOT-Ltmp3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231474
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 6 Mar 2015 13:46:50 +0000 (13:46 +0000)]
CodingStyle: Allow delegating ctors
Delegating constructors seem to work fine with all supported compilers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231473
91177308-0d34-0410-b5e6-
96231b3b80d8
Toma Tabacu [Fri, 6 Mar 2015 12:15:12 +0000 (12:15 +0000)]
[mips] [IAS] Add missing constraints and improve testing for the .module directive.
Summary:
None of the .set directives can be used before the .module directives. The .set mips0/pop/push were not triggering this constraint.
Also added testing for all the other implemented directives which are supposed to trigger this constraint.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7140
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231465
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Fri, 6 Mar 2015 10:39:14 +0000 (10:39 +0000)]
Change the way in which error case is being handled.
Specifically this:
* Prevents an "unused" warning in non-assert builds.
* In that error case return with out removing a child loop instead of
looping forever.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231459
91177308-0d34-0410-b5e6-
96231b3b80d8
Karthik Bhat [Fri, 6 Mar 2015 10:11:25 +0000 (10:11 +0000)]
Add a new pass "Loop Interchange"
This pass interchanges loops to provide a more cache-friendly memory access.
For e.g. given a loop like -
for(int i=0;i<N;i++)
for(int j=0;j<N;j++)
A[j][i] = A[j][i]+B[j][i];
is interchanged to -
for(int j=0;j<N;j++)
for(int i=0;i<N;i++)
A[j][i] = A[j][i]+B[j][i];
This pass is currently disabled by default.
To give a brief introduction it consists of 3 stages-
LoopInterchangeLegality : Checks the legality of loop interchange based on Dependency matrix.
LoopInterchangeProfitability: A very basic heuristic has been added to check for profitibility. This will evolve over time.
LoopInterchangeTransform : Which does the actual transform.
LNT Performance tests shows improvement in Polybench/linear-algebra/kernels/mvt and Polybench/linear-algebra/kernels/gemver becnmarks.
TODO:
1) Add support for reductions and lcssa phi.
2) Improve profitability model.
3) Improve loop selection algorithm to select best loop for interchange. Currently the innermost loop is selected for interchange.
4) Improve compile time regression found in llvm lnt due to this pass.
5) Fix issues in Dependency Analysis module.
A special thanks to Hal for reviewing this code.
Review: http://reviews.llvm.org/D7499
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231458
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 6 Mar 2015 08:11:32 +0000 (08:11 +0000)]
X86: Form IMGREL relocations for LLVM Functions
We supported forming IMGREL relocations from ConstantExprs involving
__ImageBase if the minuend was a GlobalVariable. Extend this
functionality to all GlobalObjects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231456
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Fri, 6 Mar 2015 07:49:14 +0000 (07:49 +0000)]
Silence C4715 'not all control paths return a value' warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231455
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Fri, 6 Mar 2015 06:07:32 +0000 (06:07 +0000)]
Support: Improve performance of FileOutputBuffer on Windows
We extend an underlying file before mmap'ing it, but it's not needed
on Windows. Extending file is slow on Windows, so we should avoid doing that.
The difference gets larger as the size of an output file gets larger.
It shove off 2 seconds out of 25 seconds when linking chrome.dll with LLD,
for example.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231452
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Fri, 6 Mar 2015 02:10:03 +0000 (02:10 +0000)]
[objc-arc] Sprinkle some more auto on some iterators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231447
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Fri, 6 Mar 2015 02:07:12 +0000 (02:07 +0000)]
[objc-arc] Move the detection of potential uses or altering of a ref count onto PtrState.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231446
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zolotukhin [Fri, 6 Mar 2015 01:13:01 +0000 (01:13 +0000)]
LegalizeTypes: Handle shift by 0 in ExpandShiftByConstant.
Though such shifts are usually optimized away by combiner, we still can
encounter them after a vector shift is legalized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231443
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 6 Mar 2015 00:50:21 +0000 (00:50 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231442
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Fri, 6 Mar 2015 00:34:42 +0000 (00:34 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231439
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Fri, 6 Mar 2015 00:34:39 +0000 (00:34 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231438
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Fri, 6 Mar 2015 00:34:36 +0000 (00:34 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231437
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Fri, 6 Mar 2015 00:34:33 +0000 (00:34 +0000)]
[objc-arc] Extract out MDNodes into a cache structure so the information can be passed around.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231436
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Fri, 6 Mar 2015 00:34:29 +0000 (00:34 +0000)]
[objc-arc] Remove annotations code.
It will always be in the history if it is needed again. Now it is just dead
code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231435
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 6 Mar 2015 00:23:58 +0000 (00:23 +0000)]
Teach ComputeNumSignBits about signed reminder.
This optimization a continuation of r231140 that reasoned about signed div.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231433
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Thu, 5 Mar 2015 23:57:07 +0000 (23:57 +0000)]
Fix build error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231430
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Thu, 5 Mar 2015 23:29:06 +0000 (23:29 +0000)]
[objc-arc] Change some casts and loop iterators to use auto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231427
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Thu, 5 Mar 2015 23:29:03 +0000 (23:29 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231426
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Thu, 5 Mar 2015 23:28:58 +0000 (23:28 +0000)]
[objc-arc] Extract blot map vector into its own file. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231425
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Thu, 5 Mar 2015 23:18:41 +0000 (23:18 +0000)]
[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!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231422
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Thu, 5 Mar 2015 23:04:26 +0000 (23:04 +0000)]
All FileCheck directives allow patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231418
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 5 Mar 2015 22:55:38 +0000 (22:55 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231416
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 5 Mar 2015 22:28:06 +0000 (22:28 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231414
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Thu, 5 Mar 2015 22:15:17 +0000 (22:15 +0000)]
[CODE_OWNERS] Change the ownership of register allocators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231412
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 5 Mar 2015 22:05:26 +0000 (22:05 +0000)]
Instructions: Use delegated constructors to reduce duplication
NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231411
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 5 Mar 2015 21:46:54 +0000 (21:46 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231408
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 5 Mar 2015 21:13:08 +0000 (21:13 +0000)]
SelectionDAGBuilder: Merge 3 copies of the limited precision exp2 emission code.
NFC intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231406
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Thu, 5 Mar 2015 21:06:42 +0000 (21:06 +0000)]
Fix uninitialized memory references in WinEHPrepare
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231405
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 5 Mar 2015 20:04:29 +0000 (20:04 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231401
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Thu, 5 Mar 2015 20:04:21 +0000 (20:04 +0000)]
[AArch64] Teach AsmPrinter about GlobalAddress operands.
Fixes PR22761, rdar://
20024866.
Differential Revision: http://reviews.llvm.org/D8042
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231400
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 5 Mar 2015 19:52:13 +0000 (19:52 +0000)]
[RewriteStatepointsForGC] Add additional tests around relocation
These are focused around the actual relocation rewriting itself, not the rest of the infrastructure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231399
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 5 Mar 2015 19:47:50 +0000 (19:47 +0000)]
Use the correct func begin symbol in all places in ppc.
I missed an occurrence of the old symbol in my previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231398
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 5 Mar 2015 19:46:55 +0000 (19:46 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231397
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Thu, 5 Mar 2015 19:37:53 +0000 (19:37 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231396
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 5 Mar 2015 19:10:52 +0000 (19:10 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231392
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 5 Mar 2015 19:05:25 +0000 (19:05 +0000)]
Remove accidental errs() call in Verifier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231391
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 5 Mar 2015 18:55:50 +0000 (18:55 +0000)]
Use the generic Lfunc_begin label on ppc.
This removes yet another custom label to mark the start of a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231390
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 5 Mar 2015 18:50:12 +0000 (18:50 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231389
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 5 Mar 2015 18:32:14 +0000 (18:32 +0000)]
Revert busted CallSite change from r231386
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231388
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 5 Mar 2015 18:26:58 +0000 (18:26 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231387
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 5 Mar 2015 18:26:34 +0000 (18:26 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231386
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Eckstein [Thu, 5 Mar 2015 17:53:00 +0000 (17:53 +0000)]
Revert r231276 (including r231277): Add a lock() function in PassRegistry to speed up multi-thread synchronization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231385
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 5 Mar 2015 17:47:52 +0000 (17:47 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231382
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 5 Mar 2015 17:14:04 +0000 (17:14 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231380
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 5 Mar 2015 17:00:05 +0000 (17:00 +0000)]
FileCheck: Document CHECK-SAME, follow-up to r230612
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231379
91177308-0d34-0410-b5e6-
96231b3b80d8
Kit Barton [Thu, 5 Mar 2015 16:24:38 +0000 (16:24 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231378
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Laevsky [Thu, 5 Mar 2015 15:41:14 +0000 (15:41 +0000)]
Revert change r231366 as it broke clang-native-arm-cortex-a9 Analysis/properties.m test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231374
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Thu, 5 Mar 2015 15:11:35 +0000 (15:11 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231371
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Thu, 5 Mar 2015 14:43:15 +0000 (14:43 +0000)]
Fix -Woverflow warning in unittest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231368
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Laevsky [Thu, 5 Mar 2015 14:11:21 +0000 (14:11 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231366
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnaud A. de Grandmaison [Thu, 5 Mar 2015 09:12:59 +0000 (09:12 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231360
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Thu, 5 Mar 2015 08:38:57 +0000 (08:38 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231359
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 5 Mar 2015 07:17:52 +0000 (07:17 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231358
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 5 Mar 2015 07:11:36 +0000 (07:11 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231357
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 5 Mar 2015 07:11:34 +0000 (07:11 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231356
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 5 Mar 2015 06:38:42 +0000 (06:38 +0000)]
[X86] Use vmovss to handle inserting an element into index 0 of a v8f32 vector of zeros.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231354
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Thu, 5 Mar 2015 06:13:39 +0000 (06:13 +0000)]
Remove useless break after return.
Pointed out by Paul Robinson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231353
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 5 Mar 2015 05:55:55 +0000 (05:55 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231352
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Thu, 5 Mar 2015 05:29:05 +0000 (05:29 +0000)]
Revert "[dsymutil] MSVC does generate move constructors, but it should accept to default them"
This reverts commit r231350.
It turns out MSVC doesn't generate implicit move constructors and also doesn't accept to default them...
See for example http://lab.llvm.org:8011/builders/lldb-x86-windows-msvc/builds/2786
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231351
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Thu, 5 Mar 2015 05:17:06 +0000 (05:17 +0000)]
[dsymutil] MSVC does generate move constructors, but it should accept to default them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231350
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 5 Mar 2015 05:11:05 +0000 (05:11 +0000)]
Add a link to the new PerformanceTips docs from the 3.7 release notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231349
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 5 Mar 2015 03:24:49 +0000 (03:24 +0000)]
Revert r231324 "Remove the conditional addition of the execution dependency fixing"
See PR22799.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231348
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 5 Mar 2015 03:19:05 +0000 (03:19 +0000)]
[MBP] Use range based for-loops throughout this code. Several had
already been added and the inconsistency made choosing names and
changing code more annoying. Plus, wow are they better for this code!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231347
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 5 Mar 2015 02:35:31 +0000 (02:35 +0000)]
[MBP] NFC, run clang-format over this code and tweak things to make the
result reasonable.
This code predated clang-format and so there was a reasonable amount of
crufty formatting that had accumulated. This should ensure that neither
myself nor others end up with formatting-only changes sneaking into
other fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231341
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 5 Mar 2015 02:28:25 +0000 (02:28 +0000)]
[MBP] This is no longer 'block-placement2'. ;] The old variants are long
gone, update this code to reflect that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231340
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 5 Mar 2015 02:05:42 +0000 (02:05 +0000)]
Use the existing begin and end symbol for debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231338
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 5 Mar 2015 01:25:19 +0000 (01:25 +0000)]
Reformat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231336
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 5 Mar 2015 01:25:12 +0000 (01:25 +0000)]
Revert r231103, "FullDependenceAnalysis: Avoid using the (deprecated in C++11) copy ctor"
It is miscompiled on msc18.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231335
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 5 Mar 2015 01:25:06 +0000 (01:25 +0000)]
Revert r231104, "unique_ptrify FullDependenceAnalysis::DV", to appease msc18 C2280.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231334
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 5 Mar 2015 01:20:05 +0000 (01:20 +0000)]
[sanitizer] add nosanitize metadata to more coverage instrumentation instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231333
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 5 Mar 2015 01:07:03 +0000 (01:07 +0000)]
[MBP] Revert r231238 which attempted to fix a nasty bug where MBP is
just arbitrarily interleaving unrelated control flows once they get
moved "out-of-line" (both outside of natural CFG ordering and with
diamonds that cannot be fully laid out by chaining fallthrough edges).
This easy solution doesn't work in practice, and it isn't just a small
bug. It looks like a very different strategy will be required. I'm
working on that now, and it'll again go behind some flag so that
everyone can experiment and make sure it is working well for them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231332
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 5 Mar 2015 01:02:45 +0000 (01:02 +0000)]
ScalarEvolution.cpp: Appease g++-4.7. He missed implicit "this" in lambda.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231331
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 5 Mar 2015 00:28:55 +0000 (00:28 +0000)]
Remove the conditional addition of the execution dependency fixing
pass from the ARM backend as the pass itself will detect any use
of the appropriate register class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231324
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 5 Mar 2015 00:23:40 +0000 (00:23 +0000)]
Cleanup and remove a chunk of getARMSubtarget calls in the
ARM TargetMachine pass pipeline construction by pushing them down
into the appropriate pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231323
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Thu, 5 Mar 2015 00:08:27 +0000 (00:08 +0000)]
Turn off .debug_pubnames/pubtypes for PS4.
Differential Revision: http://reviews.llvm.org/D8067
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231322
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Wed, 4 Mar 2015 23:17:31 +0000 (23:17 +0000)]
Initializer lists are supported in MSVC 2013. Since that's our minimum required version, we can move that to the list of acceptable C++11 features.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231313
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 4 Mar 2015 22:54:38 +0000 (22:54 +0000)]
[Support] Increase timeout for the LockFileManager back to 5 mins.
Waiting for just 1 min may not be enough for some contexts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231309
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 4 Mar 2015 22:31:18 +0000 (22:31 +0000)]
Improve test robustness
Improve test robustness in preparation of coming commits:
- Avoid undefs which may get propagated too much.
- Remove several pointless add 0, instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231307
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 4 Mar 2015 22:24:23 +0000 (22:24 +0000)]
[IndVarSimplify] use the "canonical" way to infer no-wrap.
Summary:
rL225282 introduced an ad-hoc way to promote some additions to nuw or
nsw. Since then SCEV has become smarter in directly proving no-wrap;
and using the canonical "ext(A op B) == ext(A) op ext(B)" method of
proving no-wrap is just as powerful now. Rip out the existing
complexity in favor of getting SCEV to do all the heaving lifting
internally.
This change does not add any unit tests because it is supposed to be a
non-functional change. Tests added in rL225282 and rL226075 are valid
tests for this change.
Reviewers: atrick, majnemer
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7981
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231306
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 4 Mar 2015 22:24:17 +0000 (22:24 +0000)]
[SCEV] make SCEV smarter about proving no-wrap.
Summary:
Teach SCEV to prove no overflow for an add recurrence by proving
something about the range of another add recurrence a loop-invariant
distance away from it.
Reviewers: atrick, hfinkel
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7980
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231305
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 4 Mar 2015 22:20:52 +0000 (22:20 +0000)]
Provide an explicit move ctor because MSVC can't synthesize one
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231303
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Wed, 4 Mar 2015 22:07:44 +0000 (22:07 +0000)]
[dsymutil] Add minimal code to emit DIE trees.
This commit adds code to emit DIE trees that have been pruned from the
parts that haven't been marked as kept in the previous pass.
It works by 'cloning' the input DIE tree (as read by libDebugInfoDwarf)
into a tree of DIE objects. Cloning the DIEs means essentially cloning
their attributes. The code in this commit does only handle scalar and
block attributes (scalar because they are trivial, blocks because they
can't be easily replaced by a scalr placeholder), all the other ones
are replaced by placeholder zero values and will be handled in
further commits.
The added tests mostly check that the DIE tree has the correct layout and
also verify that a few chosen scalar and block attributes correctly make
their way into the output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231300
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Wed, 4 Mar 2015 22:07:41 +0000 (22:07 +0000)]
DWARFFormValue: Add getAsSignedConstant method.
The implementation accepts explicitely signed forms (DW_FORM_sdata),
but also unsigned forms as long as they fit in an int64_t.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231299
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Wed, 4 Mar 2015 22:07:36 +0000 (22:07 +0000)]
Teach DIEInteger to emit FORM_strp and FORM_ref_addr attributes.
To be used/tested by llvm-dsymutil. (llvm-dsymutil does a 'static' link,
no need for relocations for most things, so it'll just emit raw integers
for most attributes)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231298
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Wed, 4 Mar 2015 22:07:30 +0000 (22:07 +0000)]
Make the DWARFAbbreviationDeclaration::AttributeSpec type public.
It was already exposed through the iterators anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231297
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 4 Mar 2015 22:06:14 +0000 (22:06 +0000)]
Update LangRef for explicit type changes to 'load' instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231296
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 4 Mar 2015 22:03:21 +0000 (22:03 +0000)]
Expand variables when evaluating absolute expressions.
This allows for variables to be used in .size.
This matches gnu AS functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231295
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 4 Mar 2015 22:02:58 +0000 (22:02 +0000)]
Update LangRef for getelementptr explicit type changes
Here's a rough/first draft - it at least hits the actual textual IR
examples and some of the phrasing. It's probably worth a full pass over,
but I'm not sure how much these docs should reflect the strange
intermediate state we're in anyway.
Totally open to lots of review/feedback/suggestions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231294
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 4 Mar 2015 21:49:03 +0000 (21:49 +0000)]
don't repeat class / function / variable names in comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231292
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Wed, 4 Mar 2015 20:55:11 +0000 (20:55 +0000)]
Support standard DWARF TLS opcode; Darwin and PS4 use it.
Differential Revision: http://reviews.llvm.org/D8018
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231286
91177308-0d34-0410-b5e6-
96231b3b80d8
Nemanja Ivanovic [Wed, 4 Mar 2015 20:44:33 +0000 (20:44 +0000)]
Add LLVM support for PPC cryptography builtins
Review: http://reviews.llvm.org/D7955
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231285
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 4 Mar 2015 20:38:59 +0000 (20:38 +0000)]
Try to satisfy sanitizer lint check
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231284
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 4 Mar 2015 19:56:44 +0000 (19:56 +0000)]
Add a FIXME for PR22796, broken ordering of ClassInfo in TableGen
As discussed (at length) in code review of r222935, with Duncan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231282
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 4 Mar 2015 19:15:29 +0000 (19:15 +0000)]
Fix the build of the gold-plugin and examples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231279
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 4 Mar 2015 19:06:17 +0000 (19:06 +0000)]
Add missing <atomic> include to PassRegistry.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231277
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Eckstein [Wed, 4 Mar 2015 18:57:11 +0000 (18:57 +0000)]
Add a lock() function in PassRegistry to speed up multi-thread synchronization.
When calling lock() after all passes are registered, the PassRegistry doesn't need a mutex anymore to look up passes.
This speeds up multithreaded llvm execution by ~5% (tested with 4 threads).
In an asserts build of llvm this has an even bigger impact.
Note that it's not required to use the lock function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231276
91177308-0d34-0410-b5e6-
96231b3b80d8