Commit Graph

17965 Commits

Author SHA1 Message Date
Matt Arsenault
e52dfc95ef AMDGPU: Move cndmask pseudo to be isel pseudo
There's only one use of this for the convenience
of a pattern. I think v_mov_b64_pseudo should also be
moved, but SIFoldOperands does currently make use of it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279901 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-27 01:00:37 +00:00
Quentin Colombet
c47e5db5f7 [GlobalISel] Add a fallback path to SDISel.
When global-isel fails on a MachineFunction MF, MF will be cleaned up
and given to SDISel.
Thanks to this fallback, we can already perform correctness test even if
we support only a small portion of the functions in a test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279891 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-27 00:18:31 +00:00
Michael Kuperstein
b274272581 [X86] Add baseline test for "odd" shuffles. NFC.
Adds a baseline test for lowering shuffles where the width of the output
vector is not twice the size of the input vectors. Many of those sequences
are suboptimal, and will hopefully be improved in follow-up patches.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279888 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-27 00:10:24 +00:00
Tom Stellard
c6ee33f19c AMDGPU/SI: Canonicalize offset order for merged DS instructions
Summary:
If the scheduler clusters the loads, then the offsets will be sorted,
but it is possible for the scheduler to scheduler loads together
without out explicitly clustering them, which would give us non-sorted
offsets.

Also, we will want to do this if we move the load/store optimizer before
the scheduler.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits, kzhuravl

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279870 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 21:36:47 +00:00
Manman Ren
55d021c2f5 Swift Calling Convetion: add support for AArch64.
It will just be the same as the regular calling convention.

rdar://28029509


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279853 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 19:28:17 +00:00
Tim Northover
2fd36a5c7b AArch64: avoid assertion on illegal types in performFDivCombine.
In the code to detect fixed-point conversions and make use of AArch64's special
instructions, we weren't prepared for weird types. The fptosi direction got
fixed recently, but not the similar sitofp code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279852 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 18:52:31 +00:00
Chad Rosier
519119c89d [AArch64] Avoid materializing constant values when generating csel instructions.
Differential Revision: https://reviews.llvm.org/D23677

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279849 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 18:05:50 +00:00
Tim Northover
ce55c03b2b GlobalISel: mark G_FPEXT legal from float to double.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279845 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 17:46:22 +00:00
Tim Northover
9e4ec13f32 GlobalISel: mark G_FCMP legal on float & double.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279844 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 17:46:19 +00:00
Tim Northover
75d2e48802 GlobalISel: simplify G_ICMP legalization regime.
It's unclear how the old

    %res(32) = G_ICMP { s32, s32 } intpred(eq), %0, %1

is actually different from an s1 verison

    %res(1) = G_ICMP { s1, s32 } intpred(eq), %0, %1

so we'll remove it for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279843 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 17:46:17 +00:00
Tim Northover
b04cf870a6 GlobalISel: legalize sdiv and srem operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279842 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 17:46:13 +00:00
Tim Northover
e7265c7232 GlobalISel: legalize under-width divisions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279841 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 17:46:06 +00:00
Tim Northover
3c47a67a88 GlobalISel: mark selects legal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279840 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 17:46:03 +00:00
Tim Northover
f1f64bed75 GlobalISel: mark float/int conversions legal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279839 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 17:45:58 +00:00
Chad Rosier
57accc8cff [AArch64] Avoid materializing constant 1 by using csinc, rather than csel.
This is similar to what was done in r261675, but for CSINC rather than CSINV.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279822 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 14:01:55 +00:00
Pablo Barrio
db520df3c5 Handle empty functions with debug info in load/store opt pass
Summary:
In fuctions that contained debug info but were empty otherwise,
the ARM load/store optimizer could abort. This was because
function MergeReturnIntoLDM handled the special case where a
Machine Basic BLock is empty by calling MBB.empty(). However, this
returns false in presence of debug info, although the function
should be considered empty in the eyes of the load/store optimizer.
This has been fixed by handling the case where searching through the
block finds only debug instructions.

Reviewers: rengolin, dexonsmith, llvm-commits, jmolloy

Subscribers: t.p.northover, aemerson, rengolin, samparker

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279820 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 13:00:39 +00:00
Simon Pilgrim
65eaa0f3a4 [X86][SSE4A] The EXTRQ/INSERTQ bit extraction/insertion ops should be in the integer domain
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279811 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 09:55:41 +00:00
Craig Topper
f184175641 [X86][SSE] Add CMPSS/CMPSD intrinsic scalar load folding support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279806 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 07:08:00 +00:00
Matt Arsenault
f9a7ed710d Replace subregister uses when processing tied operands
This was for some reason skipping operands that are subregisters
instead of keeping the same subregister index.

