svn commit: r206124 - in vendor/llvm/dist: . docs include/llvm include/llvm/Analysis include/llvm/Assembly include/llvm/Bitcode include/llvm/CodeGen include/llvm/Support include/llvm/Target include...

Roman Divacky rdivacky at FreeBSD.org
Sat Apr 3 07:51:11 UTC 2010


Author: rdivacky
Date: Sat Apr  3 07:51:10 2010
New Revision: 206124
URL: http://svn.freebsd.org/changeset/base/206124

Log:
  Update LLVM to r100285.

Added:
  vendor/llvm/dist/lib/CodeGen/MachineFunctionPrinterPass.cpp
  vendor/llvm/dist/lib/Target/ARM/Disassembler/
  vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
  vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassembler.h
  vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp
  vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassemblerCore.h
  vendor/llvm/dist/lib/Target/ARM/Disassembler/Makefile
  vendor/llvm/dist/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h
  vendor/llvm/dist/test/CodeGen/X86/memset-3.ll
  vendor/llvm/dist/test/MC/Disassembler/arm-tests.txt
  vendor/llvm/dist/test/MC/Disassembler/neon-tests.txt
  vendor/llvm/dist/test/MC/Disassembler/thumb-tests.txt
  vendor/llvm/dist/test/Transforms/IndVarSimplify/crash.ll
  vendor/llvm/dist/test/Transforms/IndVarSimplify/dangling-use.ll
  vendor/llvm/dist/test/Transforms/IndVarSimplify/floating-point-iv.ll
  vendor/llvm/dist/utils/TableGen/ARMDecoderEmitter.cpp
  vendor/llvm/dist/utils/TableGen/ARMDecoderEmitter.h
Deleted:
  vendor/llvm/dist/test/Transforms/GVN/2010-03-31-RedundantPHIs.ll
  vendor/llvm/dist/test/Transforms/IndVarSimplify/2008-11-03-Floating.ll
  vendor/llvm/dist/test/Transforms/IndVarSimplify/2008-11-17-Floating.ll
Modified:
  vendor/llvm/dist/Makefile.rules
  vendor/llvm/dist/docs/ReleaseNotes.html
  vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h
  vendor/llvm/dist/include/llvm/Analysis/LoopPass.h
  vendor/llvm/dist/include/llvm/Assembly/PrintModulePass.h
  vendor/llvm/dist/include/llvm/BasicBlock.h
  vendor/llvm/dist/include/llvm/Bitcode/LLVMBitCodes.h
  vendor/llvm/dist/include/llvm/CallGraphSCCPass.h
  vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionPass.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h
  vendor/llvm/dist/include/llvm/CodeGen/Passes.h
  vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h
  vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h
  vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h
  vendor/llvm/dist/include/llvm/Instruction.h
  vendor/llvm/dist/include/llvm/IntrinsicsX86.td
  vendor/llvm/dist/include/llvm/Pass.h
  vendor/llvm/dist/include/llvm/Support/Allocator.h
  vendor/llvm/dist/include/llvm/Support/DebugLoc.h
  vendor/llvm/dist/include/llvm/Support/IRBuilder.h
  vendor/llvm/dist/include/llvm/Support/MathExtras.h
  vendor/llvm/dist/include/llvm/Support/SlowOperationInformer.h
  vendor/llvm/dist/include/llvm/Target/TargetLowering.h
  vendor/llvm/dist/include/llvm/Transforms/Utils/SSAUpdater.h
  vendor/llvm/dist/lib/Analysis/DebugInfo.cpp
  vendor/llvm/dist/lib/Analysis/IPA/CallGraphSCCPass.cpp
  vendor/llvm/dist/lib/Analysis/LoopPass.cpp
  vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp
  vendor/llvm/dist/lib/Bitcode/Writer/BitcodeWriter.cpp
  vendor/llvm/dist/lib/Bitcode/Writer/ValueEnumerator.cpp
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.h
  vendor/llvm/dist/lib/CodeGen/CMakeLists.txt
  vendor/llvm/dist/lib/CodeGen/DwarfEHPrepare.cpp
  vendor/llvm/dist/lib/CodeGen/MachineFunction.cpp
  vendor/llvm/dist/lib/CodeGen/MachineFunctionPass.cpp
  vendor/llvm/dist/lib/CodeGen/MachineInstr.cpp
  vendor/llvm/dist/lib/CodeGen/MachineSSAUpdater.cpp
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
  vendor/llvm/dist/lib/ExecutionEngine/JIT/JITEmitter.cpp
  vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp
  vendor/llvm/dist/lib/Target/ARM/ARMBaseRegisterInfo.cpp
  vendor/llvm/dist/lib/Target/ARM/ARMConstantIslandPass.cpp
  vendor/llvm/dist/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
  vendor/llvm/dist/lib/Target/ARM/Makefile
  vendor/llvm/dist/lib/Target/ARM/Thumb1InstrInfo.cpp
  vendor/llvm/dist/lib/Target/ARM/Thumb1RegisterInfo.cpp
  vendor/llvm/dist/lib/Target/ARM/Thumb2InstrInfo.cpp
  vendor/llvm/dist/lib/Target/Alpha/AlphaISelLowering.cpp
  vendor/llvm/dist/lib/Target/Alpha/AlphaInstrInfo.cpp
  vendor/llvm/dist/lib/Target/Alpha/AlphaLLRP.cpp
  vendor/llvm/dist/lib/Target/Alpha/AlphaRegisterInfo.cpp
  vendor/llvm/dist/lib/Target/Blackfin/BlackfinInstrInfo.cpp
  vendor/llvm/dist/lib/Target/Blackfin/BlackfinRegisterInfo.cpp
  vendor/llvm/dist/lib/Target/CellSPU/SPUInstrInfo.cpp
  vendor/llvm/dist/lib/Target/CellSPU/SPURegisterInfo.cpp
  vendor/llvm/dist/lib/Target/MBlaze/MBlazeInstrInfo.cpp
  vendor/llvm/dist/lib/Target/MBlaze/MBlazeRegisterInfo.cpp
  vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.cpp
  vendor/llvm/dist/lib/Target/MSP430/MSP430RegisterInfo.cpp
  vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.cpp
  vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.cpp
  vendor/llvm/dist/lib/Target/PIC16/PIC16DebugInfo.cpp
  vendor/llvm/dist/lib/Target/PIC16/PIC16InstrInfo.cpp
  vendor/llvm/dist/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
  vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp
  vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.h
  vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.cpp
  vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.cpp
  vendor/llvm/dist/lib/Target/Sparc/DelaySlotFiller.cpp
  vendor/llvm/dist/lib/Target/Sparc/SparcInstrInfo.cpp
  vendor/llvm/dist/lib/Target/Sparc/SparcRegisterInfo.cpp
  vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrInfo.cpp
  vendor/llvm/dist/lib/Target/SystemZ/SystemZRegisterInfo.cpp
  vendor/llvm/dist/lib/Target/X86/Disassembler/X86Disassembler.cpp
  vendor/llvm/dist/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c
  vendor/llvm/dist/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h
  vendor/llvm/dist/lib/Target/X86/X86.td
  vendor/llvm/dist/lib/Target/X86/X86FloatingPointRegKill.cpp
  vendor/llvm/dist/lib/Target/X86/X86ISelDAGToDAG.cpp
  vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp
  vendor/llvm/dist/lib/Target/X86/X86ISelLowering.h
  vendor/llvm/dist/lib/Target/X86/X86InstrFormats.td
  vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp
  vendor/llvm/dist/lib/Target/X86/X86InstrInfo.td
  vendor/llvm/dist/lib/Target/X86/X86InstrSSE.td
  vendor/llvm/dist/lib/Target/X86/X86Subtarget.cpp
  vendor/llvm/dist/lib/Target/X86/X86Subtarget.h
  vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.cpp
  vendor/llvm/dist/lib/Target/XCore/XCoreRegisterInfo.cpp
  vendor/llvm/dist/lib/Transforms/IPO/Internalize.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/IndVarSimplify.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/LoopUnswitch.cpp
  vendor/llvm/dist/lib/Transforms/Utils/SSAUpdater.cpp
  vendor/llvm/dist/lib/VMCore/BasicBlock.cpp
  vendor/llvm/dist/lib/VMCore/Core.cpp
  vendor/llvm/dist/lib/VMCore/DebugLoc.cpp
  vendor/llvm/dist/lib/VMCore/Metadata.cpp
  vendor/llvm/dist/lib/VMCore/Pass.cpp
  vendor/llvm/dist/lib/VMCore/PassManager.cpp
  vendor/llvm/dist/lib/VMCore/PrintModulePass.cpp
  vendor/llvm/dist/test/CodeGen/X86/memset-2.ll
  vendor/llvm/dist/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
  vendor/llvm/dist/tools/llvmc/plugins/Base/Base.td.in
  vendor/llvm/dist/utils/TableGen/CMakeLists.txt
  vendor/llvm/dist/utils/TableGen/DisassemblerEmitter.cpp
  vendor/llvm/dist/utils/TableGen/TableGen.cpp

