oota-llvm.git
9 years ago[RewriteStatepointsForGC] Limited support for vectors of pointers
Philip Reames [Fri, 10 Apr 2015 21:48:25 +0000 (21:48 +0000)]
[RewriteStatepointsForGC] Limited support for vectors of pointers

This patch adds limited support for inserting explicit relocations when there's a vector of pointers live over the statepoint. This doesn't handle the case where the vector contains a mix of base and non-base pointers; that's future work.

The current implementation just scalarizes the vector over the gc.statepoint before doing the explicit rewrite. An alternate approach would be to plumb the vector all the way though the backend lowering, but doing that appears challenging. In particular, the size of the indirect spill slot is currently assumed to be sizeof(pointer) throughout the backend.

In practice, this is enough to allow running the SLP and Loop vectorizers before RewriteStatepointsForGC.

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

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

9 years ago[InstCombine][CodeGenPrep] Create llvm.uadd.with.overflow in CGP.
Sanjoy Das [Fri, 10 Apr 2015 21:07:09 +0000 (21:07 +0000)]
[InstCombine][CodeGenPrep] Create llvm.uadd.with.overflow in CGP.

Summary:
This change moves creating calls to `llvm.uadd.with.overflow` from
InstCombine to CodeGenPrep.  Combining overflow check patterns into
calls to the said intrinsic in InstCombine inhibits optimization because
it introduces an intrinsic call that not all other transforms and
analyses understand.

Depends on D8888.

Reviewers: majnemer, atrick

Subscribers: llvm-commits

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

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

9 years agoAvoid spewing binary to stdout in some filetype=obj tests
Reid Kleckner [Fri, 10 Apr 2015 19:36:55 +0000 (19:36 +0000)]
Avoid spewing binary to stdout in some filetype=obj tests

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

9 years agouse update_llc_test_checks.py to tighten checking
Sanjay Patel [Fri, 10 Apr 2015 18:31:42 +0000 (18:31 +0000)]
use update_llc_test_checks.py to tighten checking

test features, not CPUs

remove unnecessary cruft

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

9 years agoRemember if lseek works in this FD.
Rafael Espindola [Fri, 10 Apr 2015 18:15:51 +0000 (18:15 +0000)]
Remember if lseek works in this FD.

It will be used in clang in a sec.

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

9 years agoDebugInfo: Stop leaking temporaries in DIBuilder::createCompileUnit()
Duncan P. N. Exon Smith [Fri, 10 Apr 2015 18:01:58 +0000 (18:01 +0000)]
DebugInfo: Stop leaking temporaries in DIBuilder::createCompileUnit()

Stop leaking temporary nodes from `DIBuilder::createCompileUnit()`.
`replaceAllUsesWith()` doesn't delete the nodes, so we need to delete
them "manually" (well, `TempMDTuple` does that for us).

Similarly, stop leaking the temporary nodes used for variables of
subprograms.

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

9 years agoHave one raw_fd_ostream constructor forward to the other.
Rafael Espindola [Fri, 10 Apr 2015 17:52:22 +0000 (17:52 +0000)]
Have one raw_fd_ostream constructor forward to the other.

This fixes some odd behavior differences between the two. In particular,
the version that takes a FD no longer unconditionally sets stdout to binary.

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

9 years ago[FS] Report errors from llvm::sys::fs::rename on Windows
Reid Kleckner [Fri, 10 Apr 2015 17:20:45 +0000 (17:20 +0000)]
[FS] Report errors from llvm::sys::fs::rename on Windows

Previously we would always report success, which is pretty bogus.

I'm too lazy to write a test where rename will portably fail on all
platforms. I'm just trying to fix breakage introduced by r234597, which
happened to tickle this.

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

9 years ago[WinEH] Try to make outlining invokes work a little better
Reid Kleckner [Fri, 10 Apr 2015 16:26:42 +0000 (16:26 +0000)]
[WinEH] Try to make outlining invokes work a little better

WinEH currently turns invokes into calls. Long term, we will reconsider
this, but for now, make sure we remap the operands and clone the
successors of the new terminator.

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

9 years ago[CallSite] Use the injected base class name. NFC.
Benjamin Kramer [Fri, 10 Apr 2015 16:02:34 +0000 (16:02 +0000)]
[CallSite] Use the injected base class name. NFC.

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

9 years ago[PowerPC] Prefetching should also consider depth > 1 loops
Hal Finkel [Fri, 10 Apr 2015 15:05:02 +0000 (15:05 +0000)]
[PowerPC] Prefetching should also consider depth > 1 loops

Iterating over loops from the LoopInfo instance only provides top-level loops.
We need to search the whole tree of loops to find the inner ones.

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

