Skip to content

Commit 83b4eb3

Browse files
committed
[NewPM] Port AtomicExpandPass to new PM
1 parent 3ee8c93 commit 83b4eb3

File tree

68 files changed

+663
-609
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+663
-609
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
//===-- AtomicExpand.h - Expand Atomic Instructions -------------*- 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_ATOMICEXPAND_H
10+
#define LLVM_CODEGEN_ATOMICEXPAND_H
11+
12+
#include "llvm/IR/PassManager.h"
13+
14+
namespace llvm {
15+
16+
class Function;
17+
class TargetMachine;
18+
19+
class AtomicExpandPass : public PassInfoMixin<AtomicExpandPass> {
20+
private:
21+
const TargetMachine *TM;
22+
23+
public:
24+
AtomicExpandPass(const TargetMachine *TM) : TM(TM) {}
25+
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
26+
};
27+
28+
} // end namespace llvm
29+
30+
#endif // LLVM_CODEGEN_ATOMICEXPAND_H

llvm/include/llvm/CodeGen/Passes.h

Lines changed: 447 additions & 447 deletions
Large diffs are not rendered by default.

llvm/include/llvm/InitializePasses.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void initializeAAResultsWrapperPassPass(PassRegistry&);
5252
void initializeAlwaysInlinerLegacyPassPass(PassRegistry&);
5353
void initializeAssignmentTrackingAnalysisPass(PassRegistry &);
5454
void initializeAssumptionCacheTrackerPass(PassRegistry&);
55-
void initializeAtomicExpandPass(PassRegistry&);
55+
void initializeAtomicExpandLegacyPass(PassRegistry &);
5656
void initializeBasicBlockPathCloningPass(PassRegistry &);
5757
void initializeBasicBlockSectionsProfileReaderWrapperPassPass(PassRegistry &);
5858
void initializeBasicBlockSectionsPass(PassRegistry &);

llvm/include/llvm/LinkAllPasses.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ namespace {
6060
if (std::getenv("bar") != (char*) -1)
6161
return;
6262

63+
(void)llvm::createAtomicExpandLegacyPass();
6364
(void) llvm::createBasicAAWrapperPass();
6465
(void) llvm::createSCEVAAWrapperPass();
6566
(void) llvm::createTypeBasedAAWrapperPass();

0 commit comments

Comments
 (0)