oota-llvm.git
9 years ago[CodeGen] Mark the promoted FCOPYSIGN result FP_ROUND as TRUNCating.
Ahmed Bougacha [Thu, 13 Aug 2015 01:32:30 +0000 (01:32 +0000)]
[CodeGen] Mark the promoted FCOPYSIGN result FP_ROUND as TRUNCating.

Now that we can properly promote mismatched FCOPYSIGNs (r244858), we
can mark the FP_ROUND on the result as truncating, to expose folding.

FCOPYSIGN doesn't change anything but the sign bit, so
  (fp_round (fcopysign (fpext a), b))
is equivalent to (modulo the sign bit):
  (fp_round (fpext a))
which is a no-op.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244862 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AArch64] Cleanup vector-fcopysign.ll test. NFC.
Ahmed Bougacha [Thu, 13 Aug 2015 01:20:38 +0000 (01:20 +0000)]
[AArch64] Cleanup vector-fcopysign.ll test. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244861 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AArch64] Also custom-lowering mismatched vector/f16 FCOPYSIGN.
Ahmed Bougacha [Thu, 13 Aug 2015 01:13:56 +0000 (01:13 +0000)]
[AArch64] Also custom-lowering mismatched vector/f16 FCOPYSIGN.

We can lower them using our cool tricks if we fpext/fptrunc the second
input, like we do for f32/f64.

Follow-up to r243924, r243926, and r244858.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244860 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CodeGen] Assert on getNode(FP_EXTEND) with a smaller dst type.
Ahmed Bougacha [Thu, 13 Aug 2015 01:10:29 +0000 (01:10 +0000)]
[CodeGen] Assert on getNode(FP_EXTEND) with a smaller dst type.

This would have caught the problem in r244858.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244859 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CodeGen] When Promoting, don't extend the 2nd FCOPYSIGN operand.
Ahmed Bougacha [Thu, 13 Aug 2015 01:09:43 +0000 (01:09 +0000)]
[CodeGen] When Promoting, don't extend the 2nd FCOPYSIGN operand.

We don't care about its type, and there's even a combine that'll fold
away the FP_EXTEND if we let it run. However, until it does, we'll have
something broken like:
  (f32 (fp_extend (f64 v)))

Scalar f16 follow-up to r243924.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244858 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CodeGen] Simplify getNode(*EXT/TRUNC) type size assert. NFC.
Ahmed Bougacha [Thu, 13 Aug 2015 01:08:48 +0000 (01:08 +0000)]
[CodeGen] Simplify getNode(*EXT/TRUNC) type size assert. NFC.

We already check that vectors have the same number of elements, we
don't need to use the scalar types explicitly: comparing the size of
the whole vector is enough.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244857 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoThere is only one saver of strings.
Rafael Espindola [Thu, 13 Aug 2015 01:07:02 +0000 (01:07 +0000)]
There is only one saver of strings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244854 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[LIR] Make the LoopIdiomRecognize pass get analyses essentially the same
Chandler Carruth [Thu, 13 Aug 2015 01:03:26 +0000 (01:03 +0000)]
[LIR] Make the LoopIdiomRecognize pass get analyses essentially the same
way as every other pass. This simplifies the code quite a bit and is
also more idiomatic! <ba-dum!>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244853 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[LIR] Remove the dedicated class for popcount recognition and sink the
Chandler Carruth [Thu, 13 Aug 2015 00:44:29 +0000 (00:44 +0000)]
[LIR] Remove the dedicated class for popcount recognition and sink the
code into methods on LoopIdiomRecognize.

This simplifies the code somewhat and also makes it much easier to move
the analyses around. Ultimately, the separate class wasn't providing
significant value over methods -- it contained the precondition basic
block and the current loop. The current loop is already available and
the precondition block wasn't needed everywhere and is easy to pass
around.

In several cases I just moved things to be static functions because they
already accepted most of their inputs as arguments.

This doesn't fix the way we manage analyses yet, that will be the next
patch, but it already makes the code over 50 lines shorter.

No functionality changed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244851 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReturn ErrorOr from FileOutputBuffer::create. NFC.
Rafael Espindola [Thu, 13 Aug 2015 00:31:39 +0000 (00:31 +0000)]
Return ErrorOr from FileOutputBuffer::create. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244848 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WebAssembly] Declare the llvm.wasm.page.size() intrinsic.
Dan Gohman [Thu, 13 Aug 2015 00:26:04 +0000 (00:26 +0000)]
[WebAssembly] Declare the llvm.wasm.page.size() intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244847 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[LIR] Move all the helpers to be private and re-order the methods in
Chandler Carruth [Thu, 13 Aug 2015 00:10:03 +0000 (00:10 +0000)]
[LIR] Move all the helpers to be private and re-order the methods in
a way that groups things logically. No functionality changed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244845 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTest Commit - Corrected spelling in README.txt.
Steve King [Wed, 12 Aug 2015 23:56:50 +0000 (23:56 +0000)]
Test Commit - Corrected spelling in README.txt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244842 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[LIR] Remove the 'LIRUtils' abstraction which was unnecessary and adding
Chandler Carruth [Wed, 12 Aug 2015 23:55:56 +0000 (23:55 +0000)]
[LIR] Remove the 'LIRUtils' abstraction which was unnecessary and adding
complexity.