9 years ago[CallSite] Make construction from Value* (or Instruction*) explicit.
Benjamin Kramer [Fri, 10 Apr 2015 14:50:08 +0000 (14:50 +0000)]
[CallSite] Make construction from Value* (or Instruction*) explicit.

CallSite roughly behaves as a common base CallInst and InvokeInst. Bring
the behavior closer to that model by making upcasts explicit. Downcasts
remain implicit and work as before.

Following dyn_cast as a mental model checking whether a Value *V isa
CallSite now looks like this:
  if (auto CS = CallSite(V)) // think dyn_cast
instead of:
  if (CallSite CS = V)

This is an extra token but I think it is slightly clearer. Making the
ctor explicit has the advantage of not accidentally creating nullptr
CallSites, e.g. when you pass a Value * to a function taking a CallSite
argument.

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

9 years ago[mips] [IAS] Improve comments in MipsAsmParser::expandLoadImm. NFC.
Toma Tabacu [Fri, 10 Apr 2015 13:28:16 +0000 (13:28 +0000)]
[mips] [IAS] Improve comments in MipsAsmParser::expandLoadImm. NFC.

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

9 years ago[AArch64] Changes some SchedAlias to WriteRes for Cortex-A57.
Chad Rosier [Fri, 10 Apr 2015 13:19:27 +0000 (13:19 +0000)]
[AArch64] Changes some SchedAlias to WriteRes for Cortex-A57.

Using SchedAliases is convenient and works well for latency and resource
lookup for instructions.  However, this creates an entry in
AArch64WriteLatencyTable with a WriteResourceID of 0, breaking any
SchedReadAdvance since the lookup will fail.

http://reviews.llvm.org/D8043
Patch by Dave Estes <cestes@codeaurora.org>!

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

9 years ago[AArch64] Adjusts Cortex-A57 machine model to handle zero shift.
Chad Rosier [Fri, 10 Apr 2015 13:19:21 +0000 (13:19 +0000)]
[AArch64] Adjusts Cortex-A57 machine model to handle zero shift.

http://reviews.llvm.org/D8043
Patch by Dave Estes <cestes@codeaurora.org>!

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

9 years agoMicrooptimize DenseMap::clear.
Benjamin Kramer [Fri, 10 Apr 2015 12:46:44 +0000 (12:46 +0000)]
Microoptimize DenseMap::clear.

Cache NumEntries locally, it's only used in an assert and using the member
variable prevents the compiler from eliminating the tombstone check for types
with trivial destructors. No functionality change intended.

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

9 years agoReduce dyn_cast<> to isa<> or cast<> where possible.
Benjamin Kramer [Fri, 10 Apr 2015 11:24:51 +0000 (11:24 +0000)]
Reduce dyn_cast<> to isa<> or cast<> where possible.

No functional change intended.

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

9 years ago[mips] [IAS] Make the mips-expansions-bad.s test more readable. NFC.
Toma Tabacu [Fri, 10 Apr 2015 10:46:59 +0000 (10:46 +0000)]
[mips] [IAS] Make the mips-expansions-bad.s test more readable. NFC.

Move the check lines below the code lines and change the indentation from 8
spaces to 2 spaces.

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

9 years ago[lib/Fuzzer] Section: How good is my fuzzer?
Kostya Serebryany [Fri, 10 Apr 2015 06:32:29 +0000 (06:32 +0000)]
[lib/Fuzzer] Section: How good is my fuzzer?

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

9 years ago[lib/Fuzzer] explain compatibility with AFL
Kostya Serebryany [Fri, 10 Apr 2015 05:44:43 +0000 (05:44 +0000)]
[lib/Fuzzer] explain compatibility with AFL

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

9 years agoDivergence analysis for GPU programs
Jingyue Wu [Fri, 10 Apr 2015 05:03:50 +0000 (05:03 +0000)]
Divergence analysis for GPU programs

Summary:
Some optimizations such as jump threading and loop unswitching can negatively
affect performance when applied to divergent branches. The divergence analysis
added in this patch conservatively estimates which branches in a GPU program
can diverge. This information can then help LLVM to run certain optimizations
selectively.

Test Plan: test/Analysis/DivergenceAnalysis/NVPTX/diverge.ll

Reviewers: resistor, hfinkel, eliben, meheff, jholewinski

Subscribers: broune, bjarke.roune, madhur13490, tstellarAMD, dberlin, echristo, jholewinski, llvm-commits

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

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

9 years ago[WinEHPrepare] Don't rely on the order of IR
David Majnemer [Fri, 10 Apr 2015 04:56:17 +0000 (04:56 +0000)]
[WinEHPrepare] Don't rely on the order of IR

The IPToState table must be emitted after we have generated labels for
all functions in the table.  Don't rely on the order of the list of
globals.  Instead, utilize WinEHFuncInfo to tell us how many catch
handlers we expect to outline.  Once we know we've visited all the catch
handlers, emit the cppxdata.

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

