[llvm-commits] CVS: llvm-test/SingleSource/UnitTests/2006-12-07-Compare64BitConstant.c

2006-12-07 Thread Jim Laskey


Changes in directory llvm-test/SingleSource/UnitTests:

2006-12-07-Compare64BitConstant.c added (r1.1)
---
Log message:

PowerPC was not checking upper 32 bits of 64 bit constant.

---
Diffs of the changes:  (+13 -0)

 2006-12-07-Compare64BitConstant.c |   13 +
 1 files changed, 13 insertions(+)


Index: llvm-test/SingleSource/UnitTests/2006-12-07-Compare64BitConstant.c
diff -c /dev/null 
llvm-test/SingleSource/UnitTests/2006-12-07-Compare64BitConstant.c:1.1
*** /dev/null   Thu Dec  7 03:57:37 2006
--- llvm-test/SingleSource/UnitTests/2006-12-07-Compare64BitConstant.c  Thu Dec 
 7 03:57:27 2006
***
*** 0 
--- 1,13 
+ #include 
+ 
+ long long Large = 5LL << 48;
+ 
+ int main(int argc, const char *argv[]) {
+   // Make sure large constants compare correctly.
+   if (((Large >> 48) & 7LL) == 5LL) {
+ printf("Works.\n");
+   } else {
+ printf("Doesn\'t.\n");
+   }
+   return 0;
+ }



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/CodeGen/VirtRegMap.cpp

2006-12-07 Thread Reid Spencer


Changes in directory llvm/lib/CodeGen:

VirtRegMap.cpp updated: 1.85 -> 1.86
---
Log message:

Revision 1.83 causes PR1037: http://llvm.org/PR1037 .
Reverted.


---
Diffs of the changes:  (+1 -2)

 VirtRegMap.cpp |3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)


Index: llvm/lib/CodeGen/VirtRegMap.cpp
diff -u llvm/lib/CodeGen/VirtRegMap.cpp:1.85 
llvm/lib/CodeGen/VirtRegMap.cpp:1.86
--- llvm/lib/CodeGen/VirtRegMap.cpp:1.85Wed Dec  6 19:30:31 2006
+++ llvm/lib/CodeGen/VirtRegMap.cpp Thu Dec  7 10:21:19 2006
@@ -97,8 +97,7 @@
   }
 
   ModRef MRInfo;
-  if (OldMI->getInstrDescriptor()->
-  getOperandConstraint(OpNo, TOI::TIED_TO) != -1) {
+  if (TII.getOperandConstraint(OldMI->getOpcode(), OpNo, TOI::TIED_TO)) {
 // Folded a two-address operand.
 MRInfo = isModRef;
   } else if (OldMI->getOperand(OpNo).isDef()) {



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/Regression/DebugInfo/2006-11-30-Pubnames.cpp

2006-12-07 Thread Reid Spencer


Changes in directory llvm/test/Regression/DebugInfo:

2006-11-30-Pubnames.cpp updated: 1.4 -> 1.5
---
Log message:

This now passes on Linux/x86


---
Diffs of the changes:  (+1 -1)

 2006-11-30-Pubnames.cpp |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/test/Regression/DebugInfo/2006-11-30-Pubnames.cpp
diff -u llvm/test/Regression/DebugInfo/2006-11-30-Pubnames.cpp:1.4 
llvm/test/Regression/DebugInfo/2006-11-30-Pubnames.cpp:1.5
--- llvm/test/Regression/DebugInfo/2006-11-30-Pubnames.cpp:1.4  Wed Dec  6 
15:36:07 2006
+++ llvm/test/Regression/DebugInfo/2006-11-30-Pubnames.cpp  Thu Dec  7 
10:28:32 2006
@@ -5,7 +5,7 @@
 // RUN: g++ Output/Pubnames.o -o Output/Pubnames.exe
 // RUN: ( echo "break main"; echo "run" ; echo "p Pubnames::pubname" ) > 
Output/Pubnames.gdbin 
 // RUN: gdb -q -batch -n -x Output/Pubnames.gdbin Output/Pubnames.exe | tee 
Output/Pubnames.out | grep '10'
-// XFAIL: alpha|ia64|arm|linux
+// XFAIL: alpha|ia64|arm
 
 struct Pubnames {
   static int pubname;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/Regression/CodeGen/Alpha/weak.ll

2006-12-07 Thread Andrew Lenharth


Changes in directory llvm/test/Regression/CodeGen/Alpha:

weak.ll added (r1.1)
---
Log message:

Copy ARM's weak symbol test

---
Diffs of the changes:  (+18 -0)

 weak.ll |   18 ++
 1 files changed, 18 insertions(+)


Index: llvm/test/Regression/CodeGen/Alpha/weak.ll
diff -c /dev/null llvm/test/Regression/CodeGen/Alpha/weak.ll:1.1
*** /dev/null   Thu Dec  7 11:38:04 2006
--- llvm/test/Regression/CodeGen/Alpha/weak.ll  Thu Dec  7 11:37:54 2006
***
*** 0 
--- 1,18 
+ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha &&
+ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep .weak.*f &&
+ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep .weak.*h
+ 
+ implementation   ; Functions:
+ 
+ weak uint %f() {
+ entry:
+   unreachable
+ }
+ 
+ void %g() {
+ entry:
+ tail call void %h( )
+ ret void
+ }
+ 
+ declare extern_weak void %h()



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp AlphaInstrInfo.td

2006-12-07 Thread Andrew Lenharth


Changes in directory llvm/lib/Target/Alpha:

AlphaAsmPrinter.cpp updated: 1.56 -> 1.57
AlphaInstrInfo.td updated: 1.135 -> 1.136
---
Log message:

Be sure to grab weak functions too, and make implicit defs comments

---
Diffs of the changes:  (+10 -3)

 AlphaAsmPrinter.cpp |7 +++
 AlphaInstrInfo.td   |6 +++---
 2 files changed, 10 insertions(+), 3 deletions(-)


Index: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp
diff -u llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.56 
llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.57
--- llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.56  Wed Dec  6 12:19:53 2006
+++ llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp   Thu Dec  7 11:39:14 2006
@@ -285,6 +285,13 @@
   }
 }
 
+  for (Module::const_iterator I = M.begin(), E = M.end(); I != E; ++I)
+if (I->hasExternalWeakLinkage()) {
+  O << "\n\n";
+  std::string name = Mang->getValueName(I);
+  O << "\t.weak " << name << "\n";
+}
+
   AsmPrinter::doFinalization(M);
   return false;
 }


Index: llvm/lib/Target/Alpha/AlphaInstrInfo.td
diff -u llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.135 
llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.136
--- llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.135   Thu Nov  2 19:18:29 2006
+++ llvm/lib/Target/Alpha/AlphaInstrInfo.td Thu Dec  7 11:39:14 2006
@@ -140,11 +140,11 @@
 
 //Pseudo ops for selection
 
-def IDEF_I : PseudoInstAlpha<(ops GPRC:$RA), "#idef $RA",
+def IDEF_I : PseudoInstAlpha<(ops GPRC:$RA), ";#idef $RA",
  [(set GPRC:$RA, (undef))], s_pseudo>;
-def IDEF_F32 : PseudoInstAlpha<(ops F4RC:$RA), "#idef $RA",
+def IDEF_F32 : PseudoInstAlpha<(ops F4RC:$RA), ";#idef $RA",
  [(set F4RC:$RA, (undef))], s_pseudo>;
-def IDEF_F64 : PseudoInstAlpha<(ops F8RC:$RA), "#idef $RA",
+def IDEF_F64 : PseudoInstAlpha<(ops F8RC:$RA), ";#idef $RA",
  [(set F8RC:$RA, (undef))], s_pseudo>;
 
 def WTF : PseudoInstAlpha<(ops variable_ops), "#wtf", [], s_pseudo>;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.34 -> 1.35
---
Log message:

Add overview of pass manager.


---
Diffs of the changes:  (+64 -0)

 PassManager.cpp |   64 
 1 files changed, 64 insertions(+)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.34 
llvm/lib/VMCore/PassManager.cpp:1.35
--- llvm/lib/VMCore/PassManager.cpp:1.34Wed Dec  6 19:30:31 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 12:23:30 2006
@@ -20,6 +20,70 @@
 #include 
 using namespace llvm;
 