Modified: vendor/llvm/dist/Makefile.rules
==============================================================================
--- vendor/llvm/dist/Makefile.rules	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/Makefile.rules	Sat Apr  3 07:51:10 2010	(r206124)
@@ -1612,6 +1612,11 @@ $(ObjDir)/%GenIntrinsics.inc.tmp : %.td 
 	$(Echo) "Building $(<F) intrinsics information with tblgen"
 	$(Verb) $(TableGen) -gen-tgt-intrinsic -o $(call SYSPATH, $@) $<
 
+$(ObjDir)/ARMGenDecoderTables.inc.tmp : ARM.td $(ObjDir)/.dir
+	$(Echo) "Building $(<F) decoder tables with tblgen"
+	$(Verb) $(TableGen) -gen-arm-decoder -o $(call SYSPATH, $@) $<
+
+
 clean-local::
 	-$(Verb) $(RM) -f $(INCFiles)
 

Modified: vendor/llvm/dist/docs/ReleaseNotes.html
==============================================================================
--- vendor/llvm/dist/docs/ReleaseNotes.html	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/docs/ReleaseNotes.html	Sat Apr  3 07:51:10 2010	(r206124)
@@ -221,15 +221,35 @@ License, a "BSD-style" license.</p>
 
 <!--=========================================================================-->
 <div class="doc_subsection">
-<a name="dragonegg">DragonEgg: GCC-4.5 as an LLVM frontend</a>
+<a name="dragonegg">DragonEgg: llvm-gcc ported to gcc-4.5</a>
 </div>
 
 <div class="doc_text">
 <p>
-The goal of <a href="http://dragonegg.llvm.org/">DragonEgg</a> is to make
-gcc-4.5 act like llvm-gcc without requiring any gcc modifications whatsoever.
-<a href="http://dragonegg.llvm.org/">DragonEgg</a> is a shared library (dragonegg.so)
-that is loaded by gcc at runtime.  It ...
+<a href="http://dragonegg.llvm.org/">DragonEgg</a> is a port of llvm-gcc to
+gcc-4.5.  Unlike llvm-gcc, which makes many intrusive changes to the underlying
+gcc-4.2 code, dragonegg in theory does not require any gcc-4.5 modifications
+whatsoever (currently one small patch is needed).  This is thanks to the new
+<a href="http://gcc.gnu.org/wiki/plugins">gcc plugin architecture</a>, which
+makes it possible to modify the behaviour of gcc at runtime by loading a plugin,
+which is nothing more than a dynamic library which conforms to the gcc plugin
+interface.  DragonEgg is a gcc plugin that causes the LLVM optimizers to be run
+instead of the gcc optimizers, and the LLVM code generators instead of the gcc
+code generators, just like llvm-gcc.  To use it, you add
+"-fplugin=path/dragonegg.so" to the gcc-4.5 command line, and gcc-4.5 magically
+becomes llvm-gcc-4.5!
+</p>
+
+<p>
+DragonEgg is still a work in progress.  Currently C works very well, while C++,
+Ada and Fortran work fairly well.  All other languages either don't work at all,
+or only work poorly.  For the moment only the x86-32 and x86-64 targets are
+supported, and only on linux.
+</p>
+
+<p>
+DragonEgg has not yet been released.  Once gcc-4.5 has been released, dragonegg
+will probably be released as part of the following LLVM release.
 </p>
 
 </div>
@@ -1058,7 +1078,7 @@ lists</a>.</p>
   src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a>
 
   <a href="http://llvm.org/">LLVM Compiler Infrastructure</a><br>
-  Last modified: $Date: 2010-04-01 03:53:24 +0200 (Thu, 01 Apr 2010) $
+  Last modified: $Date: 2010-04-02 11:23:15 +0200 (Fri, 02 Apr 2010) $
 </address>
 
 </body>