There is only one function that was called from multiple locations, and
that was 'getBranch' which has a reasonable one-line spelling already:
dyn_cast<BranchInst>(BB->getTerminator). We could make this shorter, but
it doesn't seem to add much value. Instead, we should avoid calling it
so many times on the same basic blocks, but that will be in a subsequent
patch.

The other functions are only called in one location, so inline them
there, and take advantage of this to use direct early exit and reduce
indentation. This makes it much more clear what is being tested for, and
in fact makes it clear now to me that there are simpler ways to do this
work. However, this patch just does the mechanical inlining. I'll clean
up the functionality of the code to leverage loop simplified form more
effectively in a follow-up.

Despite lots of early line breaks due to early-exit, this is still
shorter than it was before.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244841 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSimplify PackedVector by removing user-defined special members that aren't any differ...
David Blaikie [Wed, 12 Aug 2015 23:26:12 +0000 (23:26 +0000)]
Simplify PackedVector by removing user-defined special members that aren't any different than the defaults

This causes the other special members (like move and copy construction,
and move assignment) to come through for free. Some code in clang was
depending on the (deprecated, in the original code) copy ctor. Now that
there's no user-defined special members, they're all available without
any deprecation concerns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244835 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIRBuilder: Use move semantics for the IRBuilderInserter parameter
David Blaikie [Wed, 12 Aug 2015 23:18:49 +0000 (23:18 +0000)]
IRBuilder: Use move semantics for the IRBuilderInserter parameter

Just drive by cleanup while fixing -Wdeprecated warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244832 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[LIR] Run clang-format over LoopIdiomRecognize in preparation for
Chandler Carruth [Wed, 12 Aug 2015 23:06:37 +0000 (23:06 +0000)]
[LIR] Run clang-format over LoopIdiomRecognize in preparation for
a significant code cleanup here.

The handling of analyses in this pass is overly complex and can be
simplified significantly, but the right way to do that is to simplify
all of the code not just the analyses, and that'll require pretty
extensive edits that would be noisy with formatting changes mixed into
them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244828 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PM/AA] Remove the AliasDebugger pass.
Chandler Carruth [Wed, 12 Aug 2015 22:54:47 +0000 (22:54 +0000)]
[PM/AA] Remove the AliasDebugger pass.

This debugger was designed to catch places where the old update API was
failing to be used correctly. As I've removed the update API, it no
longer serves any purpose. We can introduce new debugging aid passes
around any future work w.r.t. updating AAs.

Note that I've updated the documentation here, but really I need to
rewrite the documentation to carefully spell out the ideas around
stateful AA and how things are changing in the AA world. However, I'm
hoping to do that as a follow-up to the refactoring of the AA
infrastructure to work in both old and new pass managers so that I can
write the documentation specific to that world.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244825 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd myself as the InstCombine owner.
David Majnemer [Wed, 12 Aug 2015 22:30:45 +0000 (22:30 +0000)]
Add myself as the InstCombine owner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244823 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[RewriteStatepointsForGC] Avoid using unrelocated pointers after safepoints
Philip Reames [Wed, 12 Aug 2015 22:11:45 +0000 (22:11 +0000)]
[RewriteStatepointsForGC] Avoid using unrelocated pointers after safepoints

To be clear: this is an *optimization* not a correctness change.

CodeGenPrep likes to duplicate icmps feeding branch instructions to take advantage of x86's ability to fuze many comparison/branch patterns into a single micro-op and to reduce the need for materializing i1s into general registers. PlaceSafepoints likes to place safepoint polls right at the end of basic blocks (immediately before terminators) when inserting entry and backedge safepoints. These two heuristics interact in a somewhat unfortunate way where the branch terminating the original block will be controlled by a condition driven by unrelocated pointers. This forces the register allocator to keep both the relocated and unrelocated values of the pointers feeding the icmp alive over the safepoint poll.

One simple fix would have been to just adjust PlaceSafepoints to move one back in the basic block, but you can reach similar cases as a result of LICM or other hoisting passes. As a result, doing a post insertion fixup seems to be more robust.

I considered doing this in CodeGenPrep itself, but having to update the live sets of already rewritten safepoints gets complicated fast. In particular, you can't just use def/use information because by moving the icmp, we're extending the live range of it's inputs potentially.

