LLVM  14.0.0git
MachineDominanceFrontier.h
Go to the documentation of this file.
1 //===- llvm/CodeGen/MachineDominanceFrontier.h ------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_CODEGEN_MACHINEDOMINANCEFRONTIER_H
10 #define LLVM_CODEGEN_MACHINEDOMINANCEFRONTIER_H
11 
17 
18 namespace llvm {
19 
22 
23 public:
28  using const_iterator =
30 
33 
34  static char ID;
35 
37 
39 
41  return Base.getRoots();
42  }
43 
45  return Base.getRoot();
46  }
47 
48  bool isPostDominator() const {
49  return Base.isPostDominator();
50  }
51 
53  return Base.begin();
54  }
55 
57  return Base.begin();
58  }
59 
61  return Base.end();
62  }
63 
64  const_iterator end() const {
65  return Base.end();
66  }
67 
69  return Base.find(B);
70  }
71 
73  return Base.find(B);
74  }
75 
77  return Base.addBasicBlock(BB, frontier);
78  }
79 
81  return Base.removeBlock(BB);
82  }
83 
85  return Base.addToFrontier(I, Node);
86  }
87 
89  return Base.removeFromFrontier(I, Node);
90  }
91 
92  bool compareDomSet(DomSetType &DS1, const DomSetType &DS2) const {
93  return Base.compareDomSet(DS1, DS2);
94  }
95 
97  return Base.compare(Other);
98  }
99 
100  bool runOnMachineFunction(MachineFunction &F) override;
101 
102  void releaseMemory() override;
103 
104  void getAnalysisUsage(AnalysisUsage &AU) const override;
105 };
106 
107 } // end namespace llvm
108 
109 #endif // LLVM_CODEGEN_MACHINEDOMINANCEFRONTIER_H
llvm::MachineDominanceFrontier::runOnMachineFunction
bool runOnMachineFunction(MachineFunction &F) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
Definition: MachineDominanceFrontier.cpp:40
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
DominanceFrontier.h
llvm::MachineDominanceFrontier::isPostDominator
bool isPostDominator() const
Definition: MachineDominanceFrontier.h:48
llvm::MachineDominanceFrontier::end
iterator end()
Definition: MachineDominanceFrontier.h:60
llvm::MachineDominanceFrontier::MachineDominanceFrontier
MachineDominanceFrontier()
Definition: MachineDominanceFrontier.cpp:32
llvm::MachineDominanceFrontier::getRoot
MachineBasicBlock * getRoot() const
Definition: MachineDominanceFrontier.h:44
llvm::MachineDominanceFrontier::removeBlock
void removeBlock(MachineBasicBlock *BB)
Definition: MachineDominanceFrontier.h:80
llvm::MachineFunctionPass
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
Definition: MachineFunctionPass.h:30
MachineBasicBlock.h
llvm::MachineDominanceFrontier::find
iterator find(MachineBasicBlock *B)
Definition: MachineDominanceFrontier.h:68
F
#define F(x, y, z)
Definition: MD5.cpp:56
llvm::MachineDominanceFrontier::iterator
DominanceFrontierBase< MachineBasicBlock, false >::iterator iterator
Definition: MachineDominanceFrontier.h:27
llvm::DominanceFrontierBase::iterator
typename DomSetMapType::iterator iterator
Definition: DominanceFrontier.h:76
llvm::AnalysisUsage
Represent the analysis usage information of a pass.
Definition: PassAnalysisSupport.h:47
llvm::MachineDominanceFrontier::operator=
MachineDominanceFrontier & operator=(const MachineDominanceFrontier &)=delete
B
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
llvm::MachineDominanceFrontier::getRoots
const SmallVectorImpl< MachineBasicBlock * > & getRoots() const
Definition: MachineDominanceFrontier.h:40
llvm::MachineDominanceFrontier::releaseMemory
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
Definition: MachineDominanceFrontier.cpp:46
llvm::MachineBasicBlock
Definition: MachineBasicBlock.h:95
llvm::MachineDominanceFrontier::end
const_iterator end() const
Definition: MachineDominanceFrontier.h:64
llvm::MachineDominanceFrontier::getBase
ForwardDominanceFrontierBase< MachineBasicBlock > & getBase()
Definition: MachineDominanceFrontier.h:38
llvm::MachineDominanceFrontier::compare
bool compare(DominanceFrontierBase< MachineBasicBlock, false > &Other) const
Definition: MachineDominanceFrontier.h:96
DominanceFrontierImpl.h
llvm::ForwardDominanceFrontierBase
DominanceFrontier Class - Concrete subclass of DominanceFrontierBase that is used to compute a forwar...
Definition: DominanceFrontier.h:121
llvm::MachineDominanceFrontier::addBasicBlock
iterator addBasicBlock(MachineBasicBlock *BB, const DomSetType &frontier)
Definition: MachineDominanceFrontier.h:76
llvm::MachineDominanceFrontier
Definition: MachineDominanceFrontier.h:20
I
#define I(x, y, z)
Definition: MD5.cpp:59
MachineFunctionPass.h
llvm::MachineDominanceFrontier::const_iterator
DominanceFrontierBase< MachineBasicBlock, false >::const_iterator const_iterator
Definition: MachineDominanceFrontier.h:29
llvm::DominanceFrontierBase::const_iterator
typename DomSetMapType::const_iterator const_iterator
Definition: DominanceFrontier.h:77
llvm::DominanceFrontierBase
DominanceFrontierBase - Common base class for computing forward and inverse dominance frontiers for a...
Definition: DominanceFrontier.h:40
llvm::MachineFunction
Definition: MachineFunction.h:230
llvm::DominatorTreeBase
Core dominator tree base class.
Definition: LoopInfo.h:65
Node
Definition: ItaniumDemangle.h:235
llvm::DomTreeNodeBase
Base class for the actual dominator tree node.
Definition: LiveIntervalCalc.h:24
llvm::MachineDominanceFrontier::ID
static char ID
Definition: MachineDominanceFrontier.h:34
llvm::MachineDominanceFrontier::getAnalysisUsage
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
Definition: MachineDominanceFrontier.cpp:50
llvm::MachineDominanceFrontier::begin
const_iterator begin() const
Definition: MachineDominanceFrontier.h:56
GenericDomTree.h
llvm::DominanceFrontierBase::DomSetType
std::set< BlockT * > DomSetType
Definition: DominanceFrontier.h:42
llvm::MachineDominanceFrontier::removeFromFrontier
void removeFromFrontier(iterator I, MachineBasicBlock *Node)
Definition: MachineDominanceFrontier.h:88
llvm::MachineDominanceFrontier::begin
iterator begin()
Definition: MachineDominanceFrontier.h:52
llvm::MachineDominanceFrontier::DomSetType
DominanceFrontierBase< MachineBasicBlock, false >::DomSetType DomSetType
Definition: MachineDominanceFrontier.h:26
llvm::MachineDominanceFrontier::find
const_iterator find(MachineBasicBlock *B) const
Definition: MachineDominanceFrontier.h:72
llvm::SmallVectorImpl
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition: APFloat.h:43
BB
Common register allocation spilling lr str ldr sxth r3 ldr mla r4 can lr mov lr str ldr sxth r3 mla r4 and then merge mul and lr str ldr sxth r3 mla r4 It also increase the likelihood the store may become dead bb27 Successors according to LLVM BB
Definition: README.txt:39
llvm::MachineDominanceFrontier::compareDomSet
bool compareDomSet(DomSetType &DS1, const DomSetType &DS2) const
Definition: MachineDominanceFrontier.h:92
llvm::sampleprof::Base
@ Base
Definition: Discriminator.h:58
Other
Optional< std::vector< StOtherPiece > > Other
Definition: ELFYAML.cpp:1172
llvm::MachineDominanceFrontier::addToFrontier
void addToFrontier(iterator I, MachineBasicBlock *Node)
Definition: MachineDominanceFrontier.h:84