Commit Graph

138720 Commits

Author SHA1 Message Date
Andrey Bokhanko
3a76c9a75b [docs] Make WritingAnLLVMPass.rst up-to-date with current state of things
This patch updates WritingAnLLVMPass.rst to make it in line with current state of things.

Specifically:

* Makefile instructions replaced with CMake ones
* Filenames replaced with correct ones
* Example reformatted a bit to make it less confusing and more conforming to LLVM Coding Standards
* opt tool output updated with what it actually prints nowdays
* "gcse" (which doesn't exist anymore) replaced with "gvn" (which still does)

Differential Revision: https://reviews.llvm.org/D24233


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282482 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-27 12:07:21 +00:00
Dimitar Vlahovski
6be6db9224 Trying to fix lldb build breakage probably caused by rL282452
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282479 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-27 10:34:43 +00:00
Nemanja Ivanovic
7a5ffa3882 [Power9] Builtins for ELF v.2 API conformance - back end portion
This patch corresponds to review:
https://reviews.llvm.org/D24396

This patch adds support for the "vector count trailing zeroes",
"vector compare not equal" and "vector compare not equal or zero instructions"
as well as "scalar count trailing zeroes" instructions. It also changes the
vector negation to use XXLNOR (when VSX is enabled) so as not to increase
register pressure (previously this was done with a splat immediate of all
ones followed by an XXLXOR). This was done because the altivec.h
builtins (patch to follow) use vector negation and the use of an additional
register for the splat immediate is not optimal.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282478 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-27 08:42:12 +00:00
Craig Topper
941593b0ca [X86] Add test case for PR30511 and r282341.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282473 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-27 06:44:30 +00:00
Craig Topper
bdc4313f6a [X86] Expand all-ones-vector test to cover 256-bit and 512-bit vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282472 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-27 06:44:27 +00:00
Craig Topper
02e7181ad3 [X86] Use std::max to calculate alignment instead of assuming RC->getSize() will not return a value greater than 32. I think it theoretically could be 64 for AVX-512.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282471 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-27 06:44:25 +00:00
Kostya Serebryany
cb7fbfed01 [libFuzzer] run re2 test in 8 threads by default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282469 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-27 03:33:57 +00:00
Kostya Serebryany
30eb92316c [sanitizer-coverage] fix a bug in trace-gep
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282467 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-27 01:55:08 +00:00
Kostya Serebryany
dbadbd797d [sanitizer-coverage] don't emit the CTOR function if nothing has been instrumented
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282465 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-27 01:08:33 +00:00
Ivan Krasin
cf66db4f99 Revert r277556. Add -lowertypetests-bitsets-level to control bitsets generation
Summary:
We don't currently need this facility for CFI. Disabling individual hot methods proved
to be a better strategy in Chrome.

Also, the design of the feature is suboptimal, as pointed out by Peter Collingbourne.

Reviewers: pcc

Subscribers: kcc

Differential Revision: https://reviews.llvm.org/D24948

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282461 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-27 00:29:53 +00:00
Kostya Serebryany
fb4808fb9e [libFuzzer] add a test based on openssl-1.0.1f (finds heartbleed)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282460 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-27 00:27:40 +00:00
Kostya Serebryany
65f502816c [libFuzzer] add -exit_on_src_pos to test libFuzzer itself, add a test script for RE2 that uses this flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282458 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-27 00:10:20 +00:00
Peter Collingbourne
e07092b299 LowerTypeTests: Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282456 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 23:56:17 +00:00
Peter Collingbourne
5b66e90c52 LowerTypeTests: Create LowerTypeTestsModule class and move implementation there. Related simplifications.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282455 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 23:54:39 +00:00
Daniel Dunbar
cd04c01efb [lit] Add a --max-failures option.
- This is primarily useful as a "fail fast" mode for lit, where it will stop
   running tests after the first failure.

 - Patch by Max Moiseev.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282452 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 23:38:23 +00:00
Davide Italiano
e41f2a1068 [CodeGen] Add support for emitting .init_array instead of .ctors on FreeBSD.
PR: 30494

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282451 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 22:53:15 +00:00
Davide Italiano
b412e013d3 [CodeGen] Switch test as FreeBSD will support .init_array soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282450 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 22:38:17 +00:00
Derek Schuff
0b13636546 [WebAssembly] Use the frame pointer instead of the stack pointer
When we have dynamic allocas we have a frame pointer, and
when we're lowering frame indexes we should make sure we use it.

Patch by Jacob Gravelle

Differential Revision: https://reviews.llvm.org/D24889

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282442 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 21:18:03 +00:00
Kevin Enderby
851d92e233 Next set of additional error checks for invalid Mach-O files for the
other load commands that use the Mach::linkedit_data_command type
but not used in llvm libObject code but used in llvm tool code.

This includes LC_FUNCTION_STARTS, LC_SEGMENT_SPLIT_INFO
and LC_DYLIB_CODE_SIGN_DRS load commands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282441 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 21:11:03 +00:00
Aditya Kumar
0775879181 Move computation past early return
Reviewers:
        rafael
        spatel

Differential Revision: https://reviews.llvm.org/D24843

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282440 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 21:01:13 +00:00
Piotr Padlewski
fdf7354745 [thinlto] Basic thinlto fdo heuristic
Summary:
This patch improves thinlto importer
by importing 3x larger functions that are called from hot block.

I compared performance with the trunk on spec, and there
were about 2% on povray and 3.33% on milc. These results seems
to be consistant and match the results Teresa got with her simple
heuristic. Some benchmarks got slower but I think they are just
noisy (mcf, xalancbmki, omnetpp)- running the benchmarks again with
more iterations to confirm. Geomean of all benchmarks including the noisy ones
were about +0.02%.

I see much better improvement on google branch with Easwaran patch
for pgo callsite inlining (the inliner actually inline those big functions)
Over all I see +0.5% improvement, and I get +8.65% on povray.
So I guess we will see much bigger change when Easwaran patch will land
(it depends on new pass manager), but it is still worth putting this to trunk
before it.

Implementation details changes:
- Removed CallsiteCount.
- ProfileCount got replaced by Hotness
- hot-import-multiplier is set to 3.0 for now,
didn't have time to tune it up, but I see that we get most of the interesting
functions with 3, so there is no much performance difference with higher, and
binary size doesn't grow as much as with 10.0.

Reviewers: eraman, mehdi_amini, tejohnson

Subscribers: mehdi_amini, llvm-commits

Differential Revision: https://reviews.llvm.org/D24638

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282437 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 20:37:32 +00:00
Zachary Turner
bb748a19ae Allow StringRef to be constructed from a null pointer.
Differential Revision: https://reviews.llvm.org/D24904

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282433 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 20:08:05 +00:00
Nirav Dave
134d28b393 Add support for Code16GCC
[X86] The .code16gcc directive parses X86 assembly input in 32-bit mode and
outputs in 16-bit mode. Teach parser to switch modes appropriately.

Reviewers: dwmw2, craig.topper

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282430 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 19:33:36 +00:00
Andrew Kaylor
786045e7b5 Add optimization bisect support to an optional Mips pass
Differential Revision: https://reviews.llvm.org/D19513



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282428 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 19:05:37 +00:00
Matthias Braun
3911695add Statistic: Only print statistics on exit for -stats
Previously enabling the statistics with EnableStatistics() would lead to
them getting printed to stderr/-info-output-file on exit. However
frontends may want a way to enable statistics and do the printing on
their own instead of the forced printing on exit.

This changes the code so that only the -stats option enables printing on
exit, EnableStatistics() only enables the tracking but requires invoking
one of the PrintStatistics() variants.

Differential Revision: https://reviews.llvm.org/D24819

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282425 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 18:38:07 +00:00
Matthias Braun
4d5121c6bb MachineInstr: Fix comment typo, further refine comment; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282424 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 18:38:05 +00:00
Evandro Menezes
92388ae782 [AArch64] Fix test triplet
Specify proper target triplet to pass under Windows too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282423 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 18:09:21 +00:00
Vedant Kumar
64f3b51479 [llvm-cov] Silence a warning from the MSVC runtime (NFC)
Rework getLongestCommonPrefixLen() so that it doesn't access string null
terminators. The old version with std::mismatch would do this:

                        |
                        v
    Strings[0] = ['a', nil]

    Strings[1] = ['a', 'a', nil]
                        ^
                        |

This should silence a warning from the MSVC runtime (PR30515). As
before, I tested this out by preparing a coverage report for FileCheck.
Thanks to Yaron Keren for the report!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282422 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 17:57:13 +00:00
Daniel Berlin
c9e7be5af9 Update MemorySSA unittest to account for non-pruned SSA form
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282421 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 17:44:31 +00:00
Tom Stellard
ccb1190aeb AMDGPU/SI: Don't crash on anonymous GlobalValues
Summary:
We need to call AsmPrinter::getNameWithPrefix() in order to handle
anonymous GlobalValues (e.g. @0, @1).

Reviewers: arsenm, b-sumner

Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, tony-tye, llvm-commits

Differential Revision: https://reviews.llvm.org/D24865

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282420 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 17:29:25 +00:00
Daniel Berlin
a50e80efdf Remove pruning of phi nodes in MemorySSA - it makes updating harder
Reviewers: george.burgess.iv

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D24923

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282419 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 17:22:54 +00:00
Matthew Simpson
0749c8e439 [LV] Scalarize instructions marked scalar after vectorization
This patch ensures that we actually scalarize instructions marked scalar after
vectorization. Previously, such instructions may have been vectorized instead.

Differential Revision: https://reviews.llvm.org/D23889

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282418 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 17:08:37 +00:00
Gor Nishanov
8a7cd49d0b [Coroutines] Part14: Handle coroutines with no suspend points.
Summary:
If coroutine has no suspend points, remove heap allocation and turn a coroutine into a normal function.

Also, if a pattern is detected that coroutine resumes or destroys itself prior to coro.suspend call, turn the suspend point into a simple jump to resume or cleanup label. This pattern occurs when coroutines are used to propagate errors in functions that return expected<T>.

Reviewers: majnemer

Subscribers: mehdi_amini, llvm-commits

Differential Revision: https://reviews.llvm.org/D24408

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282414 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 15:49:28 +00:00
Geoff Berry
51e92d172e [AArch64] Improve add/sub/cmp isel of uxtw forms.
Don't match the UXTW extended reg forms of ADD/ADDS/SUB/SUBS if the
32-bit to 64-bit zero-extend can be done for free by taking advantage
of the 32-bit defining instruction zeroing the upper 32-bits of the X
register destination.  This enables better instruction selection in a
few cases, such as:

  sub x0, xzr, x8
  instead of:
  mov x8, xzr
  sub x0, x8, w9, uxtw

  madd x0, x1, x1, x8
  instead of:
  mul x9, x1, x1
  add x0, x9, w8, uxtw

  cmp x2, x8
  instead of:
  sub x8, x2, w8, uxtw
  cmp x8, #0

  add x0, x8, x1, lsl #3
  instead of:
  lsl x9, x1, #3
  add x0, x9, w8, uxtw

Reviewers: t.p.northover, jmolloy

Subscribers: mcrosier, aemerson, llvm-commits, rengolin

Differential Revision: https://reviews.llvm.org/D24747

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282413 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 15:34:47 +00:00
Evandro Menezes
653861f9c7 Add support to optionally limit the size of jump tables.
Many high-performance processors have a dedicated branch predictor for
indirect branches, commonly used with jump tables.  As sophisticated as such
branch predictors are, they tend to have well defined limits beyond which
their effectiveness is hampered or even nullified.  One such limit is the
number of possible destinations for a given indirect branches that such
branch predictors can handle.

This patch considers a limit that a target may set to the number of
destination addresses in a jump table.

Patch by: Evandro Menezes <e.menezes@samsung.com>, Aditya Kumar
<aditya.k7@samsung.com>, Sebastian Pop <s.pop@samsung.com>.

Differential revision: https://reviews.llvm.org/D21940

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282412 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 15:32:33 +00:00
Alexey Bataev
34552649e8 [InstCombine] Fixed bug introduced in r282237
The index of the new insertelement instruction was evaluated in the
wrong way, it was considered as the index of the inserted value instead
of index of the position, where the value should be inserted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282401 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 13:18:59 +00:00
Krzysztof Parzyszek
23d2e04492 Fix typo in comment, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282399 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 12:38:03 +00:00
Andrea Di Biagio
56f90d72c8 [InstCombine] Teach the udiv folding logic how to handle constant expressions.
This patch fixes PR30366.

Function foldUDivShl() worked under the assumption that one of the values
in input to the function was always an instance of llvm::Instruction.
However, function visitUDivOperand() (the only user of foldUDivShl) was
clearly violating that precondition; internally, visitUDivOperand() uses pattern
matches to check the operands of a udiv. Pattern matchers for binary operators
know how to handle both Instruction and ConstantExpr values.

This patch fixes the problem in foldUDivShl(). Now we use pattern matchers
instead of explicit casts to Instruction. The reduced test case from PR30366
has been added to test file InstCombine/udiv-simplify.ll.

Differential Revision: https://reviews.llvm.org/D24565


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282398 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 12:07:23 +00:00
Dylan McKay
679be7ea7e [AVR] Add AVRMCExpr
Summary: This adds the AVRMCExpr headers and implementation.

Reviewers: arsenm, ruiu, grosbach, kparzysz

Subscribers: wdng, beanz, mgorny, kparzysz, jtbandes, llvm-commits

Differential Revision: https://reviews.llvm.org/D20503

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282397 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 11:35:32 +00:00
Sam Kolton
ecba0242f4 Revert "[AMDGPU] Disassembler: print label names in branch instructions"
This reverts commit 6c6dbe6252.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282396 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 11:29:03 +00:00
Sam Kolton
6c6dbe6252 [AMDGPU] Disassembler: print label names in branch instructions
Summary: Add AMDGPUSymbolizer for finding names for labels from ELF symbol table.

Reviewers: vpykhtin, artem.tamazov, tstellarAMD

Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, tony-tye

Differential Revision: https://reviews.llvm.org/D24802

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282394 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 10:05:50 +00:00
James Molloy
ba54dc2e88 [ARM] Promote small global constants to constant pools
If a constant is unamed_addr and is only used within one function, we can save
on the code size and runtime cost of an indirection by changing the global's storage
to inside the constant pool. For example, instead of:

      ldr r0, .CPI0
      bl printf
      bx lr
    .CPI0: &format_string
    format_string: .asciz "hello, world!\n"

We can emit:

      adr r0, .CPI0
      bl printf
      bx lr
    .CPI0: .asciz "hello, world!\n"

This can cause significant code size savings when many small strings are used in one
function (4 bytes per string).

This recommit contains fixes for a nasty bug related to fast-isel fallback - because
fast-isel doesn't know about this optimization, if it runs and emits references to
a string that we inline (because fast-isel fell back to SDAG) we will end up
with an inlined string and also an out-of-line string, and we won't emit the
out-of-line string, causing backend failures.

It also contains fixes for emitting .text relocations which made the sanitizer
bots unhappy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282387 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 07:26:24 +00:00
Zvi Rackover
9209299b97 [X86] Optimization for replacing LEA with MOV at frame index elimination time
Summary:
Replace a LEA instruction of the form 'lea (%esp), %ebx' --> 'mov %esp, %ebx'

MOV is preferable over LEA because usually there are more issue-slots available to execute MOVs than LEAs. Latest processors also support zero-latency MOVs.

Fixes pr29022.

Reviewers: hfinkel, delena, igorb, myatsina, mkuper

Differential Revision: https://reviews.llvm.org/D24705

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282385 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 06:42:07 +00:00
Chandler Carruth
56b0418212 [PM] Refactor this unittest a bit to remove duplicated code. This was
suggested at one point during code review and I deferred it to
a follow-up commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282383 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 06:29:21 +00:00
Ayman Musa
de3ef8ab93 [X86][avx512] Fix bug in masked compress store.
Differential Revision: https://reviews.llvm.org/D23984


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282381 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 06:22:08 +00:00
Chandler Carruth
ce297d7352 [SCEV] Fix the order of members in the initializer list.
Noticed due to the warning on this line. Sanjoy is on
a less-than-awesome internet connection, so committing on his behalf.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282380 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 04:49:58 +00:00
Chandler Carruth
d6345b8af0 [PM] Add a unittest covering the invalidation of a Module analysis from
a function pass nested inside of a CGSCC pass manager.

This is very similar to the previous unittest but makes sure the
invalidation logic works across all the layers here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282378 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 04:17:12 +00:00
Chandler Carruth
52c8c40bfc [PM] Add a unittest for invalidating module analyses with an SCC pass.
This reinstates r280447. Original commit log:
This wasn't really well explicitly tested with a nice unittest before.
It seems good to have reasonably broken out unittests for this kind of
functionality as I'm workin go other invalidation features to make sure
none of the existing ones regress.

This still has too much duplicated code, I plan to factor that out in
a subsequent commit to use common helpers for repeated parts of this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282377 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 04:01:55 +00:00
Sanjoy Das
efbeb45816 [SCEV] Assign LoopPropertiesCache in the move constructor
In a previous change I collapsed two different caches into one.  When
doing that I noticed that ScalarEvolution's move constructor was not
moving those caches.

To keep the previous change simple, I've moved that bugfix into this
separate change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282376 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 02:44:10 +00:00
Sanjoy Das
a80a7d1c30 [SCEV] Combine two predicates into one; NFC
Both `loopHasNoSideEffects` and `loopHasNoAbnormalExits` involve walking
the loop and maintaining similar sorts of caches.  This commit changes
SCEV to compute both the predicates via a single walk, and maintain a
single cache instead of two.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282375 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-26 02:44:07 +00:00