Skip to content

[CodeGen][NPM] Port ExpandPostRAPseudos to NPM #129509

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
clang-format
  • Loading branch information
optimisan committed Mar 4, 2025
commit fc7758757b51d186ef562de3781b19da3b4cf078
3 changes: 1 addition & 2 deletions llvm/include/llvm/CodeGen/ExpandPostRAPseudos.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@

namespace llvm {

class ExpandPostRAPseudosPass
: public PassInfoMixin<ExpandPostRAPseudosPass> {
class ExpandPostRAPseudosPass : public PassInfoMixin<ExpandPostRAPseudosPass> {
public:
PreservedAnalyses run(MachineFunction &MF,
MachineFunctionAnalysisManager &MFAM);
Expand Down
15 changes: 8 additions & 7 deletions llvm/lib/CodeGen/ExpandPostRAPseudos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@
//===----------------------------------------------------------------------===//

#include "llvm/CodeGen/ExpandPostRAPseudos.h"
#include "llvm/CodeGen/MachineDominators.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineLoopInfo.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/InitializePasses.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include <llvm/CodeGen/MachineDominators.h>
#include <llvm/CodeGen/MachineLoopInfo.h>

using namespace llvm;

#define DEBUG_TYPE "postrapseudos"

namespace {
struct ExpandPostRA {
bool run(MachineFunction&);

bool run(MachineFunction &);

private:
const TargetRegisterInfo *TRI = nullptr;
Expand All @@ -54,12 +54,13 @@ struct ExpandPostRALegacy : public MachineFunctionPass {
}

/// runOnMachineFunction - pass entry point
bool runOnMachineFunction(MachineFunction&) override;
bool runOnMachineFunction(MachineFunction &) override;
};
} // end anonymous namespace

PreservedAnalyses ExpandPostRAPseudosPass::run(MachineFunction &MF,
MachineFunctionAnalysisManager &MFAM) {
PreservedAnalyses
ExpandPostRAPseudosPass::run(MachineFunction &MF,
MachineFunctionAnalysisManager &MFAM) {
if (!ExpandPostRA().run(MF))
return PreservedAnalyses::all();

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Passes/PassBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
//===----------------------------------------------------------------------===//

#include "llvm/Passes/PassBuilder.h"
#include "llvm/CodeGen/ExpandPostRAPseudos.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Analysis/AliasAnalysisEvaluator.h"
#include "llvm/Analysis/AliasSetTracker.h"
Expand Down Expand Up @@ -91,6 +90,7 @@
#include "llvm/CodeGen/ExpandLargeDivRem.h"
#include "llvm/CodeGen/ExpandLargeFpConvert.h"
#include "llvm/CodeGen/ExpandMemCmp.h"
#include "llvm/CodeGen/ExpandPostRAPseudos.h"
#include "llvm/CodeGen/FinalizeISel.h"
#include "llvm/CodeGen/GCMetadata.h"
#include "llvm/CodeGen/GlobalMerge.h"
Expand Down