9 years ago[PowerPC] Don't crash on PPC32 i64 fp_to_uint on modern cores
Hal Finkel [Fri, 10 Apr 2015 03:39:00 +0000 (03:39 +0000)]
[PowerPC] Don't crash on PPC32 i64 fp_to_uint on modern cores

When we have an instruction for this (and, thus, don't generate a runtime
call), we need to custom type legalize this (in a trivial way, just as we do
for fp_to_sint).

Fixes PR23173.

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

9 years ago[AArch64] Promote f16 operations to f32.
Ahmed Bougacha [Fri, 10 Apr 2015 00:08:48 +0000 (00:08 +0000)]
[AArch64] Promote f16 operations to f32.

For the most common ones (such as fadd), we already did the promotion.
Do the same thing for all the others.

Currently, we'll just crash/assert on all these operations, as
there's no hardware or libcall support whatsoever.

f16 (half) is specified as an interchange - not arithmetic - format,
and is expected to be promoted to single-precision for arithmetic
operations.

While there, teach the legalizer about promoting some of the (mostly
floating-point) operations that we never needed before.

Differential Revision: http://reviews.llvm.org/D8648
See related discussion on the thread for: http://reviews.llvm.org/D8755

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

9 years agoAdd LLVM support for remaining integer divide and permute instructions from ISA 2.06
Nemanja Ivanovic [Thu, 9 Apr 2015 23:54:37 +0000 (23:54 +0000)]
Add LLVM support for remaining integer divide and permute instructions from ISA 2.06

This is the patch corresponding to review:
http://reviews.llvm.org/D8406

It adds some missing instructions from ISA 2.06 to the PPC back end.

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

9 years agoSimplify use of formatted_raw_ostream.
Rafael Espindola [Thu, 9 Apr 2015 21:06:08 +0000 (21:06 +0000)]
Simplify use of formatted_raw_ostream.

formatted_raw_ostream is a wrapper over another stream to add column and line
number tracking.

It is used only for asm printing.

This patch moves the its creation down to where we know we are printing
assembly. This has the following advantages:

* Simpler lifetime management: std::unique_ptr
* We don't compute column and line number of object files :-)

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

9 years ago[CodeGen] Combine concat_vector of trunc'd scalar to scalar_to_vector.
Ahmed Bougacha [Thu, 9 Apr 2015 20:04:47 +0000 (20:04 +0000)]
[CodeGen] Combine concat_vector of trunc'd scalar to scalar_to_vector.

We already do:
  concat_vectors(scalar, undef) -> scalar_to_vector(scalar)
When the scalar is legal.
When it's not, but is a truncated legal scalar, we can also do:
  concat_vectors(trunc(scalar), undef) -> scalar_to_vector(scalar)
Which is equivalent, since the upper lanes are undef anyway.
While there, teach the combine to look at more than 2 operands.

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

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

9 years ago[AArch64][FastISel] Fix integer extend optimization.
Juergen Ributzka [Thu, 9 Apr 2015 20:00:46 +0000 (20:00 +0000)]
[AArch64][FastISel] Fix integer extend optimization.

The integer extend optimization tries to fold the extend into the load
instruction. This requires us to identify if the extend has already been
emitted or not and act accordingly on it.

The check that was originally performed for this was not sufficient. Besides
checking the ValueMap for a mapped register we also need to check if the
virtual register has already an associated machine instruction that defines it.

This fixes rdar://problem/20470788.

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

9 years agoRemove duplicated code and consolidate initializers.
Eric Christopher [Thu, 9 Apr 2015 19:20:37 +0000 (19:20 +0000)]
Remove duplicated code and consolidate initializers.

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

9 years agoclang-format bits of code to make a followup patch easy to read.
Rafael Espindola [Thu, 9 Apr 2015 18:32:58 +0000 (18:32 +0000)]
clang-format bits of code to make a followup patch easy to read.

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

9 years agoRevert "Refactoring and enhancement to FMA combine."
Rafael Espindola [Thu, 9 Apr 2015 18:29:32 +0000 (18:29 +0000)]
Revert "Refactoring and enhancement to FMA combine."

This reverts commit r234513. It was failing on the bots.

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

9 years agoDefine a function with "... llvm::func...".
Rafael Espindola [Thu, 9 Apr 2015 18:08:15 +0000 (18:08 +0000)]
Define a function with "... llvm::func...".

Using this instead of
namespace llvm {
  func...
}

Has the advantage that the build fails with a compiler error if it gets out
of sync with the .h file.

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

9 years agoRefactoring and enhancement to FMA combine.
Olivier Sallenave [Thu, 9 Apr 2015 17:55:26 +0000 (17:55 +0000)]
Refactoring and enhancement to FMA combine.

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