v_movreld_b32 expects src0 to be the subregister of the tied
super register use/def.

e.g.

v_movreld_b32 v0, v9, <imp-def, tied3> v[0:3], <imp-use, tied2> v[0:3]

was being replaced with

v[4:7] = copy v[0:3]
v_movreld_b32 v0, v9, <imp-def, tied3> v[4:7], <imp-use, tied2> v[4:7],

which really writes to v[0:3]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279804 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 06:31:32 +00:00
Michael Kuperstein
5858ccdfc7 Revert r274613 because it breaks the test suite with AVX512
This reverts most of r274613 (AKA r274626) and its follow-ups (r276347, r277289),
due to miscompiles in the test suite. The FastISel change was left in, because
it apparently fixes an unrelated issue.

(Recommit of r279782 which was broken due to a bad merge.)

This fixes 4 out of the 5 test failures in PR29112.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279788 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-25 22:48:11 +00:00
Michael Kuperstein
efd12f4af5 Revert r279782 due to debug buildbot breakage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279785 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-25 22:14:45 +00:00
Michael Kuperstein
0eddaa0d42 Revert r274613 because it breaks the test suite with AVX512
This reverts most of r274613 and its follow-ups (r276347, r277289), due to
miscompiles in the test suite. The FastISel change was left in, because it
apparently fixes an unrelated issue.

This fixes 4 out of the 5 test failures in PR29112.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279782 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-25 21:55:41 +00:00
Tim Northover
1b03791034 GlobalISel: mark simple ops legal even on types < 32-bit.
The 32-bit variants of these operations don't depend on the bits not being
operated on, so they also naturally model operations narrower than the actual
register width.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279760 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-25 17:37:39 +00:00
Tim Northover
faab2fbd99 GlobalISel: mark pointer constants as legal on AArch64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279759 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-25 17:37:35 +00:00
Tim Northover
042ca5a33a GlobalISel: perform multi-step legalization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279758 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-25 17:37:32 +00:00
Tim Northover
bbdb9c7d9b GlobalISel: mark small extends as legal on AArch64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279757 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-25 17:37:25 +00:00
Michael Kuperstein
59f7ccfe10 [X86] 512-bit VPAVG requires AVX512BW
Fix VPAVG detection to require AVX512BW, not AVX512F for 512-bit widths,
and change associated asserts to assert in the right direction...

This fixes PR29111.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279755 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-25 17:17:46 +00:00
Ron Lieberman
142e7149f3 [Hexagon] vector store print tracing.
Add vector store print tracing option for hexagon vector instructions.

https://reviews.llvm.org/D23870



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279739 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-25 13:35:48 +00:00
Simon Pilgrim
271996d3b0 [X86][AVX] Improved AVX512F/AVX512VL SubVectorBroadcast tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279736 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-25 12:50:13 +00:00
Simon Pilgrim
8102979106 [X86][AVX] Provide SubVectorBroadcast fallback if load fold fails (PR29133)
Fix for PR29133, matching the approach that was taken for AVX1 scalar broadcasts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279735 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-25 12:45:16 +00:00
Matthias Braun
690a3cbc95 MachineFunctionProperties/MIRParser: Rename AllVRegsAllocated->NoVRegs, compute it
Rename AllVRegsAllocated to NoVRegs. This avoids the connotation of
running after register and simply describes that no vregs are used in
a machine function. With that we can simply compute the property and do
not need to dump/parse it in .mir files.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279698 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-25 01:27:13 +00:00
Kyle Butt
7a5b51daf2 Test: Add REQUIRES: asserts to test that now requires stats.
Test was modified in r279670

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279690 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-25 00:06:52 +00:00
Krzysztof Parzyszek
d720b00354 [Hexagon] Check for block end when skipping debug instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279681 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-24 22:36:35 +00:00
Matthias Braun
249a3152c0 MIRParser/MIRPrinter: Compute HasInlineAsm instead of printing/parsing it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279680 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-24 22:34:06 +00:00
Matthias Braun
6928bc96df Missed a test in my last commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279679 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-24 22:32:11 +00:00
Matthias Braun
da04ce1480 MachineRegisterInfo/MIR: Initialize tracksSubRegLiveness early, do not print/parser it
tracksSubRegLiveness only depends on the Subtarget and a cl::opt, there
is not need to change it or save/parse it in a .mir file.
Make the field const and move the initialization LiveIntervalAnalysis to the
MachineRegisterInfo constructor. Also cleanup some code and fix some
instances which better use MachineRegisterInfo::subRegLivenessEnabled() instead
of TargetSubtargetInfo::enableSubRegLiveness().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279676 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-24 22:17:45 +00:00
Kyle Butt
24ff83f72f CodeGen: If Convert blocks that would form a diamond when tail-merged.
The following function currently relies on tail-merging for if
conversion to succeed. The common tail of cond_true and cond_false is
extracted, and this then forms a diamond pattern that can be
successfully if converted.

