31 Commits

Author SHA1 Message Date
Eugene Zelenko
8fa7bb4231 [Hexagon, TableGen] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290925 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-04 02:02:05 +00:00
Krzysztof Parzyszek
308c60d0cb Implement LaneBitmask::any(), use it to replace !none(), NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289974 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-16 19:11:56 +00:00
Krzysztof Parzyszek
d6ca3f019d Extract LaneBitmask into a separate type
Specifically avoid implicit conversions from/to integral types to
avoid potential errors when changing the underlying type. For example,
a typical initialization of a "full" mask was "LaneMask = ~0u", which
would result in a value of 0x00000000FFFFFFFF if the type was extended
to uint64_t.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289820 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-15 14:36:06 +00:00
Krzysztof Parzyszek
73a6d5ba6a [RDF] Fix incorrect lane mask calculation
This was exposed by some code that used more than one level of sub-
registers. There is no testcase, because there is no such code in the
Hexagon backend.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289099 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-08 20:33:45 +00:00
Matthias Braun
9262f00f1a Timer: Track name and description.
The previously used "names" are rather descriptions (they use multiple
words and contain spaces), use short programming language identifier
like strings for the "names" which should be used when exporting to
machine parseable formats.

Also removed a unused TimerGroup from Hexxagon.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287369 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 19:43:18 +00:00
Krzysztof Parzyszek
b96d4379cf [RDF] Use RegisterId typedef more consistently, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284857 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-21 19:12:13 +00:00
Krzysztof Parzyszek
cac70281f9 [RDF] Switch RefMap in liveness calculation to use lane masks
This required reengineering of some of the part of liveness calculation,
including fixing some issues caused by the limitations of the previous
approach. The current code is not necessarily the fastest, but it should
be functionally correct (at least more so than before). The compile-time
performance will be addressed in the future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284609 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-19 16:30:56 +00:00
Krzysztof Parzyszek
e5a36c1fc3 The real fix for post-r284255 failures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284264 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-14 19:06:25 +00:00
Krzysztof Parzyszek
4869102e4f [RDF] Switch RegisterRef to be a pair (Register, LaneMask)
Use PackedRegisterRef to store the register information in the graph nodes.

This commit also removes support for virtual registers. It has never been
tested or used. It will be possible to add it back if there is a need.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284255 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-14 17:57:55 +00:00
Krzysztof Parzyszek
78f1992816 [RDF] Replace potentially unclear autos with real types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283445 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-06 13:05:13 +00:00
Krzysztof Parzyszek
4fbe7c8ae1 [RDF] Further improve readability of the graph
Print target basic block for a branch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283126 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 17:54:33 +00:00
Krzysztof Parzyszek
d1ed87a667 [RDF] Replace RegisterAliasInfo with target-independent code using lane masks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283122 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 17:14:48 +00:00
Krzysztof Parzyszek
8263469827 [RDF] Add "dead" flag to node attributes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282520 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-27 18:24:33 +00:00
Krzysztof Parzyszek
3979119db0 [RDF] Special treatment of exception handling registers
A landing pad can have live-in registers that are defined by the runtime,
not the program (exception pointer register and exception selector
register). Make sure to recognize that case and not link these registers
with any defs in the program.
Each landing pad will have phi nodes added at the beginning to provide
definitions of these registers, but the uses of those phi nodes will not
have any reaching defs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282519 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-27 18:18:44 +00:00
Krzysztof Parzyszek
319d69e0f2 [RDF] Add initial support for lane masks in the DFG
Use lane masks for calculating covering and aliasing of register
references.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282194 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-22 21:01:24 +00:00
Krzysztof Parzyszek
b505adc10e [RDF] Print the function name for calls in dumps
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282191 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-22 20:58:19 +00:00
Krzysztof Parzyszek
6baa853c4c [RDF] Use uint32_t for register numbers instead of unsigned
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282190 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-22 20:56:39 +00:00
Krzysztof Parzyszek
80708afe43 [RDF] Introduce "undef" flag for ref nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280851 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-07 20:10:56 +00:00
Krzysztof Parzyszek
a68463ecad [RDF] Ignore undef use operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280717 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-06 17:03:13 +00:00
David Majnemer
dc9c737666 Use range algorithms instead of unpacking begin/end
No functionality change is intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278417 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-11 21:15:00 +00:00
Krzysztof Parzyszek
09986069b9 [RDF] Make the graph construction/use less expensive
- FuncNode::findBlock traverses the function every time. Avoid using it,
  and keep a cache of block addresses in DataFlowGraph instead.
- The operator[] in the map of definition stacks was very slow. Replace
  the map with unordered_map.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276429 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 16:09:47 +00:00
Benjamin Kramer
e1a12fcbf1 [hexagon] Move BlockRanges and RDF stuff into the llvm namespace.
No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270980 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-27 10:06:40 +00:00
Krzysztof Parzyszek
55872bf8a0 [scan-build] fix warnings emitted on LLVM Hexagon code base
Patch by Apelete Seketeli.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268691 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 22:00:44 +00:00
Krzysztof Parzyszek
53c317f994 [RDF] Recognize tail calls in graph creation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267939 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-28 20:40:08 +00:00
Krzysztof Parzyszek
9f608022e3 [RDF] Improve handling of inline-asm
- Keep implicit defs from inline-asm instructions.
- Treat register references from inline-asm as fixed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267936 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-28 20:33:33 +00:00
Krzysztof Parzyszek
93971d9661 [RDF] Add option to keep dead phi nodes in DFG
Dead phi nodes are needed for code motion (such as copy propagation),
where a new use would be placed in a location that would be dominated
by a dead phi. Such a transformation is not legal for copy propagation,
and the existence of the phi would prevent it, but if the phi is not
there, it may appear to be valid.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267932 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-28 20:17:06 +00:00
Duncan P. N. Exon Smith
5b9b80ea30 CodeGen: TII: Take MachineInstr& in predicate API, NFC
Change TargetInstrInfo API to take `MachineInstr&` instead of
`MachineInstr*` in the functions related to predicated instructions
(I'll try to come back later and get some of the rest).  All of these
functions require non-null parameters already, so references are more
clear.  As a bonus, this happens to factor away a host of implicit
iterator => pointer conversions.

No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261605 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-23 02:46:52 +00:00
Simon Pilgrim
1095859c7b Fixed MSVC Win64 warning of implicit conversion of 32-bit shift to 64-bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258084 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-18 21:11:19 +00:00
Krzysztof Parzyszek
ba378e3fb1 [RDF] Allow unlinking ref nodes from data-flow chains only
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258073 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-18 20:41:34 +00:00
Krzysztof Parzyszek
f0ce2c50e1 Fix compiler warnings from r257477
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257483 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 16:51:55 +00:00
Krzysztof Parzyszek
79af24e256 Register Data Flow: data flow graph
Target independent, SSA-based data flow framework for representing
data flow between physical registers.

This commit implements the creation of the actual data flow graph.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257477 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 15:09:49 +00:00