9 years agoIR: Preserve use-list order by default in bitcode
Duncan P. N. Exon Smith [Thu, 9 Apr 2015 17:41:20 +0000 (17:41 +0000)]
IR: Preserve use-list order by default in bitcode

Pull the `-preserve-*-use-list-order` flags out of "experimental" mode,
and preserve use-list order by default when serializing to bitcode.

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

9 years agoUse a raw_svector_ostream instead of a raw_string_ostream.
Rafael Espindola [Thu, 9 Apr 2015 17:16:25 +0000 (17:16 +0000)]
Use a raw_svector_ostream instead of a raw_string_ostream.

It saves a bit of copying.

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

9 years agoDon't repeat name in comment. NFC.
Rafael Espindola [Thu, 9 Apr 2015 17:10:57 +0000 (17:10 +0000)]
Don't repeat name in comment. NFC.

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

9 years ago[NFC] add more comments for SLSR
Jingyue Wu [Thu, 9 Apr 2015 17:04:28 +0000 (17:04 +0000)]
[NFC] add more comments for SLSR

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

9 years agoMisc cleanup. NFC.
Rafael Espindola [Thu, 9 Apr 2015 16:59:07 +0000 (16:59 +0000)]
Misc cleanup. NFC.

These were lost when I reverted the raw_ostream changes.

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

9 years agoclang-format. NFC.
Rafael Espindola [Thu, 9 Apr 2015 16:43:22 +0000 (16:43 +0000)]
clang-format. NFC.

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

9 years agoclang-format this constructor.
Rafael Espindola [Thu, 9 Apr 2015 16:37:11 +0000 (16:37 +0000)]
clang-format this constructor.

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

9 years agoDon't repeat names in comments.
Rafael Espindola [Thu, 9 Apr 2015 16:06:26 +0000 (16:06 +0000)]
Don't repeat names in comments.

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

9 years agoUse implicit calls to parent constructor. NFC.
Rafael Espindola [Thu, 9 Apr 2015 16:00:24 +0000 (16:00 +0000)]
Use implicit calls to parent constructor. NFC.

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

9 years agoThis reverts commit r234460 and r234461.
Rafael Espindola [Thu, 9 Apr 2015 15:54:59 +0000 (15:54 +0000)]
This reverts commit r234460 and r234461.

Revert "Add classof implementations to the raw_ostream classes."
Revert "Use the cast machinery to remove dummy uses of formatted_raw_ostream."

The underlying issue can be fixed without classof.

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

9 years ago[ARM] support for Cortex-R4/R4F
Javed Absar [Thu, 9 Apr 2015 14:07:28 +0000 (14:07 +0000)]
[ARM] support for Cortex-R4/R4F

Currently, llvm (backend) doesn't know cortex-r4, even though it is the
default target for armv7r. Using "--target=armv7r-arm-none-eabi" provokes
'cortex-r4' is not a recognized processor for this target' by llvm.
This patch adds support for cortex-r4 and, very closely related, r4f.

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

9 years agoNothing inherits from the asm streamer.
Rafael Espindola [Thu, 9 Apr 2015 13:04:20 +0000 (13:04 +0000)]
Nothing inherits from the asm streamer.

Make that explicit and remove protected:

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

9 years ago[mips] Refactor saved-registers bitmask creation in MipsAsmPrinter::printSavedRegsBit...
Toma Tabacu [Thu, 9 Apr 2015 10:54:16 +0000 (10:54 +0000)]
[mips] Refactor saved-registers bitmask creation in MipsAsmPrinter::printSavedRegsBitmask. NFC.

Summary:
Make the code more readable by fusing the for-loops together and explicitly checking for each register class.

Also, this version is more straightforward because it doesn't assume that FPU registers always come before CPU registers in the CalleeSavedInfo vector.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

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

9 years ago[AArch64] Add support for dynamic stack alignment
Kristof Beyls [Thu, 9 Apr 2015 08:49:47 +0000 (08:49 +0000)]
[AArch64] Add support for dynamic stack alignment

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

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

9 years ago[AArch64] Remove redundant -march option. Also fix a think-o from r234462.
Lang Hames [Thu, 9 Apr 2015 05:34:57 +0000 (05:34 +0000)]
[AArch64] Remove redundant -march option. Also fix a think-o from r234462.

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

9 years agoNot all triples put _ before function names. Specify a triple to make this test pass...
Nick Lewycky [Thu, 9 Apr 2015 05:31:32 +0000 (05:31 +0000)]
Not all triples put _ before function names. Specify a triple to make this test pass on Linux.

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

9 years agoUse SmallVector instead of std::vector for uniquing X86 disassembler operand sets...
Craig Topper [Thu, 9 Apr 2015 04:08:48 +0000 (04:08 +0000)]
Use SmallVector instead of std::vector for uniquing X86 disassembler operand sets. The number of operands is a small fixed size.

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

