Commit Graph

43134 Commits

Author SHA1 Message Date
Krzysztof Parzyszek
cdc2ace692 [Hexagon] Undo shift folding where it could simplify addressing mode
For example, avoid (single shift):
  r0 = and(##536870908,lsr(r0,#3))
  r0 = memw(r1+r0<<#0)

in favor of (two shifts):
  r0 = lsr(r0,#5)
  r0 = memw(r1+r0<<#2)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296196 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 23:34:24 +00:00
Dan Gohman
53ff96ab08 [WebAssembly] Basic support for Wasm object file encoding.
With the "wasm32-unknown-unknown-wasm" triple, this allows writing out
simple wasm object files, and is another step in a larger series toward
migrating from ELF to general wasm object support. Note that this code
and the binary format itself is still experimental.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296190 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 23:18:00 +00:00
Wei Ding
5d1e915557 AMDGPU : Replace FMAD with FMA when denormals are enabled.
Differential Revision: http://reviews.llvm.org/D29958

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296186 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 23:00:29 +00:00
Stanislav Mekhanoshin
fef0dbe59c Revert "Correct register pressure calculation in presence of subregs"
This reverts commit r296009. It broke one out of tree target and also
does not account for all partial lines added or removed when calculating
PressureDiff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296182 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 21:56:16 +00:00
Evgeniy Stepanov
89efd71a88 Disallow redefinition of section symbols.
Differential Revision: https://reviews.llvm.org/D30235

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296180 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 21:44:58 +00:00
Sanjay Patel
c80a3ffd74 [ARM] add tests for alternate forms of select-of-constants; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296178 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 21:36:34 +00:00
Tim Northover
e3a136c5b5 GlobalISel: check for CImm rather than Imm on G_CONSTANTs.
All G_CONSTANTS created by the MachineIRBuilder have an operand of type CImm
(i.e. a ConstantInt), so that's what the selector needs to look for.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296176 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 21:21:38 +00:00
Sanjay Patel
f7f0f08973 [ARM] auto-generate complete checks; NFC
The affected test may change with a patch I'm looking at for DAGCombiner,
so I want to make sure it's not a regression.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296175 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 21:19:09 +00:00
Dan Gohman
3d2ef31552 [WebAssembly] Handle f16 in fast-isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296172 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 21:05:35 +00:00
Eli Friedman
0ee8e563c9 [CodeGenPrepare] Make -addr-sink-using-gep work with address spaces.
When we construct addressing modes, we use isNoopAddrSpaceCast to ignore
addrspacecast instructions. Make sure we insert the correct addrspacecast
when we reconstruct the addressing mode.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296167 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 20:51:36 +00:00
Yaxun Liu
3afc883be9 [InstCombine] Fix bug in pointer replacement
This optimisation was crashing when there was a chain of more than one bitcast
instruction to replace, as a result of the changes in D27283.

Patch by James Price.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296163 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 20:27:25 +00:00
Michael Kuperstein
98ee128c8e [CGP] Split some critical edges coming out of indirect branches
Splitting critical edges when one of the source edges is an indirectbr
is hard in general (because it requires changing the memory the indirectbr
reads). But if a block only has a single indirectbr predecessor (which is
the common case), we can simulate splitting that edge by splitting
the destination block, and retargeting the *direct* branches.

This is motivated by the use of computed gotos in python 2.7: PyEval_EvalFrame()
ends up using an indirect branch with ~100 successors, and passing a constant to
each of those. Since MachineSink can't break indirect critical edges on demand
(and doing this in MIR doesn't look feasible), this causes us to emit about ~100
defs of registers containing constants, which we in the predecessor block, where
only one of those constants is used in each successor. So, at each computed goto,
we needlessly spill about a 100 constants to stack. The end result is that a
clang-compiled python interpreter can be about ~2.5x slower on a simple python
reduction loop than a gcc-compiled interpreter.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296149 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 18:41:32 +00:00
Matthew Simpson
aceef6fa37 [LV] Merge floating-point and integer induction widening code
This patch merges the existing floating-point induction variable widening code
into the integer induction variable widening code, creating a single set of
functions for both kinds of inductions. The primary motivation for doing this
is to enable vector phi node creation for floating-point induction variables.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296145 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 18:20:12 +00:00
Nemanja Ivanovic
ab05c2009d [PowerPC] Use subfic instruction for subtract from immediate
Provide a 64-bit pattern to use SUBFIC for subtracting from a 16-bit immediate.
The corresponding pattern already exists for 32-bit integers.

Committing on behalf of Hiroshi Inoue.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296144 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 18:16:06 +00:00
Nemanja Ivanovic
92606b3cc6 [PowerPC] Use rldicr instruction for AND with an immediate if possible
Emit clrrdi (extended mnemonic for rldicr) for AND-ing with masks that
clear bits from the right hand size.

Committing on behalf of Hiroshi Inoue.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296143 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 18:03:16 +00:00
Sanjay Patel
9a9478ccb0 [DAGCombiner] add missing folds for scalar select of {-1,0,1}
The motivation for filling out these select-of-constants cases goes back to D24480, 
where we discussed removing an IR fold from add(zext) --> select. And that goes back to:
https://reviews.llvm.org/rL75531
https://reviews.llvm.org/rL159230

The idea is that we should always canonicalize patterns like this to a select-of-constants 
in IR because that's the smallest IR and the best for value tracking. Note that we currently 
do the opposite in some cases (like the cases in *this* patch). Ie, the proposed folds in 
this patch already exist in InstCombine today:
https://github.com/llvm-mirror/llvm/blob/master/lib/Transforms/InstCombine/InstCombineSelect.cpp#L1151

As this patch shows, most targets generate better machine code for simple ext/add/not ops 
rather than a select of constants. So the follow-up steps to make this less of a patchwork 
of special-case folds and missing IR canonicalization:

1. Have DAGCombiner convert any select of constants into ext/add/not ops.
2  Have InstCombine canonicalize in the other direction (create more selects).

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296137 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 17:17:33 +00:00
Simon Dardis
f64a815fb7 Recommit "[mips] Fix atomic compare and swap at O0."
This time with the missing files.

Similar to PR/25526, fast-regalloc introduces spills at the end of basic
blocks. When this occurs in between an ll and sc, the store can cause the
atomic sequence to fail.

This patch fixes the issue by introducing more pseudos to represent atomic
operations and moving their lowering to after the expansion of postRA
pseudos.

This resolves PR/32020.

Thanks to James Cowgill for reporting the issue!

Reviewers: slthakur

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296134 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 16:32:18 +00:00
Simon Dardis
3a8812c0db Revert "[mips] Fix atomic compare and swap at O0."
This reverts r296132. I forgot to include the tests.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296133 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 16:30:27 +00:00
Simon Dardis
2468c7d5ea [mips] Fix atomic compare and swap at O0.
Similar to PR/25526, fast-regalloc introduces spills at the end of basic
blocks. When this occurs in between an ll and sc, the store can cause the
atomic sequence to fail.

This patch fixes the issue by introducing more pseudos to represent atomic
operations and moving their lowering to after the expansion of postRA
pseudos.

This resolves PR/32020.

Thanks to James Cowgill for reporting the issue!

Reviewers: slthakur

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296132 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 16:27:45 +00:00
Daniel Sanders
bf21af7b42 [globalisel] Decouple src pattern operands from dst pattern operands.
Summary:
This isn't testable for AArch64 by itself so this patch also adds
support for constant immediates in the pattern and physical
register uses in the result.

The new IntOperandMatcher matches the constant in patterns such as
'(set $rd:GPR32, (G_XOR $rs:GPR32, -1))'. It's always safe to fold
immediates into an instruction so this is the first rule that will match
across multiple BB's.

The Renderer hierarchy is responsible for adding operands to the result
instruction. Renderers can copy operands (CopyRenderer) or add physical
registers (in particular %wzr and %xzr) to the result instruction
in any order (OperandMatchers now import the operand names from
SelectionDAG to allow renderers to access any operand). This allows us to
emit the result instruction for:
  %1 = G_XOR %0, -1 --> %1 = ORNWrr %wzr, %0
  %1 = G_XOR -1, %0 --> %1 = ORNWrr %wzr, %0
although the latter is untested since the matcher/importer has not been
taught about commutativity yet.

Added BuildMIAction which can build new instructions and mutate them where
possible. W.r.t the mutation aspect, MatchActions are now told the name of
an instruction they can recycle and BuildMIAction will emit mutation code
when the renderers are appropriate. They are appropriate when all operands
are rendered using CopyRenderer and the indices are the same as the matcher.
This currently assumes that all operands have at least one matcher.

Finally, this change also fixes a crash in
AArch64InstructionSelector::select() caused by an immediate operand
passing isImm() rather than isCImm(). This was uncovered by the other
changes and was detected by existing tests.

Depends on D29711

Reviewers: t.p.northover, ab, qcolombet, rovka, aditya_nandakumar, javed.absar

Reviewed By: rovka

Subscribers: aemerson, dberris, kristof.beyls, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296131 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 15:43:30 +00:00
Simon Dardis
2d2498f022 [mips] Handle 64 bit immediate in and/or/xor pseudo instructions on mips64
Previously LLVM was assuming 32-bit signed immediates which results in and with
a bitmask that has bit 31 set to incorrectly include bits 63-32 in the result.
After applying this patch I can now compile all of the FreeBSD mips assembly
code with clang.

This issue also affects the nor, slt and sltu macros and I will fix those in a
separate review.

Patch By: Alexander Richardson

Commit message reformatted by sdardis.

Reviewers: atanasyan, theraven, sdardis

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296125 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 14:34:32 +00:00
Diana Picus
27abbacf66 [ARM] GlobalISel: Select G_STORE
Same as selecting G_LOAD.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296122 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 14:01:27 +00:00
Diana Picus
dba394d354 Minor test fix
The test was using a size of 8 for loading/storing pointers. It should be 4.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296120 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 13:27:55 +00:00
Diana Picus
11601c0bd3 [ARM] GlobalISel: Add reg bank mappings for stores
Same as the ones for loads.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296115 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 13:07:25 +00:00
Simon Dardis
3583102e6c [mips][mc] Fix a crash when disassembling odd sized sections
Attempt to fix failing test.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296112 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 12:47:41 +00:00
Diana Picus
558eff4677 Fixup r296105 - only run tests on Mips
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296111 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 12:47:11 +00:00
Diana Picus
29289da775 [ARM] GlobalISel: Legalize stores
Allow the same types that we allow for loads.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296108 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 11:28:24 +00:00
Simon Dardis
dbda2aa80b [mips][mc] Fix a crash when disassembling odd sized sections
Corresponding test.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296106 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 10:51:27 +00:00
Diana Picus
269c5fd3e9 Revert "[ARM] GlobalISel: Legalize stores"
This reverts commit r296103 because the test broke on one of the bots. Sorry!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296104 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 10:35:39 +00:00
Diana Picus
03012a011d [ARM] GlobalISel: Legalize stores
Allow the same types that we allow for loads.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296103 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 10:19:23 +00:00
Craig Topper
474a418aa7 [AVX-512] Remove lzcnt intrinsics and autoupgrade them to generic ctlz intrinsics with select.
Clang has been emitting cltz intrinsics for a while now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296091 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 05:35:04 +00:00
Craig Topper
cc2f430f22 [AVX-512] Move lzcnt and conflict intrinsic tests to avx512cd intrinsic test file since that's their feature.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296090 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 05:34:59 +00:00
Craig Topper
e35238cd60 [AVX-512] Use update_llc_test_checks.py to generate a test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296089 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 05:34:57 +00:00
Petr Hosek
193856a80c [Fuchsia] Use thread-pointer ABI slots for stack-protector and safe-stack
The Fuchsia ABI defines slots from the thread pointer where the
stack-guard value for stack-protector, and the unsafe stack pointer
for safe-stack, are stored. This parallels the Android ABI support.

Patch by Roland McGrath

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296081 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 03:10:10 +00:00
Eli Friedman
f884f5ab95 Add some testcases for bitfields with illegal widths.
clang will generate IR like this for input using packed bitfields;
very simple semantically, but it's a bit tricky to actually
generate good code.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296080 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 03:04:11 +00:00
Eli Friedman
c39d5e685a Fix old testcase for dead store to match the original intent.
The x86 backend has a special case for load+xor+store, which isn't really
what this is trying to test.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296077 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 02:58:49 +00:00
Adam Nemet
c1a4dd37ad [LazyMachineBFI] Add testcase
This is based on Justin's testcase and checking whether BFI is not populated
in case hotness is off.

This is a patch meant on top of Justin's patch to enable Machine opt-remarks
in the
AsmPrinter (http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20170130/426595.html)

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296065 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 01:22:55 +00:00
Michael Kuperstein
969577f54d Revert r269060 to pacify bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296064 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 01:22:19 +00:00
Justin Bogner
3c86e87de3 OptDiag: Add test for r296053
Forgot to commit this with the change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296061 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 01:13:09 +00:00
Michael Kuperstein
8981fc9888 [CGP] Split some critical edges coming out of indirect branches
Splitting critical edges when one of the source edges is an indirectbr
is hard in general (because it requires changing the memory the indirectbr
reads). But if a block only has a single indirectbr predecessor (which is
the common case), we can simulate splitting that edge by splitting
the destination block, and retargeting the *direct* branches.

This is motivated by the use of computed gotos in python 2.7: PyEval_EvalFrame()
ends up using an indirect branch with ~100 successors, and passing a constant to
each of those. Since MachineSink can't break indirect critical edges on demand
(and doing this in MIR doesn't look feasible), this causes us to emit about ~100
defs of registers containing constants, which we in the predecessor block, where
only one of those constants is used in each successor. So, at each computed goto,
we needlessly spill about a 100 constants to stack. The end result is that a
clang-compiled python interpreter can be about ~2.5x slower on a simple python
reduction loop than a gcc-compiled interpreter.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296060 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 00:56:21 +00:00
Evgeniy Stepanov
734e4c3bd4 [msan] Fix instrumentation of array allocas.
Before this, MSan poisoned exactly one element of any array alloca,
even if the number of elements was zero.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296050 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 00:13:17 +00:00
Xin Tong
3addda9e5e LoopUnswitch - Simplify based on known not to a be constant.
Summary: In case we do not know what the condition is in an unswitched loop, but we know its definitely NOT a known constant. We can perform simplifcations based on this information.

Reviewers: sanjoy, hfinkel, chenli, efriedma

Reviewed By: efriedma

Subscribers: david2050, llvm-commits, mzolotukhin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296041 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-23 23:42:19 +00:00
Artem Belevich
6bc216ccf6 [NVPTX] Added support for .f16x2 instructions.
This patch enables support for .f16x2 operations.

Added new register type Float16x2.
Added support for .f16x2 instructions.
Added handling of vectorized loads/stores of v2f16 values.

Differential Revision: https://reviews.llvm.org/D30057
Differential Revision: https://reviews.llvm.org/D30310

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296032 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-23 22:38:24 +00:00
Tim Northover
a328146a75 ARM: make sure FastISel bails on f64 operations for Cortex-M4.
FastISel wasn't checking the isFPOnlySP subtarget feature before emitting
double-precision operations, so it got completely invalid CodeGen for doubles
on Cortex-M4F.

The normal ISel testing wasn't spectacular either so I added a second RUN line
to improve that while I was in the area.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296031 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-23 22:35:00 +00:00
Hans Wennborg
b20570e647 Revert r282872 "CVP. Turn marking adds as no wrap on by default"
While not CVP's fault, this caused miscompiles (PR31181). Reverting
until those are resolved.

(This also reverts the follow-ups r288154 and r288161 which removed the
flag.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296030 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-23 22:29:00 +00:00
Vedant Kumar
10ad4e00d9 [llvm-cov] Strip redundant path components from filenames (fix PR31982)
Instead of stripping the longest common prefix off of the filenames in a
report, strip out the longest chain of redundant path components. This
fixes the case in PR31982, where there are two files with the same
prefix, and stripping out the LCP makes things less intelligible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296029 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-23 22:20:32 +00:00
Dehao Chen
8580d5005b Add call branch annotation for ICP promoted direct call in SamplePGO mode.
Summary: SamplePGO uses branch_weight annotation to represent callsite hotness. When ICP promotes an indirect call to direct call, we need to make sure the direct call is annotated with branch_weight in SamplePGO mode, so that downstream function inliner can use hot callsite heuristic.

Reviewers: davidxl, eraman, xur

Reviewed By: davidxl, xur

Subscribers: mehdi_amini, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296028 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-23 22:15:18 +00:00
Krzysztof Parzyszek
9bb4f10172 [Hexagon] Handle saturations in Hexagon bit tracker
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296026 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-23 22:11:52 +00:00
Evgeniy Stepanov
23c98ecd0f Disable TLS for stack protector on Android API<17.
The TLS slot did not exist back then.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296014 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-23 21:06:35 +00:00
Ahmed Bougacha
65d76e1285 [GlobalISel] Emit opt remarks on isel fallbacks.
Having more fine-grained information on the specific construct that
caused us to fallback is valuable for large-scale data collection.

We still have the fallback warning, that's also used for FastISel.
We still need to remove the fallback warning, and teach FastISel to also
emit remarks (it currently has a combination of the warning, stats, and
debug prints: the remarks could unify all three).

The abort-on-fallback path could also be better handled using remarks:
one could imagine a "-Rpass-error", analoguous to "-Werror", which would
promote missed/failed remarks to errors.  It's not clear whether that
would be useful for other remarks though, so we're not there yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296013 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-23 21:05:42 +00:00