Instead, this patch teaches RewriteStatepointsForGC to make the required adjustments before making the relocations explicit in the IR. This change really highlights the fact that RSForGC is a CodeGenPrep-like pass which is performing target specific lowering. In the long run, we may even want to combine the two though this would require a lot more smarts to be integrated into RSForGC first. We currently rely on being able to run a set of cleanup passes post rewriting because the IR RSForGC generates is pretty damn ugly.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244821 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMIR Parser: Allow the MI IR references to reference global values.
Alex Lorenz [Wed, 12 Aug 2015 21:27:16 +0000 (21:27 +0000)]
MIR Parser: Allow the MI IR references to reference global values.

This commit fixes a bug where MI parser couldn't resolve the named IR
references that referenced named global values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244817 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMIR Serialization: Serialize the fixed stack pseudo source values.
Alex Lorenz [Wed, 12 Aug 2015 21:23:17 +0000 (21:23 +0000)]
MIR Serialization: Serialize the fixed stack pseudo source values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244816 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoNFC. Convert comments in MachineBasicBlock.cpp into new style.
Cong Hou [Wed, 12 Aug 2015 21:18:54 +0000 (21:18 +0000)]
NFC. Convert comments in MachineBasicBlock.cpp into new style.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244815 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMIR Parser: Move the parsing of fixed stack object indices into new method. NFC
Alex Lorenz [Wed, 12 Aug 2015 21:17:02 +0000 (21:17 +0000)]
MIR Parser: Move the parsing of fixed stack object indices into new method. NFC

This commit moves the code that parses the frame indices for the fixed stack
objects from the method 'parseFixedStackObjectOperand' to a new method named
'parseFixedStackFrameIndex', so that it can be reused when parsing fixed stack
pseudo source values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244814 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMIR Serialization: Serialize the jump table pseudo source values.
Alex Lorenz [Wed, 12 Aug 2015 21:11:08 +0000 (21:11 +0000)]
MIR Serialization: Serialize the jump table pseudo source values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244813 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMove the object being used to move-initialize when calling the base class' constructo...
Aaron Ballman [Wed, 12 Aug 2015 21:10:41 +0000 (21:10 +0000)]
Move the object being used to move-initialize when calling the base class' constructor from the ctor-initializer. This should have no effect given the triviality of the class, but it allows for easier maintenance should the semantics of the base class change. NFC intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244812 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMIR Serialization: Serialize the GOT pseudo source values.
Alex Lorenz [Wed, 12 Aug 2015 21:00:22 +0000 (21:00 +0000)]
MIR Serialization: Serialize the GOT pseudo source values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244809 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[RewriteStatepointsForGC] Handle extractelement fully in the base pointer algorithm
Philip Reames [Wed, 12 Aug 2015 21:00:20 +0000 (21:00 +0000)]
[RewriteStatepointsForGC] Handle extractelement fully in the base pointer algorithm

When rewriting the IR such that base pointers are available for every live pointer, we potentially need to duplicate instructions to propagate the base. The original code had only handled PHI and Select under the belief those were the only instructions which would need duplicated. When I added support for vector instructions, I'd added a collection of hacks for ExtractElement which caught most of the common cases. Of course, I then found the one test case my hacks couldn't cover. :)

This change removes all of the early hacks for extract element. By defining extractelement as a BDV (rather than trying to look through it), we can extend the rewriting algorithm to duplicate the extract as needed.  Note that a couple of peephole optimizations were left in for the moment, because while we now handle extractelement as a first class citizen, we're not yet handling insertelement.  That change will follow in the near future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244808 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMIR Serialization: Serialize the stack pseudo source values.
Alex Lorenz [Wed, 12 Aug 2015 20:44:16 +0000 (20:44 +0000)]
MIR Serialization: Serialize the stack pseudo source values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244806 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agofix typo; NFC
Sanjay Patel [Wed, 12 Aug 2015 20:36:18 +0000 (20:36 +0000)]
fix typo; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244805 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUpdate a comment; Emscripten no longer uses le32 and le64. NFC.
Dan Gohman [Wed, 12 Aug 2015 20:34:40 +0000 (20:34 +0000)]
Update a comment; Emscripten no longer uses le32 and le64. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244804 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMIR Serialization: Serialize the constant pool pseudo source values.
Alex Lorenz [Wed, 12 Aug 2015 20:33:26 +0000 (20:33 +0000)]
MIR Serialization: Serialize the constant pool pseudo source values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244803 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix missing space in libfuzzer's help text.
Lenny Maiorani [Wed, 12 Aug 2015 20:00:10 +0000 (20:00 +0000)]
Fix missing space in libfuzzer's help text.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244800 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDocs: keep copyright years up-to-date.
Hans Wennborg [Wed, 12 Aug 2015 18:27:23 +0000 (18:27 +0000)]
Docs: keep copyright years up-to-date.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244789 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PM/AA] Add missing static dependency edges from DSE and memdep to TLI.
Chandler Carruth [Wed, 12 Aug 2015 18:10:45 +0000 (18:10 +0000)]
[PM/AA] Add missing static dependency edges from DSE and memdep to TLI.