9 years agoSimplify some printing code by combining new lines onto previous strings. Don't work...
Craig Topper [Thu, 9 Apr 2015 04:08:46 +0000 (04:08 +0000)]
Simplify some printing code by combining new lines onto previous strings. Don't work so hard not to print a comma on the last entry of an array.

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

9 years agoDon't convert enum to strings just to put them in the uniquing map. Use the enum...
Craig Topper [Thu, 9 Apr 2015 04:08:42 +0000 (04:08 +0000)]
Don't convert enum to strings just to put them in the uniquing map. Use the enum directly. Only convert to a string for printing.

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

9 years ago[AArch64] Teach AArch64TargetLowering::getOptimalMemOpType to consider alignment
Lang Hames [Thu, 9 Apr 2015 03:40:33 +0000 (03:40 +0000)]
[AArch64] Teach AArch64TargetLowering::getOptimalMemOpType to consider alignment
restrictions when choosing a type for small-memcpy inlining in
SelectionDAGBuilder.

This ensures that the loads and stores output for the memcpy won't be further
expanded during legalization, which would cause the total number of instructions
for the memcpy to exceed (often significantly) the inlining thresholds.

<rdar://problem/17829180>

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

9 years agoUse the cast machinery to remove dummy uses of formatted_raw_ostream.
Rafael Espindola [Thu, 9 Apr 2015 02:28:12 +0000 (02:28 +0000)]
Use the cast machinery to remove dummy uses of formatted_raw_ostream.

If we know we are producing an object, we don't need to wrap the stream
in a formatted_raw_ostream anymore.

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

9 years agoAdd classof implementations to the raw_ostream classes.
Rafael Espindola [Thu, 9 Apr 2015 02:10:28 +0000 (02:10 +0000)]
Add classof implementations to the raw_ostream classes.

More uses to follow in a another patch.

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

9 years agoDelete unused constructor.
Rafael Espindola [Thu, 9 Apr 2015 01:11:26 +0000 (01:11 +0000)]
Delete unused constructor.

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

9 years agoUpdate comment to refer to software floating point rather than
Eric Christopher [Thu, 9 Apr 2015 00:14:49 +0000 (00:14 +0000)]
Update comment to refer to software floating point rather than
a local variable.

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

9 years agoUse option -march instead of -mtriple to avoid overconditionalizing the test.
Akira Hatanaka [Wed, 8 Apr 2015 23:02:45 +0000 (23:02 +0000)]
Use option -march instead of -mtriple to avoid overconditionalizing the test.

This fixes r234439, which was committed to fix the test failures caused by
r234430.

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

9 years ago[LTO] do not run internalize pass from compileOptimized.
Manman Ren [Wed, 8 Apr 2015 22:02:11 +0000 (22:02 +0000)]
[LTO] do not run internalize pass from compileOptimized.

The input to compileOptimized is already optimized and internalized, so remove
internalize pass from compileOptimized.

rdar://20227235

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

9 years agoPass -mtriple to llc to appease buildbot.
Akira Hatanaka [Wed, 8 Apr 2015 21:30:48 +0000 (21:30 +0000)]
Pass -mtriple to llc to appease buildbot.

This fixes the test case I committed in r234430.

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

9 years agoFormmatting correction
Andrew Kaylor [Wed, 8 Apr 2015 21:22:46 +0000 (21:22 +0000)]
Formmatting correction

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

9 years ago[WinEH] Minor bug fixes.
Andrew Kaylor [Wed, 8 Apr 2015 20:57:22 +0000 (20:57 +0000)]
[WinEH] Minor bug fixes.

Fixed insert point for allocas created for demoted values.
Clear the nested landing pad list after it has been processed.

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

9 years ago[DAGCombine] Fix a bug in MergeConsecutiveStores.
Akira Hatanaka [Wed, 8 Apr 2015 20:34:53 +0000 (20:34 +0000)]
[DAGCombine] Fix a bug in MergeConsecutiveStores.

The bug manifests when there are two loads and two stores chained as follows in
a DAG,

(ld v3f32) -> (st f32) -> (ld v3f32) -> (st f32)

and the stores' values are extracted from the preceding vector loads.

MergeConsecutiveStores would replace the first store in the chain with the
merged vector store, which would create a cycle between the merged store node
and the last load node that appears in the chain.

This commits fixes the bug by replacing the last store in the chain instead.

rdar://problem/20275084

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

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

9 years agoGo bindings: make various DIBuilder arguments optional.
Peter Collingbourne [Wed, 8 Apr 2015 20:18:57 +0000 (20:18 +0000)]
Go bindings: make various DIBuilder arguments optional.

