summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Hexagon/RDFGraph.h
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>2017-01-30 19:16:30 +0000
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>2017-01-30 19:16:30 +0000
commit3695d06a10df6dca79758150c5d0bca882f42d7a (patch)
tree20faa33763341722e176eda92f597184c244b8b4 /llvm/lib/Target/Hexagon/RDFGraph.h
parent480609d0f3bc392bf1fbf36b7f467a6e050e51e1 (diff)
downloadbcm5719-llvm-3695d06a10df6dca79758150c5d0bca882f42d7a.tar.gz
bcm5719-llvm-3695d06a10df6dca79758150c5d0bca882f42d7a.zip
[RDF] Add support for regmasks
llvm-svn: 293538
Diffstat (limited to 'llvm/lib/Target/Hexagon/RDFGraph.h')
-rw-r--r--llvm/lib/Target/Hexagon/RDFGraph.h35
1 files changed, 1 insertions, 34 deletions
diff --git a/llvm/lib/Target/Hexagon/RDFGraph.h b/llvm/lib/Target/Hexagon/RDFGraph.h
index eae742016a6..a10dad58756 100644
--- a/llvm/lib/Target/Hexagon/RDFGraph.h
+++ b/llvm/lib/Target/Hexagon/RDFGraph.h
@@ -431,39 +431,6 @@ namespace rdf {
uint32_t MaskId;
};
- // Template class for a map translating uint32_t into arbitrary types.
- // The map will act like an indexed set: upon insertion of a new object,
- // it will automatically assign a new index to it. Index of 0 is treated
- // as invalid and is never allocated.
- template <typename T, unsigned N = 32>
- struct IndexedSet {
- IndexedSet() : Map() { Map.reserve(N); }
-
- T get(uint32_t Idx) const {
- // Index Idx corresponds to Map[Idx-1].
- assert(Idx != 0 && !Map.empty() && Idx-1 < Map.size());
- return Map[Idx-1];
- }
-
- uint32_t insert(T Val) {
- // Linear search.
- auto F = llvm::find(Map, Val);
- if (F != Map.end())
- return F - Map.begin() + 1;
- Map.push_back(Val);
- return Map.size(); // Return actual_index + 1.
- }
-
- uint32_t find(T Val) const {
- auto F = llvm::find(Map, Val);
- assert(F != Map.end());
- return F - Map.begin();
- }
-
- private:
- std::vector<T> Map;
- };
-
struct LaneMaskIndex : private IndexedSet<LaneBitmask> {
LaneMaskIndex() = default;
@@ -777,6 +744,7 @@ namespace rdf {
}
RegisterRef makeRegRef(unsigned Reg, unsigned Sub) const;
+ RegisterRef makeRegRef(const MachineOperand &Op) const;
RegisterRef normalizeRef(RegisterRef RR) const;
RegisterRef restrictRef(RegisterRef AR, RegisterRef BR) const;
@@ -842,7 +810,6 @@ namespace rdf {
private:
void reset();
- RegisterSet getAliasSet(RegisterId Reg) const;
RegisterSet getLandingPadLiveIns() const;
NodeAddr<NodeBase*> newNode(uint16_t Attrs);
OpenPOWER on IntegriCloud