Date: Tue, 6 Apr 2010 15:52:58 +0000 (UTC) From: Roman Divacky <rdivacky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r206274 - in vendor/llvm/dist: docs include/llvm include/llvm/ADT include/llvm/CodeGen include/llvm/MC include/llvm/MC/MCParser include/llvm/Support include/llvm/Target include/llvm/Tra... Message-ID: <201004061552.o36FqwOh009618@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rdivacky Date: Tue Apr 6 15:52:58 2010 New Revision: 206274 URL: http://svn.freebsd.org/changeset/base/206274 Log: Update LLVM to r100520. Added: vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp vendor/llvm/dist/test/CodeGen/X86/unreachable-loop-sinking.ll Deleted: vendor/llvm/dist/include/llvm/CodeGen/DwarfWriter.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfPrinter.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfWriter.cpp vendor/llvm/dist/lib/Target/ARM/Disassembler/Makefile Modified: vendor/llvm/dist/docs/HowToReleaseLLVM.html vendor/llvm/dist/docs/Lexicon.html vendor/llvm/dist/docs/SourceLevelDebugging.html vendor/llvm/dist/docs/WritingAnLLVMBackend.html vendor/llvm/dist/include/llvm/ADT/OwningPtr.h vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h vendor/llvm/dist/include/llvm/CodeGen/FastISel.h vendor/llvm/dist/include/llvm/CodeGen/GCMetadataPrinter.h vendor/llvm/dist/include/llvm/CodeGen/MachineDominators.h vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionAnalysis.h vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h vendor/llvm/dist/include/llvm/CodeGen/ScheduleDAG.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h vendor/llvm/dist/include/llvm/IntrinsicInst.h vendor/llvm/dist/include/llvm/Intrinsics.td vendor/llvm/dist/include/llvm/LLVMContext.h vendor/llvm/dist/include/llvm/MC/MCAsmInfo.h vendor/llvm/dist/include/llvm/MC/MCInstPrinter.h vendor/llvm/dist/include/llvm/MC/MCParser/AsmParser.h vendor/llvm/dist/include/llvm/MC/MCSection.h vendor/llvm/dist/include/llvm/MC/MCSectionELF.h vendor/llvm/dist/include/llvm/MC/MCStreamer.h vendor/llvm/dist/include/llvm/Support/Allocator.h vendor/llvm/dist/include/llvm/Support/IRBuilder.h vendor/llvm/dist/include/llvm/Support/IRReader.h vendor/llvm/dist/include/llvm/Support/MathExtras.h vendor/llvm/dist/include/llvm/Support/MemoryBuffer.h vendor/llvm/dist/include/llvm/Support/SourceMgr.h vendor/llvm/dist/include/llvm/Target/Target.td vendor/llvm/dist/include/llvm/Target/TargetLowering.h vendor/llvm/dist/include/llvm/Target/TargetRegistry.h vendor/llvm/dist/include/llvm/Transforms/Utils/BuildLibCalls.h vendor/llvm/dist/lib/Analysis/IVUsers.cpp vendor/llvm/dist/lib/AsmParser/Parser.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp vendor/llvm/dist/lib/CodeGen/GCMetadataPrinter.cpp vendor/llvm/dist/lib/CodeGen/LLVMTargetMachine.cpp vendor/llvm/dist/lib/CodeGen/MachineFunction.cpp vendor/llvm/dist/lib/CodeGen/MachineFunctionAnalysis.cpp vendor/llvm/dist/lib/CodeGen/MachineModuleInfo.cpp vendor/llvm/dist/lib/CodeGen/MachineSink.cpp vendor/llvm/dist/lib/CodeGen/PrologEpilogInserter.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp 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/ExecutionEngine/JIT/OProfileJITEventListener.cpp vendor/llvm/dist/lib/MC/MCAsmInfo.cpp vendor/llvm/dist/lib/MC/MCAsmInfoCOFF.cpp vendor/llvm/dist/lib/MC/MCAsmStreamer.cpp vendor/llvm/dist/lib/MC/MCParser/AsmParser.cpp vendor/llvm/dist/lib/MC/MCStreamer.cpp vendor/llvm/dist/lib/Support/MemoryBuffer.cpp vendor/llvm/dist/lib/Support/SourceMgr.cpp vendor/llvm/dist/lib/Support/regengine.inc vendor/llvm/dist/lib/Support/regexec.c vendor/llvm/dist/lib/Target/ARM/ARM.td vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.h vendor/llvm/dist/lib/Target/ARM/ARMInstrFormats.td vendor/llvm/dist/lib/Target/ARM/ARMMCAsmInfo.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMInstPrinter.h vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassembler.cpp vendor/llvm/dist/lib/Target/ARM/Makefile vendor/llvm/dist/lib/Target/Alpha/Alpha.td vendor/llvm/dist/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp vendor/llvm/dist/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp vendor/llvm/dist/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp vendor/llvm/dist/lib/Target/CellSPU/SPURegisterInfo.cpp vendor/llvm/dist/lib/Target/MBlaze/AsmPrinter/MBlazeAsmPrinter.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlaze.td vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430InstPrinter.cpp vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430InstPrinter.h vendor/llvm/dist/lib/Target/MSP430/MSP430.td vendor/llvm/dist/lib/Target/MSP430/MSP430InstrFormats.td vendor/llvm/dist/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp vendor/llvm/dist/lib/Target/Mips/Mips.td vendor/llvm/dist/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp vendor/llvm/dist/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h vendor/llvm/dist/lib/Target/PIC16/PIC16DebugInfo.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16DebugInfo.h vendor/llvm/dist/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp vendor/llvm/dist/lib/Target/PowerPC/PPC.td vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCInstrFormats.td vendor/llvm/dist/lib/Target/PowerPC/PPCMCAsmInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.cpp vendor/llvm/dist/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp vendor/llvm/dist/lib/Target/Sparc/Sparc.td vendor/llvm/dist/lib/Target/Sparc/SparcMCAsmInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.h vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86AsmPrinter.h vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.h vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp vendor/llvm/dist/lib/Target/X86/SSEDomainFix.cpp vendor/llvm/dist/lib/Target/X86/X86.td vendor/llvm/dist/lib/Target/X86/X86FastISel.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/X86MCAsmInfo.cpp vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.cpp vendor/llvm/dist/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp vendor/llvm/dist/lib/Target/XCore/XCore.td vendor/llvm/dist/lib/Target/XCore/XCoreISelLowering.cpp vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.cpp vendor/llvm/dist/lib/Target/XCore/XCoreMCAsmInfo.cpp vendor/llvm/dist/lib/Target/XCore/XCoreRegisterInfo.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCalls.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnswitch.cpp vendor/llvm/dist/lib/Transforms/Scalar/MemCpyOptimizer.cpp vendor/llvm/dist/lib/Transforms/Scalar/SCCP.cpp vendor/llvm/dist/lib/Transforms/Scalar/ScalarReplAggregates.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyLibCalls.cpp vendor/llvm/dist/lib/Transforms/Utils/BasicBlockUtils.cpp vendor/llvm/dist/lib/Transforms/Utils/BuildLibCalls.cpp vendor/llvm/dist/lib/Transforms/Utils/InlineFunction.cpp vendor/llvm/dist/lib/VMCore/AutoUpgrade.cpp vendor/llvm/dist/lib/VMCore/LLVMContext.cpp vendor/llvm/dist/lib/VMCore/LLVMContextImpl.cpp vendor/llvm/dist/lib/VMCore/LLVMContextImpl.h vendor/llvm/dist/lib/VMCore/Pass.cpp vendor/llvm/dist/test/Analysis/BasicAA/modref.ll vendor/llvm/dist/test/Bitcode/memcpy.ll vendor/llvm/dist/test/CodeGen/X86/memcpy.ll vendor/llvm/dist/test/CodeGen/X86/personality.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/InstCombine/memset_chk.ll vendor/llvm/dist/test/Transforms/InstCombine/objsize.ll vendor/llvm/dist/test/Transforms/MemCpyOpt/align.ll vendor/llvm/dist/test/Transforms/SimplifyLibCalls/StrCpy.ll vendor/llvm/dist/test/Verifier/2006-12-12-IntrinsicDefine.ll vendor/llvm/dist/tools/edis/EDDisassembler.cpp vendor/llvm/dist/tools/llc/llc.cpp vendor/llvm/dist/tools/llvm-mc/Disassembler.cpp vendor/llvm/dist/tools/llvm-mc/llvm-mc.cpp vendor/llvm/dist/tools/lto/LTOModule.cpp vendor/llvm/dist/unittests/ExecutionEngine/JIT/JITTest.cpp vendor/llvm/dist/utils/FileCheck/FileCheck.cpp vendor/llvm/dist/utils/TableGen/AsmWriterEmitter.cpp vendor/llvm/dist/utils/TableGen/AsmWriterInst.cpp vendor/llvm/dist/utils/TableGen/InstrInfoEmitter.cpp vendor/llvm/dist/utils/TableGen/InstrInfoEmitter.h vendor/llvm/dist/utils/TableGen/Record.cpp vendor/llvm/dist/utils/TableGen/Record.h Modified: vendor/llvm/dist/docs/HowToReleaseLLVM.html ============================================================================== --- vendor/llvm/dist/docs/HowToReleaseLLVM.html Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/docs/HowToReleaseLLVM.html Tue Apr 6 15:52:58 2010 (r206274) @@ -362,13 +362,12 @@ Qualification Details</a></div> <p><table> <tr><th>Architecture</th><th>OS</th><th>llvm-gcc baseline</th><th>clang baseline </th><th>tests</th></tr> - <tr><td>x86-32</td><td>Mac OS 10.5</td><td>last release</td><td>none</td><td>llvm dejagnu, clang tests, test-suite (including spec)</td></tr> - <tr><td>x86-32</td><td>Linux</td><td>last release</td><td>none</td><td>llvm dejagnu, clang tests, test-suite (including spec)</td></tr> - <tr><td>x86-32</td><td>FreeBSD</td><td>none</td><td>none</td><td>llvm dejagnu, clang tests, test-suite</td></tr> + <tr><td>x86-32</td><td>Linux</td><td>last release</td><td>last release</td><td>llvm dejagnu, clang tests, test-suite (including spec)</td></tr> + <tr><td>x86-32</td><td>FreeBSD</td><td>none</td><td>last release</td><td>llvm dejagnu, clang tests, test-suite</td></tr> <tr><td>x86-32</td><td>mingw</td><td>last release</td><td>none</td><td>QT</td></tr> - <tr><td>x86-64</td><td>Mac OS 10.5</td><td>last release</td><td>none</td><td>llvm dejagnu, clang tests, test-suite (including spec)</td></tr> - <tr><td>x86-64</td><td>Linux</td><td>last release</td><td>none</td><td>llvm dejagnu, clang tests, test-suite (including spec)</td></tr> - <tr><td>x86-64</td><td>FreeBSD</td><td>none</td><td>none</td><td>llvm dejagnu, clang tests, test-suite</td></tr> + <tr><td>x86-64</td><td>Mac OS 10.X</td><td>last release</td><td>last release</td><td>llvm dejagnu, clang tests, test-suite (including spec)</td></tr> + <tr><td>x86-64</td><td>Linux</td><td>last release</td><td>last release</td><td>llvm dejagnu, clang tests, test-suite (including spec)</td></tr> + <tr><td>x86-64</td><td>FreeBSD</td><td>none</td><td>last release</td><td>llvm dejagnu, clang tests, test-suite</td></tr> </table></p> </div> @@ -518,7 +517,7 @@ svn copy https://llvm.org/svn/llvm-proje src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a> <a href="http://llvm.cs.uiuc.edu">The LLVM Compiler Infrastructure</a> <br> - Last modified: $Date: 2009-10-12 16:46:08 +0200 (Mon, 12 Oct 2009) $ + Last modified: $Date: 2010-04-05 20:35:37 +0200 (Mon, 05 Apr 2010) $ </address> </body> </html> Modified: vendor/llvm/dist/docs/Lexicon.html ============================================================================== --- vendor/llvm/dist/docs/Lexicon.html Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/docs/Lexicon.html Tue Apr 6 15:52:58 2010 (r206274) @@ -50,6 +50,11 @@ <td><a href="#LCSSA">LCSSA</a></td> <td><a href="#LICM">LICM</a></td> <td><a href="#Load-VN">Load-VN</a></td> + <td><a href="#LTO">LTO</a></td> + </tr> + <tr><th colspan="8"><b>- <a href="#M">M</a> -</b></th></tr> + <tr> + <td><a href="#MC">MC</a></td> </tr> <tr><th colspan="8"><b>- <a href="#O">O</a> -</b></th></tr> <tr> @@ -167,15 +172,24 @@ href="http://www.program-transformation. <div class="doc_subsection"><a name="L">- L -</a></div> <div class="doc_text"> <dl> - <dt><a name="LCSSA"><b>LCSSA</b></a></dt> - <dd>Loop-Closed Static Single Assignment Form</dd> + <dt><a name="LCSSA"><b>LCSSA</b></a></dt> + <dd>Loop-Closed Static Single Assignment Form</dd> <dt><a name="LICM"><b>LICM</b></a></dt> <dd>Loop Invariant Code Motion</dd> <dt><a name="Load-VN"><b>Load-VN</b></a></dt> <dd>Load Value Numbering</dd> + <dt><a name="LTO"><b>LTO</b></a></dt> + <dd>Link-Time Optimization</dd> + </dl> +</div> +<!-- _______________________________________________________________________ --> +<div class="doc_subsection"><a name="M">- M -</a></div> +<div class="doc_text"> + <dl> + <dt><a name="MC"><b>MC</b></a></dt> + <dd>Machine Code</dd> </dl> </div> - <!-- _______________________________________________________________________ --> <div class="doc_subsection"><a name="O">- O -</a></div> <div class="doc_text"> @@ -255,7 +269,7 @@ href="http://www.program-transformation. src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a><a href="http://llvm.org/">The LLVM Team</a><br> <a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br> -Last modified: $Date: 2008-12-14 09:01:51 +0100 (Sun, 14 Dec 2008) $ +Last modified: $Date: 2010-04-05 07:48:47 +0200 (Mon, 05 Apr 2010) $ </address> <!-- vim: sw=2 --> Modified: vendor/llvm/dist/docs/SourceLevelDebugging.html ============================================================================== --- vendor/llvm/dist/docs/SourceLevelDebugging.html Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/docs/SourceLevelDebugging.html Tue Apr 6 15:52:58 2010 (r206274) @@ -144,7 +144,7 @@ height="369"> an LLVM user a relationship between generated code and the original program source code.</p> -<p>Currently, debug information is consumed by the DwarfWriter to produce dwarf +<p>Currently, debug information is consumed by DwarfDebug to produce dwarf information used by the gdb debugger. Other targets could use the same information to produce stabs or other debug forms.</p> @@ -1773,7 +1773,7 @@ enum Trees { <a href="mailto:sabre@nondot.org">Chris Lattner</a><br> <a href="http://llvm.org">LLVM Compiler Infrastructure</a><br> - Last modified: $Date: 2010-03-31 09:50:17 +0200 (Wed, 31 Mar 2010) $ + Last modified: $Date: 2010-04-05 06:11:11 +0200 (Mon, 05 Apr 2010) $ </address> </body> Modified: vendor/llvm/dist/docs/WritingAnLLVMBackend.html ============================================================================== --- vendor/llvm/dist/docs/WritingAnLLVMBackend.html Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/docs/WritingAnLLVMBackend.html Tue Apr 6 15:52:58 2010 (r206274) @@ -561,8 +561,7 @@ def AL : Register<"AL">, DwarfRegN <p> This defines the register <tt>AL</tt> and assigns it values (with <tt>DwarfRegNum</tt>) that are used by <tt>gcc</tt>, <tt>gdb</tt>, or a debug -information writer (such as <tt>DwarfWriter</tt> -in <tt>llvm/lib/CodeGen/AsmPrinter</tt>) to identify a register. For register +information writer to identify a register. For register <tt>AL</tt>, <tt>DwarfRegNum</tt> takes an array of 3 values representing 3 different modes: the first element is for X86-64, the second for exception handling (EH) on X86-32, and the third is generic. -1 is a special Dwarf number @@ -2555,7 +2554,7 @@ with assembler. <a href="http://www.woo.com">Mason Woo</a> and <a href="http://misha.brukman.net">Misha Brukman</a><br> <a href="http://llvm.org">The LLVM Compiler Infrastructure</a> <br> - Last modified: $Date: 2010-02-02 19:44:12 +0100 (Tue, 02 Feb 2010) $ + Last modified: $Date: 2010-04-05 06:11:11 +0200 (Mon, 05 Apr 2010) $ </address> </body> Modified: vendor/llvm/dist/include/llvm/ADT/OwningPtr.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/OwningPtr.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/ADT/OwningPtr.h Tue Apr 6 15:52:58 2010 (r206274) @@ -128,7 +128,6 @@ inline void swap(OwningArrayPtr<T> &a, O a.swap(b); } - } // end namespace llvm #endif Modified: vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h Tue Apr 6 15:52:58 2010 (r206274) @@ -18,8 +18,6 @@ #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/Support/DebugLoc.h" -#include "llvm/Target/TargetMachine.h" -#include "llvm/ADT/DenseMap.h" namespace llvm { class BlockAddress; @@ -43,63 +41,33 @@ namespace llvm { class MachineConstantPoolValue; class MachineJumpTableInfo; class MachineModuleInfo; + class MachineMove; + class MCAsmInfo; class MCInst; class MCContext; class MCSection; class MCStreamer; class MCSymbol; - class DwarfWriter; + class DwarfDebug; + class DwarfException; class Mangler; - class MCAsmInfo; class TargetLoweringObjectFile; + class TargetData; class Twine; class Type; - class formatted_raw_ostream; /// AsmPrinter - This class is intended to be used as a driving class for all /// asm writers. class AsmPrinter : public MachineFunctionPass { - static char ID; - - // GCMetadataPrinters - The garbage collection metadata printer table. - typedef DenseMap<GCStrategy*,GCMetadataPrinter*> gcp_map_type; - typedef gcp_map_type::iterator gcp_iterator; - gcp_map_type GCMetadataPrinters; - - /// If VerboseAsm is set, a pointer to the loop info for this - /// function. - /// - MachineLoopInfo *LI; - - public: - /// MMI - If available, this is a pointer to the current MachineModuleInfo. - MachineModuleInfo *MMI; - - protected: - /// DW - If available, this is a pointer to the current dwarf writer. - DwarfWriter *DW; - public: - - /// Output stream on which we're printing assembly code. - /// - formatted_raw_ostream &O; - /// Target machine description. /// TargetMachine &TM; - /// getObjFileLowering - Return information about object file lowering. - TargetLoweringObjectFile &getObjFileLowering() const; - /// Target Asm Printer information. /// const MCAsmInfo *MAI; - /// Target Register Information. - /// - const TargetRegisterInfo *TRI; - /// OutContext - This is the context for the output file that we are /// streaming. This owns all of the global MC-related objects for the /// generated translation unit. @@ -114,6 +82,9 @@ namespace llvm { /// The current machine function. const MachineFunction *MF; + /// MMI - This is a pointer to the current MachineModuleInfo. + MachineModuleInfo *MMI; + /// Name-mangler for global names. /// Mangler *Mang; @@ -123,24 +94,28 @@ namespace llvm { /// MCSymbol *CurrentFnSym; - /// getCurrentSection() - Return the current section we are emitting to. - const MCSection *getCurrentSection() const; + private: + // GCMetadataPrinters - The garbage collection metadata printer table. + void *GCMetadataPrinters; // Really a DenseMap. - /// VerboseAsm - Emit comments in assembly output if this is true. /// bool VerboseAsm; + static char ID; + + /// If VerboseAsm is set, a pointer to the loop info for this + /// function. + MachineLoopInfo *LI; - /// Private state for PrintSpecial() - // Assign a unique ID to this machine instruction. - mutable const MachineInstr *LastMI; - mutable const Function *LastFn; - mutable unsigned Counter; - mutable unsigned SetCounter; + /// DD - If the target supports dwarf debug info, this pointer is non-null. + DwarfDebug *DD; + + /// DE - If the target supports dwarf exception info, this pointer is + /// non-null. + DwarfException *DE; protected: - explicit AsmPrinter(formatted_raw_ostream &o, TargetMachine &TM, - MCStreamer &Streamer); + explicit AsmPrinter(TargetMachine &TM, MCStreamer &Streamer); public: virtual ~AsmPrinter(); @@ -153,7 +128,20 @@ namespace llvm { /// unsigned getFunctionNumber() const; - protected: + /// getObjFileLowering - Return information about object file lowering. + TargetLoweringObjectFile &getObjFileLowering() const; + + /// getTargetData - Return information about data layout. + const TargetData &getTargetData() const; + + /// getCurrentSection() - Return the current section we are emitting to. + const MCSection *getCurrentSection() const; + + + //===------------------------------------------------------------------===// + // MachineFunctionPass Implementation. + //===------------------------------------------------------------------===// + /// getAnalysisUsage - Record analysis usage. /// void getAnalysisUsage(AnalysisUsage &AU) const; @@ -163,41 +151,10 @@ namespace llvm { /// call this implementation. bool doInitialization(Module &M); - /// EmitStartOfAsmFile - This virtual method can be overridden by targets - /// that want to emit something at the start of their file. - virtual void EmitStartOfAsmFile(Module &) {} - - /// EmitEndOfAsmFile - This virtual method can be overridden by targets that - /// want to emit something at the end of their file. - virtual void EmitEndOfAsmFile(Module &) {} - /// doFinalization - Shut down the asmprinter. If you override this in your /// pass, you must make sure to call it explicitly. bool doFinalization(Module &M); - /// PrintSpecial - Print information related to the specified machine instr - /// that is independent of the operand, and may be independent of the instr - /// itself. This can be useful for portably encoding the comment character - /// or other bits of target-specific knowledge into the asmstrings. The - /// syntax used is ${:comment}. Targets can override this to add support - /// for their own strange codes. - virtual void PrintSpecial(const MachineInstr *MI, const char *Code) const; - - /// PrintAsmOperand - Print the specified operand of MI, an INLINEASM - /// instruction, using the specified assembler variant. Targets should - /// override this to format as appropriate. This method can return true if - /// the operand is erroneous. - virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, - unsigned AsmVariant, const char *ExtraCode); - - /// PrintAsmMemoryOperand - Print the specified operand of MI, an INLINEASM - /// instruction, using the specified assembler variant as an address. - /// Targets should override this to format as appropriate. This method can - /// return true if the operand is erroneous. - virtual bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo, - unsigned AsmVariant, - const char *ExtraCode); - /// runOnMachineFunction - Emit the specified function out to the /// OutStreamer. virtual bool runOnMachineFunction(MachineFunction &MF) { @@ -207,6 +164,10 @@ namespace llvm { return false; } + //===------------------------------------------------------------------===// + // Coarse grained IR lowering routines. + //===------------------------------------------------------------------===// + /// SetupMachineFunction - This should be called when a new MachineFunction /// is being processed from runOnMachineFunction. void SetupMachineFunction(MachineFunction &MF); @@ -219,19 +180,6 @@ namespace llvm { /// function. void EmitFunctionBody(); - /// EmitInstruction - Targets should implement this to emit instructions. - virtual void EmitInstruction(const MachineInstr *) { - assert(0 && "EmitInstruction not implemented"); - } - - /// EmitFunctionBodyStart - Targets can override this to emit stuff before - /// the first basic block in the function. - virtual void EmitFunctionBodyStart() {} - - /// EmitFunctionBodyEnd - Targets can override this to emit stuff after - /// the last basic block in the function. - virtual void EmitFunctionBodyEnd() {} - /// EmitConstantPool - Print to the current output stream assembly /// representations of the constants in the constant pool MCP. This is /// used to print out constants which have been "spilled to memory" by @@ -252,36 +200,6 @@ namespace llvm { /// do nothing and return false. bool EmitSpecialLLVMGlobal(const GlobalVariable *GV); - public: - //===------------------------------------------------------------------===// - // Emission and print routines - // - - /// EmitInt8 - Emit a byte directive and value. - /// - void EmitInt8(int Value) const; - - /// EmitInt16 - Emit a short directive and value. - /// - void EmitInt16(int Value) const; - - /// EmitInt32 - Emit a long directive and value. - /// - void EmitInt32(int Value) const; - - /// EmitInt64 - Emit a long long directive and value. - /// - void EmitInt64(uint64_t Value) const; - - - /// EmitLabelDifference - Emit something like ".long Hi-Lo" where the size - /// in bytes of the directive is specified by Size and Hi/Lo specify the - /// labels. This implicitly uses .set if it is available. - void EmitLabelDifference(const MCSymbol *Hi, const MCSymbol *Lo, - unsigned Size) const; - - //===------------------------------------------------------------------===// - /// EmitAlignment - Emit an alignment directive to the specified power of /// two boundary. For example, if you pass in 3 here, you will get an 8 /// byte alignment. If a global value is specified, and if that global has @@ -301,11 +219,69 @@ namespace llvm { void EmitAlignment(unsigned NumBits, const GlobalValue *GV = 0, unsigned ForcedAlignBits = 0, bool UseFillExpr = true) const; + + /// EmitBasicBlockStart - This method prints the label for the specified + /// MachineBasicBlock, an alignment (if present) and a comment describing + /// it if appropriate. + void EmitBasicBlockStart(const MachineBasicBlock *MBB) const; + + + /// EmitGlobalConstant - Print a general LLVM constant to the .s file. + void EmitGlobalConstant(const Constant *CV, unsigned AddrSpace = 0); + + + //===------------------------------------------------------------------===// + // Overridable Hooks + //===------------------------------------------------------------------===// + + // Targets can, or in the case of EmitInstruction, must implement these to + // customize output. + + /// EmitStartOfAsmFile - This virtual method can be overridden by targets + /// that want to emit something at the start of their file. + virtual void EmitStartOfAsmFile(Module &) {} + + /// EmitEndOfAsmFile - This virtual method can be overridden by targets that + /// want to emit something at the end of their file. + virtual void EmitEndOfAsmFile(Module &) {} + + /// EmitFunctionBodyStart - Targets can override this to emit stuff before + /// the first basic block in the function. + virtual void EmitFunctionBodyStart() {} + + /// EmitFunctionBodyEnd - Targets can override this to emit stuff after + /// the last basic block in the function. + virtual void EmitFunctionBodyEnd() {} + + /// EmitInstruction - Targets should implement this to emit instructions. + virtual void EmitInstruction(const MachineInstr *) { + assert(0 && "EmitInstruction not implemented"); + } + + virtual void EmitFunctionEntryLabel(); + + virtual void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV); + + /// isBlockOnlyReachableByFallthough - Return true if the basic block has + /// exactly one predecessor and the control transfer mechanism between + /// the predecessor and this block is a fall-through. + virtual bool + isBlockOnlyReachableByFallthrough(const MachineBasicBlock *MBB) const; + + //===------------------------------------------------------------------===// + // Symbol Lowering Routines. + //===------------------------------------------------------------------===// + public: - /// printDeclare - This method prints a local variable declaration used by - /// debug tables. - void printDeclare(const MachineInstr *MI) const; - + /// GetTempSymbol - Return the MCSymbol corresponding to the assembler + /// temporary label with the specified stem and unique ID. + MCSymbol *GetTempSymbol(StringRef Name, unsigned ID) const; + + /// GetTempSymbol - Return an assembler temporary label with the specified + /// stem. + MCSymbol *GetTempSymbol(StringRef Name) const; + + /// GetSymbolWithGlobalValueBase - Return the MCSymbol for a symbol with /// global value name as its base, with the specified suffix, and where the /// symbol is forced to have private linkage if ForcePrivate is true. @@ -332,49 +308,131 @@ namespace llvm { MCSymbol *GetBlockAddressSymbol(const BlockAddress *BA) const; MCSymbol *GetBlockAddressSymbol(const BasicBlock *BB) const; - /// EmitBasicBlockStart - This method prints the label for the specified - /// MachineBasicBlock, an alignment (if present) and a comment describing - /// it if appropriate. - void EmitBasicBlockStart(const MachineBasicBlock *MBB) const; + //===------------------------------------------------------------------===// + // Emission Helper Routines. + //===------------------------------------------------------------------===// + public: + /// printOffset - This is just convenient handler for printing offsets. + void printOffset(int64_t Offset, raw_ostream &OS) const; + /// EmitInt8 - Emit a byte directive and value. + /// + void EmitInt8(int Value) const; - // Data emission. + /// EmitInt16 - Emit a short directive and value. + /// + void EmitInt16(int Value) const; - /// EmitGlobalConstant - Print a general LLVM constant to the .s file. - void EmitGlobalConstant(const Constant* CV, unsigned AddrSpace = 0); + /// EmitInt32 - Emit a long directive and value. + /// + void EmitInt32(int Value) const; - protected: - virtual void EmitFunctionEntryLabel(); + /// EmitLabelDifference - Emit something like ".long Hi-Lo" where the size + /// in bytes of the directive is specified by Size and Hi/Lo specify the + /// labels. This implicitly uses .set if it is available. + void EmitLabelDifference(const MCSymbol *Hi, const MCSymbol *Lo, + unsigned Size) const; + + //===------------------------------------------------------------------===// + // Dwarf Emission Helper Routines + //===------------------------------------------------------------------===// + + /// EmitSLEB128 - emit the specified signed leb128 value. + void EmitSLEB128(int Value, const char *Desc = 0) const; + + /// EmitULEB128 - emit the specified unsigned leb128 value. + void EmitULEB128(unsigned Value, const char *Desc = 0, + unsigned PadTo = 0) const; + + /// EmitCFAByte - Emit a .byte 42 directive for a DW_CFA_xxx value. + void EmitCFAByte(unsigned Val) const; + + /// EmitEncodingByte - Emit a .byte 42 directive that corresponds to an + /// encoding. If verbose assembly output is enabled, we output comments + /// describing the encoding. Desc is a string saying what the encoding is + /// specifying (e.g. "LSDA"). + void EmitEncodingByte(unsigned Val, const char *Desc = 0) const; + + /// GetSizeOfEncodedValue - Return the size of the encoding in bytes. + unsigned GetSizeOfEncodedValue(unsigned Encoding) const; + + /// EmitReference - Emit a reference to a label with a specified encoding. + /// + void EmitReference(const MCSymbol *Sym, unsigned Encoding) const; + void EmitReference(const GlobalValue *GV, unsigned Encoding) const; + + /// EmitSectionOffset - Emit the 4-byte offset of Label from the start of + /// its section. This can be done with a special directive if the target + /// supports it (e.g. cygwin) or by emitting it as an offset from a label at + /// the start of the section. + /// + /// SectionLabel is a temporary label emitted at the start of the section + /// that Label lives in. + void EmitSectionOffset(const MCSymbol *Label, + const MCSymbol *SectionLabel) const; + + //===------------------------------------------------------------------===// + // Dwarf Lowering Routines + //===------------------------------------------------------------------===// + + /// EmitFrameMoves - Emit frame instructions to describe the layout of the + /// frame. + void EmitFrameMoves(const std::vector<MachineMove> &Moves, + MCSymbol *BaseLabel, bool isEH) const; + + + //===------------------------------------------------------------------===// + // Inline Asm Support + //===------------------------------------------------------------------===// + public: + // These are hooks that targets can override to implement inline asm + // support. These should probably be moved out of AsmPrinter someday. + + /// PrintSpecial - Print information related to the specified machine instr + /// that is independent of the operand, and may be independent of the instr + /// itself. This can be useful for portably encoding the comment character + /// or other bits of target-specific knowledge into the asmstrings. The + /// syntax used is ${:comment}. Targets can override this to add support + /// for their own strange codes. + virtual void PrintSpecial(const MachineInstr *MI, raw_ostream &OS, + const char *Code) const; + + /// PrintAsmOperand - Print the specified operand of MI, an INLINEASM + /// instruction, using the specified assembler variant. Targets should + /// override this to format as appropriate. This method can return true if + /// the operand is erroneous. + virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, + unsigned AsmVariant, const char *ExtraCode, + raw_ostream &OS); + + /// PrintAsmMemoryOperand - Print the specified operand of MI, an INLINEASM + /// instruction, using the specified assembler variant as an address. + /// Targets should override this to format as appropriate. This method can + /// return true if the operand is erroneous. + virtual bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo, + unsigned AsmVariant, + const char *ExtraCode, + raw_ostream &OS); - virtual void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV); - - /// printOffset - This is just convenient handler for printing offsets. - void printOffset(int64_t Offset) const; - - /// isBlockOnlyReachableByFallthough - Return true if the basic block has - /// exactly one predecessor and the control transfer mechanism between - /// the predecessor and this block is a fall-through. - virtual bool isBlockOnlyReachableByFallthrough(const MachineBasicBlock *MBB) const; - private: + /// Private state for PrintSpecial() + // Assign a unique ID to this machine instruction. + mutable const MachineInstr *LastMI; + mutable unsigned LastFn; + mutable unsigned Counter; + mutable unsigned SetCounter; - /// processDebugLoc - Processes the debug information of each machine - /// instruction's DebugLoc. - void processDebugLoc(const MachineInstr *MI, bool BeforePrintingInsn); + /// EmitInlineAsm - Emit a blob of inline asm to the output streamer. + void EmitInlineAsm(StringRef Str, unsigned LocCookie) const; - void printLabelInst(const MachineInstr *MI) const; - - /// printInlineAsm - This method formats and prints the specified machine + /// EmitInlineAsm - This method formats and emits the specified machine /// instruction that is an inline asm. - void printInlineAsm(const MachineInstr *MI) const; - - /// printImplicitDef - This method prints the specified machine instruction - /// that is an implicit def. - void printImplicitDef(const MachineInstr *MI) const; - - /// printKill - This method prints the specified kill machine instruction. - void printKill(const MachineInstr *MI) const; + void EmitInlineAsm(const MachineInstr *MI) const; + //===------------------------------------------------------------------===// + // Internal Implementation Details + //===------------------------------------------------------------------===// + /// EmitVisibility - This emits visibility information about symbol, if /// this is suported by the target. void EmitVisibility(MCSymbol *Sym, unsigned Visibility) const; Modified: vendor/llvm/dist/include/llvm/CodeGen/FastISel.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/FastISel.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/FastISel.h Tue Apr 6 15:52:58 2010 (r206274) @@ -27,8 +27,6 @@ class MachineBasicBlock; class MachineConstantPool; class MachineFunction; class MachineFrameInfo; -class MachineModuleInfo; -class DwarfWriter; class MachineRegisterInfo; class TargetData; class TargetInstrInfo; @@ -50,8 +48,6 @@ protected: SmallSet<Instruction*, 8> &CatchInfoLost; #endif MachineFunction &MF; - MachineModuleInfo *MMI; - DwarfWriter *DW; MachineRegisterInfo &MRI; MachineFrameInfo &MFI; MachineConstantPool &MCP; @@ -116,8 +112,6 @@ public: protected: FastISel(MachineFunction &mf, - MachineModuleInfo *mmi, - DwarfWriter *dw, DenseMap<const Value *, unsigned> &vm, DenseMap<const BasicBlock *, MachineBasicBlock *> &bm, DenseMap<const AllocaInst *, int> &am Modified: vendor/llvm/dist/include/llvm/CodeGen/GCMetadataPrinter.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/GCMetadataPrinter.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/GCMetadataPrinter.h Tue Apr 6 15:52:58 2010 (r206274) @@ -27,8 +27,6 @@ namespace llvm { class GCMetadataPrinter; - class raw_ostream; - class MCAsmInfo; /// GCMetadataPrinterRegistry - The GC assembly printer registry uses all the /// defaults from Registry. @@ -63,11 +61,9 @@ namespace llvm { iterator end() { return S->end(); } /// beginAssembly/finishAssembly - Emit module metadata as assembly code. - virtual void beginAssembly(raw_ostream &OS, AsmPrinter &AP, - const MCAsmInfo &MAI); + virtual void beginAssembly(AsmPrinter &AP); - virtual void finishAssembly(raw_ostream &OS, AsmPrinter &AP, - const MCAsmInfo &MAI); + virtual void finishAssembly(AsmPrinter &AP); virtual ~GCMetadataPrinter(); }; Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineDominators.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineDominators.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineDominators.h Tue Apr 6 15:52:58 2010 (r206274) @@ -156,8 +156,13 @@ public: inline void splitBlock(MachineBasicBlock* NewBB) { DT->splitBlock(NewBB); } - - + + /// isReachableFromEntry - Return true if A is dominated by the entry + /// block of the function containing it. + bool isReachableFromEntry(MachineBasicBlock *A) { + return DT->isReachableFromEntry(A); + } + virtual void releaseMemory(); virtual void print(raw_ostream &OS, const Module*) const; Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h Tue Apr 6 15:52:58 2010 (r206274) @@ -14,12 +14,9 @@ #ifndef LLVM_CODEGEN_MACHINEFRAMEINFO_H #define LLVM_CODEGEN_MACHINEFRAMEINFO_H -#include "llvm/ADT/BitVector.h" -#include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallVector.h" #include "llvm/System/DataTypes.h" #include <cassert> -#include <limits> #include <vector> namespace llvm { @@ -27,26 +24,21 @@ class raw_ostream; class TargetData; class TargetRegisterClass; class Type; -class MachineModuleInfo; class MachineFunction; class MachineBasicBlock; class TargetFrameInfo; +class BitVector; /// The CalleeSavedInfo class tracks the information need to locate where a /// callee saved register in the current frame. class CalleeSavedInfo { - -private: unsigned Reg; const TargetRegisterClass *RegClass; int FrameIdx; public: CalleeSavedInfo(unsigned R, const TargetRegisterClass *RC, int FI = 0) - : Reg(R) - , RegClass(RC) - , FrameIdx(FI) - {} + : Reg(R), RegClass(RC), FrameIdx(FI) {} // Accessors. unsigned getReg() const { return Reg; } @@ -188,13 +180,6 @@ class MachineFrameInfo { /// spill slots. SmallVector<bool, 8> SpillObjects; - /// MMI - This field is set (via setMachineModuleInfo) by a module info - /// consumer (ex. DwarfWriter) to indicate that frame layout information - /// should be acquired. Typically, it's the responsibility of the target's - /// TargetRegisterInfo prologue/epilogue emitting code to inform - /// MachineModuleInfo of frame layouts. - MachineModuleInfo *MMI; - /// TargetFrameInfo - Target information about frame layout. /// const TargetFrameInfo &TFI; @@ -208,7 +193,6 @@ public: StackProtectorIdx = -1; MaxCallFrameSize = 0; CSIValid = false; - MMI = 0; } /// hasStackObjects - Return true if there are any stack objects in this @@ -451,14 +435,6 @@ public: /// method always returns an empty set. BitVector getPristineRegs(const MachineBasicBlock *MBB) const; - /// getMachineModuleInfo - Used by a prologue/epilogue - /// emitter (TargetRegisterInfo) to provide frame layout information. - MachineModuleInfo *getMachineModuleInfo() const { return MMI; } - - /// setMachineModuleInfo - Used by a meta info consumer (DwarfWriter) to - /// indicate that frame layout information should be gathered. - void setMachineModuleInfo(MachineModuleInfo *mmi) { MMI = mmi; } - /// print - Used by the MachineFunction printer to print information about /// stack objects. Implemented in MachineFunction.cpp /// Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h Tue Apr 6 15:52:58 2010 (r206274) @@ -32,6 +32,7 @@ class MachineRegisterInfo; class MachineFrameInfo; class MachineConstantPool; class MachineJumpTableInfo; +class MachineModuleInfo; class MCContext; class Pass; class TargetMachine; @@ -72,7 +73,8 @@ class MachineFunction { Function *Fn; const TargetMachine &Target; MCContext &Ctx; - + MachineModuleInfo &MMI; + // RegInfo - Information about each register in use in the function. MachineRegisterInfo *RegInfo; @@ -107,8 +109,8 @@ class MachineFunction { typedef ilist<MachineBasicBlock> BasicBlockListType; BasicBlockListType BasicBlocks; - // Default debug location. Used to print out the debug label at the beginning - // of a function. + /// Default debug location. Used to print out the debug label at the beginning + /// of a function. DebugLoc DefaultDebugLoc; /// FunctionNumber - This provides a unique ID for each function emitted in @@ -116,17 +118,17 @@ class MachineFunction { /// unsigned FunctionNumber; - // The alignment of the function. + /// The alignment of the function. unsigned Alignment; MachineFunction(const MachineFunction &); // DO NOT IMPLEMENT void operator=(const MachineFunction&); // DO NOT IMPLEMENT - public: MachineFunction(Function *Fn, const TargetMachine &TM, unsigned FunctionNum, - MCContext &Ctx); + MachineModuleInfo &MMI); ~MachineFunction(); + MachineModuleInfo &getMMI() const { return MMI; } MCContext &getContext() const { return Ctx; } /// getFunction - Return the LLVM function that this machine code represents Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionAnalysis.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionAnalysis.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionAnalysis.h Tue Apr 6 15:52:58 2010 (r206274) @@ -39,7 +39,7 @@ public: CodeGenOpt::Level getOptLevel() const { return OptLevel; } private: - virtual bool doInitialization(Module &) { NextFnNum = 1; return false; } + virtual bool doInitialization(Module &M); virtual bool runOnFunction(Function &F); virtual void releaseMemory(); virtual void getAnalysisUsage(AnalysisUsage &AU) const; Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h Tue Apr 6 15:52:58 2010 (r206274) @@ -100,6 +100,9 @@ class MachineModuleInfo : public Immutab /// Context - This is the MCContext used for the entire code generator. MCContext Context; + /// TheModule - This is the LLVM Module being worked on. + Module *TheModule; + /// ObjFileMMI - This is the object-file-format-specific implementation of /// MachineModuleInfoImpl, which lets targets accumulate whatever info they /// want. @@ -176,6 +179,9 @@ public: const MCContext &getContext() const { return Context; } MCContext &getContext() { return Context; } + void setModule(Module *M) { TheModule = M; } + Module *getModule() const { return TheModule; } + /// getInfo - Keep track of various per-function pieces of information for /// backends that would like to do so. /// Modified: vendor/llvm/dist/include/llvm/CodeGen/ScheduleDAG.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/ScheduleDAG.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/ScheduleDAG.h Tue Apr 6 15:52:58 2010 (r206274) @@ -27,7 +27,6 @@ namespace llvm { class SUnit; class MachineConstantPool; class MachineFunction; - class MachineModuleInfo; class MachineRegisterInfo; class MachineInstr; class TargetRegisterInfo; Modified: vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h Tue Apr 6 15:52:58 2010 (r206274) @@ -29,11 +29,9 @@ namespace llvm { class AliasAnalysis; -class DwarfWriter; class FunctionLoweringInfo; class MachineConstantPoolValue; class MachineFunction; -class MachineModuleInfo; class MDNode; class SDNodeOrdering; class SDDbgValue; @@ -122,9 +120,7 @@ class SelectionDAG { TargetLowering &TLI; MachineFunction *MF; FunctionLoweringInfo &FLI; - MachineModuleInfo *MMI; - DwarfWriter *DW; - LLVMContext* Context; + LLVMContext *Context; /// EntryNode - The starting token. SDNode EntryNode; @@ -182,7 +178,7 @@ public: /// init - Prepare this SelectionDAG to process code in the given /// MachineFunction. /// - void init(MachineFunction &mf, MachineModuleInfo *mmi, DwarfWriter *dw); + void init(MachineFunction &mf); /// clear - Clear state and free memory necessary to make this /// SelectionDAG ready to process a new block. @@ -193,8 +189,6 @@ public: const TargetMachine &getTarget() const; TargetLowering &getTargetLoweringInfo() const { return TLI; } FunctionLoweringInfo &getFunctionLoweringInfo() const { return FLI; } - MachineModuleInfo *getMachineModuleInfo() const { return MMI; } - DwarfWriter *getDwarfWriter() const { return DW; } LLVMContext *getContext() const {return Context; } /// viewGraph - Pop up a GraphViz/gv window with the DAG rendered using 'dot'. @@ -532,17 +526,17 @@ public: SDValue getStackArgumentTokenFactor(SDValue Chain); SDValue getMemcpy(SDValue Chain, DebugLoc dl, SDValue Dst, SDValue Src, - SDValue Size, unsigned Align, bool AlwaysInline, + SDValue Size, unsigned Align, bool isVol, bool AlwaysInline, const Value *DstSV, uint64_t DstSVOff, const Value *SrcSV, uint64_t SrcSVOff); SDValue getMemmove(SDValue Chain, DebugLoc dl, SDValue Dst, SDValue Src, - SDValue Size, unsigned Align, + SDValue Size, unsigned Align, bool isVol, const Value *DstSV, uint64_t DstOSVff, const Value *SrcSV, uint64_t SrcSVOff); SDValue getMemset(SDValue Chain, DebugLoc dl, SDValue Dst, SDValue Src, - SDValue Size, unsigned Align, + SDValue Size, unsigned Align, bool isVol, const Value *DstSV, uint64_t DstSVOff); /// getSetCC - Helper function to make it easier to build SetCC's if you just Modified: vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h Tue Apr 6 15:52:58 2010 (r206274) @@ -29,8 +29,6 @@ namespace llvm { class MachineBasicBlock; class MachineFunction; class MachineInstr; - class MachineModuleInfo; - class DwarfWriter; class TargetLowering; class TargetInstrInfo; class FunctionLoweringInfo; @@ -284,8 +282,6 @@ private: const SDValue *Ops, unsigned NumOps, unsigned EmitNodeInfo); void SelectAllBasicBlocks(Function &Fn, MachineFunction &MF, - MachineModuleInfo *MMI, - DwarfWriter *DW, const TargetInstrInfo &TII); void FinishBasicBlock(); Modified: vendor/llvm/dist/include/llvm/IntrinsicInst.h ============================================================================== --- vendor/llvm/dist/include/llvm/IntrinsicInst.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/IntrinsicInst.h Tue Apr 6 15:52:58 2010 (r206274) @@ -133,6 +133,13 @@ namespace llvm { return getAlignmentCst()->getZExtValue(); } + ConstantInt *getVolatileCst() const { + return cast<ConstantInt>(const_cast<Value*>(getOperand(5))); + } + bool isVolatile() const { + return getVolatileCst()->getZExtValue() != 0; + } + /// getDest - This is just like getRawDest, but it strips off any cast /// instructions that feed it, giving the original input. The returned /// value is guaranteed to be a pointer. @@ -155,7 +162,11 @@ namespace llvm { void setAlignment(Constant* A) { setOperand(4, A); } - + + void setVolatile(Constant* V) { + setOperand(5, V); + } + const Type *getAlignmentType() const { return getOperand(4)->getType(); } Modified: vendor/llvm/dist/include/llvm/Intrinsics.td ============================================================================== --- vendor/llvm/dist/include/llvm/Intrinsics.td Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/Intrinsics.td Tue Apr 6 15:52:58 2010 (r206274) @@ -224,16 +224,16 @@ def int_stackprotector : Intrinsic<[], // def int_memcpy : Intrinsic<[], *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004061552.o36FqwOh009618>