r234262 changed some code in DIBuilderBindings.cpp to use the unwrap function
to unwrap debug metadata. The problem with this is that unwrap asserts that
its argument is non-null, which is not what we want in a number of places
in DIBuilder where the argument is optional. This change makes certain
arguments optional by adding null checks in places where it is required,
fixing the llgo build.

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

9 years agoDon't repeat names in comments.
Rafael Espindola [Wed, 8 Apr 2015 20:16:23 +0000 (20:16 +0000)]
Don't repeat names in comments.

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

9 years agoRemove unused variable.
Rafael Espindola [Wed, 8 Apr 2015 20:04:20 +0000 (20:04 +0000)]
Remove unused variable.

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

9 years agoEliminate O(n^2) worst-case behavior in SSA construction
Cameron Zwarich [Wed, 8 Apr 2015 18:26:20 +0000 (18:26 +0000)]
Eliminate O(n^2) worst-case behavior in SSA construction

The code uses a priority queue and a worklist, which share the same
visited set, but the visited set is only updated when inserting into
the priority queue. Instead, switch to using separate visited sets
for the priority queue and worklist.

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

9 years ago[LoopAccesses] Allow analysis to complete in the presence of uniform stores
Adam Nemet [Wed, 8 Apr 2015 17:48:40 +0000 (17:48 +0000)]
[LoopAccesses] Allow analysis to complete in the presence of uniform stores

(Re-apply r234361 with a fix and a testcase for PR23157)

Both run-time pointer checking and the dependence analysis are capable
of dealing with uniform addresses. I.e. it's really just an orthogonal
property of the loop that the analysis computes.

Run-time pointer checking will only try to reason about SCEVAddRec
pointers or else gives up. If the uniform pointer turns out the be a
SCEVAddRec in an outer loop, the run-time checks generated will be
correct (start and end bounds would be equal).

In case of the dependence analysis, we work again with SCEVs. When
compared against a loop-dependent address of the same underlying object,
the difference of the two SCEVs won't be constant. This will result in
returning an Unknown dependence for the pair.

When compared against another uniform access, the difference would be
constant and we should return the right type of dependence
(forward/backward/etc).

The changes also adds support to query this property of the loop and
modify the vectorizer to use this.

Patch by Ashutosh Nema!

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

9 years ago[ARM] make vminnm/vmaxnm work with ?le, ?ge and no-nans-fp-math
Scott Douglass [Wed, 8 Apr 2015 17:18:28 +0000 (17:18 +0000)]
[ARM] make vminnm/vmaxnm work with ?le, ?ge and no-nans-fp-math

Because -menable-no-nans causes fcmp conditions to be rewritten
without 'o' or 'u' the recognition code in needs to cope. Also
extended it to handle 'le' and 'ge.

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

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

9 years agofixed to test features, not CPU models
Sanjay Patel [Wed, 8 Apr 2015 16:51:42 +0000 (16:51 +0000)]
fixed to test features, not CPU models

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

9 years agoDon't repeat names in comments.
Rafael Espindola [Wed, 8 Apr 2015 16:33:46 +0000 (16:33 +0000)]
Don't repeat names in comments.

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

9 years ago[mips] Update MIPS relocations list
Simon Atanasyan [Wed, 8 Apr 2015 14:55:31 +0000 (14:55 +0000)]
[mips] Update MIPS relocations list

No functional changes.

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

9 years ago[mips] [IAS] Do not generate redundant move when expanding lw/sw with symbol.
Toma Tabacu [Wed, 8 Apr 2015 13:52:41 +0000 (13:52 +0000)]
[mips] [IAS] Do not generate redundant move when expanding lw/sw with symbol.

Summary:
Even though there is no 2nd register operand in the "lw/sw $8, symbol" case, we still try to find one,
and we end up with $0, which makes us generate an unnecessary "addu $8, $8, $0" (a.k.a. "move $8, $8").

We can avoid this by checking if the 2nd register operand is different from $0, before generating the addu.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

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

9 years agoDon't repeat names in comments. NFC.
Rafael Espindola [Wed, 8 Apr 2015 13:52:09 +0000 (13:52 +0000)]
Don't repeat names in comments. NFC.

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

9 years ago[jitlistener] Remove unused code
Benjamin Kramer [Wed, 8 Apr 2015 13:17:48 +0000 (13:17 +0000)]
[jitlistener] Remove unused code

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

9 years ago[mips] [IAS] Add support for the BNEZL and BEQZL pseudo-instructions.
Toma Tabacu [Wed, 8 Apr 2015 12:15:05 +0000 (12:15 +0000)]
[mips] [IAS] Add support for the BNEZL and BEQZL pseudo-instructions.

Summary:
They are of the form "bnezl/beqzl $rs, offset" and expand to "bnel/beql $rs, $zero, offset".

These instructions are used in Linux inline assembly.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

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

9 years agoWrite the section header in the end.
Rafael Espindola [Wed, 8 Apr 2015 11:41:24 +0000 (11:41 +0000)]
Write the section header in the end.

