[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaTargetMachine.cpp AlphaTargetMachine.h
Chris Lattner
lattner at cs.uiuc.edu
Fri Jun 24 19:48:45 PDT 2005
Changes in directory llvm/lib/Target/Alpha:
AlphaTargetMachine.cpp updated: 1.7 -> 1.8
AlphaTargetMachine.h updated: 1.6 -> 1.7
---
Log message:
Refactor the addPassesToEmitAssembly interface into a addPassesToEmitFile
interface.
---
Diffs of the changes: (+8 -5)
AlphaTargetMachine.cpp | 10 ++++++----
AlphaTargetMachine.h | 3 ++-
2 files changed, 8 insertions(+), 5 deletions(-)
Index: llvm/lib/Target/Alpha/AlphaTargetMachine.cpp
diff -u llvm/lib/Target/Alpha/AlphaTargetMachine.cpp:1.7 llvm/lib/Target/Alpha/AlphaTargetMachine.cpp:1.8
--- llvm/lib/Target/Alpha/AlphaTargetMachine.cpp:1.7 Thu Apr 21 18:10:23 2005
+++ llvm/lib/Target/Alpha/AlphaTargetMachine.cpp Fri Jun 24 21:48:34 2005
@@ -54,11 +54,13 @@
FrameInfo(TargetFrameInfo::StackGrowsDown, 8, 0) //TODO: check these
{}
-/// addPassesToEmitAssembly - Add passes to the specified pass manager
-/// to implement a static compiler for this target.
+/// addPassesToEmitFile - Add passes to the specified pass manager to implement
+/// a static compiler for this target.
///
-bool AlphaTargetMachine::addPassesToEmitAssembly(PassManager &PM,
- std::ostream &Out) {
+bool AlphaTargetMachine::addPassesToEmitFile(PassManager &PM,
+ std::ostream &Out,
+ CodeGenFileType FileType) {
+ if (FileType != TargetMachine::AssemblyFile) return true;
if (EnableAlphaLSR) {
PM.add(createLoopStrengthReducePass());
Index: llvm/lib/Target/Alpha/AlphaTargetMachine.h
diff -u llvm/lib/Target/Alpha/AlphaTargetMachine.h:1.6 llvm/lib/Target/Alpha/AlphaTargetMachine.h:1.7
--- llvm/lib/Target/Alpha/AlphaTargetMachine.h:1.6 Thu Apr 21 18:10:23 2005
+++ llvm/lib/Target/Alpha/AlphaTargetMachine.h Fri Jun 24 21:48:34 2005
@@ -37,7 +37,8 @@
return &InstrInfo.getRegisterInfo();
}
- virtual bool addPassesToEmitAssembly(PassManager &PM, std::ostream &Out);
+ virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
+ CodeGenFileType FileType);
static unsigned getModuleMatchQuality(const Module &M);
};
More information about the llvm-commits
mailing list