mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Create macro INITIALIZE_TM_PASS.
Pass initialization requires to initialize TargetMachine for back-end specific passes. This commit creates a new macro INITIALIZE_TM_PASS to simplify this kind of initialization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210641 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -50,22 +50,9 @@ namespace {
|
||||
|
||||
char AtomicExpandLoadLinked::ID = 0;
|
||||
char &llvm::AtomicExpandLoadLinkedID = AtomicExpandLoadLinked::ID;
|
||||
|
||||
static void *initializeAtomicExpandLoadLinkedPassOnce(PassRegistry &Registry) {
|
||||
PassInfo *PI = new PassInfo(
|
||||
"Expand Atomic calls in terms of load-linked & store-conditional",
|
||||
"atomic-ll-sc", &AtomicExpandLoadLinked::ID,
|
||||
PassInfo::NormalCtor_t(callDefaultCtor<AtomicExpandLoadLinked>), false,
|
||||
false, PassInfo::TargetMachineCtor_t(
|
||||
callTargetMachineCtor<AtomicExpandLoadLinked>));
|
||||
Registry.registerPass(*PI, true);
|
||||
return PI;
|
||||
}
|
||||
|
||||
void llvm::initializeAtomicExpandLoadLinkedPass(PassRegistry &Registry) {
|
||||
CALL_ONCE_INITIALIZATION(initializeAtomicExpandLoadLinkedPassOnce)
|
||||
}
|
||||
|
||||
INITIALIZE_TM_PASS(AtomicExpandLoadLinked, "atomic-ll-sc",
|
||||
"Expand Atomic calls in terms of load-linked & store-conditional",
|
||||
false, false)
|
||||
|
||||
FunctionPass *llvm::createAtomicExpandLoadLinkedPass(const TargetMachine *TM) {
|
||||
return new AtomicExpandLoadLinked(TM);
|
||||
|
Reference in New Issue
Block a user