One could make the argument for writing it immediately after the ELF header,
but writing it in the middle of the sections like we were doing just makes
it harder for no reason.

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

9 years ago[ARM][Debug Info] Restore emitting of .cfi_def_cfa_offset for functions without stack...
Sergey Dmitrouk [Wed, 8 Apr 2015 10:10:12 +0000 (10:10 +0000)]
[ARM][Debug Info] Restore emitting of .cfi_def_cfa_offset for functions without stack frame

Summary: Looks like new code from [[ http://reviews.llvm.org/rL222057 | rL222057 ]] doesn't account for early `return` in `ARMFrameLowering::emitPrologue`, which leads to loosing `.cfi_def_cfa_offset` directive for functions without stack frame.

Reviewers: echristo, rengolin, asl, t.p.northover

Reviewed By: t.p.northover

Subscribers: llvm-commits, rengolin, aemerson

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

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

9 years ago[mips] [IAS] Remove AssemblerPredicate's from RelocPIC and RelocStatic.
Toma Tabacu [Wed, 8 Apr 2015 10:06:45 +0000 (10:06 +0000)]
[mips] [IAS] Remove AssemblerPredicate's from RelocPIC and RelocStatic.

Summary:
These AssemblerPredicate's are unnecessary and actually make some instructions unusable when assembling pre-MIPS32 ISAs.
For example, this was causing the IAS to reject the 'j' instruction for MIPS I-V.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

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

9 years ago[MachineLICM] Cleanup, remove unused parameters. NFC.
Daniel Jasper [Wed, 8 Apr 2015 07:10:30 +0000 (07:10 +0000)]
[MachineLICM] Cleanup, remove unused parameters. NFC.

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

9 years ago[lib/Fuzzer] show how to find Heartbleed with LibFuzzer
Kostya Serebryany [Wed, 8 Apr 2015 06:16:11 +0000 (06:16 +0000)]
[lib/Fuzzer] show how to find Heartbleed with LibFuzzer

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

9 years agoRevert r234389. It really was needed but really should have been cstring instead...
Craig Topper [Wed, 8 Apr 2015 06:03:17 +0000 (06:03 +0000)]
Revert r234389. It really was needed but really should have been cstring instead of string.h

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

9 years agoRemove unnecessary include. NFC
Craig Topper [Wed, 8 Apr 2015 05:56:30 +0000 (05:56 +0000)]
Remove unnecessary include. NFC

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

9 years ago[InstCombine] Refactor out OptimizeOverflowCheck. NFCI.
Sanjoy Das [Wed, 8 Apr 2015 04:27:22 +0000 (04:27 +0000)]
[InstCombine] Refactor out OptimizeOverflowCheck.  NFCI.

Summary:
This patch adds an enum `OverflowCheckFlavor` and a function
`OptimizeOverflowCheck`.  This will allow InstCombine to optimize
overflow checks without directly introducing an intermediate call to the
`llvm.$op.with.overflow` instrinsics.

This specific change is a refactoring and does not intend to change
behavior.

Reviewers: majnemer, atrick

Subscribers: llvm-commits

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

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

9 years agoRevert "[LoopAccesses] Allow analysis to complete in the presence of uniform stores"
Adam Nemet [Wed, 8 Apr 2015 04:16:55 +0000 (04:16 +0000)]
Revert "[LoopAccesses] Allow analysis to complete in the presence of uniform stores"

This reverts commit r234361.

It caused PR23157.

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

9 years ago[bpf] support BPF backend as shared library
Alexei Starovoitov [Wed, 8 Apr 2015 03:46:51 +0000 (03:46 +0000)]
[bpf] support BPF backend as shared library

dependencies were not set correctly for shared library build.
static was ok

Patch by Brenden Blanco.

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

9 years agoOops, didn't mean to commit my debug fprintfs
Matthias Braun [Wed, 8 Apr 2015 02:10:01 +0000 (02:10 +0000)]
Oops, didn't mean to commit my debug fprintfs

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

9 years agoR600/SI: Add some missing overrides
Tom Stellard [Wed, 8 Apr 2015 02:07:05 +0000 (02:07 +0000)]
R600/SI: Add some missing overrides

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

9 years agoLiveInterval: Fix computeFromMainRange() producing adjacent segments with same valno
Matthias Braun [Wed, 8 Apr 2015 01:41:10 +0000 (01:41 +0000)]
LiveInterval: Fix computeFromMainRange() producing adjacent segments with same valno

If two livesegments from different subranges happened to have the same
definition they could possibly end up as two adjacent segments in the
main liverange with the same value number which is not allowed. Detect
such cases and fix them in the 2nd pass of computeFromMainRange() if
necessary.

No testcase as there is only an out-of-tree target where I can sensibly
come up with one.

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

9 years agoR600/SI: Initial support for assembler and inline assembly
Tom Stellard [Wed, 8 Apr 2015 01:09:26 +0000 (01:09 +0000)]
R600/SI: Initial support for assembler and inline assembly

This is currently considered experimental, but most of the more
commonly used instructions should work.

So far only SI has been extensively tested, CI and VI probably work too,
but may be buggy.  The current set of tests cases do not give complete
coverage, but I think it is sufficient for an experimental assembler.

See the documentation in R600Usage for more information.

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

9 years agoR600/SI: Add missing SOPK instructions
Tom Stellard [Wed, 8 Apr 2015 01:09:22 +0000 (01:09 +0000)]
R600/SI: Add missing SOPK instructions

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

9 years agoR600/SI: Don't print offset0/offset1 DS operands when they are 0
Tom Stellard [Wed, 8 Apr 2015 01:09:19 +0000 (01:09 +0000)]
R600/SI: Don't print offset0/offset1 DS operands when they are 0

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

9 years agoELFObjectWriter.cpp: Prune obsolete \param since r234342. [-Wdocumentation]
NAKAMURA Takumi [Wed, 8 Apr 2015 00:38:50 +0000 (00:38 +0000)]
ELFObjectWriter.cpp: Prune obsolete \param since r234342. [-Wdocumentation]

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

9 years agoAArch64: disallow "fmov sD, #-0.0" during assembly.
Tim Northover [Tue, 7 Apr 2015 22:49:47 +0000 (22:49 +0000)]
AArch64: disallow "fmov sD, #-0.0" during assembly.

We weren't checking the sign of the floating point immediate before translating
it to "fmov sD, wzr". Similarly for D-regs.

Technically "movi vD.2s, #0x80, lsl #24" would work most of the time, but it's
not a blessed alias (and I don't think it should be since people expect writing
sD to zero out the high lanes, and there's no dD equivalent). So an error it is.

rdar://20455398

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

9 years agoDelete commented code. Don't repeat name in comment.
Rafael Espindola [Tue, 7 Apr 2015 22:35:40 +0000 (22:35 +0000)]
Delete commented code. Don't repeat name in comment.

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

9 years agoDon't subtract the header size just to add it back.
Rafael Espindola [Tue, 7 Apr 2015 21:51:41 +0000 (21:51 +0000)]
Don't subtract the header size just to add it back.

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

9 years ago[LoopAccesses] Allow analysis to complete in the presence of uniform stores
Adam Nemet [Tue, 7 Apr 2015 21:46:16 +0000 (21:46 +0000)]
[LoopAccesses] Allow analysis to complete in the presence of uniform stores

Both run-time pointer checking and the dependence analysis are capable
of dealing with uniform addresses. I.e. it's really just an orthogonal
property of the loop that the analysis computes.

Run-time pointer checking will only try to reason about SCEVAddRec
pointers or else gives up. If the uniform pointer turns out the be a
SCEVAddRec in an outer loop, the run-time checks generated will be
correct (start and end bounds would be equal).

In case of the dependence analysis, we work again with SCEVs. When
compared against a loop-dependent address of the same underlying object,
the difference of the two SCEVs won't be constant. This will result in
returning an Unknown dependence for the pair.

When compared against another uniform access, the difference would be
constant and we should return the right type of dependence
(forward/backward/etc).

The changes also adds support to query this property of the loop and
modify the vectorizer to use this.

Patch by Ashutosh Nema!

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

9 years ago[WinEH] Add invoke of llvm.donothing to outlined catch and cleanup handlers to identi...
Andrew Kaylor [Tue, 7 Apr 2015 21:30:23 +0000 (21:30 +0000)]
[WinEH] Add invoke of llvm.donothing to outlined catch and cleanup handlers to identify their personality.

Differential Review: http://reviews.llvm.org/D8835

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

9 years agoUse support::endian. NFC.
Rafael Espindola [Tue, 7 Apr 2015 21:22:05 +0000 (21:22 +0000)]
Use support::endian. NFC.

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

9 years agoAdd boolean to PrintStackTraceOnErrorSignal to disable crash reporting.
Pete Cooper [Tue, 7 Apr 2015 20:43:23 +0000 (20:43 +0000)]
Add boolean to PrintStackTraceOnErrorSignal to disable crash reporting.

The current crash reporting on Mac OS is only disabled via an environment variable.
This adds a boolean (default false) which can also disable crash reporting.

The only client right now is the unittests which don't ever want crash reporting, but do want to detect killed programs.

Reduces the time to run the APFloat unittests on my machine from

[----------] 47 tests from APFloatTest (51250 ms total)

to

[----------] 47 tests from APFloatTest (765 ms total)

Reviewed by Reid Kleckner and Justin Bogner

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