I forgot to add these in r244780 and r244778. Sorry about that.

Also order the static dependencies in a lexicographical order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244787 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PM/AA] Explicitly depend on TLI rather than getting it out of the
Chandler Carruth [Wed, 12 Aug 2015 18:06:08 +0000 (18:06 +0000)]
[PM/AA] Explicitly depend on TLI rather than getting it out of the
AliasAnalysis.

Same as the other commits, the TLI access from an alias analysis is
going away and isn't very clean -- it is better to explicitly mark the
dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244785 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PM/AA] Stop getting the TargetLibraryInfo out of the AliasAnalysis and
Chandler Carruth [Wed, 12 Aug 2015 18:01:44 +0000 (18:01 +0000)]
[PM/AA] Stop getting the TargetLibraryInfo out of the AliasAnalysis and
just depend on it directly.

This was particularly frustrating because there was a really wide
mixture of using a member variable and re-extracting it from the AA that
happened to be around. I think the result is much more clear.

I've also deleted all of the pointless null checks and used references
across the APIs where I could to make it explicit that this cannot be
null in a useful fashion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244780 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoWebAssembly: floating-point comparisons
JF Bastien [Wed, 12 Aug 2015 17:53:29 +0000 (17:53 +0000)]
WebAssembly: floating-point comparisons

Summary:
D11924 implemented part of the floating-point comparisons, this patch implements the rest:
 * Tell ISelLowering that all booleans are either 0 or 1.
 * Expand the eq/ne/lt/le/gt/ge floating-point comparisons to the canonical ones (similar to what Mips32r6InstrInfo.td does).
 * Add tests for ord/uno.
 * Add tests for ueq/one/ult/ule/ugt/uge.
 * Fix existing comparison tests to remove the (res & 1) code, which setBooleanContents stops from generating.

Reviewers: sunfish

Subscribers: llvm-commits, jfb

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244779 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PM/AA] Have memdep explicitly get and use TargetLibraryInfo rather than
Chandler Carruth [Wed, 12 Aug 2015 17:47:44 +0000 (17:47 +0000)]
[PM/AA] Have memdep explicitly get and use TargetLibraryInfo rather than
relying on sneaking it out of its AliasAnalysis.

This abuse of AA (to shuffle TLI around rather than explicitly depending
on it) is going away with my refactor of AA.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244778 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUse /Zc:inline when building with MSVC.
Rafael Espindola [Wed, 12 Aug 2015 17:09:25 +0000 (17:09 +0000)]
Use /Zc:inline when building with MSVC.

This reduces the total .obj size when building llvm from
496,690,342 to 219,334,936 bytes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244767 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCleaned up test. NFCI.
Simon Pilgrim [Wed, 12 Aug 2015 17:00:50 +0000 (17:00 +0000)]
Cleaned up test. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244765 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[LoopVer] Optionally allow using memchecks from LAA
Adam Nemet [Wed, 12 Aug 2015 16:51:19 +0000 (16:51 +0000)]
[LoopVer] Optionally allow using memchecks from LAA

r243382 changed the behavior to always require a set of memchecks to be
passed to LoopVer.  This change restores the prior behavior as an
alternative to the new behavior.  This allows the checks to be
implicitly taken from the LAA object.

Patch by Ashutosh Nema!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244763 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago80-cols; NFC
Sanjay Patel [Wed, 12 Aug 2015 15:12:25 +0000 (15:12 +0000)]
80-cols; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244755 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ValueTracking] Tweak a comment slightly
James Molloy [Wed, 12 Aug 2015 15:11:43 +0000 (15:11 +0000)]
[ValueTracking] Tweak a comment slightly

Hal asked for this change in D11146, but I missed it when I committed originally.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244754 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agofix typo; NFC
Sanjay Patel [Wed, 12 Aug 2015 15:09:09 +0000 (15:09 +0000)]
fix typo; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244753 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRedo "Make global aliases have symbol size equal to their type"
John Brawn [Wed, 12 Aug 2015 15:05:39 +0000 (15:05 +0000)]
Redo "Make global aliases have symbol size equal to their type"

r242520 was reverted in r244313 as the expected behaviour of the alias
attribute in C is that the alias has the same size as the aliasee. However
we can re-introduce adding the size on the alias when the aliasee does not,
from a source code or object perspective, exist as a discrete entity. This
happens when the aliasee is not a symbol, or when that symbol is private.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244752 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[GlobalMerge] Only emit aliases for internal linkage variables for non-Mach-O
John Brawn [Wed, 12 Aug 2015 13:36:48 +0000 (13:36 +0000)]
[GlobalMerge] Only emit aliases for internal linkage variables for non-Mach-O