+//===--===//
+// Overview:
+// The Pass Manager Infrastructure manages passes. It's responsibilities are:
+// 
+//   o Manage optimization pass execution order
+//   o Make required Analysis information available before pass P is run
+//   o Release memory occupied by dead passes
+//   o If Analysis information is dirtied by a pass then regenerate Analysis 
+// information before it is consumed by another pass.
+//
+// Pass Manager Infrastructure uses multipe pass managers. They are 
PassManager,
+// FunctionPassManager, ModulePassManager, BasicBlockPassManager. This class 
+// hierarcy uses multiple inheritance but pass managers do not derive from
+// another pass manager.
+//
+// PassManager and FunctionPassManager are two top level pass manager that
+// represents the external interface of this entire pass manager infrastucture.
+//
+// Important classes :
+//
+// [o] class PMTopLevelManager;
+//
+// Two top level managers, PassManager and FunctionPassManager, derive from 
+// PMTopLevelManager. PMTopLevelManager manages information used by top level 
+// managers such as last user info.
+//
+// [o] class PMDataManager;
+//
+// PMDataManager manages information, e.g. list of available analysis info, 
+// used by a pass manager to manage execution order of passes. It also provides
+// a place to implement common pass manager APIs. All pass managers derive from
+// PMDataManager.
+//
+// [o] class BasicBlockPassManager : public FunctionPass, public PMDataManager;
+//
+// BasicBlockPassManager manages BasicBlockPasses.
+//
+// [o] class FunctionPassManager;
+//
+// This is a external interface used by JIT to manage FunctionPasses. This
+// interface relies on FunctionPassManagerImpl to do all the tasks.
+//
+// [o] class FunctionPassManagerImpl : public ModulePass, PMDataManager,
+// public PMTopLevelManager;
+//
+// FunctionPassManagerImpl is a top level manager. It manages FunctionPasses
+// and BasicBlockPassManagers.
+//
+// [o] class ModulePassManager : public Pass, public PMDataManager;
+//
+// ModulePassManager manages ModulePasses and FunctionPassManagerImpls.
+//
+// [o] class PassManager;
+//
+// This is a external interface used by various tools to manages passes. It
+// relies on PassManagerImpl to do all the tasks.
+//
+// [o] class PassManagerImpl : public Pass, public PMDataManager,
+// public PMDTopLevelManager
+//
+// PassManagerImpl is a top level pass manager responsible for managing
+// ModulePassManagers.
+//===--===//
+
 namespace llvm {
 
 /// CommonPassManagerImpl helps pass manager analysis required by



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/ARM/ARMAsmPrinter.cpp

2006-12-07 Thread Rafael Espindola


Changes in directory llvm/lib/Target/ARM:

ARMAsmPrinter.cpp updated: 1.33 -> 1.34
---
Log message:

make sure that we don't use a common symbol if a section was specified


---
Diffs of the changes:  (+1 -0)

 ARMAsmPrinter.cpp |1 +
 1 files changed, 1 insertion(+)


Index: llvm/lib/Target/ARM/ARMAsmPrinter.cpp
diff -u llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.33 
llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.34
--- llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.33  Wed Dec  6 11:46:32 2006
+++ llvm/lib/Target/ARM/ARMAsmPrinter.cpp   Thu Dec  7 12:33:58 2006
@@ -296,6 +296,7 @@
 unsigned Align = TD->getTypeAlignment(C->getType());
 
 if (C->isNullValue() &&
+!I->hasSection() &&
 (I->hasLinkOnceLinkage() || I->hasInternalLinkage() ||
  I->hasWeakLinkage())) {
   SwitchToDataSection(".data", I);



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/Regression/CodeGen/ARM/section.ll

2006-12-07 Thread Rafael Espindola


Changes in directory llvm/test/Regression/CodeGen/ARM:

section.ll added (r1.1)
---
Log message:

make sure that we don't use a common symbol if a section was specified


---
Diffs of the changes:  (+4 -0)

 section.ll |4 
 1 files changed, 4 insertions(+)


Index: llvm/test/Regression/CodeGen/ARM/section.ll
diff -c /dev/null llvm/test/Regression/CodeGen/ARM/section.ll:1.1
*** /dev/null   Thu Dec  7 12:34:08 2006
--- llvm/test/Regression/CodeGen/ARM/section.ll Thu Dec  7 12:33:58 2006
***
*** 0 
--- 1,4 
+ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
+ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "__DTOR_END__:"
+ 
+ %__DTOR_END__ = internal global [1 x int] zeroinitializer, section ".dtors"



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.36 -> 1.37
---
Log message:

s/clearAnalysis/initializeAnalysisInfo/g


---
Diffs of the changes:  (+6 -7)

 PassManager.cpp |   13 ++---
 1 files changed, 6 insertions(+), 7 deletions(-)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.36 
llvm/lib/VMCore/PassManager.cpp:1.37
--- llvm/lib/VMCore/PassManager.cpp:1.36Thu Dec  7 12:36:24 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 12:41:09 2006
@@ -123,9 +123,8 @@
   /// AvailableAnalysis appropriately if ProcessAnalysis is true.
   void addPassToManager (Pass *P, bool ProcessAnalysis = true);
 
-  /// Clear analysis vectors RequiredAnalysis and AvailableAnalysis.
-  /// This is used before running passes managed by the manager.
-  void clearAnalysis() { 
+  // Initialize available analysis information.
+  void initializeAnalysisInfo() { 
 RequiredAnalysis.clear();
 AvailableAnalysis.clear();
 LastUser.clear();
@@ -455,7 +454,7 @@
 BasicBlockPassManager_New::runOnFunction(Function &F) {
 
   bool Changed = false;
-  clearAnalysis();
+  initializeAnalysisInfo();
 
   for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I)
 for (std::vector::iterator itr = passVectorBegin(),
@@ -568,7 +567,7 @@
 bool FunctionPassManagerImpl_New::runOnModule(Module &M) {
 
   bool Changed = false;
-  clearAnalysis();
+  initializeAnalysisInfo();
 
   for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
 for (std::vector::iterator itr = passVectorBegin(),
@@ -590,7 +589,7 @@
 bool FunctionPassManagerImpl_New::runOnFunction(Function &F) {
 
   bool Changed = false;
-  clearAnalysis();
+  initializeAnalysisInfo();
 
   for (std::vector::iterator itr = passVectorBegin(),
  e = passVectorEnd(); itr != e; ++itr) {
@@ -696,7 +695,7 @@
 bool
 ModulePassManager_New::runOnModule(Module &M) {
   bool Changed = false;
-  clearAnalysis();
+  initializeAnalysisInfo();
 
   for (std::vector::iterator itr = passVectorBegin(),
  e = passVectorEnd(); itr != e; ++itr) {



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.35 -> 1.36
---
Log message:

s/CommonPassManagerImpl/PMDataManager/g


---
Diffs of the changes:  (+15 -16)

 PassManager.cpp |   31 +++
 1 files changed, 15 insertions(+), 16 deletions(-)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.35 
llvm/lib/VMCore/PassManager.cpp:1.36
--- llvm/lib/VMCore/PassManager.cpp:1.35Thu Dec  7 12:23:30 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 12:36:24 2006
@@ -86,10 +86,9 @@
 
 namespace llvm {
 
-/// CommonPassManagerImpl helps pass manager analysis required by
-/// the managed passes. It provides methods to add/remove analysis
-/// available and query if certain analysis is available or not.
-class CommonPassManagerImpl {
+/// PMDataManager provides the common place to manage the analysis data
+/// used by pass managers.
+class PMDataManager {
 
 public:
 
@@ -176,7 +175,7 @@
 /// BasicBlockPassManager_New manages BasicBlockPass. It batches all the
 /// pass together and sequence them to process one basic block before
 /// processing next basic block.
-class BasicBlockPassManager_New : public CommonPassManagerImpl, 
+class BasicBlockPassManager_New : public PMDataManager, 
   public FunctionPass {
 
 public:
@@ -199,7 +198,7 @@
 /// It batches all function passes and basic block pass managers together and
 /// sequence them to process one function at a time before processing next
 /// function.
-class FunctionPassManagerImpl_New : public CommonPassManagerImpl,
+class FunctionPassManagerImpl_New : public PMDataManager,
 public ModulePass {
 public:
   FunctionPassManagerImpl_New(ModuleProvider *P) { /* TODO */ }
@@ -242,7 +241,7 @@
 /// ModulePassManager_New manages ModulePasses and function pass managers.
 /// It batches all Module passes  passes and function pass managers together 
and
 /// sequence them to process one module.
-class ModulePassManager_New : public CommonPassManagerImpl {
+class ModulePassManager_New : public PMDataManager {
  
 public:
   ModulePassManager_New() { activeFunctionPassManager = NULL; }
@@ -263,7 +262,7 @@
 };
 
 /// PassManager_New manages ModulePassManagers
-class PassManagerImpl_New : public CommonPassManagerImpl {
+class PassManagerImpl_New : public PMDataManager {
 
 public:
 
@@ -303,11 +302,11 @@
 
 } // End of llvm namespace
 
-// CommonPassManagerImpl implementation
+// PMDataManager implementation
 
 /// Return true IFF pass P's required analysis set does not required new
 /// manager.
-bool CommonPassManagerImpl::manageablePass(Pass *P) {
+bool PMDataManager::manageablePass(Pass *P) {
 
   AnalysisUsage AnUsage;
   P->getAnalysisUsage(AnUsage);
@@ -328,7 +327,7 @@
 }
 
 /// Augment RequiredAnalysis by adding analysis required by pass P.
-void CommonPassManagerImpl::noteDownRequiredAnalysis(Pass *P) {
+void PMDataManager::noteDownRequiredAnalysis(Pass *P) {
   AnalysisUsage AnUsage;
   P->getAnalysisUsage(AnUsage);
   const std::vector &RequiredSet = AnUsage.getRequiredSet();
@@ -341,7 +340,7 @@
 }
 
 /// Augement AvailableAnalysis by adding analysis made available by pass P.
-void CommonPassManagerImpl::noteDownAvailableAnalysis(Pass *P) {
+void PMDataManager::noteDownAvailableAnalysis(Pass *P) {
 
   if (const PassInfo *PI = P->getPassInfo()) {
 AvailableAnalysis[PI] = P;
@@ -356,7 +355,7 @@
 }
 
 /// Remove Analyss not preserved by Pass P
-void CommonPassManagerImpl::removeNotPreservedAnalysis(Pass *P) {
+void PMDataManager::removeNotPreservedAnalysis(Pass *P) {
   AnalysisUsage AnUsage;
   P->getAnalysisUsage(AnUsage);
   const std::vector &PreservedSet = AnUsage.getPreservedSet();
@@ -373,7 +372,7 @@
 }
 
 /// Remove analysis passes that are not used any longer
-void CommonPassManagerImpl::removeDeadPasses(Pass *P) {
+void PMDataManager::removeDeadPasses(Pass *P) {
 
   for (std::map::iterator I = LastUser.begin(),
  E = LastUser.end(); I !=E; ++I) {
@@ -393,7 +392,7 @@
 
 /// Add pass P into the PassVector. Update RequiredAnalysis and
 /// AvailableAnalysis appropriately if ProcessAnalysis is true.
-void CommonPassManagerImpl::addPassToManager (Pass *P, 
+void PMDataManager::addPassToManager (Pass *P, 
   bool ProcessAnalysis) {
 
   if (ProcessAnalysis) {
@@ -414,7 +413,7 @@
 // successfully use the getAnalysis() method to retrieve the
 // implementations it needs.
 //
-void CommonPassManagerImpl::initializeAnalysisImpl(Pass *P) {
+void PMDataManager::initializeAnalysisImpl(Pass *P) {
   AnalysisUsage AnUsage;
   P->getAnalysisUsage(AnUsage);
  



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.37 -> 1.38
---
Log message:

RequiredAnalysis support is buggy and not used at the moment so remove 
the code. Add TODO note.


---
Diffs of the changes:  (+10 -41)

 PassManager.cpp |   51 ++-
 1 files changed, 10 insertions(+), 41 deletions(-)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.37 
llvm/lib/VMCore/PassManager.cpp:1.38
--- llvm/lib/VMCore/PassManager.cpp:1.37Thu Dec  7 12:41:09 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 12:47:25 2006
@@ -107,9 +107,6 @@
   return I->second;
   }
 
-  /// Augment RequiredAnalysis by adding analysis required by pass P.
-  void noteDownRequiredAnalysis(Pass *P);
-
   /// Augment AvailableAnalysis by adding analysis made available by pass P.
   void noteDownAvailableAnalysis(Pass *P);
 
@@ -119,13 +116,12 @@
   /// Remove dead passes
   void removeDeadPasses(Pass *P);
 
-  /// Add pass P into the PassVector. Update RequiredAnalysis and
+  /// Add pass P into the PassVector. Update 
   /// AvailableAnalysis appropriately if ProcessAnalysis is true.
   void addPassToManager (Pass *P, bool ProcessAnalysis = true);
 
   // Initialize available analysis information.
   void initializeAnalysisInfo() { 
-RequiredAnalysis.clear();
 AvailableAnalysis.clear();
 LastUser.clear();
   }
@@ -151,12 +147,6 @@
   }
 
 private:
-  // Analysis required by the passes managed by this manager. This information
-  // used while selecting pass manager during addPass. If a pass does not
-  // preserve any analysis required by other passes managed by current
-  // pass manager then new pass manager is used.
-  std::vector RequiredAnalysis;
-
   // Set of available Analysis. This information is used while scheduling 
   // pass. If a pass requires an analysis which is not not available then 
   // equired analysis pass is scheduled to run before the pass itself is 
@@ -307,37 +297,16 @@
 /// manager.
 bool PMDataManager::manageablePass(Pass *P) {
 
-  AnalysisUsage AnUsage;
-  P->getAnalysisUsage(AnUsage);
-
-  // If this pass is not preserving information that is required by the other
-  // passes managed by this manager then use new manager
-  if (!AnUsage.getPreservesAll()) {
-const std::vector &PreservedSet = AnUsage.getPreservedSet();
-for (std::vector::iterator I = RequiredAnalysis.begin(),
-   E = RequiredAnalysis.end(); I != E; ++I) {
-  if (std::find(PreservedSet.begin(), PreservedSet.end(), *I) == 
-  PreservedSet.end())
-// This analysis is not preserved. Need new manager.
-return false;
-}
-  }
+  // TODO 
+  // If this pass is not preserving information that is required by a
+  // pass maintained by higher level pass manager then do not insert
+  // this pass into current manager. Use new manager. For example,
+  // For example, If FunctionPass F is not preserving ModulePass Info M1
+  // that is used by another ModulePass M2 then do not insert F in
+  // current function pass manager.
   return true;
 }
 
-/// Augment RequiredAnalysis by adding analysis required by pass P.
-void PMDataManager::noteDownRequiredAnalysis(Pass *P) {
-  AnalysisUsage AnUsage;
-  P->getAnalysisUsage(AnUsage);
-  const std::vector &RequiredSet = AnUsage.getRequiredSet();
-
-  // FIXME: What about duplicates ?
-  RequiredAnalysis.insert(RequiredAnalysis.end(), RequiredSet.begin(), 
-  RequiredSet.end());
-
-  initializeAnalysisImpl(P);
-}
-
 /// Augement AvailableAnalysis by adding analysis made available by pass P.
 void PMDataManager::noteDownAvailableAnalysis(Pass *P) {
 
@@ -389,14 +358,14 @@
   }
 }
 
-/// Add pass P into the PassVector. Update RequiredAnalysis and
+/// Add pass P into the PassVector. Update 
 /// AvailableAnalysis appropriately if ProcessAnalysis is true.
 void PMDataManager::addPassToManager (Pass *P, 
   bool ProcessAnalysis) {
 
   if (ProcessAnalysis) {
 // Take a note of analysis required and made available by this pass
-noteDownRequiredAnalysis(P);
+initializeAnalysisImpl(P);
 noteDownAvailableAnalysis(P);
 
 // Remove the analysis not preserved by this pass



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.38 -> 1.39
---
Log message:

Add PMTopLevelManager. It is not used yet.


---
Diffs of the changes:  (+76 -0)

 PassManager.cpp |   76 
 1 files changed, 76 insertions(+)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.38 
llvm/lib/VMCore/PassManager.cpp:1.39
--- llvm/lib/VMCore/PassManager.cpp:1.38Thu Dec  7 12:47:25 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 13:21:29 2006
@@ -86,6 +86,82 @@
 
 namespace llvm {
 
+//===--===//
+// PMTopLevelManager
+//
+/// PMTopLevelManager manages LastUser info and collects common APIs used by
+/// top level pass managers.
+class PMTopLevelManager {
+
+public:
+
+  inline std::vector::iterator passManagersBegin() { 
+return PassManagers.begin(); 
+  }
+
+  inline std::vector::iterator passManagersEnd() { 
+return PassManagers.end();
+  }
+
+  /// Schedule pass P for execution. Make sure that passes required by
+  /// P are run before P is run. Update analysis info maintained by
+  /// the manager. Remove dead passes. This is a recursive function.
+  void schedulePass(Pass *P, Pass *PM);
+
+  /// This is implemented by top level pass manager and used by 
+  /// schedulePass() to add analysis info passes that are not available.
+  virtual void addTopLevelPass(Pass  *P) = 0;
+
+  /// Set pass P as the last user of the given analysis passes.
+  void setLastUser(std::vector &AnalysisPasses, Pass *P);
+
+  /// Collect passes whose last user is P
+  void collectLastUses(std::vector &LastUses, Pass *P);
+
+  virtual ~PMTopLevelManager() {
+PassManagers.clear();
+  }
+
+private:
+  
+  /// Collection of pass managers
+  std::vector PassManagers;
+
+  // Map to keep track of last user of the analysis pass.
+  // LastUser->second is the last user of Lastuser->first.
+  std::map LastUser;
+};
+  
+/// Set pass P as the last user of the given analysis passes.
+void PMTopLevelManager::setLastUser(std::vector &AnalysisPasses, 
+Pass *P) {
+
+  for (std::vector::iterator I = AnalysisPasses.begin(),
+ E = AnalysisPasses.end(); I != E; ++I) {
+Pass *AP = *I;
+LastUser[AP] = P;
+// If AP is the last user of other passes then make P last user of
+// such passes.
+for (std::map::iterator LUI = LastUser.begin(),
+   LUE = LastUser.end(); LUI != LUE; ++LUI) {
+  if (LUI->second == AP)
+LastUser[LUI->first] = P;
+}
+  }
+
+}
+
+/// Collect passes whose last user is P
+void PMTopLevelManager::collectLastUses(std::vector &LastUses,
+Pass *P) {
+   for (std::map::iterator LUI = LastUser.begin(),
+  LUE = LastUser.end(); LUI != LUE; ++LUI)
+  if (LUI->second == P)
+LastUses.push_back(LUI->first);
+}
+
+
+
 /// PMDataManager provides the common place to manage the analysis data
 /// used by pass managers.
 class PMDataManager {



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.39 -> 1.40
---
Log message:

s/noteDownAvailableAnalysis/recordAvailableAnalysis

While recording available analysis, include interfaces implemented.


---
Diffs of the changes:  (+12 -13)

 PassManager.cpp |   25 -
 1 files changed, 12 insertions(+), 13 deletions(-)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.39 
llvm/lib/VMCore/PassManager.cpp:1.40
--- llvm/lib/VMCore/PassManager.cpp:1.39Thu Dec  7 13:21:29 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 13:33:53 2006
@@ -184,7 +184,7 @@
   }
 
   /// Augment AvailableAnalysis by adding analysis made available by pass P.
-  void noteDownAvailableAnalysis(Pass *P);
+  void recordAvailableAnalysis(Pass *P);
 
   /// Remove Analysis that is not preserved by the pass
   void removeNotPreservedAnalysis(Pass *P);
@@ -384,17 +384,16 @@
 }
 
 /// Augement AvailableAnalysis by adding analysis made available by pass P.
-void PMDataManager::noteDownAvailableAnalysis(Pass *P) {
+void PMDataManager::recordAvailableAnalysis(Pass *P) {
 
   if (const PassInfo *PI = P->getPassInfo()) {
 AvailableAnalysis[PI] = P;
 
-//TODO This pass is the current implementation of all of the interfaces it
-//TODO implements as well.
-//TODO
-//TODO const std::vector &II = 
PI->getInterfacesImplemented();
-//TODO for (unsigned i = 0, e = II.size(); i != e; ++i)
-//TODO CurrentAnalyses[II[i]] = P;
+//This pass is the current implementation of all of the interfaces it
+//implements as well.
+const std::vector &II = PI->getInterfacesImplemented();
+for (unsigned i = 0, e = II.size(); i != e; ++i)
+  AvailableAnalysis[II[i]] = P;
   }
 }
 
@@ -442,7 +441,7 @@
   if (ProcessAnalysis) {
 // Take a note of analysis required and made available by this pass
 initializeAnalysisImpl(P);
-noteDownAvailableAnalysis(P);
+recordAvailableAnalysis(P);
 
 // Remove the analysis not preserved by this pass
 removeNotPreservedAnalysis(P);
@@ -506,7 +505,7 @@
e = passVectorEnd(); itr != e; ++itr) {
   Pass *P = *itr;
   
-  noteDownAvailableAnalysis(P);
+  recordAvailableAnalysis(P);
   BasicBlockPass *BP = dynamic_cast(P);
   Changed |= BP->runOnBasicBlock(*I);
   removeNotPreservedAnalysis(P);
@@ -619,7 +618,7 @@
e = passVectorEnd(); itr != e; ++itr) {
   Pass *P = *itr;
   
-  noteDownAvailableAnalysis(P);
+  recordAvailableAnalysis(P);
   FunctionPass *FP = dynamic_cast(P);
   Changed |= FP->runOnFunction(*I);
   removeNotPreservedAnalysis(P);
@@ -640,7 +639,7 @@
  e = passVectorEnd(); itr != e; ++itr) {
 Pass *P = *itr;
 
-noteDownAvailableAnalysis(P);
+recordAvailableAnalysis(P);
 FunctionPass *FP = dynamic_cast(P);
 Changed |= FP->runOnFunction(F);
 removeNotPreservedAnalysis(P);
@@ -746,7 +745,7 @@
  e = passVectorEnd(); itr != e; ++itr) {
 Pass *P = *itr;
 
-noteDownAvailableAnalysis(P);
+recordAvailableAnalysis(P);
 ModulePass *MP = dynamic_cast(P);
 Changed |= MP->runOnModule(M);
 removeNotPreservedAnalysis(P);



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.40 -> 1.41
---
Log message:

Cosmetic markers to divide code in separate chunks.


---
Diffs of the changes:  (+13 -4)

 PassManager.cpp |   17 +
 1 files changed, 13 insertions(+), 4 deletions(-)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.40 
llvm/lib/VMCore/PassManager.cpp:1.41
--- llvm/lib/VMCore/PassManager.cpp:1.40Thu Dec  7 13:33:53 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 13:39:39 2006
@@ -367,6 +367,7 @@
 
 } // End of llvm namespace
 
+//===--===//
 // PMDataManager implementation
 
 /// Return true IFF pass P's required analysis set does not required new
@@ -470,7 +471,8 @@
   }
 }
 
-/// BasicBlockPassManager implementation
+//===--===//
+// BasicBlockPassManager_New implementation
 
 /// Add pass P into PassVector and return true. If this pass is not
 /// manageable by this manager then return false.
@@ -519,7 +521,9 @@
   return getAnalysisPass(AID);
 }
 
+//===--===//
 // FunctionPassManager_New implementation
+
 /// Create new Function pass manager
 FunctionPassManager_New::FunctionPassManager_New() {
   FPM = new FunctionPassManagerImpl_New();
@@ -567,10 +571,9 @@
   return FPM->doFinalization(*MP->getModule());
 }
 
+//===--===//
 // FunctionPassManagerImpl_New implementation
 
-// FunctionPassManager
-
 /// Add pass P into the pass manager queue. If P is a BasicBlockPass then
 /// either use it into active basic block pass manager or create new basic
 /// block pass manager to handle pass P.
@@ -693,7 +696,7 @@
   return Changed;
 }
 
-
+//===--===//
 // ModulePassManager implementation
 
 /// Add P into pass vector if it is manageble. If P is a FunctionPass
@@ -770,6 +773,9 @@
   return NULL;
 }
 
+//===--===//
+// PassManagerImpl implementation
+
 /// Return true IFF AnalysisID AID is currently available.
 Pass *PassManagerImpl_New::getAnalysisPassFromManager(AnalysisID AID) {
 
@@ -854,6 +860,9 @@
   return Changed;
 }
 
+//===--===//
+// PassManager implementation
+
 /// Create new pass manager
 PassManager_New::PassManager_New() {
   PM = new PassManagerImpl_New();



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.41 -> 1.42
---
Log message:

Add a handle to the top level pass manager in PMDataManager.


---
Diffs of the changes:  (+14 -1)

 PassManager.cpp |   15 ++-
 1 files changed, 14 insertions(+), 1 deletion(-)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.41 
llvm/lib/VMCore/PassManager.cpp:1.42
--- llvm/lib/VMCore/PassManager.cpp:1.41Thu Dec  7 13:39:39 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 13:54:15 2006
@@ -160,7 +160,8 @@
 LastUses.push_back(LUI->first);
 }
 
-
+//===--===//
+// PMDataManager
 
 /// PMDataManager provides the common place to manage the analysis data
 /// used by pass managers.
@@ -168,6 +169,10 @@
 
 public:
 
+  PMDataManager() : TPM(NULL) {
+initializeAnalysisInfo();
+  }
+
   /// Return true IFF pass P's required analysis set does not required new
   /// manager.
   bool manageablePass(Pass *P);
@@ -222,6 +227,10 @@
 // TODO : Check if pass P is available.
   }
 
+  // Access toplevel manager
+  PMTopLevelManager *getTopLevelManager() { return TPM; }
+  void setTopLevelManager(PMTopLevelManager *T) { TPM = T; }
+
 private:
   // Set of available Analysis. This information is used while scheduling 
   // pass. If a pass requires an analysis which is not not available then 
@@ -235,6 +244,10 @@
 
   // Collection of pass that are managed by this manager
   std::vector PassVector;
+
+  // Top level manager.
+  // TODO : Make it a reference.
+  PMTopLevelManager *TPM;
 };
 
 /// BasicBlockPassManager_New manages BasicBlockPass. It batches all the



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/ExecutionEngine/Interpreter/Interpreter.h

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/ExecutionEngine/Interpreter:

Interpreter.h updated: 1.77 -> 1.78
---
Log message:

Removing even more  includes.


---
Diffs of the changes:  (+1 -2)

 Interpreter.h |3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)


Index: llvm/lib/ExecutionEngine/Interpreter/Interpreter.h
diff -u llvm/lib/ExecutionEngine/Interpreter/Interpreter.h:1.77 
llvm/lib/ExecutionEngine/Interpreter/Interpreter.h:1.78
--- llvm/lib/ExecutionEngine/Interpreter/Interpreter.h:1.77 Sun Nov 26 
19:05:10 2006
+++ llvm/lib/ExecutionEngine/Interpreter/Interpreter.h  Thu Dec  7 14:04:42 2006
@@ -21,7 +21,6 @@
 #include "llvm/Support/CallSite.h"
 #include "llvm/Target/TargetData.h"
 #include "llvm/Support/DataTypes.h"
-#include 
 
 namespace llvm {
 
@@ -158,7 +157,7 @@
   void visitAShr(ShiftInst &I);
   void visitVAArgInst(VAArgInst &I);
   void visitInstruction(Instruction &I) {
-std::cerr << I;
+cerr << I;
 assert(0 && "Instruction not interpretable yet!");
   }
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/docs/CommandLine.html ProgrammersManual.html WritingAnLLVMPass.html

2006-12-07 Thread Bill Wendling


Changes in directory llvm/docs:

CommandLine.html updated: 1.42 -> 1.43
ProgrammersManual.html updated: 1.95 -> 1.96
WritingAnLLVMPass.html updated: 1.50 -> 1.51
---
Log message:

Removing even more  includes.


---
Diffs of the changes:  (+21 -21)

 CommandLine.html   |4 ++--
 ProgrammersManual.html |   28 ++--
 WritingAnLLVMPass.html |   10 +-
 3 files changed, 21 insertions(+), 21 deletions(-)


Index: llvm/docs/CommandLine.html
diff -u llvm/docs/CommandLine.html:1.42 llvm/docs/CommandLine.html:1.43
--- llvm/docs/CommandLine.html:1.42 Mon Jul 31 15:18:49 2006
+++ llvm/docs/CommandLine.html  Thu Dec  7 14:04:41 2006
@@ -1042,7 +1042,7 @@
 // debug build, then the code specified as the option to the macro will be
 // executed.  Otherwise it will not be.  Example:
 //
-// DEBUG(std::cerr << "Bitset contains: " << Bitset << "\n");
+// DOUT << "Bitset contains: " << Bitset << "\n";
 //
 #ifdef NDEBUG
 #define DEBUG(X)
@@ -1923,7 +1923,7 @@
 
   mailto:[EMAIL PROTECTED]">Chris Lattner
   http://llvm.org";>LLVM Compiler Infrastructure
-  Last modified: $Date: 2006/07/31 20:18:49 $
+  Last modified: $Date: 2006/12/07 20:04:41 $
 
 
 


Index: llvm/docs/ProgrammersManual.html
diff -u llvm/docs/ProgrammersManual.html:1.95 
llvm/docs/ProgrammersManual.html:1.96
--- llvm/docs/ProgrammersManual.html:1.95   Fri Oct 20 02:07:23 2006
+++ llvm/docs/ProgrammersManual.htmlThu Dec  7 14:04:41 2006
@@ -395,7 +395,7 @@
 
 
 
-DEBUG(std::cerr << "I am here!\n");
+DOUT << "I am here!\n";
 
 
 
@@ -440,16 +440,16 @@
 
 
 
-DEBUG(std::cerr << "No debug type\n");
+DOUT << "No debug type\n";
 #undef  DEBUG_TYPE
 #define DEBUG_TYPE "foo"
-DEBUG(std::cerr << "'foo' debug type\n");
+DOUT << "'foo' debug type\n";
 #undef  DEBUG_TYPE
 #define DEBUG_TYPE "bar"
-DEBUG(std::cerr << "'bar' debug type\n");
+DOUT << "'bar' debug type\n";
 #undef  DEBUG_TYPE
 #define DEBUG_TYPE ""
-DEBUG(std::cerr << "No debug type (2)\n");
+DOUT << "No debug type (2)\n";
 
 
 
@@ -695,8 +695,8 @@
 for (Function::iterator i = func->begin(), e = func->end(); i != e; ++i)
   // Print out the name of the basic block if it has one, and then the
   // number of instructions that it contains
-  std::cerr << "Basic block (name=" << i->getName() << ") 
has "
-<< i->size() << " instructions.\n";
+  llvm::cerr << "Basic block (name=" << i->getName() << 
") has "
+ << i->size() << " instructions.\n";
 
 
 
@@ -728,14 +728,14 @@
 for (BasicBlock::iterator i = blk->begin(), e = blk->end(); i != e; ++i)
// The next statement works since operator<<(ostream&,...)
// is overloaded for Instruction&
-   std::cerr << *i << "\n";
+   llvm::cerr << *i << "\n";
 
 
 
 However, this isn't really the best way to print out the contents of a
 BasicBlock!  Since the ostream operators are overloaded for virtually
 anything you'll care about, you could have just invoked the print routine on 
the
-basic block itself: std::cerr << *blk << "\n";.
+basic block itself: llvm::cerr << *blk << "\n";.
 
 
 
@@ -761,7 +761,7 @@
 
 // F is a ptr to a Function instance
 for (inst_iterator i = inst_begin(F), e = inst_end(F); i != e; ++i)
-  std::cerr << *i << "\n";
+  llvm::cerr << *i << "\n";
 
 
 
@@ -837,7 +837,7 @@
 void printNextInstruction(Instruction* inst) {
   BasicBlock::iterator it(inst);
   ++it; // After this line, it refers to the instruction after *inst
-  if (it != inst->getParent()->end()) std::cerr << *it << 
"\n";
+  if (it != inst->getParent()->end()) llvm::cerr << *it << 
"\n";
 }
 
 
@@ -956,8 +956,8 @@
 
 for (Value::use_iterator i = F->use_begin(), e = F->use_end(); i != e; 
++i)
   if (Instruction *Inst = dyn_cast(*i)) {
-std::cerr << "F is used in instruction:\n";
-std::cerr << *Inst << "\n";
+llvm::cerr << "F is used in instruction:\n";
+llvm::cerr << *Inst << "\n";
   }
 
 
@@ -2554,7 +2554,7 @@
   mailto:[EMAIL PROTECTED]">Dinakar Dhurjati and
   mailto:[EMAIL PROTECTED]">Chris Lattner
   http://llvm.org";>The LLVM Compiler Infrastructure
-  Last modified: $Date: 2006/10/20 07:07:23 $
+  Last modified: $Date: 2006/12/07 20:04:41 $
 
 
 


Index: llvm/docs/WritingAnLLVMPass.html
diff -u llvm/docs/WritingAnLLVMPass.html:1.50 
llvm/docs/WritingAnLLVMPass.html:1.51
--- llvm/docs/WritingAnLLVMPass.html:1.50   Thu Sep 28 11:53:47 2006
+++ llvm/docs/WritingAnLLVMPass.htmlThu Dec  7 14:04:41 2006
@@ -257,7 +257,7 @@
 
 
 virtual bool runOnFunction(Function 
&F) {
-  std::cerr << "Hello: " << F.getName() << "\n";
+  llvm::cerr << "Hello: " << F.getName() << "\n";
   return false;
 }
   };  // end of struct Hello
@@ -289,7 +289,7 @@
 namespace {
   struct Hello : public FunctionPass 
{
 virtual bool runOnFunction(Function 
&F) {
-  std::cerr << "Hello: " << F.getName() << "\n";
+  llvm::cerr << "Hello: " << F.getName() << "\n";
   return false;
 }
   };
@@ -863,7 +863,7 @@
 
 
 
-  virtual void print(std::ostream &O, const

[llvm-commits] CVS: llvm/lib/CodeGen/MachineDebugInfo.cpp RegAllocLocal.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/CodeGen:

MachineDebugInfo.cpp updated: 1.62 -> 1.63
RegAllocLocal.cpp updated: 1.97 -> 1.98
---
Log message:

Removing even more  includes.


---
Diffs of the changes:  (+98 -100)

 MachineDebugInfo.cpp |  196 +--
 RegAllocLocal.cpp|2 
 2 files changed, 98 insertions(+), 100 deletions(-)


Index: llvm/lib/CodeGen/MachineDebugInfo.cpp
diff -u llvm/lib/CodeGen/MachineDebugInfo.cpp:1.62 
llvm/lib/CodeGen/MachineDebugInfo.cpp:1.63
--- llvm/lib/CodeGen/MachineDebugInfo.cpp:1.62  Thu Nov 30 12:29:23 2006
+++ llvm/lib/CodeGen/MachineDebugInfo.cpp   Thu Dec  7 14:04:42 2006
@@ -21,9 +21,7 @@
 #include "llvm/Instructions.h"
 #include "llvm/Module.h"
 #include "llvm/Support/Dwarf.h"
-
-#include 
-
+#include "llvm/Support/Streams.h"
 using namespace llvm;
 using namespace llvm::dwarf;
 
@@ -589,10 +587,10 @@
 
 #ifndef NDEBUG
 void AnchorDesc::dump() {
-  std::cerr << getDescString() << " "
-<< "Version(" << getVersion() << "), "
-<< "Tag(" << getTag() << "), "
-<< "AnchorTag(" << AnchorTag << ")\n";
+  cerr << getDescString() << " "
+   << "Version(" << getVersion() << "), "
+   << "Tag(" << getTag() << "), "
+   << "AnchorTag(" << AnchorTag << ")\n";
 }
 #endif
 
@@ -664,14 +662,14 @@
 
 #ifndef NDEBUG
 void CompileUnitDesc::dump() {
-  std::cerr << getDescString() << " "
-<< "Version(" << getVersion() << "), "
-<< "Tag(" << getTag() << "), "
-<< "Anchor(" << getAnchor() << "), "
-<< "Language(" << Language << "), "
-<< "FileName(\"" << FileName << "\"), "
-<< "Directory(\"" << Directory << "\"), "
-<< "Producer(\"" << Producer << "\")\n";
+  cerr << getDescString() << " "
+   << "Version(" << getVersion() << "), "
+   << "Tag(" << getTag() << "), "
+   << "Anchor(" << getAnchor() << "), "
+   << "Language(" << Language << "), "
+   << "FileName(\"" << FileName << "\"), "
+   << "Directory(\"" << Directory << "\"), "
+   << "Producer(\"" << Producer << "\")\n";
 }
 #endif
 
@@ -718,17 +716,17 @@
 
 #ifndef NDEBUG
 void TypeDesc::dump() {
-  std::cerr << getDescString() << " "
-<< "Version(" << getVersion() << "), "
-<< "Tag(" << getTag() << "), "
-<< "Context(" << Context << "), "
-<< "Name(\"" << Name << "\"), "
-<< "File(" << File << "), "
-<< "Line(" << Line << "), "
-<< "Size(" << Size << "), "
-<< "Align(" << Align << "), "
-<< "Offset(" << Offset << "), "
-<< "Flags(" << Flags << ")\n";
+  cerr << getDescString() << " "
+   << "Version(" << getVersion() << "), "
+   << "Tag(" << getTag() << "), "
+   << "Context(" << Context << "), "
+   << "Name(\"" << Name << "\"), "
+   << "File(" << File << "), "
+   << "Line(" << Line << "), "
+   << "Size(" << Size << "), "
+   << "Align(" << Align << "), "
+   << "Offset(" << Offset << "), "
+   << "Flags(" << Flags << ")\n";
 }
 #endif
 
@@ -766,13 +764,13 @@
 
 #ifndef NDEBUG
 void BasicTypeDesc::dump() {
-  std::cerr << getDescString() << " "
-<< "Version(" << getVersion() << "), "
-<< "Tag(" << getTag() << "), "
-<< "Context(" << getContext() << "), "
-<< "Name(\"" << getName() << "\"), "
-<< "Size(" << getSize() << "), "
-<< "Encoding(" << Encoding << ")\n";
+  cerr << getDescString() << " "
+   << "Version(" << getVersion() << "), "
+   << "Tag(" << getTag() << "), "
+   << "Context(" << getContext() << "), "
+   << "Name(\"" << getName() << "\"), "
+   << "Size(" << getSize() << "), "
+   << "Encoding(" << Encoding << ")\n";
 }
 #endif
 
@@ -823,15 +821,15 @@
 
 #ifndef NDEBUG
 void DerivedTypeDesc::dump() {
-  std::cerr << getDescString() << " "
-<< "Version(" << getVersion() << "), "
-<< "Tag(" << getTag() << "), "
-<< "Context(" << getContext() << "), "
-<< "Name(\"" << getName() << "\"), "
-<< "Size(" << getSize() << "), "
-<< "File(" << getFile() << "), "
-<< "Line(" << getLine() << "), "
-<< "FromType(" << FromType << ")\n";
+  cerr << getDescString() << " "
+   << "Version(" << getVersion() << "), "
+   << "Tag(" << getTag() << "), "
+   << "Context(" << getContext() << "), "
+   << "Name(\"" << getName() << "\"), "
+   << "Size(" << getSize() << "), "
+   << "File(" << getFile() << "), "
+   << "Line(" << getLine() << "), "
+   << "FromType(" << FromType << ")\n";
 }
 #endif
 
@@ -880,16 +878,16 @@
 
 #ifndef NDEBUG
 void CompositeTypeDesc::dump() {
-  std::cerr << getDescString() << " "
-<< "Version(" << getVersion() << "), "
-<< "Tag(" << getTag() << "), "
-<< "Context(" << getContext() << ")

[llvm-commits] CVS: llvm/lib/Transforms/IPO/FunctionResolution.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/Transforms/IPO:

FunctionResolution.cpp updated: 1.61 -> 1.62
---
Log message:

Removing even more  includes.


---
Diffs of the changes:  (+19 -19)

 FunctionResolution.cpp |   38 +++---
 1 files changed, 19 insertions(+), 19 deletions(-)


Index: llvm/lib/Transforms/IPO/FunctionResolution.cpp
diff -u llvm/lib/Transforms/IPO/FunctionResolution.cpp:1.61 
llvm/lib/Transforms/IPO/FunctionResolution.cpp:1.62
--- llvm/lib/Transforms/IPO/FunctionResolution.cpp:1.61 Wed Dec  6 11:46:32 2006
+++ llvm/lib/Transforms/IPO/FunctionResolution.cpp  Thu Dec  7 14:04:42 2006
@@ -62,13 +62,13 @@
   if (OldFT->getNumParams() > ConcreteFT->getNumParams() &&
   !ConcreteFT->isVarArg())
 if (!Old->use_empty()) {
-  std::cerr << "WARNING: Linking function '" << Old->getName()
-<< "' is causing arguments to be dropped.\n";
-  std::cerr << "WARNING: Prototype: ";
+  cerr << "WARNING: Linking function '" << Old->getName()
+   << "' is causing arguments to be dropped.\n";
+  cerr << "WARNING: Prototype: ";
   WriteAsOperand(std::cerr, Old);
-  std::cerr << " resolved to ";
+  cerr << " resolved to ";
   WriteAsOperand(std::cerr, Concrete);
-  std::cerr << "\n";
+  cerr << "\n";
 }
 
   // Check to make sure that if there are specified types, that they
@@ -82,14 +82,14 @@
   if (OldFT->getParamType(i) != ConcreteFT->getParamType(i))
 if (OldFT->getParamType(i)->getTypeID() !=
 ConcreteFT->getParamType(i)->getTypeID()) {
-  std::cerr << "WARNING: Function [" << Old->getName()
-<< "]: Parameter types conflict for: '";
+  cerr << "WARNING: Function [" << Old->getName()
+   << "]: Parameter types conflict for: '";
   WriteTypeSymbolic(std::cerr, OldFT, &M);
-  std::cerr << "' (in " 
-<< Old->getParent()->getModuleIdentifier() << ") and '";
+  cerr << "' (in " 
+   << Old->getParent()->getModuleIdentifier() << ") and '";
   WriteTypeSymbolic(std::cerr, ConcreteFT, &M);
-  std::cerr << "'(in " 
-<< Concrete->getParent()->getModuleIdentifier() << ")\n";
+  cerr << "'(in " 
+   << Concrete->getParent()->getModuleIdentifier() << ")\n";
   return Changed;
 }
 
@@ -164,8 +164,8 @@
 
   for (unsigned i = 0; i != Globals.size(); ) {
 if (isa(Globals[i]) != isFunction) {
-  std::cerr << "WARNING: Found function and global variable with the "
-<< "same name: '" << Globals[i]->getName() << "'.\n";
+  cerr << "WARNING: Found function and global variable with the "
+   << "same name: '" << Globals[i]->getName() << "'.\n";
   return false; // Don't know how to handle this, bail out!
 }
 
@@ -192,9 +192,9 @@
   GlobalVariable *GV = cast(Globals[i]);
   if (!GV->isExternal()) {
 if (Concrete) {
-  std::cerr << "WARNING: Two global variables with external linkage"
-<< " exist with the same name: '" << GV->getName()
-<< "'!\n";
+  cerr << "WARNING: Two global variables with external linkage"
+   << " exist with the same name: '" << GV->getName()
+   << "'!\n";
   return false;
 }
 Concrete = GV;
@@ -251,11 +251,11 @@
 }
 
 if (0 && !DontPrintWarning) {
-  std::cerr << "WARNING: Found global types that are not compatible:\n";
+  cerr << "WARNING: Found global types that are not compatible:\n";
   for (unsigned i = 0; i < Globals.size(); ++i) {
-std::cerr << "\t";
+cerr << "\t";
 WriteTypeSymbolic(std::cerr, Globals[i]->getType(), &M);
-std::cerr << " %" << Globals[i]->getName() << "\n";
+cerr << " %" << Globals[i]->getName() << "\n";
   }
 }
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/Intercept.cpp JIT.cpp JITEmitter.cpp TargetSelect.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/ExecutionEngine/JIT:

Intercept.cpp updated: 1.28 -> 1.29
JIT.cpp updated: 1.81 -> 1.82
JITEmitter.cpp updated: 1.120 -> 1.121
TargetSelect.cpp updated: 1.12 -> 1.13
---
Log message:

Removing even more  includes.


---
Diffs of the changes:  (+37 -41)

 Intercept.cpp|5 ++---
 JIT.cpp  |   11 +--
 JITEmitter.cpp   |   55 +++
 TargetSelect.cpp |7 +++
 4 files changed, 37 insertions(+), 41 deletions(-)


Index: llvm/lib/ExecutionEngine/JIT/Intercept.cpp
diff -u llvm/lib/ExecutionEngine/JIT/Intercept.cpp:1.28 
llvm/lib/ExecutionEngine/JIT/Intercept.cpp:1.29
--- llvm/lib/ExecutionEngine/JIT/Intercept.cpp:1.28 Fri Jul 28 16:11:31 2006
+++ llvm/lib/ExecutionEngine/JIT/Intercept.cpp  Thu Dec  7 14:04:42 2006
@@ -18,7 +18,6 @@
 #include "JIT.h"
 #include "llvm/System/DynamicLibrary.h"
 #include "llvm/Config/config.h"
-#include 
 using namespace llvm;
 
 // AtExitHandlers - List of functions to call when the program exits,
@@ -115,8 +114,8 @@
 if (Ptr) return Ptr;
   }
 
-  std::cerr << "ERROR: Program used external function '" << Name
-<< "' which could not be resolved!\n";
+  cerr << "ERROR: Program used external function '" << Name
+   << "' which could not be resolved!\n";
   abort();
   return 0;
 }


Index: llvm/lib/ExecutionEngine/JIT/JIT.cpp
diff -u llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.81 
llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.82
--- llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.81   Fri Oct 20 02:07:24 2006
+++ llvm/lib/ExecutionEngine/JIT/JIT.cppThu Dec  7 14:04:42 2006
@@ -27,7 +27,6 @@
 #include "llvm/Target/TargetData.h"
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Target/TargetJITInfo.h"
-#include 
 using namespace llvm;
 
 #ifdef __APPLE__ 
@@ -64,7 +63,7 @@
   // Turn the machine code intermediate representation into bytes in memory 
that
   // may be executed.
   if (TM.addPassesToEmitMachineCode(PM, *MCE, false /*fast*/)) {
-std::cerr << "Target does not support machine code emission!\n";
+cerr << "Target does not support machine code emission!\n";
 abort();
   }
   
@@ -279,8 +278,8 @@
 
 std::string ErrorMsg;
 if (MP->materializeFunction(F, &ErrorMsg)) {
-  std::cerr << "Error reading function '" << F->getName()
-<< "' from bytecode file: " << ErrorMsg << "\n";
+  cerr << "Error reading function '" << F->getName()
+   << "' from bytecode file: " << ErrorMsg << "\n";
   abort();
 }
   }
@@ -323,8 +322,8 @@
 #endif
 Ptr = sys::DynamicLibrary::SearchForAddressOfSymbol(GV->getName().c_str());
 if (Ptr == 0) {
-  std::cerr << "Could not resolve external global address: "
-<< GV->getName() << "\n";
+  cerr << "Could not resolve external global address: "
+   << GV->getName() << "\n";
   abort();
 }
   } else {


Index: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp
diff -u llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.120 
llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.121
--- llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.120   Wed Dec  6 11:46:32 2006
+++ llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp Thu Dec  7 14:04:42 2006
@@ -30,7 +30,6 @@
 #include "llvm/ADT/Statistic.h"
 #include "llvm/System/Memory.h"
 #include 
-#include 
 using namespace llvm;
 
 namespace {
@@ -410,7 +409,7 @@
 ~(intptr_t)(Alignment-1));
   if (CurStubPtr < StubBase) {
 // FIXME: allocate a new block
-std::cerr << "JIT ran out of memory for function stubs!\n";
+cerr << "JIT ran out of memory for function stubs!\n";
 abort();
   }
   return CurStubPtr;
@@ -422,8 +421,8 @@
   std::string ErrMsg;
   sys::MemoryBlock B = sys::Memory::AllocateRWX(size, BOld, &ErrMsg);
   if (B.base() == 0) {
-std::cerr << "Allocation failed when allocating new memory in the JIT\n";
-std::cerr << ErrMsg << "\n";
+cerr << "Allocation failed when allocating new memory in the JIT\n";
+cerr << ErrMsg << "\n";
 abort();
   }
   Blocks.push_back(B);
@@ -562,8 +561,8 @@
   // Invalidate the icache if necessary.
   synchronizeICache(Stub, MCE.getCurrentPCValue()-(intptr_t)Stub);
 
-  DEBUG(std::cerr << "JIT: Stub emitted at [" << Stub << "] for function '"
-  << F->getName() << "'\n");
+  DOUT << "JIT: Stub emitted at [" << Stub << "] for function '"
+   << F->getName() << "'\n";
 
   // Finally, keep track of the stub-to-Function mapping so that the
   // JITCompilerFn knows which function to compile!
@@ -583,8 +582,8 @@
   // Invalidate the icache if necessary.
   synchronizeICache(Stub, MCE.getCurrentPCValue()-(intptr_t)Stub);
 
-  DEBUG(std::cerr << "JIT: Stub emitted at [" << Stub
-<< "] for external function at '" << FnAddr << "'\n");
+  DOUT << "JIT: Stub emitted at [" << Stub
+   << "] for external function at '" << FnAddr << "'\n";
   return Stub;
 }
 
@@ -593,8 +592,8 @@
   if (!idx) {
 

[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.42 -> 1.43
---
Log message:

Pass Managers themselves do not invalidate any analysis info.


---
Diffs of the changes:  (+22 -1)

 PassManager.cpp |   23 ++-
 1 files changed, 22 insertions(+), 1 deletion(-)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.42 
llvm/lib/VMCore/PassManager.cpp:1.43
--- llvm/lib/VMCore/PassManager.cpp:1.42Thu Dec  7 13:54:15 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 13:57:52 2006
@@ -269,6 +269,11 @@
   /// Return true IFF AnalysisID AID is currently available.
   Pass *getAnalysisPassFromManager(AnalysisID AID);
 
+  /// Pass Manager itself does not invalidate any analysis info.
+  void getAnalysisUsage(AnalysisUsage &Info) const {
+Info.setPreservesAll();
+  }
+
 private:
 };
 
@@ -311,6 +316,12 @@
   /// doFinalization - Run all of the initializers for the function passes.
   ///
   bool doFinalization(Module &M);
+
+  /// Pass Manager itself does not invalidate any analysis info.
+  void getAnalysisUsage(AnalysisUsage &Info) const {
+Info.setPreservesAll();
+  }
+
 private:
   // Active Pass Managers
   BasicBlockPassManager_New *activeBBPassManager;
@@ -333,7 +344,12 @@
 
   /// Return true IFF AnalysisID AID is currently available.
   Pass *getAnalysisPassFromManager(AnalysisID AID);
-  
+
+  /// Pass Manager itself does not invalidate any analysis info.
+  void getAnalysisUsage(AnalysisUsage &Info) const {
+Info.setPreservesAll();
+  }
+
 private:
   // Active Pass Manager
   FunctionPassManagerImpl_New *activeFunctionPassManager;
@@ -357,6 +373,11 @@
   /// Return true IFF AnalysisID AID is currently available.
   Pass *getAnalysisPassFromManager(AnalysisID AID);
 
+  /// Pass Manager itself does not invalidate any analysis info.
+  void getAnalysisUsage(AnalysisUsage &Info) const {
+Info.setPreservesAll();
+  }
+
 private:
 
   /// Add a pass into a passmanager queue. This is used by schedulePasses



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp Module.cpp Pass.cpp PassManagerT.h

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/VMCore:

AsmWriter.cpp updated: 1.227 -> 1.228
Module.cpp updated: 1.68 -> 1.69
Pass.cpp updated: 1.75 -> 1.76
PassManagerT.h updated: 1.70 -> 1.71
---
Log message:

Removing even more  includes.


---
Diffs of the changes:  (+37 -41)

 AsmWriter.cpp  |5 ++---
 Module.cpp |3 +--
 Pass.cpp   |   43 +--
 PassManagerT.h |   27 +--
 4 files changed, 37 insertions(+), 41 deletions(-)


Index: llvm/lib/VMCore/AsmWriter.cpp
diff -u llvm/lib/VMCore/AsmWriter.cpp:1.227 llvm/lib/VMCore/AsmWriter.cpp:1.228
--- llvm/lib/VMCore/AsmWriter.cpp:1.227 Wed Dec  6 19:30:31 2006
+++ llvm/lib/VMCore/AsmWriter.cpp   Thu Dec  7 14:04:42 2006
@@ -31,7 +31,6 @@
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/Streams.h"
 #include 
-#include 
 using namespace llvm;
 
 namespace llvm {
@@ -1328,11 +1327,11 @@
 
 // Value::dump - allow easy printing of  Values from the debugger.
 // Located here because so much of the needed functionality is here.
-void Value::dump() const { print(std::cerr); cerr << '\n'; }
+void Value::dump() const { print(*cerr.stream()); cerr << '\n'; }
 
 // Type::dump - allow easy printing of  Values from the debugger.
 // Located here because so much of the needed functionality is here.
-void Type::dump() const { print(std::cerr); cerr << '\n'; }
+void Type::dump() const { print(*cerr.stream()); cerr << '\n'; }
 
 
//===--===//
 // SlotMachine Implementation


Index: llvm/lib/VMCore/Module.cpp
diff -u llvm/lib/VMCore/Module.cpp:1.68 llvm/lib/VMCore/Module.cpp:1.69
--- llvm/lib/VMCore/Module.cpp:1.68 Wed May 31 11:40:28 2006
+++ llvm/lib/VMCore/Module.cpp  Thu Dec  7 14:04:42 2006
@@ -22,7 +22,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 using namespace llvm;
 
@@ -83,7 +82,7 @@
 
 // Module::dump() - Allow printing from debugger
 void Module::dump() const {
-  print(std::cerr);
+  print(*cerr.stream());
 }
 
 /// Target endian information...


Index: llvm/lib/VMCore/Pass.cpp
diff -u llvm/lib/VMCore/Pass.cpp:1.75 llvm/lib/VMCore/Pass.cpp:1.76
--- llvm/lib/VMCore/Pass.cpp:1.75   Fri Dec  1 17:46:50 2006
+++ llvm/lib/VMCore/Pass.cppThu Dec  7 14:04:42 2006
@@ -20,7 +20,6 @@
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/TypeInfo.h"
-#include 
 #include 
 using namespace llvm;
 
@@ -68,7 +67,7 @@
 bool FunctionPassManager::run(Function &F) {
   std::string errstr;
   if (MP->materializeFunction(&F, &errstr)) {
-std::cerr << "Error reading bytecode file: " << errstr << "\n";
+cerr << "Error reading bytecode file: " << errstr << "\n";
 abort();
   }
   return PM->runOnFunction(F);
@@ -114,49 +113,49 @@
 // Print out arguments for registered passes that are _optimizations_
 if (const PassInfo *PI = P->getPassInfo())
   if (!PI->isAnalysisGroup())
-std::cerr << " -" << PI->getPassArgument();
+cerr << " -" << PI->getPassArgument();
   }
 }
 
 void PMDebug::PrintPassInformation(unsigned Depth, const char *Action,
Pass *P, Module *M) {
   if (PassDebugging >= Executions) {
-std::cerr << (void*)P << std::string(Depth*2+1, ' ') << Action << " '"
-  << P->getPassName();
-if (M) std::cerr << "' on Module '" << M->getModuleIdentifier() << "'\n";
-std::cerr << "'...\n";
+cerr << (void*)P << std::string(Depth*2+1, ' ') << Action << " '"
+ << P->getPassName();
+if (M) cerr << "' on Module '" << M->getModuleIdentifier() << "'\n";
+cerr << "'...\n";
   }
 }
 
 void PMDebug::PrintPassInformation(unsigned Depth, const char *Action,
Pass *P, Function *F) {
   if (PassDebugging >= Executions) {
-std::cerr << (void*)P << std::string(Depth*2+1, ' ') << Action << " '"
-  << P->getPassName();
-if (F) std::cerr << "' on Function '" << F->getName();
-std::cerr << "'...\n";
+cerr << (void*)P << std::string(Depth*2+1, ' ') << Action << " '"
+ << P->getPassName();
+if (F) cerr << "' on Function '" << F->getName();
+cerr << "'...\n";
   }
 }
 
 void PMDebug::PrintPassInformation(unsigned Depth, const char *Action,
Pass *P, BasicBlock *BB) {
   if (PassDebugging >= Executions) {
-std::cerr << (void*)P << std::string(Depth*2+1, ' ') << Action << " '"
-  << P->getPassName();
-if (BB) std::cerr << "' on BasicBlock '" << BB->getName();
-std::cerr << "'...\n";
+cerr << (void*)P << std::string(Depth*2+1, ' ') << Action << " '"
+ << P->getPassName();
+if (BB) cerr << "' on BasicBlock '" << BB->getName();
+cerr << "'...\n";
   }
 }
 
 void PMDebug::PrintAnalysisSetInfo(unsigned Depth, const char *Msg,
Pass *P, const std::vector 
&Set){
   if (PassDe

[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.43 -> 1.44
---
Log message:

If pass reserves all analysis info then each info is not separately
included in PreservedSet. So check getPreservesAll() first.


---
Diffs of the changes:  (+6 -3)

 PassManager.cpp |9 ++---
 1 files changed, 6 insertions(+), 3 deletions(-)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.43 
llvm/lib/VMCore/PassManager.cpp:1.44
--- llvm/lib/VMCore/PassManager.cpp:1.43Thu Dec  7 13:57:52 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 14:03:49 2006
@@ -436,8 +436,11 @@
 void PMDataManager::removeNotPreservedAnalysis(Pass *P) {
   AnalysisUsage AnUsage;
   P->getAnalysisUsage(AnUsage);
-  const std::vector &PreservedSet = AnUsage.getPreservedSet();
 
+  if (AnUsage.getPreservesAll())
+return;
+
+  const std::vector &PreservedSet = AnUsage.getPreservedSet();
   for (std::map::iterator I = AvailableAnalysis.begin(),
  E = AvailableAnalysis.end(); I != E; ++I ) {
 if (std::find(PreservedSet.begin(), PreservedSet.end(), I->first) == 
@@ -470,8 +473,8 @@
 
 /// Add pass P into the PassVector. Update 
 /// AvailableAnalysis appropriately if ProcessAnalysis is true.
-void PMDataManager::addPassToManager (Pass *P, 
-  bool ProcessAnalysis) {
+void PMDataManager::addPassToManager(Pass *P, 
+ bool ProcessAnalysis) {
 
   if (ProcessAnalysis) {
 // Take a note of analysis required and made available by this pass



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp PredicateSimplifier.cpp Reassociate.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/Transforms/Scalar:

CorrelatedExprs.cpp updated: 1.39 -> 1.40
PredicateSimplifier.cpp updated: 1.37 -> 1.38
Reassociate.cpp updated: 1.67 -> 1.68
---
Log message:

Removing even more  includes.


---
Diffs of the changes:  (+60 -71)

 CorrelatedExprs.cpp |   35 ---
 PredicateSimplifier.cpp |   62 ++--
 Reassociate.cpp |   34 +++---
 3 files changed, 60 insertions(+), 71 deletions(-)


Index: llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp
diff -u llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.39 
llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.40
--- llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.39 Wed Dec  6 11:46:32 2006
+++ llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp  Thu Dec  7 14:04:42 2006
@@ -42,7 +42,6 @@
 #include "llvm/ADT/PostOrderIterator.h"
 #include "llvm/ADT/Statistic.h"
 #include 
-#include 
 using namespace llvm;
 
 namespace {
@@ -336,7 +335,7 @@
   ComputeReplacements(RI);
 
   // If debugging, print computed region information...
-  DEBUG(RI.print(std::cerr));
+  DEBUG(RI.print(*cerr.stream()));
 
   // Simplify the contents of this block...
   bool Changed = SimplifyBasicBlock(*BB, RI);
@@ -517,11 +516,10 @@
   BasicBlock *OldSucc = TI->getSuccessor(SuccNo);
   BasicBlock *BB = TI->getParent();
 
-  DEBUG(std::cerr << "Forwarding branch in basic block %" << BB->getName()
-<< " from block %" << OldSucc->getName() << " to block %"
-<< Dest->getName() << "\n");
-
-  DEBUG(std::cerr << "Before forwarding: " << *BB->getParent());
+  DOUT << "Forwarding branch in basic block %" << BB->getName()
+   << " from block %" << OldSucc->getName() << " to block %"
+   << Dest->getName() << "\n"
+   << "Before forwarding: " << *BB->getParent();
 
   // Because we know that there cannot be critical edges in the flow graph, and
   // that OldSucc has multiple outgoing edges, this means that Dest cannot have
@@ -628,7 +626,7 @@
   // FIXME: This is much worse than it really should be!
   //EF->recalculate();
 
-  DEBUG(std::cerr << "After forwarding: " << *BB->getParent());
+  DOUT << "After forwarding: " << *BB->getParent();
 }
 
 /// ReplaceUsesOfValueInRegion - This method replaces all uses of Orig with 
uses
@@ -921,9 +919,9 @@
   //
   if (Op1R.contradicts(Opcode, VI)) {
 Op1R.contradicts(Opcode, VI);
-std::cerr << "Contradiction found for opcode: "
-  << Instruction::getOpcodeName(Opcode) << "\n";
-Op1R.print(std::cerr);
+cerr << "Contradiction found for opcode: "
+ << Instruction::getOpcodeName(Opcode) << "\n";
+Op1R.print(*cerr.stream());
 return;
   }
 
@@ -1033,8 +1031,7 @@
   // Try to simplify a setcc instruction based on inherited information
   Relation::KnownResult Result = getSetCCResult(SCI, RI);
   if (Result != Relation::Unknown) {
-DEBUG(std::cerr << "Replacing setcc with " << Result
-<< " constant: " << *SCI);
+DOUT << "Replacing setcc with " << Result << " constant: " << *SCI;
 
 SCI->replaceAllUsesWith(ConstantBool::get((bool)Result));
 // The instruction is now dead, remove it from the program.
@@ -1061,8 +1058,8 @@
   if (Value *Repl = VI->getReplacement()) {
 // If we know if a replacement with lower rank than Op0, make the
 // replacement now.
-DEBUG(std::cerr << "In Inst: " << *I << "  Replacing operand #" << i
-<< " with " << *Repl << "\n");
+DOUT << "In Inst: " << *I << "  Replacing operand #" << i
+ << " with " << *Repl << "\n";
 I->setOperand(i, Repl);
 Changed = true;
 ++NumOperandsCann;
@@ -1090,7 +1087,7 @@
 if (isa(Op1)) {
   if (Constant *Result = ConstantFoldInstruction(SCI)) {
 // Wow, this is easy, directly eliminate the SetCondInst.
-DEBUG(std::cerr << "Replacing setcc with constant fold: " << *SCI);
+DOUT << "Replacing setcc with constant fold: " << *SCI;
 return cast(Result)->getValue()
   ? Relation::KnownTrue : Relation::KnownFalse;
   }
@@ -1313,6 +1310,6 @@
 }
 
 // Don't inline these methods or else we won't be able to call them from GDB!
-void Relation::dump() const { print(std::cerr); }
-void ValueInfo::dump() const { print(std::cerr, 0); }
-void RegionInfo::dump() const { print(std::cerr); }
+void Relation::dump() const { print(*cerr.stream()); }
+void ValueInfo::dump() const { print(*cerr.stream(), 0); }
+void RegionInfo::dump() const { print(*cerr.stream()); }


Index: llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp
diff -u llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.37 
llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.38
--- llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.37 Wed Dec  6 
12:13:12 2006
+++ llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp  Thu Dec  7 14:04:42 2006
@@ -88,7 +88,6 @@
 #inc

[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/Analysis/DataStructure:

DataStructure.cpp updated: 1.254 -> 1.255
---
Log message:

Removed more  includes


---
Diffs of the changes:  (+4 -5)

 DataStructure.cpp |9 -
 1 files changed, 4 insertions(+), 5 deletions(-)


Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp
diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.254 
llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.255
--- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.254 Wed Dec  6 
19:30:31 2006
+++ llvm/lib/Analysis/DataStructure/DataStructure.cpp   Thu Dec  7 14:28:15 2006
@@ -26,7 +26,6 @@
 #include "llvm/ADT/SCCIterator.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/Support/Timer.h"
-#include 
 #include 
 using namespace llvm;
 
@@ -721,10 +720,10 @@
 M = getParentGraph()->retnodes_begin()->first->getParent();
 
   DOUT << "MergeTypeInfo Folding OrigTy: ";
-  DEBUG(WriteTypeSymbolic(std::cerr, Ty, M) << "\n due to:";
-WriteTypeSymbolic(std::cerr, NewTy, M) << " @ " << Offset << "!\n"
-   << "SubType: ";
-WriteTypeSymbolic(std::cerr, SubType, M) << "\n\n");
+  DEBUG(WriteTypeSymbolic(*cerr.stream(), Ty, M) << "\n due to:";
+WriteTypeSymbolic(*cerr.stream(), NewTy, M) << " @ " << Offset << "!\n"
+<< "SubType: ";
+WriteTypeSymbolic(*cerr.stream(), SubType, M) << "\n\n");
 
   if (FoldIfIncompatible) foldNodeCompletely();
   return true;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAG.cpp updated: 1.376 -> 1.377
---
Log message:

Removed more  includes


---
Diffs of the changes:  (+1 -2)

 SelectionDAG.cpp |3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.376 
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.377
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.376Thu Dec  7 
14:04:42 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp  Thu Dec  7 14:28:15 2006
@@ -26,7 +26,6 @@
 #include "llvm/ADT/SetVector.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/StringExtras.h"
-#include 
 #include 
 #include 
 #include 
@@ -2887,7 +2886,7 @@
  dyn_cast(this)) {
 int offset = GADN->getOffset();
 cerr << "<";
-WriteAsOperand(std::cerr, GADN->getGlobal()) << ">";
+WriteAsOperand(*cerr.stream(), GADN->getGlobal()) << ">";
 if (offset > 0)
   cerr << " + " << offset;
 else



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/DwarfWriter.h

2006-12-07 Thread Bill Wendling


Changes in directory llvm/include/llvm/CodeGen:

DwarfWriter.h updated: 1.42 -> 1.43
---
Log message:

Removed more  includes


---
Diffs of the changes:  (+1 -1)

 DwarfWriter.h |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/DwarfWriter.h
diff -u llvm/include/llvm/CodeGen/DwarfWriter.h:1.42 
llvm/include/llvm/CodeGen/DwarfWriter.h:1.43
--- llvm/include/llvm/CodeGen/DwarfWriter.h:1.42Mon Oct 30 07:35:06 2006
+++ llvm/include/llvm/CodeGen/DwarfWriter.h Thu Dec  7 14:28:15 2006
@@ -20,7 +20,7 @@
 #ifndef LLVM_CODEGEN_DWARFWRITER_H
 #define LLVM_CODEGEN_DWARFWRITER_H
 
-#include 
+#include 
 
 namespace llvm {
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Analysis/AliasAnalysisCounter.cpp AliasAnalysisEvaluator.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/Analysis:

AliasAnalysisCounter.cpp updated: 1.18 -> 1.19
AliasAnalysisEvaluator.cpp updated: 1.31 -> 1.32
---
Log message:

Removed more  includes


---
Diffs of the changes:  (+6 -8)

 AliasAnalysisCounter.cpp   |7 +++
 AliasAnalysisEvaluator.cpp |7 +++
 2 files changed, 6 insertions(+), 8 deletions(-)


Index: llvm/lib/Analysis/AliasAnalysisCounter.cpp
diff -u llvm/lib/Analysis/AliasAnalysisCounter.cpp:1.18 
llvm/lib/Analysis/AliasAnalysisCounter.cpp:1.19
--- llvm/lib/Analysis/AliasAnalysisCounter.cpp:1.18 Wed Dec  6 19:30:31 2006
+++ llvm/lib/Analysis/AliasAnalysisCounter.cpp  Thu Dec  7 14:28:15 2006
@@ -18,7 +18,6 @@
 #include "llvm/Assembly/Writer.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Streams.h"
-#include 
 using namespace llvm;
 
 namespace {
@@ -131,9 +130,9 @@
   if (PrintAll || (PrintAllFailures && R == MayAlias)) {
 cerr << AliasString << ":\t";
 cerr << "[" << V1Size << "B] ";
-WriteAsOperand(std::cerr, V1, true, M) << ", ";
+WriteAsOperand(*cerr.stream(), V1, true, M) << ", ";
 cerr << "[" << V2Size << "B] ";
-WriteAsOperand(std::cerr, V2, true, M) << "\n";
+WriteAsOperand(*cerr.stream(), V2, true, M) << "\n";
   }
 
   return R;
@@ -155,7 +154,7 @@
   if (PrintAll || (PrintAllFailures && R == ModRef)) {
 cerr << MRString << ":  Ptr: ";
 cerr << "[" << Size << "B] ";
-WriteAsOperand(std::cerr, P, true, M);
+WriteAsOperand(*cerr.stream(), P, true, M);
 cerr << "\t<->" << *CS.getInstruction();
   }
   return R;


Index: llvm/lib/Analysis/AliasAnalysisEvaluator.cpp
diff -u llvm/lib/Analysis/AliasAnalysisEvaluator.cpp:1.31 
llvm/lib/Analysis/AliasAnalysisEvaluator.cpp:1.32
--- llvm/lib/Analysis/AliasAnalysisEvaluator.cpp:1.31   Wed Dec  6 19:30:31 2006
+++ llvm/lib/Analysis/AliasAnalysisEvaluator.cppThu Dec  7 14:28:15 2006
@@ -29,7 +29,6 @@
 #include "llvm/Support/InstIterator.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Streams.h"
-#include 
 #include 
 using namespace llvm;
 
@@ -80,8 +79,8 @@
 Module *M) {
   if (P) {
 cerr << "  " << Msg << ":\t";
-WriteAsOperand(std::cerr, V1, true, M) << ", ";
-WriteAsOperand(std::cerr, V2, true, M) << "\n";
+WriteAsOperand(*cerr.stream(), V1, true, M) << ", ";
+WriteAsOperand(*cerr.stream(), V2, true, M) << "\n";
   }
 }
 
@@ -90,7 +89,7 @@
Module *M) {
   if (P) {
 cerr << "  " << Msg << ":  Ptr: ";
-WriteAsOperand(std::cerr, Ptr, true, M);
+WriteAsOperand(*cerr.stream(), Ptr, true, M);
 cerr << "\t<->" << *I;
   }
 }



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Support/Statistic.cpp SystemUtils.cpp Timer.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/Support:

Statistic.cpp updated: 1.20 -> 1.21
SystemUtils.cpp updated: 1.47 -> 1.48
Timer.cpp updated: 1.47 -> 1.48
---
Log message:

Removed more  includes


---
Diffs of the changes:  (+11 -12)

 Statistic.cpp   |5 ++---
 SystemUtils.cpp |4 ++--
 Timer.cpp   |   14 +++---
 3 files changed, 11 insertions(+), 12 deletions(-)


Index: llvm/lib/Support/Statistic.cpp
diff -u llvm/lib/Support/Statistic.cpp:1.20 llvm/lib/Support/Statistic.cpp:1.21
--- llvm/lib/Support/Statistic.cpp:1.20 Wed Dec  6 12:20:44 2006
+++ llvm/lib/Support/Statistic.cpp  Thu Dec  7 14:28:15 2006
@@ -23,9 +23,8 @@
 
 #include "llvm/ADT/Statistic.h"
 #include "llvm/Support/CommandLine.h"
+#include "llvm/Support/Streams.h"
 #include "llvm/ADT/StringExtras.h"
-#include 
-#include 
 #include 
 using namespace llvm;
 
@@ -100,7 +99,7 @@
 // Free all accumulated statistics...
 delete AccumStats;
 AccumStats = 0;
-if (OutStream != &std::cerr && OutStream != &std::cout)
+if (OutStream != cerr.stream() && OutStream != cout.stream())
   delete OutStream;   // Close the file...
   }
 }


Index: llvm/lib/Support/SystemUtils.cpp
diff -u llvm/lib/Support/SystemUtils.cpp:1.47 
llvm/lib/Support/SystemUtils.cpp:1.48
--- llvm/lib/Support/SystemUtils.cpp:1.47   Wed Dec  6 19:30:31 2006
+++ llvm/lib/Support/SystemUtils.cppThu Dec  7 14:28:15 2006
@@ -16,12 +16,12 @@
 #include "llvm/Support/SystemUtils.h"
 #include "llvm/System/Process.h"
 #include "llvm/System/Program.h"
-#include 
 using namespace llvm;
 
 bool llvm::CheckBytecodeOutputToConsole(std::ostream* stream_to_check,
 bool print_warning) {
-  if (stream_to_check == &std::cout && sys::Process::StandardOutIsDisplayed()) 
{
+  if (stream_to_check == cout.stream() &&
+  sys::Process::StandardOutIsDisplayed()) {
 if (print_warning) {
   cerr << "WARNING: You're attempting to print out a bytecode file.\n"
<< "This is inadvisable as it may cause display problems. If\n"


Index: llvm/lib/Support/Timer.cpp
diff -u llvm/lib/Support/Timer.cpp:1.47 llvm/lib/Support/Timer.cpp:1.48
--- llvm/lib/Support/Timer.cpp:1.47 Wed Dec  6 11:46:32 2006
+++ llvm/lib/Support/Timer.cpp  Thu Dec  7 14:28:15 2006
@@ -14,11 +14,11 @@
 #include "llvm/Support/Timer.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/ManagedStatic.h"
+#include "llvm/Support/Streams.h"
 #include "llvm/System/Process.h"
 #include 
 #include 
 #include 
-#include 
 #include 
 using namespace llvm;
 
@@ -263,17 +263,17 @@
 llvm::GetLibSupportInfoOutputFile() {
   std::string &LibSupportInfoOutputFilename = 
getLibSupportInfoOutputFilename();
   if (LibSupportInfoOutputFilename.empty())
-return &std::cerr;
+return cerr.stream();
   if (LibSupportInfoOutputFilename == "-")
-return &std::cout;
+return cout.stream();
 
   std::ostream *Result = new 
std::ofstream(LibSupportInfoOutputFilename.c_str(),
std::ios::app);
   if (!Result->good()) {
-std::cerr << "Error opening info-output-file '"
-  << LibSupportInfoOutputFilename << " for appending!\n";
+cerr << "Error opening info-output-file '"
+ << LibSupportInfoOutputFilename << " for appending!\n";
 delete Result;
-return &std::cerr;
+return cerr.stream();
   }
   return Result;
 }
@@ -342,7 +342,7 @@
 
 TimersToPrint.clear();
 
-if (OutStream != &std::cerr && OutStream != &std::cout)
+if (OutStream != cerr.stream() && OutStream != cout.stream())
   delete OutStream;   // Close the file...
   }
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/Bytecode/Reader:

ReaderWrappers.cpp updated: 1.58 -> 1.59
---
Log message:

Removed more  includes


---
Diffs of the changes:  (+3 -5)

 ReaderWrappers.cpp |8 +++-
 1 files changed, 3 insertions(+), 5 deletions(-)


Index: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp
diff -u llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.58 
llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.59
--- llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.58Thu Oct 12 13:32:30 2006
+++ llvm/lib/Bytecode/Reader/ReaderWrappers.cpp Thu Dec  7 14:28:15 2006
@@ -21,9 +21,7 @@
 #include "llvm/System/MappedFile.h"
 #include "llvm/System/Program.h"
 #include 
-#include 
 #include 
-
 using namespace llvm;
 
 
//===--===//
@@ -164,9 +162,9 @@
   char Buffer[4096*4];
 
   // Read in all of the data from stdin, we cannot mmap stdin...
-  while (std::cin.good()) {
-std::cin.read(Buffer, 4096*4);
-int BlockSize = std::cin.gcount();
+  while (cin.stream()->good()) {
+cin.stream()->read(Buffer, 4096*4);
+int BlockSize = cin.stream()->gcount();
 if (0 >= BlockSize)
   break;
 FileData.insert(FileData.end(), Buffer, Buffer+BlockSize);



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Debugger/ProgramInfo.cpp SourceLanguage-Unknown.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/Debugger:

ProgramInfo.cpp updated: 1.19 -> 1.20
SourceLanguage-Unknown.cpp updated: 1.3 -> 1.4
---
Log message:

Removed more  includes


---
Diffs of the changes:  (+5 -7)

 ProgramInfo.cpp|6 ++
 SourceLanguage-Unknown.cpp |6 +++---
 2 files changed, 5 insertions(+), 7 deletions(-)


Index: llvm/lib/Debugger/ProgramInfo.cpp
diff -u llvm/lib/Debugger/ProgramInfo.cpp:1.19 
llvm/lib/Debugger/ProgramInfo.cpp:1.20
--- llvm/lib/Debugger/ProgramInfo.cpp:1.19  Thu Nov  2 14:25:49 2006
+++ llvm/lib/Debugger/ProgramInfo.cpp   Thu Dec  7 14:28:15 2006
@@ -23,8 +23,6 @@
 #include "llvm/Debugger/SourceLanguage.h"
 #include "llvm/Support/SlowOperationInformer.h"
 #include "llvm/ADT/STLExtras.h"
-#include 
-
 using namespace llvm;
 
 /// getGlobalVariablesUsing - Return all of the global variables which have the
@@ -181,8 +179,8 @@
 if (SD) { // We found the first stop point!
   // This is just a sanity check.
   if (getSourceFile().getDescriptor() != SD)
-std::cout << "WARNING: first line of function is not in the"
-  " file that the function descriptor claims it is in.\n";
+cout << "WARNING: first line of function is not in the"
+ << " file that the function descriptor claims it is 
in.\n";
   break;
 }
   }


Index: llvm/lib/Debugger/SourceLanguage-Unknown.cpp
diff -u llvm/lib/Debugger/SourceLanguage-Unknown.cpp:1.3 
llvm/lib/Debugger/SourceLanguage-Unknown.cpp:1.4
--- llvm/lib/Debugger/SourceLanguage-Unknown.cpp:1.3Thu Apr 21 17:36:21 2005
+++ llvm/lib/Debugger/SourceLanguage-Unknown.cppThu Dec  7 14:28:15 2006
@@ -15,7 +15,7 @@
 
 #include "llvm/Debugger/SourceLanguage.h"
 #include "llvm/Debugger/ProgramInfo.h"
-#include 
+#include "llvm/Support/Streams.h"
 #include 
 using namespace llvm;
 
@@ -131,7 +131,7 @@
   SourceFunctionInfo *Found = IP.first->second;
   ++IP.first;
   if (IP.first != IP.second)
-std::cout << "Whoa, found multiple functions with the same name.  I should"
-  << " ask the user which one to use: FIXME!\n";
+cout << "Whoa, found multiple functions with the same name.  I should"
+ << " ask the user which one to use: FIXME!\n";
   return Found;
 }



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/CodeGen/LLVMTargetMachine.cpp LiveVariables.cpp MachOWriter.cpp MachineBasicBlock.cpp MachineFunction.cpp RegAllocSimple.cpp TwoAddressInstructionPass.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/CodeGen:

LLVMTargetMachine.cpp updated: 1.6 -> 1.7
LiveVariables.cpp updated: 1.63 -> 1.64
MachOWriter.cpp updated: 1.7 -> 1.8
MachineBasicBlock.cpp updated: 1.35 -> 1.36
MachineFunction.cpp updated: 1.104 -> 1.105
RegAllocSimple.cpp updated: 1.78 -> 1.79
TwoAddressInstructionPass.cpp updated: 1.43 -> 1.44
---
Log message:

Removed more  includes


---
Diffs of the changes:  (+30 -38)

 LLVMTargetMachine.cpp |   21 ++---
 LiveVariables.cpp |   19 +--
 MachOWriter.cpp   |1 -
 MachineBasicBlock.cpp |3 +--
 MachineFunction.cpp   |   14 ++
 RegAllocSimple.cpp|3 +--
 TwoAddressInstructionPass.cpp |7 +++
 7 files changed, 30 insertions(+), 38 deletions(-)


Index: llvm/lib/CodeGen/LLVMTargetMachine.cpp
diff -u llvm/lib/CodeGen/LLVMTargetMachine.cpp:1.6 
llvm/lib/CodeGen/LLVMTargetMachine.cpp:1.7
--- llvm/lib/CodeGen/LLVMTargetMachine.cpp:1.6  Wed Nov 15 19:00:07 2006
+++ llvm/lib/CodeGen/LLVMTargetMachine.cpp  Thu Dec  7 14:28:15 2006
@@ -17,7 +17,6 @@
 #include "llvm/CodeGen/Passes.h"
 #include "llvm/Target/TargetOptions.h"
 #include "llvm/Transforms/Scalar.h"
-#include 
 using namespace llvm;
 
 bool LLVMTargetMachine::addPassesToEmitFile(FunctionPassManager &PM,
@@ -46,18 +45,18 @@
   
   // Print the instruction selected machine code...
   if (PrintMachineCode)
-PM.add(createMachineFunctionPrinterPass(&std::cerr));
+PM.add(createMachineFunctionPrinterPass(cerr.stream()));
   
   // Perform register allocation to convert to a concrete x86 representation
   PM.add(createRegisterAllocator());
   
   if (PrintMachineCode)
-PM.add(createMachineFunctionPrinterPass(&std::cerr));
+PM.add(createMachineFunctionPrinterPass(cerr.stream()));
   
   
   // Run post-ra passes.
   if (addPostRegAlloc(PM, Fast) && PrintMachineCode)
-PM.add(createMachineFunctionPrinterPass(&std::cerr));
+PM.add(createMachineFunctionPrinterPass(cerr.stream()));
   
   
   // Insert prolog/epilog code.  Eliminate abstract frame index references...
@@ -71,11 +70,11 @@
   PM.add(createDebugLabelFoldingPass());
   
   if (PrintMachineCode)  // Print the register-allocated code
-PM.add(createMachineFunctionPrinterPass(&std::cerr));
+PM.add(createMachineFunctionPrinterPass(cerr.stream()));
   
   
   if (addPreEmitPass(PM, Fast) && PrintMachineCode)
-PM.add(createMachineFunctionPrinterPass(&std::cerr));
+PM.add(createMachineFunctionPrinterPass(cerr.stream()));
   
   
   switch (FileType) {
@@ -127,32 +126,32 @@
   
   // Print the instruction selected machine code...
   if (PrintMachineCode)
-PM.add(createMachineFunctionPrinterPass(&std::cerr));
+PM.add(createMachineFunctionPrinterPass(cerr.stream()));
   
   // Perform register allocation to convert to a concrete x86 representation
   PM.add(createRegisterAllocator());
   
   if (PrintMachineCode)
-PM.add(createMachineFunctionPrinterPass(&std::cerr));
+PM.add(createMachineFunctionPrinterPass(cerr.stream()));
   
   
   // Run post-ra passes.
   if (addPostRegAlloc(PM, Fast) && PrintMachineCode)
-PM.add(createMachineFunctionPrinterPass(&std::cerr));
+PM.add(createMachineFunctionPrinterPass(cerr.stream()));
   
   
   // Insert prolog/epilog code.  Eliminate abstract frame index references...
   PM.add(createPrologEpilogCodeInserter());
   
   if (PrintMachineCode)  // Print the register-allocated code
-PM.add(createMachineFunctionPrinterPass(&std::cerr));
+PM.add(createMachineFunctionPrinterPass(cerr.stream()));
   
   // Branch folding must be run after regalloc and prolog/epilog insertion.
   if (!Fast)
 PM.add(createBranchFoldingPass());
   
   if (addPreEmitPass(PM, Fast) && PrintMachineCode)
-PM.add(createMachineFunctionPrinterPass(&std::cerr));
+PM.add(createMachineFunctionPrinterPass(cerr.stream()));
   
   
   addCodeEmitter(PM, Fast, MCE);


Index: llvm/lib/CodeGen/LiveVariables.cpp
diff -u llvm/lib/CodeGen/LiveVariables.cpp:1.63 
llvm/lib/CodeGen/LiveVariables.cpp:1.64
--- llvm/lib/CodeGen/LiveVariables.cpp:1.63 Wed Nov 15 14:51:59 2006
+++ llvm/lib/CodeGen/LiveVariables.cpp  Thu Dec  7 14:28:15 2006
@@ -35,27 +35,26 @@
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Config/alloca.h"
 #include 
-#include 
 using namespace llvm;
 
 static RegisterPass X("livevars", "Live Variable Analysis");
 
 void LiveVariables::VarInfo::dump() const {
-  std::cerr << "Register Defined by: ";
+  cerr << "Register Defined by: ";
   if (DefInst) 
-std::cerr << *DefInst;
+cerr << *DefInst;
   else
-std::cerr << "\n";
-  std::cerr << "  Alive in blocks: ";
+cerr << "\n";
+  cerr << "  Alive in blocks: ";
   for (unsigned i = 0, e = AliveBlocks.size(); i != e; ++i)
-if (AliveBlocks[i]) std::cerr << i << ", ";
-  std::cerr << "\n  Killed by:";
+if (AliveBlocks[i]) cerr << i << ", ";
+  cerr << "\n  Killed by:";
   if (Kills.empty())
-std

[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.44 -> 1.45
---
Log message:

Add ImmutablePass into the list of info  managed by top level pass
manager.


---
Diffs of the changes:  (+13 -0)

 PassManager.cpp |   13 +
 1 files changed, 13 insertions(+)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.44 
llvm/lib/VMCore/PassManager.cpp:1.45
--- llvm/lib/VMCore/PassManager.cpp:1.44Thu Dec  7 14:03:49 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 14:51:18 2006
@@ -122,6 +122,16 @@
 PassManagers.clear();
   }
 
+  /// Add immutable pass and initialize it.
+  inline void addImmutablePass(ImmutablePass *P) {
+P->initializePass();
+ImmutablePasses.push_back(P);
+  }
+
+  inline std::vector& getImmutablePasses() {
+return ImmutablePasses;
+  }
+
 private:
   
   /// Collection of pass managers
@@ -130,6 +140,9 @@
   // Map to keep track of last user of the analysis pass.
   // LastUser->second is the last user of Lastuser->first.
   std::map LastUser;
+
+  /// Immutable passes are managed by top level manager.
+  std::vector ImmutablePasses;
 };
   
 /// Set pass P as the last user of the given analysis passes.



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.45 -> 1.46
---
Log message:

While initializing AvailableAnalysis info, make ImmutablePasses available
immediately.


---
Diffs of the changes:  (+6 -0)

 PassManager.cpp |6 ++
 1 files changed, 6 insertions(+)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.45 
llvm/lib/VMCore/PassManager.cpp:1.46
--- llvm/lib/VMCore/PassManager.cpp:1.45Thu Dec  7 14:51:18 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 15:02:08 2006
@@ -218,6 +218,12 @@
   void initializeAnalysisInfo() { 
 AvailableAnalysis.clear();
 LastUser.clear();
+
+// Include immutable passes into AvailableAnalysis vector.
+std::vector &ImmutablePasses =  TPM->getImmutablePasses();
+for (std::vector::iterator I = ImmutablePasses.begin(),
+   E = ImmutablePasses.end(); I != E; ++I) 
+  recordAvailableAnalysis(*I);
   }
 
   // All Required analyses should be available to the pass as it runs!  Here



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.46 -> 1.47
---
Log message:

Reimplement schedulePass interface. Move it into PMTopLevelManager.


---
Diffs of the changes:  (+28 -51)

 PassManager.cpp |   79 +++-
 1 files changed, 28 insertions(+), 51 deletions(-)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.46 
llvm/lib/VMCore/PassManager.cpp:1.47
--- llvm/lib/VMCore/PassManager.cpp:1.46Thu Dec  7 15:02:08 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 15:10:57 2006
@@ -173,6 +173,33 @@
 LastUses.push_back(LUI->first);
 }
 
+/// Schedule pass P for execution. Make sure that passes required by
+/// P are run before P is run. Update analysis info maintained by
+/// the manager. Remove dead passes. This is a recursive function.
+void PMTopLevelManager::schedulePass(Pass *P, Pass *PM) {
+
+  // TODO : Allocate function manager for this pass, other wise required set
+  // may be inserted into previous function manager
+
+  AnalysisUsage AnUsage;
+  P->getAnalysisUsage(AnUsage);
+  const std::vector &RequiredSet = AnUsage.getRequiredSet();
+  for (std::vector::const_iterator I = RequiredSet.begin(),
+ E = RequiredSet.end(); I != E; ++I) {
+
+Pass *AnalysisPass = NULL; // FIXME PM->getAnalysisPass(*I, true);
+if (!AnalysisPass) {
+  // Schedule this analysis run first.
+  AnalysisPass = (*I)->createPass();
+  schedulePass(AnalysisPass, PM);
+}
+  }
+
+  // Now all required passes are available.
+  addTopLevelPass(P);
+}
+
+
 
//===--===//
 // PMDataManager
 
@@ -399,18 +426,9 @@
 
 private:
 
-  /// Add a pass into a passmanager queue. This is used by schedulePasses
+  /// Add a pass into a passmanager queue.
   bool addPass(Pass *p);
 
-  /// Schedule pass P for execution. Make sure that passes required by
-  /// P are run before P is run. Update analysis info maintained by
-  /// the manager. Remove dead passes. This is a recursive function.
-  void schedulePass(Pass *P);
-
-  /// Schedule all passes collected in pass queue using add(). Add all the
-  /// schedule passes into various manager's queue using addPass().
-  void schedulePasses();
-
   // Collection of pass managers
   std::vector PassManagers;
 
@@ -842,46 +860,6 @@
   return P;
 }
 
-/// Schedule pass P for execution. Make sure that passes required by
-/// P are run before P is run. Update analysis info maintained by
-/// the manager. Remove dead passes. This is a recursive function.
-void PassManagerImpl_New::schedulePass(Pass *P) {
-
-  AnalysisUsage AnUsage;
-  P->getAnalysisUsage(AnUsage);
-  const std::vector &RequiredSet = AnUsage.getRequiredSet();
-  for (std::vector::const_iterator I = RequiredSet.begin(),
- E = RequiredSet.end(); I != E; ++I) {
-
-Pass *AnalysisPass = getAnalysisPassFromManager(*I);
-if (!AnalysisPass) {
-  // Schedule this analysis run first.
-  AnalysisPass = (*I)->createPass();
-  schedulePass(AnalysisPass);
-}
-setLastUser (AnalysisPass, P);
-
-// Prolong live range of analyses that are needed after an analysis pass
-// is destroyed, for querying by subsequent passes
-const std::vector &IDs = AnUsage.getRequiredTransitiveSet();
-for (std::vector::const_iterator I = IDs.begin(),
-   E = IDs.end(); I != E; ++I) {
-  Pass *AP = getAnalysisPassFromManager(*I);
-  assert (AP && "Analysis pass is not available");
-  setLastUser(AP, P);
-}
-  }
-  addPass(P);
-}
-
-/// Schedule all passes from the queue by adding them in their
-/// respective manager's queue. 
-void PassManagerImpl_New::schedulePasses() {
-  for (std::vector::iterator I = passVectorBegin(),
- E = passVectorEnd(); I != E; ++I)
-schedulePass (*I);
-}
-
 /// Add pass P to the queue of passes to run.
 void PassManagerImpl_New::add(Pass *P) {
   // Do not process Analysis now. Analysis is process while scheduling
@@ -906,7 +884,6 @@
 /// whether any of the passes modifies the module, and if so, return true.
 bool PassManagerImpl_New::run(Module &M) {
 
-  schedulePasses();
   bool Changed = false;
   for (std::vector::iterator itr = 
PassManagers.begin(),
  e = PassManagers.end(); itr != e; ++itr) {



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp LegalizeDAG.cpp ScheduleDAG.cpp ScheduleDAGList.cpp ScheduleDAGRRList.cpp ScheduleDAGSimple.cpp SelectionDAG.cpp SelectionDAGISel.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/CodeGen/SelectionDAG:

DAGCombiner.cpp updated: 1.256 -> 1.257
LegalizeDAG.cpp updated: 1.421 -> 1.422
ScheduleDAG.cpp updated: 1.111 -> 1.112
ScheduleDAGList.cpp updated: 1.69 -> 1.70
ScheduleDAGRRList.cpp updated: 1.22 -> 1.23
ScheduleDAGSimple.cpp updated: 1.19 -> 1.20
SelectionDAG.cpp updated: 1.375 -> 1.376
SelectionDAGISel.cpp updated: 1.324 -> 1.325
SelectionDAGPrinter.cpp updated: 1.44 -> 1.45
---
Log message:

Removing even more  includes.


---
Diffs of the changes:  (+144 -155)

 DAGCombiner.cpp |   32 -
 LegalizeDAG.cpp |9 ++---
 ScheduleDAG.cpp |   48 --
 ScheduleDAGList.cpp |   17 -
 ScheduleDAGRRList.cpp   |   31 -
 ScheduleDAGSimple.cpp   |   30 +++-
 SelectionDAG.cpp|   86 
 SelectionDAGISel.cpp|   25 ++---
 SelectionDAGPrinter.cpp |   21 +--
 9 files changed, 144 insertions(+), 155 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.256 
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.257
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.256 Wed Dec  6 11:46:32 2006
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp   Thu Dec  7 14:04:42 2006
@@ -38,8 +38,6 @@
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/CommandLine.h"
 #include 
-#include 
-#include 
 using namespace llvm;
 
 namespace {
@@ -101,9 +99,9 @@
 bool AddTo = true) {
   assert(N->getNumValues() == NumTo && "Broken CombineTo call!");
   ++NodesCombined;
-  DEBUG(std::cerr << "\nReplacing.1 "; N->dump();
-std::cerr << "\nWith: "; To[0].Val->dump(&DAG);
-std::cerr << " and " << NumTo-1 << " other values\n");
+  DOUT << "\nReplacing.1 "; DEBUG(N->dump());
+  DOUT << "\nWith: "; DEBUG(To[0].Val->dump(&DAG));
+  DOUT << " and " << NumTo-1 << " other values\n";
   std::vector NowDead;
   DAG.ReplaceAllUsesWith(N, To, &NowDead);
   
@@ -152,9 +150,9 @@
   
   // Replace the old value with the new one.
   ++NodesCombined;
-  DEBUG(std::cerr << "\nReplacing.2 "; TLO.Old.Val->dump();
-std::cerr << "\nWith: "; TLO.New.Val->dump(&DAG);
-std::cerr << '\n');
+  DOUT << "\nReplacing.2 "; DEBUG(TLO.Old.Val->dump());
+  DOUT << "\nWith: "; DEBUG(TLO.New.Val->dump(&DAG));
+  DOUT << '\n';
 
   std::vector NowDead;
   DAG.ReplaceAllUsesOfValueWith(TLO.Old, TLO.New, NowDead);
@@ -455,9 +453,9 @@
RV.Val->getOpcode() != ISD::DELETED_NODE &&
"Node was deleted but visit returned new node!");
 
-DEBUG(std::cerr << "\nReplacing.3 "; N->dump();
-  std::cerr << "\nWith: "; RV.Val->dump(&DAG);
-  std::cerr << '\n');
+DOUT << "\nReplacing.3 "; DEBUG(N->dump());
+DOUT << "\nWith: "; DEBUG(RV.Val->dump(&DAG));
+DOUT << '\n';
 std::vector NowDead;
 if (N->getNumValues() == RV.Val->getNumValues())
   DAG.ReplaceAllUsesWith(N, RV.Val, &NowDead);
@@ -2801,9 +2799,9 @@
 Result = DAG.getIndexedStore(SDOperand(N,0), BasePtr, Offset, AM);
   ++PreIndexedNodes;
   ++NodesCombined;
-  DEBUG(std::cerr << "\nReplacing.4 "; N->dump();
-std::cerr << "\nWith: "; Result.Val->dump(&DAG);
-std::cerr << '\n');
+  DOUT << "\nReplacing.4 "; DEBUG(N->dump());
+  DOUT << "\nWith: "; DEBUG(Result.Val->dump(&DAG));
+  DOUT << '\n';
   std::vector NowDead;
   if (isLoad) {
 DAG.ReplaceAllUsesOfValueWith(SDOperand(N, 0), Result.getValue(0),
@@ -2924,9 +2922,9 @@
   : DAG.getIndexedStore(SDOperand(N,0), BasePtr, Offset, AM);
 ++PostIndexedNodes;
 ++NodesCombined;
-DEBUG(std::cerr << "\nReplacing.5 "; N->dump();
-  std::cerr << "\nWith: "; Result.Val->dump(&DAG);
-  std::cerr << '\n');
+DOUT << "\nReplacing.5 "; DEBUG(N->dump());
+DOUT << "\nWith: "; DEBUG(Result.Val->dump(&DAG));
+DOUT << '\n';
 std::vector NowDead;
 if (isLoad) {
   DAG.ReplaceAllUsesOfValueWith(SDOperand(N, 0), Result.getValue(0),


Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.421 
llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.422
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.421 Wed Nov 29 13:13:47 2006
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp   Thu Dec  7 14:04:42 2006
@@ -24,7 +24,6 @@
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/ADT/SmallVector.h"
-#include 
 #include 
 using namespace llvm;
 
@@ -556,7 +555,7 @@
 }
 // Otherwise this is an unhandled builtin node.  splat.
 #ifndef NDEBUG
-std::cerr << "NODE: "; Node->dump(); std::cerr << "\n";
+cerr << "NODE: "; Node->dump(); cerr << "\n";
 

[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.48 -> 1.49
---
Log message:

Top level manages schedule the pass immediately at the time of insertion.


---
Diffs of the changes:  (+8 -10)

 PassManager.cpp |   18 --
 1 files changed, 8 insertions(+), 10 deletions(-)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.48 
llvm/lib/VMCore/PassManager.cpp:1.49
--- llvm/lib/VMCore/PassManager.cpp:1.48Thu Dec  7 15:27:23 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 15:32:57 2006
@@ -346,7 +346,9 @@
   /// PassManager_X is destroyed, the pass will be destroyed as well, so
   /// there is no need to delete the pass. (TODO delete passes.)
   /// This implies that all passes MUST be allocated with 'new'.
-  void add(Pass *P) { /* TODO*/  }
+  void add(Pass *P) { 
+schedulePass(P, this);
+  }
 
   /// Add pass into the pass manager queue.
   bool addPass(Pass *P);
@@ -407,7 +409,8 @@
 };
 
 /// PassManager_New manages ModulePassManagers
-class PassManagerImpl_New : public PMDataManager,
+class PassManagerImpl_New : public Pass,
+public PMDataManager,
 public PMTopLevelManager {
 
 public:
@@ -416,7 +419,9 @@
   /// the Pass to the PassManager.  When the PassManager is destroyed, the pass
   /// will be destroyed as well, so there is no need to delete the pass.  This
   /// implies that all passes MUST be allocated with 'new'.
-  void add(Pass *P);
+  void add(Pass *P) {
+schedulePass(P, this);
+  }
  
   /// run - Execute all of the passes scheduled for execution.  Keep track of
   /// whether any of the passes modifies the module, and if so, return true.
@@ -870,13 +875,6 @@
   return P;
 }
 
-/// Add pass P to the queue of passes to run.
-void PassManagerImpl_New::add(Pass *P) {
-  // Do not process Analysis now. Analysis is process while scheduling
-  // the pass vector.
-  addPassToManager(P, false);
-}
-
 // PassManager_New implementation
 /// Add P into active pass manager or use new module pass manager to
 /// manage it.



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.47 -> 1.48
---
Log message:

Now FunctionPassManagerImpl_New and PassManagerImpl_New derives from
PMTopLevelManager.


---
Diffs of the changes:  (+13 -3)

 PassManager.cpp |   16 +---
 1 files changed, 13 insertions(+), 3 deletions(-)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.47 
llvm/lib/VMCore/PassManager.cpp:1.48
--- llvm/lib/VMCore/PassManager.cpp:1.47Thu Dec  7 15:10:57 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 15:27:23 2006
@@ -327,8 +327,9 @@
 /// It batches all function passes and basic block pass managers together and
 /// sequence them to process one function at a time before processing next
 /// function.
-class FunctionPassManagerImpl_New : public PMDataManager,
-public ModulePass {
+class FunctionPassManagerImpl_New : public ModulePass, 
+public PMDataManager,
+public PMTopLevelManager {
 public:
   FunctionPassManagerImpl_New(ModuleProvider *P) { /* TODO */ }
   FunctionPassManagerImpl_New() { 
@@ -336,6 +337,10 @@
   }
   ~FunctionPassManagerImpl_New() { /* TODO */ };
  
+  inline void addTopLevelPass(Pass *P) { 
+addPass(P);
+  }
+
   /// add - Add a pass to the queue of passes to run.  This passes
   /// ownership of the Pass to the PassManager.  When the
   /// PassManager_X is destroyed, the pass will be destroyed as well, so
@@ -402,7 +407,8 @@
 };
 
 /// PassManager_New manages ModulePassManagers
-class PassManagerImpl_New : public PMDataManager {
+class PassManagerImpl_New : public PMDataManager,
+public PMTopLevelManager {
 
 public:
 
@@ -424,6 +430,10 @@
 Info.setPreservesAll();
   }
 
+  inline void addTopLevelPass(Pass *P) {
+addPass(P);
+  }
+
 private:
 
   /// Add a pass into a passmanager queue.



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.49 -> 1.50
---
Log message:

Fix thinko.


---
Diffs of the changes:  (+2 -2)

 PassManager.cpp |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.49 
llvm/lib/VMCore/PassManager.cpp:1.50
--- llvm/lib/VMCore/PassManager.cpp:1.49Thu Dec  7 15:32:57 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 15:44:12 2006
@@ -883,9 +883,9 @@
   if (!activeManager || !activeManager->addPass(P)) {
 activeManager = new ModulePassManager_New();
 PassManagers.push_back(activeManager);
+return activeManager->addPass(P);
   }
-
-  return activeManager->addPass(P);
+  return true;
 }
 
 /// run - Execute all of the passes scheduled for execution.  Keep track of



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.50 -> 1.51
---
Log message:

Add TODOs


---
Diffs of the changes:  (+15 -3)

 PassManager.cpp |   18 +++---
 1 files changed, 15 insertions(+), 3 deletions(-)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.50 
llvm/lib/VMCore/PassManager.cpp:1.51
--- llvm/lib/VMCore/PassManager.cpp:1.50Thu Dec  7 15:44:12 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 15:58:50 2006
@@ -313,6 +313,7 @@
   bool runOnFunction(Function &F);
 
   /// Return true IFF AnalysisID AID is currently available.
+  /// TODO : Replace this method with getAnalysisPass()
   Pass *getAnalysisPassFromManager(AnalysisID AID);
 
   /// Pass Manager itself does not invalidate any analysis info.
@@ -360,6 +361,7 @@
   bool runOnFunction(Function &F);
 
   /// Return true IFF AnalysisID AID is currently available.
+  /// TODO : Replace this method with getAnalysisPass()
   Pass *getAnalysisPassFromManager(AnalysisID AID);
 
   /// doInitialization - Run all of the initializers for the function passes.
@@ -396,6 +398,7 @@
   bool runOnModule(Module &M);
 
   /// Return true IFF AnalysisID AID is currently available.
+  /// TODO : Replace this method with getAnalysisPass()
   Pass *getAnalysisPassFromManager(AnalysisID AID);
 
   /// Pass Manager itself does not invalidate any analysis info.
@@ -428,6 +431,7 @@
   bool run(Module &M);
 
   /// Return true IFF AnalysisID AID is currently available.
+  /// TODO : Replace this method with getAnalysisPass()
   Pass *getAnalysisPassFromManager(AnalysisID AID);
 
   /// Pass Manager itself does not invalidate any analysis info.
@@ -606,6 +610,7 @@
 }
 
 /// Return true IFF AnalysisID AID is currently available.
+/// TODO : Replace this method with getAnalysisPass()
 Pass * BasicBlockPassManager_New::getAnalysisPassFromManager(AnalysisID AID) {
   return getAnalysisPass(AID);
 }
@@ -675,6 +680,8 @@
 if (!activeBBPassManager
 || !activeBBPassManager->addPass(BP)) {
 
+  // TODO : intialize AvailableAnalysis info
+
   activeBBPassManager = new BasicBlockPassManager_New();
   addPassToManager(activeBBPassManager, false);
   if (!activeBBPassManager->addPass(BP))
@@ -693,6 +700,7 @@
 return false;
 
   addPassToManager (FP);
+  // TODO : intialize AvailableAnalysis info
   activeBBPassManager = NULL;
   return true;
 }
@@ -742,6 +750,7 @@
 
 
 /// Return true IFF AnalysisID AID is currently available.
+/// TODO : Replace this method with getAnalysisPass()
 Pass *FunctionPassManagerImpl_New::getAnalysisPassFromManager(AnalysisID AID) {
 
   Pass *P = getAnalysisPass(AID);
@@ -797,11 +806,12 @@
   // If P is FunctionPass then use function pass maanager.
   if (FunctionPass *FP = dynamic_cast(P)) {
 
-activeFunctionPassManager = NULL;
-
 if (!activeFunctionPassManager
 || !activeFunctionPassManager->addPass(P)) {
 
+  // TODO : intialize AvailableAnalysis info
+  activeFunctionPassManager = NULL;
+
   activeFunctionPassManager = new FunctionPassManagerImpl_New();
   addPassToManager(activeFunctionPassManager, false);
   if (!activeFunctionPassManager->addPass(FP))
@@ -820,6 +830,7 @@
 return false;
 
   addPassToManager(MP);
+  // TODO : intialize AvailableAnalysis info
   activeFunctionPassManager = NULL;
   return true;
 }
@@ -847,9 +858,9 @@
 }
 
 /// Return true IFF AnalysisID AID is currently available.
+/// TODO : Replace this method with getAnalysisPass()
 Pass *ModulePassManager_New::getAnalysisPassFromManager(AnalysisID AID) {
 
-  
   Pass *P = getAnalysisPass(AID);
   if (P)
 return P;
@@ -866,6 +877,7 @@
 // PassManagerImpl implementation
 
 /// Return true IFF AnalysisID AID is currently available.
+/// TODO : Replace this method with getAnalysisPass()
 Pass *PassManagerImpl_New::getAnalysisPassFromManager(AnalysisID AID) {
 
   Pass *P = NULL;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/Regression/CodeGen/PowerPC/2006-12-07-LargeAlloca.ll

2006-12-07 Thread Chris Lattner


Changes in directory llvm/test/Regression/CodeGen/PowerPC:

2006-12-07-LargeAlloca.ll added (r1.1)
---
Log message:

new testcase


---
Diffs of the changes:  (+26 -0)

 2006-12-07-LargeAlloca.ll |   26 ++
 1 files changed, 26 insertions(+)


Index: llvm/test/Regression/CodeGen/PowerPC/2006-12-07-LargeAlloca.ll
diff -c /dev/null 
llvm/test/Regression/CodeGen/PowerPC/2006-12-07-LargeAlloca.ll:1.1
*** /dev/null   Thu Dec  7 16:15:30 2006
--- llvm/test/Regression/CodeGen/PowerPC/2006-12-07-LargeAlloca.ll  Thu Dec 
 7 16:15:20 2006
***
*** 0 
--- 1,26 
+ ; RUN: llvm-as < %s | llc -march=ppc64 &&
+ ; RUN: llvm-as < %s | llc -march=ppc32 &&
+ ; RUN: llvm-as < %s | llc 
+ 
+ void %bitap() {
+ entry:
+   %RMask.i = alloca [256 x uint], align 16; <[256 x 
uint]*> [#uses=1]
+   %buffer = alloca [147456 x sbyte], align 16 ; <[147456 x 
sbyte]*> [#uses=0]
+   br bool false, label %bb19, label %bb.preheader
+ 
+ bb.preheader: ; preds = %entry
+   ret void
+ 
+ bb19: ; preds = %entry
+   br bool false, label %bb12.i, label %cond_next39
+ 
+ bb12.i:   ; preds = %bb12.i, %bb19
+   %i.0.i = phi uint [ %tmp11.i, %bb12.i ], [ 0, %bb19 ]   ; 
 [#uses=2]
+   %tmp9.i = getelementptr [256 x uint]* %RMask.i, int 0, uint %i.0.i  
;  [#uses=1]
+   store uint 0, uint* %tmp9.i
+   %tmp11.i = add uint %i.0.i, 1   ;  [#uses=1]
+   br label %bb12.i
+ 
+ cond_next39:  ; preds = %bb19
+   ret void
+ }



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.51 -> 1.52
---
Log message:

Make current pass info available _after_ removing info that is not
preserved.


---
Diffs of the changes:  (+7 -8)

 PassManager.cpp |   15 +++
 1 files changed, 7 insertions(+), 8 deletions(-)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.51 
llvm/lib/VMCore/PassManager.cpp:1.52
--- llvm/lib/VMCore/PassManager.cpp:1.51Thu Dec  7 15:58:50 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 16:09:36 2006
@@ -533,12 +533,11 @@
  bool ProcessAnalysis) {
 
   if (ProcessAnalysis) {
-// Take a note of analysis required and made available by this pass
-initializeAnalysisImpl(P);
-recordAvailableAnalysis(P);
-
+// Take a note of analysis required and made available by this pass.
 // Remove the analysis not preserved by this pass
+initializeAnalysisImpl(P);
 removeNotPreservedAnalysis(P);
+recordAvailableAnalysis(P);
   }
 
   // Add pass
@@ -600,10 +599,10 @@
e = passVectorEnd(); itr != e; ++itr) {
   Pass *P = *itr;
   
-  recordAvailableAnalysis(P);
   BasicBlockPass *BP = dynamic_cast(P);
   Changed |= BP->runOnBasicBlock(*I);
   removeNotPreservedAnalysis(P);
+  recordAvailableAnalysis(P);
   removeDeadPasses(P);
 }
   return Changed;
@@ -718,10 +717,10 @@
e = passVectorEnd(); itr != e; ++itr) {
   Pass *P = *itr;
   
-  recordAvailableAnalysis(P);
   FunctionPass *FP = dynamic_cast(P);
   Changed |= FP->runOnFunction(*I);
   removeNotPreservedAnalysis(P);
+  recordAvailableAnalysis(P);
   removeDeadPasses(P);
 }
   return Changed;
@@ -739,10 +738,10 @@
  e = passVectorEnd(); itr != e; ++itr) {
 Pass *P = *itr;
 
-recordAvailableAnalysis(P);
 FunctionPass *FP = dynamic_cast(P);
 Changed |= FP->runOnFunction(F);
 removeNotPreservedAnalysis(P);
+recordAvailableAnalysis(P);
 removeDeadPasses(P);
   }
   return Changed;
@@ -848,10 +847,10 @@
  e = passVectorEnd(); itr != e; ++itr) {
 Pass *P = *itr;
 
-recordAvailableAnalysis(P);
 ModulePass *MP = dynamic_cast(P);
 Changed |= MP->runOnModule(M);
 removeNotPreservedAnalysis(P);
+recordAvailableAnalysis(P);
 removeDeadPasses(P);
   }
   return Changed;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/SubtargetFeature.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/Target:

SubtargetFeature.cpp updated: 1.10 -> 1.11
---
Log message:

What should be the last unnecessary s in the library.


---
Diffs of the changes:  (+26 -26)

 SubtargetFeature.cpp |   52 +--
 1 files changed, 26 insertions(+), 26 deletions(-)


Index: llvm/lib/Target/SubtargetFeature.cpp
diff -u llvm/lib/Target/SubtargetFeature.cpp:1.10 
llvm/lib/Target/SubtargetFeature.cpp:1.11
--- llvm/lib/Target/SubtargetFeature.cpp:1.10   Fri Mar 24 04:00:56 2006
+++ llvm/lib/Target/SubtargetFeature.cppThu Dec  7 16:21:48 2006
@@ -13,10 +13,10 @@
 
 #include "llvm/Target/SubtargetFeature.h"
 #include "llvm/ADT/StringExtras.h"
+#include "llvm/Support/Streams.h"
 #include 
 #include 
 #include 
-#include 
 using namespace llvm;
 
 
//===--===//
@@ -144,23 +144,23 @@
   unsigned MaxFeatLen = getLongestEntryLength(FeatTable, FeatTableSize);
 
   // Print the CPU table.
-  std::cerr << "Available CPUs for this target:\n\n";
+  cerr << "Available CPUs for this target:\n\n";
   for (size_t i = 0; i != CPUTableSize; i++)
-std::cerr << "  " << CPUTable[i].Key
-  << std::string(MaxCPULen - std::strlen(CPUTable[i].Key), ' ')
-  << " - " << CPUTable[i].Desc << ".\n";
-  std::cerr << "\n";
+cerr << "  " << CPUTable[i].Key
+ << std::string(MaxCPULen - std::strlen(CPUTable[i].Key), ' ')
+ << " - " << CPUTable[i].Desc << ".\n";
+  cerr << "\n";
   
   // Print the Feature table.
-  std::cerr << "Available features for this target:\n\n";
+  cerr << "Available features for this target:\n\n";
   for (size_t i = 0; i != FeatTableSize; i++)
-std::cerr << "  " << FeatTable[i].Key
-  << std::string(MaxFeatLen - std::strlen(FeatTable[i].Key), ' ')
-  << " - " << FeatTable[i].Desc << ".\n";
-  std::cerr << "\n";
+cerr << "  " << FeatTable[i].Key
+ << std::string(MaxFeatLen - std::strlen(FeatTable[i].Key), ' ')
+ << " - " << FeatTable[i].Desc << ".\n";
+  cerr << "\n";
   
-  std::cerr << "Use +feature to enable a feature, or -feature to disable it.\n"
-<< "For example, llc -mcpu=mycpu -mattr=+feature1,-feature2\n";
+  cerr << "Use +feature to enable a feature, or -feature to disable it.\n"
+   << "For example, llc -mcpu=mycpu -mattr=+feature1,-feature2\n";
   exit(1);
 }
 
@@ -231,10 +231,10 @@
 // Set base feature bits
 Bits = CPUEntry->Value;
   } else {
-std::cerr << "'" << Features[0]
-  << "' is not a recognized processor for this target"
-  << " (ignoring processor)"
-  << "\n";
+cerr << "'" << Features[0]
+ << "' is not a recognized processor for this target"
+ << " (ignoring processor)"
+ << "\n";
   }
   // Iterate through each feature
   for (size_t i = 1; i < Features.size(); i++) {
@@ -253,10 +253,10 @@
   if (isEnabled(Feature)) Bits |=  FeatureEntry->Value;
   elseBits &= ~FeatureEntry->Value;
 } else {
-  std::cerr << "'" << Feature
-<< "' is not a recognized feature for this target"
-<< " (ignoring feature)"
-<< "\n";
+  cerr << "'" << Feature
+   << "' is not a recognized feature for this target"
+   << " (ignoring feature)"
+   << "\n";
 }
   }
   return Bits;
@@ -278,10 +278,10 @@
   if (Entry) {
 return Entry->Value;
   } else {
-std::cerr << "'" << Features[0]
-  << "' is not a recognized processor for this target"
-  << " (ignoring processor)"
-  << "\n";
+cerr << "'" << Features[0]
+ << "' is not a recognized processor for this target"
+ << " (ignoring processor)"
+ << "\n";
 return NULL;
   }
 }
@@ -298,5 +298,5 @@
 /// dump - Dump feature info.
 ///
 void SubtargetFeatures::dump() const {
-  print(std::cerr);
+  print(*cerr.stream());
 }



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/Sparc/FPMover.cpp SparcAsmPrinter.cpp SparcISelDAGToDAG.cpp SparcRegisterInfo.cpp SparcTargetMachine.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/Target/Sparc:

FPMover.cpp updated: 1.16 -> 1.17
SparcAsmPrinter.cpp updated: 1.73 -> 1.74
SparcISelDAGToDAG.cpp updated: 1.115 -> 1.116
SparcRegisterInfo.cpp updated: 1.48 -> 1.49
SparcTargetMachine.cpp updated: 1.51 -> 1.52
---
Log message:

What should be the last unnecessary s in the library.


---
Diffs of the changes:  (+5 -10)

 FPMover.cpp|5 ++---
 SparcAsmPrinter.cpp|7 +++
 SparcISelDAGToDAG.cpp  |1 -
 SparcRegisterInfo.cpp  |1 -
 SparcTargetMachine.cpp |1 -
 5 files changed, 5 insertions(+), 10 deletions(-)


Index: llvm/lib/Target/Sparc/FPMover.cpp
diff -u llvm/lib/Target/Sparc/FPMover.cpp:1.16 
llvm/lib/Target/Sparc/FPMover.cpp:1.17
--- llvm/lib/Target/Sparc/FPMover.cpp:1.16  Wed Dec  6 11:46:32 2006
+++ llvm/lib/Target/Sparc/FPMover.cpp   Thu Dec  7 16:21:48 2006
@@ -19,7 +19,6 @@
 #include "llvm/Target/TargetInstrInfo.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/Support/Debug.h"
-#include 
 using namespace llvm;
 
 namespace {
@@ -108,12 +107,12 @@
 
   MI->getOperand(0).setReg(EvenDestReg);
   MI->getOperand(1).setReg(EvenSrcReg);
-  DEBUG(std::cerr << "FPMover: the modified instr is: " << *MI);
+  DOUT << "FPMover: the modified instr is: " << *MI;
   // Insert copy for the other half of the double.
   if (DestDReg != SrcDReg) {
 MI = BuildMI(MBB, I, TM.getInstrInfo()->get(SP::FMOVS), OddDestReg)
   .addReg(OddSrcReg);
-DEBUG(std::cerr << "FPMover: the inserted instr is: " << *MI);
+DOUT << "FPMover: the inserted instr is: " << *MI;
   }
   ++NumFpDs;
 }


Index: llvm/lib/Target/Sparc/SparcAsmPrinter.cpp
diff -u llvm/lib/Target/Sparc/SparcAsmPrinter.cpp:1.73 
llvm/lib/Target/Sparc/SparcAsmPrinter.cpp:1.74
--- llvm/lib/Target/Sparc/SparcAsmPrinter.cpp:1.73  Wed Dec  6 11:46:32 2006
+++ llvm/lib/Target/Sparc/SparcAsmPrinter.cpp   Thu Dec  7 16:21:48 2006
@@ -30,7 +30,6 @@
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/MathExtras.h"
 #include 
-#include 
 using namespace llvm;
 
 namespace {
@@ -266,13 +265,13 @@
 SwitchToDataSection(".data", I);
   break;
 case GlobalValue::GhostLinkage:
-  std::cerr << "Should not have any unmaterialized functions!\n";
+  cerr << "Should not have any unmaterialized functions!\n";
   abort();
 case GlobalValue::DLLImportLinkage:
-  std::cerr << "DLLImport linkage is not supported by this target!\n";
+  cerr << "DLLImport linkage is not supported by this target!\n";
   abort();
 case GlobalValue::DLLExportLinkage:
-  std::cerr << "DLLExport linkage is not supported by this target!\n";
+  cerr << "DLLExport linkage is not supported by this target!\n";
   abort();
 default:
   assert(0 && "Unknown linkage type!");  


Index: llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp
diff -u llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.115 
llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.116
--- llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.115   Mon Nov 27 17:37:22 2006
+++ llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp Thu Dec  7 16:21:48 2006
@@ -24,7 +24,6 @@
 #include "llvm/CodeGen/SSARegMap.h"
 #include "llvm/Target/TargetLowering.h"
 #include "llvm/Support/Debug.h"
-#include 
 #include 
 #include 
 using namespace llvm;


Index: llvm/lib/Target/Sparc/SparcRegisterInfo.cpp
diff -u llvm/lib/Target/Sparc/SparcRegisterInfo.cpp:1.48 
llvm/lib/Target/Sparc/SparcRegisterInfo.cpp:1.49
--- llvm/lib/Target/Sparc/SparcRegisterInfo.cpp:1.48Mon Nov 27 17:37:22 2006
+++ llvm/lib/Target/Sparc/SparcRegisterInfo.cpp Thu Dec  7 16:21:48 2006
@@ -21,7 +21,6 @@
 #include "llvm/Target/TargetInstrInfo.h"
 #include "llvm/Type.h"
 #include "llvm/ADT/STLExtras.h"
-#include 
 using namespace llvm;
 
 SparcRegisterInfo::SparcRegisterInfo(SparcSubtarget &st,


Index: llvm/lib/Target/Sparc/SparcTargetMachine.cpp
diff -u llvm/lib/Target/Sparc/SparcTargetMachine.cpp:1.51 
llvm/lib/Target/Sparc/SparcTargetMachine.cpp:1.52
--- llvm/lib/Target/Sparc/SparcTargetMachine.cpp:1.51   Thu Sep  7 18:39:26 2006
+++ llvm/lib/Target/Sparc/SparcTargetMachine.cppThu Dec  7 16:21:48 2006
@@ -16,7 +16,6 @@
 #include "llvm/Module.h"
 #include "llvm/PassManager.h"
 #include "llvm/Target/TargetMachineRegistry.h"
-#include 
 using namespace llvm;
 
 namespace {



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Transforms/IPO/FunctionResolution.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/Transforms/IPO:

FunctionResolution.cpp updated: 1.62 -> 1.63
---
Log message:

What should be the last unnecessary s in the library.


---
Diffs of the changes:  (+5 -6)

 FunctionResolution.cpp |   11 +--
 1 files changed, 5 insertions(+), 6 deletions(-)


Index: llvm/lib/Transforms/IPO/FunctionResolution.cpp
diff -u llvm/lib/Transforms/IPO/FunctionResolution.cpp:1.62 
llvm/lib/Transforms/IPO/FunctionResolution.cpp:1.63
--- llvm/lib/Transforms/IPO/FunctionResolution.cpp:1.62 Thu Dec  7 14:04:42 2006
+++ llvm/lib/Transforms/IPO/FunctionResolution.cpp  Thu Dec  7 16:21:48 2006
@@ -29,7 +29,6 @@
 #include "llvm/Assembly/Writer.h"
 #include "llvm/ADT/Statistic.h"
 #include 
-#include 
 using namespace llvm;
 
 namespace {
@@ -65,9 +64,9 @@
   cerr << "WARNING: Linking function '" << Old->getName()
<< "' is causing arguments to be dropped.\n";
   cerr << "WARNING: Prototype: ";
-  WriteAsOperand(std::cerr, Old);
+  WriteAsOperand(*cerr.stream(), Old);
   cerr << " resolved to ";
-  WriteAsOperand(std::cerr, Concrete);
+  WriteAsOperand(*cerr.stream(), Concrete);
   cerr << "\n";
 }
 
@@ -84,10 +83,10 @@
 ConcreteFT->getParamType(i)->getTypeID()) {
   cerr << "WARNING: Function [" << Old->getName()
<< "]: Parameter types conflict for: '";
-  WriteTypeSymbolic(std::cerr, OldFT, &M);
+  WriteTypeSymbolic(*cerr.stream(), OldFT, &M);
   cerr << "' (in " 
<< Old->getParent()->getModuleIdentifier() << ") and '";
-  WriteTypeSymbolic(std::cerr, ConcreteFT, &M);
+  WriteTypeSymbolic(*cerr.stream(), ConcreteFT, &M);
   cerr << "'(in " 
<< Concrete->getParent()->getModuleIdentifier() << ")\n";
   return Changed;
@@ -254,7 +253,7 @@
   cerr << "WARNING: Found global types that are not compatible:\n";
   for (unsigned i = 0; i < Globals.size(); ++i) {
 cerr << "\t";
-WriteTypeSymbolic(std::cerr, Globals[i]->getType(), &M);
+WriteTypeSymbolic(*cerr.stream(), Globals[i]->getType(), &M);
 cerr << " %" << Globals[i]->getName() << "\n";
   }
 }



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp

2006-12-07 Thread Chris Lattner


Changes in directory llvm/lib/Target/PowerPC:

PPCRegisterInfo.cpp updated: 1.92 -> 1.93
---
Log message:

fix CodeGen/PowerPC/2006-12-07-LargeAlloca.ll on ppc64



---
Diffs of the changes:  (+1 -0)

 PPCRegisterInfo.cpp |1 +
 1 files changed, 1 insertion(+)


Index: llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
diff -u llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.92 
llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.93
--- llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.92Wed Dec  6 11:42:06 2006
+++ llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp Thu Dec  7 16:15:58 2006
@@ -94,6 +94,7 @@
   ImmToIdxMap[PPC::STH]  = PPC::STHX;   ImmToIdxMap[PPC::STW]  = PPC::STWX;
   ImmToIdxMap[PPC::STFS] = PPC::STFSX;  ImmToIdxMap[PPC::STFD] = PPC::STFDX;
   ImmToIdxMap[PPC::ADDI] = PPC::ADD4;
+  ImmToIdxMap[PPC::ADDI8] = PPC::ADD8;
 }
 
 void



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/X86/X86FloatingPoint.cpp X86ISelDAGToDAG.cpp X86RegisterInfo.cpp X86Subtarget.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/Target/X86:

X86FloatingPoint.cpp updated: 1.64 -> 1.65
X86ISelDAGToDAG.cpp updated: 1.137 -> 1.138
X86RegisterInfo.cpp updated: 1.183 -> 1.184
X86Subtarget.cpp updated: 1.42 -> 1.43
---
Log message:

What should be the last unnecessary s in the library.


---
Diffs of the changes:  (+15 -20)

 X86FloatingPoint.cpp |   17 -
 X86ISelDAGToDAG.cpp  |1 -
 X86RegisterInfo.cpp  |   10 --
 X86Subtarget.cpp |7 +++
 4 files changed, 15 insertions(+), 20 deletions(-)


Index: llvm/lib/Target/X86/X86FloatingPoint.cpp
diff -u llvm/lib/Target/X86/X86FloatingPoint.cpp:1.64 
llvm/lib/Target/X86/X86FloatingPoint.cpp:1.65
--- llvm/lib/Target/X86/X86FloatingPoint.cpp:1.64   Wed Dec  6 11:46:32 2006
+++ llvm/lib/Target/X86/X86FloatingPoint.cppThu Dec  7 16:21:48 2006
@@ -44,7 +44,6 @@
 #include "llvm/ADT/Statistic.h"
 #include "llvm/ADT/STLExtras.h"
 #include 
-#include 
 #include 
 using namespace llvm;
 
@@ -70,12 +69,12 @@
 unsigned StackTop;  // The current top of the FP stack.
 
 void dumpStack() const {
-  std::cerr << "Stack contents:";
+  cerr << "Stack contents:";
   for (unsigned i = 0; i != StackTop; ++i) {
-std::cerr << " FP" << Stack[i];
+cerr << " FP" << Stack[i];
 assert(RegMap[Stack[i]] == i && "Stack[] doesn't match RegMap[]!");
   }
-  std::cerr << "\n";
+  cerr << "\n";
 }
   private:
 // getSlot - Return the stack slot number a particular register number is
@@ -211,7 +210,7 @@
 PrevMI = prior(I);
 
 ++NumFP;  // Keep track of # of pseudo instrs
-DEBUG(std::cerr << "\nFPInst:\t"; MI->print(std::cerr, &(MF.getTarget(;
+DOUT << "\nFPInst:\t"; MI->print(*cerr.stream(), &(MF.getTarget()));
 
 // Get dead variables list now because the MI pointer may be deleted as 
part
 // of processing!
@@ -238,7 +237,7 @@
 for (unsigned i = 0, e = DeadRegs.size(); i != e; ++i) {
   unsigned Reg = DeadRegs[i];
   if (Reg >= X86::FP0 && Reg <= X86::FP6) {
-DEBUG(std::cerr << "Register FP#" << Reg-X86::FP0 << " is dead!\n");
+DOUT << "Register FP#" << Reg-X86::FP0 << " is dead!\n";
 freeStackSlotAfter(I, Reg-X86::FP0);
   }
 }
@@ -247,13 +246,13 @@
 DEBUG(
   MachineBasicBlock::iterator PrevI(PrevMI);
   if (I == PrevI) {
-std::cerr << "Just deleted pseudo instruction\n";
+cerr << "Just deleted pseudo instruction\n";
   } else {
 MachineBasicBlock::iterator Start = I;
 // Rewind to first instruction newly inserted.
 while (Start != BB.begin() && prior(Start) != PrevI) --Start;
-std::cerr << "Inserted instructions:\n\t";
-Start->print(std::cerr, &MF.getTarget());
+cerr << "Inserted instructions:\n\t";
+Start->print(*cerr.stream(), &MF.getTarget());
 while (++Start != next(I));
   }
   dumpStack();


Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.137 
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.138
--- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.137   Wed Dec  6 11:46:32 2006
+++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Thu Dec  7 16:21:48 2006
@@ -34,7 +34,6 @@
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/MathExtras.h"
 #include "llvm/ADT/Statistic.h"
-#include 
 #include 
 #include 
 using namespace llvm;


Index: llvm/lib/Target/X86/X86RegisterInfo.cpp
diff -u llvm/lib/Target/X86/X86RegisterInfo.cpp:1.183 
llvm/lib/Target/X86/X86RegisterInfo.cpp:1.184
--- llvm/lib/Target/X86/X86RegisterInfo.cpp:1.183   Wed Dec  6 19:21:59 2006
+++ llvm/lib/Target/X86/X86RegisterInfo.cpp Thu Dec  7 16:21:48 2006
@@ -32,8 +32,6 @@
 #include "llvm/Target/TargetOptions.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/ADT/STLExtras.h"
-#include 
-
 using namespace llvm;
 
 namespace {
@@ -244,8 +242,8 @@
 static bool TableIsSorted(const TableEntry *Table, unsigned NumEntries) {
   for (unsigned i = 1; i != NumEntries; ++i)
 if (!(Table[i-1] < Table[i])) {
-  std::cerr << "Entries out of order " << Table[i-1].from
-<< " " << Table[i].from << "\n";
+  cerr << "Entries out of order " << Table[i-1].from
+   << " " << Table[i].from << "\n";
   return false;
 }
   return true;
@@ -845,8 +843,8 @@
   
   // No fusion 
   if (PrintFailedFusing)
-std::cerr << "We failed to fuse ("
-  << ((i == 1) ? "r" : "s") << "): " << *MI;
+cerr << "We failed to fuse ("
+ << ((i == 1) ? "r" : "s") << "): " << *MI;
   return NULL;
 }
 


Index: llvm/lib/Target/X86/X86Subtarget.cpp
diff -u llvm/lib/Target/X86/X86Subtarget.cpp:1.42 
llvm/lib/Target/X86/X86Subtarget.cpp:1.43
--- llvm/lib/Target/X86/X86Subtarget.cpp:1.42   Thu Nov 30 16:42:55 2006
+++ llvm/lib/Target/X86/X86Subtarget.cppThu Dec  7 16:21:48 2006
@@ -15,7 +15,6 @@
 #include "X86GenSubtarget.inc"
 #include "llvm/Module.h"
 #inc

[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp AlphaCodeEmitter.cpp AlphaISelDAGToDAG.cpp AlphaISelLowering.cpp AlphaInstrInfo.cpp AlphaJITInfo.cpp AlphaRegisterInfo.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/Target/Alpha:

AlphaAsmPrinter.cpp updated: 1.57 -> 1.58
AlphaCodeEmitter.cpp updated: 1.19 -> 1.20
AlphaISelDAGToDAG.cpp updated: 1.62 -> 1.63
AlphaISelLowering.cpp updated: 1.74 -> 1.75
AlphaInstrInfo.cpp updated: 1.15 -> 1.16
AlphaJITInfo.cpp updated: 1.11 -> 1.12
AlphaRegisterInfo.cpp updated: 1.53 -> 1.54
---
Log message:

What should be the last unnecessary s in the library.


---
Diffs of the changes:  (+42 -50)

 AlphaAsmPrinter.cpp   |9 -
 AlphaCodeEmitter.cpp  |5 ++---
 AlphaISelDAGToDAG.cpp |3 +--
 AlphaISelLowering.cpp |4 +---
 AlphaInstrInfo.cpp|1 -
 AlphaJITInfo.cpp  |   37 ++---
 AlphaRegisterInfo.cpp |   33 -
 7 files changed, 42 insertions(+), 50 deletions(-)


Index: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp
diff -u llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.57 
llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.58
--- llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.57  Thu Dec  7 11:39:14 2006
+++ llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp   Thu Dec  7 16:21:48 2006
@@ -24,7 +24,6 @@
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/Mangler.h"
 #include "llvm/ADT/Statistic.h"
-#include 
 using namespace llvm;
 
 namespace {
@@ -105,7 +104,7 @@
 return;
 
   case MachineOperand::MO_Immediate:
-std::cerr << "printOp() does not handle immediate values\n";
+cerr << "printOp() does not handle immediate values\n";
 abort();
 return;
 
@@ -265,13 +264,13 @@
   "\t.section .data", I);
   break;
 case GlobalValue::GhostLinkage:
-  std::cerr << "GhostLinkage cannot appear in AlphaAsmPrinter!\n";
+  cerr << "GhostLinkage cannot appear in AlphaAsmPrinter!\n";
   abort();
 case GlobalValue::DLLImportLinkage:
-  std::cerr << "DLLImport linkage is not supported by this target!\n";
+  cerr << "DLLImport linkage is not supported by this target!\n";
   abort();
 case GlobalValue::DLLExportLinkage:
-  std::cerr << "DLLExport linkage is not supported by this target!\n";
+  cerr << "DLLExport linkage is not supported by this target!\n";
   abort();
 default:
   assert(0 && "Unknown linkage type!");


Index: llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp
diff -u llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp:1.19 
llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp:1.20
--- llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp:1.19 Wed Dec  6 11:46:32 2006
+++ llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp  Thu Dec  7 16:21:48 2006
@@ -23,7 +23,6 @@
 #include "llvm/Function.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/ADT/Statistic.h"
-#include 
 using namespace llvm;
 
 namespace {
@@ -158,7 +157,7 @@
 rv = MO.getImmedValue();
   } else if (MO.isGlobalAddress() || MO.isExternalSymbol()
  || MO.isConstantPoolIndex()) {
-DEBUG(std::cerr << MO << " is a relocated op for " << MI << "\n";);
+DOUT << MO << " is a relocated op for " << MI << "\n";
 unsigned Reloc = 0;
 int Offset = 0;
 bool useGOT = false;
@@ -214,7 +213,7 @@
Alpha::reloc_bsr,
MO.getMachineBasicBlock()));
   }else {
-std::cerr << "ERROR: Unknown type of MachineOperand: " << MO << "\n";
+cerr << "ERROR: Unknown type of MachineOperand: " << MO << "\n";
 abort();
   }
 


Index: llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp
diff -u llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.62 
llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.63
--- llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.62Thu Nov  2 14:25:49 2006
+++ llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp Thu Dec  7 16:21:48 2006
@@ -29,7 +29,6 @@
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/MathExtras.h"
 #include 
-#include 
 #include 
 #include 
 using namespace llvm;
@@ -115,7 +114,7 @@
   unsigned at = CountLeadingZeros_64(x);
   uint64_t complow = 1 << (63 - at);
   uint64_t comphigh = 1 << (64 - at);
-  //std::cerr << x << ":" << complow << ":" << comphigh << "\n";
+  //cerr << x << ":" << complow << ":" << comphigh << "\n";
   if (abs(complow - x) <= abs(comphigh - x))
 return complow;
   else


Index: llvm/lib/Target/Alpha/AlphaISelLowering.cpp
diff -u llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.74 
llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.75
--- llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.74Thu Nov  2 19:18:29 2006
+++ llvm/lib/Target/Alpha/AlphaISelLowering.cpp Thu Dec  7 16:21:48 2006
@@ -22,8 +22,6 @@
 #include "llvm/Function.h"
 #include "llvm/Module.h"
 #include "llvm/Support/CommandLine.h"
-#include 
-
 using namespace llvm;
 
 /// AddLiveIn - This helper function adds the specified physical register to 
the
@@ -224,7 +222,7 @@
 if (ArgNo  < 6) {
   switch (ObjectVT) {
   default:
-std::cer

[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.52 -> 1.53
---
Log message:

PMDataManager does not maintain LastUser info.


---
Diffs of the changes:  (+1 -25)

 PassManager.cpp |   26 +-
 1 files changed, 1 insertion(+), 25 deletions(-)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.52 
llvm/lib/VMCore/PassManager.cpp:1.53
--- llvm/lib/VMCore/PassManager.cpp:1.52Thu Dec  7 16:09:36 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 16:17:09 2006
@@ -244,7 +244,6 @@
   // Initialize available analysis information.
   void initializeAnalysisInfo() { 
 AvailableAnalysis.clear();
-LastUser.clear();
 
 // Include immutable passes into AvailableAnalysis vector.
 std::vector &ImmutablePasses =  TPM->getImmutablePasses();
@@ -268,11 +267,6 @@
 return PassVector.end();
   }
 
-  inline void setLastUser(Pass *P, Pass *LU) {
-LastUser[P] = LU; 
-// TODO : Check if pass P is available.
-  }
-
   // Access toplevel manager
   PMTopLevelManager *getTopLevelManager() { return TPM; }
   void setTopLevelManager(PMTopLevelManager *T) { TPM = T; }
@@ -284,10 +278,6 @@
   // scheduled to run.
   std::map AvailableAnalysis;
 
-  // Map to keep track of last user of the analysis pass.
-  // LastUser->second is the last user of Lastuser->first.
-  std::map LastUser;
-
   // Collection of pass that are managed by this manager
   std::vector PassVector;
 
@@ -510,21 +500,7 @@
 
 /// Remove analysis passes that are not used any longer
 void PMDataManager::removeDeadPasses(Pass *P) {
-
-  for (std::map::iterator I = LastUser.begin(),
- E = LastUser.end(); I !=E; ++I) {
-if (I->second == P) {
-  Pass *deadPass = I->first;
-  deadPass->releaseMemory();
-
-  std::map::iterator Pos = 
-AvailableAnalysis.find(deadPass->getPassInfo());
-  
-  assert (Pos != AvailableAnalysis.end() &&
-  "Pass is not available");
-  AvailableAnalysis.erase(Pos);
-}
-  }
+  // TODO : reimplement
 }
 
 /// Add pass P into the PassVector. Update 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp PPCCodeEmitter.cpp PPCHazardRecognizers.cpp PPCISelDAGToDAG.cpp PPCInstrInfo.cpp PPCJITInfo.cpp PPCRegisterInfo.cpp PPCSubtarget.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/Target/PowerPC:

PPCAsmPrinter.cpp updated: 1.217 -> 1.218
PPCCodeEmitter.cpp updated: 1.70 -> 1.71
PPCHazardRecognizers.cpp updated: 1.17 -> 1.18
PPCISelDAGToDAG.cpp updated: 1.226 -> 1.227
PPCInstrInfo.cpp updated: 1.35 -> 1.36
PPCJITInfo.cpp updated: 1.30 -> 1.31
PPCRegisterInfo.cpp updated: 1.93 -> 1.94
PPCSubtarget.cpp updated: 1.25 -> 1.26
---
Log message:

What should be the last unnecessary s in the library.


---
Diffs of the changes:  (+10 -19)

 PPCAsmPrinter.cpp|5 ++---
 PPCCodeEmitter.cpp   |3 +--
 PPCHazardRecognizers.cpp |4 +---
 PPCISelDAGToDAG.cpp  |1 -
 PPCInstrInfo.cpp |1 -
 PPCJITInfo.cpp   |1 -
 PPCRegisterInfo.cpp  |5 ++---
 PPCSubtarget.cpp |9 -
 8 files changed, 10 insertions(+), 19 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.217 
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.218
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.217 Wed Dec  6 11:46:32 2006
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp   Thu Dec  7 16:21:48 2006
@@ -41,7 +41,6 @@
 #include "llvm/Target/TargetOptions.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/ADT/StringExtras.h"
-#include 
 #include 
 using namespace llvm;
 
@@ -295,7 +294,7 @@
 void PPCAsmPrinter::printOp(const MachineOperand &MO) {
   switch (MO.getType()) {
   case MachineOperand::MO_Immediate:
-std::cerr << "printOp() does not handle immediate values\n";
+cerr << "printOp() does not handle immediate values\n";
 abort();
 return;
 
@@ -629,7 +628,7 @@
 SwitchToDataSection("\t.data", I);
 break;
   default:
-std::cerr << "Unknown linkage type!";
+cerr << "Unknown linkage type!";
 abort();
   }
 


Index: llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp
diff -u llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.70 
llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.71
--- llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.70 Wed Dec  6 13:40:04 2006
+++ llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp  Thu Dec  7 16:21:48 2006
@@ -24,7 +24,6 @@
 #include "llvm/Support/Debug.h"   
 #include "llvm/Support/Compiler.h"
 #include "llvm/Target/TargetOptions.h"
-#include 
 using namespace llvm;
 
 namespace {
@@ -193,7 +192,7 @@
Reloc,
MO.getMachineBasicBlock()));
   } else {
-std::cerr << "ERROR: Unknown type of MachineOperand: " << MO << "\n";
+cerr << "ERROR: Unknown type of MachineOperand: " << MO << "\n";
 abort();
   }
 


Index: llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp
diff -u llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp:1.17 
llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp:1.18
--- llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp:1.17   Wed Nov 15 
18:57:19 2006
+++ llvm/lib/Target/PowerPC/PPCHazardRecognizers.cppThu Dec  7 16:21:48 2006
@@ -16,10 +16,8 @@
 #include "PPC.h"
 #include "PPCInstrInfo.h"
 #include "llvm/Support/Debug.h"
-#include 
 using namespace llvm;
 
-
 
//===--===//
 // PowerPC 970 Hazard Recognizer
 //
@@ -52,7 +50,7 @@
 }
 
 void PPCHazardRecognizer970::EndDispatchGroup() {
-  DEBUG(std::cerr << "=== Start of dispatch group\n");
+  DOUT << "=== Start of dispatch group\n";
   NumIssued = 0;
   
   // Structural hazard info.


Index: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
diff -u llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.226 
llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.227
--- llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.226   Wed Dec  6 11:46:32 2006
+++ llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Thu Dec  7 16:21:48 2006
@@ -30,7 +30,6 @@
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/Compiler.h"
-#include 
 #include 
 #include 
 using namespace llvm;


Index: llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.cpp:1.35 
llvm/lib/Target/PowerPC/PPCInstrInfo.cpp:1.36
--- llvm/lib/Target/PowerPC/PPCInstrInfo.cpp:1.35   Mon Nov 27 17:37:22 2006
+++ llvm/lib/Target/PowerPC/PPCInstrInfo.cppThu Dec  7 16:21:48 2006
@@ -16,7 +16,6 @@
 #include "PPCGenInstrInfo.inc"
 #include "PPCTargetMachine.h"
 #include "llvm/CodeGen/MachineInstrBuilder.h"
-#include 
 using namespace llvm;
 
 PPCInstrInfo::PPCInstrInfo(PPCTargetMachine &tm)


Index: llvm/lib/Target/PowerPC/PPCJITInfo.cpp
diff -u llvm/lib/Target/PowerPC/PPCJITInfo.cpp:1.30 
llvm/lib/Target/PowerPC/PPCJITInfo.cpp:1.31
--- llvm/lib/Target/PowerPC/PPCJITInfo.cpp:1.30 Thu Sep 28 18:32:43 2006
+++ llvm/lib/Target/PowerPC/PPCJITInfo.cpp  Thu Dec  7 16:21:48 2006
@@ -18,7 +18,6 @@
 #include "llvm/Config/alloca.h"
 #include "llvm/Support/Debug.h"
 #include 
-#include 
 using namespace llvm;
 
 static TargetJITInfo::JITCompilerFn JITCompilerFunction

[llvm-commits] CVS: llvm/lib/Target/IA64/IA64AsmPrinter.cpp IA64Bundling.cpp IA64ISelDAGToDAG.cpp IA64RegisterInfo.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/Target/IA64:

IA64AsmPrinter.cpp updated: 1.39 -> 1.40
IA64Bundling.cpp updated: 1.5 -> 1.6
IA64ISelDAGToDAG.cpp updated: 1.62 -> 1.63
IA64RegisterInfo.cpp updated: 1.24 -> 1.25
---
Log message:

What should be the last unnecessary s in the library.


---
Diffs of the changes:  (+3 -8)

 IA64AsmPrinter.cpp   |7 +++
 IA64Bundling.cpp |1 -
 IA64ISelDAGToDAG.cpp |1 -
 IA64RegisterInfo.cpp |2 --
 4 files changed, 3 insertions(+), 8 deletions(-)


Index: llvm/lib/Target/IA64/IA64AsmPrinter.cpp
diff -u llvm/lib/Target/IA64/IA64AsmPrinter.cpp:1.39 
llvm/lib/Target/IA64/IA64AsmPrinter.cpp:1.40
--- llvm/lib/Target/IA64/IA64AsmPrinter.cpp:1.39Wed Dec  6 11:46:32 2006
+++ llvm/lib/Target/IA64/IA64AsmPrinter.cpp Thu Dec  7 16:21:48 2006
@@ -26,7 +26,6 @@
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Support/Mangler.h"
 #include "llvm/ADT/Statistic.h"
-#include 
 using namespace llvm;
 
 namespace {
@@ -308,13 +307,13 @@
 SwitchToDataSection(C->isNullValue() ? ".bss" : ".data", I);
 break;
   case GlobalValue::GhostLinkage:
-std::cerr << "GhostLinkage cannot appear in IA64AsmPrinter!\n";
+cerr << "GhostLinkage cannot appear in IA64AsmPrinter!\n";
 abort();
   case GlobalValue::DLLImportLinkage:
-std::cerr << "DLLImport linkage is not supported by this 
target!\n";
+cerr << "DLLImport linkage is not supported by this target!\n";
 abort();
   case GlobalValue::DLLExportLinkage:
-std::cerr << "DLLExport linkage is not supported by this 
target!\n";
+cerr << "DLLExport linkage is not supported by this target!\n";
 abort();
   default:
 assert(0 && "Unknown linkage type!");


Index: llvm/lib/Target/IA64/IA64Bundling.cpp
diff -u llvm/lib/Target/IA64/IA64Bundling.cpp:1.5 
llvm/lib/Target/IA64/IA64Bundling.cpp:1.6
--- llvm/lib/Target/IA64/IA64Bundling.cpp:1.5   Wed Dec  6 11:46:32 2006
+++ llvm/lib/Target/IA64/IA64Bundling.cpp   Thu Dec  7 16:21:48 2006
@@ -29,7 +29,6 @@
 #include "llvm/ADT/Statistic.h"
 #include "llvm/Support/Debug.h"
 #include 
-#include 
 using namespace llvm;
 
 namespace {


Index: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp
diff -u llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.62 
llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.63
--- llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.62  Wed Dec  6 11:46:32 2006
+++ llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp   Thu Dec  7 16:21:48 2006
@@ -27,7 +27,6 @@
 #include "llvm/Intrinsics.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/MathExtras.h"
-#include 
 #include 
 #include 
 using namespace llvm;


Index: llvm/lib/Target/IA64/IA64RegisterInfo.cpp
diff -u llvm/lib/Target/IA64/IA64RegisterInfo.cpp:1.24 
llvm/lib/Target/IA64/IA64RegisterInfo.cpp:1.25
--- llvm/lib/Target/IA64/IA64RegisterInfo.cpp:1.24  Mon Nov 27 17:37:22 2006
+++ llvm/lib/Target/IA64/IA64RegisterInfo.cpp   Thu Dec  7 16:21:48 2006
@@ -29,10 +29,8 @@
 #include "llvm/Target/TargetInstrInfo.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/ADT/STLExtras.h"
-#include 
 using namespace llvm;
 
-
 IA64RegisterInfo::IA64RegisterInfo(const TargetInstrInfo &tii)
   : IA64GenRegisterInfo(IA64::ADJUSTCALLSTACKDOWN, IA64::ADJUSTCALLSTACKUP),
 TII(tii) {}



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/Target/CBackend:

Writer.cpp updated: 1.292 -> 1.293
---
Log message:

What should be the last unnecessary s in the library.


---
Diffs of the changes:  (+9 -11)

 Writer.cpp |   20 +---
 1 files changed, 9 insertions(+), 11 deletions(-)


Index: llvm/lib/Target/CBackend/Writer.cpp
diff -u llvm/lib/Target/CBackend/Writer.cpp:1.292 
llvm/lib/Target/CBackend/Writer.cpp:1.293
--- llvm/lib/Target/CBackend/Writer.cpp:1.292   Wed Dec  6 15:27:07 2006
+++ llvm/lib/Target/CBackend/Writer.cpp Thu Dec  7 16:21:48 2006
@@ -42,9 +42,7 @@
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Config/config.h"
 #include 
-#include 
 #include 
-#include 
 using namespace llvm;
 
 namespace {
@@ -229,7 +227,7 @@
 void visitVAArgInst (VAArgInst &I);
 
 void visitInstruction(Instruction &I) {
-  std::cerr << "C Writer does not know about " << I;
+  cerr << "C Writer does not know about " << I;
   abort();
 }
 
@@ -375,7 +373,7 @@
 case Type::FloatTyID:  return Out << "float "  << NameSoFar;
 case Type::DoubleTyID: return Out << "double " << NameSoFar;
 default :
-  std::cerr << "Unknown primitive type: " << *Ty << "\n";
+  cerr << "Unknown primitive type: " << *Ty << "\n";
   abort();
 }
 
@@ -726,8 +724,8 @@
 }
 
 default:
-  std::cerr << "CWriter Error: Unhandled constant expression: "
-<< *CE << "\n";
+  cerr << "CWriter Error: Unhandled constant expression: "
+   << *CE << "\n";
   abort();
 }
   } else if (isa(CPV) && CPV->getType()->isFirstClassType()) {
@@ -901,7 +899,7 @@
 }
 // FALL THROUGH
   default:
-std::cerr << "Unknown constant type: " << *CPV << "\n";
+cerr << "Unknown constant type: " << *CPV << "\n";
 abort();
   }
 }
@@ -1973,7 +1971,7 @@
 case Instruction::Shl : Out << " << "; break;
 case Instruction::LShr:
 case Instruction::AShr: Out << " >> "; break;
-default: std::cerr << "Invalid operator type!" << I; abort();
+default: cerr << "Invalid operator type!" << I; abort();
 }
 
 writeOperandWithCast(I.getOperand(1), I.getOpcode());
@@ -2099,9 +2097,9 @@
 Out << ", ";
 // Output the last argument to the enclosing function...
 if (I.getParent()->getParent()->arg_empty()) {
-  std::cerr << "The C backend does not currently support zero "
-<< "argument varargs functions, such as '"
-<< I.getParent()->getParent()->getName() << "'!\n";
+  cerr << "The C backend does not currently support zero "
+   << "argument varargs functions, such as '"
+   << I.getParent()->getParent()->getName() << "'!\n";
   abort();
 }
 writeOperand(--I.getParent()->getParent()->arg_end());



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/ARM/ARMAsmPrinter.cpp ARMISelDAGToDAG.cpp ARMRegisterInfo.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/Target/ARM:

ARMAsmPrinter.cpp updated: 1.34 -> 1.35
ARMISelDAGToDAG.cpp updated: 1.87 -> 1.88
ARMRegisterInfo.cpp updated: 1.27 -> 1.28
---
Log message:

What should be the last unnecessary s in the library.


---
Diffs of the changes:  (+0 -3)

 ARMAsmPrinter.cpp   |1 -
 ARMISelDAGToDAG.cpp |1 -
 ARMRegisterInfo.cpp |1 -
 3 files changed, 3 deletions(-)


Index: llvm/lib/Target/ARM/ARMAsmPrinter.cpp
diff -u llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.34 
llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.35
--- llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.34  Thu Dec  7 12:33:58 2006
+++ llvm/lib/Target/ARM/ARMAsmPrinter.cpp   Thu Dec  7 16:21:48 2006
@@ -31,7 +31,6 @@
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/MathExtras.h"
 #include 
-#include 
 using namespace llvm;
 
 namespace {


Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.87 
llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.88
--- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.87Tue Dec  5 11:57:22 2006
+++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Thu Dec  7 16:21:48 2006
@@ -27,7 +27,6 @@
 #include "llvm/CodeGen/SSARegMap.h"
 #include "llvm/Target/TargetLowering.h"
 #include "llvm/Support/Debug.h"
-#include 
 #include 
 using namespace llvm;
 


Index: llvm/lib/Target/ARM/ARMRegisterInfo.cpp
diff -u llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.27 
llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.28
--- llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.27Mon Nov 27 17:37:22 2006
+++ llvm/lib/Target/ARM/ARMRegisterInfo.cpp Thu Dec  7 16:21:48 2006
@@ -24,7 +24,6 @@
 #include "llvm/Target/TargetOptions.h"
 #include "llvm/Target/TargetInstrInfo.h"
 #include "llvm/ADT/STLExtras.h"
-#include 
 using namespace llvm;
 
 // hasFP - Return true if the specified function should have a dedicated frame



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.53 -> 1.54
---
Log message:

When new pass manager is created, initialize available analysis info
of existing manager at the same level. Otherwise, such info may be 
considered as available, which not true.


---
Diffs of the changes:  (+26 -9)

 PassManager.cpp |   35 ++-
 1 files changed, 26 insertions(+), 9 deletions(-)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.53 
llvm/lib/VMCore/PassManager.cpp:1.54
--- llvm/lib/VMCore/PassManager.cpp:1.53Thu Dec  7 16:17:09 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 16:34:21 2006
@@ -652,13 +652,17 @@
   // If P is a BasicBlockPass then use BasicBlockPassManager_New.
   if (BasicBlockPass *BP = dynamic_cast(P)) {
 
-if (!activeBBPassManager
-|| !activeBBPassManager->addPass(BP)) {
+if (!activeBBPassManager || !activeBBPassManager->addPass(BP)) {
 
-  // TODO : intialize AvailableAnalysis info
+  // If active manager exists then clear its analysis info.
+  if (activeBBPassManager)
+activeBBPassManager->initializeAnalysisInfo();
 
+  // Create and add new manager
   activeBBPassManager = new BasicBlockPassManager_New();
   addPassToManager(activeBBPassManager, false);
+
+  // Add pass into new manager. This time it must succeed.
   if (!activeBBPassManager->addPass(BP))
 assert(0 && "Unable to add Pass");
 }
@@ -675,8 +679,13 @@
 return false;
 
   addPassToManager (FP);
-  // TODO : intialize AvailableAnalysis info
-  activeBBPassManager = NULL;
+
+  // If active manager exists then clear its analysis info.
+  if (activeBBPassManager) {
+activeBBPassManager->initializeAnalysisInfo();
+activeBBPassManager = NULL;
+  }
+
   return true;
 }
 
@@ -784,11 +793,15 @@
 if (!activeFunctionPassManager
 || !activeFunctionPassManager->addPass(P)) {
 
-  // TODO : intialize AvailableAnalysis info
-  activeFunctionPassManager = NULL;
+  // If active manager exists then clear its analysis info.
+  if (activeFunctionPassManager) 
+activeFunctionPassManager->initializeAnalysisInfo();
 
+  // Create and add new manager
   activeFunctionPassManager = new FunctionPassManagerImpl_New();
   addPassToManager(activeFunctionPassManager, false);
+
+  // Add pass into new manager. This time it must succeed.
   if (!activeFunctionPassManager->addPass(FP))
 assert(0 && "Unable to add pass");
 }
@@ -805,8 +818,12 @@
 return false;
 
   addPassToManager(MP);
-  // TODO : intialize AvailableAnalysis info
-  activeFunctionPassManager = NULL;
+  // If active manager exists then clear its analysis info.
+  if (activeFunctionPassManager) {
+activeFunctionPassManager->initializeAnalysisInfo();
+activeFunctionPassManager = NULL;
+  }
+
   return true;
 }
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

2006-12-07 Thread Chris Lattner


Changes in directory llvm/lib/CodeGen/SelectionDAG:

DAGCombiner.cpp updated: 1.257 -> 1.258
---
Log message:

Fix CodeGen/PowerPC/2006-12-07-SelectCrash.ll on PPC64


---
Diffs of the changes:  (+4 -1)

 DAGCombiner.cpp |5 -
 1 files changed, 4 insertions(+), 1 deletion(-)


Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.257 
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.258
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.257 Thu Dec  7 14:04:42 2006
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp   Thu Dec  7 16:36:47 2006
@@ -3755,7 +3755,10 @@
 // cast from setcc result type to select result type
 if (AfterLegalize) {
   SCC  = DAG.getSetCC(TLI.getSetCCResultTy(), N0, N1, CC);
-  Temp = DAG.getZeroExtendInReg(SCC, N2.getValueType());
+  if (N2.getValueType() < SCC.getValueType())
+Temp = DAG.getZeroExtendInReg(SCC, N2.getValueType());
+  else
+Temp = DAG.getNode(ISD::ZERO_EXTEND, N2.getValueType(), SCC);
 } else {
   SCC  = DAG.getSetCC(MVT::i1, N0, N1, CC);
   Temp = DAG.getNode(ISD::ZERO_EXTEND, N2.getValueType(), SCC);



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/Regression/CodeGen/PowerPC/2006-12-07-SelectCrash.ll

2006-12-07 Thread Chris Lattner


Changes in directory llvm/test/Regression/CodeGen/PowerPC:

2006-12-07-SelectCrash.ll added (r1.1)
---
Log message:

new testcase


---
Diffs of the changes:  (+27 -0)

 2006-12-07-SelectCrash.ll |   27 +++
 1 files changed, 27 insertions(+)


Index: llvm/test/Regression/CodeGen/PowerPC/2006-12-07-SelectCrash.ll
diff -c /dev/null 
llvm/test/Regression/CodeGen/PowerPC/2006-12-07-SelectCrash.ll:1.1
*** /dev/null   Thu Dec  7 16:36:24 2006
--- llvm/test/Regression/CodeGen/PowerPC/2006-12-07-SelectCrash.ll  Thu Dec 
 7 16:36:14 2006
***
*** 0 
--- 1,27 
+ ; RUN: llvm-as < %s | llc -march=ppc64 &&
+ ; RUN: llvm-as < %s | llc -march=ppc32 &&
+ ; RUN: llvm-as < %s | llc
+ 
+ %qsz.b = external global bool ;  [#uses=1]
+ 
+ implementation   ; Functions:
+ 
+ fastcc void %qst() {
+ entry:
+   br bool true, label %cond_next71, label %cond_true
+ 
+ cond_true:; preds = %entry
+   ret void
+ 
+ cond_next71:  ; preds = %entry
+   %tmp73.b = load bool* %qsz.b;  [#uses=1]
+   %ii.4.ph = select bool %tmp73.b, ulong 4, ulong 0   ; 
 [#uses=1]
+   br label %bb139
+ 
+ bb82: ; preds = %bb139
+   ret void
+ 
+ bb139:; preds = %bb139, %cond_next71
+   %exitcond89 = seteq ulong 0, %ii.4.ph   ;  [#uses=1]
+   br bool %exitcond89, label %bb82, label %bb139
+ }



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/Regression/CodeGen/ARM/align.ll constants.ll

2006-12-07 Thread Rafael Espindola


Changes in directory llvm/test/Regression/CodeGen/ARM:

align.ll added (r1.1)
constants.ll updated: 1.3 -> 1.4
---
Log message:

fix alignment


---
Diffs of the changes:  (+13 -1)

 align.ll |   12 
 constants.ll |2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)


Index: llvm/test/Regression/CodeGen/ARM/align.ll
diff -c /dev/null llvm/test/Regression/CodeGen/ARM/align.ll:1.1
*** /dev/null   Thu Dec  7 16:38:16 2006
--- llvm/test/Regression/CodeGen/ARM/align.ll   Thu Dec  7 16:38:06 2006
***
*** 0 
--- 1,12 
+ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
+ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep align.*1 | wc | 
grep 1 &&
+ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep align.*2 | wc | 
grep 2 &&
+ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep align.*3 | wc | 
grep 2
+ 
+ %a = global bool true
+ %b = global sbyte 1
+ %c = global short 2
+ %d = global int 3
+ %e = global long 4
+ %f = global float 5.0
+ %g = global double 6.0


Index: llvm/test/Regression/CodeGen/ARM/constants.ll
diff -u llvm/test/Regression/CodeGen/ARM/constants.ll:1.3 
llvm/test/Regression/CodeGen/ARM/constants.ll:1.4
--- llvm/test/Regression/CodeGen/ARM/constants.ll:1.3   Fri Dec  1 22:23:08 2006
+++ llvm/test/Regression/CodeGen/ARM/constants.ll   Thu Dec  7 16:38:06 2006
@@ -5,7 +5,7 @@
 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ".word.*257" | wc 
-l | grep 1 &&
 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mov r0, 
#-1073741761" | wc -l | grep 1 &&
 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mov r0, #1008" | 
wc -l | grep 1 &&
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "\.comm.*a,4,4" | 
wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "\.comm.*a,4,2" | 
wc -l | grep 1
 
 %a = internal global int 0
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/ARM/ARMAsmPrinter.cpp

2006-12-07 Thread Rafael Espindola


Changes in directory llvm/lib/Target/ARM:

ARMAsmPrinter.cpp updated: 1.35 -> 1.36
---
Log message:

fix alignment


---
Diffs of the changes:  (+3 -3)

 ARMAsmPrinter.cpp |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Index: llvm/lib/Target/ARM/ARMAsmPrinter.cpp
diff -u llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.35 
llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.36
--- llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.35  Thu Dec  7 16:21:48 2006
+++ llvm/lib/Target/ARM/ARMAsmPrinter.cpp   Thu Dec  7 16:38:06 2006
@@ -292,7 +292,7 @@
 std::string name = Mang->getValueName(I);
 Constant *C = I->getInitializer();
 unsigned Size = TD->getTypeSize(C->getType());
-unsigned Align = TD->getTypeAlignment(C->getType());
+unsigned Align = Log2_32(TD->getTypeAlignment(C->getType()));
 
 if (C->isNullValue() &&
 !I->hasSection() &&
@@ -302,8 +302,8 @@
   if (I->hasInternalLinkage())
 O << "\t.local " << name << "\n";
 
-  O << "\t.comm " << name << "," << TD->getTypeSize(C->getType())
-<< "," << (unsigned)TD->getTypeAlignment(C->getType());
+  O << "\t.comm " << name << "," << Size
+<< "," << (unsigned)Align;
   O << "\n";
 } else {
   switch (I->getLinkage()) {



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.54 -> 1.55
---
Log message:

New method, PMDataManager::collectRequiredAnalysisPasses()


---
Diffs of the changes:  (+27 -7)

 PassManager.cpp |   34 +++---
 1 files changed, 27 insertions(+), 7 deletions(-)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.54 
llvm/lib/VMCore/PassManager.cpp:1.55
--- llvm/lib/VMCore/PassManager.cpp:1.54Thu Dec  7 16:34:21 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 17:05:44 2006
@@ -241,7 +241,7 @@
   /// AvailableAnalysis appropriately if ProcessAnalysis is true.
   void addPassToManager (Pass *P, bool ProcessAnalysis = true);
 
-  // Initialize available analysis information.
+  /// Initialize available analysis information.
   void initializeAnalysisInfo() { 
 AvailableAnalysis.clear();
 
@@ -252,12 +252,16 @@
   recordAvailableAnalysis(*I);
   }
 
-  // All Required analyses should be available to the pass as it runs!  Here
-  // we fill in the AnalysisImpls member of the pass so that it can
-  // successfully use the getAnalysis() method to retrieve the
-  // implementations it needs.
-  //
- void initializeAnalysisImpl(Pass *P);
+  /// Populate RequiredPasses with the analysis pass that are required by
+  /// pass P.
+  void collectRequiredAnalysisPasses(std::vector &RequiredPasses,
+ Pass *P);
+
+  /// All Required analyses should be available to the pass as it runs!  Here
+  /// we fill in the AnalysisImpls member of the pass so that it can
+  /// successfully use the getAnalysis() method to retrieve the
+  /// implementations it needs.
+  void initializeAnalysisImpl(Pass *P);
 
   inline std::vector::iterator passVectorBegin() { 
 return PassVector.begin(); 
@@ -520,6 +524,22 @@
   PassVector.push_back(P);
 }
 
+/// Populate RequiredPasses with the analysis pass that are required by
+/// pass P.
+void PMDataManager::collectRequiredAnalysisPasses(std::vector &RP,
+  Pass *P) {
+  AnalysisUsage AnUsage;
+  P->getAnalysisUsage(AnUsage);
+  const std::vector &RequiredSet = AnUsage.getRequiredSet();
+  for (std::vector::const_iterator 
+ I = RequiredSet.begin(), E = RequiredSet.end();
+   I != E; ++I) {
+Pass *AnalysisPass = NULL; //FIXME findAnalysisPass(*I,true);
+assert (AnalysisPass && "Analysis pass is not available");
+RP.push_back(AnalysisPass);
+  }
+}
+
 // All Required analyses should be available to the pass as it runs!  Here
 // we fill in the AnalysisImpls member of the pass so that it can
 // successfully use the getAnalysis() method to retrieve the



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.55 -> 1.56
---
Log message:

Maintain level(or depth) of pass manager in pass manager food chain.


---
Diffs of the changes:  (+21 -10)

 PassManager.cpp |   31 +--
 1 files changed, 21 insertions(+), 10 deletions(-)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.55 
llvm/lib/VMCore/PassManager.cpp:1.56
--- llvm/lib/VMCore/PassManager.cpp:1.55Thu Dec  7 17:05:44 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 17:24:58 2006
@@ -209,7 +209,7 @@
 
 public:
 
-  PMDataManager() : TPM(NULL) {
+  PMDataManager(int D) : TPM(NULL), Depth(D) {
 initializeAnalysisInfo();
   }
 
@@ -275,6 +275,8 @@
   PMTopLevelManager *getTopLevelManager() { return TPM; }
   void setTopLevelManager(PMTopLevelManager *T) { TPM = T; }
 
+  unsigned getDepth() { return Depth; }
+
 private:
   // Set of available Analysis. This information is used while scheduling 
   // pass. If a pass requires an analysis which is not not available then 
@@ -288,6 +290,8 @@
   // Top level manager.
   // TODO : Make it a reference.
   PMTopLevelManager *TPM;
+
+  unsigned Depth;
 };
 
 /// BasicBlockPassManager_New manages BasicBlockPass. It batches all the
@@ -297,7 +301,7 @@
   public FunctionPass {
 
 public:
-  BasicBlockPassManager_New() { }
+  BasicBlockPassManager_New(int D) : PMDataManager(D) { }
 
   /// Add a pass into a passmanager queue. 
   bool addPass(Pass *p);
@@ -326,8 +330,9 @@
 public PMDataManager,
 public PMTopLevelManager {
 public:
-  FunctionPassManagerImpl_New(ModuleProvider *P) { /* TODO */ }
-  FunctionPassManagerImpl_New() { 
+  FunctionPassManagerImpl_New(ModuleProvider *P, int D) :
+PMDataManager(D) { /* TODO */ }
+  FunctionPassManagerImpl_New(int D) : PMDataManager(D) { 
 activeBBPassManager = NULL;
   }
   ~FunctionPassManagerImpl_New() { /* TODO */ };
@@ -382,7 +387,9 @@
 class ModulePassManager_New : public PMDataManager {
  
 public:
-  ModulePassManager_New() { activeFunctionPassManager = NULL; }
+  ModulePassManager_New(int D) : PMDataManager(D) { 
+activeFunctionPassManager = NULL; 
+  }
   
   /// Add a pass into a passmanager queue. 
   bool addPass(Pass *p);
@@ -412,6 +419,8 @@
 
 public:
 
+  PassManagerImpl_New(int D) : PMDataManager(D) {}
+
   /// add - Add a pass to the queue of passes to run.  This passes ownership of
   /// the Pass to the PassManager.  When the PassManager is destroyed, the pass
   /// will be destroyed as well, so there is no need to delete the pass.  This
@@ -615,7 +624,7 @@
 
 /// Create new Function pass manager
 FunctionPassManager_New::FunctionPassManager_New() {
-  FPM = new FunctionPassManagerImpl_New();
+  FPM = new FunctionPassManagerImpl_New(0);
 }
 
 /// add - Add a pass to the queue of passes to run.  This passes
@@ -679,7 +688,8 @@
 activeBBPassManager->initializeAnalysisInfo();
 
   // Create and add new manager
-  activeBBPassManager = new BasicBlockPassManager_New();
+  activeBBPassManager = 
+new BasicBlockPassManager_New(getDepth() + 1);
   addPassToManager(activeBBPassManager, false);
 
   // Add pass into new manager. This time it must succeed.
@@ -818,7 +828,8 @@
 activeFunctionPassManager->initializeAnalysisInfo();
 
   // Create and add new manager
-  activeFunctionPassManager = new FunctionPassManagerImpl_New();
+  activeFunctionPassManager = 
+new FunctionPassManagerImpl_New(getDepth() + 1);
   addPassToManager(activeFunctionPassManager, false);
 
   // Add pass into new manager. This time it must succeed.
@@ -905,7 +916,7 @@
 bool PassManagerImpl_New::addPass(Pass *P) {
 
   if (!activeManager || !activeManager->addPass(P)) {
-activeManager = new ModulePassManager_New();
+activeManager = new ModulePassManager_New(getDepth() + 1);
 PassManagers.push_back(activeManager);
 return activeManager->addPass(P);
   }
@@ -930,7 +941,7 @@
 
 /// Create new pass manager
 PassManager_New::PassManager_New() {
-  PM = new PassManagerImpl_New();
+  PM = new PassManagerImpl_New(0);
 }
 
 /// add - Add a pass to the queue of passes to run.  This passes ownership of



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/Verifier.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/VMCore:

Verifier.cpp updated: 1.170 -> 1.171
---
Log message:

Don't use  in Streams.h but  instead.


---
Diffs of the changes:  (+1 -0)

 Verifier.cpp |1 +
 1 files changed, 1 insertion(+)


Index: llvm/lib/VMCore/Verifier.cpp
diff -u llvm/lib/VMCore/Verifier.cpp:1.170 llvm/lib/VMCore/Verifier.cpp:1.171
--- llvm/lib/VMCore/Verifier.cpp:1.170  Wed Dec  6 19:30:31 2006
+++ llvm/lib/VMCore/Verifier.cppThu Dec  7 17:41:45 2006
@@ -60,6 +60,7 @@
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/Compiler.h"
 #include 
+#include 
 #include 
 using namespace llvm;
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Support/Allocator.cpp CommandLine.cpp PluginLoader.cpp Statistic.cpp SystemUtils.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/Support:

Allocator.cpp updated: 1.4 -> 1.5
CommandLine.cpp updated: 1.80 -> 1.81
PluginLoader.cpp updated: 1.20 -> 1.21
Statistic.cpp updated: 1.21 -> 1.22
SystemUtils.cpp updated: 1.48 -> 1.49
---
Log message:

Don't use  in Streams.h but  instead.


---
Diffs of the changes:  (+5 -0)

 Allocator.cpp|1 +
 CommandLine.cpp  |1 +
 PluginLoader.cpp |1 +
 Statistic.cpp|1 +
 SystemUtils.cpp  |1 +
 5 files changed, 5 insertions(+)


Index: llvm/lib/Support/Allocator.cpp
diff -u llvm/lib/Support/Allocator.cpp:1.4 llvm/lib/Support/Allocator.cpp:1.5
--- llvm/lib/Support/Allocator.cpp:1.4  Wed Dec  6 19:30:31 2006
+++ llvm/lib/Support/Allocator.cpp  Thu Dec  7 17:41:45 2006
@@ -14,6 +14,7 @@
 #include "llvm/Support/Allocator.h"
 #include "llvm/Support/DataTypes.h"
 #include "llvm/Support/Streams.h"
+#include 
 using namespace llvm;
 
 
//===--===//


Index: llvm/lib/Support/CommandLine.cpp
diff -u llvm/lib/Support/CommandLine.cpp:1.80 
llvm/lib/Support/CommandLine.cpp:1.81
--- llvm/lib/Support/CommandLine.cpp:1.80   Wed Dec  6 19:30:31 2006
+++ llvm/lib/Support/CommandLine.cppThu Dec  7 17:41:45 2006
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 


Index: llvm/lib/Support/PluginLoader.cpp
diff -u llvm/lib/Support/PluginLoader.cpp:1.20 
llvm/lib/Support/PluginLoader.cpp:1.21
--- llvm/lib/Support/PluginLoader.cpp:1.20  Wed Dec  6 19:30:31 2006
+++ llvm/lib/Support/PluginLoader.cpp   Thu Dec  7 17:41:45 2006
@@ -15,6 +15,7 @@
 #include "llvm/Support/PluginLoader.h"
 #include "llvm/Support/Streams.h"
 #include "llvm/System/DynamicLibrary.h"
+#include 
 #include 
 using namespace llvm;
 


Index: llvm/lib/Support/Statistic.cpp
diff -u llvm/lib/Support/Statistic.cpp:1.21 llvm/lib/Support/Statistic.cpp:1.22
--- llvm/lib/Support/Statistic.cpp:1.21 Thu Dec  7 14:28:15 2006
+++ llvm/lib/Support/Statistic.cpp  Thu Dec  7 17:41:45 2006
@@ -26,6 +26,7 @@
 #include "llvm/Support/Streams.h"
 #include "llvm/ADT/StringExtras.h"
 #include 
+#include 
 using namespace llvm;
 
 // GetLibSupportInfoOutputFile - Return a file stream to print our output on...


Index: llvm/lib/Support/SystemUtils.cpp
diff -u llvm/lib/Support/SystemUtils.cpp:1.48 
llvm/lib/Support/SystemUtils.cpp:1.49
--- llvm/lib/Support/SystemUtils.cpp:1.48   Thu Dec  7 14:28:15 2006
+++ llvm/lib/Support/SystemUtils.cppThu Dec  7 17:41:45 2006
@@ -16,6 +16,7 @@
 #include "llvm/Support/SystemUtils.h"
 #include "llvm/System/Process.h"
 #include "llvm/System/Program.h"
+#include 
 using namespace llvm;
 
 bool llvm::CheckBytecodeOutputToConsole(std::ostream* stream_to_check,



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCJITInfo.cpp

2006-12-07 Thread Chris Lattner


Changes in directory llvm/lib/Target/PowerPC:

PPCJITInfo.cpp updated: 1.31 -> 1.32
---
Log message:

fix incorrect encoding of rldicr, used by ppc64 function stubs, etc.



---
Diffs of the changes:  (+1 -1)

 PPCJITInfo.cpp |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Target/PowerPC/PPCJITInfo.cpp
diff -u llvm/lib/Target/PowerPC/PPCJITInfo.cpp:1.31 
llvm/lib/Target/PowerPC/PPCJITInfo.cpp:1.32
--- llvm/lib/Target/PowerPC/PPCJITInfo.cpp:1.31 Thu Dec  7 16:21:48 2006
+++ llvm/lib/Target/PowerPC/PPCJITInfo.cpp  Thu Dec  7 17:44:07 2006
@@ -30,7 +30,7 @@
   ((25 << 26) | ((RS) << 21) | ((RD) << 16) | ((UIMM16) & 65535))
 #define BUILD_RLDICR(RD,RS,SH,ME) \
   ((30 << 26) | ((RS) << 21) | ((RD) << 16) | (((SH) & 31) << 11) | \
-   (((ME) & 63) << 6) | (1 << 3) | (((SH) >> 5) & 1))
+   (((ME) & 63) << 6) | (1 << 2) | SH) >> 5) & 1) << 1))
 #define BUILD_MTSPR(RS,SPR)  \
   ((31 << 26) | ((RS) << 21) | ((SPR) << 16) | (467 << 1))
 #define BUILD_BCCTRx(BO,BI,LINK) \



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/Support/Streams.h

2006-12-07 Thread Bill Wendling


Changes in directory llvm/include/llvm/Support:

Streams.h updated: 1.5 -> 1.6
---
Log message:

Don't use  in Streams.h but  instead.


---
Diffs of the changes:  (+1 -1)

 Streams.h |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/include/llvm/Support/Streams.h
diff -u llvm/include/llvm/Support/Streams.h:1.5 
llvm/include/llvm/Support/Streams.h:1.6
--- llvm/include/llvm/Support/Streams.h:1.5 Wed Dec  6 19:30:31 2006
+++ llvm/include/llvm/Support/Streams.h Thu Dec  7 17:41:45 2006
@@ -15,7 +15,7 @@
 #ifndef LLVM_SUPPORT_STREAMS_H
 #define LLVM_SUPPORT_STREAMS_H
 
-#include 
+#include 
 
 namespace llvm {
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/Target/CBackend:

Writer.cpp updated: 1.293 -> 1.294
---
Log message:

Don't use  in Streams.h but  instead.


---
Diffs of the changes:  (+1 -1)

 Writer.cpp |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Target/CBackend/Writer.cpp
diff -u llvm/lib/Target/CBackend/Writer.cpp:1.293 
llvm/lib/Target/CBackend/Writer.cpp:1.294
--- llvm/lib/Target/CBackend/Writer.cpp:1.293   Thu Dec  7 16:21:48 2006
+++ llvm/lib/Target/CBackend/Writer.cpp Thu Dec  7 17:41:45 2006
@@ -42,7 +42,7 @@
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Config/config.h"
 #include 
-#include 
+#include 
 using namespace llvm;
 
 namespace {



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Linker/LinkModules.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/Linker:

LinkModules.cpp updated: 1.121 -> 1.122
---
Log message:

Don't use  in Streams.h but  instead.


---
Diffs of the changes:  (+1 -0)

 LinkModules.cpp |1 +
 1 files changed, 1 insertion(+)


Index: llvm/lib/Linker/LinkModules.cpp
diff -u llvm/lib/Linker/LinkModules.cpp:1.121 
llvm/lib/Linker/LinkModules.cpp:1.122
--- llvm/lib/Linker/LinkModules.cpp:1.121   Wed Dec  6 19:30:31 2006
+++ llvm/lib/Linker/LinkModules.cpp Thu Dec  7 17:41:45 2006
@@ -25,6 +25,7 @@
 #include "llvm/Assembly/Writer.h"
 #include "llvm/Support/Streams.h"
 #include "llvm/System/Path.h"
+#include 
 using namespace llvm;
 
 // Error - Simple wrapper function to conditionally assign to E and return 
true.



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Debugger/SourceLanguage-Unknown.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/Debugger:

SourceLanguage-Unknown.cpp updated: 1.4 -> 1.5
---
Log message:

Don't use  in Streams.h but  instead.


---
Diffs of the changes:  (+1 -0)

 SourceLanguage-Unknown.cpp |1 +
 1 files changed, 1 insertion(+)


Index: llvm/lib/Debugger/SourceLanguage-Unknown.cpp
diff -u llvm/lib/Debugger/SourceLanguage-Unknown.cpp:1.4 
llvm/lib/Debugger/SourceLanguage-Unknown.cpp:1.5
--- llvm/lib/Debugger/SourceLanguage-Unknown.cpp:1.4Thu Dec  7 14:28:15 2006
+++ llvm/lib/Debugger/SourceLanguage-Unknown.cppThu Dec  7 17:41:45 2006
@@ -17,6 +17,7 @@
 #include "llvm/Debugger/ProgramInfo.h"
 #include "llvm/Support/Streams.h"
 #include 
+#include 
 using namespace llvm;
 
 
//===--===//



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.56 -> 1.57
---
Log message:

set Last User.


---
Diffs of the changes:  (+49 -5)

 PassManager.cpp |   54 +-
 1 files changed, 49 insertions(+), 5 deletions(-)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.56 
llvm/lib/VMCore/PassManager.cpp:1.57
--- llvm/lib/VMCore/PassManager.cpp:1.56Thu Dec  7 17:24:58 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 17:55:10 2006
@@ -243,6 +243,7 @@
 
   /// Initialize available analysis information.
   void initializeAnalysisInfo() { 
+ForcedLastUses.clear();
 AvailableAnalysis.clear();
 
 // Include immutable passes into AvailableAnalysis vector.
@@ -277,6 +278,17 @@
 
   unsigned getDepth() { return Depth; }
 
+protected:
+
+  // Collection of pass whose last user asked this manager to claim
+  // last use. If a FunctionPass F is the last user of ModulePass info M
+  // then the F's manager, not F, records itself as a last user of M.
+  std::vector ForcedLastUses;
+
+  // Top level manager.
+  // TODO : Make it a reference.
+  PMTopLevelManager *TPM;
+
 private:
   // Set of available Analysis. This information is used while scheduling 
   // pass. If a pass requires an analysis which is not not available then 
@@ -287,10 +299,6 @@
   // Collection of pass that are managed by this manager
   std::vector PassVector;
 
-  // Top level manager.
-  // TODO : Make it a reference.
-  PMTopLevelManager *TPM;
-
   unsigned Depth;
 };
 
@@ -384,7 +392,8 @@
 /// ModulePassManager_New manages ModulePasses and function pass managers.
 /// It batches all Module passes  passes and function pass managers together 
and
 /// sequence them to process one module.
-class ModulePassManager_New : public PMDataManager {
+class ModulePassManager_New : public Pass,
+  public PMDataManager {
  
 public:
   ModulePassManager_New(int D) : PMDataManager(D) { 
@@ -522,6 +531,33 @@
  bool ProcessAnalysis) {
 
   if (ProcessAnalysis) {
+
+// At the moment, this pass is the last user of all required passes.
+std::vector LastUses;
+std::vector RequiredPasses;
+unsigned PDepth = this->getDepth();
+
+collectRequiredAnalysisPasses(RequiredPasses, P);
+for (std::vector::iterator I = RequiredPasses.begin(),
+   E = RequiredPasses.end(); I != E; ++I) {
+  Pass *PRequired = *I;
+  unsigned RDepth = 0;
+  //FIXME: RDepth = PRequired->getResolver()->getDepth();
+  if (PDepth == RDepth)
+LastUses.push_back(PRequired);
+  else if (PDepth >  RDepth) {
+// Let the parent claim responsibility of last use
+ForcedLastUses.push_back(PRequired);
+  } else {
+// Note : This feature is not yet implemented
+assert (0 && 
+"Unable to handle Pass that requires lower level Analysis 
pass");
+  }
+}
+
+if (!LastUses.empty())
+  TPM->setLastUser(LastUses, P);
+
 // Take a note of analysis required and made available by this pass.
 // Remove the analysis not preserved by this pass
 initializeAnalysisImpl(P);
@@ -696,6 +732,10 @@
   if (!activeBBPassManager->addPass(BP))
 assert(0 && "Unable to add Pass");
 }
+
+if (!ForcedLastUses.empty())
+  TPM->setLastUser(ForcedLastUses, this);
+
 return true;
   }
 
@@ -836,6 +876,10 @@
   if (!activeFunctionPassManager->addPass(FP))
 assert(0 && "Unable to add pass");
 }
+
+if (!ForcedLastUses.empty())
+  TPM->setLastUser(ForcedLastUses, this);
+
 return true;
   }
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp AlphaLLRP.cpp AlphaTargetAsmInfo.cpp

2006-12-07 Thread Andrew Lenharth


Changes in directory llvm/lib/Target/Alpha:

AlphaAsmPrinter.cpp updated: 1.58 -> 1.59
AlphaLLRP.cpp updated: 1.5 -> 1.6
AlphaTargetAsmInfo.cpp updated: 1.4 -> 1.5
---
Log message:

Simplify a bit

---
Diffs of the changes:  (+15 -30)

 AlphaAsmPrinter.cpp|   41 +++--
 AlphaLLRP.cpp  |3 +++
 AlphaTargetAsmInfo.cpp |1 +
 3 files changed, 15 insertions(+), 30 deletions(-)


Index: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp
diff -u llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.58 
llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.59
--- llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.58  Thu Dec  7 16:21:48 2006
+++ llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp   Thu Dec  7 17:55:55 2006
@@ -33,20 +33,11 @@
 
 /// Unique incrementer for label values for referencing Global values.
 ///
-unsigned LabelNumber;
 
 AlphaAsmPrinter(std::ostream &o, TargetMachine &tm, const TargetAsmInfo *T)
-   : AsmPrinter(o, tm, T), LabelNumber(0) {
+  : AsmPrinter(o, tm, T) {
 }
 
-/// We name each basic block in a Function with a unique number, so
-/// that we can consistently refer to them later. This is cleared
-/// at the beginning of each call to runOnMachineFunction().
-///
-typedef std::map ValueMapTy;
-ValueMapTy NumberForBB;
-std::string CurSection;
-
 virtual const char *getPassName() const {
   return "Alpha Assembly Printer";
 }
@@ -54,7 +45,6 @@
 void printOp(const MachineOperand &MO, bool IsCallOp = false);
 void printOperand(const MachineInstr *MI, int opNum);
 void printBaseOffsetPair (const MachineInstr *MI, int i, bool 
brackets=true);
-void printMachineInstruction(const MachineInstr *MI);
 bool runOnMachineFunction(MachineFunction &F);
 bool doInitialization(Module &M);
 bool doFinalization(Module &M);
@@ -136,20 +126,6 @@
   }
 }
 
-/// printMachineInstruction -- Print out a single Alpha MI to
-/// the current output stream.
-///
-void AlphaAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
-  ++EmittedInsts;
-  if (printInstruction(MI))
-return; // Printer was automatically generated
-
-  assert(0 && "Unhandled instruction in asm writer!");
-  abort();
-  return;
-}
-
-
 /// runOnMachineFunction - This uses the printMachineInstruction()
 /// method to print assembly for each instruction.
 ///
@@ -177,7 +153,7 @@
  break;
   case Function::WeakLinkage:
   case Function::LinkOnceLinkage:
-O << "\t.weak " << CurrentFnName << "\n";
+O << TAI->getWeakRefDirective() << CurrentFnName << "\n";
 break;
   }
 
@@ -188,16 +164,21 @@
   // Print out code for the function.
   for (MachineFunction::const_iterator I = MF.begin(), E = MF.end();
I != E; ++I) {
-printBasicBlockLabel(I, true);
-O << '\n';
+if (I != MF.begin()) {
+  printBasicBlockLabel(I, true);
+  O << '\n';
+}
 for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
  II != E; ++II) {
   // Print the assembly for the instruction.
+  ++EmittedInsts;
   O << "\t";
-  printMachineInstruction(II);
+  if (!printInstruction(II)) {
+assert(0 && "Unhandled instruction in asm writer!");
+abort();
+  }
 }
   }
-  ++LabelNumber;
 
   O << "\t.end " << CurrentFnName << "\n";
 


Index: llvm/lib/Target/Alpha/AlphaLLRP.cpp
diff -u llvm/lib/Target/Alpha/AlphaLLRP.cpp:1.5 
llvm/lib/Target/Alpha/AlphaLLRP.cpp:1.6
--- llvm/lib/Target/Alpha/AlphaLLRP.cpp:1.5 Wed Dec  6 11:46:32 2006
+++ llvm/lib/Target/Alpha/AlphaLLRP.cpp Thu Dec  7 17:55:55 2006
@@ -117,6 +117,9 @@
 case Alpha::ALTENT:
 case Alpha::MEMLABEL:
 case Alpha::PCLABEL:
+case Alpha::IDEF_I:
+case Alpha::IDEF_F32:
+case Alpha::IDEF_F64:
   --count;
   break;
 case Alpha::BR:


Index: llvm/lib/Target/Alpha/AlphaTargetAsmInfo.cpp
diff -u llvm/lib/Target/Alpha/AlphaTargetAsmInfo.cpp:1.4 
llvm/lib/Target/Alpha/AlphaTargetAsmInfo.cpp:1.5
--- llvm/lib/Target/Alpha/AlphaTargetAsmInfo.cpp:1.4Fri Oct  6 17:52:33 2006
+++ llvm/lib/Target/Alpha/AlphaTargetAsmInfo.cppThu Dec  7 17:55:55 2006
@@ -20,4 +20,5 @@
   PrivateGlobalPrefix = "$";
   JumpTableDirective = ".gprel32";
   JumpTableDataSection = "\t.section .rodata\n";
+  WeakRefDirective = "\t.weak\t";
 }



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/SubtargetFeature.cpp

2006-12-07 Thread Bill Wendling


Changes in directory llvm/lib/Target:

SubtargetFeature.cpp updated: 1.11 -> 1.12
---
Log message:

Don't use  in Streams.h but  instead.


---
Diffs of the changes:  (+1 -0)

 SubtargetFeature.cpp |1 +
 1 files changed, 1 insertion(+)


Index: llvm/lib/Target/SubtargetFeature.cpp
diff -u llvm/lib/Target/SubtargetFeature.cpp:1.11 
llvm/lib/Target/SubtargetFeature.cpp:1.12
--- llvm/lib/Target/SubtargetFeature.cpp:1.11   Thu Dec  7 16:21:48 2006
+++ llvm/lib/Target/SubtargetFeature.cppThu Dec  7 17:41:45 2006
@@ -15,6 +15,7 @@
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/Support/Streams.h"
 #include 
+#include 
 #include 
 #include 
 using namespace llvm;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.57 -> 1.58
---
Log message:

Reimplement removeDeadPasses().


---
Diffs of the changes:  (+15 -1)

 PassManager.cpp |   16 +++-
 1 files changed, 15 insertions(+), 1 deletion(-)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.57 
llvm/lib/VMCore/PassManager.cpp:1.58
--- llvm/lib/VMCore/PassManager.cpp:1.57Thu Dec  7 17:55:10 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 18:37:52 2006
@@ -522,7 +522,21 @@
 
 /// Remove analysis passes that are not used any longer
 void PMDataManager::removeDeadPasses(Pass *P) {
-  // TODO : reimplement
+
+  std::vector DeadPasses;
+  TPM->collectLastUses(DeadPasses, P);
+
+  for (std::vector::iterator I = DeadPasses.begin(),
+ E = DeadPasses.end(); I != E; ++I) {
+(*I)->releaseMemory();
+
+std::map::iterator Pos = 
+  AvailableAnalysis.find((*I)->getPassInfo());
+
+// It is possible that deadPass is already removed from the 
AvailableAnalysis
+if (Pos != AvailableAnalysis.end())
+  AvailableAnalysis.erase(Pos);
+  }
 }
 
 /// Add pass P into the PassVector. Update 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.58 -> 1.59
---
Log message:

doInitialization and doFinalization for BasicBlockPassManager_New


---
Diffs of the changes:  (+60 -3)

 PassManager.cpp |   63 +---
 1 files changed, 60 insertions(+), 3 deletions(-)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.58 
llvm/lib/VMCore/PassManager.cpp:1.59
--- llvm/lib/VMCore/PassManager.cpp:1.58Thu Dec  7 18:37:52 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 18:59:05 2006
@@ -199,7 +199,6 @@
   addTopLevelPass(P);
 }
 
-
 
//===--===//
 // PMDataManager
 
@@ -327,7 +326,11 @@
 Info.setPreservesAll();
   }
 
-private:
+  bool doInitialization(Module &M);
+  bool doInitialization(Function &F);
+  bool doFinalization(Module &M);
+  bool doFinalization(Function &F);
+
 };
 
 /// FunctionPassManagerImpl_New manages FunctionPasses and 
BasicBlockPassManagers.
@@ -533,7 +536,7 @@
 std::map::iterator Pos = 
   AvailableAnalysis.find((*I)->getPassInfo());
 
-// It is possible that deadPass is already removed from the 
AvailableAnalysis
+// It is possible that pass is already removed from the AvailableAnalysis
 if (Pos != AvailableAnalysis.end())
   AvailableAnalysis.erase(Pos);
   }
@@ -669,6 +672,60 @@
   return getAnalysisPass(AID);
 }
 
+// Implement doInitialization and doFinalization
+inline bool BasicBlockPassManager_New::doInitialization(Module &M) {
+  bool Changed = false;
+
+  for (std::vector::iterator itr = passVectorBegin(),
+ e = passVectorEnd(); itr != e; ++itr) {
+Pass *P = *itr;
+BasicBlockPass *BP = dynamic_cast(P);
+Changed |= BP->doInitialization(M);
+  }
+
+  return Changed;
+}
+
+inline bool BasicBlockPassManager_New::doFinalization(Module &M) {
+  bool Changed = false;
+
+  for (std::vector::iterator itr = passVectorBegin(),
+ e = passVectorEnd(); itr != e; ++itr) {
+Pass *P = *itr;
+BasicBlockPass *BP = dynamic_cast(P);
+Changed |= BP->doFinalization(M);
+  }
+
+  return Changed;
+}
+
+inline bool BasicBlockPassManager_New::doInitialization(Function &F) {
+  bool Changed = false;
+
+  for (std::vector::iterator itr = passVectorBegin(),
+ e = passVectorEnd(); itr != e; ++itr) {
+Pass *P = *itr;
+BasicBlockPass *BP = dynamic_cast(P);
+Changed |= BP->doInitialization(F);
+  }
+
+  return Changed;
+}
+
+inline bool BasicBlockPassManager_New::doFinalization(Function &F) {
+  bool Changed = false;
+
+  for (std::vector::iterator itr = passVectorBegin(),
+ e = passVectorEnd(); itr != e; ++itr) {
+Pass *P = *itr;
+BasicBlockPass *BP = dynamic_cast(P);
+Changed |= BP->doFinalization(F);
+  }
+
+  return Changed;
+}
+
+
 
//===--===//
 // FunctionPassManager_New implementation
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

2006-12-07 Thread Devang Patel


Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.59 -> 1.60
---
Log message:

BasicBlockPassManager_New::runOnFunction()
Do initialization and finalization.


---
Diffs of the changes:  (+2 -2)

 PassManager.cpp |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.59 
llvm/lib/VMCore/PassManager.cpp:1.60
--- llvm/lib/VMCore/PassManager.cpp:1.59Thu Dec  7 18:59:05 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec  7 19:38:28 2006
@@ -649,7 +649,7 @@
 bool
 BasicBlockPassManager_New::runOnFunction(Function &F) {
 
-  bool Changed = false;
+  bool Changed = doInitialization(F);
   initializeAnalysisInfo();
 
   for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I)
@@ -663,7 +663,7 @@
   recordAvailableAnalysis(P);
   removeDeadPasses(P);
 }
-  return Changed;
+  return Changed | doFinalization(F);
 }
 
 /// Return true IFF AnalysisID AID is currently available.



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/README.txt

2006-12-07 Thread Chris Lattner


Changes in directory llvm/lib/Target:

README.txt updated: 1.50 -> 1.51
---
Log message:

add a note


---
Diffs of the changes:  (+10 -0)

 README.txt |   10 ++
 1 files changed, 10 insertions(+)


Index: llvm/lib/Target/README.txt
diff -u llvm/lib/Target/README.txt:1.50 llvm/lib/Target/README.txt:1.51
--- llvm/lib/Target/README.txt:1.50 Wed Nov 29 01:21:46 2006
+++ llvm/lib/Target/README.txt  Thu Dec  7 20:01:32 2006
@@ -303,6 +303,16 @@
   return v;
 }
 
+Nor is this (yes, it really is bswap):
+
+unsigned long reverse(unsigned v) {
+unsigned t;
+t = v ^ ((v << 16) | (v >> 16));
+t &= ~0xff;
+v = (v << 24) | (v >> 8);
+return v ^ (t >> 8);
+}
+
 //===-===//
 
 These should turn into single 16-bit (unaligned?) loads on little/big endian



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp PPCJITInfo.cpp PPCTargetMachine.cpp

2006-12-07 Thread Chris Lattner


Changes in directory llvm/lib/Target/PowerPC:

PPCCodeEmitter.cpp updated: 1.71 -> 1.72
PPCJITInfo.cpp updated: 1.32 -> 1.33
PPCTargetMachine.cpp updated: 1.108 -> 1.109
---
Log message:

this is an initial patch to switch the ppc64 jit over to working in PIC mode,
which allows the code to be above the 2G marker.  We still need to JIT emit
dyld stubs to support external, weak, common, etc globals, but that will 
happen tomorrow.



---
Diffs of the changes:  (+34 -5)

 PPCCodeEmitter.cpp   |   25 ++---
 PPCJITInfo.cpp   |2 ++
 PPCTargetMachine.cpp |   12 ++--
 3 files changed, 34 insertions(+), 5 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp
diff -u llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.71 
llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.72
--- llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.71 Thu Dec  7 16:21:48 2006
+++ llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp  Thu Dec  7 22:54:03 2006
@@ -31,6 +31,10 @@
 TargetMachine &TM;
 MachineCodeEmitter &MCE;
 
+/// MovePCtoLROffset - When/if we see a MovePCtoLR instruction, we record
+/// its address in the function into this pointer.
+void *MovePCtoLROffset;
+
 /// getMachineOpValue - evaluates the MachineOperand of a given 
MachineInstr
 ///
 int getMachineOpValue(MachineInstr &MI, MachineOperand &MO);
@@ -77,6 +81,7 @@
   MF.getTarget().getRelocationModel() != Reloc::Static) &&
  "JIT relocation model must be set to static or default!");
   do {
+MovePCtoLROffset = 0;
 MCE.startFunction(MF);
 for (MachineFunction::iterator BB = MF.begin(), E = MF.end(); BB != E; 
++BB)
   emitBasicBlock(*BB);
@@ -102,7 +107,9 @@
   break; // pseudo opcode, no side effects
 case PPC::MovePCtoLR:
 case PPC::MovePCtoLR8:
-  assert(0 && "CodeEmitter does not support MovePCtoLR instruction");
+  assert(TM.getRelocationModel() == Reloc::PIC_);
+  MovePCtoLROffset = (void*)MCE.getCurrentPCValue();
+  MCE.emitWordBE(0x4805);   // bl 1
   break;
 }
   }
@@ -129,6 +136,15 @@
 if (MI.getOpcode() == PPC::BL || MI.getOpcode() == PPC::BL8)
   Reloc = PPC::reloc_pcrel_bx;
 else {
+  // If in PIC mode, we need to encode the negated address of the
+  // 'movepctolr' into the unrelocated field.  After relocation, we'll have
+  // &gv-&movepctolr in the imm field.  Once &movepctolr is added to the 
imm
+  // field, we get &gv.
+  if (TM.getRelocationModel() == Reloc::PIC_) {
+assert(MovePCtoLROffset && "MovePCtoLR not seen yet?");
+rv = -(intptr_t)MovePCtoLROffset - 4;
+  }
+  
   switch (MI.getOpcode()) {
   default: MI.dump(); assert(0 && "Unknown instruction for relocation!");
   case PPC::LIS:
@@ -136,6 +152,7 @@
   case PPC::ADDIS:
   case PPC::ADDIS8:
 Reloc = PPC::reloc_absolute_high;   // Pointer to symbol
+rv >>= 16;
 break;
   case PPC::LI:
   case PPC::LI8:
@@ -156,6 +173,7 @@
   case PPC::STFS:
   case PPC::STFD:
 Reloc = PPC::reloc_absolute_low;
+rv &= 0x;
 break;
 
   case PPC::LWA:
@@ -163,6 +181,8 @@
   case PPC::STD:
   case PPC::STD_32:
 Reloc = PPC::reloc_absolute_low_ix;
+rv &= 0x;
+rv >>= 2;
 break;
   }
 }
@@ -185,8 +205,7 @@
 unsigned Opcode = MI.getOpcode();
 if (Opcode == PPC::B || Opcode == PPC::BL || Opcode == PPC::BLA)
   Reloc = PPC::reloc_pcrel_bx;
-else
-  // BLT,BLE,BEQ,BGE,BGT,BNE, or other bcx instruction
+else // BCC instruction
   Reloc = PPC::reloc_pcrel_bcx;
 MCE.addRelocation(MachineRelocation::getBB(MCE.getCurrentPCOffset(),
Reloc,


Index: llvm/lib/Target/PowerPC/PPCJITInfo.cpp
diff -u llvm/lib/Target/PowerPC/PPCJITInfo.cpp:1.32 
llvm/lib/Target/PowerPC/PPCJITInfo.cpp:1.33
--- llvm/lib/Target/PowerPC/PPCJITInfo.cpp:1.32 Thu Dec  7 17:44:07 2006
+++ llvm/lib/Target/PowerPC/PPCJITInfo.cpp  Thu Dec  7 22:54:03 2006
@@ -103,6 +103,7 @@
 // Arguments to Compilation Callback:
 // r3 - our lr (address of the call instruction in stub plus 4)
 // r4 - stub's lr (address of instruction that called the stub plus 4)
+// r5 - is64Bit - always 0.
 "mr   r3, r0\n"
 "lwz  r2, 208(r1)\n" // stub's frame
 "lwz  r4, 8(r2)\n" // stub's lr
@@ -164,6 +165,7 @@
 // Arguments to Compilation Callback:
 // r3 - our lr (address of the call instruction in stub plus 4)
 // r4 - stub's lr (address of instruction that called the stub plus 4)
+// r5 - is64Bit - always 1.
 "mr   r3, r0\n"
 "ld   r2, 208(r1)\n" // stub's frame
 "ld   r4, 16(r2)\n"  // stub's lr


Index: llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
diff -u llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.108 
llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.109
--- llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.108  Fri

[llvm-commits] CVS: llvm/autoconf/configure.ac

2006-12-07 Thread Chris Lattner


Changes in directory llvm/autoconf:

configure.ac updated: 1.253 -> 1.254
---
Log message:

this warning is obsolete with llvmgcc3 being gone


---
Diffs of the changes:  (+0 -8)

 configure.ac |8 
 1 files changed, 8 deletions(-)


Index: llvm/autoconf/configure.ac
diff -u llvm/autoconf/configure.ac:1.253 llvm/autoconf/configure.ac:1.254
--- llvm/autoconf/configure.ac:1.253Thu Nov 30 18:37:14 2006
+++ llvm/autoconf/configure.ac  Thu Dec  7 23:03:54 2006
@@ -834,11 +834,3 @@
 dnl Finally, crank out the output
 AC_OUTPUT
 
-dnl Warn loudly if llvm-gcc was not obviously working
-if test "$llvm_cv_llvmgcc_sanity" = "no" ; then
- AC_MSG_WARN([* llvm-gcc/llvm-g++ was not found, or does not appear to be 
])
- AC_MSG_WARN([* working. Please make sure you have llvm-gcc and llvm-g++ 
in])
- AC_MSG_WARN([* your path before configuring LLVM. The runtime libraries])
- AC_MSG_WARN([* (llvm/runtime) will not be built but you should be able 
to])
- AC_MSG_WARN([* build the llvm tools.])
-fi



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/configure

2006-12-07 Thread Reid Spencer


Changes in directory llvm:

configure updated: 1.258 -> 1.259
---
Log message:

Regenerate.


---
Diffs of the changes:  (+0 -12)

 configure |   12 
 1 files changed, 12 deletions(-)


Index: llvm/configure
diff -u llvm/configure:1.258 llvm/configure:1.259
--- llvm/configure:1.258Thu Nov 30 18:37:14 2006
+++ llvm/configure  Thu Dec  7 23:06:28 2006
@@ -34929,15 +34929,3 @@
 fi
 
 
-if test "$llvm_cv_llvmgcc_sanity" = "no" ; then
- { echo "$as_me:$LINENO: WARNING: * llvm-gcc/llvm-g++ was not found, or 
does not appear to be " >&5
-echo "$as_me: WARNING: * llvm-gcc/llvm-g++ was not found, or does not 
appear to be " >&2;}
- { echo "$as_me:$LINENO: WARNING: * working. Please make sure you have 
llvm-gcc and llvm-g++ in" >&5
-echo "$as_me: WARNING: * working. Please make sure you have llvm-gcc and 
llvm-g++ in" >&2;}
- { echo "$as_me:$LINENO: WARNING: * your path before configuring LLVM. The 
runtime libraries" >&5
-echo "$as_me: WARNING: * your path before configuring LLVM. The runtime 
libraries" >&2;}
- { echo "$as_me:$LINENO: WARNING: * (llvm/runtime) will not be built but 
you should be able to" >&5
-echo "$as_me: WARNING: * (llvm/runtime) will not be built but you should 
be able to" >&2;}
- { echo "$as_me:$LINENO: WARNING: * build the llvm tools." >&5
-echo "$as_me: WARNING: * build the llvm tools." >&2;}
-fi



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] CVS: llvm/autoconf/configure.ac

2006-12-07 Thread Chris Lattner
On Thu, 7 Dec 2006, Reid Spencer wrote:

> How about cleaning up the rest of it? There are checks to determine
> sanity all for the purpose of producing the message you deleted.

I think that makes a lot of sense, but I don't really feel confident 
removing the rest (inexperience with configure).  In particular, we 
currently still need LLVMGCC_VERSION/LLVMGCC_MAJVERS to be computed which 
depends on sanity, no?

I think it makes sense for llvm to still detect llvm-gcc (for use with 
llvm/test and llvm-test) but not require it.

-Chris

> On Thu, 2006-12-07 at 23:04 -0600, Chris Lattner wrote:
>>
>> Changes in directory llvm/autoconf:
>>
>> configure.ac updated: 1.253 -> 1.254
>> ---
>> Log message:
>>
>> this warning is obsolete with llvmgcc3 being gone
>>
>>
>> ---
>> Diffs of the changes:  (+0 -8)
>>
>>  configure.ac |8 
>>  1 files changed, 8 deletions(-)
>>
>>
>> Index: llvm/autoconf/configure.ac
>> diff -u llvm/autoconf/configure.ac:1.253 llvm/autoconf/configure.ac:1.254
>> --- llvm/autoconf/configure.ac:1.253 Thu Nov 30 18:37:14 2006
>> +++ llvm/autoconf/configure.ac   Thu Dec  7 23:03:54 2006
>> @@ -834,11 +834,3 @@
>>  dnl Finally, crank out the output
>>  AC_OUTPUT
>>
>> -dnl Warn loudly if llvm-gcc was not obviously working
>> -if test "$llvm_cv_llvmgcc_sanity" = "no" ; then
>> - AC_MSG_WARN([* llvm-gcc/llvm-g++ was not found, or does not appear to 
>> be ])
>> - AC_MSG_WARN([* working. Please make sure you have llvm-gcc and 
>> llvm-g++ in])
>> - AC_MSG_WARN([* your path before configuring LLVM. The runtime 
>> libraries])
>> - AC_MSG_WARN([* (llvm/runtime) will not be built but you should be able 
>> to])
>> - AC_MSG_WARN([* build the llvm tools.])
>> -fi
>>
>>
>>
>> ___
>> llvm-commits mailing list
>> llvm-commits@cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] CVS: llvm/autoconf/configure.ac

2006-12-07 Thread Reid Spencer
How about cleaning up the rest of it? There are checks to determine
sanity all for the purpose of producing the message you deleted.

REid.

On Thu, 2006-12-07 at 23:04 -0600, Chris Lattner wrote:
> 
> Changes in directory llvm/autoconf:
> 
> configure.ac updated: 1.253 -> 1.254
> ---
> Log message:
> 
> this warning is obsolete with llvmgcc3 being gone
> 
> 
> ---
> Diffs of the changes:  (+0 -8)
> 
>  configure.ac |8 
>  1 files changed, 8 deletions(-)
> 
> 
> Index: llvm/autoconf/configure.ac
> diff -u llvm/autoconf/configure.ac:1.253 llvm/autoconf/configure.ac:1.254
> --- llvm/autoconf/configure.ac:1.253  Thu Nov 30 18:37:14 2006
> +++ llvm/autoconf/configure.acThu Dec  7 23:03:54 2006
> @@ -834,11 +834,3 @@
>  dnl Finally, crank out the output
>  AC_OUTPUT
>  
> -dnl Warn loudly if llvm-gcc was not obviously working
> -if test "$llvm_cv_llvmgcc_sanity" = "no" ; then
> - AC_MSG_WARN([* llvm-gcc/llvm-g++ was not found, or does not appear to 
> be ])
> - AC_MSG_WARN([* working. Please make sure you have llvm-gcc and llvm-g++ 
> in])
> - AC_MSG_WARN([* your path before configuring LLVM. The runtime 
> libraries])
> - AC_MSG_WARN([* (llvm/runtime) will not be built but you should be able 
> to])
> - AC_MSG_WARN([* build the llvm tools.])
> -fi
> 
> 
> 
> ___
> llvm-commits mailing list
> llvm-commits@cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/X86/X86FloatingPoint.cpp

2006-12-07 Thread Chris Lattner


Changes in directory llvm/lib/Target/X86:

X86FloatingPoint.cpp updated: 1.65 -> 1.66
---
Log message:

Fix a bug introduced by the streams patch.  DEBUG code was made unconditional.


---
Diffs of the changes:  (+1 -1)

 X86FloatingPoint.cpp |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Target/X86/X86FloatingPoint.cpp
diff -u llvm/lib/Target/X86/X86FloatingPoint.cpp:1.65 
llvm/lib/Target/X86/X86FloatingPoint.cpp:1.66
--- llvm/lib/Target/X86/X86FloatingPoint.cpp:1.65   Thu Dec  7 16:21:48 2006
+++ llvm/lib/Target/X86/X86FloatingPoint.cppThu Dec  7 23:41:26 2006
@@ -210,7 +210,7 @@
 PrevMI = prior(I);
 
 ++NumFP;  // Keep track of # of pseudo instrs
-DOUT << "\nFPInst:\t"; MI->print(*cerr.stream(), &(MF.getTarget()));
+DOUT << "\nFPInst:\t" << *MI;
 
 // Get dead variables list now because the MI pointer may be deleted as 
part
 // of processing!



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/Target/TargetInstrInfo.h

2006-12-07 Thread Evan Cheng


Changes in directory llvm/include/llvm/Target:

TargetInstrInfo.h updated: 1.107 -> 1.108
---
Log message:

Use MI's TargetInstrDescriptor.

---
Diffs of the changes:  (+2 -1)

 TargetInstrInfo.h |3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/Target/TargetInstrInfo.h
diff -u llvm/include/llvm/Target/TargetInstrInfo.h:1.107 
llvm/include/llvm/Target/TargetInstrInfo.h:1.108
--- llvm/include/llvm/Target/TargetInstrInfo.h:1.107Fri Dec  1 15:46:55 2006
+++ llvm/include/llvm/Target/TargetInstrInfo.h  Fri Dec  8 01:56:02 2006
@@ -259,7 +259,8 @@
 
   /// findTiedToSrcOperand - Returns the operand that is tied to the specified
   /// dest operand. Returns -1 if there isn't one.
-  int findTiedToSrcOperand(MachineOpCode Opcode, unsigned OpNum) const;
+  int findTiedToSrcOperand(const TargetInstrDescriptor *TID,
+   unsigned OpNum) const;
 
   /// getDWARF_LABELOpcode - Return the opcode of the target's DWARF_LABEL
   /// instruction if it has one.  This is used by codegen passes that update



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/TargetInstrInfo.cpp

2006-12-07 Thread Evan Cheng


Changes in directory llvm/lib/Target:

TargetInstrInfo.cpp updated: 1.24 -> 1.25
---
Log message:

Use MI's TargetInstrDescriptor.

---
Diffs of the changes:  (+4 -5)

 TargetInstrInfo.cpp |9 -
 1 files changed, 4 insertions(+), 5 deletions(-)


Index: llvm/lib/Target/TargetInstrInfo.cpp
diff -u llvm/lib/Target/TargetInstrInfo.cpp:1.24 
llvm/lib/Target/TargetInstrInfo.cpp:1.25
--- llvm/lib/Target/TargetInstrInfo.cpp:1.24Fri Dec  1 15:50:57 2006
+++ llvm/lib/Target/TargetInstrInfo.cpp Fri Dec  8 01:57:56 2006
@@ -27,13 +27,12 @@
 
 /// findTiedToSrcOperand - Returns the operand that is tied to the specified
 /// dest operand. Returns -1 if there isn't one.
-int
-TargetInstrInfo::findTiedToSrcOperand(MachineOpCode Opc, unsigned OpNum) const 
{
-  for (unsigned i = 0, e = getNumOperands(Opc); i != e; ++i) {
+int TargetInstrInfo::findTiedToSrcOperand(const TargetInstrDescriptor *TID,
+  unsigned OpNum) const {
+  for (unsigned i = 0, e = TID->numOperands; i != e; ++i) {
 if (i == OpNum)
   continue;
-int ti = getOperandConstraint(Opc, i, TOI::TIED_TO);
-if (ti == (int)OpNum)
+if (TID->getOperandConstraint(i, TOI::TIED_TO) == (int)OpNum)
   return i;
   }
   return -1;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits