1
0
mirror of https://github.com/RPCS3/llvm.git synced 2024-12-14 23:48:56 +00:00
Commit Graph

137693 Commits

Author SHA1 Message Date
Chad Rosier
bafb3833c9 Fix comments about IndirectBrInst in Instructions.h
Patch by yo (Chiang, Yi-Yo) <yo@skymizer.com>.
Differential Revision: https://reviews.llvm.org/D23982

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280241 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 13:39:34 +00:00
James Molloy
7ae397d16e Revert "[SimplifyCFG] Improve FoldValueComparisonIntoPredecessors to handle more cases"
This reverts commit r280218. This *also* causes buildbot errors. Sigh. Not a successful day all around!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280239 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 13:32:28 +00:00
Aaron Ballman
1012af3602 Changing a code block to text because Sphinx does not like it on the builder (http://lab.llvm.org:8011/builders/llvm-sphinx-docs/builds/12516/steps/docs-llvm-html/logs/stdio)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280238 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 13:29:23 +00:00
James Molloy
8f65479ccc Revert "[SimplifyCFG] Change the algorithm in SinkThenElseCodeToEnd"
This reverts commit r280216 - it caused buildbot failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280234 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 13:16:52 +00:00
James Molloy
85dac9a06d Revert "[SimplifyCFG] Handle tail-sinking of more than 2 incoming branches"
This reverts commit r280217. r280216 caused buildbot failures - backing out the entire chain.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280233 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 13:16:45 +00:00
James Molloy
3d40b2a633 Revert "[SimplifyCFG] Add a workaround to fix PR30188"
This reverts commit r280219. r280216 caused buildbot failures - backing out the entire chain.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280232 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 13:16:36 +00:00
James Molloy
0ba92ab006 Revert "[SimplifyCFG] Fix bootstrap failure after r280220"
This reverts commit r280228. r280216 caused buildbot failures - backing out the entire sequence.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280231 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 13:16:30 +00:00
Diana Picus
9cbda653f7 Use abstraction in AArch64AsmPrinter::lowerSTACKMAP. NFCI
Use functionality from StackMapOpers instead of hardcoding an operand access.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280230 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 12:43:49 +00:00
Diana Picus
aca9e6bb2d Typo fixes. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280229 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 12:43:44 +00:00
James Molloy
d5c06d12b3 [SimplifyCFG] Fix bootstrap failure after r280220
We check that a sinking candidate is used by only one PHI node during our legality checks. However for instructions that are used by other sinking candidates our heuristic is less conservative. This can result in a candidate actually being illegal when we come to sink it because of how we sunk a predecessor. Do the used-by-only-one-PHI checks again during sinking to ensure we don't crash.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280228 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 12:33:48 +00:00
Nikolay Haustov
5b50326ddb AMDGPU/SI: Handle aliases in AMDGPUAlwaysInlinePass
Summary:
Simply replace usage of aliases to functions with aliasee.
This came up when bitcode linking to builtin library and
calls to aliases not being resolved.

Also made minor improvements to existing test.

Reviewers: tstellarAMD, alex-t, vpykhtin

Subscribers: arsenm, wdng, rampitec

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280221 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 11:18:33 +00:00
James Molloy
1c6ea1a949 [SimplifyCFG] Add a workaround to fix PR30188
We're sinking stores, which is a good thing, but in the process creating selects for the store address operand, which SROA/Mem2Reg can't look through, which caused serious regressions.

The real fix is in SROA, which I'll be looking into.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280219 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 10:46:45 +00:00
James Molloy
87aeaacc31 [SimplifyCFG] Improve FoldValueComparisonIntoPredecessors to handle more cases
A very important case is not handled here: multiple arcs to a single block with a PHI. Consider:

    a:
      %1 = icmp %b, 1
      br %1, label %c, label %e
    c:
      %2 = icmp %b, 2
      br %2, label %d, label %e
    d:
      br %e
    e:
      phi [0, %a], [1, %c], [2, %d]

FoldValueComparisonIntoPredecessors will refuse to fold this, as it doesn't know how to deal with two arcs to a common destination with different PHI values. The answer is obvious - just split all conflicting arcs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280218 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 10:46:39 +00:00
James Molloy
e786823705 [SimplifyCFG] Handle tail-sinking of more than 2 incoming branches
This was a real restriction in the original version of SinkIfThenCodeToEnd. Now it's been rewritten, the restriction can be lifted.

As part of this, we handle a very common and useful case where one of the incoming branches is actually conditional. Consider:

   if (a)
     x(1);
   else if (b)
     x(2);

This produces the following CFG:

         [if]
        /    \
      [x(1)] [if]
        |     | \
        |     |  \
        |  [x(2)] |
         \    |  /
          [ end ]

[end] has two unconditional predecessor arcs and one conditional. The conditional refers to the implicit empty 'else' arc. This same pattern can also be caused by an empty default block in a switch.

We can't sink the call to x() down to end because no call to x() happens on the third incoming arc (assume that x() has sideeffects for the sake of argument; if something is safe to speculate we could indeed sink nevertheless but this cannot happen in the general case and causes many extra selects).

We are now able to detect this case and split off the unconditional arcs to a common successor:

         [if]
        /    \
      [x(1)] [if]
        |     | \
        |     |  \
        |  [x(2)] |
         \   /    |
     [sink.split] |
           \     /
           [ end ]

Now we can sink the call to x() into %sink.split. This can cause significant code simplification in many testcases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280217 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 10:46:33 +00:00
James Molloy
d308206dce [SimplifyCFG] Change the algorithm in SinkThenElseCodeToEnd
r279460 rewrote this function to be able to handle more than two incoming edges and took pains to ensure this didn't regress anything.

This time we change the logic for determining if an instruction should be sunk. Previously we used a single pass greedy algorithm - sink instructions until one requires more than one PHI node or we run out of instructions to sink.

This had the problem that sinking instructions that had non-identical but trivially the same operands needed extra logic so we sunk them aggressively. For example:

    %a = load i32* %b          %d = load i32* %b
    %c = gep i32* %a, i32 0    %e = gep i32* %d, i32 1

Sinking %c and %e would naively require two PHI merges as %a != %d. But the loads are obviously equivalent (and maybe can't be hoisted because there is no common predecessor).

This is why we implemented the fairly complex function areValuesTriviallySame(), to look through trivial differences like this. However it's just not clever enough.

Instead, throw areValuesTriviallySame away, use pointer equality to check equivalence of operands and switch to a two-stage algorithm.

In the "scan" stage, we look at every sinkable instruction in isolation from end of block to front. If it's sinkable, we keep track of all operands that required PHI merging.

In the "sink" stage, we iteratively sink the last non-terminator in the source blocks. But when calculating how many PHIs are actually required to be inserted (to work out if we should stop or not) we remove any values that have already been sunk from the set of PHI-merges required, which allows us to be more aggressive.

This turns an algorithm with potentially recursive lookahead (looking through GEPs, casts, loads and any other instruction potentially not CSE'd) to two linear scans.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280216 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 10:46:23 +00:00
James Molloy
5ae34477c2 [SimplifyCFG] Tail-merge calls with sideeffects
This was deliberately disabled during my rewrite of SinkIfThenToEnd to keep behaviour
at least vaguely consistent with the previous version and keep it as close to NFC as
I could.

There's no real reason not to merge sideeffect calls though, so let's do it! Small fixup
along the way to ensure we don't create indirect calls.

Should fix PR28964.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280215 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 10:46:16 +00:00
Simon Pilgrim
0bc610ca49 [X86][SSE] Improve awareness of fptrunc implicit zeroing of upper 64-bits of xmm result
Add patterns to avoid inserting unnecessary zeroing shuffles when lowering fptrunc to (v)cvtpd2ps

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280214 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 10:35:13 +00:00
Igor Kudrin
da47983f42 [Coverage] Make sorting criteria for CounterMappingRegions local.
Move the comparison function into the only place there it is used,
i.e. the call to std::stable_sort in CoverageMappingWriter::write().

Add sorting by region kinds as it is required to ensure stable order
in our tests and to simplify D23987.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280198 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 07:01:17 +00:00
Craig Topper
f903ac6796 [AVX-512] Add patterns to select masked logical operations if the select has a floating point type.
This is needed in order to replace the masked floating point logical op intrinsics with native IR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280195 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 05:37:52 +00:00
Craig Topper
2699e28795 [AVX-512] Add test cases for masked floating point logic operations with bitcasts between the logic ops and the select. We don't currently select masked operations for these cases.
Test cases taken from optimized clang output after trying to convert the masked floating point logical op intrinsics to native IR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280194 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 05:37:50 +00:00
Craig Topper
bcb836fe38 [X86] Regenerate a test using update_llc_test_checks.py.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280193 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 05:37:47 +00:00
Dean Michael Berris
74727ab21e [XRay] Support multiple return instructions in a single basic block
Add a .mir test to catch this case, and fix the xray-instrumentation
pass to handle it appropriately.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280192 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 05:20:08 +00:00
David Majnemer
8b6ce0169b [Loads] Properly populate the visited set in isDereferenceableAndAlignedPointer
There were paths where we wouldn't populate the visited set, causing us
to recurse forever if an SSA variable was defined in terms of itself.

This fixes PR30210.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280191 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 03:22:32 +00:00
Hal Finkel
982b9c9736 [PowerPC] Don't spill the frame pointer twice
When a function contains something, such as inline asm, which explicitly
clobbers the register used as the frame pointer, don't spill it twice. If we
need a frame pointer, it will be saved/restored in the prologue/epilogue code.
Explicitly spilling it again will reuse the same spill slot used by the
prologue/epilogue code, thus clobbering the saved value. The same applies
to the base-pointer or PIC-base register.

Partially fixes PR26856. Thanks to Ulrich for his analysis and the small
inline-asm reproducer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280188 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 00:52:03 +00:00
Gor Nishanov
b6a139826b [Coroutines] Part 10: Add coroutine promise support.
Summary:
1) CoroEarly now lowers llvm.coro.promise intrinsic that allows to obtain
a coroutine promise pointer from a coroutine frame and vice versa.

2) CoroFrame now interprets Promise argument of llvm.coro.begin to
place CoroutinPromise alloca at a deterministic offset from the coroutine frame.

Now, the coroutine promise example from docs\Coroutines.rst compiles and produces expected result (see test/Transform/Coroutines/ex4.ll).

Reviewers: majnemer

Subscribers: llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280184 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 00:35:41 +00:00
Sanjay Patel
1a31aefb30 [InstCombine] clean up InsertRangeTest; NFCI
It's much less code and easier to read if we don't duplicate
everything between the 'Inside' and not 'Inside' cases.

As noted with the FIXME, the goal is to make this vector-friendly
in a follow-up patch.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280183 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 00:19:35 +00:00
Vedant Kumar
751f50e8f5 [llvm-cov] Drop redundant "No." suffix in a column title
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280181 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 00:09:44 +00:00
Alina Sbirlea
74a597b31a [LoadStoreVectorizer] Change VectorSet to Vector to match head and tail positions. Resolves PR29148.
Summary:
LSV was using two vector sets (heads and tails) to track pairs of adjiacent position to vectorize.
A recent optimization is trying to obtain the longest chain to vectorize and assumes the positions
in heads(H) and tails(T) match, which is not the case is there are multiple tails for the same head.

e.g.:
i1: store a[0]
i2: store a[1]
i3: store a[1]
Leads to:
H: i1
T: i2 i3
Instead of:
H: i1 i1
T: i2 i3
So the positions for instructions that follow i3 will have different indexes in H/T.
This patch resolves PR29148.

This issue also surfaced the fact that if the chain is too long, and TLI
returns a "not-fast" answer, the whole chain will be abandoned for
vectorization, even though a smaller one would be beneficial.
Added a testcase and FIXME for this.

Reviewers: tstellarAMD, arsenm, jlebar

Subscribers: mzolotukhin, wdng, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280179 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 23:53:59 +00:00
Sanjay Patel
ea62cfaac8 [InstCombine] add tests to show type limitations of InsertRangeTest and callers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280175 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 23:16:59 +00:00
Reid Kleckner
0887fc5a92 [codeview] Remove redundant TypeTable lookup
As written, the code should assert if this lookup would have ever
succeeded.  Without looking through composite types, the type graph
should be acyclic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280168 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 21:48:14 +00:00
Kevin Enderby
4cbb1265d3 Add a test file, macho-invalid-dysymtab-extreloff-nextrel,
I forgot to do an svn add on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280167 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 21:48:06 +00:00
Lang Hames
e9f64d4dd5 [ORC][RPC] Fix some bugs in the callB primitive.
Still no unit test due to synchronization bugs on s390. These issues were
discovered in an out-of-tree utility.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280163 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 21:29:48 +00:00
Chris Bieneman
3449d54601 [CMake] Ensure that compiler-rt is added first
This will enable other runtime projects to detect the presence of sanitizer runtimes by referring to the sanitizer targets directly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280162 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 21:29:21 +00:00
Kevin Enderby
b8c2c1d3ff Next set of additional error checks for invalid Mach-O files for bad LC_DYSYMTAB’s.
This contains the missing checks for LC_DYSYMTAB load command fields.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280161 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 21:28:30 +00:00
Saleem Abdulrasool
deb6eadc08 llvm-readobj: speculative fix for MSVC
Use the typedef rather than using to type alias the typename.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280158 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 21:21:07 +00:00
Tim Northover
7be2d152c2 GlobalISel: combine extracts & sequences created for legalization
Legalization ends up creating many G_SEQUENCE/G_EXTRACT pairs which leads to
inefficient codegen (even for -O0), so add a quick pass over the function to
remove them again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280155 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 20:51:25 +00:00
Matt Arsenault
605a81a85c AMDGPU: Relax SGPR asm constraint register class
s should be SReg_32 to be as general as possible. This can avoid a copy
from m0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280154 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 20:50:08 +00:00
Mike Aizatsky
d7a5ad2193 [libfuzzer] simplified unit truncation; do not write trunc items to disc
Differential Revision: https://reviews.llvm.org/D24049

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280153 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 20:49:07 +00:00
Hemant Kulkarni
911b0b869e Revert "ELFDumper: Unversioned symbols must not have trailing @"
This reverts commit 8df7a877949e8782a3a28e3ecdb0770c1e444056.

Fixing other repositories and adding changes together.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280152 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 20:42:46 +00:00
Michael Kuperstein
67a6032e65 [LoopVectorizer] Predicate instructions in blocks with several incoming edges
We don't need to limit predication to blocks that have a single incoming
edge, we just need to use the right mask.
This fixes PR30172.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280148 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 20:22:21 +00:00
David Majnemer
99edeba1c3 [COFFObjectFile] Ignore broken symbol table
When binaries are compressed by UPX, information about symbol table
offset and symbol count remain unchanged (but became invalid due to
compression).
This causes failure in the constructor and the rest of the binary cannot
be processed.

Instead, reset symbol related information (symbol/string table pointers,
sizes) - this should disable the related iterators and functions while
the rest of the binary can still be processed.

Patch by Bandzi Michal!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280147 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 20:20:24 +00:00
Daniel Berlin
90f82fc50c IntrArgMemOnly is only defined (and current AA machinery only sanely supports) pointer arguments, and these intrinsics have vector of pointer arguments. Remove ArgMemOnly until we either have the machinery, define a new attribute, or something similar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280143 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 19:58:48 +00:00
Lang Hames
7ebede93b7 Re-instate recent RPC updates (r280016, r280017, r280027, r280051) with a
workaround for the limitations of MSVC 2013's std::future class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280141 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 19:56:15 +00:00
Hemant Kulkarni
b16d4d3441 ELFDumper: Unversioned symbols must not have trailing @
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280140 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 19:50:02 +00:00
Duncan P. N. Exon Smith
a55b262ca2 CodeGen: Fixup for r280128, since GCC isn't as permissive as Clang
Fixes the bots, e.g.:
http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-buildserver/builds/10055

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280135 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 19:11:11 +00:00
Tim Northover
8be91b553e GlobalISel: forbid physical registers on generic MIs.
We're intending to move to a world where the type of a register is determined
by its (unique) def. This is incompatible with physregs, which are untyped.

It also means the other passes don't have to worry quite so much about
register-class compatibility and inserting COPYs appropriately.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280132 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 18:52:46 +00:00
Saleem Abdulrasool
b899d1987d llvm-readobj: add support for printing GNU Notes
Add support for printing the GNU Notes.  This allows an easy way to view the
build id for a binary built with the build id.  Currently, this only handles the
GNU notes, though it would be easy to extend for other note types (default,
FreeBSD, NetBSD, etc).  Only the GNU style is supported currently.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280131 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 18:52:02 +00:00
Saleem Abdulrasool
a2a31ca57f Support: add some more ELF constants
Add constants for additional GNU note types and the GNU Notes OS type id.  This
is needed to support printing the notes in ELF binaries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280130 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 18:51:59 +00:00
Zachary Turner
e046d5ce18 Fix unit test after function name change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280129 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 18:45:32 +00:00
Duncan P. N. Exon Smith
9c80b35060 ADT: Split ilist_node_traits into alloc and callback, NFC
Many lists want to override only allocation semantics, or callbacks for
iplist.  Split these up to prevent code duplication.
- Specialize ilist_alloc_traits to change the implementations of
  deleteNode() and createNode().
- One common desire is to do nothing deleteNode() and disable
  createNode().  Specialize ilist_alloc_traits to inherit from
  ilist_noalloc_traits for that behaviour.
- Specialize ilist_callback_traits to use the addNodeToList(),
  removeNodeFromList(), and transferNodesFromList() callbacks.

As a drive-by, add some coverage to the callback-related unit tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280128 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 18:40:47 +00:00