On Mach-O emitting aliases for the variables that make up a MergedGlobals
variable can cause problems when linking with dead stripping enabled so don't
do that, except for external variables where we must emit an alias.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244748 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips][microMIPS] Create microMIPS64r6 subtarget and implement DALIGN, DAUI, DAHI...
Zoran Jovanovic [Wed, 12 Aug 2015 12:45:16 +0000 (12:45 +0000)]
[mips][microMIPS] Create microMIPS64r6 subtarget and implement DALIGN, DAUI, DAHI, DATI, DEXT, DEXTM and DEXTU instructions
Differential Revision: http://reviews.llvm.org/D10923

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244744 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Disable mul -> shl + lea combine when compiling for minsize
Michael Kuperstein [Wed, 12 Aug 2015 11:27:26 +0000 (11:27 +0000)]
[X86] Disable mul -> shl + lea combine when compiling for minsize

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244740 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[MC] Convert the last test using macho-dump under X86/ to llvm-readobj.
Davide Italiano [Wed, 12 Aug 2015 10:36:16 +0000 (10:36 +0000)]
[MC] Convert the last test using macho-dump under X86/ to llvm-readobj.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244732 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Allow x86 call frame optimization to fold more loads into pushes
Michael Kuperstein [Wed, 12 Aug 2015 10:14:58 +0000 (10:14 +0000)]
[X86] Allow x86 call frame optimization to fold more loads into pushes

This abstracts away the test for "when can we fold across a MachineInstruction"
into the the MI interface, and changes call-frame optimization use the same test
the peephole optimizer users.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244729 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAMDGPU: Fix assert on dbg_value instructions
Matt Arsenault [Wed, 12 Aug 2015 09:04:44 +0000 (09:04 +0000)]
AMDGPU: Fix assert on dbg_value instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244728 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agounused variable warning fix.
Simon Pilgrim [Wed, 12 Aug 2015 08:23:36 +0000 (08:23 +0000)]
unused variable warning fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244725 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[InstCombine] Move SSE/AVX vector blend folding to instcombiner
Simon Pilgrim [Wed, 12 Aug 2015 08:08:56 +0000 (08:08 +0000)]
[InstCombine] Move SSE/AVX vector blend folding to instcombiner

As discussed in D11886, this patch moves the SSE/AVX vector blend folding to instcombiner from PerformINTRINSIC_WO_CHAINCombine (which allows us to remove this completely).

InstCombiner already had partial support for this, I just had to add support for zero (ConstantAggregateZero) masks and also the case where both selection inputs were the same (allowing us to ignore the mask).

I also moved all the relevant combine tests into InstCombine/blend_x86.ll

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244723 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[TableGen] Remove unused constructor.
Craig Topper [Wed, 12 Aug 2015 06:43:10 +0000 (06:43 +0000)]
[TableGen] Remove unused constructor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244718 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoX86: hoist a condition into a variable (NFC)
Saleem Abdulrasool [Wed, 12 Aug 2015 02:01:36 +0000 (02:01 +0000)]
X86: hoist a condition into a variable (NFC)

The same value is used multiple times through the function.  Hoist the condition
into a variable.  This should fix a silly static analysis warning where the
conditions flip around.  No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244713 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[libFuzzer] add two flags, -tbm_depth and -tbm_width to control how the trace-based...
Kostya Serebryany [Wed, 12 Aug 2015 01:55:37 +0000 (01:55 +0000)]
[libFuzzer] add two flags, -tbm_depth and -tbm_width to control how the trace-based-mutations are applied

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244712 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[libFuzzer] add colons to the stats output to avoid confusion
Kostya Serebryany [Wed, 12 Aug 2015 01:04:27 +0000 (01:04 +0000)]
[libFuzzer] add colons to the stats output to avoid confusion

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244708 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[libFuzzer] use raw C IO to reduce the risk of a deadlock in a signal handler.
Kostya Serebryany [Wed, 12 Aug 2015 00:55:09 +0000 (00:55 +0000)]
[libFuzzer] use raw C IO to reduce the risk of a deadlock in a signal handler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244707 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[x86] enable machine combiner reassociations for 256-bit vector FP mul/add
Sanjay Patel [Wed, 12 Aug 2015 00:29:10 +0000 (00:29 +0000)]
[x86] enable machine combiner reassociations for 256-bit vector FP mul/add

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244705 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[LoopDist] Add test for missing coverage
Adam Nemet [Wed, 12 Aug 2015 00:21:59 +0000 (00:21 +0000)]
[LoopDist] Add test for missing coverage

Add a testcase to ensure that if we can't find bounds for a necessary
memcheck we don't distribute.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244703 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoPseudoSourceValue: Transform the mips subclass to target independent subclasses
Alex Lorenz [Tue, 11 Aug 2015 23:23:17 +0000 (23:23 +0000)]
PseudoSourceValue: Transform the mips subclass to target independent subclasses

This commit transforms the mips-specific 'MipsCallEntry' subclass of the
'PseudoSourceValue' class into two, target-independent subclasses named
'GlobalValuePseudoSourceValue' and 'ExternalSymbolPseudoSourceValue'.

