7 Commits

Author SHA1 Message Date
Mehdi Amini
67f335d992 Use StringRef in Pass/PassManager APIs (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283004 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-01 02:56:57 +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
Matt Arsenault
8697a18bc2 Make DetectDeadLanes preserve CFG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272740 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 00:25:09 +00:00
Matthias Braun
26b4602681 DetectDeadLanes: Increase precision when detecting undef inputs
In case of COPY-like instruction we may be able to deduce that a certain
input is unused, based on the used lanes of the register defined by the
instruction.
This even works accross otherwise incompatible copies (no need to have
compatible lanemasks, completely unused operands are still completely
unused). It even makes sense to redo the analysis in this case since we
gained information for a case we previously stopped at because of the
incompatible masks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268815 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-06 22:43:50 +00:00
Matthias Braun
950b465e86 DetectDeadLanes: Cleanup, assert on some impossible cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268814 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-06 22:43:46 +00:00
Marcin Koscielnicki
19f78ec7df [CodeGen] Remove extra ';'
Squashes a -Wpedantic warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267944 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-28 21:49:46 +00:00
Matthias Braun
e5c4e28d9c CodeGen: Add DetectDeadLanes pass.
The DetectDeadLanes pass performs a dataflow analysis of used/defined
subregister lanes across COPY instructions and instructions that will
get lowered to copies. It detects dead definitions and uses reading
undefined values which are obscured by COPY and subregister usage.

These dead definitions cause trouble in the register coalescer which
cannot deal with definitions suddenly becoming dead after coalescing
COPY instructions.

For now the pass only adds dead and undef flags to machine operands. It
should be possible to extend it in the future to remove the dead
instructions and redo the analysis for the affected virtual
registers.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267851 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-28 03:07:16 +00:00