mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
Rename "loop aligner" pass to "code placement optimization" pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71150 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a9bb0675e5
commit
bbf1db7213
@ -146,9 +146,9 @@ namespace llvm {
|
||||
/// IfConverter Pass - This pass performs machine code if conversion.
|
||||
FunctionPass *createIfConverterPass();
|
||||
|
||||
/// LoopAligner Pass - This pass aligns loop headers to target specific
|
||||
/// alignment boundary.
|
||||
FunctionPass *createLoopAlignerPass();
|
||||
/// Code Placement Pass - This pass optimize code placement and aligns loop
|
||||
/// headers to target specific alignment boundary.
|
||||
FunctionPass *createCodePlacementOptPass();
|
||||
|
||||
/// DebugLabelFoldingPass - This pass prunes out redundant debug labels. This
|
||||
/// allows a debug emitter to determine if the range of two labels is empty,
|
||||
|
@ -1,5 +1,6 @@
|
||||
add_llvm_library(LLVMCodeGen
|
||||
BranchFolding.cpp
|
||||
CodePlacementOpt.cpp
|
||||
DeadMachineInstructionElim.cpp
|
||||
ELFWriter.cpp
|
||||
GCMetadata.cpp
|
||||
@ -13,7 +14,6 @@ add_llvm_library(LLVMCodeGen
|
||||
LiveIntervalAnalysis.cpp
|
||||
LiveStackAnalysis.cpp
|
||||
LiveVariables.cpp
|
||||
LoopAligner.cpp
|
||||
LowerSubregs.cpp
|
||||
MachOWriter.cpp
|
||||
MachineBasicBlock.cpp
|
||||
|
@ -1,4 +1,4 @@
|
||||
//===-- LoopAligner.cpp - Loop aligner pass. ------------------------------===//
|
||||
//===-- CodePlacementOpt.cpp - Code Placement pass. -----------------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
@ -7,12 +7,12 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This file implements the pass that align loop headers to target specific
|
||||
// alignment boundary.
|
||||
// This file implements the pass that optimize code placement and align loop
|
||||
// headers to target specific alignment boundary.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define DEBUG_TYPE "loopalign"
|
||||
#define DEBUG_TYPE "code-placement"
|
||||
#include "llvm/CodeGen/MachineLoopInfo.h"
|
||||
#include "llvm/CodeGen/MachineFunctionPass.h"
|
||||
#include "llvm/CodeGen/Passes.h"
|
||||
@ -23,13 +23,15 @@
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
class LoopAligner : public MachineFunctionPass {
|
||||
class CodePlacementOpt : public MachineFunctionPass {
|
||||
public:
|
||||
static char ID;
|
||||
LoopAligner() : MachineFunctionPass(&ID) {}
|
||||
CodePlacementOpt() : MachineFunctionPass(&ID) {}
|
||||
|
||||
virtual bool runOnMachineFunction(MachineFunction &MF);
|
||||
virtual const char *getPassName() const { return "Loop aligner"; }
|
||||
virtual const char *getPassName() const {
|
||||
return "Code Placement Optimizater";
|
||||
}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addRequired<MachineLoopInfo>();
|
||||
@ -39,12 +41,14 @@ namespace {
|
||||
}
|
||||
};
|
||||
|
||||
char LoopAligner::ID = 0;
|
||||
char CodePlacementOpt::ID = 0;
|
||||
} // end anonymous namespace
|
||||
|
||||
FunctionPass *llvm::createLoopAlignerPass() { return new LoopAligner(); }
|
||||
FunctionPass *llvm::createCodePlacementOptPass() {
|
||||
return new CodePlacementOpt();
|
||||
}
|
||||
|
||||
bool LoopAligner::runOnMachineFunction(MachineFunction &MF) {
|
||||
bool CodePlacementOpt::runOnMachineFunction(MachineFunction &MF) {
|
||||
const MachineLoopInfo *MLI = &getAnalysis<MachineLoopInfo>();
|
||||
|
||||
if (MLI->empty())
|
@ -70,7 +70,7 @@ LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
|
||||
PM.add(createMachineFunctionPrinterPass(cerr));
|
||||
|
||||
if (OptLevel != CodeGenOpt::None)
|
||||
PM.add(createLoopAlignerPass());
|
||||
PM.add(createCodePlacementOptPass());
|
||||
|
||||
switch (FileType) {
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user