Modified: vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h
==============================================================================
--- vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h	Sat Apr  3 07:51:10 2010	(r206124)
@@ -31,8 +31,6 @@ namespace llvm {
   class Type;
   class Value;
   class DbgDeclareInst;
-  class DebugLoc;
-  struct DebugLocTracker;
   class Instruction;
   class MDNode;
   class LLVMContext;
@@ -710,11 +708,6 @@ namespace llvm {
                        std::string &Type, unsigned &LineNo, std::string &File,
                        std::string &Dir);
 
-  /// ExtractDebugLocation - Extract debug location information
-  /// from DILocation.
-  DebugLoc ExtractDebugLocation(DILocation &Loc,
-                                DebugLocTracker &DebugLocInfo);
-
   /// getDISubprogram - Find subprogram that is enclosing this scope.
   DISubprogram getDISubprogram(MDNode *Scope);
 

Modified: vendor/llvm/dist/include/llvm/Analysis/LoopPass.h
==============================================================================
--- vendor/llvm/dist/include/llvm/Analysis/LoopPass.h	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/include/llvm/Analysis/LoopPass.h	Sat Apr  3 07:51:10 2010	(r206124)
@@ -31,6 +31,10 @@ public:
   explicit LoopPass(intptr_t pid) : Pass(PT_Loop, pid) {}
   explicit LoopPass(void *pid) : Pass(PT_Loop, pid) {}
 
+  /// getPrinterPass - Get a pass to print the function corresponding
+  /// to a Loop.
+  Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const;
+
   // runOnLoop - This method should be implemented by the subclass to perform
   // whatever action is necessary for the specified Loop.
   virtual bool runOnLoop(Loop *L, LPPassManager &LPM) = 0;

Modified: vendor/llvm/dist/include/llvm/Assembly/PrintModulePass.h
==============================================================================
--- vendor/llvm/dist/include/llvm/Assembly/PrintModulePass.h	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/include/llvm/Assembly/PrintModulePass.h	Sat Apr  3 07:51:10 2010	(r206124)
@@ -27,7 +27,9 @@ namespace llvm {
   
   /// createPrintModulePass - Create and return a pass that writes the
   /// module to the specified raw_ostream.
-  ModulePass *createPrintModulePass(raw_ostream *OS, bool DeleteStream=false);
+  ModulePass *createPrintModulePass(raw_ostream *OS,
+                                    bool DeleteStream=false,
+                                    const std::string &Banner = "");
   
   /// createPrintFunctionPass - Create and return a pass that prints
   /// functions to the specified raw_ostream as they are processed.

Modified: vendor/llvm/dist/include/llvm/BasicBlock.h
==============================================================================
--- vendor/llvm/dist/include/llvm/BasicBlock.h	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/include/llvm/BasicBlock.h	Sat Apr  3 07:51:10 2010	(r206124)
@@ -131,6 +131,12 @@ public:
   const Instruction* getFirstNonPHI() const {
     return const_cast<BasicBlock*>(this)->getFirstNonPHI();
   }
+
+  // Same as above, but also skip debug intrinsics.
+  Instruction* getFirstNonPHIOrDbg();
+  const Instruction* getFirstNonPHIOrDbg() const {
+    return const_cast<BasicBlock*>(this)->getFirstNonPHIOrDbg();
+  }
   
   /// removeFromParent - This method unlinks 'this' from the containing
   /// function, but does not delete it.

Modified: vendor/llvm/dist/include/llvm/Bitcode/LLVMBitCodes.h
==============================================================================
--- vendor/llvm/dist/include/llvm/Bitcode/LLVMBitCodes.h	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/include/llvm/Bitcode/LLVMBitCodes.h	Sat Apr  3 07:51:10 2010	(r206124)
@@ -240,7 +240,10 @@ namespace bitc {
     // new select on i1 or [N x i1]
     FUNC_CODE_INST_VSELECT     = 29, // VSELECT:    [ty,opval,opval,predty,pred]
     FUNC_CODE_INST_INBOUNDS_GEP= 30, // INBOUNDS_GEP: [n x operands]
-    FUNC_CODE_INST_INDIRECTBR  = 31  // INDIRECTBR: [opty, op0, op1, ...]
+    FUNC_CODE_INST_INDIRECTBR  = 31, // INDIRECTBR: [opty, op0, op1, ...]
+    
+    FUNC_CODE_DEBUG_LOC        = 32, // DEBUG_LOC: [Line,Col,ScopeVal, IAVal]
+    FUNC_CODE_DEBUG_LOC_AGAIN  = 33  // DEBUG_LOC_AGAIN
   };
 } // End bitc namespace
 } // End llvm namespace

