[llvm-commits] [llvm] r119716 - in /llvm/trunk: include/llvm/CodeGen/Passes.h include/llvm/InitializePasses.h lib/CodeGen/CMakeLists.txt lib/CodeGen/ExpandISelPseudos.cpp lib/CodeGen/ExpandPseudos.cpp
Jim Grosbach
grosbach at apple.com
Thu Nov 18 10:49:21 PST 2010
Great! Thanks, Dan.
-Jim
On Nov 18, 2010, at 10:45 AM, Dan Gohman wrote:
> Author: djg
> Date: Thu Nov 18 12:45:06 2010
> New Revision: 119716
>
> URL: http://llvm.org/viewvc/llvm-project?rev=119716&view=rev
> Log:
> Rename ExpandPseudos to ExpandISelPseudos to help clarify its role.
>
> Added:
> llvm/trunk/lib/CodeGen/ExpandISelPseudos.cpp
> - copied, changed from r119712, llvm/trunk/lib/CodeGen/ExpandPseudos.cpp
> Removed:
> llvm/trunk/lib/CodeGen/ExpandPseudos.cpp
> Modified:
> llvm/trunk/include/llvm/CodeGen/Passes.h
> llvm/trunk/include/llvm/InitializePasses.h
> llvm/trunk/lib/CodeGen/CMakeLists.txt
>
> Modified: llvm/trunk/include/llvm/CodeGen/Passes.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/Passes.h?rev=119716&r1=119715&r2=119716&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/CodeGen/Passes.h (original)
> +++ llvm/trunk/include/llvm/CodeGen/Passes.h Thu Nov 18 12:45:06 2010
> @@ -213,9 +213,9 @@
> /// addressing.
> FunctionPass *createLocalStackSlotAllocationPass();
>
> - /// createExpandPseudosPass - This pass expands pseudo-instructions.
> + /// createExpandISelPseudosPass - This pass expands pseudo-instructions.
> ///
> - FunctionPass *createExpandPseudosPass();
> + FunctionPass *createExpandISelPseudosPass();
>
> } // End llvm namespace
>
>
> Modified: llvm/trunk/include/llvm/InitializePasses.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/InitializePasses.h?rev=119716&r1=119715&r2=119716&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/InitializePasses.h (original)
> +++ llvm/trunk/include/llvm/InitializePasses.h Thu Nov 18 12:45:06 2010
> @@ -92,7 +92,7 @@
> void initializeDominanceFrontierPass(PassRegistry&);
> void initializeDominatorTreePass(PassRegistry&);
> void initializeEdgeProfilerPass(PassRegistry&);
> -void initializeExpandPseudosPass(PassRegistry&);
> +void initializeExpandISelPseudosPass(PassRegistry&);
> void initializeFindUsedTypesPass(PassRegistry&);
> void initializeFunctionAttrsPass(PassRegistry&);
> void initializeGCModuleInfoPass(PassRegistry&);
>
> Modified: llvm/trunk/lib/CodeGen/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CMakeLists.txt?rev=119716&r1=119715&r2=119716&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/CMakeLists.txt (original)
> +++ llvm/trunk/lib/CodeGen/CMakeLists.txt Thu Nov 18 12:45:06 2010
> @@ -11,7 +11,7 @@
> DwarfEHPrepare.cpp
> ELFCodeEmitter.cpp
> ELFWriter.cpp
> - ExpandPseudos.cpp
> + ExpandISelPseudos.cpp
> GCMetadata.cpp
> GCMetadataPrinter.cpp
> GCStrategy.cpp
>
> Copied: llvm/trunk/lib/CodeGen/ExpandISelPseudos.cpp (from r119712, llvm/trunk/lib/CodeGen/ExpandPseudos.cpp)
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ExpandISelPseudos.cpp?p2=llvm/trunk/lib/CodeGen/ExpandISelPseudos.cpp&p1=llvm/trunk/lib/CodeGen/ExpandPseudos.cpp&r1=119712&r2=119716&rev=119716&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/ExpandPseudos.cpp (original)
> +++ llvm/trunk/lib/CodeGen/ExpandISelPseudos.cpp Thu Nov 18 12:45:06 2010
> @@ -1,4 +1,4 @@
> -//===-- llvm/CodeGen/ExpandPseudos.cpp --------------------------*- C++ -*-===//
> +//===-- llvm/CodeGen/ExpandISelPseudos.cpp ----------------------*- C++ -*-===//
> //
> // The LLVM Compiler Infrastructure
> //
> @@ -14,7 +14,7 @@
> //
> //===----------------------------------------------------------------------===//
>
> -#define DEBUG_TYPE "expand-pseudos"
> +#define DEBUG_TYPE "expand-isel-pseudos"
> #include "llvm/CodeGen/MachineFunction.h"
> #include "llvm/CodeGen/MachineFunctionPass.h"
> #include "llvm/CodeGen/Passes.h"
> @@ -24,16 +24,16 @@
> using namespace llvm;
>
> namespace {
> - class ExpandPseudos : public MachineFunctionPass {
> + class ExpandISelPseudos : public MachineFunctionPass {
> public:
> static char ID; // Pass identification, replacement for typeid
> - ExpandPseudos() : MachineFunctionPass(ID) {}
> + ExpandISelPseudos() : MachineFunctionPass(ID) {}
>
> private:
> virtual bool runOnMachineFunction(MachineFunction &MF);
>
> const char *getPassName() const {
> - return "Expand CodeGen Pseudo-instructions";
> + return "Expand ISel Pseudo-instructions";
> }
>
> virtual void getAnalysisUsage(AnalysisUsage &AU) const {
> @@ -42,15 +42,15 @@
> };
> } // end anonymous namespace
>
> -char ExpandPseudos::ID = 0;
> -INITIALIZE_PASS(ExpandPseudos, "expand-pseudos",
> +char ExpandISelPseudos::ID = 0;
> +INITIALIZE_PASS(ExpandISelPseudos, "expand-isel-pseudos",
> "Expand CodeGen Pseudo-instructions", false, false)
>
> -FunctionPass *llvm::createExpandPseudosPass() {
> - return new ExpandPseudos();
> +FunctionPass *llvm::createExpandISelPseudosPass() {
> + return new ExpandISelPseudos();
> }
>
> -bool ExpandPseudos::runOnMachineFunction(MachineFunction &MF) {
> +bool ExpandISelPseudos::runOnMachineFunction(MachineFunction &MF) {
> bool Changed = false;
> const TargetLowering *TLI = MF.getTarget().getTargetLowering();
>
>
> Removed: llvm/trunk/lib/CodeGen/ExpandPseudos.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ExpandPseudos.cpp?rev=119715&view=auto
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/ExpandPseudos.cpp (original)
> +++ llvm/trunk/lib/CodeGen/ExpandPseudos.cpp (removed)
> @@ -1,82 +0,0 @@
> -//===-- llvm/CodeGen/ExpandPseudos.cpp --------------------------*- C++ -*-===//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// Expand Psuedo-instructions produced by ISel. These are usually to allow
> -// the expansion to contain control flow, such as a conditional move
> -// implemented with a conditional branch and a phi, or an atomic operation
> -// implemented with a loop.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#define DEBUG_TYPE "expand-pseudos"
> -#include "llvm/CodeGen/MachineFunction.h"
> -#include "llvm/CodeGen/MachineFunctionPass.h"
> -#include "llvm/CodeGen/Passes.h"
> -#include "llvm/Target/TargetLowering.h"
> -#include "llvm/Target/TargetMachine.h"
> -#include "llvm/Support/Debug.h"
> -using namespace llvm;
> -
> -namespace {
> - class ExpandPseudos : public MachineFunctionPass {
> - public:
> - static char ID; // Pass identification, replacement for typeid
> - ExpandPseudos() : MachineFunctionPass(ID) {}
> -
> - private:
> - virtual bool runOnMachineFunction(MachineFunction &MF);
> -
> - const char *getPassName() const {
> - return "Expand CodeGen Pseudo-instructions";
> - }
> -
> - virtual void getAnalysisUsage(AnalysisUsage &AU) const {
> - MachineFunctionPass::getAnalysisUsage(AU);
> - }
> - };
> -} // end anonymous namespace
> -
> -char ExpandPseudos::ID = 0;
> -INITIALIZE_PASS(ExpandPseudos, "expand-pseudos",
> - "Expand CodeGen Pseudo-instructions", false, false)
> -
> -FunctionPass *llvm::createExpandPseudosPass() {
> - return new ExpandPseudos();
> -}
> -
> -bool ExpandPseudos::runOnMachineFunction(MachineFunction &MF) {
> - bool Changed = false;
> - const TargetLowering *TLI = MF.getTarget().getTargetLowering();
> -
> - // Iterate through each instruction in the function, looking for pseudos.
> - for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I) {
> - MachineBasicBlock *MBB = I;
> - for (MachineBasicBlock::iterator MBBI = MBB->begin(), MBBE = MBB->end();
> - MBBI != MBBE; ) {
> - MachineInstr *MI = MBBI++;
> -
> - // If MI is a pseudo, expand it.
> - const TargetInstrDesc &TID = MI->getDesc();
> - if (TID.usesCustomInsertionHook()) {
> - Changed = true;
> - MachineBasicBlock *NewMBB =
> - TLI->EmitInstrWithCustomInserter(MI, MBB);
> - // The expansion may involve new basic blocks.
> - if (NewMBB != MBB) {
> - MBB = NewMBB;
> - I = NewMBB;
> - MBBI = NewMBB->begin();
> - MBBE = NewMBB->end();
> - }
> - }
> - }
> - }
> -
> - return Changed;
> -}
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list