This change makes it easier to serialize the pseudo source values by removing
target-specific pseudo source values.

Reviewers: Akira Hatanaka

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244698 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoPseudoSourceValue: Replace global manager with a manager in a machine function.
Alex Lorenz [Tue, 11 Aug 2015 23:09:45 +0000 (23:09 +0000)]
PseudoSourceValue: Replace global manager with a manager in a machine function.

This commit removes the global manager variable which is responsible for
storing and allocating pseudo source values and instead it introduces a new
manager class named 'PseudoSourceValueManager'. Machine functions now own an
instance of the pseudo source value manager class.

This commit also modifies the 'get...' methods in the 'MachinePointerInfo'
class to construct pseudo source values using the instance of the pseudo
source value manager object from the machine function.

This commit updates calls to the 'get...' methods from the 'MachinePointerInfo'
class in a lot of different files because those calls now need to pass in a
reference to a machine function to those methods.

This change will make it easier to serialize pseudo source values as it will
enable me to transform the mips specific MipsCallEntry PseudoSourceValue
subclass into two target independent subclasses.

Reviewers: Akira Hatanaka

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244693 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[LAA] Fix typo in test
Adam Nemet [Tue, 11 Aug 2015 23:03:09 +0000 (23:03 +0000)]
[LAA] Fix typo in test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244690 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoPseudoSourceValue: Introduce a 'PSVKind' enumerator.
Alex Lorenz [Tue, 11 Aug 2015 22:32:00 +0000 (22:32 +0000)]
PseudoSourceValue: Introduce a 'PSVKind' enumerator.

This commit introduces a new enumerator named 'PSVKind' in the
'PseudoSourceValue' class. This enumerator is now used to distinguish between
the various kinds of pseudo source values.

This change is done in preparation for the changes to the pseudo source value
object management and to the PseudoSourceValue's class hierarchy - the next two
PseudoSourceValue commits will get rid of the global variable that manages the
pseudo source values and the mips specific MipsCallEntry subclass.

Reviewers: Akira Hatanaka

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244687 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoPseudoSourceValue: Update comments and fix lowercase variable names. NFC.
Alex Lorenz [Tue, 11 Aug 2015 22:23:19 +0000 (22:23 +0000)]
PseudoSourceValue: Update comments and fix lowercase variable names. NFC.

This commit updates the documentation comments in PseudoSourceValue.cpp and
PseudoSourceValue.h based on the LLVM's documentation style. It also fixes
several instances of variable names that started with a lowercase letter.

This change is done in preparation for the changes to the pseudo source value
object management and to the PseudoSourceValue's class hierarchy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244686 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReformat PseudoSourceValue.cpp and PseudoSourceValue.h. NFC.
Alex Lorenz [Tue, 11 Aug 2015 22:17:22 +0000 (22:17 +0000)]
Reformat PseudoSourceValue.cpp and PseudoSourceValue.h. NFC.

This commit reformats the files lib/CodeGen/PseudoSourceValue.cpp and
include/llvm/CodeGen/PseudoSourceValue.h using clang-format. This change is
done in preparation for the changes to the pseudo source value object
management and to the PseudoSourceValue's class hierarchy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244685 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUse 32-bit divides instead of 64-bit divides where possible.
Mark Heffernan [Tue, 11 Aug 2015 22:16:34 +0000 (22:16 +0000)]
Use 32-bit divides instead of 64-bit divides where possible.

For NVPTX, try to use 32-bit division instead of 64-bit division when the dividend and divisor
fit in 32 bits. This speeds up some internal benchmarks significantly. The underlying reason
is that many index computations are carried out in 64-bits but never actually exceed the
capacity of a 32-bit word.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244684 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake DW_AT_[MIPS_]linkage_name optional, and off by default for SCE.
Paul Robinson [Tue, 11 Aug 2015 21:36:45 +0000 (21:36 +0000)]
Make DW_AT_[MIPS_]linkage_name optional, and off by default for SCE.

Mangled "linkage" names can be huge, and if the debugger (or other
tools) have no use for them, the size savings can be very impressive
(on the order of 40%).

Add one test for controlling behavior, and modify a number of tests to
either stop using linkage names, or make llc emit them (so these tests
will still run when the default triple is for PS4).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244678 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix PR24354.
Sanjoy Das [Tue, 11 Aug 2015 21:33:55 +0000 (21:33 +0000)]
Fix PR24354.

`InstCombiner::OptimizeOverflowCheck` was asserting an
invariant (operands to binary operations are ordered by decreasing
complexity) that wasn't really an invariant.  Fix this by instead having
`InstCombiner::OptimizeOverflowCheck` establish the invariant if it does
not hold.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244676 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[lit] Don't disable the lit progress bar by default with MSVC
Reid Kleckner [Tue, 11 Aug 2015 21:24:59 +0000 (21:24 +0000)]
[lit] Don't disable the lit progress bar by default with MSVC

