diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-04-09 02:59:09 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-04-09 02:59:09 +0000 |
commit | ed47ed4e80d9add78932bafff99701a87d54923c (patch) | |
tree | b036118b1a526dd8d2e920a4ad0e17ce59d483b2 /llvm/include | |
parent | 4ad6c160a5894b0e3480c5e17b040985ce1893d2 (diff) | |
download | bcm5719-llvm-ed47ed4e80d9add78932bafff99701a87d54923c.tar.gz bcm5719-llvm-ed47ed4e80d9add78932bafff99701a87d54923c.zip |
Build the Hopfield network incrementally when splitting global live ranges.
It is common for large live ranges to have few basic blocks with register uses
and many live-through blocks without any uses. This approach grows the Hopfield
network incrementally around the use blocks, completely avoiding checking
interference for some through blocks.
llvm-svn: 129188
Diffstat (limited to 'llvm/include')
-rw-r--r-- | llvm/include/llvm/CodeGen/EdgeBundles.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/include/llvm/CodeGen/EdgeBundles.h b/llvm/include/llvm/CodeGen/EdgeBundles.h index 2c5215a7927..8aab3c64f17 100644 --- a/llvm/include/llvm/CodeGen/EdgeBundles.h +++ b/llvm/include/llvm/CodeGen/EdgeBundles.h @@ -16,6 +16,7 @@ #ifndef LLVM_CODEGEN_EDGEBUNDLES_H #define LLVM_CODEGEN_EDGEBUNDLES_H +#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/IntEqClasses.h" #include "llvm/CodeGen/MachineFunctionPass.h" @@ -29,6 +30,9 @@ class EdgeBundles : public MachineFunctionPass { /// 2*BB->getNumber()+1 -> Outgoing bundle. IntEqClasses EC; + /// Blocks - Map each bundle to a list of basic block numbers. + SmallVector<SmallVector<unsigned, 8>, 4> Blocks; + public: static char ID; EdgeBundles() : MachineFunctionPass(ID) {} @@ -40,6 +44,9 @@ public: /// getNumBundles - Return the total number of bundles in the CFG. unsigned getNumBundles() const { return EC.getNumClasses(); } + /// getBlocks - Return an array of blocks that are connected to Bundle. + ArrayRef<unsigned> getBlocks(unsigned Bundle) { return Blocks[Bundle]; } + /// getMachineFunction - Return the last machine function computed. const MachineFunction *getMachineFunction() const { return MF; } |