mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
- Fix SelectionDAG to generate correct CFGs.
- Add a basic machine-level dead block eliminator. These two have to go together, since many other parts of the code generator are unable to handle the unreachable blocks otherwise created. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54333 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -29,6 +29,7 @@
|
||||
#include "llvm/CodeGen/LiveVariables.h"
|
||||
#include "llvm/CodeGen/MachineInstr.h"
|
||||
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
||||
#include "llvm/CodeGen/Passes.h"
|
||||
#include "llvm/Target/TargetRegisterInfo.h"
|
||||
#include "llvm/Target/TargetInstrInfo.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
@ -43,6 +44,12 @@ using namespace llvm;
|
||||
char LiveVariables::ID = 0;
|
||||
static RegisterPass<LiveVariables> X("livevars", "Live Variable Analysis");
|
||||
|
||||
|
||||
void LiveVariables::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addRequiredID(UnreachableMachineBlockElimID);
|
||||
AU.setPreservesAll();
|
||||
}
|
||||
|
||||
void LiveVariables::VarInfo::dump() const {
|
||||
cerr << " Alive in blocks: ";
|
||||
for (unsigned i = 0, e = AliveBlocks.size(); i != e; ++i)
|
||||
|
Reference in New Issue
Block a user