Only disable the progress bar when we're generating VS project files,
like we do for XCode. This makes lit use the simple, non-curses progress
bar that looks like this with:

Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Testing Time: 5.87s

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244674 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agodon't repeat function names in comments; NFC
Sanjay Patel [Tue, 11 Aug 2015 21:24:04 +0000 (21:24 +0000)]
don't repeat function names in comments; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244672 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agofix 80-cols; NFC
Sanjay Patel [Tue, 11 Aug 2015 21:11:56 +0000 (21:11 +0000)]
fix 80-cols; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244668 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoNFC SelectionDAGDumper: fix typo
JF Bastien [Tue, 11 Aug 2015 21:10:07 +0000 (21:10 +0000)]
NFC SelectionDAGDumper: fix typo

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244667 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoWebAssembly: implement comparison.
JF Bastien [Tue, 11 Aug 2015 21:02:46 +0000 (21:02 +0000)]
WebAssembly: implement comparison.

Some of the FP comparisons (ueq, one, ult, ule, ugt, uge) are currently broken, I'll fix them in a follow-up.

Reviewers: sunfish

Subscribers: llvm-commits, jfb

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244665 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[libFuzzer] more trophies
Kostya Serebryany [Tue, 11 Aug 2015 20:34:48 +0000 (20:34 +0000)]
[libFuzzer] more trophies

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244661 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[cmake] Shorten FreeBSD and DragonFly checks as suggested post-commit
Reid Kleckner [Tue, 11 Aug 2015 20:28:28 +0000 (20:28 +0000)]
[cmake] Shorten FreeBSD and DragonFly checks as suggested post-commit

NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244659 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[x86] enable machine combiner reassociations for 128-bit vector single/double multiplies
Sanjay Patel [Tue, 11 Aug 2015 20:19:23 +0000 (20:19 +0000)]
[x86] enable machine combiner reassociations for 128-bit vector single/double multiplies

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244657 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[LowerSwitch] Skip dead blocks for processSwitchInst()
Chen Li [Tue, 11 Aug 2015 20:16:17 +0000 (20:16 +0000)]
[LowerSwitch] Skip dead blocks for processSwitchInst()

Summary: This patch adds check for dead blocks and skip them for processSwitchInst(). This will help reduce compilation time.

Reviewers: reames, hans

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244656 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoWebAssembly: implement WebAssemblyTargetLowering::getTargetNodeName
JF Bastien [Tue, 11 Aug 2015 20:13:18 +0000 (20:13 +0000)]
WebAssembly: implement WebAssemblyTargetLowering::getTargetNodeName

Summary: Implementation is the same as in AArch64.

Subscribers: aemerson, jfb, llvm-commits, sunfish

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244655 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agofix minsize detection: minsize attribute implies optimizing for size
Sanjay Patel [Tue, 11 Aug 2015 19:39:36 +0000 (19:39 +0000)]
fix minsize detection: minsize attribute implies optimizing for size

Also, add a test for optsize because this was not part of any existing regression test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244651 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSelectionDAG: Prefer to combine multiplication with less uses for fma
Jingyue Wu [Tue, 11 Aug 2015 19:21:46 +0000 (19:21 +0000)]
SelectionDAG: Prefer to combine multiplication with less uses for fma

Summary:
For example:

  s6 = s0*s5;
  s2 = s6*s6 + s6;
  ...
  s4 = s6*s3;

We notice that it is possible for s2 is folded to fma (s0, s5, fmul (s6 s6)).
This only happens when Aggressive is true, otherwise hasOneUse() check
already prevents from folding the multiplication with more uses.

Test Plan: test/CodeGen/NVPTX/fma-assoc.ll

Patch by Xuetian Weng

Reviewers: hfinkel, apazos, jingyue, ohsallen, arsenm

Subscribers: arsenm, jholewinski, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244649 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "[cmake] Add helper for finding potentially external projects"
Reid Kleckner [Tue, 11 Aug 2015 19:02:57 +0000 (19:02 +0000)]
Revert "[cmake] Add helper for finding potentially external projects"

This reverts commit r244633.

We aren't going to be able to use it because the compiler-rt build can
be built standalone without an LLVM source dir *or* an installed copy of
LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244648 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix UB in MCJIT test cases that relied on union type punning
David Blaikie [Tue, 11 Aug 2015 18:17:45 +0000 (18:17 +0000)]
Fix UB in MCJIT test cases that relied on union type punning

Reviewers: lhames, aaron.ballman

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244644 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRe-apply "cmake: Make CMAKE_BUILD_TYPE check case-insensitive"
Justin Bogner [Tue, 11 Aug 2015 18:17:41 +0000 (18:17 +0000)]
Re-apply "cmake: Make CMAKE_BUILD_TYPE check case-insensitive"