If this block does not get extracted, either because tail-merging is
disabled or the threshold is higher, we should still recognize this
pattern and if-convert it.

Fixed a regression in the original commit. Need to un-reverse branches after
reversing them, or other conversions go awry.

define i32 @t2(i32 %a, i32 %b) nounwind {
entry:
        %tmp1434 = icmp eq i32 %a, %b           ; <i1> [#uses=1]
        br i1 %tmp1434, label %bb17, label %bb.outer

bb.outer:               ; preds = %cond_false, %entry
        %b_addr.021.0.ph = phi i32 [ %b, %entry ], [ %tmp10, %cond_false ]
        %a_addr.026.0.ph = phi i32 [ %a, %entry ], [ %a_addr.026.0, %cond_false ]
        br label %bb

bb:             ; preds = %cond_true, %bb.outer
        %indvar = phi i32 [ 0, %bb.outer ], [ %indvar.next, %cond_true ]
        %tmp. = sub i32 0, %b_addr.021.0.ph
        %tmp.40 = mul i32 %indvar, %tmp.
        %a_addr.026.0 = add i32 %tmp.40, %a_addr.026.0.ph
        %tmp3 = icmp sgt i32 %a_addr.026.0, %b_addr.021.0.ph
        br i1 %tmp3, label %cond_true, label %cond_false

cond_true:              ; preds = %bb
        %tmp7 = sub i32 %a_addr.026.0, %b_addr.021.0.ph
        %tmp1437 = icmp eq i32 %tmp7, %b_addr.021.0.ph
        %indvar.next = add i32 %indvar, 1
        br i1 %tmp1437, label %bb17, label %bb

cond_false:             ; preds = %bb
        %tmp10 = sub i32 %b_addr.021.0.ph, %a_addr.026.0
        %tmp14 = icmp eq i32 %a_addr.026.0, %tmp10
        br i1 %tmp14, label %bb17, label %bb.outer

bb17:           ; preds = %cond_false, %cond_true, %entry
        %a_addr.026.1 = phi i32 [ %a, %entry ], [ %tmp7, %cond_true ], [ %a_addr.026.0, %cond_false ]
        ret i32 %a_addr.026.1
}

Without tail-merging or diamond-tail if conversion:
LBB1_1:                                 @ %bb
                                        @ =>This Inner Loop Header: Depth=1
        cmp     r0, r1
        ble     LBB1_3
@ BB#2:                                 @ %cond_true
                                        @   in Loop: Header=BB1_1 Depth=1
        subs    r0, r0, r1
        cmp     r1, r0
        it      ne
        cmpne   r0, r1
        bgt     LBB1_4
LBB1_3:                                 @ %cond_false
                                        @   in Loop: Header=BB1_1 Depth=1
        subs    r1, r1, r0
        cmp     r1, r0
        bne     LBB1_1
LBB1_4:                                 @ %bb17
        bx      lr

With diamond-tail if conversion, but without tail-merging:
@ BB#0:                                 @ %entry
        cmp     r0, r1
        it      eq
        bxeq    lr
LBB1_1:                                 @ %bb
                                        @ =>This Inner Loop Header: Depth=1
        cmp     r0, r1
        ite     le
        suble   r1, r1, r0
        subgt   r0, r0, r1
        cmp     r1, r0
        bne     LBB1_1
@ BB#2:                                 @ %bb17
        bx      lr

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279671 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-24 21:34:27 +00:00
Kyle Butt
b711924e7a IfConversion: Rescan diamonds.
The cost of predicating a diamond is only the instructions that are not shared
between the two branches. Additionally If a predicate clobbering instruction
occurs in the shared portion of the branches (e.g. a cond move), it may still
be possible to if convert the sub-cfg. This change handles these two facts by
rescanning the non-shared portion of a diamond sub-cfg to recalculate both the
predication cost and whether both blocks are pred-clobbering.

Fixed 2 bugs before recommitting. Branch instructions must be compared and found
identical before diamond conversion. Also, predicate-clobbering instructions in
the shared prefix disqualifies a potential diamond conversion. Includes tests
for both.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279670 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-24 21:34:24 +00:00
Changpeng Fang
fb717b4b98 AMDGCN/SI: Implement readlane/readfirstlane intrinsics
Summary:
  This patch implements readlane/readfirstlane intrinsics.
TODO: need to define a new register class to consider the case
that the source could be a vector register or M0.

Reviewed by:
  arsenm and tstellarAMD

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279660 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-24 20:35:23 +00:00
Rafael Espindola
bde752e10f Use isTargetMachO instead of isTargetDarwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279655 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-24 19:02:29 +00:00
Simon Pilgrim
7432a84aec [X86][SSE] Add MINSD/MAXSD/MINSS/MAXSS intrinsic scalar load folding support
These are no different in load behaviour to the existing ADD/SUB/MUL/DIV scalar ops but were missing from isNonFoldablePartialRegisterLoad

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279652 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-24 18:40:53 +00:00
Simon Pilgrim
aa06e49225 [X86][SSE] Add support for combining VZEXT_MOVL target shuffles
Includes adding more general support for the pattern: VZEXT_MOVL(VZEXT_LOAD(ptr)) -> VZEXT_LOAD(ptr)

This has unearthed a couple of latent poor codegen issues (MINSS/MAXSS scalar load folding and MOVDDUP/BROADCAST load folding patterns), which will be fixed shortly.

Its also reduced a couple of tests so that they no longer reach the instruction threshold necessary to be combined to PSHUFB (see PR26183).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279646 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-24 18:07:53 +00:00
Tim Northover
4e85e2006a GlobalISel: fix cmp test to be in SSA form
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279633 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-24 15:37:51 +00:00
Simon Pilgrim
e2aca6b0d9 [X86][SSE] Regenerate scalar math load folding tests for 32 and 64 bit targets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279630 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-24 15:07:11 +00:00
Wei Ding
25d826e483 AMDGPU : Add V_SAD_U32 instruction pattern.
Differential Revision: http://reviews.llvm.org/D23069

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279629 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-24 14:59:47 +00:00
Krzysztof Parzyszek
31a5f885bf Create subranges for new intervals resulting from live interval splitting
The register allocator can split a live interval of a register into a set
of smaller intervals. After the allocation of registers is complete, the
rewriter will modify the IR to replace virtual registers with the corres-
ponding physical registers. At this stage, if a register corresponding
to a subregister of a virtual register is used, the rewriter will check
if that subregister is undefined, and if so, it will add the <undef> flag
to the machine operand. The function verifying liveness of the subregis-
ter would assume that it is undefined, unless any of the subranges of the
live interval proves otherwise.
The problem is that the live intervals created during splitting do not
have any subranges, even if the original parent interval did. This could
result in the <undef> flag placed on a register that is actually defined.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279625 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-24 13:37:55 +00:00
Simon Dardis
39b3d8a9d4 [mips] Preparatory work for a generic scheduler
Extend instruction definitions from nearly all ISAs to include
appropriate instruction itineraries. Change MIPS16s gp prologue
generation to use real instructions instead of using a pseudo
instruction.

Reviewers: dsanders, vkalintiris

Differential Review: https://reviews.llvm.org/D23548


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279623 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-24 13:00:47 +00:00
Simon Pilgrim
e01c44e124 [X86][AVX2] Ensure on 32-bit targets that we broadcast f64 types not i64 (PR29101)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279622 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-24 12:42:31 +00:00
Simon Pilgrim
dfa8eaac29 [X86][F16C] Regenerated f16c tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279621 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-24 11:56:15 +00:00
Matthias Braun
fa5c5c7db3 CodeGen: Remove MachineFunctionAnalysis => Enable (Machine)ModulePasses
Re-apply this patch, hopefully I will get away without any warnings
in the constructor now.

This patch removes the MachineFunctionAnalysis. Instead we keep a
map from IR Function to MachineFunction in the MachineModuleInfo.

This allows the insertion of ModulePasses into the codegen pipeline
without breaking it because the MachineFunctionAnalysis gets dropped
before a module pass.

Peak memory should stay unchanged without a ModulePass in the codegen
pipeline: Previously the MachineFunction was freed at the end of a codegen
function pipeline because the MachineFunctionAnalysis was dropped; With
this patch the MachineFunction is freed after the AsmPrinter has
finished.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279602 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-24 01:52:46 +00:00