Modified: vendor/llvm/dist/include/llvm/CallGraphSCCPass.h
==============================================================================
--- vendor/llvm/dist/include/llvm/CallGraphSCCPass.h	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/include/llvm/CallGraphSCCPass.h	Sat Apr  3 07:51:10 2010	(r206124)
@@ -35,6 +35,10 @@ struct CallGraphSCCPass : public Pass {
   explicit CallGraphSCCPass(intptr_t pid) : Pass(PT_CallGraphSCC, pid) {}
   explicit CallGraphSCCPass(void *pid) : Pass(PT_CallGraphSCC, pid) {}
 
+  /// createPrinterPass - Get a pass that prints the Module
+  /// corresponding to a CallGraph.
+  Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const;
+
   /// doInitialization - This method is called before the SCC's of the program
   /// has been processed, allowing the pass to do initialization as necessary.
   virtual bool doInitialization(CallGraph &CG) {

Modified: vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h
==============================================================================
--- vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h	Sat Apr  3 07:51:10 2010	(r206124)
@@ -19,6 +19,7 @@
 #include "llvm/CodeGen/MachineFunctionPass.h"
 #include "llvm/Support/DebugLoc.h"
 #include "llvm/Target/TargetMachine.h"
+#include "llvm/ADT/DenseMap.h"
 
 namespace llvm {
   class BlockAddress;

Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h
==============================================================================
--- vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h	Sat Apr  3 07:51:10 2010	(r206124)
@@ -26,7 +26,6 @@
 
 namespace llvm {
 
-class DILocation;
 class Value;
 class Function;
 class MachineRegisterInfo;
@@ -112,9 +111,6 @@ class MachineFunction {
   // of a function.
   DebugLoc DefaultDebugLoc;
 
-  // Tracks debug locations.
-  DebugLocTracker DebugLocInfo;
-
   /// FunctionNumber - This provides a unique ID for each function emitted in
   /// this translation unit.
   ///
@@ -402,9 +398,6 @@ public:
   // Debug location.
   //
 
-  /// getDILocation - Get the DILocation for a given DebugLoc object.
-  DILocation getDILocation(DebugLoc DL) const;
-
   /// getDefaultDebugLoc - Get the default debug location for the machine
   /// function.
   DebugLoc getDefaultDebugLoc() const { return DefaultDebugLoc; }
@@ -412,9 +405,6 @@ public:
   /// setDefaultDebugLoc - Get the default debug location for the machine
   /// function.
   void setDefaultDebugLoc(DebugLoc DL) { DefaultDebugLoc = DL; }
-
-  /// getDebugLocInfo - Get the debug info location tracker.
-  DebugLocTracker &getDebugLocInfo() { return DebugLocInfo; }
 };
 
 //===--------------------------------------------------------------------===//

Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionPass.h
==============================================================================
--- vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionPass.h	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionPass.h	Sat Apr  3 07:51:10 2010	(r206124)
@@ -34,6 +34,9 @@ protected:
   explicit MachineFunctionPass(intptr_t ID) : FunctionPass(ID) {}
   explicit MachineFunctionPass(void *ID) : FunctionPass(ID) {}
 
+  /// createPrinterPass - Get a machine function printer pass.
+  Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const;
+
   /// runOnMachineFunction - This method must be overloaded to perform the
   /// desired machine code transformation or analysis.
   ///

Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h
==============================================================================
--- vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h	Sat Apr  3 07:51:10 2010	(r206124)
@@ -16,12 +16,13 @@
 #ifndef LLVM_CODEGEN_MACHINEINSTR_H
 #define LLVM_CODEGEN_MACHINEINSTR_H
 
-#include "llvm/ADT/ilist.h"
-#include "llvm/ADT/ilist_node.h"
-#include "llvm/ADT/STLExtras.h"
 #include "llvm/CodeGen/MachineOperand.h"
 #include "llvm/Target/TargetInstrDesc.h"
 #include "llvm/Target/TargetOpcodes.h"
+#include "llvm/ADT/ilist.h"
+#include "llvm/ADT/ilist_node.h"
+#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/DenseMapInfo.h"
 #include "llvm/Support/DebugLoc.h"
 #include <vector>
 

Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h
==============================================================================
--- vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h	Sat Apr  3 07:51:10 2010	(r206124)
@@ -37,6 +37,7 @@
 #include "llvm/CodeGen/MachineLocation.h"
 #include "llvm/MC/MCContext.h"
 #include "llvm/Support/Dwarf.h"
+#include "llvm/Support/DebugLoc.h"
 #include "llvm/Support/ValueHandle.h"
 #include "llvm/System/DataTypes.h"
 #include "llvm/ADT/DenseMap.h"
@@ -156,8 +157,8 @@ class MachineModuleInfo : public Immutab
 public:
   static char ID; // Pass identification, replacement for typeid
 
-  typedef std::pair<unsigned, TrackingVH<MDNode> > UnsignedAndMDNodePair;
-  typedef SmallVector< std::pair<TrackingVH<MDNode>, UnsignedAndMDNodePair>, 4>
+  typedef std::pair<unsigned, DebugLoc> UnsignedDebugLocPair;
+  typedef SmallVector<std::pair<TrackingVH<MDNode>, UnsignedDebugLocPair>, 4>
     VariableDbgInfoMapTy;
   VariableDbgInfoMapTy VariableDbgInfo;
 
@@ -330,10 +331,10 @@ public:
   /// of one is required to emit exception handling info.
   Function *getPersonality() const;
 
-  /// setVariableDbgInfo - Collect information used to emit debugging information
-  /// of a variable.
-  void setVariableDbgInfo(MDNode *N, unsigned Slot, MDNode *Scope) {
-    VariableDbgInfo.push_back(std::make_pair(N, std::make_pair(Slot, Scope)));
+  /// setVariableDbgInfo - Collect information used to emit debugging
+  /// information of a variable.
+  void setVariableDbgInfo(MDNode *N, unsigned Slot, DebugLoc Loc) {
+    VariableDbgInfo.push_back(std::make_pair(N, std::make_pair(Slot, Loc)));
   }
 
   VariableDbgInfoMapTy &getVariableDbgInfo() {  return VariableDbgInfo;  }

Modified: vendor/llvm/dist/include/llvm/CodeGen/Passes.h
==============================================================================
--- vendor/llvm/dist/include/llvm/CodeGen/Passes.h	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/include/llvm/CodeGen/Passes.h	Sat Apr  3 07:51:10 2010	(r206124)
@@ -21,6 +21,7 @@
 namespace llvm {
 
   class FunctionPass;
+  class MachineFunctionPass;
   class PassInfo;
   class TargetLowering;
   class RegisterCoalescer;
@@ -36,8 +37,9 @@ namespace llvm {
 
   /// MachineFunctionPrinter pass - This pass prints out the machine function to
   /// the given stream, as a debugging tool.
-  FunctionPass *createMachineFunctionPrinterPass(raw_ostream &OS,
-                                                 const std::string &Banner ="");
+  MachineFunctionPass *
+  createMachineFunctionPrinterPass(raw_ostream &OS,
+                                   const std::string &Banner ="");
 
   /// MachineLoopInfo pass - This pass is a loop analysis pass.
   /// 

Modified: vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h
==============================================================================
--- vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h	Sat Apr  3 07:51:10 2010	(r206124)
@@ -461,8 +461,7 @@ public:
   SDValue getCALLSEQ_START(SDValue Chain, SDValue Op) {
     SDVTList VTs = getVTList(MVT::Other, MVT::Flag);
     SDValue Ops[] = { Chain,  Op };
-    return getNode(ISD::CALLSEQ_START, DebugLoc::getUnknownLoc(),
-                   VTs, Ops, 2);
+    return getNode(ISD::CALLSEQ_START, DebugLoc(), VTs, Ops, 2);
   }
 
   /// getCALLSEQ_END - Return a new CALLSEQ_END node, which always must have a
@@ -476,20 +475,19 @@ public:
     Ops.push_back(Op1);
     Ops.push_back(Op2);
     Ops.push_back(InFlag);
-    return getNode(ISD::CALLSEQ_END, DebugLoc::getUnknownLoc(), NodeTys,
-                   &Ops[0],
+    return getNode(ISD::CALLSEQ_END, DebugLoc(), NodeTys, &Ops[0],
                    (unsigned)Ops.size() - (InFlag.getNode() == 0 ? 1 : 0));
   }
 
   /// getUNDEF - Return an UNDEF node.  UNDEF does not have a useful DebugLoc.
   SDValue getUNDEF(EVT VT) {
-    return getNode(ISD::UNDEF, DebugLoc::getUnknownLoc(), VT);
+    return getNode(ISD::UNDEF, DebugLoc(), VT);
   }
 
   /// getGLOBAL_OFFSET_TABLE - Return a GLOBAL_OFFSET_TABLE node.  This does
   /// not have a useful DebugLoc.
   SDValue getGLOBAL_OFFSET_TABLE(EVT VT) {
-    return getNode(ISD::GLOBAL_OFFSET_TABLE, DebugLoc::getUnknownLoc(), VT);
+    return getNode(ISD::GLOBAL_OFFSET_TABLE, DebugLoc(), VT);
   }
 
   /// getNode - Gets or creates the specified node.

Modified: vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h
==============================================================================
--- vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h	Sat Apr  3 07:51:10 2010	(r206124)
@@ -1569,8 +1569,7 @@ public:
 #else
   explicit HandleSDNode(SDValue X)
 #endif
-    : SDNode(ISD::HANDLENODE, DebugLoc::getUnknownLoc(),
-             getSDVTList(MVT::Other)) {
+    : SDNode(ISD::HANDLENODE, DebugLoc(), getSDVTList(MVT::Other)) {
     InitOperands(&Op, X);
   }
   ~HandleSDNode();
@@ -1801,7 +1800,7 @@ class ConstantSDNode : public SDNode {
   friend class SelectionDAG;
   ConstantSDNode(bool isTarget, const ConstantInt *val, EVT VT)
     : SDNode(isTarget ? ISD::TargetConstant : ISD::Constant,
-             DebugLoc::getUnknownLoc(), getSDVTList(VT)), Value(val) {
+             DebugLoc(), getSDVTList(VT)), Value(val) {
   }
 public:
 
@@ -1825,7 +1824,7 @@ class ConstantFPSDNode : public SDNode {
   friend class SelectionDAG;
   ConstantFPSDNode(bool isTarget, const ConstantFP *val, EVT VT)
     : SDNode(isTarget ? ISD::TargetConstantFP : ISD::ConstantFP,
-             DebugLoc::getUnknownLoc(), getSDVTList(VT)), Value(val) {
+             DebugLoc(), getSDVTList(VT)), Value(val) {
   }
 public:
 
@@ -1896,7 +1895,7 @@ class FrameIndexSDNode : public SDNode {
   friend class SelectionDAG;
   FrameIndexSDNode(int fi, EVT VT, bool isTarg)
     : SDNode(isTarg ? ISD::TargetFrameIndex : ISD::FrameIndex,
-      DebugLoc::getUnknownLoc(), getSDVTList(VT)), FI(fi) {
+      DebugLoc(), getSDVTList(VT)), FI(fi) {
   }
 public:
 
@@ -1915,7 +1914,7 @@ class JumpTableSDNode : public SDNode {
   friend class SelectionDAG;
   JumpTableSDNode(int jti, EVT VT, bool isTarg, unsigned char TF)
     : SDNode(isTarg ? ISD::TargetJumpTable : ISD::JumpTable,
-      DebugLoc::getUnknownLoc(), getSDVTList(VT)), JTI(jti), TargetFlags(TF) {
+      DebugLoc(), getSDVTList(VT)), JTI(jti), TargetFlags(TF) {
   }
 public:
 
@@ -1941,7 +1940,7 @@ class ConstantPoolSDNode : public SDNode
   ConstantPoolSDNode(bool isTarget, Constant *c, EVT VT, int o, unsigned Align,
                      unsigned char TF)
     : SDNode(isTarget ? ISD::TargetConstantPool : ISD::ConstantPool,
-             DebugLoc::getUnknownLoc(),
+             DebugLoc(),
              getSDVTList(VT)), Offset(o), Alignment(Align), TargetFlags(TF) {
     assert((int)Offset >= 0 && "Offset is too large");
     Val.ConstVal = c;
@@ -1949,7 +1948,7 @@ class ConstantPoolSDNode : public SDNode
   ConstantPoolSDNode(bool isTarget, MachineConstantPoolValue *v,
                      EVT VT, int o, unsigned Align, unsigned char TF)
     : SDNode(isTarget ? ISD::TargetConstantPool : ISD::ConstantPool,
-             DebugLoc::getUnknownLoc(),
+             DebugLoc(),
              getSDVTList(VT)), Offset(o), Alignment(Align), TargetFlags(TF) {
     assert((int)Offset >= 0 && "Offset is too large");
     Val.MachineCPVal = v;
@@ -1997,8 +1996,7 @@ class BasicBlockSDNode : public SDNode {
   /// blocks out of order when they're jumped to, which makes it a bit
   /// harder.  Let's see if we need it first.
   explicit BasicBlockSDNode(MachineBasicBlock *mbb)
-    : SDNode(ISD::BasicBlock, DebugLoc::getUnknownLoc(),
-             getSDVTList(MVT::Other)), MBB(mbb) {
+    : SDNode(ISD::BasicBlock, DebugLoc(), getSDVTList(MVT::Other)), MBB(mbb) {
   }
 public:
 
@@ -2044,8 +2042,7 @@ class SrcValueSDNode : public SDNode {
   friend class SelectionDAG;
   /// Create a SrcValue for a general value.
   explicit SrcValueSDNode(const Value *v)
-    : SDNode(ISD::SRCVALUE, DebugLoc::getUnknownLoc(),
-             getSDVTList(MVT::Other)), V(v) {}
+    : SDNode(ISD::SRCVALUE, DebugLoc(), getSDVTList(MVT::Other)), V(v) {}
 
 public:
   /// getValue - return the contained Value.
@@ -2062,8 +2059,7 @@ class RegisterSDNode : public SDNode {
   unsigned Reg;
   friend class SelectionDAG;
   RegisterSDNode(unsigned reg, EVT VT)
-    : SDNode(ISD::Register, DebugLoc::getUnknownLoc(),
-             getSDVTList(VT)), Reg(reg) {
+    : SDNode(ISD::Register, DebugLoc(), getSDVTList(VT)), Reg(reg) {
   }
 public:
 
@@ -2081,7 +2077,7 @@ class BlockAddressSDNode : public SDNode
   friend class SelectionDAG;
   BlockAddressSDNode(unsigned NodeTy, EVT VT, BlockAddress *ba,
                      unsigned char Flags)
-    : SDNode(NodeTy, DebugLoc::getUnknownLoc(), getSDVTList(VT)),
+    : SDNode(NodeTy, DebugLoc(), getSDVTList(VT)),
              BA(ba), TargetFlags(Flags) {
   }
 public:
@@ -2119,8 +2115,7 @@ class ExternalSymbolSDNode : public SDNo
   friend class SelectionDAG;
   ExternalSymbolSDNode(bool isTarget, const char *Sym, unsigned char TF, EVT VT)
     : SDNode(isTarget ? ISD::TargetExternalSymbol : ISD::ExternalSymbol,
-             DebugLoc::getUnknownLoc(),
-             getSDVTList(VT)), Symbol(Sym), TargetFlags(TF) {
+             DebugLoc(), getSDVTList(VT)), Symbol(Sym), TargetFlags(TF) {
   }
 public:
 
@@ -2138,8 +2133,8 @@ class CondCodeSDNode : public SDNode {
   ISD::CondCode Condition;
   friend class SelectionDAG;
   explicit CondCodeSDNode(ISD::CondCode Cond)
-    : SDNode(ISD::CONDCODE, DebugLoc::getUnknownLoc(),
-             getSDVTList(MVT::Other)), Condition(Cond) {
+    : SDNode(ISD::CONDCODE, DebugLoc(), getSDVTList(MVT::Other)),
+      Condition(Cond) {
   }
 public:
 
@@ -2296,8 +2291,8 @@ class VTSDNode : public SDNode {
   EVT ValueType;
   friend class SelectionDAG;
   explicit VTSDNode(EVT VT)
-    : SDNode(ISD::VALUETYPE, DebugLoc::getUnknownLoc(),
-             getSDVTList(MVT::Other)), ValueType(VT) {
+    : SDNode(ISD::VALUETYPE, DebugLoc(), getSDVTList(MVT::Other)),
+      ValueType(VT) {
   }
 public:
 

Modified: vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h
==============================================================================
--- vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h	Sat Apr  3 07:51:10 2010	(r206124)
@@ -22,11 +22,11 @@
 #ifndef LLVM_CODEGEN_SLOTINDEXES_H
 #define LLVM_CODEGEN_SLOTINDEXES_H
 
-#include "llvm/ADT/PointerIntPair.h"
-#include "llvm/ADT/SmallVector.h"
 #include "llvm/CodeGen/MachineBasicBlock.h"
 #include "llvm/CodeGen/MachineFunctionPass.h"
-#include "llvm/CodeGen/MachineInstr.h"
+#include "llvm/ADT/PointerIntPair.h"
+#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/DenseMap.h"
 #include "llvm/Support/Allocator.h"
 #include "llvm/Support/ErrorHandling.h"
 

Modified: vendor/llvm/dist/include/llvm/Instruction.h
==============================================================================
--- vendor/llvm/dist/include/llvm/Instruction.h	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/include/llvm/Instruction.h	Sat Apr  3 07:51:10 2010	(r206124)
@@ -32,7 +32,7 @@ class Instruction : public User, public 
   Instruction(const Instruction &);        // Do not implement
 
   BasicBlock *Parent;
-  NewDebugLoc DbgLoc;                      // 'dbg' Metadata cache.
+  DebugLoc DbgLoc;                         // 'dbg' Metadata cache.
   
   enum {
     /// HasMetadataBit - This is a bit stored in the SubClassData field which
@@ -181,10 +181,10 @@ public:
   }
 
   /// setDebugLoc - Set the debug location information for this instruction.
-  void setDebugLoc(const NewDebugLoc &Loc) { DbgLoc = Loc; }
+  void setDebugLoc(const DebugLoc &Loc) { DbgLoc = Loc; }
   
   /// getDebugLoc - Return the debug location for this node as a DebugLoc.
-  const NewDebugLoc &getDebugLoc() const { return DbgLoc; }
+  const DebugLoc &getDebugLoc() const { return DbgLoc; }
   
 private:
   /// hasMetadataHashEntry - Return true if we have an entry in the on-the-side

Modified: vendor/llvm/dist/include/llvm/IntrinsicsX86.td
==============================================================================
--- vendor/llvm/dist/include/llvm/IntrinsicsX86.td	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/include/llvm/IntrinsicsX86.td	Sat Apr  3 07:51:10 2010	(r206124)
@@ -782,7 +782,7 @@ let TargetPrefix = "x86" in {  // All in
 // Advanced Encryption Standard (AES) Instructions
 let TargetPrefix = "x86" in {  // All intrinsics start with "llvm.x86.".
   def int_x86_aesni_aesimc          : GCCBuiltin<"__builtin_ia32_aesimc128">,
-              Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty],
+              Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty],
                         [IntrNoMem]>;
   def int_x86_aesni_aesenc          : GCCBuiltin<"__builtin_ia32_aesenc128">,
               Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty],
@@ -797,7 +797,7 @@ let TargetPrefix = "x86" in {  // All in
               Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty],
                         [IntrNoMem]>;
   def int_x86_aesni_aeskeygenassist : 
-              GCCBuiltin<"__builtin_ia32_aeskeygenassist">,
+              GCCBuiltin<"__builtin_ia32_aeskeygenassist128">,
               Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty],
                         [IntrNoMem]>;
 }

Modified: vendor/llvm/dist/include/llvm/Pass.h
==============================================================================
--- vendor/llvm/dist/include/llvm/Pass.h	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/include/llvm/Pass.h	Sat Apr  3 07:51:10 2010	(r206124)
@@ -30,7 +30,9 @@
 #define LLVM_PASS_H
 
 #include "llvm/System/DataTypes.h"
+
 #include <cassert>
+#include <string>
 #include <utility>
 #include <vector>
 
@@ -120,6 +122,11 @@ public:
   virtual void print(raw_ostream &O, const Module *M) const;
   void dump() const; // dump - Print to stderr.
 
+  /// createPrinterPass - Get a Pass appropriate to print the IR this
+  /// pass operates one (Module, Function or MachineFunction).
+  virtual Pass *createPrinterPass(raw_ostream &O,
+                                  const std::string &Banner) const = 0;
+
   /// Each pass is responsible for assigning a pass manager to itself.
   /// PMS is the stack of available pass manager. 
   virtual void assignPassManager(PMStack &, 
@@ -233,6 +240,9 @@ public:
 ///
 class ModulePass : public Pass {
 public:
+  /// createPrinterPass - Get a module printer pass.
+  Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const;
+
   /// runOnModule - Virtual method overriden by subclasses to process the module
   /// being operated on.
   virtual bool runOnModule(Module &M) = 0;
@@ -293,6 +303,9 @@ public:
   explicit FunctionPass(intptr_t pid) : Pass(PT_Function, pid) {}
   explicit FunctionPass(const void *pid) : Pass(PT_Function, pid) {}
 
+  /// createPrinterPass - Get a function printer pass.
+  Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const;
+
   /// doInitialization - Virtual method overridden by subclasses to do
   /// any necessary per-module initialization.
   ///
@@ -343,6 +356,9 @@ public:
   explicit BasicBlockPass(intptr_t pid) : Pass(PT_BasicBlock, pid) {}
   explicit BasicBlockPass(const void *pid) : Pass(PT_BasicBlock, pid) {}
 
+  /// createPrinterPass - Get a function printer pass.
+  Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const;
+
   /// doInitialization - Virtual method overridden by subclasses to do
   /// any necessary per-module initialization.
   ///

Modified: vendor/llvm/dist/include/llvm/Support/Allocator.h
==============================================================================
--- vendor/llvm/dist/include/llvm/Support/Allocator.h	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/include/llvm/Support/Allocator.h	Sat Apr  3 07:51:10 2010	(r206124)
@@ -200,7 +200,7 @@ public:
     while (Slab) {
       char *End = Slab == Allocator.CurSlab ? Allocator.CurPtr :
                                               (char *)Slab + Slab->Size;
-      for (char *Ptr = (char*)Slab+1; Ptr < End; Ptr += sizeof(T)) {
+      for (char *Ptr = (char*)(Slab+1); Ptr < End; Ptr += sizeof(T)) {
         Ptr = Allocator.AlignPtr(Ptr, alignof<T>());
 	if (Ptr + sizeof(T) <= End)
           reinterpret_cast<T*>(Ptr)->~T();

Modified: vendor/llvm/dist/include/llvm/Support/DebugLoc.h
==============================================================================
--- vendor/llvm/dist/include/llvm/Support/DebugLoc.h	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/include/llvm/Support/DebugLoc.h	Sat Apr  3 07:51:10 2010	(r206124)
@@ -12,11 +12,8 @@
 // 
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_DEBUGLOC_H
-#define LLVM_DEBUGLOC_H
-
-#include "llvm/ADT/DenseMap.h"
-#include <vector>
+#ifndef LLVM_SUPPORT_DEBUGLOC_H
+#define LLVM_SUPPORT_DEBUGLOC_H
 
 namespace llvm {
   class MDNode;
@@ -25,7 +22,7 @@ namespace llvm {
   /// DebugLoc - Debug location id.  This is carried by Instruction, SDNode,
   /// and MachineInstr to compactly encode file/line/scope information for an
   /// operation.
-  class NewDebugLoc {
+  class DebugLoc {
     /// LineCol - This 32-bit value encodes the line and column number for the
     /// location, encoded as 24-bits for line and 8 bits for col.  A value of 0
     /// for either means unknown.
@@ -35,15 +32,15 @@ namespace llvm {
     /// decoded by LLVMContext.  0 is unknown.
     int ScopeIdx;
   public:
-    NewDebugLoc() : LineCol(0), ScopeIdx(0) {}  // Defaults to unknown.
+    DebugLoc() : LineCol(0), ScopeIdx(0) {}  // Defaults to unknown.
     
     /// get - Get a new DebugLoc that corresponds to the specified line/col
     /// scope/inline location.
-    static NewDebugLoc get(unsigned Line, unsigned Col,
-                           MDNode *Scope, MDNode *InlinedAt = 0);
+    static DebugLoc get(unsigned Line, unsigned Col,
+                        MDNode *Scope, MDNode *InlinedAt = 0);
     
-    /// getFromDILocation - Translate the DILocation quad into a NewDebugLoc.
-    static NewDebugLoc getFromDILocation(MDNode *N);
+    /// getFromDILocation - Translate the DILocation quad into a DebugLoc.
+    static DebugLoc getFromDILocation(MDNode *N);
     
     /// isUnknown - Return true if this is an unknown location.
     bool isUnknown() const { return ScopeIdx == 0; }
@@ -73,48 +70,11 @@ namespace llvm {
     /// DILocation compatible MDNode.
     MDNode *getAsMDNode(const LLVMContext &Ctx) const;
     
-    bool operator==(const NewDebugLoc &DL) const {
+    bool operator==(const DebugLoc &DL) const {
       return LineCol == DL.LineCol && ScopeIdx == DL.ScopeIdx;
     }
-    bool operator!=(const NewDebugLoc &DL) const { return !(*this == DL); }
-  };
-  
-  
-
-  /// DebugLoc - Debug location id. This is carried by SDNode and MachineInstr
-  /// to index into a vector of unique debug location tuples.
-  class DebugLoc {
-    unsigned Idx;
-  public:
-    DebugLoc() : Idx(~0U) {}  // Defaults to invalid.
-
-    static DebugLoc getUnknownLoc()   { DebugLoc L; L.Idx = ~0U; return L; }
-    static DebugLoc get(unsigned idx) { DebugLoc L; L.Idx = idx; return L; }
-
-    unsigned getIndex() const { return Idx; }
-
-    /// isUnknown - Return true if there is no debug info for the SDNode /
-    /// MachineInstr.
-    bool isUnknown() const { return Idx == ~0U; }
-
-    bool operator==(const DebugLoc &DL) const { return Idx == DL.Idx; }
     bool operator!=(const DebugLoc &DL) const { return !(*this == DL); }
   };
-
-  /// DebugLocTracker - This class tracks debug location information.
-  ///
-  struct DebugLocTracker {
-    /// DebugLocations - A vector of unique DebugLocTuple's.
-    ///
-    std::vector<MDNode *> DebugLocations;
-
-    /// DebugIdMap - This maps DebugLocTuple's to indices into the
-    /// DebugLocations vector.
-    DenseMap<MDNode *, unsigned> DebugIdMap;
-
-    DebugLocTracker() {}
-  };
-  
 } // end namespace llvm
 
 #endif /* LLVM_DEBUGLOC_H */

Modified: vendor/llvm/dist/include/llvm/Support/IRBuilder.h
==============================================================================
--- vendor/llvm/dist/include/llvm/Support/IRBuilder.h	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/include/llvm/Support/IRBuilder.h	Sat Apr  3 07:51:10 2010	(r206124)
@@ -40,7 +40,7 @@ protected:
 
 /// IRBuilderBase - Common base class shared among various IRBuilders.
 class IRBuilderBase {
-  NewDebugLoc CurDbgLocation;
+  DebugLoc CurDbgLocation;
 protected:
   BasicBlock *BB;
   BasicBlock::iterator InsertPt;
@@ -82,13 +82,13 @@ public:
   
   /// SetCurrentDebugLocation - Set location information used by debugging
   /// information.
-  void SetCurrentDebugLocation(const NewDebugLoc &L) {
+  void SetCurrentDebugLocation(const DebugLoc &L) {
     CurDbgLocation = L;
   }
   
   /// getCurrentDebugLocation - Get location information used by debugging
   /// information.
-  const NewDebugLoc &getCurrentDebugLocation() const { return CurDbgLocation; }
+  const DebugLoc &getCurrentDebugLocation() const { return CurDbgLocation; }
   
   /// SetInstDebugLocation - If this builder has a current debug location, set
   /// it on the specified instruction.

Modified: vendor/llvm/dist/include/llvm/Support/MathExtras.h
==============================================================================
--- vendor/llvm/dist/include/llvm/Support/MathExtras.h	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/include/llvm/Support/MathExtras.h	Sat Apr  3 07:51:10 2010	(r206124)
@@ -457,6 +457,18 @@ inline int64_t abs64(int64_t x) {
   return (x < 0) ? -x : x;
 }
 
+/// SignExtend32 - Sign extend B-bit number x to 32-bit int.
+/// Usage int32_t r = SignExtend32<5>(x);
+template <unsigned B> inline int32_t SignExtend32(int32_t x) {
+  return (x << (32 - B)) >> (32 - B);
+}
+
+/// SignExtend64 - Sign extend B-bit number x to 64-bit int.
+/// Usage int64_t r = SignExtend64<5>(x);
+template <unsigned B> inline int64_t SignExtend64(int32_t x) {
+  return (x << (64 - B)) >> (64 - B);
+}
+
 } // End llvm namespace
 
 #endif

Modified: vendor/llvm/dist/include/llvm/Support/SlowOperationInformer.h
==============================================================================
--- vendor/llvm/dist/include/llvm/Support/SlowOperationInformer.h	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/include/llvm/Support/SlowOperationInformer.h	Sat Apr  3 07:51:10 2010	(r206124)
@@ -41,7 +41,7 @@ namespace llvm {
     SlowOperationInformer(const SlowOperationInformer&);   // DO NOT IMPLEMENT
     void operator=(const SlowOperationInformer&);          // DO NOT IMPLEMENT
   public:
-    SlowOperationInformer(const std::string &Name);
+    explicit SlowOperationInformer(const std::string &Name);
     ~SlowOperationInformer();
 
     /// progress - Clients should periodically call this method when they can

Modified: vendor/llvm/dist/include/llvm/Target/TargetLowering.h
==============================================================================
--- vendor/llvm/dist/include/llvm/Target/TargetLowering.h	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/include/llvm/Target/TargetLowering.h	Sat Apr  3 07:51:10 2010	(r206124)
@@ -633,15 +633,19 @@ public:
   }
 
   /// getOptimalMemOpType - Returns the target specific optimal type for load
-  /// and store operations as a result of memset, memcpy, and memmove lowering.
-  /// If DstAlign is zero that means it's safe to destination alignment can
-  /// satisfy any constraint. Similarly if SrcAlign is zero it means there isn't
-  /// a need to check it against alignment requirement, probably because the
-  /// source does not need to be loaded. It returns EVT::Other if SelectionDAG
-  /// should be responsible for determining it.
+  /// and store operations as a result of memset, memcpy, and memmove
+  /// lowering. If DstAlign is zero that means it's safe to destination
+  /// alignment can satisfy any constraint. Similarly if SrcAlign is zero it
+  /// means there isn't a need to check it against alignment requirement,
+  /// probably because the source does not need to be loaded. If
+  /// 'NonScalarIntSafe' is true, that means it's safe to return a
+  /// non-scalar-integer type, e.g. empty string source, constant, or loaded
+  /// from memory. It returns EVT::Other if SelectionDAG should be responsible
+  /// for determining it.
   virtual EVT getOptimalMemOpType(uint64_t Size,
                                   unsigned DstAlign, unsigned SrcAlign,
-                                  bool SafeToUseFP, SelectionDAG &DAG) const {
+                                  bool NonScalarIntSafe,
+                                  SelectionDAG &DAG) const {
     return MVT::Other;
   }
   

Modified: vendor/llvm/dist/include/llvm/Transforms/Utils/SSAUpdater.h
==============================================================================
--- vendor/llvm/dist/include/llvm/Transforms/Utils/SSAUpdater.h	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/include/llvm/Transforms/Utils/SSAUpdater.h	Sat Apr  3 07:51:10 2010	(r206124)
@@ -27,28 +27,22 @@ namespace llvm {
 /// transformation wants to rewrite a set of uses of one value with uses of a
 /// set of values.
 class SSAUpdater {
-public:
-  class BBInfo;
-
-private:
   /// AvailableVals - This keeps track of which value to use on a per-block
-  /// basis.  When we insert PHI nodes, we keep track of them here.
-  //typedef DenseMap<BasicBlock*, Value*> AvailableValsTy;
+  /// basis.  When we insert PHI nodes, we keep track of them here.  We use
+  /// TrackingVH's for the value of the map because we RAUW PHI nodes when we
+  /// eliminate them, and want the TrackingVH's to track this.
+  //typedef DenseMap<BasicBlock*, TrackingVH<Value> > AvailableValsTy;
   void *AV;
 
   /// PrototypeValue is an arbitrary representative value, which we derive names
   /// and a type for PHI nodes.
   Value *PrototypeValue;
 
-  /// BBMap - The GetValueAtEndOfBlock method maintains this mapping from
-  /// basic blocks to BBInfo structures.
-  /// typedef DenseMap<BasicBlock*, BBInfo*> BBMapTy;
-  void *BM;
-
-  /// Allocator - The GetValueAtEndOfBlock method uses this BumpPtrAllocator to
-  /// hold its internal data.  The allocator and its storage is created and
-  /// discarded for each invocation of GetValueAtEndOfBlock.
-  void *BPA;
+  /// IncomingPredInfo - We use this as scratch space when doing our recursive
+  /// walk.  This should only be used in GetValueInBlockInternal, normally it
+  /// should be empty.
+  //std::vector<std::pair<BasicBlock*, TrackingVH<Value> > > IncomingPredInfo;
+  void *IPI;
 
   /// InsertedPHIs - If this is non-null, the SSAUpdater adds all PHI nodes that
   /// it creates to the vector.
@@ -105,14 +99,6 @@ public:
 
 private:
   Value *GetValueAtEndOfBlockInternal(BasicBlock *BB);
-  void FindPHIPlacement(BasicBlock *BB, BBInfo *Info, bool &Changed,
-                        unsigned Counter);
-  void FindAvailableVal(BasicBlock *BB, BBInfo *Info, unsigned Counter);
-  void FindExistingPHI(BasicBlock *BB);
-  bool CheckIfPHIMatches(PHINode *PHI);
-  void RecordMatchingPHI(PHINode *PHI);
-  void ClearPHITags(PHINode *PHI);
-
   void operator=(const SSAUpdater&); // DO NOT IMPLEMENT
   SSAUpdater(const SSAUpdater&);     // DO NOT IMPLEMENT
 };

Modified: vendor/llvm/dist/lib/Analysis/DebugInfo.cpp
==============================================================================
--- vendor/llvm/dist/lib/Analysis/DebugInfo.cpp	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/lib/Analysis/DebugInfo.cpp	Sat Apr  3 07:51:10 2010	(r206124)
@@ -24,7 +24,6 @@
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/Dwarf.h"
-#include "llvm/Support/DebugLoc.h"
 #include "llvm/Support/raw_ostream.h"
 using namespace llvm;
 using namespace llvm::dwarf;
@@ -1147,16 +1146,31 @@ Instruction *DIFactory::InsertDbgValueIn
 
 /// processModule - Process entire module and collect debug info.
 void DebugInfoFinder::processModule(Module &M) {
-  unsigned MDDbgKind = M.getMDKindID("dbg");
-
   for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
     for (Function::iterator FI = (*I).begin(), FE = (*I).end(); FI != FE; ++FI)
       for (BasicBlock::iterator BI = (*FI).begin(), BE = (*FI).end(); BI != BE;
            ++BI) {
-        if (DbgDeclareInst *DDI = dyn_cast<DbgDeclareInst>(BI))
+        if (DbgDeclareInst *DDI = dyn_cast<DbgDeclareInst>(BI)) {
           processDeclare(DDI);
-        else if (MDNode *L = BI->getMetadata(MDDbgKind)) 
-          processLocation(DILocation(L));
+          continue;
+        }
+        
+        DebugLoc Loc = BI->getDebugLoc();
+        if (Loc.isUnknown())
+          continue;
+        
+        LLVMContext &Ctx = BI->getContext();
+        DIDescriptor Scope(Loc.getScope(Ctx));
+        
+        if (Scope.isCompileUnit())
+          addCompileUnit(DICompileUnit(Scope.getNode()));
+        else if (Scope.isSubprogram())
+          processSubprogram(DISubprogram(Scope.getNode()));
+        else if (Scope.isLexicalBlock())
+          processLexicalBlock(DILexicalBlock(Scope.getNode()));
+        
+        if (MDNode *IA = Loc.getInlinedAt(Ctx))
+          processLocation(DILocation(IA));
       }
 
   NamedMDNode *NMD = M.getNamedMetadata("llvm.dbg.gv");
@@ -1372,23 +1386,6 @@ bool llvm::getLocationInfo(const Value *
   return true;
 }
 
-/// ExtractDebugLocation - Extract debug location information
-/// from DILocation.
-DebugLoc llvm::ExtractDebugLocation(DILocation &Loc,
-                                    DebugLocTracker &DebugLocInfo) {
-  DenseMap<MDNode *, unsigned>::iterator II
-    = DebugLocInfo.DebugIdMap.find(Loc.getNode());
-  if (II != DebugLocInfo.DebugIdMap.end())
-    return DebugLoc::get(II->second);
-
-  // Add a new location entry.
-  unsigned Id = DebugLocInfo.DebugLocations.size();
-  DebugLocInfo.DebugLocations.push_back(Loc.getNode());
-  DebugLocInfo.DebugIdMap[Loc.getNode()] = Id;
-
-  return DebugLoc::get(Id);
-}
-
 /// getDISubprogram - Find subprogram that is enclosing this scope.
 DISubprogram llvm::getDISubprogram(MDNode *Scope) {
   DIDescriptor D(Scope);

Modified: vendor/llvm/dist/lib/Analysis/IPA/CallGraphSCCPass.cpp
==============================================================================
--- vendor/llvm/dist/lib/Analysis/IPA/CallGraphSCCPass.cpp	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/lib/Analysis/IPA/CallGraphSCCPass.cpp	Sat Apr  3 07:51:10 2010	(r206124)
@@ -87,10 +87,40 @@ private:
                         bool IsCheckingMode);
 };
 
+/// PrintCallGraphPass - Print a Module corresponding to a call graph.
+///
+class PrintCallGraphPass : public CallGraphSCCPass {
+private:
+  std::string Banner;
+  raw_ostream &Out;       // raw_ostream to print on.
+
+public:
+  static char ID;
+  PrintCallGraphPass() : CallGraphSCCPass(&ID), Out(dbgs()) {}
+  PrintCallGraphPass(const std::string &B, raw_ostream &o)
+      : CallGraphSCCPass(&ID), Banner(B), Out(o) {}
+
+  virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+    AU.setPreservesAll();
+  }
+
+  bool runOnSCC(std::vector<CallGraphNode *> &SCC) {
+    Out << Banner;
+    for (std::vector<CallGraphNode *>::iterator n = SCC.begin(), ne = SCC.end();
+         n != ne;
+         ++n) {
+      (*n)->getFunction()->print(Out);
+    }
+    return false;
+  }
+};
+
 } // end anonymous namespace.
 
 char CGPassManager::ID = 0;
 
+char PrintCallGraphPass::ID = 0;
+
 bool CGPassManager::RunPassOnSCC(Pass *P, std::vector<CallGraphNode*> &CurSCC,
                                  CallGraph &CG, bool &CallGraphUpToDate) {
   bool Changed = false;
@@ -396,6 +426,11 @@ bool CGPassManager::doFinalization(CallG
   return Changed;
 }
 
+Pass *CallGraphSCCPass::createPrinterPass(raw_ostream &O,
+                                          const std::string &Banner) const {
+  return new PrintCallGraphPass(Banner, O);
+}
+
 /// Assign pass manager to manage this pass.
 void CallGraphSCCPass::assignPassManager(PMStack &PMS,
                                          PassManagerType PreferredType) {

Modified: vendor/llvm/dist/lib/Analysis/LoopPass.cpp
==============================================================================
--- vendor/llvm/dist/lib/Analysis/LoopPass.cpp	Sat Apr  3 07:27:32 2010	(r206123)
+++ vendor/llvm/dist/lib/Analysis/LoopPass.cpp	Sat Apr  3 07:51:10 2010	(r206124)
@@ -14,9 +14,44 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Analysis/LoopPass.h"
+#include "llvm/Assembly/PrintModulePass.h"
+#include "llvm/Support/Debug.h"
 #include "llvm/Support/Timer.h"
 using namespace llvm;
 
+namespace {
+
+/// PrintLoopPass - Print a Function corresponding to a Loop.
+///
+class PrintLoopPass : public LoopPass {
+private:
+  std::string Banner;
+  raw_ostream &Out;       // raw_ostream to print on.
+
+public:
+  static char ID;
+  PrintLoopPass() : LoopPass(&ID), Out(dbgs()) {}
+  PrintLoopPass(const std::string &B, raw_ostream &o)
+      : LoopPass(&ID), Banner(B), Out(o) {}
+
+  virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+    AU.setPreservesAll();
+  }
+
+  bool runOnLoop(Loop *L, LPPassManager &) {
+    Out << Banner;
+    for (Loop::block_iterator b = L->block_begin(), be = L->block_end();
+         b != be;
+         ++b) {
+      (*b)->print(Out);
+    }
+    return false;
+  }
+};

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-all mailing list