This re-applies r244516 (effectively reverting r244516) without losing
the check that caused failures for VS.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244643 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[LowerSwitch] Fix a bug when LowerSwitch deletes the default block
Chen Li [Tue, 11 Aug 2015 18:12:26 +0000 (18:12 +0000)]
[LowerSwitch] Fix a bug when LowerSwitch deletes the default block

Summary: LowerSwitch crashed with the attached test case after deleting the default block. This happened because the current implementation of deleting dead blocks is wrong. After the default block being deleted, it contains no instruction or terminator, and it should no be traversed anymore. However, since the iterator is advanced before processSwitchInst() function is executed, the block advanced to could be deleted inside processSwitchInst(). The deleted block would then be visited next and crash dyn_cast<SwitchInst>(Cur->getTerminator()) because Cur->getTerminator() returns a nullptr. This patch fixes this problem by recording dead default blocks into a list, and delete them after all processSwitchInst() has been done. It still possible to visit dead default blocks and waste time process them. But it is a compile time issue, and I plan to have another patch to add support to skip dead blocks.

Reviewers: kariddi, resistor, hans, reames

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244642 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUse llvm::make_unique to fix the MSVC build.
Rafael Espindola [Tue, 11 Aug 2015 18:11:17 +0000 (18:11 +0000)]
Use llvm::make_unique to fix the MSVC build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244641 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd SmallString test trying to exercise the realloc() code path
Yaron Keren [Tue, 11 Aug 2015 17:35:49 +0000 (17:35 +0000)]
Add SmallString test trying to exercise the realloc() code path
by allocating a small size (will go through malloc) and then large size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244637 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[cmake] Add helper for finding potentially external projects
Reid Kleckner [Tue, 11 Aug 2015 17:16:35 +0000 (17:16 +0000)]
[cmake] Add helper for finding potentially external projects

I plan to use this from compiler-rt, but it's useful for any LLVM
project that depends on more than just LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244633 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agofix minsize detection: minsize attribute implies optimizing for size
Sanjay Patel [Tue, 11 Aug 2015 17:04:31 +0000 (17:04 +0000)]
fix minsize detection: minsize attribute implies optimizing for size

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244631 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoadd missing tests for powi expansion with size optimizations
Sanjay Patel [Tue, 11 Aug 2015 16:58:49 +0000 (16:58 +0000)]
add missing tests for powi expansion with size optimizations

The minsize test will be fixed in the next commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244630 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agofixed to use FileCheck
Sanjay Patel [Tue, 11 Aug 2015 16:51:31 +0000 (16:51 +0000)]
fixed to use FileCheck

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244627 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agofixed to test attribute, rather than CPU
Sanjay Patel [Tue, 11 Aug 2015 16:43:18 +0000 (16:43 +0000)]
fixed to test attribute, rather than CPU

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244625 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoEnable EliminateAvailableExternally pass in the LTO pipeline.
Teresa Johnson [Tue, 11 Aug 2015 16:26:41 +0000 (16:26 +0000)]
Enable EliminateAvailableExternally pass in the LTO pipeline.

Summary:
For LTO we need to enable this pass in the LTO pipeline,
as it is skipped during the "-flto -c" compile step (when PrepareForLTO is
set).

Reviewers: rnk

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244622 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "Add non-member begin and end so that drop_begin works on iterator_range."
Rafael Espindola [Tue, 11 Aug 2015 16:26:06 +0000 (16:26 +0000)]
Revert "Add non-member begin and end so that drop_begin works on iterator_range."

This reverts commit r244620.

MSVC doesn't like it :-(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244621 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd non-member begin and end so that drop_begin works on iterator_range.
Rafael Espindola [Tue, 11 Aug 2015 16:12:56 +0000 (16:12 +0000)]
Add non-member begin and end so that drop_begin works on iterator_range.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244620 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agofix typos; NFC
Sanjay Patel [Tue, 11 Aug 2015 16:10:41 +0000 (16:10 +0000)]
fix typos; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244619 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoVariable names should start with an upper case letter; NFC
Sanjay Patel [Tue, 11 Aug 2015 16:05:43 +0000 (16:05 +0000)]
Variable names should start with an upper case letter; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244618 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agofix minsize detection: minsize attribute implies optimizing for size
Sanjay Patel [Tue, 11 Aug 2015 15:56:31 +0000 (15:56 +0000)]
fix minsize detection: minsize attribute implies optimizing for size

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244617 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[GlobalMerge] Use private linkage for MergedGlobals variables
John Brawn [Tue, 11 Aug 2015 15:48:04 +0000 (15:48 +0000)]
[GlobalMerge] Use private linkage for MergedGlobals variables

Other objects can never reference the MergedGlobals symbol so external linkage
is never needed. Using private instead of internal linkage means the object is
more similar to what it looks like when global merging is not enabled, with
the only difference being that the merged variables are addressed indirectly
relative to the start of the section they are in.

Also add aliases for merged variables with internal linkage, as this also makes
the object be more like what it is when they are not merged.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244615 91177308-0d34-0410-b5e6-96231b3b80d8